@arcgis/charts-components 5.1.0-next.97 → 5.1.0-next.99

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 (132) hide show
  1. package/dist/cdn/{XO3XI5UW.js → 2L4KRFAO.js} +1 -1
  2. package/dist/cdn/{474MEOFZ.js → 2WMGX4LG.js} +1 -1
  3. package/dist/cdn/{HZAQ4CU2.js → 3LHIBPWU.js} +1 -1
  4. package/dist/cdn/{SRVSS5LG.js → 3NHSJC2V.js} +1 -1
  5. package/dist/cdn/{DZCGO7SQ.js → 3TYKSX6S.js} +1 -1
  6. package/dist/cdn/437PRHGP.js +2 -0
  7. package/dist/cdn/{PH5QB66G.js → 4A46GMQH.js} +1 -1
  8. package/dist/cdn/{BRPXLQXN.js → 4AP7OF2H.js} +1 -1
  9. package/dist/cdn/{6P6JRYTL.js → 533OIYHT.js} +1 -1
  10. package/dist/cdn/{FPWXPIYT.js → 54JMGDNM.js} +1 -1
  11. package/dist/cdn/{MZIUWLFR.js → 6WQO34EX.js} +1 -1
  12. package/dist/cdn/{Q5LFOZZV.js → 7BIC7WRS.js} +1 -1
  13. package/dist/cdn/{EOSVOYYW.js → 7JYYEL7C.js} +1 -1
  14. package/dist/cdn/7RRIPRBW.js +2 -0
  15. package/dist/cdn/{44YOQYY5.js → ABRBND33.js} +1 -1
  16. package/dist/cdn/{7PRT6KPV.js → AKNI6ZDM.js} +1 -1
  17. package/dist/cdn/{VKLAEROZ.js → B5DED64I.js} +1 -1
  18. package/dist/cdn/{S5ZNTUEJ.js → BGHKBRAY.js} +1 -1
  19. package/dist/cdn/{V6ZSMHGW.js → BIBH7Z6B.js} +1 -1
  20. package/dist/cdn/{5PVOIZ3O.js → BVLDD7VH.js} +1 -1
  21. package/dist/cdn/{C4VB5VOE.js → BYMLWT4F.js} +1 -1
  22. package/dist/cdn/{W6PWWHW7.js → C6VFUQYR.js} +1 -1
  23. package/dist/cdn/{S2MYZR2R.js → CBAUBDVW.js} +1 -1
  24. package/dist/cdn/{X63PQOKY.js → D4THJNNH.js} +1 -1
  25. package/dist/cdn/{J7DSGIMM.js → DOKKZWPP.js} +1 -1
  26. package/dist/cdn/{P7KZJ4LD.js → DQOPCAYH.js} +1 -1
  27. package/dist/cdn/{S6M3THYB.js → ETKEDYJI.js} +1 -1
  28. package/dist/cdn/{MPULRJBL.js → FPOY54UW.js} +1 -1
  29. package/dist/cdn/FRTL3JKO.js +2 -0
  30. package/dist/cdn/{YGXP2KRA.js → FSPMT24F.js} +1 -1
  31. package/dist/cdn/{B5NVKUWE.js → FTTFIYT7.js} +1 -1
  32. package/dist/cdn/{ZO4QGPQK.js → FXE7IJTK.js} +1 -1
  33. package/dist/cdn/{3KOLO2DZ.js → GCLBISUU.js} +1 -1
  34. package/dist/cdn/{EERE56JC.js → GG4V6IWC.js} +1 -1
  35. package/dist/cdn/{6EGDY2R6.js → GN55TJMJ.js} +1 -1
  36. package/dist/cdn/{LDBOH522.js → GR2MDXNR.js} +1 -1
  37. package/dist/cdn/{C7BVZIR6.js → GSIQ3AM5.js} +4 -3
  38. package/dist/cdn/{EZ6IWMWU.js → HRWT2MVN.js} +1 -1
  39. package/dist/cdn/{AXQIU56U.js → HZLHE35F.js} +1 -1
  40. package/dist/cdn/{VMKLIIN4.js → J34XNLVV.js} +1 -1
  41. package/dist/cdn/{KNI5Z6M6.js → JII3X6GD.js} +1 -1
  42. package/dist/cdn/{E672GJOI.js → JIJTDQNZ.js} +1 -1
  43. package/dist/cdn/{A2QGNOIM.js → JP5QECNE.js} +1 -1
  44. package/dist/cdn/{QDQ3XMGW.js → JQAYCBRF.js} +1 -1
  45. package/dist/cdn/{MS3WQ4R4.js → JXUQXIWS.js} +1 -1
  46. package/dist/cdn/{43CJXSHJ.js → KDU3ISRJ.js} +1 -1
  47. package/dist/cdn/{5MVPQ5JO.js → KHK4ESCR.js} +1 -1
  48. package/dist/cdn/{MSYJXEJZ.js → KJXMX3GJ.js} +1 -1
  49. package/dist/cdn/{DGMBW6MF.js → KZQPT32K.js} +1 -1
  50. package/dist/cdn/{6QC2WOB4.js → L5ESAQAD.js} +1 -1
  51. package/dist/cdn/{NFMUWJ4B.js → LRLFI235.js} +1 -1
  52. package/dist/cdn/{UQYUM5RQ.js → LTPICGE4.js} +1 -1
  53. package/dist/cdn/{JIMR7C5L.js → M6AWZ4GQ.js} +1 -1
  54. package/dist/cdn/{OB3LBS5F.js → N3QESBWD.js} +1 -1
  55. package/dist/cdn/{WBQNIKK7.js → N72JHWOW.js} +1 -1
  56. package/dist/cdn/{FQWSL4WE.js → NJOCWENE.js} +1 -1
  57. package/dist/cdn/{U2ZQR6TN.js → NLPIWZ6O.js} +1 -1
  58. package/dist/cdn/{Q4FWAO2U.js → NTMKUPVQ.js} +36 -36
  59. package/dist/cdn/{FOBAMFDQ.js → OG6XNLNH.js} +1 -1
  60. package/dist/cdn/{LDRGQ4QJ.js → OGYHFMDK.js} +1 -1
  61. package/dist/cdn/{6T5JVUTW.js → OM2N4R7B.js} +1 -1
  62. package/dist/cdn/{ZRLN2MXQ.js → OXOPYUOS.js} +1 -1
  63. package/dist/cdn/{LRI7NSY6.js → PE5WVBYF.js} +1 -1
  64. package/dist/cdn/{P2FI3ZHN.js → PECU6KQ5.js} +1 -1
  65. package/dist/cdn/{U72HCS3R.js → PSDHB4WG.js} +1 -1
  66. package/dist/cdn/{HIHW6ORI.js → QCLX4TIM.js} +1 -1
  67. package/dist/cdn/{KNWOWXLU.js → QCNYOXG2.js} +1 -1
  68. package/dist/cdn/{DHCP4FMK.js → QNEGICXV.js} +1 -1
  69. package/dist/cdn/{PV7KP6OZ.js → QQNMK2QL.js} +1 -1
  70. package/dist/cdn/R2R6BF6O.js +2 -0
  71. package/dist/cdn/{DKPZTFA5.js → SCVQSDX5.js} +1 -1
  72. package/dist/cdn/{QE2DFL3U.js → SN4BIMRO.js} +1 -1
  73. package/dist/cdn/SXLPETPI.js +2 -0
  74. package/dist/cdn/{WQDJ5V5V.js → TNXVGUYE.js} +1 -1
  75. package/dist/cdn/{LFY34FCB.js → TQG6RDX5.js} +1 -1
  76. package/dist/cdn/UOUARC5O.js +2 -0
  77. package/dist/cdn/{54D7BEVF.js → V3TCGIPS.js} +1 -1
  78. package/dist/cdn/{4D2OWE4B.js → VFNQXIXU.js} +1 -1
  79. package/dist/cdn/VOTMKVNY.js +2 -0
  80. package/dist/cdn/W553UCBH.js +4 -0
  81. package/dist/cdn/{GGUZK63V.js → WMLNHOVN.js} +1 -1
  82. package/dist/cdn/{X4ZH6AQA.js → WTPRSRPB.js} +1 -1
  83. package/dist/cdn/{YQJFV4BR.js → XEDWXXF3.js} +1 -1
  84. package/dist/cdn/{424JJGJE.js → XOY4K5NH.js} +1 -1
  85. package/dist/cdn/{VMCT7EK7.js → Y4DORYPQ.js} +1 -1
  86. package/dist/cdn/{2GOV45XT.js → YEOSKZ4Q.js} +1 -1
  87. package/dist/cdn/{QV3QDDVU.js → ZAKAJKUI.js} +1 -1
  88. package/dist/cdn/ZIAGMMWU.js +2 -0
  89. package/dist/cdn/{X2Y44TIN.js → ZNOJBKUZ.js} +1 -1
  90. package/dist/cdn/index.js +1 -1
  91. package/dist/chart-rendering/common/interfaces.d.ts +5 -0
  92. package/dist/chunks/bar-chart-model.js +1 -1
  93. package/dist/chunks/combo-bar-line-chart-model.js +6 -6
  94. package/dist/chunks/heat-chart-model.js +8 -8
  95. package/dist/chunks/index.js +1112 -1080
  96. package/dist/chunks/line-chart-model.js +3 -3
  97. package/dist/chunks/radar-chart-model.js +3 -3
  98. package/dist/chunks/rotated-state.js +29 -16
  99. package/dist/chunks/time-zone.js +11 -11
  100. package/dist/chunks/type-guards2.js +9 -9
  101. package/dist/chunks/web-component-utils.js +405 -293
  102. package/dist/components/arcgis-chart/customElement.d.ts +35 -3
  103. package/dist/components/arcgis-chart/customElement.js +3857 -3807
  104. package/dist/components/arcgis-charts-action-bar/customElement.js +1 -1
  105. package/dist/components/arcgis-charts-config-create-flow/customElement.js +1 -1
  106. package/dist/docs/api.json +1 -1
  107. package/dist/docs/docs.json +1 -1
  108. package/dist/docs/vscode.html-custom-data.json +1 -1
  109. package/dist/docs/web-types.json +1 -1
  110. package/dist/interfaces.d.ts +5 -0
  111. package/dist/loader.js +1 -1
  112. package/dist/model/heat-chart-model/heat-chart-model.d.ts +2 -2
  113. package/dist/model/properties/rotated-state.d.ts +6 -0
  114. package/dist/model/properties/time-zone.d.ts +1 -11
  115. package/dist/types/lumina.d.ts +1 -1
  116. package/dist/types/preact.d.ts +1 -1
  117. package/dist/types/react.d.ts +1 -1
  118. package/dist/types/stencil.d.ts +1 -1
  119. package/dist/utils/chart-config/utils/index.d.ts +1 -1
  120. package/dist/utils/components/watch-handlers.d.ts +14 -0
  121. package/dist/utils/layer/query-features/index.d.ts +1 -0
  122. package/dist/utils/layer/query-parser/index.d.ts +2 -1
  123. package/package.json +3 -3
  124. package/dist/cdn/3LYLITEZ.js +0 -2
  125. package/dist/cdn/7MGBETN6.js +0 -2
  126. package/dist/cdn/A2SOHKNU.js +0 -2
  127. package/dist/cdn/DUPIQDJR.js +0 -2
  128. package/dist/cdn/DY3IXHQM.js +0 -2
  129. package/dist/cdn/FIT55NW2.js +0 -4
  130. package/dist/cdn/GPK2DP6R.js +0 -2
  131. package/dist/cdn/OD77ESN2.js +0 -2
  132. package/dist/cdn/OXA5TGBO.js +0 -2
@@ -1,6 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as fa,d as ji,g as Wr,k as Dn,l as tr,n as Lo,r as Nn,t as ue,u as yr,v as Gt,w as Qt,x as Xe,y as Se}from"./URX6VCYJ.js";import{c as Eo,d as Ln,f as $t,g as mt}from"./6ES4YKXX.js";import{a as g,b as W,c as Oe,e as Vi,f as yt,h as Ne,i as ha,j as Do,k as Q,l as gt,n as st,o as $e,p as No,q as mr,s as Bo,t as $o,v as ot,y as K}from"./ETLJKITO.js";import{H as Bt}from"./GDFOZNYR.js";import{b as Y,d as Pf}from"./QPIMTXPL.js";export default $arcgis.t(([Gg,ao,Li,no,Qg,Zg,Kg,ap,Jg,fn,np,Mu,Yg,qu,Xg,{substitute:qe},{sqlLiteral:eb},tb,rb,ib,ab,so,{computeStatisticsHistograms:nb,computeRasterAttributeTable:sb,fetchPixelFeatureSet:ob},lb,db,cb,op,lp])=>{var Md=Y((ja,$d)=>{(function(t,e){typeof ja=="object"&&typeof $d<"u"?e(ja):typeof define=="function"&&define.amd?define(["exports"],e):e(t.URI=t.URI||{})})(ja,(function(t){"use strict";function e(){for(var T=arguments.length,w=Array(T),O=0;O<T;O++)w[O]=arguments[O];if(w.length>1){w[0]=w[0].slice(0,-1);for(var D=w.length-1,M=1;M<D;++M)w[M]=w[M].slice(1,-1);return w[D]=w[D].slice(1),w.join("")}else return w[0]}function r(T){return"(?:"+T+")"}function a(T){return T===void 0?"undefined":T===null?"null":Object.prototype.toString.call(T).split(" ").pop().split("]").shift().toLowerCase()}function i(T){return T.toUpperCase()}function n(T){return T!=null?T instanceof Array?T:typeof T.length!="number"||T.split||T.setInterval||T.call?[T]:Array.prototype.slice.call(T):[]}function s(T,w){var O=T;if(w)for(var D in w)O[D]=w[D];return O}function o(T){var w="[A-Za-z]",O="[\\x0D]",D="[0-9]",M="[\\x22]",z=e(D,"[A-Fa-f]"),ee="[\\x0A]",ce="[\\x20]",ye=r(r("%[EFef]"+z+"%"+z+z+"%"+z+z)+"|"+r("%[89A-Fa-f]"+z+"%"+z+z)+"|"+r("%"+z+z)),We="[\\:\\/\\?\\#\\[\\]\\@]",le="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Le=e(We,le),je=T?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Pe=T?"[\\uE000-\\uF8FF]":"[]",fe=e(w,D,"[\\-\\.\\_\\~]",je),De=r(w+e(w,D,"[\\+\\-\\.]")+"*"),ve=r(r(ye+"|"+e(fe,le,"[\\:]"))+"*"),qr=r(r("25[0-5]")+"|"+r("2[0-4]"+D)+"|"+r("1"+D+D)+"|"+r("[1-9]"+D)+"|"+D),ft=r(r("25[0-5]")+"|"+r("2[0-4]"+D)+"|"+r("1"+D+D)+"|"+r("0?[1-9]"+D)+"|0?0?"+D),Ft=r(ft+"\\."+ft+"\\."+ft+"\\."+ft),xe=r(z+"{1,4}"),ht=r(r(xe+"\\:"+xe)+"|"+Ft),It=r(r(xe+"\\:")+"{6}"+ht),Ht=r("\\:\\:"+r(xe+"\\:")+"{5}"+ht),Rr=r(r(xe)+"?\\:\\:"+r(xe+"\\:")+"{4}"+ht),Yt=r(r(r(xe+"\\:")+"{0,1}"+xe)+"?\\:\\:"+r(xe+"\\:")+"{3}"+ht),Mi=r(r(r(xe+"\\:")+"{0,2}"+xe)+"?\\:\\:"+r(xe+"\\:")+"{2}"+ht),ca=r(r(r(xe+"\\:")+"{0,3}"+xe)+"?\\:\\:"+xe+"\\:"+ht),ua=r(r(r(xe+"\\:")+"{0,4}"+xe)+"?\\:\\:"+ht),ii=r(r(r(xe+"\\:")+"{0,5}"+xe)+"?\\:\\:"+xe),ai=r(r(r(xe+"\\:")+"{0,6}"+xe)+"?\\:\\:"),Xt=r([It,Ht,Rr,Yt,Mi,ca,ua,ii,ai].join("|")),ni=r(r(fe+"|"+ye)+"+"),Pn=r(Xt+"\\%25"+ni),kr=r(Xt+r("\\%25|\\%(?!"+z+"{2})")+ni),xf=r("[vV]"+z+"+\\."+e(fe,le,"[\\:]")+"+"),Cf=r("\\["+r(kr+"|"+Xt+"|"+xf)+"\\]"),Io=r(r(ye+"|"+e(fe,le))+"*"),qi=r(Cf+"|"+Ft+"(?!"+Io+")|"+Io),Ri=r(D+"*"),Oo=r(r(ve+"@")+"?"+qi+r("\\:"+Ri)+"?"),ki=r(ye+"|"+e(fe,le,"[\\:\\@]")),Tf=r(ki+"*"),Ao=r(ki+"+"),Ff=r(r(ye+"|"+e(fe,le,"[\\@]"))+"+"),er=r(r("\\/"+Tf)+"*"),si=r("\\/"+r(Ao+er)+"?"),En=r(Ff+er),pa=r(Ao+er),oi="(?!"+ki+")",Hx=r(er+"|"+si+"|"+En+"|"+pa+"|"+oi),li=r(r(ki+"|"+e("[\\/\\?]",Pe))+"*"),Wi=r(r(ki+"|[\\/\\?]")+"*"),Po=r(r("\\/\\/"+Oo+er)+"|"+si+"|"+pa+"|"+oi),If=r(De+"\\:"+Po+r("\\?"+li)+"?"+r("\\#"+Wi)+"?"),Of=r(r("\\/\\/"+Oo+er)+"|"+si+"|"+En+"|"+oi),Af=r(Of+r("\\?"+li)+"?"+r("\\#"+Wi)+"?"),Gx=r(If+"|"+Af),Qx=r(De+"\\:"+Po+r("\\?"+li)+"?"),Zx="^("+De+")\\:"+r(r("\\/\\/("+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?)")+"?("+er+"|"+si+"|"+pa+"|"+oi+")")+r("\\?("+li+")")+"?"+r("\\#("+Wi+")")+"?$",Kx="^(){0}"+r(r("\\/\\/("+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?)")+"?("+er+"|"+si+"|"+En+"|"+oi+")")+r("\\?("+li+")")+"?"+r("\\#("+Wi+")")+"?$",Jx="^("+De+")\\:"+r(r("\\/\\/("+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?)")+"?("+er+"|"+si+"|"+pa+"|"+oi+")")+r("\\?("+li+")")+"?$",Yx="^"+r("\\#("+Wi+")")+"?$",Xx="^"+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",w,D,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",fe,le),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",fe,le),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",fe,le),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",fe,le),"g"),NOT_QUERY:new RegExp(e("[^\\%]",fe,le,"[\\:\\@\\/\\?]",Pe),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",fe,le,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",fe,le),"g"),UNRESERVED:new RegExp(fe,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",fe,Le),"g"),PCT_ENCODED:new RegExp(ye,"g"),IPV4ADDRESS:new RegExp("^("+Ft+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Xt+")"+r(r("\\%25|\\%(?!"+z+"{2})")+"("+ni+")")+"?\\]?$")}}var l=o(!1),d=o(!0),c=(function(){function T(w,O){var D=[],M=!0,z=!1,ee=void 0;try{for(var ce=w[Symbol.iterator](),ye;!(M=(ye=ce.next()).done)&&(D.push(ye.value),!(O&&D.length===O));M=!0);}catch(We){z=!0,ee=We}finally{try{!M&&ce.return&&ce.return()}finally{if(z)throw ee}}return D}return function(w,O){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return T(w,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=function(T){if(Array.isArray(T)){for(var w=0,O=Array(T.length);w<T.length;w++)O[w]=T[w];return O}else return Array.from(T)},f=2147483647,p=36,h=1,m=26,y=38,b=700,v=72,S=128,C="-",F=/^xn--/,I=/[^\0-\x7E]/,N=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=p-h,B=Math.floor,R=String.fromCharCode;function q(T){throw new RangeError(P[T])}function L(T,w){for(var O=[],D=T.length;D--;)O[D]=w(T[D]);return O}function k(T,w){var O=T.split("@"),D="";O.length>1&&(D=O[0]+"@",T=O[1]),T=T.replace(N,".");var M=T.split("."),z=L(M,w).join(".");return D+z}function $(T){for(var w=[],O=0,D=T.length;O<D;){var M=T.charCodeAt(O++);if(M>=55296&&M<=56319&&O<D){var z=T.charCodeAt(O++);(z&64512)==56320?w.push(((M&1023)<<10)+(z&1023)+65536):(w.push(M),O--)}else w.push(M)}return w}var _=function(w){return String.fromCodePoint.apply(String,u(w))},G=function(w){return w-48<10?w-22:w-65<26?w-65:w-97<26?w-97:p},V=function(w,O){return w+22+75*(w<26)-((O!=0)<<5)},Z=function(w,O,D){var M=0;for(w=D?B(w/b):w>>1,w+=B(w/O);w>E*m>>1;M+=p)w=B(w/E);return B(M+(E+1)*w/(w+y))},U=function(w){var O=[],D=w.length,M=0,z=S,ee=v,ce=w.lastIndexOf(C);ce<0&&(ce=0);for(var ye=0;ye<ce;++ye)w.charCodeAt(ye)>=128&&q("not-basic"),O.push(w.charCodeAt(ye));for(var We=ce>0?ce+1:0;We<D;){for(var le=M,Le=1,je=p;;je+=p){We>=D&&q("invalid-input");var Pe=G(w.charCodeAt(We++));(Pe>=p||Pe>B((f-M)/Le))&&q("overflow"),M+=Pe*Le;var fe=je<=ee?h:je>=ee+m?m:je-ee;if(Pe<fe)break;var De=p-fe;Le>B(f/De)&&q("overflow"),Le*=De}var ve=O.length+1;ee=Z(M-le,ve,le==0),B(M/ve)>f-z&&q("overflow"),z+=B(M/ve),M%=ve,O.splice(M++,0,z)}return String.fromCodePoint.apply(String,O)},oe=function(w){var O=[];w=$(w);var D=w.length,M=S,z=0,ee=v,ce=!0,ye=!1,We=void 0;try{for(var le=w[Symbol.iterator](),Le;!(ce=(Le=le.next()).done);ce=!0){var je=Le.value;je<128&&O.push(R(je))}}catch(kr){ye=!0,We=kr}finally{try{!ce&&le.return&&le.return()}finally{if(ye)throw We}}var Pe=O.length,fe=Pe;for(Pe&&O.push(C);fe<D;){var De=f,ve=!0,qr=!1,ft=void 0;try{for(var Ft=w[Symbol.iterator](),xe;!(ve=(xe=Ft.next()).done);ve=!0){var ht=xe.value;ht>=M&&ht<De&&(De=ht)}}catch(kr){qr=!0,ft=kr}finally{try{!ve&&Ft.return&&Ft.return()}finally{if(qr)throw ft}}var It=fe+1;De-M>B((f-z)/It)&&q("overflow"),z+=(De-M)*It,M=De;var Ht=!0,Rr=!1,Yt=void 0;try{for(var Mi=w[Symbol.iterator](),ca;!(Ht=(ca=Mi.next()).done);Ht=!0){var ua=ca.value;if(ua<M&&++z>f&&q("overflow"),ua==M){for(var ii=z,ai=p;;ai+=p){var Xt=ai<=ee?h:ai>=ee+m?m:ai-ee;if(ii<Xt)break;var ni=ii-Xt,Pn=p-Xt;O.push(R(V(Xt+ni%Pn,0))),ii=B(ni/Pn)}O.push(R(V(ii,0))),ee=Z(z,It,fe==Pe),z=0,++fe}}}catch(kr){Rr=!0,Yt=kr}finally{try{!Ht&&Mi.return&&Mi.return()}finally{if(Rr)throw Yt}}++z,++M}return O.join("")},Te=function(w){return k(w,function(O){return F.test(O)?U(O.slice(4).toLowerCase()):O})},Re=function(w){return k(w,function(O){return I.test(O)?"xn--"+oe(O):O})},re={version:"2.1.0",ucs2:{decode:$,encode:_},decode:U,encode:oe,toASCII:Re,toUnicode:Te},be={};function Fe(T){var w=T.charCodeAt(0),O=void 0;return w<16?O="%0"+w.toString(16).toUpperCase():w<128?O="%"+w.toString(16).toUpperCase():w<2048?O="%"+(w>>6|192).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase():O="%"+(w>>12|224).toString(16).toUpperCase()+"%"+(w>>6&63|128).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase(),O}function ke(T){for(var w="",O=0,D=T.length;O<D;){var M=parseInt(T.substr(O+1,2),16);if(M<128)w+=String.fromCharCode(M),O+=3;else if(M>=194&&M<224){if(D-O>=6){var z=parseInt(T.substr(O+4,2),16);w+=String.fromCharCode((M&31)<<6|z&63)}else w+=T.substr(O,6);O+=6}else if(M>=224){if(D-O>=9){var ee=parseInt(T.substr(O+4,2),16),ce=parseInt(T.substr(O+7,2),16);w+=String.fromCharCode((M&15)<<12|(ee&63)<<6|ce&63)}else w+=T.substr(O,9);O+=9}else w+=T.substr(O,3),O+=3}return w}function xt(T,w){function O(D){var M=ke(D);return M.match(w.UNRESERVED)?M:D}return T.scheme&&(T.scheme=String(T.scheme).replace(w.PCT_ENCODED,O).toLowerCase().replace(w.NOT_SCHEME,"")),T.userinfo!==void 0&&(T.userinfo=String(T.userinfo).replace(w.PCT_ENCODED,O).replace(w.NOT_USERINFO,Fe).replace(w.PCT_ENCODED,i)),T.host!==void 0&&(T.host=String(T.host).replace(w.PCT_ENCODED,O).toLowerCase().replace(w.NOT_HOST,Fe).replace(w.PCT_ENCODED,i)),T.path!==void 0&&(T.path=String(T.path).replace(w.PCT_ENCODED,O).replace(T.scheme?w.NOT_PATH:w.NOT_PATH_NOSCHEME,Fe).replace(w.PCT_ENCODED,i)),T.query!==void 0&&(T.query=String(T.query).replace(w.PCT_ENCODED,O).replace(w.NOT_QUERY,Fe).replace(w.PCT_ENCODED,i)),T.fragment!==void 0&&(T.fragment=String(T.fragment).replace(w.PCT_ENCODED,O).replace(w.NOT_FRAGMENT,Fe).replace(w.PCT_ENCODED,i)),T}function at(T){return T.replace(/^0*(.*)/,"$1")||"0"}function Ie(T,w){var O=T.match(w.IPV4ADDRESS)||[],D=c(O,2),M=D[1];return M?M.split(".").map(at).join("."):T}function we(T,w){var O=T.match(w.IPV6ADDRESS)||[],D=c(O,3),M=D[1],z=D[2];if(M){for(var ee=M.toLowerCase().split("::").reverse(),ce=c(ee,2),ye=ce[0],We=ce[1],le=We?We.split(":").map(at):[],Le=ye.split(":").map(at),je=w.IPV4ADDRESS.test(Le[Le.length-1]),Pe=je?7:8,fe=Le.length-Pe,De=Array(Pe),ve=0;ve<Pe;++ve)De[ve]=le[ve]||Le[fe+ve]||"";je&&(De[Pe-1]=Ie(De[Pe-1],w));var qr=De.reduce(function(It,Ht,Rr){if(!Ht||Ht==="0"){var Yt=It[It.length-1];Yt&&Yt.index+Yt.length===Rr?Yt.length++:It.push({index:Rr,length:1})}return It},[]),ft=qr.sort(function(It,Ht){return Ht.length-It.length})[0],Ft=void 0;if(ft&&ft.length>1){var xe=De.slice(0,ft.index),ht=De.slice(ft.index+ft.length);Ft=xe.join(":")+"::"+ht.join(":")}else Ft=De.join(":");return z&&(Ft+="%"+z),Ft}else return T}var Ct=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Ue="".match(/(){0}/)[1]===void 0;function he(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O={},D=w.iri!==!1?d:l;w.reference==="suffix"&&(T=(w.scheme?w.scheme+":":"")+"//"+T);var M=T.match(Ct);if(M){Ue?(O.scheme=M[1],O.userinfo=M[3],O.host=M[4],O.port=parseInt(M[5],10),O.path=M[6]||"",O.query=M[7],O.fragment=M[8],isNaN(O.port)&&(O.port=M[5])):(O.scheme=M[1]||void 0,O.userinfo=T.indexOf("@")!==-1?M[3]:void 0,O.host=T.indexOf("//")!==-1?M[4]:void 0,O.port=parseInt(M[5],10),O.path=M[6]||"",O.query=T.indexOf("?")!==-1?M[7]:void 0,O.fragment=T.indexOf("#")!==-1?M[8]:void 0,isNaN(O.port)&&(O.port=T.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?M[4]:void 0)),O.host&&(O.host=we(Ie(O.host,D),D)),O.scheme===void 0&&O.userinfo===void 0&&O.host===void 0&&O.port===void 0&&!O.path&&O.query===void 0?O.reference="same-document":O.scheme===void 0?O.reference="relative":O.fragment===void 0?O.reference="absolute":O.reference="uri",w.reference&&w.reference!=="suffix"&&w.reference!==O.reference&&(O.error=O.error||"URI is not a "+w.reference+" reference.");var z=be[(w.scheme||O.scheme||"").toLowerCase()];if(!w.unicodeSupport&&(!z||!z.unicodeSupport)){if(O.host&&(w.domainHost||z&&z.domainHost))try{O.host=re.toASCII(O.host.replace(D.PCT_ENCODED,ke).toLowerCase())}catch(ee){O.error=O.error||"Host's domain name can not be converted to ASCII via punycode: "+ee}xt(O,l)}else xt(O,D);z&&z.parse&&z.parse(O,w)}else O.error=O.error||"URI can not be parsed.";return O}function hr(T,w){var O=w.iri!==!1?d:l,D=[];return T.userinfo!==void 0&&(D.push(T.userinfo),D.push("@")),T.host!==void 0&&D.push(we(Ie(String(T.host),O),O).replace(O.IPV6ADDRESS,function(M,z,ee){return"["+z+(ee?"%25"+ee:"")+"]"})),(typeof T.port=="number"||typeof T.port=="string")&&(D.push(":"),D.push(String(T.port))),D.length?D.join(""):void 0}var Jt=/^\.\.?\//,$r=/^\/\.(\/|$)/,Mr=/^\/\.\.(\/|$)/,Je=/^\/?(?:.|\n)*?(?=\/|$)/;function Tt(T){for(var w=[];T.length;)if(T.match(Jt))T=T.replace(Jt,"");else if(T.match($r))T=T.replace($r,"/");else if(T.match(Mr))T=T.replace(Mr,"/"),w.pop();else if(T==="."||T==="..")T="";else{var O=T.match(Je);if(O){var D=O[0];T=T.slice(D.length),w.push(D)}else throw new Error("Unexpected dot segment condition")}return w.join("")}function nt(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=w.iri?d:l,D=[],M=be[(w.scheme||T.scheme||"").toLowerCase()];if(M&&M.serialize&&M.serialize(T,w),T.host&&!O.IPV6ADDRESS.test(T.host)){if(w.domainHost||M&&M.domainHost)try{T.host=w.iri?re.toUnicode(T.host):re.toASCII(T.host.replace(O.PCT_ENCODED,ke).toLowerCase())}catch(ce){T.error=T.error||"Host's domain name can not be converted to "+(w.iri?"Unicode":"ASCII")+" via punycode: "+ce}}xt(T,O),w.reference!=="suffix"&&T.scheme&&(D.push(T.scheme),D.push(":"));var z=hr(T,w);if(z!==void 0&&(w.reference!=="suffix"&&D.push("//"),D.push(z),T.path&&T.path.charAt(0)!=="/"&&D.push("/")),T.path!==void 0){var ee=T.path;!w.absolutePath&&(!M||!M.absolutePath)&&(ee=Tt(ee)),z===void 0&&(ee=ee.replace(/^\/\//,"/%2F")),D.push(ee)}return T.query!==void 0&&(D.push("?"),D.push(T.query)),T.fragment!==void 0&&(D.push("#"),D.push(T.fragment)),D.join("")}function tt(T,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=arguments[3],M={};return D||(T=he(nt(T,O),O),w=he(nt(w,O),O)),O=O||{},!O.tolerant&&w.scheme?(M.scheme=w.scheme,M.userinfo=w.userinfo,M.host=w.host,M.port=w.port,M.path=Tt(w.path||""),M.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?(M.userinfo=w.userinfo,M.host=w.host,M.port=w.port,M.path=Tt(w.path||""),M.query=w.query):(w.path?(w.path.charAt(0)==="/"?M.path=Tt(w.path):((T.userinfo!==void 0||T.host!==void 0||T.port!==void 0)&&!T.path?M.path="/"+w.path:T.path?M.path=T.path.slice(0,T.path.lastIndexOf("/")+1)+w.path:M.path=w.path,M.path=Tt(M.path)),M.query=w.query):(M.path=T.path,w.query!==void 0?M.query=w.query:M.query=T.query),M.userinfo=T.userinfo,M.host=T.host,M.port=T.port),M.scheme=T.scheme),M.fragment=w.fragment,M}function zt(T,w,O){var D=s({scheme:"null"},O);return nt(tt(he(T,D),he(w,D),D,!0),D)}function pt(T,w){return typeof T=="string"?T=nt(he(T,w),w):a(T)==="object"&&(T=he(nt(T,w),w)),T}function da(T,w,O){return typeof T=="string"?T=nt(he(T,O),O):a(T)==="object"&&(T=nt(T,O)),typeof w=="string"?w=nt(he(w,O),O):a(w)==="object"&&(w=nt(w,O)),T===w}function On(T,w){return T&&T.toString().replace(!w||!w.iri?l.ESCAPE:d.ESCAPE,Fe)}function Nt(T,w){return T&&T.toString().replace(!w||!w.iri?l.PCT_ENCODED:d.PCT_ENCODED,ke)}var Bi={scheme:"http",domainHost:!0,parse:function(w,O){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w},serialize:function(w,O){var D=String(w.scheme).toLowerCase()==="https";return(w.port===(D?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w}},bo={scheme:"https",domainHost:Bi.domainHost,parse:Bi.parse,serialize:Bi.serialize};function vo(T){return typeof T.secure=="boolean"?T.secure:String(T.scheme).toLowerCase()==="wss"}var $i={scheme:"ws",domainHost:!0,parse:function(w,O){var D=w;return D.secure=vo(D),D.resourceName=(D.path||"/")+(D.query?"?"+D.query:""),D.path=void 0,D.query=void 0,D},serialize:function(w,O){if((w.port===(vo(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){var D=w.resourceName.split("?"),M=c(D,2),z=M[0],ee=M[1];w.path=z&&z!=="/"?z:void 0,w.query=ee,w.resourceName=void 0}return w.fragment=void 0,w}},So={scheme:"wss",domainHost:$i.domainHost,parse:$i.parse,serialize:$i.serialize},cf={},uf=!0,wo="[A-Za-z0-9\\-\\.\\_\\~"+(uf?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Ut="[0-9A-Fa-f]",pf=r(r("%[EFef]"+Ut+"%"+Ut+Ut+"%"+Ut+Ut)+"|"+r("%[89A-Fa-f]"+Ut+"%"+Ut+Ut)+"|"+r("%"+Ut+Ut)),ff="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",hf="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",mf=e(hf,'[\\"\\\\]'),yf="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",gf=new RegExp(wo,"g"),ri=new RegExp(pf,"g"),bf=new RegExp(e("[^]",ff,"[\\.]",'[\\"]',mf),"g"),xo=new RegExp(e("[^]",wo,yf),"g"),vf=xo;function An(T){var w=ke(T);return w.match(gf)?w:T}var Co={scheme:"mailto",parse:function(w,O){var D=w,M=D.to=D.path?D.path.split(","):[];if(D.path=void 0,D.query){for(var z=!1,ee={},ce=D.query.split("&"),ye=0,We=ce.length;ye<We;++ye){var le=ce[ye].split("=");switch(le[0]){case"to":for(var Le=le[1].split(","),je=0,Pe=Le.length;je<Pe;++je)M.push(Le[je]);break;case"subject":D.subject=Nt(le[1],O);break;case"body":D.body=Nt(le[1],O);break;default:z=!0,ee[Nt(le[0],O)]=Nt(le[1],O);break}}z&&(D.headers=ee)}D.query=void 0;for(var fe=0,De=M.length;fe<De;++fe){var ve=M[fe].split("@");if(ve[0]=Nt(ve[0]),O.unicodeSupport)ve[1]=Nt(ve[1],O).toLowerCase();else try{ve[1]=re.toASCII(Nt(ve[1],O).toLowerCase())}catch(qr){D.error=D.error||"Email address's domain name can not be converted to ASCII via punycode: "+qr}M[fe]=ve.join("@")}return D},serialize:function(w,O){var D=w,M=n(w.to);if(M){for(var z=0,ee=M.length;z<ee;++z){var ce=String(M[z]),ye=ce.lastIndexOf("@"),We=ce.slice(0,ye).replace(ri,An).replace(ri,i).replace(bf,Fe),le=ce.slice(ye+1);try{le=O.iri?re.toUnicode(le):re.toASCII(Nt(le,O).toLowerCase())}catch(fe){D.error=D.error||"Email address's domain name can not be converted to "+(O.iri?"Unicode":"ASCII")+" via punycode: "+fe}M[z]=We+"@"+le}D.path=M.join(",")}var Le=w.headers=w.headers||{};w.subject&&(Le.subject=w.subject),w.body&&(Le.body=w.body);var je=[];for(var Pe in Le)Le[Pe]!==cf[Pe]&&je.push(Pe.replace(ri,An).replace(ri,i).replace(xo,Fe)+"="+Le[Pe].replace(ri,An).replace(ri,i).replace(vf,Fe));return je.length&&(D.query=je.join("&")),D}},Sf=/^([^\:]+)\:(.*)/,To={scheme:"urn",parse:function(w,O){var D=w.path&&w.path.match(Sf),M=w;if(D){var z=O.scheme||M.scheme||"urn",ee=D[1].toLowerCase(),ce=D[2],ye=z+":"+(O.nid||ee),We=be[ye];M.nid=ee,M.nss=ce,M.path=void 0,We&&(M=We.parse(M,O))}else M.error=M.error||"URN can not be parsed.";return M},serialize:function(w,O){var D=O.scheme||w.scheme||"urn",M=w.nid,z=D+":"+(O.nid||M),ee=be[z];ee&&(w=ee.serialize(w,O));var ce=w,ye=w.nss;return ce.path=(M||O.nid)+":"+ye,ce}},wf=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Fo={scheme:"urn:uuid",parse:function(w,O){var D=w;return D.uuid=D.nss,D.nss=void 0,!O.tolerant&&(!D.uuid||!D.uuid.match(wf))&&(D.error=D.error||"UUID is not valid."),D},serialize:function(w,O){var D=w;return D.nss=(w.uuid||"").toLowerCase(),D}};be[Bi.scheme]=Bi,be[bo.scheme]=bo,be[$i.scheme]=$i,be[So.scheme]=So,be[Co.scheme]=Co,be[To.scheme]=To,be[Fo.scheme]=Fo,t.SCHEMES=be,t.pctEncChar=Fe,t.pctDecChars=ke,t.parse=he,t.removeDotSegments=Tt,t.serialize=nt,t.resolveComponents=tt,t.resolve=zt,t.normalize=pt,t.equal=da,t.escapeComponent=On,t.unescapeComponent=Nt,Object.defineProperty(t,"__esModule",{value:!0})}))});var Va=Y((sC,qd)=>{"use strict";qd.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var a,i,n;if(Array.isArray(e)){if(a=e.length,a!=r.length)return!1;for(i=a;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(n=Object.keys(e),a=n.length,a!==Object.keys(r).length)return!1;for(i=a;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,n[i]))return!1;for(i=a;i--!==0;){var s=n[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var kd=Y((oC,Rd)=>{"use strict";Rd.exports=function(e){for(var r=0,a=e.length,i=0,n;i<a;)r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<a&&(n=e.charCodeAt(i),(n&64512)==56320&&i++);return r}});var Hr=Y((lC,Vd)=>{"use strict";Vd.exports={copy:my,checkDataType:vs,checkDataTypes:yy,coerceToTypes:gy,toHash:ws,getProperty:xs,escapeQuotes:Cs,equal:Va(),ucs2length:kd(),varOccurences:Sy,varReplace:wy,schemaHasRules:xy,schemaHasRulesExcept:Cy,schemaUnknownRules:Ty,toQuotedString:Ss,getPathExpr:Fy,getPath:Iy,getData:Py,unescapeFragment:Ey,unescapeJsonPointer:Fs,escapeFragment:Ly,escapeJsonPointer:Ts};function my(t,e){e=e||{};for(var r in t)e[r]=t[r];return e}function vs(t,e,r,a){var i=a?" !== ":" === ",n=a?" || ":" && ",s=a?"!":"",o=a?"":"!";switch(t){case"null":return e+i+"null";case"array":return s+"Array.isArray("+e+")";case"object":return"("+s+e+n+"typeof "+e+i+'"object"'+n+o+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+i+'"number"'+n+o+"("+e+" % 1)"+n+e+i+e+(r?n+s+"isFinite("+e+")":"")+")";case"number":return"(typeof "+e+i+'"'+t+'"'+(r?n+s+"isFinite("+e+")":"")+")";default:return"typeof "+e+i+'"'+t+'"'}}function yy(t,e,r){switch(t.length){case 1:return vs(t[0],e,r,!0);default:var a="",i=ws(t);i.array&&i.object&&(a=i.null?"(":"(!"+e+" || ",a+="typeof "+e+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer;for(var n in i)a+=(a?" && ":"")+vs(n,e,r,!0);return a}}var Wd=ws(["string","number","integer","boolean","null"]);function gy(t,e){if(Array.isArray(e)){for(var r=[],a=0;a<e.length;a++){var i=e[a];(Wd[i]||t==="array"&&i==="array")&&(r[r.length]=i)}if(r.length)return r}else{if(Wd[e])return[e];if(t==="array"&&e==="array")return["array"]}}function ws(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!0;return e}var by=/^[a-z$_][a-z$_0-9]*$/i,vy=/'|\\/g;function xs(t){return typeof t=="number"?"["+t+"]":by.test(t)?"."+t:"['"+Cs(t)+"']"}function Cs(t){return t.replace(vy,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function Sy(t,e){e+="[^0-9]";var r=t.match(new RegExp(e,"g"));return r?r.length:0}function wy(t,e,r){return e+="([^0-9])",r=r.replace(/\$/g,"$$$$"),t.replace(new RegExp(e,"g"),r+"$1")}function xy(t,e){if(typeof t=="boolean")return!t;for(var r in t)if(e[r])return!0}function Cy(t,e,r){if(typeof t=="boolean")return!t&&r!="not";for(var a in t)if(a!=r&&e[a])return!0}function Ty(t,e){if(typeof t!="boolean"){for(var r in t)if(!e[r])return r}}function Ss(t){return"'"+Cs(t)+"'"}function Fy(t,e,r,a){var i=r?"'/' + "+e+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+e+" + ']'":"'[\\'' + "+e+" + '\\']'";return jd(t,i)}function Iy(t,e,r){var a=Ss(r?"/"+Ts(e):xs(e));return jd(t,a)}var Oy=/^\/(?:[^~]|~0|~1)*$/,Ay=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Py(t,e,r){var a,i,n,s;if(t==="")return"rootData";if(t[0]=="/"){if(!Oy.test(t))throw new Error("Invalid JSON-pointer: "+t);i=t,n="rootData"}else{if(s=t.match(Ay),!s)throw new Error("Invalid JSON-pointer: "+t);if(a=+s[1],i=s[2],i=="#"){if(a>=e)throw new Error("Cannot access property/index "+a+" levels up, current level is "+e);return r[e-a]}if(a>e)throw new Error("Cannot access data "+a+" levels up, current level is "+e);if(n="data"+(e-a||""),!i)return n}for(var o=n,l=i.split("/"),d=0;d<l.length;d++){var c=l[d];c&&(n+=xs(Fs(c)),o+=" && "+n)}return o}function jd(t,e){return t=='""'?e:(t+" + "+e).replace(/([^\\])' \+ '/g,"$1")}function Ey(t){return Fs(decodeURIComponent(t))}function Ly(t){return encodeURIComponent(Ts(t))}function Ts(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Fs(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}});var Is=Y((dC,_d)=>{"use strict";var Dy=Hr();_d.exports=Ny;function Ny(t){Dy.copy(t,this)}});var Ud=Y((cC,zd)=>{"use strict";var Cr=zd.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var a=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};_a(e,a,i,t,"",t)};Cr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};Cr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Cr.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Cr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function _a(t,e,r,a,i,n,s,o,l,d){if(a&&typeof a=="object"&&!Array.isArray(a)){e(a,i,n,s,o,l,d);for(var c in a){var u=a[c];if(Array.isArray(u)){if(c in Cr.arrayKeywords)for(var f=0;f<u.length;f++)_a(t,e,r,u[f],i+"/"+c+"/"+f,n,i,c,a,f)}else if(c in Cr.propsKeywords){if(u&&typeof u=="object")for(var p in u)_a(t,e,r,u[p],i+"/"+c+"/"+By(p),n,i,c,a,p)}else(c in Cr.keywords||t.allKeys&&!(c in Cr.skipKeywords))&&_a(t,e,r,u,i+"/"+c,n,i,c,a)}r(a,i,n,s,o,l,d)}}function By(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Za=Y((uC,Zd)=>{"use strict";var Xi=Md(),Hd=Va(),Ga=Hr(),za=Is(),$y=Ud();Zd.exports=Fr;Fr.normalizeId=Tr;Fr.fullPath=Ua;Fr.url=Ha;Fr.ids=Wy;Fr.inlineRef=Os;Fr.schema=Qa;function Fr(t,e,r){var a=this._refs[r];if(typeof a=="string")if(this._refs[a])a=this._refs[a];else return Fr.call(this,t,e,a);if(a=a||this._schemas[r],a instanceof za)return Os(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var i=Qa.call(this,e,r),n,s,o;return i&&(n=i.schema,e=i.root,o=i.baseId),n instanceof za?s=n.validate||t.call(this,n.schema,e,void 0,o):n!==void 0&&(s=Os(n,this._opts.inlineRefs)?n:t.call(this,n,e,void 0,o)),s}function Qa(t,e){var r=Xi.parse(e),a=Qd(r),i=Ua(this._getId(t.schema));if(Object.keys(t.schema).length===0||a!==i){var n=Tr(a),s=this._refs[n];if(typeof s=="string")return My.call(this,t,s,r);if(s instanceof za)s.validate||this._compile(s),t=s;else if(s=this._schemas[n],s instanceof za){if(s.validate||this._compile(s),n==Tr(e))return{schema:s,root:t,baseId:i};t=s}else return;if(!t.schema)return;i=Ua(this._getId(t.schema))}return Gd.call(this,r,i,t.schema,t)}function My(t,e,r){var a=Qa.call(this,t,e);if(a){var i=a.schema,n=a.baseId;t=a.root;var s=this._getId(i);return s&&(n=Ha(n,s)),Gd.call(this,r,n,i,t)}}var qy=Ga.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Gd(t,e,r,a){if(t.fragment=t.fragment||"",t.fragment.slice(0,1)=="/"){for(var i=t.fragment.split("/"),n=1;n<i.length;n++){var s=i[n];if(s){if(s=Ga.unescapeFragment(s),r=r[s],r===void 0)break;var o;if(!qy[s]&&(o=this._getId(r),o&&(e=Ha(e,o)),r.$ref)){var l=Ha(e,r.$ref),d=Qa.call(this,a,l);d&&(r=d.schema,a=d.root,e=d.baseId)}}}if(r!==void 0&&r!==a.schema)return{schema:r,root:a,baseId:e}}}var Ry=Ga.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function Os(t,e){if(e===!1)return!1;if(e===void 0||e===!0)return As(t);if(e)return Ps(t)<=e}function As(t){var e;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(e=t[r],typeof e=="object"&&!As(e))return!1}else for(var a in t)if(a=="$ref"||(e=t[a],typeof e=="object"&&!As(e)))return!1;return!0}function Ps(t){var e=0,r;if(Array.isArray(t)){for(var a=0;a<t.length;a++)if(r=t[a],typeof r=="object"&&(e+=Ps(r)),e==1/0)return 1/0}else for(var i in t){if(i=="$ref")return 1/0;if(Ry[i])e++;else if(r=t[i],typeof r=="object"&&(e+=Ps(r)+1),e==1/0)return 1/0}return e}function Ua(t,e){e!==!1&&(t=Tr(t));var r=Xi.parse(t);return Qd(r)}function Qd(t){return Xi.serialize(t).split("#")[0]+"#"}var ky=/#\/?$/;function Tr(t){return t?t.replace(ky,""):""}function Ha(t,e){return e=Tr(e),Xi.resolve(t,e)}function Wy(t){var e=Tr(this._getId(t)),r={"":e},a={"":Ua(e,!1)},i={},n=this;return $y(t,{allKeys:!0},function(s,o,l,d,c,u,f){if(o!==""){var p=n._getId(s),h=r[d],m=a[d]+"/"+c;if(f!==void 0&&(m+="/"+(typeof f=="number"?f:Ga.escapeFragment(f))),typeof p=="string"){p=h=Tr(h?Xi.resolve(h,p):p);var y=n._refs[p];if(typeof y=="string"&&(y=n._refs[y]),y&&y.schema){if(!Hd(s,y.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=Tr(m))if(p[0]=="#"){if(i[p]&&!Hd(s,i[p]))throw new Error('id "'+p+'" resolves to more than one schema');i[p]=s}else n._refs[p]=m}r[o]=h,a[o]=m}}),i}});var Ka=Y((pC,Jd)=>{"use strict";var Es=Za();Jd.exports={Validation:Kd(jy),MissingRef:Kd(Ls)};function jy(t){this.message="validation failed",this.errors=t,this.ajv=this.validation=!0}Ls.message=function(t,e){return"can't resolve reference "+e+" from id "+t};function Ls(t,e,r){this.message=r||Ls.message(t,e),this.missingRef=Es.url(t,e),this.missingSchema=Es.normalizeId(Es.fullPath(this.missingRef))}function Kd(t){return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}});var Ds=Y((fC,Yd)=>{"use strict";Yd.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,a=e.cmp&&(function(n){return function(s){return function(o,l){var d={key:o,value:s[o]},c={key:l,value:s[l]};return n(d,c)}}})(e.cmp),i=[];return(function n(s){if(s&&s.toJSON&&typeof s.toJSON=="function"&&(s=s.toJSON()),s!==void 0){if(typeof s=="number")return isFinite(s)?""+s:"null";if(typeof s!="object")return JSON.stringify(s);var o,l;if(Array.isArray(s)){for(l="[",o=0;o<s.length;o++)o&&(l+=","),l+=n(s[o])||"null";return l+"]"}if(s===null)return"null";if(i.indexOf(s)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var d=i.push(s)-1,c=Object.keys(s).sort(a&&a(s));for(l="",o=0;o<c.length;o++){var u=c[o],f=n(s[u]);f&&(l&&(l+=","),l+=JSON.stringify(u)+":"+f)}return i.splice(d,1),"{"+l+"}"}})(t)}});var Ns=Y((hC,Xd)=>{"use strict";Xd.exports=function(e,r,a){var i="",n=e.schema.$async===!0,s=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var l=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(l){var d="unknown keyword: "+l;if(e.opts.strictKeywords==="log")e.logger.warn(d);else throw new Error(d)}}if(e.isTop&&(i+=" var validate = ",n&&(e.async=!0,i+="async "),i+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(e.opts.sourceCode||e.opts.processCode)&&(i+=" "+("/*# sourceURL="+o+" */")+" ")),typeof e.schema=="boolean"||!(s||e.schema.$ref)){var r="false schema",c=e.level,u=e.dataLevel,f=e.schema[r],p=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,F=!e.opts.allErrors,P,m="data"+(u||""),C="valid"+c;if(e.schema===!1){e.isTop?F=!0:i+=" var "+C+" = false; ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'boolean schema is false' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var b=i;i=y.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n?i+=" return data; ":i+=" validate.errors = null; return true; ":i+=" var "+C+" = true; ";return e.isTop&&(i+=" }; return validate; "),i}if(e.isTop){var v=e.isTop,c=e.level=0,u=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var S="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(S);else throw new Error(S)}i+=" var vErrors = null; ",i+=" var errors = 0; ",i+=" if (rootData === undefined) rootData = data; "}else{var c=e.level,u=e.dataLevel,m="data"+(u||"");if(o&&(e.baseId=e.resolve.url(e.baseId,o)),n&&!e.async)throw new Error("async schema in sync schema");i+=" var errs_"+c+" = errors;"}var C="valid"+c,F=!e.opts.allErrors,I="",N="",P,E=e.schema.type,B=Array.isArray(E);if(E&&e.opts.nullable&&e.schema.nullable===!0&&(B?E.indexOf("null")==-1&&(E=E.concat("null")):E!="null"&&(E=[E,"null"],B=!0)),B&&E.length==1&&(E=E[0],B=!1),e.schema.$ref&&s){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(s=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(i+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var R=e.util.coerceToTypes(e.opts.coerceTypes,E);var q=e.RULES.types[E];if(R||B||q===!0||q&&!Je(q)){var p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type",L=B?"checkDataTypes":"checkDataType";if(i+=" if ("+e.util[L](E,m,e.opts.strictNumbers,!0)+") { ",R){var k="dataType"+c,$="coerced"+c;i+=" var "+k+" = typeof "+m+"; var "+$+" = undefined; ",e.opts.coerceTypes=="array"&&(i+=" if ("+k+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+k+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+$+" = "+m+"; } "),i+=" if ("+$+" !== undefined) ; ";var _=R;if(_)for(var G,V=-1,Z=_.length-1;V<Z;)G=_[V+=1],G=="string"?i+=" else if ("+k+" == 'number' || "+k+" == 'boolean') "+$+" = '' + "+m+"; else if ("+m+" === null) "+$+" = ''; ":G=="number"||G=="integer"?(i+=" else if ("+k+" == 'boolean' || "+m+" === null || ("+k+" == 'string' && "+m+" && "+m+" == +"+m+" ",G=="integer"&&(i+=" && !("+m+" % 1)"),i+=")) "+$+" = +"+m+"; "):G=="boolean"?i+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+$+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+$+" = true; ":G=="null"?i+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+$+" = null; ":e.opts.coerceTypes=="array"&&G=="array"&&(i+=" else if ("+k+" == 'string' || "+k+" == 'number' || "+k+" == 'boolean' || "+m+" == null) "+$+" = ["+m+"]; ");i+=" else { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",B?i+=""+E.join(","):i+=""+E,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",B?i+=""+E.join(","):i+=""+E,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var b=i;i=y.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } if ("+$+" !== undefined) { ";var U=u?"data"+(u-1||""):"parentData",oe=u?e.dataPathArr[u]:"parentDataProperty";i+=" "+m+" = "+$+"; ",u||(i+="if ("+U+" !== undefined)"),i+=" "+U+"["+oe+"] = "+$+"; } "}else{var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",B?i+=""+E.join(","):i+=""+E,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",B?i+=""+E.join(","):i+=""+E,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var b=i;i=y.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" } "}}if(e.schema.$ref&&!s)i+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",F&&(i+=" } if (errors === ",v?i+="0":i+="errs_"+c,i+=") { ",N+="}");else{var Te=e.RULES;if(Te){for(var q,Re=-1,re=Te.length-1;Re<re;)if(q=Te[Re+=1],Je(q)){if(q.type&&(i+=" if ("+e.util.checkDataType(q.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(q.type=="object"&&e.schema.properties){var f=e.schema.properties,be=Object.keys(f),Fe=be;if(Fe)for(var ke,xt=-1,at=Fe.length-1;xt<at;){ke=Fe[xt+=1];var Ie=f[ke];if(Ie.default!==void 0){var we=m+e.util.getProperty(ke);if(e.compositeRule){if(e.opts.strictDefaults){var S="default is ignored for: "+we;if(e.opts.strictDefaults==="log")e.logger.warn(S);else throw new Error(S)}}else i+=" if ("+we+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+we+" === null || "+we+" === '' "),i+=" ) "+we+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(Ie.default)+" ":i+=" "+JSON.stringify(Ie.default)+" ",i+="; "}}}else if(q.type=="array"&&Array.isArray(e.schema.items)){var Ct=e.schema.items;if(Ct){for(var Ie,V=-1,Ue=Ct.length-1;V<Ue;)if(Ie=Ct[V+=1],Ie.default!==void 0){var we=m+"["+V+"]";if(e.compositeRule){if(e.opts.strictDefaults){var S="default is ignored for: "+we;if(e.opts.strictDefaults==="log")e.logger.warn(S);else throw new Error(S)}}else i+=" if ("+we+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+we+" === null || "+we+" === '' "),i+=" ) "+we+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(Ie.default)+" ":i+=" "+JSON.stringify(Ie.default)+" ",i+="; "}}}}var he=q.rules;if(he){for(var hr,Jt=-1,$r=he.length-1;Jt<$r;)if(hr=he[Jt+=1],Tt(hr)){var Mr=hr.code(e,hr.keyword,q.type);Mr&&(i+=" "+Mr+" ",F&&(I+="}"))}}if(F&&(i+=" "+I+" ",I=""),q.type&&(i+=" } ",E&&E===q.type&&!R)){i+=" else { ";var p=e.schemaPath+".type",h=e.errSchemaPath+"/type",y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",B?i+=""+E.join(","):i+=""+E,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",B?i+=""+E.join(","):i+=""+E,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var b=i;i=y.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}F&&(i+=" if (errors === ",v?i+="0":i+="errs_"+c,i+=") { ",N+="}")}}}F&&(i+=" "+N+" "),v?(n?(i+=" if (errors === 0) return data; ",i+=" else throw new ValidationError(vErrors); "):(i+=" validate.errors = vErrors; ",i+=" return errors === 0; "),i+=" }; return validate;"):i+=" var "+C+" = errors === errs_"+c+";";function Je(tt){for(var zt=tt.rules,pt=0;pt<zt.length;pt++)if(Tt(zt[pt]))return!0}function Tt(tt){return e.schema[tt.keyword]!==void 0||tt.implements&&nt(tt)}function nt(tt){for(var zt=tt.implements,pt=0;pt<zt.length;pt++)if(e.schema[zt[pt]]!==void 0)return!0}return i}});var ac=Y((mC,ic)=>{"use strict";var Ja=Za(),Xa=Hr(),tc=Ka(),Vy=Ds(),ec=Ns(),_y=Xa.ucs2length,zy=Va(),Uy=tc.Validation;ic.exports=Bs;function Bs(t,e,r,a){var i=this,n=this._opts,s=[void 0],o={},l=[],d={},c=[],u={},f=[];e=e||{schema:t,refVal:s,refs:o};var p=Hy.call(this,t,e,a),h=this._compilations[p.index];if(p.compiling)return h.callValidate=S;var m=this._formats,y=this.RULES;try{var b=C(t,e,r,a);h.validate=b;var v=h.callValidate;return v&&(v.schema=b.schema,v.errors=null,v.refs=b.refs,v.refVal=b.refVal,v.root=b.root,v.$async=b.$async,n.sourceCode&&(v.source=b.source)),b}finally{Gy.call(this,t,e,a)}function S(){var L=h.validate,k=L.apply(this,arguments);return S.errors=L.errors,k}function C(L,k,$,_){var G=!k||k&&k.schema==L;if(k.schema!=e.schema)return Bs.call(i,L,k,$,_);var V=L.$async===!0,Z=ec({isTop:!0,schema:L,isRoot:G,baseId:_,root:k,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:tc.MissingRef,RULES:y,validate:ec,util:Xa,resolve:Ja,resolveRef:F,usePattern:B,useDefault:R,useCustomRule:q,opts:n,formats:m,logger:i.logger,self:i});Z=Ya(s,Ky)+Ya(l,Qy)+Ya(c,Zy)+Ya(f,Jy)+Z,n.processCode&&(Z=n.processCode(Z,L));var U;try{var oe=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",Z);U=oe(i,y,m,e,s,c,f,zy,_y,Uy),s[0]=U}catch(Te){throw i.logger.error("Error compiling schema, function code:",Z),Te}return U.schema=L,U.errors=null,U.refs=o,U.refVal=s,U.root=G?U:k,V&&(U.$async=!0),n.sourceCode===!0&&(U.source={code:Z,patterns:l,defaults:c}),U}function F(L,k,$){k=Ja.url(L,k);var _=o[k],G,V;if(_!==void 0)return G=s[_],V="refVal["+_+"]",E(G,V);if(!$&&e.refs){var Z=e.refs[k];if(Z!==void 0)return G=e.refVal[Z],V=I(k,G),E(G,V)}V=I(k);var U=Ja.call(i,C,e,k);if(U===void 0){var oe=r&&r[k];oe&&(U=Ja.inlineRef(oe,n.inlineRefs)?oe:Bs.call(i,oe,e,r,L))}if(U===void 0)N(k);else return P(k,U),E(U,V)}function I(L,k){var $=s.length;return s[$]=k,o[L]=$,"refVal"+$}function N(L){delete o[L]}function P(L,k){var $=o[L];s[$]=k}function E(L,k){return typeof L=="object"||typeof L=="boolean"?{code:k,schema:L,inline:!0}:{code:k,$async:L&&!!L.$async}}function B(L){var k=d[L];return k===void 0&&(k=d[L]=l.length,l[k]=L),"pattern"+k}function R(L){switch(typeof L){case"boolean":case"number":return""+L;case"string":return Xa.toQuotedString(L);case"object":if(L===null)return"null";var k=Vy(L),$=u[k];return $===void 0&&($=u[k]=c.length,c[$]=L),"default"+$}}function q(L,k,$,_){if(i._opts.validateSchema!==!1){var G=L.definition.dependencies;if(G&&!G.every(function(Fe){return Object.prototype.hasOwnProperty.call($,Fe)}))throw new Error("parent schema must have all required keywords: "+G.join(","));var V=L.definition.validateSchema;if(V){var Z=V(k);if(!Z){var U="keyword schema is invalid: "+i.errorsText(V.errors);if(i._opts.validateSchema=="log")i.logger.error(U);else throw new Error(U)}}}var oe=L.definition.compile,Te=L.definition.inline,Re=L.definition.macro,re;if(oe)re=oe.call(i,k,$,_);else if(Re)re=Re.call(i,k,$,_),n.validateSchema!==!1&&i.validateSchema(re,!0);else if(Te)re=Te.call(i,_,L.keyword,k,$);else if(re=L.definition.validate,!re)return;if(re===void 0)throw new Error('custom keyword "'+L.keyword+'"failed to compile');var be=f.length;return f[be]=re,{code:"customRule"+be,validate:re}}}function Hy(t,e,r){var a=rc.call(this,t,e,r);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:t,root:e,baseId:r},{index:a,compiling:!1})}function Gy(t,e,r){var a=rc.call(this,t,e,r);a>=0&&this._compilations.splice(a,1)}function rc(t,e,r){for(var a=0;a<this._compilations.length;a++){var i=this._compilations[a];if(i.schema==t&&i.root==e&&i.baseId==r)return a}return-1}function Qy(t,e){return"var pattern"+t+" = new RegExp("+Xa.toQuotedString(e[t])+");"}function Zy(t){return"var default"+t+" = defaults["+t+"];"}function Ky(t,e){return e[t]===void 0?"":"var refVal"+t+" = refVal["+t+"];"}function Jy(t){return"var customRule"+t+" = customRules["+t+"];"}function Ya(t,e){if(!t.length)return"";for(var r="",a=0;a<t.length;a++)r+=e(a,t);return r}});var sc=Y((yC,nc)=>{"use strict";var en=nc.exports=function(){this._cache={}};en.prototype.put=function(e,r){this._cache[e]=r};en.prototype.get=function(e){return this._cache[e]};en.prototype.del=function(e){delete this._cache[e]};en.prototype.clear=function(){this._cache={}}});var bc=Y((gC,gc)=>{"use strict";var Yy=Hr(),Xy=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,eg=[0,31,28,31,30,31,30,31,31,30,31,30,31],tg=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,oc=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,rg=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,ig=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,lc=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,dc=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,cc=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,uc=/^(?:\/(?:[^~/]|~0|~1)*)*$/,pc=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,fc=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;gc.exports=tn;function tn(t){return t=t=="full"?"full":"fast",Yy.copy(tn[t])}tn.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":lc,url:dc,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:oc,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:yc,uuid:cc,"json-pointer":uc,"json-pointer-uri-fragment":pc,"relative-json-pointer":fc};tn.full={date:hc,time:mc,"date-time":sg,uri:lg,"uri-reference":ig,"uri-template":lc,url:dc,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:oc,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:yc,uuid:cc,"json-pointer":uc,"json-pointer-uri-fragment":pc,"relative-json-pointer":fc};function ag(t){return t%4===0&&(t%100!==0||t%400===0)}function hc(t){var e=t.match(Xy);if(!e)return!1;var r=+e[1],a=+e[2],i=+e[3];return a>=1&&a<=12&&i>=1&&i<=(a==2&&ag(r)?29:eg[a])}function mc(t,e){var r=t.match(tg);if(!r)return!1;var a=r[1],i=r[2],n=r[3],s=r[5];return(a<=23&&i<=59&&n<=59||a==23&&i==59&&n==60)&&(!e||s)}var ng=/t|\s/i;function sg(t){var e=t.split(ng);return e.length==2&&hc(e[0])&&mc(e[1],!0)}var og=/\/|:/;function lg(t){return og.test(t)&&rg.test(t)}var dg=/[^\\]\\Z/;function yc(t){if(dg.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Sc=Y((bC,vc)=>{"use strict";vc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,c="data"+(s||""),u="valid"+n,f,p;if(o=="#"||o=="#/")e.isRoot?(f=e.async,p="validate"):(f=e.root.schema.$async===!0,p="root.refVal[0]");else{var h=e.resolveRef(e.baseId,o,e.isRoot);if(h===void 0){var m=e.MissingRefError.message(e.baseId,o);if(e.opts.missingRefs=="fail"){e.logger.error(m);var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(o)+"' } ",e.opts.messages!==!1&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(o)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(o)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var b=i;i=y.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d&&(i+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(m),d&&(i+=" if (true) { ");else throw new e.MissingRefError(e.baseId,o,m)}else if(h.inline){var v=e.util.copy(e);v.level++;var S="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=o;var C=e.validate(v).replace(/validate\.schema/g,h.code);i+=" "+C+" ",d&&(i+=" if ("+S+") { ")}else f=h.$async===!0||e.async&&h.$async!==!1,p=h.code}if(p){var y=y||[];y.push(i),i="",e.opts.passContext?i+=" "+p+".call(this, ":i+=" "+p+"( ",i+=" "+c+", (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var F=s?"data"+(s-1||""):"parentData",I=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+F+" , "+I+", rootData) ";var N=i;if(i=y.pop(),f){if(!e.async)throw new Error("async schema referenced by sync schema");d&&(i+=" var "+u+"; "),i+=" try { await "+N+"; ",d&&(i+=" "+u+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",d&&(i+=" "+u+" = false; "),i+=" } ",d&&(i+=" if ("+u+") { ")}else i+=" if (!"+N+") { if (vErrors === null) vErrors = "+p+".errors; else vErrors = vErrors.concat("+p+".errors); errors = vErrors.length; } ",d&&(i+=" else { ")}return i}});var xc=Y((vC,wc)=>{"use strict";wc.exports=function(e,r,a){var i=" ",n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,d=e.util.copy(e),c="";d.level++;var u="valid"+d.level,f=d.baseId,p=!0,h=n;if(h)for(var m,y=-1,b=h.length-1;y<b;)m=h[y+=1],(e.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:e.util.schemaHasRules(m,e.RULES.all))&&(p=!1,d.schema=m,d.schemaPath=s+"["+y+"]",d.errSchemaPath=o+"/"+y,i+=" "+e.validate(d)+" ",d.baseId=f,l&&(i+=" if ("+u+") { ",c+="}"));return l&&(p?i+=" if (true) { ":i+=" "+c.slice(0,-1)+" "),i}});var Tc=Y((SC,Cc)=>{"use strict";Cc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),m="";h.level++;var y="valid"+h.level,b=o.every(function(P){return e.opts.strictKeywords?typeof P=="object"&&Object.keys(P).length>0||P===!1:e.util.schemaHasRules(P,e.RULES.all)});if(b){var v=h.baseId;i+=" var "+p+" = errors; var "+f+" = false; ";var S=e.compositeRule;e.compositeRule=h.compositeRule=!0;var C=o;if(C)for(var F,I=-1,N=C.length-1;I<N;)F=C[I+=1],h.schema=F,h.schemaPath=l+"["+I+"]",h.errSchemaPath=d+"/"+I,i+=" "+e.validate(h)+" ",h.baseId=v,i+=" "+f+" = "+f+" || "+y+"; if (!"+f+") { ",m+="}";e.compositeRule=h.compositeRule=S,i+=" "+m+" if (!"+f+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else c&&(i+=" if (true) { ");return i}});var Ic=Y((wC,Fc)=>{"use strict";Fc.exports=function(e,r,a){var i=" ",n=e.schema[r],s=e.errSchemaPath+"/"+r,o=!e.opts.allErrors,l=e.util.toQuotedString(n);return e.opts.$comment===!0?i+=" console.log("+l+");":typeof e.opts.$comment=="function"&&(i+=" self._opts.$comment("+l+", "+e.util.toQuotedString(s)+", validate.root.schema);"),i}});var Ac=Y((xC,Oc)=>{"use strict";Oc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o,p||(i+=" var schema"+n+" = validate.schema"+l+";"),i+="var "+f+" = equal("+u+", schema"+n+"); if (!"+f+") { ";var m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { allowedValue: schema"+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var y=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Ec=Y((CC,Pc)=>{"use strict";Pc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),m="";h.level++;var y="valid"+h.level,b="i"+n,v=h.dataLevel=e.dataLevel+1,S="data"+v,C=e.baseId,F=e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all);if(i+="var "+p+" = errors;var "+f+";",F){var I=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=o,h.schemaPath=l,h.errSchemaPath=d,i+=" var "+y+" = false; for (var "+b+" = 0; "+b+" < "+u+".length; "+b+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);var N=u+"["+b+"]";h.dataPathArr[v]=b;var P=e.validate(h);h.baseId=C,e.util.varOccurences(P,S)<2?i+=" "+e.util.varReplace(P,S,N)+" ":i+=" var "+S+" = "+N+"; "+P+" ",i+=" if ("+y+") break; } ",e.compositeRule=h.compositeRule=I,i+=" "+m+" if (!"+y+") {"}else i+=" if ("+u+".length == 0) {";var E=E||[];E.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var B=i;return i=E.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+B+"]); ":i+=" validate.errors = ["+B+"]; return false; ":i+=" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",F&&(i+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i}});var Dc=Y((TC,Lc)=>{"use strict";Lc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,y={},b={},v=e.opts.ownProperties;for(I in o)if(I!="__proto__"){var S=o[I],C=Array.isArray(S)?b:y;C[I]=S}i+="var "+f+" = errors;";var F=e.errorPath;i+="var missing"+n+";";for(var I in b)if(C=b[I],C.length){if(i+=" if ( "+u+e.util.getProperty(I)+" !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),c){i+=" && ( ";var N=C;if(N)for(var P,E=-1,B=N.length-1;E<B;){P=N[E+=1],E&&(i+=" || ");var R=e.util.getProperty(P),q=u+R;i+=" ( ( "+q+" === undefined ",v&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),i+=") && (missing"+n+" = "+e.util.toQuotedString(e.opts.jsonPointers?P:R)+") ) "}i+=")) { ";var L="missing"+n,k="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(F,L,!0):F+" + "+L);var $=$||[];$.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { property: '"+e.util.escapeQuotes(I)+"', missingProperty: '"+k+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",C.length==1?i+="property "+e.util.escapeQuotes(C[0]):i+="properties "+e.util.escapeQuotes(C.join(", ")),i+=" when property "+e.util.escapeQuotes(I)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var _=i;i=$.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{i+=" ) { ";var G=C;if(G)for(var P,V=-1,Z=G.length-1;V<Z;){P=G[V+=1];var R=e.util.getProperty(P),k=e.util.escapeQuotes(P),q=u+R;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(F,P,e.opts.jsonPointers)),i+=" if ( "+q+" === undefined ",v&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { property: '"+e.util.escapeQuotes(I)+"', missingProperty: '"+k+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",C.length==1?i+="property "+e.util.escapeQuotes(C[0]):i+="properties "+e.util.escapeQuotes(C.join(", ")),i+=" when property "+e.util.escapeQuotes(I)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}i+=" } ",c&&(h+="}",i+=" else { ")}e.errorPath=F;var U=p.baseId;for(var I in y){var S=y[I];(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===!1:e.util.schemaHasRules(S,e.RULES.all))&&(i+=" "+m+" = true; if ( "+u+e.util.getProperty(I)+" !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),i+=") { ",p.schema=S,p.schemaPath=l+e.util.getProperty(I),p.errSchemaPath=d+"/"+e.util.escapeFragment(I),i+=" "+e.validate(p)+" ",p.baseId=U,i+=" } ",c&&(i+=" if ("+m+") { ",h+="}"))}return c&&(i+=" "+h+" if ("+f+" == errors) {"),i}});var Bc=Y((FC,Nc)=>{"use strict";Nc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o;var m="i"+n,y="schema"+n;p||(i+=" var "+y+" = validate.schema"+l+";"),i+="var "+f+";",p&&(i+=" if (schema"+n+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+n+")) "+f+" = false; else {"),i+=""+f+" = false;for (var "+m+"=0; "+m+"<"+y+".length; "+m+"++) if (equal("+u+", "+y+"["+m+"])) { "+f+" = true; break; }",p&&(i+=" } "),i+=" if (!"+f+") { ";var b=b||[];b.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { allowedValues: schema"+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var v=i;return i=b.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Mc=Y((IC,$c)=>{"use strict";$c.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||"");if(e.opts.format===!1)return c&&(i+=" if (true) { "),i;var f=e.opts.$data&&o&&o.$data,p;f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o;var h=e.opts.unknownFormats,m=Array.isArray(h);if(f){var y="format"+n,b="isObject"+n,v="formatType"+n;i+=" var "+y+" = formats["+p+"]; var "+b+" = typeof "+y+" == 'object' && !("+y+" instanceof RegExp) && "+y+".validate; var "+v+" = "+b+" && "+y+".type || 'string'; if ("+b+") { ",e.async&&(i+=" var async"+n+" = "+y+".async; "),i+=" "+y+" = "+y+".validate; } if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),i+=" (",h!="ignore"&&(i+=" ("+p+" && !"+y+" ",m&&(i+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),i+=") || "),i+=" ("+y+" && "+v+" == '"+a+"' && !(typeof "+y+" == 'function' ? ",e.async?i+=" (async"+n+" ? await "+y+"("+u+") : "+y+"("+u+")) ":i+=" "+y+"("+u+") ",i+=" : "+y+".test("+u+"))))) {"}else{var y=e.formats[o];if(!y){if(h=="ignore")return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(i+=" if (true) { "),i;if(m&&h.indexOf(o)>=0)return c&&(i+=" if (true) { "),i;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var b=typeof y=="object"&&!(y instanceof RegExp)&&y.validate,v=b&&y.type||"string";if(b){var S=y.async===!0;y=y.validate}if(v!=a)return c&&(i+=" if (true) { "),i;if(S){if(!e.async)throw new Error("async format in sync schema");var C="formats"+e.util.getProperty(o)+".validate";i+=" if (!(await "+C+"("+u+"))) { "}else{i+=" if (! ";var C="formats"+e.util.getProperty(o);b&&(C+=".validate"),typeof y=="function"?i+=" "+C+"("+u+") ":i+=" "+C+".test("+u+") ",i+=") { "}}var F=F||[];F.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { format: ",f?i+=""+p:i+=""+e.util.toQuotedString(o),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match format "`,f?i+="' + "+p+" + '":i+=""+e.util.escapeQuotes(o),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var I=i;return i=F.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+I+"]); ":i+=" validate.errors = ["+I+"]; return false; ":i+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var Rc=Y((OC,qc)=>{"use strict";qc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e);h.level++;var m="valid"+h.level,y=e.schema.then,b=e.schema.else,v=y!==void 0&&(e.opts.strictKeywords?typeof y=="object"&&Object.keys(y).length>0||y===!1:e.util.schemaHasRules(y,e.RULES.all)),S=b!==void 0&&(e.opts.strictKeywords?typeof b=="object"&&Object.keys(b).length>0||b===!1:e.util.schemaHasRules(b,e.RULES.all)),C=h.baseId;if(v||S){var F;h.createErrors=!1,h.schema=o,h.schemaPath=l,h.errSchemaPath=d,i+=" var "+p+" = errors; var "+f+" = true; ";var I=e.compositeRule;e.compositeRule=h.compositeRule=!0,i+=" "+e.validate(h)+" ",h.baseId=C,h.createErrors=!0,i+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=I,v?(i+=" if ("+m+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",i+=" "+e.validate(h)+" ",h.baseId=C,i+=" "+f+" = "+m+"; ",v&&S?(F="ifClause"+n,i+=" var "+F+" = 'then'; "):F="'then'",i+=" } ",S&&(i+=" else { ")):i+=" if (!"+m+") { ",S&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",i+=" "+e.validate(h)+" ",h.baseId=C,i+=" "+f+" = "+m+"; ",v&&S?(F="ifClause"+n,i+=" var "+F+" = 'else'; "):F="'else'",i+=" } "),i+=" if (!"+f+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { failingKeyword: "+F+" } ",e.opts.messages!==!1&&(i+=` , message: 'should match "' + `+F+` + '" schema' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var Wc=Y((AC,kc)=>{"use strict";kc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),m="";h.level++;var y="valid"+h.level,b="i"+n,v=h.dataLevel=e.dataLevel+1,S="data"+v,C=e.baseId;if(i+="var "+p+" = errors;var "+f+";",Array.isArray(o)){var F=e.schema.additionalItems;if(F===!1){i+=" "+f+" = "+u+".length <= "+o.length+"; ";var I=d;d=e.errSchemaPath+"/additionalItems",i+=" if (!"+f+") { ";var N=N||[];N.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+o.length+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var P=i;i=N.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+P+"]); ":i+=" validate.errors = ["+P+"]; return false; ":i+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d=I,c&&(m+="}",i+=" else { ")}var E=o;if(E){for(var B,R=-1,q=E.length-1;R<q;)if(B=E[R+=1],e.opts.strictKeywords?typeof B=="object"&&Object.keys(B).length>0||B===!1:e.util.schemaHasRules(B,e.RULES.all)){i+=" "+y+" = true; if ("+u+".length > "+R+") { ";var L=u+"["+R+"]";h.schema=B,h.schemaPath=l+"["+R+"]",h.errSchemaPath=d+"/"+R,h.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers,!0),h.dataPathArr[v]=R;var k=e.validate(h);h.baseId=C,e.util.varOccurences(k,S)<2?i+=" "+e.util.varReplace(k,S,L)+" ":i+=" var "+S+" = "+L+"; "+k+" ",i+=" } ",c&&(i+=" if ("+y+") { ",m+="}")}}if(typeof F=="object"&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))){h.schema=F,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+y+" = true; if ("+u+".length > "+o.length+") { for (var "+b+" = "+o.length+"; "+b+" < "+u+".length; "+b+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);var L=u+"["+b+"]";h.dataPathArr[v]=b;var k=e.validate(h);h.baseId=C,e.util.varOccurences(k,S)<2?i+=" "+e.util.varReplace(k,S,L)+" ":i+=" var "+S+" = "+L+"; "+k+" ",c&&(i+=" if (!"+y+") break; "),i+=" } } ",c&&(i+=" if ("+y+") { ",m+="}")}}else if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=l,h.errSchemaPath=d,i+=" for (var "+b+" = 0; "+b+" < "+u+".length; "+b+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);var L=u+"["+b+"]";h.dataPathArr[v]=b;var k=e.validate(h);h.baseId=C,e.util.varOccurences(k,S)<2?i+=" "+e.util.varReplace(k,S,L)+" ":i+=" var "+S+" = "+L+"; "+k+" ",c&&(i+=" if (!"+y+") break; "),i+=" }"}return c&&(i+=" "+m+" if ("+p+" == errors) {"),i}});var $s=Y((PC,jc)=>{"use strict";jc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,C,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o;var h=r=="maximum",m=h?"exclusiveMaximum":"exclusiveMinimum",y=e.schema[m],b=e.opts.$data&&y&&y.$data,v=h?"<":">",S=h?">":"<",C=void 0;if(!(f||typeof o=="number"||o===void 0))throw new Error(r+" must be number");if(!(b||y===void 0||typeof y=="number"||typeof y=="boolean"))throw new Error(m+" must be number or boolean");if(b){var F=e.util.getData(y.$data,s,e.dataPathArr),I="exclusive"+n,N="exclType"+n,P="exclIsNumber"+n,E="op"+n,B="' + "+E+" + '";i+=" var schemaExcl"+n+" = "+F+"; ",F="schemaExcl"+n,i+=" var "+I+"; var "+N+" = typeof "+F+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ";var C=m,R=R||[];R.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(C||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var q=i;i=R.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" "+N+" == 'number' ? ( ("+I+" = "+p+" === undefined || "+F+" "+v+"= "+p+") ? "+u+" "+S+"= "+F+" : "+u+" "+S+" "+p+" ) : ( ("+I+" = "+F+" === true) ? "+u+" "+S+"= "+p+" : "+u+" "+S+" "+p+" ) || "+u+" !== "+u+") { var op"+n+" = "+I+" ? '"+v+"' : '"+v+"='; ",o===void 0&&(C=m,d=e.errSchemaPath+"/"+m,p=F,f=b)}else{var P=typeof y=="number",B=v;if(P&&f){var E="'"+B+"'";i+=" if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" ( "+p+" === undefined || "+y+" "+v+"= "+p+" ? "+u+" "+S+"= "+y+" : "+u+" "+S+" "+p+" ) || "+u+" !== "+u+") { "}else{P&&o===void 0?(I=!0,C=m,d=e.errSchemaPath+"/"+m,p=y,S+="="):(P&&(p=Math[h?"min":"max"](y,o)),y===(P?p:!0)?(I=!0,C=m,d=e.errSchemaPath+"/"+m,S+="="):(I=!1,B+="="));var E="'"+B+"'";i+=" if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" "+u+" "+S+" "+p+" || "+u+" !== "+u+") { "}}C=C||r;var R=R||[];R.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(C||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { comparison: "+E+", limit: "+p+", exclusive: "+I+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be "+B+" ",f?i+="' + "+p:i+=""+p+"'"),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var q=i;return i=R.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var Ms=Y((EC,Vc)=>{"use strict";Vc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,m,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");var h=r=="maxItems"?">":"<";i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" "+u+".length "+h+" "+p+") { ";var m=r,y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",r=="maxItems"?i+="more":i+="fewer",i+=" than ",f?i+="' + "+p+" + '":i+=""+o,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var b=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var qs=Y((LC,_c)=>{"use strict";_c.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,m,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");var h=r=="maxLength"?">":"<";i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),e.opts.unicode===!1?i+=" "+u+".length ":i+=" ucs2length("+u+") ",i+=" "+h+" "+p+") { ";var m=r,y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be ",r=="maxLength"?i+="longer":i+="shorter",i+=" than ",f?i+="' + "+p+" + '":i+=""+o,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var b=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Rs=Y((DC,zc)=>{"use strict";zc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,m,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");var h=r=="maxProperties"?">":"<";i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" Object.keys("+u+").length "+h+" "+p+") { ";var m=r,y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",r=="maxProperties"?i+="more":i+="fewer",i+=" than ",f?i+="' + "+p+" + '":i+=""+o,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var b=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Hc=Y((NC,Uc)=>{"use strict";Uc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");i+="var division"+n+";if (",f&&(i+=" "+p+" !== undefined && ( typeof "+p+" != 'number' || "),i+=" (division"+n+" = "+u+" / "+p+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+n+" !== parseInt(division"+n+") ",i+=" ) ",f&&(i+=" ) "),i+=" ) { ";var h=h||[];h.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { multipleOf: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be multiple of ",f?i+="' + "+p:i+=""+p+"'"),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var m=i;return i=h.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Qc=Y((BC,Gc)=>{"use strict";Gc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o,p.schemaPath=l,p.errSchemaPath=d,i+=" var "+f+" = errors; ";var m=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1;var y;p.opts.allErrors&&(y=p.opts.allErrors,p.opts.allErrors=!1),i+=" "+e.validate(p)+" ",p.createErrors=!0,y&&(p.opts.allErrors=y),e.compositeRule=p.compositeRule=m,i+=" if ("+h+") { ";var b=b||[];b.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var v=i;i=b.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ");return i}});var Kc=Y(($C,Zc)=>{"use strict";Zc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),m="";h.level++;var y="valid"+h.level,b=h.baseId,v="prevValid"+n,S="passingSchemas"+n;i+="var "+p+" = errors , "+v+" = false , "+f+" = false , "+S+" = null; ";var C=e.compositeRule;e.compositeRule=h.compositeRule=!0;var F=o;if(F)for(var I,N=-1,P=F.length-1;N<P;)I=F[N+=1],(e.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:e.util.schemaHasRules(I,e.RULES.all))?(h.schema=I,h.schemaPath=l+"["+N+"]",h.errSchemaPath=d+"/"+N,i+=" "+e.validate(h)+" ",h.baseId=b):i+=" var "+y+" = true; ",N&&(i+=" if ("+y+" && "+v+") { "+f+" = false; "+S+" = ["+S+", "+N+"]; } else { ",m+="}"),i+=" if ("+y+") { "+f+" = "+v+" = true; "+S+" = "+N+"; }";return e.compositeRule=h.compositeRule=C,i+=""+m+"if (!"+f+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { passingSchemas: "+S+" } ",e.opts.messages!==!1&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i}});var Yc=Y((MC,Jc)=>{"use strict";Jc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o;var h=f?"(new RegExp("+p+"))":e.usePattern(o);i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),i+=" !"+h+".test("+u+") ) { ";var m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { pattern: ",f?i+=""+p:i+=""+e.util.toQuotedString(o),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match pattern "`,f?i+="' + "+p+" + '":i+=""+e.util.escapeQuotes(o),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var y=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var eu=Y((qC,Xc)=>{"use strict";Xc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,y="key"+n,b="idx"+n,v=p.dataLevel=e.dataLevel+1,S="data"+v,C="dataProperties"+n,F=Object.keys(o||{}).filter(V),I=e.schema.patternProperties||{},N=Object.keys(I).filter(V),P=e.schema.additionalProperties,E=F.length||N.length,B=P===!1,R=typeof P=="object"&&Object.keys(P).length,q=e.opts.removeAdditional,L=B||R||q,k=e.opts.ownProperties,$=e.baseId,_=e.schema.required;if(_&&!(e.opts.$data&&_.$data)&&_.length<e.opts.loopRequired)var G=e.util.toHash(_);function V(Nt){return Nt!=="__proto__"}if(i+="var "+f+" = errors;var "+m+" = true;",k&&(i+=" var "+C+" = undefined;"),L){if(k?i+=" "+C+" = "+C+" || Object.keys("+u+"); for (var "+b+"=0; "+b+"<"+C+".length; "+b+"++) { var "+y+" = "+C+"["+b+"]; ":i+=" for (var "+y+" in "+u+") { ",E){if(i+=" var isAdditional"+n+" = !(false ",F.length)if(F.length>8)i+=" || validate.schema"+l+".hasOwnProperty("+y+") ";else{var Z=F;if(Z)for(var U,oe=-1,Te=Z.length-1;oe<Te;)U=Z[oe+=1],i+=" || "+y+" == "+e.util.toQuotedString(U)+" "}if(N.length){var Re=N;if(Re)for(var re,be=-1,Fe=Re.length-1;be<Fe;)re=Re[be+=1],i+=" || "+e.usePattern(re)+".test("+y+") "}i+=" ); if (isAdditional"+n+") { "}if(q=="all")i+=" delete "+u+"["+y+"]; ";else{var ke=e.errorPath,xt="' + "+y+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers)),B)if(q)i+=" delete "+u+"["+y+"]; ";else{i+=" "+m+" = false; ";var at=d;d=e.errSchemaPath+"/additionalProperties";var Ie=Ie||[];Ie.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { additionalProperty: '"+xt+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is an invalid additional property":i+="should NOT have additional properties",i+="' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var we=i;i=Ie.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+we+"]); ":i+=" validate.errors = ["+we+"]; return false; ":i+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d=at,c&&(i+=" break; ")}else if(R)if(q=="failing"){i+=" var "+f+" = errors; ";var Ct=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=P,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers);var Ue=u+"["+y+"]";p.dataPathArr[v]=y;var he=e.validate(p);p.baseId=$,e.util.varOccurences(he,S)<2?i+=" "+e.util.varReplace(he,S,Ue)+" ":i+=" var "+S+" = "+Ue+"; "+he+" ",i+=" if (!"+m+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+y+"]; } ",e.compositeRule=p.compositeRule=Ct}else{p.schema=P,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers);var Ue=u+"["+y+"]";p.dataPathArr[v]=y;var he=e.validate(p);p.baseId=$,e.util.varOccurences(he,S)<2?i+=" "+e.util.varReplace(he,S,Ue)+" ":i+=" var "+S+" = "+Ue+"; "+he+" ",c&&(i+=" if (!"+m+") break; ")}e.errorPath=ke}E&&(i+=" } "),i+=" } ",c&&(i+=" if ("+m+") { ",h+="}")}var hr=e.opts.useDefaults&&!e.compositeRule;if(F.length){var Jt=F;if(Jt)for(var U,$r=-1,Mr=Jt.length-1;$r<Mr;){U=Jt[$r+=1];var Je=o[U];if(e.opts.strictKeywords?typeof Je=="object"&&Object.keys(Je).length>0||Je===!1:e.util.schemaHasRules(Je,e.RULES.all)){var Tt=e.util.getProperty(U),Ue=u+Tt,nt=hr&&Je.default!==void 0;p.schema=Je,p.schemaPath=l+Tt,p.errSchemaPath=d+"/"+e.util.escapeFragment(U),p.errorPath=e.util.getPath(e.errorPath,U,e.opts.jsonPointers),p.dataPathArr[v]=e.util.toQuotedString(U);var he=e.validate(p);if(p.baseId=$,e.util.varOccurences(he,S)<2){he=e.util.varReplace(he,S,Ue);var tt=Ue}else{var tt=S;i+=" var "+S+" = "+Ue+"; "}if(nt)i+=" "+he+" ";else{if(G&&G[U]){i+=" if ( "+tt+" === undefined ",k&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(U)+"') "),i+=") { "+m+" = false; ";var ke=e.errorPath,at=d,zt=e.util.escapeQuotes(U);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(ke,U,e.opts.jsonPointers)),d=e.errSchemaPath+"/required";var Ie=Ie||[];Ie.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+zt+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+zt+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var we=i;i=Ie.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+we+"]); ":i+=" validate.errors = ["+we+"]; return false; ":i+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d=at,e.errorPath=ke,i+=" } else { "}else c?(i+=" if ( "+tt+" === undefined ",k&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(U)+"') "),i+=") { "+m+" = true; } else { "):(i+=" if ("+tt+" !== undefined ",k&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(U)+"') "),i+=" ) { ");i+=" "+he+" } "}}c&&(i+=" if ("+m+") { ",h+="}")}}if(N.length){var pt=N;if(pt)for(var re,da=-1,On=pt.length-1;da<On;){re=pt[da+=1];var Je=I[re];if(e.opts.strictKeywords?typeof Je=="object"&&Object.keys(Je).length>0||Je===!1:e.util.schemaHasRules(Je,e.RULES.all)){p.schema=Je,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(re),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(re),k?i+=" "+C+" = "+C+" || Object.keys("+u+"); for (var "+b+"=0; "+b+"<"+C+".length; "+b+"++) { var "+y+" = "+C+"["+b+"]; ":i+=" for (var "+y+" in "+u+") { ",i+=" if ("+e.usePattern(re)+".test("+y+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers);var Ue=u+"["+y+"]";p.dataPathArr[v]=y;var he=e.validate(p);p.baseId=$,e.util.varOccurences(he,S)<2?i+=" "+e.util.varReplace(he,S,Ue)+" ":i+=" var "+S+" = "+Ue+"; "+he+" ",c&&(i+=" if (!"+m+") break; "),i+=" } ",c&&(i+=" else "+m+" = true; "),i+=" } ",c&&(i+=" if ("+m+") { ",h+="}")}}}return c&&(i+=" "+h+" if ("+f+" == errors) {"),i}});var ru=Y((RC,tu)=>{"use strict";tu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level;if(i+="var "+f+" = errors;",e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o,p.schemaPath=l,p.errSchemaPath=d;var y="key"+n,b="idx"+n,v="i"+n,S="' + "+y+" + '",C=p.dataLevel=e.dataLevel+1,F="data"+C,I="dataProperties"+n,N=e.opts.ownProperties,P=e.baseId;N&&(i+=" var "+I+" = undefined; "),N?i+=" "+I+" = "+I+" || Object.keys("+u+"); for (var "+b+"=0; "+b+"<"+I+".length; "+b+"++) { var "+y+" = "+I+"["+b+"]; ":i+=" for (var "+y+" in "+u+") { ",i+=" var startErrs"+n+" = errors; ";var E=y,B=e.compositeRule;e.compositeRule=p.compositeRule=!0;var R=e.validate(p);p.baseId=P,e.util.varOccurences(R,F)<2?i+=" "+e.util.varReplace(R,F,E)+" ":i+=" var "+F+" = "+E+"; "+R+" ",e.compositeRule=p.compositeRule=B,i+=" if (!"+m+") { for (var "+v+"=startErrs"+n+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+y+"; } var err = ",e.createErrors!==!1?(i+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { propertyName: '"+S+"' } ",e.opts.messages!==!1&&(i+=" , message: 'property name \\'"+S+"\\' is invalid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),c&&(i+=" break; "),i+=" } }"}return c&&(i+=" "+h+" if ("+f+" == errors) {"),i}});var au=Y((kC,iu)=>{"use strict";iu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o;var m="schema"+n;if(!p)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var y=[],b=o;if(b)for(var v,S=-1,C=b.length-1;S<C;){v=b[S+=1];var F=e.schema.properties[v];F&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))||(y[y.length]=v)}}else var y=o;if(p||y.length){var I=e.errorPath,N=p||y.length>=e.opts.loopRequired,P=e.opts.ownProperties;if(c)if(i+=" var missing"+n+"; ",N){p||(i+=" var "+m+" = validate.schema"+l+"; ");var E="i"+n,B="schema"+n+"["+E+"]",R="' + "+B+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,B,e.opts.jsonPointers)),i+=" var "+f+" = true; ",p&&(i+=" if (schema"+n+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+n+")) "+f+" = false; else {"),i+=" for (var "+E+" = 0; "+E+" < "+m+".length; "+E+"++) { "+f+" = "+u+"["+m+"["+E+"]] !== undefined ",P&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", "+m+"["+E+"]) "),i+="; if (!"+f+") break; } ",p&&(i+=" } "),i+=" if (!"+f+") { ";var q=q||[];q.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var L=i;i=q.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var k=y;if(k)for(var $,E=-1,_=k.length-1;E<_;){$=k[E+=1],E&&(i+=" || ");var G=e.util.getProperty($),V=u+G;i+=" ( ( "+V+" === undefined ",P&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes($)+"') "),i+=") && (missing"+n+" = "+e.util.toQuotedString(e.opts.jsonPointers?$:G)+") ) "}i+=") { ";var B="missing"+n,R="' + "+B+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(I,B,!0):I+" + "+B);var q=q||[];q.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var L=i;i=q.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(N){p||(i+=" var "+m+" = validate.schema"+l+"; ");var E="i"+n,B="schema"+n+"["+E+"]",R="' + "+B+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,B,e.opts.jsonPointers)),p&&(i+=" if ("+m+" && !Array.isArray("+m+")) { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+m+" !== undefined) { "),i+=" for (var "+E+" = 0; "+E+" < "+m+".length; "+E+"++) { if ("+u+"["+m+"["+E+"]] === undefined ",P&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+m+"["+E+"]) "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(i+=" } ")}else{var Z=y;if(Z)for(var $,U=-1,oe=Z.length-1;U<oe;){$=Z[U+=1];var G=e.util.getProperty($),R=e.util.escapeQuotes($),V=u+G;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(I,$,e.opts.jsonPointers)),i+=" if ( "+V+" === undefined ",P&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes($)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=I}else c&&(i+=" if (true) {");return i}});var su=Y((WC,nu)=>{"use strict";nu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;if(p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o,(o||p)&&e.opts.uniqueItems!==!1){p&&(i+=" var "+f+"; if ("+h+" === false || "+h+" === undefined) "+f+" = true; else if (typeof "+h+" != 'boolean') "+f+" = false; else { "),i+=" var i = "+u+".length , "+f+" = true , j; if (i > 1) { ";var m=e.schema.items&&e.schema.items.type,y=Array.isArray(m);if(!m||m=="object"||m=="array"||y&&(m.indexOf("object")>=0||m.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+f+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ";var b="checkDataType"+(y?"s":"");i+=" if ("+e.util[b](m,"item",e.opts.strictNumbers,!0)+") continue; ",y&&(i+=` if (typeof item == 'string') item = '"' + item; `),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+f+") { ";var v=v||[];v.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",p?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var S=i;i=v.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var lu=Y((jC,ou)=>{"use strict";ou.exports={$ref:Sc(),allOf:xc(),anyOf:Tc(),$comment:Ic(),const:Ac(),contains:Ec(),dependencies:Dc(),enum:Bc(),format:Mc(),if:Rc(),items:Wc(),maximum:$s(),minimum:$s(),maxItems:Ms(),minItems:Ms(),maxLength:qs(),minLength:qs(),maxProperties:Rs(),minProperties:Rs(),multipleOf:Hc(),not:Qc(),oneOf:Kc(),pattern:Yc(),properties:eu(),propertyNames:ru(),required:au(),uniqueItems:su(),validate:Ns()}});var uu=Y((VC,cu)=>{"use strict";var du=lu(),ks=Hr().toHash;cu.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],r=["type","$comment"],a=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],i=["number","integer","string","array","object","boolean","null"];return e.all=ks(r),e.types=ks(i),e.forEach(function(n){n.rules=n.rules.map(function(s){var o;if(typeof s=="object"){var l=Object.keys(s)[0];o=s[l],s=l,o.forEach(function(c){r.push(c),e.all[c]=!0})}r.push(s);var d=e.all[s]={keyword:s,code:du[s],implements:o};return d}),e.all.$comment={keyword:"$comment",code:du.$comment},n.type&&(e.types[n.type]=n)}),e.keywords=ks(r.concat(a)),e.custom={},e}});var hu=Y((_C,fu)=>{"use strict";var pu=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];fu.exports=function(t,e){for(var r=0;r<e.length;r++){t=JSON.parse(JSON.stringify(t));var a=e[r].split("/"),i=t,n;for(n=1;n<a.length;n++)i=i[a[n]];for(n=0;n<pu.length;n++){var s=pu[n],o=i[s];o&&(i[s]={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return t}});var gu=Y((zC,yu)=>{"use strict";var cg=Ka().MissingRef;yu.exports=mu;function mu(t,e,r){var a=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof e=="function"&&(r=e,e=void 0);var i=n(t).then(function(){var o=a._addSchema(t,void 0,e);return o.validate||s(o)});return r&&i.then(function(o){r(null,o)},r),i;function n(o){var l=o.$schema;return l&&!a.getSchema(l)?mu.call(a,{$ref:l},!0):Promise.resolve()}function s(o){try{return a._compile(o)}catch(d){if(d instanceof cg)return l(d);throw d}function l(d){var c=d.missingSchema;if(p(c))throw new Error("Schema "+c+" is loaded but "+d.missingRef+" cannot be resolved");var u=a._loadingSchemas[c];return u||(u=a._loadingSchemas[c]=a._opts.loadSchema(c),u.then(f,f)),u.then(function(h){if(!p(c))return n(h).then(function(){p(c)||a.addSchema(h,c,void 0,e)})}).then(function(){return s(o)});function f(){delete a._loadingSchemas[c]}function p(h){return a._refs[h]||a._schemas[h]}}}}});var vu=Y((UC,bu)=>{"use strict";bu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u,f="data"+(s||""),p="valid"+n,h="errs__"+n,m=e.opts.$data&&o&&o.$data,y;m?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",y="schema"+n):y=o;var b=this,v="definition"+n,S=b.definition,C="",F,I,N,P,E;if(m&&S.$data){E="keywordValidate"+n;var B=S.validateSchema;i+=" var "+v+" = RULES.custom['"+r+"'].definition; var "+E+" = "+v+".validate;"}else{if(P=e.useCustomRule(b,o,e.schema,e),!P)return;y="validate.schema"+l,E=P.code,F=S.compile,I=S.inline,N=S.macro}var R=E+".errors",q="i"+n,L="ruleErr"+n,k=S.async;if(k&&!e.async)throw new Error("async keyword in sync schema");if(I||N||(i+=""+R+" = null;"),i+="var "+h+" = errors;var "+p+";",m&&S.$data&&(C+="}",i+=" if ("+y+" === undefined) { "+p+" = true; } else { ",B&&(C+="}",i+=" "+p+" = "+v+".validateSchema("+y+"); if ("+p+") { ")),I)S.statements?i+=" "+P.validate+" ":i+=" "+p+" = "+P.validate+"; ";else if(N){var $=e.util.copy(e),C="";$.level++;var _="valid"+$.level;$.schema=P.validate,$.schemaPath="";var G=e.compositeRule;e.compositeRule=$.compositeRule=!0;var V=e.validate($).replace(/validate\.schema/g,E);e.compositeRule=$.compositeRule=G,i+=" "+V}else{var Z=Z||[];Z.push(i),i="",i+=" "+E+".call( ",e.opts.passContext?i+="this":i+="self",F||S.schema===!1?i+=" , "+f+" ":i+=" , "+y+" , "+f+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var U=s?"data"+(s-1||""):"parentData",oe=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+U+" , "+oe+" , rootData ) ";var Te=i;i=Z.pop(),S.errors===!1?(i+=" "+p+" = ",k&&(i+="await "),i+=""+Te+"; "):k?(R="customErrors"+n,i+=" var "+R+" = null; try { "+p+" = await "+Te+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+R+" = e.errors; else throw e; } "):i+=" "+R+" = null; "+p+" = "+Te+"; "}if(S.modifying&&(i+=" if ("+U+") "+f+" = "+U+"["+oe+"];"),i+=""+C,S.valid)c&&(i+=" if (true) { ");else{i+=" if ( ",S.valid===void 0?(i+=" !",N?i+=""+_:i+=""+p):i+=" "+!S.valid+" ",i+=") { ",u=b.keyword;var Z=Z||[];Z.push(i),i="";var Z=Z||[];Z.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(u||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { keyword: '"+b.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+b.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var Re=i;i=Z.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+Re+"]); ":i+=" validate.errors = ["+Re+"]; return false; ":i+=" var err = "+Re+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var re=i;i=Z.pop(),I?S.errors?S.errors!="full"&&(i+=" for (var "+q+"="+h+"; "+q+"<errors; "+q+"++) { var "+L+" = vErrors["+q+"]; if ("+L+".dataPath === undefined) "+L+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+L+".schemaPath === undefined) { "+L+'.schemaPath = "'+d+'"; } ',e.opts.verbose&&(i+=" "+L+".schema = "+y+"; "+L+".data = "+f+"; "),i+=" } "):S.errors===!1?i+=" "+re+" ":(i+=" if ("+h+" == errors) { "+re+" } else { for (var "+q+"="+h+"; "+q+"<errors; "+q+"++) { var "+L+" = vErrors["+q+"]; if ("+L+".dataPath === undefined) "+L+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+L+".schemaPath === undefined) { "+L+'.schemaPath = "'+d+'"; } ',e.opts.verbose&&(i+=" "+L+".schema = "+y+"; "+L+".data = "+f+"; "),i+=" } } "):N?(i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: '"+(u||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { keyword: '"+b.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+b.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):S.errors===!1?i+=" "+re+" ":(i+=" if (Array.isArray("+R+")) { if (vErrors === null) vErrors = "+R+"; else vErrors = vErrors.concat("+R+"); errors = vErrors.length; for (var "+q+"="+h+"; "+q+"<errors; "+q+"++) { var "+L+" = vErrors["+q+"]; if ("+L+".dataPath === undefined) "+L+".dataPath = (dataPath || '') + "+e.errorPath+"; "+L+'.schemaPath = "'+d+'"; ',e.opts.verbose&&(i+=" "+L+".schema = "+y+"; "+L+".data = "+f+"; "),i+=" } } else { "+re+" } "),i+=" } ",c&&(i+=" else { ")}return i}});var Ws=Y((HC,ug)=>{ug.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var xu=Y((GC,wu)=>{"use strict";var Su=Ws();wu.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Su.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Su.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}});var Tu=Y((QC,Cu)=>{"use strict";var pg=/^[a-z_$][a-z0-9_$-]*$/i,fg=vu(),hg=xu();Cu.exports={add:mg,get:yg,remove:gg,validate:js};function mg(t,e){var r=this.RULES;if(r.keywords[t])throw new Error("Keyword "+t+" is already defined");if(!pg.test(t))throw new Error("Keyword "+t+" is not a valid identifier");if(e){this.validateKeyword(e,!0);var a=e.type;if(Array.isArray(a))for(var i=0;i<a.length;i++)s(t,a[i],e);else s(t,a,e);var n=e.metaSchema;n&&(e.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),e.validateSchema=this.compile(n,!0))}r.keywords[t]=r.all[t]=!0;function s(o,l,d){for(var c,u=0;u<r.length;u++){var f=r[u];if(f.type==l){c=f;break}}c||(c={type:l,rules:[]},r.push(c));var p={keyword:o,definition:d,custom:!0,code:fg,implements:d.implements};c.rules.push(p),r.custom[o]=p}return this}function yg(t){var e=this.RULES.custom[t];return e?e.definition:this.RULES.keywords[t]||!1}function gg(t){var e=this.RULES;delete e.keywords[t],delete e.all[t],delete e.custom[t];for(var r=0;r<e.length;r++)for(var a=e[r].rules,i=0;i<a.length;i++)if(a[i].keyword==t){a.splice(i,1);break}return this}function js(t,e){js.errors=null;var r=this._validateKeyword=this._validateKeyword||this.compile(hg,!0);if(r(t))return!0;if(js.errors=r.errors,e)throw new Error("custom keyword definition is invalid: "+this.errorsText(r.errors));return!1}});var Fu=Y((ZC,bg)=>{bg.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var $u=Y((KC,Bu)=>{"use strict";var Ou=ac(),Gr=Za(),vg=sc(),Au=Is(),Sg=Ds(),wg=bc(),xg=uu(),Pu=hu(),Eu=Hr();Bu.exports=Me;Me.prototype.validate=Tg;Me.prototype.compile=Fg;Me.prototype.addSchema=Ig;Me.prototype.addMetaSchema=Og;Me.prototype.validateSchema=Ag;Me.prototype.getSchema=Eg;Me.prototype.removeSchema=Dg;Me.prototype.addFormat=Wg;Me.prototype.errorsText=kg;Me.prototype._addSchema=Ng;Me.prototype._compile=Bg;Me.prototype.compileAsync=gu();var nn=Tu();Me.prototype.addKeyword=nn.add;Me.prototype.getKeyword=nn.get;Me.prototype.removeKeyword=nn.remove;Me.prototype.validateKeyword=nn.validate;var Lu=Ka();Me.ValidationError=Lu.Validation;Me.MissingRefError=Lu.MissingRef;Me.$dataMetaSchema=Pu;var an="http://json-schema.org/draft-07/schema",Iu=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Cg=["/properties"];function Me(t){if(!(this instanceof Me))return new Me(t);t=this._opts=Eu.copy(t)||{},Hg(this),this._schemas={},this._refs={},this._fragments={},this._formats=wg(t.format),this._cache=t.cache||new vg,this._loadingSchemas={},this._compilations=[],this.RULES=xg(),this._getId=$g(t),t.loopRequired=t.loopRequired||1/0,t.errorDataPath=="property"&&(t._errorDataPathProperty=!0),t.serialize===void 0&&(t.serialize=Sg),this._metaOpts=Ug(this),t.formats&&_g(this),t.keywords&&zg(this),jg(this),typeof t.meta=="object"&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),Vg(this)}function Tg(t,e){var r;if(typeof t=="string"){if(r=this.getSchema(t),!r)throw new Error('no schema with key or ref "'+t+'"')}else{var a=this._addSchema(t);r=a.validate||this._compile(a)}var i=r(e);return r.$async!==!0&&(this.errors=r.errors),i}function Fg(t,e){var r=this._addSchema(t,void 0,e);return r.validate||this._compile(r)}function Ig(t,e,r,a){if(Array.isArray(t)){for(var i=0;i<t.length;i++)this.addSchema(t[i],void 0,r,a);return this}var n=this._getId(t);if(n!==void 0&&typeof n!="string")throw new Error("schema id must be string");return e=Gr.normalizeId(e||n),Nu(this,e),this._schemas[e]=this._addSchema(t,r,a,!0),this}function Og(t,e,r){return this.addSchema(t,e,r,!0),this}function Ag(t,e){var r=t.$schema;if(r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this._opts.defaultMeta||Pg(this),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(r,t);if(!a&&e){var i="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(i);else throw new Error(i)}return a}function Pg(t){var e=t._opts.meta;return t._opts.defaultMeta=typeof e=="object"?t._getId(e)||e:t.getSchema(an)?an:void 0,t._opts.defaultMeta}function Eg(t){var e=Du(this,t);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return Lg(this,t)}}function Lg(t,e){var r=Gr.schema.call(t,{schema:{}},e);if(r){var a=r.schema,i=r.root,n=r.baseId,s=Ou.call(t,a,i,void 0,n);return t._fragments[e]=new Au({ref:e,fragment:!0,schema:a,root:i,baseId:n,validate:s}),s}}function Du(t,e){return e=Gr.normalizeId(e),t._schemas[e]||t._refs[e]||t._fragments[e]}function Dg(t){if(t instanceof RegExp)return rn(this,this._schemas,t),rn(this,this._refs,t),this;switch(typeof t){case"undefined":return rn(this,this._schemas),rn(this,this._refs),this._cache.clear(),this;case"string":var e=Du(this,t);return e&&this._cache.del(e.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":var r=this._opts.serialize,a=r?r(t):t;this._cache.del(a);var i=this._getId(t);i&&(i=Gr.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this}function rn(t,e,r){for(var a in e){var i=e[a];!i.meta&&(!r||r.test(a))&&(t._cache.del(i.cacheKey),delete e[a])}}function Ng(t,e,r,a){if(typeof t!="object"&&typeof t!="boolean")throw new Error("schema should be object or boolean");var i=this._opts.serialize,n=i?i(t):t,s=this._cache.get(n);if(s)return s;a=a||this._opts.addUsedSchema!==!1;var o=Gr.normalizeId(this._getId(t));o&&a&&Nu(this,o);var l=this._opts.validateSchema!==!1&&!e,d;l&&!(d=o&&o==Gr.normalizeId(t.$schema))&&this.validateSchema(t,!0);var c=Gr.ids.call(this,t),u=new Au({id:o,schema:t,localRefs:c,cacheKey:n,meta:r});return o[0]!="#"&&a&&(this._refs[o]=u),this._cache.put(n,u),l&&d&&this.validateSchema(t,!0),u}function Bg(t,e){if(t.compiling)return t.validate=i,i.schema=t.schema,i.errors=null,i.root=e||i,t.schema.$async===!0&&(i.$async=!0),i;t.compiling=!0;var r;t.meta&&(r=this._opts,this._opts=this._metaOpts);var a;try{a=Ou.call(this,t.schema,e,t.localRefs)}catch(n){throw delete t.validate,n}finally{t.compiling=!1,t.meta&&(this._opts=r)}return t.validate=a,t.refs=a.refs,t.refVal=a.refVal,t.root=a.root,a;function i(){var n=t.validate,s=n.apply(this,arguments);return i.errors=n.errors,s}}function $g(t){switch(t.schemaId){case"auto":return Rg;case"id":return Mg;default:return qg}}function Mg(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function qg(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function Rg(t){if(t.$id&&t.id&&t.$id!=t.id)throw new Error("schema $id is different from id");return t.$id||t.id}function kg(t,e){if(t=t||this.errors,!t)return"No errors";e=e||{};for(var r=e.separator===void 0?", ":e.separator,a=e.dataVar===void 0?"data":e.dataVar,i="",n=0;n<t.length;n++){var s=t[n];s&&(i+=a+s.dataPath+" "+s.message+r)}return i.slice(0,-r.length)}function Wg(t,e){return typeof e=="string"&&(e=new RegExp(e)),this._formats[t]=e,this}function jg(t){var e;if(t._opts.$data&&(e=Fu(),t.addMetaSchema(e,e.$id,!0)),t._opts.meta!==!1){var r=Ws();t._opts.$data&&(r=Pu(r,Cg)),t.addMetaSchema(r,an,!0),t._refs["http://json-schema.org/schema"]=an}}function Vg(t){var e=t._opts.schemas;if(e)if(Array.isArray(e))t.addSchema(e);else for(var r in e)t.addSchema(e[r],r)}function _g(t){for(var e in t._opts.formats){var r=t._opts.formats[e];t.addFormat(e,r)}}function zg(t){for(var e in t._opts.keywords){var r=t._opts.keywords[e];t.addKeyword(e,r)}}function Nu(t,e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function Ug(t){for(var e=Eu.copy(t._opts),r=0;r<Iu.length;r++)delete e[Iu[r]];return e}function Hg(t){var e=t._opts.logger;if(e===!1)t.logger={log:Vs,warn:Vs,error:Vs};else{if(e===void 0&&(e=console),!(typeof e=="object"&&e.log&&e.warn&&e.error))throw new Error("logger must implement log, warn and error methods");t.logger=e}}function Vs(){}});var ir=class extends Error{},_n=class extends ir{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},zn=class extends ir{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},Un=class extends ir{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},vr=class extends ir{},xa=class extends ir{constructor(e){super(`Invalid unit ${e}`)}},He=class extends ir{},Zt=class extends ir{constructor(){super("Zone is an abstract class")}},j="numeric",Rt="short",St="long",Ca={year:j,month:j,day:j},pl={year:j,month:Rt,day:j},Ef={year:j,month:Rt,day:j,weekday:Rt},fl={year:j,month:St,day:j},hl={year:j,month:St,day:j,weekday:St},ml={hour:j,minute:j},yl={hour:j,minute:j,second:j},gl={hour:j,minute:j,second:j,timeZoneName:Rt},bl={hour:j,minute:j,second:j,timeZoneName:St},vl={hour:j,minute:j,hourCycle:"h23"},Sl={hour:j,minute:j,second:j,hourCycle:"h23"},wl={hour:j,minute:j,second:j,hourCycle:"h23",timeZoneName:Rt},xl={hour:j,minute:j,second:j,hourCycle:"h23",timeZoneName:St},Cl={year:j,month:j,day:j,hour:j,minute:j},Tl={year:j,month:j,day:j,hour:j,minute:j,second:j},Fl={year:j,month:Rt,day:j,hour:j,minute:j},Il={year:j,month:Rt,day:j,hour:j,minute:j,second:j},Lf={year:j,month:Rt,day:j,weekday:Rt,hour:j,minute:j},Ol={year:j,month:St,day:j,hour:j,minute:j,timeZoneName:Rt},Al={year:j,month:St,day:j,hour:j,minute:j,second:j,timeZoneName:Rt},Pl={year:j,month:St,day:j,weekday:St,hour:j,minute:j,timeZoneName:St},El={year:j,month:St,day:j,weekday:St,hour:j,minute:j,second:j,timeZoneName:St},zr=class{get type(){throw new Zt}get name(){throw new Zt}get ianaName(){return this.name}get isUniversal(){throw new Zt}offsetName(e,r){throw new Zt}formatOffset(e,r){throw new Zt}offset(e){throw new Zt}equals(e){throw new Zt}get isValid(){throw new Zt}},Bn=null,Ta=class t extends zr{static get instance(){return Bn===null&&(Bn=new t),Bn}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:a}){return jl(e,r,a)}formatOffset(e,r){return Gi(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},Hn=new Map;function Df(t){let e=Hn.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Hn.set(t,e)),e}var Nf={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Bf(t,e){let r=t.format(e).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,n,s,o,l,d,c]=a;return[s,i,n,o,l,d,c]}function $f(t,e){let r=t.formatToParts(e),a=[];for(let i=0;i<r.length;i++){let{type:n,value:s}=r[i],o=Nf[n];n==="era"?a[o]=s:J(o)||(a[o]=parseInt(s,10))}return a}var $n=new Map,wr=class t extends zr{static create(e){let r=$n.get(e);return r===void 0&&$n.set(e,r=new t(e)),r}static resetCache(){$n.clear(),Hn.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:a}){return jl(e,r,a,this.name)}formatOffset(e,r){return Gi(this.offset(e),r)}offset(e){if(!this.valid)return NaN;let r=new Date(e);if(isNaN(r))return NaN;let a=Df(this.name),[i,n,s,o,l,d,c]=a.formatToParts?$f(a,r):Bf(a,r);o==="BC"&&(i=-Math.abs(i)+1);let f=Ea({year:i,month:n,day:s,hour:l===24?0:l,minute:d,second:c,millisecond:0}),p=+r,h=p%1e3;return p-=h>=0?h:1e3+h,(f-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Mo={};function Mf(t,e={}){let r=JSON.stringify([t,e]),a=Mo[r];return a||(a=new Intl.ListFormat(t,e),Mo[r]=a),a}var Gn=new Map;function Qn(t,e={}){let r=JSON.stringify([t,e]),a=Gn.get(r);return a===void 0&&(a=new Intl.DateTimeFormat(t,e),Gn.set(r,a)),a}var Zn=new Map;function qf(t,e={}){let r=JSON.stringify([t,e]),a=Zn.get(r);return a===void 0&&(a=new Intl.NumberFormat(t,e),Zn.set(r,a)),a}var Kn=new Map;function Rf(t,e={}){let{base:r,...a}=e,i=JSON.stringify([t,a]),n=Kn.get(i);return n===void 0&&(n=new Intl.RelativeTimeFormat(t,e),Kn.set(i,n)),n}var zi=null;function kf(){return zi||(zi=new Intl.DateTimeFormat().resolvedOptions().locale,zi)}var Jn=new Map;function Ll(t){let e=Jn.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Jn.set(t,e)),e}var Yn=new Map;function Wf(t){let e=Yn.get(t);if(!e){let r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in e||(e={...Dl,...e}),Yn.set(t,e)}return e}function jf(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let r=t.indexOf("-u-");if(r===-1)return[t];{let a,i;try{a=Qn(t).resolvedOptions(),i=t}catch{let l=t.substring(0,r);a=Qn(l).resolvedOptions(),i=l}let{numberingSystem:n,calendar:s}=a;return[i,n,s]}}function Vf(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function _f(t){let e=[];for(let r=1;r<=12;r++){let a=ie.utc(2009,r,1);e.push(t(a))}return e}function zf(t){let e=[];for(let r=1;r<=7;r++){let a=ie.utc(2016,11,13+r);e.push(t(a))}return e}function ma(t,e,r,a){let i=t.listingMode();return i==="error"?null:i==="en"?r(e):a(e)}function Uf(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||Ll(t.locale).numberingSystem==="latn"}var Xn=class{constructor(e,r,a){this.padTo=a.padTo||0,this.floor=a.floor||!1;let{padTo:i,floor:n,...s}=a;if(!r||Object.keys(s).length>0){let o={useGrouping:!1,...a};a.padTo>0&&(o.minimumIntegerDigits=a.padTo),this.inf=qf(e,o)}}format(e){if(this.inf){let r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{let r=this.floor?Math.floor(e):us(e,3);return Ve(r,this.padTo)}}},es=class{constructor(e,r,a){this.opts=a,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),o=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&wr.create(o).valid?(i=o,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let n={...this.opts};n.timeZone=n.timeZone||i,this.dtf=Qn(r,n)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){let a=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:a}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},ts=class{constructor(e,r,a){this.opts={style:"long",...a},!r&&kl()&&(this.rtf=Rf(e,a))}format(e,r){return this.rtf?this.rtf.format(e,r):ph(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}},Dl={firstDay:1,minimalDays:4,weekend:[6,7]},Ce=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,a,i,n=!1){let s=e||Ee.defaultLocale,o=s||(n?"en-US":kf()),l=r||Ee.defaultNumberingSystem,d=a||Ee.defaultOutputCalendar,c=as(i)||Ee.defaultWeekSettings;return new t(o,l,d,c,s)}static resetCache(){zi=null,Gn.clear(),Zn.clear(),Kn.clear(),Jn.clear(),Yn.clear()}static fromObject({locale:e,numberingSystem:r,outputCalendar:a,weekSettings:i}={}){return t.create(e,r,a,i)}constructor(e,r,a,i,n){let[s,o,l]=jf(e);this.locale=s,this.numberingSystem=r||o||null,this.outputCalendar=a||l||null,this.weekSettings=i,this.intl=Vf(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Uf(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,as(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return ma(this,e,zl,()=>{let a=this.intl==="ja"||this.intl.startsWith("ja-");r&=!a;let i=r?{month:e,day:"numeric"}:{month:e},n=r?"format":"standalone";if(!this.monthsCache[n][e]){let s=a?o=>this.dtFormatter(o,i).format():o=>this.extract(o,i,"month");this.monthsCache[n][e]=_f(s)}return this.monthsCache[n][e]})}weekdays(e,r=!1){return ma(this,e,Gl,()=>{let a=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=r?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=zf(n=>this.extract(n,a,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return ma(this,void 0,()=>Ql,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ie.utc(2016,11,13,9),ie.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ma(this,e,Zl,()=>{let r={era:e};return this.eraCache[e]||(this.eraCache[e]=[ie.utc(-40,1,1),ie.utc(2017,1,1)].map(a=>this.extract(a,r,"era"))),this.eraCache[e]})}extract(e,r,a){let i=this.dtFormatter(e,r),n=i.formatToParts(),s=n.find(o=>o.type.toLowerCase()===a);return s?s.value:null}numberFormatter(e={}){return new Xn(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new es(e,this.intl,r)}relFormatter(e={}){return new ts(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Mf(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Ll(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Wl()?Wf(this.locale):Dl}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},Mn=null,Et=class t extends zr{static get utcInstance(){return Mn===null&&(Mn=new t(0)),Mn}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new t(La(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Gi(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Gi(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return Gi(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},rs=class extends zr{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function br(t,e){if(J(t)||t===null)return e;if(t instanceof zr)return t;if(Jf(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?Ta.instance:r==="utc"||r==="gmt"?Et.utcInstance:Et.parseSpecifier(r)||wr.create(t)}else return Sr(t)?Et.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new rs(t)}var os={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},qo={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Hf=os.hanidec.replace(/[\[|\]]/g,"").split("");function Gf(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){let a=t.charCodeAt(r);if(t[r].search(os.hanidec)!==-1)e+=Hf.indexOf(t[r]);else for(let i in qo){let[n,s]=qo[i];a>=n&&a<=s&&(e+=a-n)}}return parseInt(e,10)}else return e}var is=new Map;function Qf(){is.clear()}function Mt({numberingSystem:t},e=""){let r=t||"latn",a=is.get(r);a===void 0&&(a=new Map,is.set(r,a));let i=a.get(e);return i===void 0&&(i=new RegExp(`${os[r]}${e}`),a.set(e,i)),i}var Ro=()=>Date.now(),ko="system",Wo=null,jo=null,Vo=null,_o=60,zo,Uo=null,Ee=class{static get now(){return Ro}static set now(e){Ro=e}static set defaultZone(e){ko=e}static get defaultZone(){return br(ko,Ta.instance)}static get defaultLocale(){return Wo}static set defaultLocale(e){Wo=e}static get defaultNumberingSystem(){return jo}static set defaultNumberingSystem(e){jo=e}static get defaultOutputCalendar(){return Vo}static set defaultOutputCalendar(e){Vo=e}static get defaultWeekSettings(){return Uo}static set defaultWeekSettings(e){Uo=as(e)}static get twoDigitCutoffYear(){return _o}static set twoDigitCutoffYear(e){_o=e%100}static get throwOnInvalid(){return zo}static set throwOnInvalid(e){zo=e}static resetCaches(){Ce.resetCache(),wr.resetCache(),ie.resetCache(),Qf()}},vt=class{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Nl=[0,31,59,90,120,151,181,212,243,273,304,334],Bl=[0,31,60,91,121,152,182,213,244,274,305,335];function At(t,e){return new vt("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function ls(t,e,r){let a=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&a.setUTCFullYear(a.getUTCFullYear()-1900);let i=a.getUTCDay();return i===0?7:i}function $l(t,e,r){return r+(Zi(t)?Bl:Nl)[e-1]}function Ml(t,e){let r=Zi(t)?Bl:Nl,a=r.findIndex(n=>n<e),i=e-r[a];return{month:a+1,day:i}}function ds(t,e){return(t-e+7)%7+1}function Fa(t,e=4,r=1){let{year:a,month:i,day:n}=t,s=$l(a,i,n),o=ds(ls(a,i,n),r),l=Math.floor((s-o+14-e)/7),d;return l<1?(d=a-1,l=Qi(d,e,r)):l>Qi(a,e,r)?(d=a+1,l=1):d=a,{weekYear:d,weekNumber:l,weekday:o,...Da(t)}}function Ho(t,e=4,r=1){let{weekYear:a,weekNumber:i,weekday:n}=t,s=ds(ls(a,1,e),r),o=fi(a),l=i*7+n-s-7+e,d;l<1?(d=a-1,l+=fi(d)):l>o?(d=a+1,l-=fi(a)):d=a;let{month:c,day:u}=Ml(d,l);return{year:d,month:c,day:u,...Da(t)}}function qn(t){let{year:e,month:r,day:a}=t,i=$l(e,r,a);return{year:e,ordinal:i,...Da(t)}}function Go(t){let{year:e,ordinal:r}=t,{month:a,day:i}=Ml(e,r);return{year:e,month:a,day:i,...Da(t)}}function Qo(t,e){if(!J(t.localWeekday)||!J(t.localWeekNumber)||!J(t.localWeekYear)){if(!J(t.weekday)||!J(t.weekNumber)||!J(t.weekYear))throw new vr("Cannot mix locale-based week fields with ISO-based week fields");return J(t.localWeekday)||(t.weekday=t.localWeekday),J(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),J(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Zf(t,e=4,r=1){let a=Pa(t.weekYear),i=Pt(t.weekNumber,1,Qi(t.weekYear,e,r)),n=Pt(t.weekday,1,7);return a?i?n?!1:At("weekday",t.weekday):At("week",t.weekNumber):At("weekYear",t.weekYear)}function Kf(t){let e=Pa(t.year),r=Pt(t.ordinal,1,fi(t.year));return e?r?!1:At("ordinal",t.ordinal):At("year",t.year)}function ql(t){let e=Pa(t.year),r=Pt(t.month,1,12),a=Pt(t.day,1,Ia(t.year,t.month));return e?r?a?!1:At("day",t.day):At("month",t.month):At("year",t.year)}function Rl(t){let{hour:e,minute:r,second:a,millisecond:i}=t,n=Pt(e,0,23)||e===24&&r===0&&a===0&&i===0,s=Pt(r,0,59),o=Pt(a,0,59),l=Pt(i,0,999);return n?s?o?l?!1:At("millisecond",i):At("second",a):At("minute",r):At("hour",e)}function J(t){return typeof t>"u"}function Sr(t){return typeof t=="number"}function Pa(t){return typeof t=="number"&&t%1===0}function Jf(t){return typeof t=="string"}function Yf(t){return Object.prototype.toString.call(t)==="[object Date]"}function kl(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Wl(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Xf(t){return Array.isArray(t)?t:[t]}function Zo(t,e,r){if(t.length!==0)return t.reduce((a,i)=>{let n=[e(i),i];return a&&r(a[0],n[0])===a[0]?a:n},null)[1]}function eh(t,e){return e.reduce((r,a)=>(r[a]=t[a],r),{})}function yi(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function as(t){if(t==null)return null;if(typeof t!="object")throw new He("Week settings must be an object");if(!Pt(t.firstDay,1,7)||!Pt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Pt(e,1,7)))throw new He("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Pt(t,e,r){return Pa(t)&&t>=e&&t<=r}function th(t,e){return t-e*Math.floor(t/e)}function Ve(t,e=2){let r=t<0,a;return r?a="-"+(""+-t).padStart(e,"0"):a=(""+t).padStart(e,"0"),a}function gr(t){if(!(J(t)||t===null||t===""))return parseInt(t,10)}function jr(t){if(!(J(t)||t===null||t===""))return parseFloat(t)}function cs(t){if(!(J(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function us(t,e,r="round"){let a=10**e;switch(r){case"expand":return t>0?Math.ceil(t*a)/a:Math.floor(t*a)/a;case"trunc":return Math.trunc(t*a)/a;case"round":return Math.round(t*a)/a;case"floor":return Math.floor(t*a)/a;case"ceil":return Math.ceil(t*a)/a;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function Zi(t){return t%4===0&&(t%100!==0||t%400===0)}function fi(t){return Zi(t)?366:365}function Ia(t,e){let r=th(e-1,12)+1,a=t+(e-r)/12;return r===2?Zi(a)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Ea(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Ko(t,e,r){return-ds(ls(t,1,e),r)+e-1}function Qi(t,e=4,r=1){let a=Ko(t,e,r),i=Ko(t+1,e,r);return(fi(t)-a+i)/7}function ns(t){return t>99?t:t>Ee.twoDigitCutoffYear?1900+t:2e3+t}function jl(t,e,r,a=null){let i=new Date(t),n={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(n.timeZone=a);let s={timeZoneName:e,...n},o=new Intl.DateTimeFormat(r,s).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return o?o.value:null}function La(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);let a=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-a:a;return r*60+i}function Vl(t){let e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new He(`Invalid unit value ${t}`);return e}function Oa(t,e){let r={};for(let a in t)if(yi(t,a)){let i=t[a];if(i==null)continue;r[e(a)]=Vl(i)}return r}function Gi(t,e){let r=Math.trunc(Math.abs(t/60)),a=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Ve(r,2)}:${Ve(a,2)}`;case"narrow":return`${i}${r}${a>0?`:${a}`:""}`;case"techie":return`${i}${Ve(r,2)}${Ve(a,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Da(t){return eh(t,["hour","minute","second","millisecond"])}var rh=["January","February","March","April","May","June","July","August","September","October","November","December"],_l=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ih=["J","F","M","A","M","J","J","A","S","O","N","D"];function zl(t){switch(t){case"narrow":return[...ih];case"short":return[..._l];case"long":return[...rh];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ul=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Hl=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ah=["M","T","W","T","F","S","S"];function Gl(t){switch(t){case"narrow":return[...ah];case"short":return[...Hl];case"long":return[...Ul];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Ql=["AM","PM"],nh=["Before Christ","Anno Domini"],sh=["BC","AD"],oh=["B","A"];function Zl(t){switch(t){case"narrow":return[...oh];case"short":return[...sh];case"long":return[...nh];default:return null}}function lh(t){return Ql[t.hour<12?0:1]}function dh(t,e){return Gl(e)[t.weekday-1]}function ch(t,e){return zl(e)[t.month-1]}function uh(t,e){return Zl(e)[t.year<0?0:1]}function ph(t,e,r="always",a=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},n=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&n){let u=t==="days";switch(e){case 1:return u?"tomorrow":`next ${i[t][0]}`;case-1:return u?"yesterday":`last ${i[t][0]}`;case 0:return u?"today":`this ${i[t][0]}`}}let s=Object.is(e,-0)||e<0,o=Math.abs(e),l=o===1,d=i[t],c=a?l?d[1]:d[2]||d[1]:l?i[t][0]:t;return s?`${o} ${c} ago`:`in ${o} ${c}`}function Jo(t,e){let r="";for(let a of t)a.literal?r+=a.val:r+=e(a.val);return r}var fh={D:Ca,DD:pl,DDD:fl,DDDD:hl,t:ml,tt:yl,ttt:gl,tttt:bl,T:vl,TT:Sl,TTT:wl,TTTT:xl,f:Cl,ff:Fl,fff:Ol,ffff:Pl,F:Tl,FF:Il,FFF:Al,FFFF:El},bt=class t{static create(e,r={}){return new t(e,r)}static parseFormat(e){let r=null,a="",i=!1,n=[];for(let s=0;s<e.length;s++){let o=e.charAt(s);o==="'"?((a.length>0||i)&&n.push({literal:i||/^\s+$/.test(a),val:a===""?"'":a}),r=null,a="",i=!i):i||o===r?a+=o:(a.length>0&&n.push({literal:/^\s+$/.test(a),val:a}),a=o,r=o)}return a.length>0&&n.push({literal:i||/^\s+$/.test(a),val:a}),n}static macroTokenToFormatOpts(e){return fh[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0,a=void 0){if(this.opts.forceSimple)return Ve(e,r);let i={...this.opts};return r>0&&(i.padTo=r),a&&(i.signDisplay=a),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,r){let a=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",n=(p,h)=>this.loc.extract(e,p,h),s=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",o=()=>a?lh(e):n({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,h)=>a?ch(e,p):n(h?{month:p}:{month:p,day:"numeric"},"month"),d=(p,h)=>a?dh(e,p):n(h?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),c=p=>{let h=t.macroTokenToFormatOpts(p);return h?this.formatWithSystemDefault(e,h):p},u=p=>a?uh(e,p):n({era:p},"era"),f=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return i?n({day:"numeric"},"day"):this.num(e.day);case"dd":return i?n({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return i?n({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?n({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?n({month:"numeric"},"month"):this.num(e.month);case"MM":return i?n({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?n({year:"numeric"},"year"):this.num(e.year);case"yy":return i?n({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?n({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?n({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(p)}};return Jo(t.parseFormat(r),f)}formatDurationFromString(e,r){let a=this.opts.signMode==="negativeLargestOnly"?-1:1,i=c=>{switch(c[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},n=(c,u)=>f=>{let p=i(f);if(p){let h=u.isNegativeDuration&&p!==u.largestUnit?a:1,m;return this.opts.signMode==="negativeLargestOnly"&&p!==u.largestUnit?m="never":this.opts.signMode==="all"?m="always":m="auto",this.num(c.get(p)*h,f.length,m)}else return f},s=t.parseFormat(r),o=s.reduce((c,{literal:u,val:f})=>u?c:c.concat(f),[]),l=e.shiftTo(...o.map(i).filter(c=>c)),d={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Jo(s,n(l,d))}},Kl=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function gi(...t){let e=t.reduce((r,a)=>r+a.source,"");return RegExp(`^${e}$`)}function bi(...t){return e=>t.reduce(([r,a,i],n)=>{let[s,o,l]=n(e,i);return[{...r,...s},o||a,l]},[{},null,1]).slice(0,2)}function vi(t,...e){if(t==null)return[null,null];for(let[r,a]of e){let i=r.exec(t);if(i)return a(i)}return[null,null]}function Jl(...t){return(e,r)=>{let a={},i;for(i=0;i<t.length;i++)a[t[i]]=gr(e[r+i]);return[a,null,r+i]}}var Yl=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,hh=`(?:${Yl.source}?(?:\\[(${Kl.source})\\])?)?`,ps=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xl=RegExp(`${ps.source}${hh}`),fs=RegExp(`(?:[Tt]${Xl.source})?`),mh=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yh=/(\d{4})-?W(\d\d)(?:-?(\d))?/,gh=/(\d{4})-?(\d{3})/,bh=Jl("weekYear","weekNumber","weekDay"),vh=Jl("year","ordinal"),Sh=/(\d{4})-(\d\d)-(\d\d)/,ed=RegExp(`${ps.source} ?(?:${Yl.source}|(${Kl.source}))?`),wh=RegExp(`(?: ${ed.source})?`);function hi(t,e,r){let a=t[e];return J(a)?r:gr(a)}function xh(t,e){return[{year:hi(t,e),month:hi(t,e+1,1),day:hi(t,e+2,1)},null,e+3]}function Si(t,e){return[{hours:hi(t,e,0),minutes:hi(t,e+1,0),seconds:hi(t,e+2,0),milliseconds:cs(t[e+3])},null,e+4]}function Ki(t,e){let r=!t[e]&&!t[e+1],a=La(t[e+1],t[e+2]),i=r?null:Et.instance(a);return[{},i,e+3]}function Ji(t,e){let r=t[e]?wr.create(t[e]):null;return[{},r,e+1]}var Ch=RegExp(`^T?${ps.source}$`),Th=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Fh(t){let[e,r,a,i,n,s,o,l,d]=t,c=e[0]==="-",u=l&&l[0]==="-",f=(p,h=!1)=>p!==void 0&&(h||p&&c)?-p:p;return[{years:f(jr(r)),months:f(jr(a)),weeks:f(jr(i)),days:f(jr(n)),hours:f(jr(s)),minutes:f(jr(o)),seconds:f(jr(l),l==="-0"),milliseconds:f(cs(d),u)}]}var Ih={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function hs(t,e,r,a,i,n,s){let o={year:e.length===2?ns(gr(e)):gr(e),month:_l.indexOf(r)+1,day:gr(a),hour:gr(i),minute:gr(n)};return s&&(o.second=gr(s)),t&&(o.weekday=t.length>3?Ul.indexOf(t)+1:Hl.indexOf(t)+1),o}var Oh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ah(t){let[,e,r,a,i,n,s,o,l,d,c,u]=t,f=hs(e,i,a,r,n,s,o),p;return l?p=Ih[l]:d?p=0:p=La(c,u),[f,new Et(p)]}function Ph(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var Eh=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Lh=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dh=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Yo(t){let[,e,r,a,i,n,s,o]=t;return[hs(e,i,a,r,n,s,o),Et.utcInstance]}function Nh(t){let[,e,r,a,i,n,s,o]=t;return[hs(e,o,r,a,i,n,s),Et.utcInstance]}var Bh=gi(mh,fs),$h=gi(yh,fs),Mh=gi(gh,fs),qh=gi(Xl),td=bi(xh,Si,Ki,Ji),Rh=bi(bh,Si,Ki,Ji),kh=bi(vh,Si,Ki,Ji),Wh=bi(Si,Ki,Ji);function jh(t){return vi(t,[Bh,td],[$h,Rh],[Mh,kh],[qh,Wh])}function Vh(t){return vi(Ph(t),[Oh,Ah])}function _h(t){return vi(t,[Eh,Yo],[Lh,Yo],[Dh,Nh])}function zh(t){return vi(t,[Th,Fh])}var Uh=bi(Si);function Hh(t){return vi(t,[Ch,Uh])}var Gh=gi(Sh,wh),Qh=gi(ed),Zh=bi(Si,Ki,Ji);function Kh(t){return vi(t,[Gh,td],[Qh,Zh])}var Xo="Invalid Duration",rd={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Jh={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...rd},Ot=146097/400,di=146097/4800,Yh={years:{quarters:4,months:12,weeks:Ot/7,days:Ot,hours:Ot*24,minutes:Ot*24*60,seconds:Ot*24*60*60,milliseconds:Ot*24*60*60*1e3},quarters:{months:3,weeks:Ot/28,days:Ot/4,hours:Ot*24/4,minutes:Ot*24*60/4,seconds:Ot*24*60*60/4,milliseconds:Ot*24*60*60*1e3/4},months:{weeks:di/7,days:di,hours:di*24,minutes:di*24*60,seconds:di*24*60*60,milliseconds:di*24*60*60*1e3},...rd},_r=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Xh=_r.slice(0).reverse();function rr(t,e,r=!1){let a={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Ge(a)}function id(t,e){let r=e.milliseconds??0;for(let a of Xh.slice(1))e[a]&&(r+=e[a]*t[a].milliseconds);return r}function el(t,e){let r=id(t,e)<0?-1:1;_r.reduceRight((a,i)=>{if(J(e[i]))return a;if(a){let n=e[a]*r,s=t[i][a],o=Math.floor(n/s);e[i]+=o*r,e[a]-=o*s*r}return i},null),_r.reduce((a,i)=>{if(J(e[i]))return a;if(a){let n=e[a]%1;e[a]-=n,e[i]+=n*t[a][i]}return i},null)}function tl(t){let e={};for(let[r,a]of Object.entries(t))a!==0&&(e[r]=a);return e}var Ge=class t{constructor(e){let r=e.conversionAccuracy==="longterm"||!1,a=r?Yh:Jh;e.matrix&&(a=e.matrix),this.values=e.values,this.loc=e.loc||Ce.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=a,this.isLuxonDuration=!0}static fromMillis(e,r){return t.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new He(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:Oa(e,t.normalizeUnit),loc:Ce.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(Sr(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new He(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){let[a]=zh(e);return a?t.fromObject(a,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){let[a]=Hh(e);return a?t.fromObject(a,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new He("need to specify a reason the Duration is invalid");let a=e instanceof vt?e:new vt(e,r);if(Ee.throwOnInvalid)throw new Un(a);return new t({invalid:a})}static normalizeUnit(e){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new xa(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){let a={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?bt.create(this.loc,a).formatDurationFromString(this,e):Xo}toHuman(e={}){if(!this.isValid)return Xo;let r=e.showZeros!==!1,a=_r.map(i=>{let n=this.values[i];return J(n)||n===0&&!r?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(n)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(a)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=us(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},ie.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?id(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e),a={};for(let i of _r)(yi(r.values,i)||yi(this.values,i))&&(a[i]=r.get(i)+this.get(i));return rr(this,{values:a},!0)}minus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;let r={};for(let a of Object.keys(this.values))r[a]=Vl(e(this.values[a],a));return rr(this,{values:r},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let r={...this.values,...Oa(e,t.normalizeUnit)};return rr(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:a,matrix:i}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:i,conversionAccuracy:a};return rr(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return el(this.matrix,e),rr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=tl(this.normalize().shiftToAll().toObject());return rr(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let r={},a={},i=this.toObject(),n;for(let s of _r)if(e.indexOf(s)>=0){n=s;let o=0;for(let d in a)o+=this.matrix[d][s]*a[d],a[d]=0;Sr(i[s])&&(o+=i[s]);let l=Math.trunc(o);r[s]=l,a[s]=(o*1e3-l*1e3)/1e3}else Sr(i[s])&&(a[s]=i[s]);for(let s in a)a[s]!==0&&(r[n]+=s===n?a[s]:a[s]/this.matrix[n][s]);return el(this.matrix,r),rr(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return rr(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=tl(this.values);return rr(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(a,i){return a===void 0||a===0?i===void 0||i===0:a===i}for(let a of _r)if(!r(this.values[a],e.values[a]))return!1;return!0}},ci="Invalid Interval";function em(t,e){return!t||!t.isValid?mi.invalid("missing or invalid start"):!e||!e.isValid?mi.invalid("missing or invalid end"):e<t?mi.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var mi=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new He("need to specify a reason the Interval is invalid");let a=e instanceof vt?e:new vt(e,r);if(Ee.throwOnInvalid)throw new zn(a);return new t({invalid:a})}static fromDateTimes(e,r){let a=_i(e),i=_i(r),n=em(a,i);return n??new t({start:a,end:i})}static after(e,r){let a=Ge.fromDurationLike(r),i=_i(e);return t.fromDateTimes(i,i.plus(a))}static before(e,r){let a=Ge.fromDurationLike(r),i=_i(e);return t.fromDateTimes(i.minus(a),i)}static fromISO(e,r){let[a,i]=(e||"").split("/",2);if(a&&i){let n,s;try{n=ie.fromISO(a,r),s=n.isValid}catch{s=!1}let o,l;try{o=ie.fromISO(i,r),l=o.isValid}catch{l=!1}if(s&&l)return t.fromDateTimes(n,o);if(s){let d=Ge.fromISO(i,r);if(d.isValid)return t.after(n,d)}else if(l){let d=Ge.fromISO(a,r);if(d.isValid)return t.before(o,d)}}return t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",r){if(!this.isValid)return NaN;let a=this.start.startOf(e,r),i;return r?.useLocaleWeeks?i=this.end.reconfigure({locale:a.locale}):i=this.end,i=i.startOf(e,r),Math.floor(i.diff(a,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?t.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];let r=e.map(_i).filter(s=>this.contains(s)).sort((s,o)=>s.toMillis()-o.toMillis()),a=[],{s:i}=this,n=0;for(;i<this.e;){let s=r[n]||this.e,o=+s>+this.e?this.e:s;a.push(t.fromDateTimes(i,o)),i=o,n+=1}return a}splitBy(e){let r=Ge.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:a}=this,i=1,n,s=[];for(;a<this.e;){let o=this.start.plus(r.mapUnits(l=>l*i));n=+o>+this.e?this.e:o,s.push(t.fromDateTimes(a,n)),a=n,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let r=this.s>e.s?this.s:e.s,a=this.e<e.e?this.e:e.e;return r>=a?null:t.fromDateTimes(r,a)}union(e){if(!this.isValid)return this;let r=this.s<e.s?this.s:e.s,a=this.e>e.e?this.e:e.e;return t.fromDateTimes(r,a)}static merge(e){let[r,a]=e.sort((i,n)=>i.s-n.s).reduce(([i,n],s)=>n?n.overlaps(s)||n.abutsStart(s)?[i,n.union(s)]:[i.concat([n]),s]:[i,s],[[],null]);return a&&r.push(a),r}static xor(e){let r=null,a=0,i=[],n=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),s=Array.prototype.concat(...n),o=s.sort((l,d)=>l.time-d.time);for(let l of o)a+=l.type==="s"?1:-1,a===1?r=l.time:(r&&+r!=+l.time&&i.push(t.fromDateTimes(r,l.time)),r=null);return t.merge(i)}difference(...e){return t.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:ci}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ca,r={}){return this.isValid?bt.create(this.s.loc.clone(r),e).formatInterval(this):ci}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:ci}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ci}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:ci}toFormat(e,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:ci}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):Ge.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},pi=class{static hasDST(e=Ee.defaultZone){let r=ie.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return wr.isValidZone(e)}static normalizeZone(e){return br(e,Ee.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||Ce.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||Ce.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||Ce.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Ce.create(r,a,n)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Ce.create(r,a,n)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null}={}){return(i||Ce.create(r,a,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null}={}){return(i||Ce.create(r,a,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Ce.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return Ce.create(r,null,"gregory").eras(e)}static features(){return{relative:kl(),localeWeek:Wl()}}};function rl(t,e){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),a=r(e)-r(t);return Math.floor(Ge.fromMillis(a).as("days"))}function tm(t,e,r){let a=[["years",(l,d)=>d.year-l.year],["quarters",(l,d)=>d.quarter-l.quarter+(d.year-l.year)*4],["months",(l,d)=>d.month-l.month+(d.year-l.year)*12],["weeks",(l,d)=>{let c=rl(l,d);return(c-c%7)/7}],["days",rl]],i={},n=t,s,o;for(let[l,d]of a)r.indexOf(l)>=0&&(s=l,i[l]=d(t,e),o=n.plus(i),o>e?(i[l]--,t=n.plus(i),t>e&&(o=t,i[l]--,t=n.plus(i))):t=o);return[t,i,o,s]}function rm(t,e,r,a){let[i,n,s,o]=tm(t,e,r),l=e-i,d=r.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(s<e&&(s=i.plus({[o]:1})),s!==i&&(n[o]=(n[o]||0)+l/(s-i)));let c=Ge.fromObject(n,a);return d.length>0?Ge.fromMillis(l,a).shiftTo(...d).plus(c):c}var im="missing Intl.DateTimeFormat.formatToParts support";function me(t,e=r=>r){return{regex:t,deser:([r])=>e(Gf(r))}}var am="\xA0",ad=`[ ${am}]`,nd=new RegExp(ad,"g");function nm(t){return t.replace(/\./g,"\\.?").replace(nd,ad)}function il(t){return t.replace(/\./g,"").replace(nd," ").toLowerCase()}function qt(t,e){return t===null?null:{regex:RegExp(t.map(nm).join("|")),deser:([r])=>t.findIndex(a=>il(r)===il(a))+e}}function al(t,e){return{regex:t,deser:([,r,a])=>La(r,a),groups:e}}function ya(t){return{regex:t,deser:([e])=>e}}function sm(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function om(t,e){let r=Mt(e),a=Mt(e,"{2}"),i=Mt(e,"{3}"),n=Mt(e,"{4}"),s=Mt(e,"{6}"),o=Mt(e,"{1,2}"),l=Mt(e,"{1,3}"),d=Mt(e,"{1,6}"),c=Mt(e,"{1,9}"),u=Mt(e,"{2,4}"),f=Mt(e,"{4,6}"),p=y=>({regex:RegExp(sm(y.val)),deser:([b])=>b,literal:!0}),m=(y=>{if(t.literal)return p(y);switch(y.val){case"G":return qt(e.eras("short"),0);case"GG":return qt(e.eras("long"),0);case"y":return me(d);case"yy":return me(u,ns);case"yyyy":return me(n);case"yyyyy":return me(f);case"yyyyyy":return me(s);case"M":return me(o);case"MM":return me(a);case"MMM":return qt(e.months("short",!0),1);case"MMMM":return qt(e.months("long",!0),1);case"L":return me(o);case"LL":return me(a);case"LLL":return qt(e.months("short",!1),1);case"LLLL":return qt(e.months("long",!1),1);case"d":return me(o);case"dd":return me(a);case"o":return me(l);case"ooo":return me(i);case"HH":return me(a);case"H":return me(o);case"hh":return me(a);case"h":return me(o);case"mm":return me(a);case"m":return me(o);case"q":return me(o);case"qq":return me(a);case"s":return me(o);case"ss":return me(a);case"S":return me(l);case"SSS":return me(i);case"u":return ya(c);case"uu":return ya(o);case"uuu":return me(r);case"a":return qt(e.meridiems(),0);case"kkkk":return me(n);case"kk":return me(u,ns);case"W":return me(o);case"WW":return me(a);case"E":case"c":return me(r);case"EEE":return qt(e.weekdays("short",!1),1);case"EEEE":return qt(e.weekdays("long",!1),1);case"ccc":return qt(e.weekdays("short",!0),1);case"cccc":return qt(e.weekdays("long",!0),1);case"Z":case"ZZ":return al(new RegExp(`([+-]${o.source})(?::(${a.source}))?`),2);case"ZZZ":return al(new RegExp(`([+-]${o.source})(${a.source})?`),2);case"z":return ya(/[a-z_+-/]{1,256}?/i);case" ":return ya(/[^\S\n\r]/);default:return p(y)}})(t)||{invalidReason:im};return m.token=t,m}var lm={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function dm(t,e,r){let{type:a,value:i}=t;if(a==="literal"){let l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}let n=e[a],s=a;a==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let o=lm[s];if(typeof o=="object"&&(o=o[n]),o)return{literal:!1,val:o}}function cm(t){return[`^${t.map(r=>r.regex).reduce((r,a)=>`${r}(${a.source})`,"")}$`,t]}function um(t,e,r){let a=t.match(e);if(a){let i={},n=1;for(let s in r)if(yi(r,s)){let o=r[s],l=o.groups?o.groups+1:1;!o.literal&&o.token&&(i[o.token.val[0]]=o.deser(a.slice(n,n+l))),n+=l}return[a,i]}else return[a,{}]}function pm(t){let e=n=>{switch(n){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,a;return J(t.z)||(r=wr.create(t.z)),J(t.Z)||(r||(r=new Et(t.Z)),a=t.Z),J(t.q)||(t.M=(t.q-1)*3+1),J(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),J(t.u)||(t.S=cs(t.u)),[Object.keys(t).reduce((n,s)=>{let o=e(s);return o&&(n[o]=t[s]),n},{}),r,a]}var Rn=null;function fm(){return Rn||(Rn=ie.fromMillis(1555555555555)),Rn}function hm(t,e){if(t.literal)return t;let r=bt.macroTokenToFormatOpts(t.val),a=ld(r,e);return a==null||a.includes(void 0)?t:a}function sd(t,e){return Array.prototype.concat(...t.map(r=>hm(r,e)))}var Aa=class{constructor(e,r){if(this.locale=e,this.format=r,this.tokens=sd(bt.parseFormat(r),e),this.units=this.tokens.map(a=>om(a,e)),this.disqualifyingUnit=this.units.find(a=>a.invalidReason),!this.disqualifyingUnit){let[a,i]=cm(this.units);this.regex=RegExp(a,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[r,a]=um(e,this.regex,this.handlers),[i,n,s]=a?pm(a):[null,null,void 0];if(yi(a,"a")&&yi(a,"H"))throw new vr("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:a,result:i,zone:n,specificOffset:s}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function od(t,e,r){return new Aa(t,r).explainFromTokens(e)}function mm(t,e,r){let{result:a,zone:i,specificOffset:n,invalidReason:s}=od(t,e,r);return[a,i,n,s]}function ld(t,e){if(!t)return null;let a=bt.create(e,t).dtFormatter(fm()),i=a.formatToParts(),n=a.resolvedOptions();return i.map(s=>dm(s,t,n))}var kn="Invalid DateTime",nl=864e13;function Ui(t){return new vt("unsupported zone",`the zone "${t.name}" is not supported`)}function Wn(t){return t.weekData===null&&(t.weekData=Fa(t.c)),t.weekData}function jn(t){return t.localWeekData===null&&(t.localWeekData=Fa(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Vr(t,e){let r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new ie({...r,...e,old:r})}function dd(t,e,r){let a=t-e*60*1e3,i=r.offset(a);if(e===i)return[a,e];a-=(i-e)*60*1e3;let n=r.offset(a);return i===n?[a,i]:[t-Math.min(i,n)*60*1e3,Math.max(i,n)]}function ga(t,e){t+=e*60*1e3;let r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function va(t,e,r){return dd(Ea(t),e,r)}function sl(t,e){let r=t.o,a=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,n={...t.c,year:a,month:i,day:Math.min(t.c.day,Ia(a,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=Ge.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Ea(n),[l,d]=dd(o,r,t.zone);return s!==0&&(l+=s,d=t.zone.offset(l)),{ts:l,o:d}}function ui(t,e,r,a,i,n){let{setZone:s,zone:o}=r;if(t&&Object.keys(t).length!==0||e){let l=e||o,d=ie.fromObject(t,{...r,zone:l,specificOffset:n});return s?d:d.setZone(o)}else return ie.invalid(new vt("unparsable",`the input "${i}" can't be parsed as ${a}`))}function ba(t,e,r=!0){return t.isValid?bt.create(Ce.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Vn(t,e,r){let a=t.c.year>9999||t.c.year<0,i="";if(a&&t.c.year>=0&&(i+="+"),i+=Ve(t.c.year,a?6:4),r==="year")return i;if(e){if(i+="-",i+=Ve(t.c.month),r==="month")return i;i+="-"}else if(i+=Ve(t.c.month),r==="month")return i;return i+=Ve(t.c.day),i}function ol(t,e,r,a,i,n,s){let o=!r||t.c.millisecond!==0||t.c.second!==0,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=Ve(t.c.hour),s==="hour")break;if(e){if(l+=":",l+=Ve(t.c.minute),s==="minute")break;o&&(l+=":",l+=Ve(t.c.second))}else{if(l+=Ve(t.c.minute),s==="minute")break;o&&(l+=Ve(t.c.second))}if(s==="second")break;o&&(!a||t.c.millisecond!==0)&&(l+=".",l+=Ve(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!n?l+="Z":t.o<0?(l+="-",l+=Ve(Math.trunc(-t.o/60)),l+=":",l+=Ve(Math.trunc(-t.o%60))):(l+="+",l+=Ve(Math.trunc(t.o/60)),l+=":",l+=Ve(Math.trunc(t.o%60)))),n&&(l+="["+t.zone.ianaName+"]"),l}var cd={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ym={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gm={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Sa=["year","month","day","hour","minute","second","millisecond"],bm=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],vm=["year","ordinal","hour","minute","second","millisecond"];function wa(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new xa(t);return e}function ll(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return wa(t)}}function Sm(t){if(Hi===void 0&&(Hi=Ee.now()),t.type!=="iana")return t.offset(Hi);let e=t.name,r=ss.get(e);return r===void 0&&(r=t.offset(Hi),ss.set(e,r)),r}function dl(t,e){let r=br(e.zone,Ee.defaultZone);if(!r.isValid)return ie.invalid(Ui(r));let a=Ce.fromObject(e),i,n;if(J(t.year))i=Ee.now();else{for(let l of Sa)J(t[l])&&(t[l]=cd[l]);let s=ql(t)||Rl(t);if(s)return ie.invalid(s);let o=Sm(r);[i,n]=va(t,o,r)}return new ie({ts:i,zone:r,loc:a,o:n})}function cl(t,e,r){let a=J(r.round)?!0:r.round,i=J(r.rounding)?"trunc":r.rounding,n=(o,l)=>(o=us(o,a||r.calendary?0:2,r.calendary?"round":i),e.loc.clone(r).relFormatter(r).format(o,l)),s=o=>r.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(r.unit)return n(s(r.unit),r.unit);for(let o of r.units){let l=s(o);if(Math.abs(l)>=1)return n(l,o)}return n(t>e?-0:0,r.units[r.units.length-1])}function ul(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var Hi,ss=new Map,ie=class t{constructor(e){let r=e.zone||Ee.defaultZone,a=e.invalid||(Number.isNaN(e.ts)?new vt("invalid input"):null)||(r.isValid?null:Ui(r));this.ts=J(e.ts)?Ee.now():e.ts;let i=null,n=null;if(!a)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[i,n]=[e.old.c,e.old.o];else{let o=Sr(e.o)&&!e.old?e.o:r.offset(this.ts);i=ga(this.ts,o),a=Number.isNaN(i.year)?new vt("invalid input"):null,i=a?null:i,n=a?null:o}this._zone=r,this.loc=e.loc||Ce.create(),this.invalid=a,this.weekData=null,this.localWeekData=null,this.c=i,this.o=n,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,r]=ul(arguments),[a,i,n,s,o,l,d]=r;return dl({year:a,month:i,day:n,hour:s,minute:o,second:l,millisecond:d},e)}static utc(){let[e,r]=ul(arguments),[a,i,n,s,o,l,d]=r;return e.zone=Et.utcInstance,dl({year:a,month:i,day:n,hour:s,minute:o,second:l,millisecond:d},e)}static fromJSDate(e,r={}){let a=Yf(e)?e.valueOf():NaN;if(Number.isNaN(a))return t.invalid("invalid input");let i=br(r.zone,Ee.defaultZone);return i.isValid?new t({ts:a,zone:i,loc:Ce.fromObject(r)}):t.invalid(Ui(i))}static fromMillis(e,r={}){if(Sr(e))return e<-nl||e>nl?t.invalid("Timestamp out of range"):new t({ts:e,zone:br(r.zone,Ee.defaultZone),loc:Ce.fromObject(r)});throw new He(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(Sr(e))return new t({ts:e*1e3,zone:br(r.zone,Ee.defaultZone),loc:Ce.fromObject(r)});throw new He("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};let a=br(r.zone,Ee.defaultZone);if(!a.isValid)return t.invalid(Ui(a));let i=Ce.fromObject(r),n=Oa(e,ll),{minDaysInFirstWeek:s,startOfWeek:o}=Qo(n,i),l=Ee.now(),d=J(r.specificOffset)?a.offset(l):r.specificOffset,c=!J(n.ordinal),u=!J(n.year),f=!J(n.month)||!J(n.day),p=u||f,h=n.weekYear||n.weekNumber;if((p||c)&&h)throw new vr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&c)throw new vr("Can't mix ordinal dates with month/day");let m=h||n.weekday&&!p,y,b,v=ga(l,d);m?(y=bm,b=ym,v=Fa(v,s,o)):c?(y=vm,b=gm,v=qn(v)):(y=Sa,b=cd);let S=!1;for(let B of y){let R=n[B];J(R)?S?n[B]=b[B]:n[B]=v[B]:S=!0}let C=m?Zf(n,s,o):c?Kf(n):ql(n),F=C||Rl(n);if(F)return t.invalid(F);let I=m?Ho(n,s,o):c?Go(n):n,[N,P]=va(I,d,a),E=new t({ts:N,zone:a,o:P,loc:i});return n.weekday&&p&&e.weekday!==E.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${n.weekday} and a date of ${E.toISO()}`):E.isValid?E:t.invalid(E.invalid)}static fromISO(e,r={}){let[a,i]=jh(e);return ui(a,i,r,"ISO 8601",e)}static fromRFC2822(e,r={}){let[a,i]=Vh(e);return ui(a,i,r,"RFC 2822",e)}static fromHTTP(e,r={}){let[a,i]=_h(e);return ui(a,i,r,"HTTP",r)}static fromFormat(e,r,a={}){if(J(e)||J(r))throw new He("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:n=null}=a,s=Ce.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0}),[o,l,d,c]=mm(s,e,r);return c?t.invalid(c):ui(o,l,a,`format ${r}`,e,d)}static fromString(e,r,a={}){return t.fromFormat(e,r,a)}static fromSQL(e,r={}){let[a,i]=Kh(e);return ui(a,i,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new He("need to specify a reason the DateTime is invalid");let a=e instanceof vt?e:new vt(e,r);if(Ee.throwOnInvalid)throw new _n(a);return new t({invalid:a})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){let a=ld(e,Ce.fromObject(r));return a?a.map(i=>i?i.val:null).join(""):null}static expandFormat(e,r={}){return sd(bt.parseFormat(e),Ce.fromObject(r)).map(i=>i.val).join("")}static resetCache(){Hi=void 0,ss.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wn(this).weekYear:NaN}get weekNumber(){return this.isValid?Wn(this).weekNumber:NaN}get weekday(){return this.isValid?Wn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?jn(this).weekday:NaN}get localWeekNumber(){return this.isValid?jn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?jn(this).weekYear:NaN}get ordinal(){return this.isValid?qn(this.c).ordinal:NaN}get monthShort(){return this.isValid?pi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?pi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?pi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?pi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,r=6e4,a=Ea(this.c),i=this.zone.offset(a-e),n=this.zone.offset(a+e),s=this.zone.offset(a-i*r),o=this.zone.offset(a-n*r);if(s===o)return[this];let l=a-s*r,d=a-o*r,c=ga(l,s),u=ga(d,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Vr(this,{ts:l}),Vr(this,{ts:d})]:[this]}get isInLeapYear(){return Zi(this.year)}get daysInMonth(){return Ia(this.year,this.month)}get daysInYear(){return this.isValid?fi(this.year):NaN}get weeksInWeekYear(){return this.isValid?Qi(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Qi(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:r,numberingSystem:a,calendar:i}=bt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:a,outputCalendar:i}}toUTC(e=0,r={}){return this.setZone(Et.instance(e),r)}toLocal(){return this.setZone(Ee.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:a=!1}={}){if(e=br(e,Ee.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(r||a){let n=e.offset(this.ts),s=this.toObject();[i]=va(s,n,e)}return Vr(this,{ts:i,zone:e})}else return t.invalid(Ui(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:a}={}){let i=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:a});return Vr(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let r=Oa(e,ll),{minDaysInFirstWeek:a,startOfWeek:i}=Qo(r,this.loc),n=!J(r.weekYear)||!J(r.weekNumber)||!J(r.weekday),s=!J(r.ordinal),o=!J(r.year),l=!J(r.month)||!J(r.day),d=o||l,c=r.weekYear||r.weekNumber;if((d||s)&&c)throw new vr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new vr("Can't mix ordinal dates with month/day");let u;n?u=Ho({...Fa(this.c,a,i),...r},a,i):J(r.ordinal)?(u={...this.toObject(),...r},J(r.day)&&(u.day=Math.min(Ia(u.year,u.month),u.day))):u=Go({...qn(this.c),...r});let[f,p]=va(u,this.o,this.zone);return Vr(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let r=Ge.fromDurationLike(e);return Vr(this,sl(this,r))}minus(e){if(!this.isValid)return this;let r=Ge.fromDurationLike(e).negate();return Vr(this,sl(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let a={},i=Ge.normalizeUnit(e);switch(i){case"years":a.month=1;case"quarters":case"months":a.day=1;case"weeks":case"days":a.hour=0;case"hours":a.minute=0;case"minutes":a.second=0;case"seconds":a.millisecond=0;break}if(i==="weeks")if(r){let n=this.loc.getStartOfWeek(),{weekday:s}=this;s<n&&(a.weekNumber=this.weekNumber-1),a.weekday=n}else a.weekday=1;if(i==="quarters"){let n=Math.ceil(this.month/3);a.month=(n-1)*3+1}return this.set(a)}endOf(e,r){return this.isValid?this.plus({[e]:1}).startOf(e,r).minus(1):this}toFormat(e,r={}){return this.isValid?bt.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,e):kn}toLocaleString(e=Ca,r={}){return this.isValid?bt.create(this.loc.clone(r),e).formatDateTime(this):kn}toLocaleParts(e={}){return this.isValid?bt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:r=!1,suppressMilliseconds:a=!1,includeOffset:i=!0,extendedZone:n=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=wa(s);let o=e==="extended",l=Vn(this,o,s);return Sa.indexOf(s)>=3&&(l+="T"),l+=ol(this,o,r,a,i,n,s),l}toISODate({format:e="extended",precision:r="day"}={}){return this.isValid?Vn(this,e==="extended",wa(r)):null}toISOWeekDate(){return ba(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:r=!1,includeOffset:a=!0,includePrefix:i=!1,extendedZone:n=!1,format:s="extended",precision:o="milliseconds"}={}){return this.isValid?(o=wa(o),(i&&Sa.indexOf(o)>=3?"T":"")+ol(this,s==="extended",r,e,a,n,o)):null}toRFC2822(){return ba(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ba(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Vn(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:r=!1,includeOffsetSpace:a=!0}={}){let i="HH:mm:ss.SSS";return(r||e)&&(a&&(i+=" "),r?i+="z":e&&(i+="ZZ")),ba(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():kn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let r={...this.c};return e.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,r="milliseconds",a={}){if(!this.isValid||!e.isValid)return Ge.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...a},n=Xf(r).map(Ge.normalizeUnit),s=e.valueOf()>this.valueOf(),o=s?this:e,l=s?e:this,d=rm(o,l,n,i);return s?d.negate():d}diffNow(e="milliseconds",r={}){return this.diff(t.now(),e,r)}until(e){return this.isValid?mi.fromDateTimes(this,e):this}hasSame(e,r,a){if(!this.isValid)return!1;let i=e.valueOf(),n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(r,a)<=i&&i<=n.endOf(r,a)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let r=e.base||t.fromObject({},{zone:this.zone}),a=e.padding?this<r?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],n=e.unit;return Array.isArray(e.unit)&&(i=e.unit,n=void 0),cl(r,this.plus(a),{...e,numeric:"always",units:i,unit:n})}toRelativeCalendar(e={}){return this.isValid?cl(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new He("min requires all arguments be DateTimes");return Zo(e,r=>r.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new He("max requires all arguments be DateTimes");return Zo(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,a={}){let{locale:i=null,numberingSystem:n=null}=a,s=Ce.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0});return od(s,e,r)}static fromStringExplain(e,r,a={}){return t.fromFormatExplain(e,r,a)}static buildFormatParser(e,r={}){let{locale:a=null,numberingSystem:i=null}=r,n=Ce.fromOpts({locale:a,numberingSystem:i,defaultToEN:!0});return new Aa(n,e)}static fromFormatParser(e,r,a={}){if(J(e)||J(r))throw new He("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:n=null}=a,s=Ce.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0});if(!s.equals(r.locale))throw new He(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:o,zone:l,specificOffset:d,invalidReason:c}=r.explainFromTokens(e);return c?t.invalid(c):ui(o,l,a,`format ${r.format}`,e,d)}static get DATE_SHORT(){return Ca}static get DATE_MED(){return pl}static get DATE_MED_WITH_WEEKDAY(){return Ef}static get DATE_FULL(){return fl}static get DATE_HUGE(){return hl}static get TIME_SIMPLE(){return ml}static get TIME_WITH_SECONDS(){return yl}static get TIME_WITH_SHORT_OFFSET(){return gl}static get TIME_WITH_LONG_OFFSET(){return bl}static get TIME_24_SIMPLE(){return vl}static get TIME_24_WITH_SECONDS(){return Sl}static get TIME_24_WITH_SHORT_OFFSET(){return wl}static get TIME_24_WITH_LONG_OFFSET(){return xl}static get DATETIME_SHORT(){return Cl}static get DATETIME_SHORT_WITH_SECONDS(){return Tl}static get DATETIME_MED(){return Fl}static get DATETIME_MED_WITH_SECONDS(){return Il}static get DATETIME_MED_WITH_WEEKDAY(){return Lf}static get DATETIME_FULL(){return Ol}static get DATETIME_FULL_WITH_SECONDS(){return Al}static get DATETIME_HUGE(){return Pl}static get DATETIME_HUGE_WITH_SECONDS(){return El}};function _i(t){if(ie.isDateTime(t))return t;if(t&&t.valueOf&&Sr(t.valueOf()))return ie.fromJSDate(t);if(t&&typeof t=="object")return ie.fromObject(t);throw new He(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var qa=function(){return qa=Object.assign||function(e){for(var r,a=1,i=arguments.length;a<i;a++){r=arguments[a];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qa.apply(this,arguments)},ms={exports:{}},Be={},ys={exports:{}},Ur={};function md(){var t={};return t["align-content"]=!1,t["align-items"]=!1,t["align-self"]=!1,t["alignment-adjust"]=!1,t["alignment-baseline"]=!1,t.all=!1,t["anchor-point"]=!1,t.animation=!1,t["animation-delay"]=!1,t["animation-direction"]=!1,t["animation-duration"]=!1,t["animation-fill-mode"]=!1,t["animation-iteration-count"]=!1,t["animation-name"]=!1,t["animation-play-state"]=!1,t["animation-timing-function"]=!1,t.azimuth=!1,t["backface-visibility"]=!1,t.background=!0,t["background-attachment"]=!0,t["background-clip"]=!0,t["background-color"]=!0,t["background-image"]=!0,t["background-origin"]=!0,t["background-position"]=!0,t["background-repeat"]=!0,t["background-size"]=!0,t["baseline-shift"]=!1,t.binding=!1,t.bleed=!1,t["bookmark-label"]=!1,t["bookmark-level"]=!1,t["bookmark-state"]=!1,t.border=!0,t["border-bottom"]=!0,t["border-bottom-color"]=!0,t["border-bottom-left-radius"]=!0,t["border-bottom-right-radius"]=!0,t["border-bottom-style"]=!0,t["border-bottom-width"]=!0,t["border-collapse"]=!0,t["border-color"]=!0,t["border-image"]=!0,t["border-image-outset"]=!0,t["border-image-repeat"]=!0,t["border-image-slice"]=!0,t["border-image-source"]=!0,t["border-image-width"]=!0,t["border-left"]=!0,t["border-left-color"]=!0,t["border-left-style"]=!0,t["border-left-width"]=!0,t["border-radius"]=!0,t["border-right"]=!0,t["border-right-color"]=!0,t["border-right-style"]=!0,t["border-right-width"]=!0,t["border-spacing"]=!0,t["border-style"]=!0,t["border-top"]=!0,t["border-top-color"]=!0,t["border-top-left-radius"]=!0,t["border-top-right-radius"]=!0,t["border-top-style"]=!0,t["border-top-width"]=!0,t["border-width"]=!0,t.bottom=!1,t["box-decoration-break"]=!0,t["box-shadow"]=!0,t["box-sizing"]=!0,t["box-snap"]=!0,t["box-suppress"]=!0,t["break-after"]=!0,t["break-before"]=!0,t["break-inside"]=!0,t["caption-side"]=!1,t.chains=!1,t.clear=!0,t.clip=!1,t["clip-path"]=!1,t["clip-rule"]=!1,t.color=!0,t["color-interpolation-filters"]=!0,t["column-count"]=!1,t["column-fill"]=!1,t["column-gap"]=!1,t["column-rule"]=!1,t["column-rule-color"]=!1,t["column-rule-style"]=!1,t["column-rule-width"]=!1,t["column-span"]=!1,t["column-width"]=!1,t.columns=!1,t.contain=!1,t.content=!1,t["counter-increment"]=!1,t["counter-reset"]=!1,t["counter-set"]=!1,t.crop=!1,t.cue=!1,t["cue-after"]=!1,t["cue-before"]=!1,t.cursor=!1,t.direction=!1,t.display=!0,t["display-inside"]=!0,t["display-list"]=!0,t["display-outside"]=!0,t["dominant-baseline"]=!1,t.elevation=!1,t["empty-cells"]=!1,t.filter=!1,t.flex=!1,t["flex-basis"]=!1,t["flex-direction"]=!1,t["flex-flow"]=!1,t["flex-grow"]=!1,t["flex-shrink"]=!1,t["flex-wrap"]=!1,t.float=!1,t["float-offset"]=!1,t["flood-color"]=!1,t["flood-opacity"]=!1,t["flow-from"]=!1,t["flow-into"]=!1,t.font=!0,t["font-family"]=!0,t["font-feature-settings"]=!0,t["font-kerning"]=!0,t["font-language-override"]=!0,t["font-size"]=!0,t["font-size-adjust"]=!0,t["font-stretch"]=!0,t["font-style"]=!0,t["font-synthesis"]=!0,t["font-variant"]=!0,t["font-variant-alternates"]=!0,t["font-variant-caps"]=!0,t["font-variant-east-asian"]=!0,t["font-variant-ligatures"]=!0,t["font-variant-numeric"]=!0,t["font-variant-position"]=!0,t["font-weight"]=!0,t.grid=!1,t["grid-area"]=!1,t["grid-auto-columns"]=!1,t["grid-auto-flow"]=!1,t["grid-auto-rows"]=!1,t["grid-column"]=!1,t["grid-column-end"]=!1,t["grid-column-start"]=!1,t["grid-row"]=!1,t["grid-row-end"]=!1,t["grid-row-start"]=!1,t["grid-template"]=!1,t["grid-template-areas"]=!1,t["grid-template-columns"]=!1,t["grid-template-rows"]=!1,t["hanging-punctuation"]=!1,t.height=!0,t.hyphens=!1,t.icon=!1,t["image-orientation"]=!1,t["image-resolution"]=!1,t["ime-mode"]=!1,t["initial-letters"]=!1,t["inline-box-align"]=!1,t["justify-content"]=!1,t["justify-items"]=!1,t["justify-self"]=!1,t.left=!1,t["letter-spacing"]=!0,t["lighting-color"]=!0,t["line-box-contain"]=!1,t["line-break"]=!1,t["line-grid"]=!1,t["line-height"]=!1,t["line-snap"]=!1,t["line-stacking"]=!1,t["line-stacking-ruby"]=!1,t["line-stacking-shift"]=!1,t["line-stacking-strategy"]=!1,t["list-style"]=!0,t["list-style-image"]=!0,t["list-style-position"]=!0,t["list-style-type"]=!0,t.margin=!0,t["margin-bottom"]=!0,t["margin-left"]=!0,t["margin-right"]=!0,t["margin-top"]=!0,t["marker-offset"]=!1,t["marker-side"]=!1,t.marks=!1,t.mask=!1,t["mask-box"]=!1,t["mask-box-outset"]=!1,t["mask-box-repeat"]=!1,t["mask-box-slice"]=!1,t["mask-box-source"]=!1,t["mask-box-width"]=!1,t["mask-clip"]=!1,t["mask-image"]=!1,t["mask-origin"]=!1,t["mask-position"]=!1,t["mask-repeat"]=!1,t["mask-size"]=!1,t["mask-source-type"]=!1,t["mask-type"]=!1,t["max-height"]=!0,t["max-lines"]=!1,t["max-width"]=!0,t["min-height"]=!0,t["min-width"]=!0,t["move-to"]=!1,t["nav-down"]=!1,t["nav-index"]=!1,t["nav-left"]=!1,t["nav-right"]=!1,t["nav-up"]=!1,t["object-fit"]=!1,t["object-position"]=!1,t.opacity=!1,t.order=!1,t.orphans=!1,t.outline=!1,t["outline-color"]=!1,t["outline-offset"]=!1,t["outline-style"]=!1,t["outline-width"]=!1,t.overflow=!1,t["overflow-wrap"]=!1,t["overflow-x"]=!1,t["overflow-y"]=!1,t.padding=!0,t["padding-bottom"]=!0,t["padding-left"]=!0,t["padding-right"]=!0,t["padding-top"]=!0,t.page=!1,t["page-break-after"]=!1,t["page-break-before"]=!1,t["page-break-inside"]=!1,t["page-policy"]=!1,t.pause=!1,t["pause-after"]=!1,t["pause-before"]=!1,t.perspective=!1,t["perspective-origin"]=!1,t.pitch=!1,t["pitch-range"]=!1,t["play-during"]=!1,t.position=!1,t["presentation-level"]=!1,t.quotes=!1,t["region-fragment"]=!1,t.resize=!1,t.rest=!1,t["rest-after"]=!1,t["rest-before"]=!1,t.richness=!1,t.right=!1,t.rotation=!1,t["rotation-point"]=!1,t["ruby-align"]=!1,t["ruby-merge"]=!1,t["ruby-position"]=!1,t["shape-image-threshold"]=!1,t["shape-outside"]=!1,t["shape-margin"]=!1,t.size=!1,t.speak=!1,t["speak-as"]=!1,t["speak-header"]=!1,t["speak-numeral"]=!1,t["speak-punctuation"]=!1,t["speech-rate"]=!1,t.stress=!1,t["string-set"]=!1,t["tab-size"]=!1,t["table-layout"]=!1,t["text-align"]=!0,t["text-align-last"]=!0,t["text-combine-upright"]=!0,t["text-decoration"]=!0,t["text-decoration-color"]=!0,t["text-decoration-line"]=!0,t["text-decoration-skip"]=!0,t["text-decoration-style"]=!0,t["text-emphasis"]=!0,t["text-emphasis-color"]=!0,t["text-emphasis-position"]=!0,t["text-emphasis-style"]=!0,t["text-height"]=!0,t["text-indent"]=!0,t["text-justify"]=!0,t["text-orientation"]=!0,t["text-overflow"]=!0,t["text-shadow"]=!0,t["text-space-collapse"]=!0,t["text-transform"]=!0,t["text-underline-position"]=!0,t["text-wrap"]=!0,t.top=!1,t.transform=!1,t["transform-origin"]=!1,t["transform-style"]=!1,t.transition=!1,t["transition-delay"]=!1,t["transition-duration"]=!1,t["transition-property"]=!1,t["transition-timing-function"]=!1,t["unicode-bidi"]=!1,t["vertical-align"]=!1,t.visibility=!1,t["voice-balance"]=!1,t["voice-duration"]=!1,t["voice-family"]=!1,t["voice-pitch"]=!1,t["voice-range"]=!1,t["voice-rate"]=!1,t["voice-stress"]=!1,t["voice-volume"]=!1,t.volume=!1,t["white-space"]=!1,t.widows=!1,t.width=!0,t["will-change"]=!1,t["word-break"]=!0,t["word-spacing"]=!0,t["word-wrap"]=!0,t["wrap-flow"]=!1,t["wrap-through"]=!1,t["writing-mode"]=!1,t["z-index"]=!1,t}function wm(t,e,r){}function xm(t,e,r){}var Cm=/javascript\s*\:/img;function Tm(t,e){return Cm.test(e)?"":e}Ur.whiteList=md();Ur.getDefaultWhiteList=md;Ur.onAttr=wm;Ur.onIgnoreAttr=xm;Ur.safeAttrValue=Tm;var Fm={indexOf:function(t,e){var r,a;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,a=t.length;r<a;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var a,i;if(Array.prototype.forEach)return t.forEach(e,r);for(a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}},Yi=Fm;function Im(t,e){t=Yi.trimRight(t),t[t.length-1]!==";"&&(t+=";");var r=t.length,a=!1,i=0,n=0,s="";function o(){if(!a){var c=Yi.trim(t.slice(i,n)),u=c.indexOf(":");if(u!==-1){var f=Yi.trim(c.slice(0,u)),p=Yi.trim(c.slice(u+1));if(f){var h=e(i,s.length,f,p,c);h&&(s+=h+"; ")}}}i=n+1}for(;n<r;n++){var l=t[n];if(l==="/"&&t[n+1]==="*"){var d=t.indexOf("*/",n+2);if(d===-1)break;n=d+1,i=n+1,a=!1}else l==="("?a=!0:l===")"?a=!1:l===";"?a||o():l===`
3
- `&&o()}return Yi.trim(s)}var Om=Im,Na=Ur,Am=Om;function ud(t){return t==null}function Pm(t){var e={};for(var r in t)e[r]=t[r];return e}function yd(t){t=Pm(t||{}),t.whiteList=t.whiteList||Na.whiteList,t.onAttr=t.onAttr||Na.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||Na.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||Na.safeAttrValue,this.options=t}yd.prototype.process=function(t){if(t=t||"",t=t.toString(),!t)return"";var e=this,r=e.options,a=r.whiteList,i=r.onAttr,n=r.onIgnoreAttr,s=r.safeAttrValue,o=Am(t,function(l,d,c,u,f){var p=a[c],h=!1;if(p===!0?h=p:typeof p=="function"?h=p(u):p instanceof RegExp&&(h=p.test(u)),h!==!0&&(h=!1),u=s(c,u),!!u){var m={position:d,sourcePosition:l,source:f,isWhite:h};if(h){var y=i(c,u,m);return ud(y)?c+":"+u:y}else{var y=n(c,u,m);if(!ud(y))return y}}});return o};var Em=yd;(function(t,e){var r=Ur,a=Em;function i(s,o){var l=new a(o);return l.process(s)}e=t.exports=i,e.FilterCSS=a;for(var n in r)e[n]=r[n]})(ys,ys.exports);var gs=ys.exports,bs={indexOf:function(t,e){var r,a;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,a=t.length;r<a;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var a,i;if(Array.prototype.forEach)return t.forEach(e,r);for(a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/,r=e.exec(t);return r?r.index:-1}},Lm=gs.FilterCSS,Dm=gs.getDefaultWhiteList,Ra=bs;function gd(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var bd=new Lm;function Nm(t,e,r){}function Bm(t,e,r){}function $m(t,e,r){}function Mm(t,e,r){}function vd(t){return t.replace(Rm,"&lt;").replace(km,"&gt;")}function qm(t,e,r,a){if(r=Fd(r),e==="href"||e==="src"){if(r=Ra.trim(r),r==="#")return"#";if(!(r.substr(0,7)==="http://"||r.substr(0,8)==="https://"||r.substr(0,7)==="mailto:"||r.substr(0,4)==="tel:"||r.substr(0,11)==="data:image/"||r.substr(0,6)==="ftp://"||r.substr(0,2)==="./"||r.substr(0,3)==="../"||r[0]==="#"||r[0]==="/"))return""}else if(e==="background"){if(Ba.lastIndex=0,Ba.test(r))return""}else if(e==="style"){if(pd.lastIndex=0,pd.test(r)||(fd.lastIndex=0,fd.test(r)&&(Ba.lastIndex=0,Ba.test(r))))return"";a!==!1&&(a=a||bd,r=a.process(r))}return r=Id(r),r}var Rm=/</g,km=/>/g,Wm=/"/g,jm=/&quot;/g,Vm=/&#([a-zA-Z0-9]*);?/gim,_m=/&colon;?/gim,zm=/&newline;?/gim,Ba=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,pd=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,fd=/u\s*r\s*l\s*\(.*/gi;function Sd(t){return t.replace(Wm,"&quot;")}function wd(t){return t.replace(jm,'"')}function xd(t){return t.replace(Vm,function(r,a){return a[0]==="x"||a[0]==="X"?String.fromCharCode(parseInt(a.substr(1),16)):String.fromCharCode(parseInt(a,10))})}function Cd(t){return t.replace(_m,":").replace(zm," ")}function Td(t){for(var e="",r=0,a=t.length;r<a;r++)e+=t.charCodeAt(r)<32?" ":t.charAt(r);return Ra.trim(e)}function Fd(t){return t=wd(t),t=xd(t),t=Cd(t),t=Td(t),t}function Id(t){return t=Sd(t),t=vd(t),t}function Um(){return""}function Hm(t,e){typeof e!="function"&&(e=function(){});var r=!Array.isArray(t);function a(s){return r?!0:Ra.indexOf(t,s)!==-1}var i=[],n=!1;return{onIgnoreTag:function(s,o,l){if(a(s))if(l.isClosing){var d="[/removed]",c=l.position+d.length;return i.push([n!==!1?n:l.position,c]),n=!1,d}else return n||(n=l.position),"[removed]";else return e(s,o,l)},remove:function(s){var o="",l=0;return Ra.forEach(i,function(d){o+=s.slice(l,d[0]),l=d[1]}),o+=s.slice(l),o}}}function Gm(t){for(var e="",r=0;r<t.length;){var a=t.indexOf("<!--",r);if(a===-1){e+=t.slice(r);break}e+=t.slice(r,a);var i=t.indexOf("-->",a);if(i===-1)break;r=i+3}return e}function Qm(t){var e=t.split("");return e=e.filter(function(r){var a=r.charCodeAt(0);return a===127?!1:a<=31?a===10||a===13:!0}),e.join("")}Be.whiteList=gd();Be.getDefaultWhiteList=gd;Be.onTag=Nm;Be.onIgnoreTag=Bm;Be.onTagAttr=$m;Be.onIgnoreTagAttr=Mm;Be.safeAttrValue=qm;Be.escapeHtml=vd;Be.escapeQuote=Sd;Be.unescapeQuote=wd;Be.escapeHtmlEntities=xd;Be.escapeDangerHtml5Entities=Cd;Be.clearNonPrintableCharacter=Td;Be.friendlyAttrValue=Fd;Be.escapeAttrValue=Id;Be.onIgnoreTagStripAll=Um;Be.StripTagBody=Hm;Be.stripCommentTag=Gm;Be.stripBlankChar=Qm;Be.cssFilter=bd;Be.getDefaultCSSWhiteList=Dm;var ka={},xr=bs;function Zm(t){var e=xr.spaceIndex(t),r;return e===-1?r=t.slice(1,-1):r=t.slice(1,e+1),r=xr.trim(r).toLowerCase(),r.slice(0,1)==="/"&&(r=r.slice(1)),r.slice(-1)==="/"&&(r=r.slice(0,-1)),r}function Km(t){return t.slice(0,2)==="</"}function Jm(t,e,r){var a="",i=0,n=!1,s=!1,o=0,l=t.length,d="",c="";e:for(o=0;o<l;o++){var u=t.charAt(o);if(n===!1){if(u==="<"){n=o;continue}}else if(s===!1){if(u==="<"){a+=r(t.slice(i,o)),n=o,i=o;continue}if(u===">"){a+=r(t.slice(i,n)),c=t.slice(n,o+1),d=Zm(c),a+=e(n,a.length,d,c,Km(c)),i=o+1,n=!1;continue}if(u==='"'||u==="'")for(var f=1,p=t.charAt(o-f);p.trim()===""||p==="=";){if(p==="="){s=u;continue e}p=t.charAt(o-++f)}}else if(u===s){s=!1;continue}}return i<t.length&&(a+=r(t.substr(i))),a}var Ym=/[^a-zA-Z0-9\\_:.-]/gim;function Xm(t,e){var r=0,a=0,i=[],n=!1,s=t.length;function o(f,p){if(f=xr.trim(f),f=f.replace(Ym,"").toLowerCase(),!(f.length<1)){var h=e(f,p||"");h&&i.push(h)}}for(var l=0;l<s;l++){var d=t.charAt(l),c,u;if(n===!1&&d==="="){n=t.slice(r,l),r=l+1,a=t.charAt(r)==='"'||t.charAt(r)==="'"?r:ty(t,l+1);continue}if(n!==!1&&l===a){if(u=t.indexOf(d,l+1),u===-1)break;c=xr.trim(t.slice(a+1,u)),o(n,c),n=!1,l=u,r=l+1;continue}if(/\s|\n|\t/.test(d))if(t=t.replace(/\s|\n|\t/g," "),n===!1)if(u=ey(t,l),u===-1){c=xr.trim(t.slice(r,l)),o(c),n=!1,r=l+1;continue}else{l=u-1;continue}else if(u=ry(t,l-1),u===-1){c=xr.trim(t.slice(r,l)),c=hd(c),o(n,c),n=!1,r=l+1;continue}else continue}return r<t.length&&(n===!1?o(t.slice(r)):o(n,hd(xr.trim(t.slice(r))))),xr.trim(i.join(" "))}function ey(t,e){for(;e<t.length;e++){var r=t[e];if(r!==" ")return r==="="?e:-1}}function ty(t,e){for(;e<t.length;e++){var r=t[e];if(r!==" ")return r==="'"||r==='"'?e:-1}}function ry(t,e){for(;e>0;e--){var r=t[e];if(r!==" ")return r==="="?e:-1}}function iy(t){return t[0]==='"'&&t[t.length-1]==='"'||t[0]==="'"&&t[t.length-1]==="'"}function hd(t){return iy(t)?t.substr(1,t.length-2):t}ka.parseTag=Jm;ka.parseAttr=Xm;var ay=gs.FilterCSS,kt=Be,Od=ka,ny=Od.parseTag,sy=Od.parseAttr,Ma=bs;function $a(t){return t==null}function oy(t){var e=Ma.spaceIndex(t);if(e===-1)return{html:"",closing:t[t.length-2]==="/"};t=Ma.trim(t.slice(e+1,-1));var r=t[t.length-1]==="/";return r&&(t=Ma.trim(t.slice(0,-1))),{html:t,closing:r}}function ly(t){var e={};for(var r in t)e[r]=t[r];return e}function dy(t){var e={};for(var r in t)Array.isArray(t[r])?e[r.toLowerCase()]=t[r].map(function(a){return a.toLowerCase()}):e[r.toLowerCase()]=t[r];return e}function Ad(t){t=ly(t||{}),t.stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=kt.onIgnoreTagStripAll),t.whiteList||t.allowList?t.whiteList=dy(t.whiteList||t.allowList):t.whiteList=kt.whiteList,t.onTag=t.onTag||kt.onTag,t.onTagAttr=t.onTagAttr||kt.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||kt.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||kt.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||kt.safeAttrValue,t.escapeHtml=t.escapeHtml||kt.escapeHtml,this.options=t,t.css===!1?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new ay(t.css))}Ad.prototype.process=function(t){if(t=t||"",t=t.toString(),!t)return"";var e=this,r=e.options,a=r.whiteList,i=r.onTag,n=r.onIgnoreTag,s=r.onTagAttr,o=r.onIgnoreTagAttr,l=r.safeAttrValue,d=r.escapeHtml,c=e.cssFilter;r.stripBlankChar&&(t=kt.stripBlankChar(t)),r.allowCommentTag||(t=kt.stripCommentTag(t));var u=!1;r.stripIgnoreTagBody&&(u=kt.StripTagBody(r.stripIgnoreTagBody,n),n=u.onIgnoreTag);var f=ny(t,function(p,h,m,y,b){var v={sourcePosition:p,position:h,isClosing:b,isWhite:Object.prototype.hasOwnProperty.call(a,m)},S=i(m,y,v);if(!$a(S))return S;if(v.isWhite){if(v.isClosing)return"</"+m+">";var C=oy(y),F=a[m],I=sy(C.html,function(N,P){var E=Ma.indexOf(F,N)!==-1,B=s(m,N,P,E);return $a(B)?E?(P=l(m,N,P,c),P?N+'="'+P+'"':N):(B=o(m,N,P,E),$a(B)?void 0:B):B});return y="<"+m,I&&(y+=" "+I),C.closing&&(y+=" /"),y+=">",y}else return S=n(m,y,v),$a(S)?d(y):S},d);return u&&(f=u.remove(f)),f};var cy=Ad;(function(t,e){var r=Be,a=ka,i=cy;function n(o,l){var d=new i(l);return d.process(o)}e=t.exports=n,e.filterXSS=n,e.FilterXSS=i,(function(){for(var o in r)e[o]=r[o];for(var l in a)e[l]=a[l]})();function s(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}s()&&(self.filterXSS=t.exports)})(ms,ms.exports);var wi=ms.exports,uy=function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Pd=(function(){function t(e,r){var a=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],code:["style"],dd:["style"],del:["style"],details:["open","style"],div:["align","aria-hidden","aria-label","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],main:["style"],mark:["style"],nav:["style"],ol:[],p:["style"],pre:["style"],section:["style"],source:["media","src","type"],span:["aria-hidden","aria-label","style"],strong:[],sub:["style"],summary:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],time:["style"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=qa(qa({},wi.getDefaultCSSWhiteList()),{"align-items":!0,"align-self":!0,flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,float:!0,gap:!0,grid:!0,"grid-area":!0,"grid-auto-columns":!0,"grid-auto-flow":!0,"grid-auto-rows":!0,"grid-column":!0,"grid-column-end":!0,"grid-column-start":!0,"grid-row":!0,"grid-row-end":!0,"grid-row-start":!0,"grid-template":!0,"grid-template-areas":!0,"grid-template-columns":!0,"grid-template-rows":!0,"justify-content":!0,"justify-items":!0,"justify-self":!0,"line-height":!0,overflow:!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(n,s,o,l){return n==="a"&&s==="href"||(n==="img"||n==="source")&&s==="src"?a.sanitizeUrl(o):wi.safeAttrValue(n,s,o,l)}},this._entityMap={"&":"&#x38;","<":"&#x3C;",">":"&#x3E;",'"':"&#x22;","'":"&#x27;","/":"&#x2F;"};var i;e&&!r?i=e:e&&r?(i=Object.create(this.arcgisFilterOptions),i.css={whiteList:this.arcgisCSSWhiteList},Object.keys(e).forEach(function(n){if(n==="whiteList")i.whiteList=a._extendObjectOfArrays([a.arcgisWhiteList,e.whiteList||{}]);else if(n==="css"){var s=e.css.whiteList;s!=null&&e.css instanceof Object&&Object.keys(s).forEach(function(o){return i.css.whiteList[o]=s[o]})}else i[n]=e[n]})):(i=Object.create(this.arcgisFilterOptions),i.whiteList=this.arcgisWhiteList,i.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=i,this._xssFilter=new wi.FilterXSS(i)}return t.prototype.sanitize=function(e,r){switch(r===void 0&&(r={}),typeof e){case"number":return isNaN(e)||!isFinite(e)?null:e;case"boolean":return e;case"string":return this._xssFilter.process(e);case"object":return this._iterateOverObject(e,r);default:return r.allowUndefined&&typeof e>"u"?void 0:null}},t.prototype.sanitizeUrl=function(e,r){var a=(r??{}).isProtocolRequired,i=a===void 0?!0:a,n=this._trim(e.substring(0,e.indexOf(":"))),s=e==="/",o=/^#/.test(e),l=n&&this.allowedProtocols.indexOf(n.toLowerCase())>-1;return s||o||l?wi.escapeAttrValue(e):!n&&!i?wi.escapeAttrValue("https://".concat(e)):""},t.prototype.sanitizeHTMLAttribute=function(e,r,a,i){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(e,r,a,i):wi.safeAttrValue(e,r,a,i)},t.prototype.validate=function(e,r){r===void 0&&(r={});var a=this.sanitize(e,r);return{isValid:e===a,sanitized:a}},t.prototype.encodeHTML=function(e){var r=this;return String(e).replace(/[&<>"'\/]/g,function(a){return r._entityMap[a]})},t.prototype.encodeAttrValue=function(e){var r=/^[a-zA-Z0-9]$/;return String(e).replace(/[\x00-\xFF]/g,function(a,i){return r.test(a)?a:"&#x".concat(Number(e.charCodeAt(i)).toString(16),";")})},t.prototype._extendObjectOfArrays=function(e){var r={};return e.forEach(function(a){Object.keys(a).forEach(function(i){Array.isArray(a[i])&&Array.isArray(r[i])?r[i]=r[i].concat(a[i]):r[i]=a[i]})}),r},t.prototype._iterateOverObject=function(e,r){var a=this;r===void 0&&(r={});try{var i=!1,n=void 0;if(Array.isArray(e))n=e.reduce(function(o,l){var d=a.validate(l,r);return d.isValid?o.concat([l]):(i=!0,o.concat([d.sanitized]))},[]);else if(uy(e)){var s=Object.keys(e);n=s.reduce(function(o,l){var d=e[l],c=a.validate(d,r);return c.isValid?o[l]=d:(i=!0,o[l]=c.sanitized),o},{})}else return r.allowUndefined&&typeof e>"u"?void 0:null;return i?n:e}catch{return null}},t.prototype._trim=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},t})();function Ed(t){var e,r,a=t.length;if(a===1)e=0,r=t[0][1];else{for(var i=0,n=0,s=0,o=0,l,d,c,u=0;u<a;u++)l=t[u],d=l[0],c=l[1],i+=d,n+=c,s+=d*d,o+=d*c;e=(a*o-i*n)/(a*s-i*i),r=n/a-e*i/a}return{m:e,b:r}}function Ld(t){return function(e){return t.b+t.m*e}}function Dd(t,e){if(t.length<2)return 1;for(var r=0,a=0;a<t.length;a++)r+=t[a][1];for(var i=r/t.length,n=0,s=0;s<t.length;s++)n+=Math.pow(i-t[s][1],2);for(var o=0,l=0;l<t.length;l++)o+=Math.pow(t[l][1]-e(t[l][0]),2);return 1-o/n}var Nd=function(){this.totalCount=0,this.data={}};Nd.prototype.train=function(e,r){this.data[r]||(this.data[r]={});for(var a in e){var i=e[a];this.data[r][a]===void 0&&(this.data[r][a]={}),this.data[r][a][i]===void 0&&(this.data[r][a][i]=0),this.data[r][a][i]++}this.totalCount++};Nd.prototype.score=function(e){var r={},a;for(var i in e){var n=e[i];for(a in this.data)r[a]={},this.data[a][i]?r[a][i+"_"+n]=(this.data[a][i][n]||0)/this.totalCount:r[a][i+"_"+n]=0}var s={};for(a in r){s[a]=0;for(var o in r[a])s[a]+=r[a][o]}return s};var Bd=function(){this.weights=[],this.bias=0};Bd.prototype.predict=function(e){if(e.length!==this.weights.length)return null;for(var r=0,a=0;a<this.weights.length;a++)r+=this.weights[a]*e[a];return r+=this.bias,r>0?1:0};Bd.prototype.train=function(e,r){if(r!==0&&r!==1)return null;e.length!==this.weights.length&&(this.weights=e,this.bias=1);var a=this.predict(e);if(typeof a=="number"&&a!==r){for(var i=r-a,n=0;n<this.weights.length;n++)this.weights[n]+=i*e[n];this.bias+=i}return this};var rC=607/128,iC=Math.log(Math.sqrt(2*Math.PI));var aC=Math.sqrt(2*Math.PI);var py=Math.sqrt(2*Math.PI);function fy(t){for(var e=t,r=t,a=1;a<15;a++)r*=t*t/(2*a+1),e+=r;return Math.round((.5+e/py*Math.exp(-t*t/2))*1e4)/1e4}var hy=[];for(Wa=0;Wa<=3.09;Wa+=.01)hy.push(fy(Wa));var Wa;var sp=Pf($u(),1);var dr="25.0.0",lt="arcgis_charts_pie_from_fields_name",Wt="arcgis_charts_pie_from_fields_value",ub="arcgis_charts_bar_line_from_fields_name",pb="arcgis_charts_bar_line_from_fields_value",ar={Mean:"Mean",Median:"Median",StdDev:"Standard Deviation",Normal:"Normal Distribution",Trendline:"Trendline"},Ru={Count:"count",Start:"minValue",End:"maxValue"};function fb(t,e){let r=e.errors[t];throw new Qe(e.modalHeaders.error,r??e.errors.simpleError)}function Vt(t){return t.axes?.[0]?.valueFormat?.type}function P1(t){return t.intlOptions}function et(t){return t?.type===g.NumberAxisFormat}function E1(t){return et(t)&&t.intlOptions?.style==="percent"}function nr(t){return t?.type===g.CategoryAxisFormat}function Zr(t){return t?.type===g.DateAxisFormat}function L1(t){let{oldConfig:e,newConfig:r,rotationChanged:a}=t;return a?[!0,!0]:[e.horizontalAxisLabelsBehavior!==r.horizontalAxisLabelsBehavior,e.verticalAxisLabelsBehavior!==r.verticalAxisLabelsBehavior]}function hb(t){return et(t?.[1]?.valueFormat)&&(t?.[2]?.valueFormat===void 0||et(t[2].valueFormat))}function mb(t){return et(t?.[1]?.valueFormat)&&(t?.[2]?.valueFormat===void 0||et(t[2].valueFormat))}function yb(t){return(nr(t?.[0]?.valueFormat)||Zr(t?.[0]?.valueFormat))&&et(t?.[1]?.valueFormat)&&(t?.[2]?.valueFormat===void 0||et(t[2].valueFormat))}function gb(t){return nr(t?.[0]?.valueFormat)&&nr(t?.[1]?.valueFormat)||Zr(t?.[0]?.valueFormat)&&nr(t?.[1]?.valueFormat)||Zr(t?.[0]?.valueFormat)&&Zr(t?.[1]?.valueFormat)}function bb(t){return(nr(t?.[0]?.valueFormat)||Zr(t?.[0]?.valueFormat))&&et(t?.[1]?.valueFormat)}function vb(t){return et(t?.[0]?.valueFormat)&&et(t?.[1]?.valueFormat)}function Sb(t){return et(t?.[0]?.valueFormat)&&et(t?.[1]?.valueFormat)}function wb(t){return et(t?.[0]?.valueFormat)}function D1(t){let{chartType:e,axesConfig:r,errorStrings:a}=t,i,n;switch(e){case g.GaugeSeries:i=wb,n="invalidValueFormatForGauge";break;case g.ScatterSeries:i=vb,n="invalidValueFormatForScatterplot";break;case g.HistogramSeries:i=Sb,n="invalidValueFormatForHistogram";break;case g.LineSeries:i=hb,n="invalidValueFormatForLineChart";break;case g.BarSeries:i=mb,n="invalidValueFormatForBarChart";break;case g.ComboLineAndBarSeries:i=bb,n="invalidValueFormatForComboBarLineChart";break;case g.BoxPlotSeries:i=yb,n="invalidValueFormatForBoxPlot";break;case g.HeatSeries:i=gb,n="invalidValueFormatForHeatChart";break}i!==void 0&&n!==void 0&&(i(r)||fb(n,a))}function xb(t){let{isXAxis:e,chartType:r,valueFormat:a,isAxisForHistogramOverlaySeries:i}=t;return e&&(nr(a)||r===g.HistogramSeries&&!i||r===g.BarSeries&&et(a))}var Cb={MonoSelection:"monoSelection",MultiSelection:"multiSelection",MultiSelectionWithCtrlKey:"multiSelectionWithCtrlKey",Zoom:"zoom",None:"none"},N1={MultiAxes:"multi-axes",XAxis:"x-axis",YAxis:"y-axis"},Dr={Reject:"reject",RenderUpToTheLimit:"renderUpToTheLimit"},ne={AxisLabels:"axisLabels",GuideLabel:"guideLabel",AxisTitle:"axisTitle",ChartTitle:"chartTitle",ChartSubtitle:"chartSubtitle",DataLabels:"dataLabels",LegendTitle:"legendTitle",LegendText:"legendText",DescriptionText:"descriptionText"},Tb=32,Ar="arcgis_charts_features_extent",pe={maxRecordCountFactor:5,maxParallelRequests:4,maxRecords:2e3,orderByJSAPIDelimiter:" ",outStatistics:{statisticType:ha.statisticType,onStatisticField:"OBJECTID",outStatisticFieldName:"arcgis_charts_outStatisticFieldName_default_key"},uniqueIdsName:"arcgisChartsUniqueIds",heatChartLowerBoundaryAlias:"lowerBoundary5x1",heatChartUpperBoundaryAlias:"upperBoundary5x1",defaultStatParameterValue:.5},dp=["EXPR_1","Expr1","expr1","EXPR1"],B1=1,dt=.7,Fb=25,cp=[156,156,156,255],Ib=[156,156,156,255],$1=yr.Solid,M1=2,hn={defaultGroupOfSlicesId:"arcgis_charts_group_of_slices",sliceIdPrefix:"arcgis-charts-slice-id",undefinedSliceId:"arcgis-charts-slice-id-undefined",nullSliceId:"arcgis-charts-slice-id-null",emptySliceId:"arcgis-charts-slice-id-empty"},Di="arcgis_charts_box_plot_category",te={valueField:"arcgis_charts_heat_chart_value",xField:"arcgis_charts_heat_chart_x",yField:"arcgis_charts_heat_chart_y"},q1={min:1,max:10},Ob=[[31,120,180,255],[166,206,227,255],[51,160,44,255],[178,223,138,255],[227,26,28,255],[251,154,153,255],[255,127,0,255],[253,191,111,255],[106,61,154,255],[202,178,214,255]],R1=[[90,180,255,255],[165,220,255,255],[90,215,80,255],[165,245,150,255],[255,80,85,255],[255,170,170,255],[255,165,70,255],[255,205,130,255],[155,110,255,255],[220,195,255,255]],Ab=[[104,104,104,255],[51,124,235,255],[132,0,168,255],[156,156,156,255]],k1=[[104,104,104,255],[51,124,235,255],[175,90,255,255],[156,156,156,255]],W1=[255,255,255,255],j1=[43,43,43,255],V1=[0,122,194,255],_1=[255,255,255,255],z1=[0,0,0,255],cn=[150,150,150,178.5];function Lt(t){let{colorIndex:e,opacity:r,histogramOverlays:a}=t,i=Math.max(0,e??0),n=[...a===!0?Ab:Ob],[s,o,l,d]=n[i%n.length],c=r!==void 0?r*255:d;return[s,o,l,c]}function up(t){return[0,0,0,(t??dt)*255]}function U1(){return{type:g.CursorCrosshair,verticalLineVisible:!1,horizontalLineVisible:!1,style:{type:Se.SLS,style:yr.Dot,color:[211,211,211,255],width:1}}}function Sn(t=1){return[Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256),t*255]}function ge(t){let e={family:"Arial, Helvetica, sans-serif",size:10};switch(t){case ne.ChartTitle:e.size=18;break;case ne.AxisTitle:e.size=14;break;case ne.LegendText:e.size=12;break;case ne.LegendTitle:e.size=13;break;case ne.DescriptionText:e.size=11;break}return e}function pp(t="",e=ge(),r){let a="center";return(r===ne.DataLabels||r===ne.GuideLabel)&&(a=void 0),{type:Se.TS,color:up(),text:t,font:e,horizontalAlignment:a}}function de(t){let{text:e,visible:r,font:a,type:i}=t??{text:"",visible:!0,font:ge()};return{type:g.Text,visible:r,content:pp(e,a,i)}}function sa(t){let e=t?.useRandomColor??!1,r=t?.useRampColor,a=t?.width??1,i=t?.isHistogramOverlay,n=t?.color??up(1);return e?n=Sn():r!==void 0&&(i===!0?n=Lt({colorIndex:r.colorIndex,histogramOverlays:i}):n=Lt({colorIndex:r.colorIndex})),t?.opacity!==void 0&&(n[3]=t.opacity),{type:Se.SLS,style:yr.Solid,color:n,width:a}}function Pb(){return{type:g.CategoryAxisFormat,characterLimit:11}}function H1(){return{type:g.DateAxisFormat,intlOptions:{}}}function Qs(){return{type:g.NumberAxisFormat,intlOptions:{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:3,useGrouping:!0}}}function G1(){return{type:g.NumberAxisFormat,intlOptions:{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2}}}function Q1(){return{type:g.NumberAxisFormat,intlOptions:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:0}}}function _s(t="Category Axis"){let e=de({text:t,visible:!0,font:ge(ne.AxisTitle)});e.content.horizontalAlignment="center",e.content.verticalAlignment="middle";let r=de({text:t,visible:!0,font:ge(ne.AxisLabels)});return{type:g.Axis,visible:!0,title:e,labels:r,valueFormat:Pb(),lineSymbol:sa({color:cp})}}function un(t="Value Axis"){let e=de({text:t,visible:!0,font:ge(ne.AxisTitle)}),r=de({text:t,visible:!0,font:ge(ne.AxisLabels)});return e.content.verticalAlignment="middle",e.content.horizontalAlignment="center",{type:g.Axis,visible:!0,title:e,labels:r,valueFormat:Qs(),lineSymbol:sa({color:cp})}}function Nr(){return{type:g.Legend,visible:!0,title:de({text:"",visible:!0,font:ge(ne.LegendTitle)}),body:pp("",ge(ne.LegendText)),position:Vi.Right}}function sn(t){return{type:g.Overlay,visible:!0,created:!1,symbol:sa({useRampColor:{colorIndex:t},isHistogramOverlay:!0})}}function Br(){return[255,255,255,255]}function cr(t){return t.utilsStrings.chartType.chart}function ur(){return`Chart ${Date.now()}`}function Z1(t,e=!1){return{type:Se.SFS,style:Qt.Solid,color:e?Sn(dt):Lt({colorIndex:t??0,opacity:dt})}}function Eb(t=0){return{type:Se.SMS,style:Gt.Circle,color:Lt({colorIndex:t,opacity:dt}),size:4}}function Lb(t){return{type:Se.SLS,style:yr.Solid,color:Lt({colorIndex:t,opacity:dt}),width:2}}function Db(t=!1){return{type:Se.SMS,style:Gt.Circle,color:t?Sn(dt):Lt({colorIndex:0,opacity:dt}),size:7}}function K1(){return{type:g.SizePolicy,field:"",scaleType:$o.Linear,minSize:5,maxSize:30}}function Nb(t=!1){return{type:g.Overlays,trendLine:{type:g.Overlay,created:!1,visible:!0,symbol:{type:Se.SLS,style:yr.Solid,color:t?Sn():Lt({colorIndex:1}),width:2}}}}function Bb(t,e){let r=t.countSeries;return{type:g.HeatSeries,id:r,name:r,y:"",x:"",dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)}),query:{outStatistics:[{statisticType:W.Count,onStatisticField:e??"ObjectID",outStatisticFieldName:`${W.Count}_${e}_0`.toUpperCase()}],groupByFieldsForStatistics:[]},emptyCells:{symbol:{type:Se.SFS,style:Qt.Solid,color:cn},text:t.utilsStrings.null}}}function $b(){return{type:g.ScatterSeries,id:g.ScatterSeries,name:g.ScatterSeries,x:"",y:"",markerSymbol:Db(),overlays:Nb(),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)})}}function Yr(t,e){let r=[],a=t.xAxis,i=t.utilsStrings.statistics.count,n,s,o=sa({opacity:Fb});switch(e===g.HeatSeries?s=_s(i):(s=un(i),s.grid=o),e){case g.BarSeries:case g.HeatSeries:{n=_s(a);break}case g.ScatterSeries:{n=un(a),n.grid=o;break}case g.RadarSeries:case g.LineSeries:case g.HistogramSeries:{n=un(a);break}case g.BoxPlotSeries:{n=_s("");break}}return n!==void 0&&r.push(n,s),r}function Mb(){return{type:g.GaugeNeedle,symbol:{type:Se.SFS,color:[0,0,0,200]}}}function qb(t){let e=[],r=t.xAxis,a=un(r);return a.needle=Mb(),e.push(a),e}function Rb(t){let e=t.commonStrings,r=t.objectIDField??"ObjectID",a=`${W.Count}_${r}_0`.toUpperCase(),i=e.countSeries;return{type:g.LineSeries,id:i,name:i,query:{outStatistics:[{statisticType:W.Count,onStatisticField:r,outStatisticFieldName:a}],groupByFieldsForStatistics:[]},x:"",y:a,lineSymbol:Lb(t.seriesIndex),markerSymbol:Eb(t.seriesIndex),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)}),temporalBinning:{unit:Q.Day,size:0,timeAggregationType:$e.Start,trimIncompleteTimeInterval:!0,nullPolicy:st.Interpolate}}}function J1(t){return{...Rb(t),type:g.RadarSeries}}function kb(t){return{type:Se.SFS,style:Qt.Solid,color:Lt({colorIndex:t,opacity:dt})}}function Y1(t){let e=t.objectIDField??"*",r=t.commonStrings,a=`${W.Count}_Y_0`.toUpperCase(),i=r.countSeries;return{type:g.BarSeries,id:i,name:i,query:{outStatistics:[{statisticType:W.Count,onStatisticField:e,outStatisticFieldName:a}],groupByFieldsForStatistics:[]},x:"",y:a,fillSymbol:kb(t.seriesIndex),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels),type:ne.DataLabels})}}function X1(t,e){let r=t.countSeries;return{name:r,type:g.BoxPlotSeries,id:r,fillSymbol:{type:Se.SFS,style:Qt.Solid,color:Lt({colorIndex:e,opacity:dt})},query:{},x:Di,y:""}}function Wb(){return{type:g.PieTick,visible:!0,lineSymbol:sa({width:1,color:Ib})}}function jb(){return{type:Se.SFS,style:Qt.Solid}}function eT(t,e){let r=`${W.Count}_${e}_0`.toUpperCase(),a=t.countSeries;return{type:g.PieSeries,id:a,name:a,query:{outStatistics:[{statisticType:W.Count,onStatisticField:e??"ObjectID",outStatisticFieldName:r}],groupByFieldsForStatistics:[]},x:"",y:r,fillSymbol:jb(),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels),type:ne.DataLabels}),startAngle:-90,endAngle:270,dataLabelsCharacterLimit:11,displayCategoryOnDataLabel:!0,displayNumericValueOnDataLabel:!1,displayPercentageOnDataLabel:!0,numericValueFormat:{...Qs(),intlOptions:{minimumFractionDigits:1,maximumFractionDigits:1}},percentValueFormat:{...Qs(),intlOptions:{minimumFractionDigits:1,maximumFractionDigits:1}},ticks:Wb()}}function tT(t){let e=t.objectIDField??"ObjectID",r=`${W.Count}_${e}_0`.toUpperCase(),a="Series0";return{type:g.GaugeSeries,id:a,name:a,query:{outStatistics:[{statisticType:W.Count,onStatisticField:e,outStatisticFieldName:r}]},x:""}}function ea(){return!1}function rT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,rotated:ea(),orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.BarSeries),series:[],legend:Nr()}}function iT(t,e=ur()){return{version:dr,type:g.Chart,id:e,rotated:ea(),colorMatch:!0,orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),series:[],legend:Nr(),axes:Yr(t,g.BoxPlotSeries),standardizeValues:!0,showOutliers:!1}}function aT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,rotated:ea(),orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.LineSeries),series:[],legend:Nr()}}function nT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.RadarSeries),series:[],legend:Nr()}}function sT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,orderOptions:{data:{orderType:ot.YValue,orderBy:Ne.Descending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),series:[],legend:{...Nr(),displayNumericValue:!1,displayPercentage:!0}}}function oT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),series:[],axes:qb(t)}}function lT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.ScatterSeries),series:[$b()],legend:Nr()}}function dT(t,e){return{version:dr,type:g.Chart,id:ur(),title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),background:Br(),axes:Yr(t,g.HeatSeries),series:[Bb(t,e)],legend:{...Nr(),position:Vi.Bottom}}}function Vb(){return{type:g.Overlays,mean:sn(1),median:sn(2),standardDeviation:sn(3),comparisonDistribution:sn(4)}}function _b(){return{type:Se.SFS,style:Qt.Solid,color:Lt({colorIndex:0,opacity:dt})}}function zb(){return{type:g.HistogramSeries,id:g.HistogramSeries,name:g.HistogramSeries,visible:!0,dataTooltipVisible:!0,dataTooltipReverseColor:!1,assignToSecondValueAxis:!1,x:"",binCount:32,overlays:Vb(),dataTransformationType:Oe.None,fillSymbol:_b(),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)})}}function cT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.HistogramSeries),series:[zb()],legend:Nr()}}var zs={behaviorAfterLimit:Dr.Reject,maxCategoryCount:Number.NaN,maxBarChartSeriesCount:100,maxBarUniqueSeriesCountTotal:1e4,maxBarTwoSeriesCountPerSeries:1e3,maxBarTwoSeriesCountTotal:2e3,maxBarThreePlusSeriesCountPerSeries:100,maxBarThreePlusSeriesCountTotal:2e3,maxScatterPointsBeforeAggregation:1e4,maxScatterPointsAfterAggregation:1e4,maxLineChartSeriesCount:100,maxLineUniqueSeriesCountTotal:1e4,maxLineTwoSeriesCountPerSeries:5e3,maxLineTwoSeriesCountTotal:1e4,maxLineThreePlusSeriesCountPerSeries:1e3,maxLineThreePlusSeriesCountTotal:1e4,maxPieChartSliceCountTotal:300,maxGaugeByFeaturesLimit:50,maxBoxPlotSeriesCount:100,maxBoxUniqueSeriesCountTotal:1e4,maxBoxTwoSeriesCountPerSeries:1e3,maxBoxTwoSeriesCountTotal:2e3,maxBoxThreePlusSeriesCountPerSeries:100,maxBoxThreePlusSeriesCountTotal:2e3,maxBoxPlotOutlierLimit:1e4,maxHeatChartCellLimit:1e4};function Xr(t){let e={...zs};return t!==void 0&&Object.keys(zs).forEach(r=>{let a=r;e[a]=t[a]??zs[a]}),e}function wn(){return{maxScatterCellsPerQuery:500,maxScatterCellsPerQueryForStandard:175,maxElementsPerSelectionQuery:25,maxOIDsPerSelectionQuery:2e3,maxOperandsPerWhereClause:50}}function uT(t,e){let r;switch(t){case W.Average:{r=e.utilsStrings.statistics.mean;break}case W.ContinuousPercentile:{r=e.utilsStrings.statistics.median;break}case W.Sum:{r=e.utilsStrings.statistics.sum;break}case W.Minimum:{r=e.utilsStrings.statistics.minimum;break}case W.Maximum:{r=e.utilsStrings.statistics.maximum;break}case W.Variance:{r=e.utilsStrings.statistics.variance;break}case W.DiscretePercentile:{r=e.utilsStrings.statistics.discretePercentile;break}case W.NoAggregation:{r=e.utilsStrings.statistics.noAggregation;break}case W.Count:default:{r=e.utilsStrings.statistics.count;break}}return r}function pT(t,e){let r;switch(t){case $e.End:{r=e.timeAggregationTypes.end;break}case $e.Start:{r=e.timeAggregationTypes.start;break}default:r="";break}return r}function Ub(){return yt.Side}function fT(t){return t.utilsStrings.notAvailable}var Hb=0,Gb="_arcgis_charts_outliers",Qb="_arcgis_charts_z_score",hT=[210,210,210,255*dt],mT=" percentage ";var A={aria:{defaultChartItemRole:"figure"},title:{marginBottom:8,wrap:!0},subtitle:{marginBottom:10,wrap:!0},rotated:!1,legendProperties:{legendLabels:{marginLeft:5,marginRight:5,truncate:!1,applyOnClones:!0,wrap:!0,maxWidth:200},valueLabels:{wrap:!0,maxWidth:200},legendTitle:{wrap:!0,maxWidth:220,marginLeft:10,marginRight:10,marginTop:10},legendMarkersSize:14,legendLabelReducedOpacity:.5,rectangleMarkerRadius:3,roundedMarkerRadius:12,legendPaddingRightWithScrollbarVisible:10,maxHeight:100,marginTop:2,marginBottom:2,marginLeft:0,marginRight:0,paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,position:Vi.Right},footer:{wrap:!0,horizontalCenter:"center",verticalCenter:"middle",align:"center"},axisLabel:{rotation:0,align:"center",horizontalCenter:"center",verticalCenter:"top",dy:5,paddingTop:5,paddingRight:5,paddingLeft:5,maxWidth:Number.NaN},axisTickLength:5,rotatedAxisLabel:{rotation:-45,horizontalCenter:"left",verticalCenter:"bottom",dy:6,paddingTop:5,paddingLeft:0,paddingRight:5},histogramAxisLabel:{rotation:0,horizontalCenter:"center",verticalCenter:"middle",dy:0,dx:0,paddingLeft:3,paddingRight:3},xAxisTitleLabel:{align:"center",valign:"middle",rotation:0,fontSize:10,wrap:!0},yAxisTitleLabel:{align:"center",valign:"middle",rotation:270,wrap:!0},titleLabel:{align:"center",wrap:!0},subtitleLabel:{align:"center",wrap:!0},horizontalSurfaceGuideLabels:{horizontalCenter:"right",align:"right",verticalCenter:"middle",wrap:!0},horizontalLineGuideLabels:{horizontalCenter:"right",align:"right",verticalCenter:"top",wrap:!0},verticalSurfaceGuideLabels:{horizontalCenter:"center",verticalCenter:"top",valign:"top"},verticalLineGuideLabels:{horizontalCenter:"right",verticalCenter:"bottom",valign:"top",wrap:!0,rotation:90},guideAbove:!1,cursorCrosshair:{style:{type:Se.SLS,style:yr.Dash,color:[0,0,0,102],width:1},horizontalLineVisible:!1,verticalLineVisible:!1},gauge:{innerRadius:80,radius:80,startAngle:-180,endAngle:180,innerLabelToInnerChartRatio:.5,axisLabelToInnerChartRatio:.13,innerLabelAutoMinFontSize:14,innerLabelAutoMaxFontSize:100,axisLabelAutoMinFontSize:14,axisLabelAutoMaxFontSize:40,gaugeMinGridDistance:1,axisMinimum:0,axisMaximum:100,numberOfLabelIntervals:5,numberOfTicksBetweenTwoLabels:4,maximumNumberOfLabelIntervals:24,paddingTop:10,paddingBottom:10,paddingRight:5,paddingLeft:5},gaugeTicksLength:7,gaugeInnerLabel:{horizontalCenter:"center",verticalCenter:"middle"},gaugeNeedle:{startWidth:10,endWidth:1,innerRadius:25,displayPin:!1},gaugeFirstLabelId:"arcgis_charts_gauge_first_label",gaugeLastLabelId:"arcgis_charts_gauge_last_label",headerContainer:{layout:"vertical",width:"100%",paddingBottom:5},footerContainer:{layout:"vertical",width:"100%",paddingTop:5,paddingBottom:15},paddingMinSize:0,marginMinSize:0,chartPaddingMinSize:7,chartPaddingRightWhenLegendNotOnRight:15,chartAndLegendContainer:{paddingTop:0},chartContainer:{paddingBottom:0,paddingTop:15},chartContainerPaddingTopWhenRotated:5,dataLabelInitialize:{strokeWidth:0,applyOnClones:!0},dataLabel:{align:"center",horizontalCenter:"center",valign:"bottom",verticalCenter:"top",dy:-3},dataLabelRotated:{align:"right",horizontalCenter:"right",valign:"middle",verticalCenter:"middle",dx:2},dataLabelStackedRotated:{align:"center",horizontalCenter:"center",valign:"middle",verticalCenter:"middle"},dataLabelStackedNonRotated:{align:"center",horizontalCenter:"center",valign:"middle",verticalCenter:"middle"},dataLabelNegative:{paddingTop:5,paddingRight:5},rotatedChartPadding:{paddingTop:2,paddingRight:2},scatterplotSeries:{strokeOpacity:0,r2:Number.NaN,trendLinePoints:[{},{}]},histogramSeries:{normalDistribNumberOfPoints:100},lineSeries:{strokeWidth:2,lineSmoothed:!1,lineSmoothedKind:Do.Bezier,showArea:!1,areaOpacity:.25,markerVisible:!0,rotated:!1,stackedType:yt.Side,stackNegativeValuesToBaseline:!0,marker:{markerBigSize:7,markerSizeThresholdForTooltipDisplay:9,markerStyle:Gt.Circle}},buffer:!1,treatZeroValueAs:1e-4,elementLimitForSmoothRendering:1e3,pieChart:{dataLabels:{maxWidth:100,wrap:!1},dataLabelsOffset:10,dataLabelsInside:!1,chartRadius:80,chartOptimizedRadius:70,innerRadius:Hb,min:-90,max:270,displayCategoryOnLegend:!0,displayCategoryOnTooltip:!0,displayCategoryOnDataLabel:!0,displayNumericValueOnLegend:!1,displayNumericValueOnDataLabel:!0,displayNumericValueOnTooltip:!0,displayPercentageOnLegend:!1,displayPercentageOnDataLabel:!1,displayPercentageOnTooltip:!0,sliceGrouping:{sliceId:hn.defaultGroupOfSlicesId,percentageThreshold:0,fillSymbol:{type:Se.SFS,color:[210,210,210,255*dt]}},defaultPadding:0,alignDataLabels:!1,ticksOpacity:1,minimumSize:20,technicalFieldSliceId:"arcgis_charts_slice_id",technicalFieldSlicePercent:"arcgis_charts_slice_percent",technicalFieldGroupedSlices:"arcgis_charts_grouped_slices"},pieSliceCustomLabelName:"customLabel",yAxisLabelMaxWidth:100,xAxisLabelMaxWidth:75,axisLabelPadding:1.5,categoryAxisLabelPadding:3,seriesSort:Ne.Ascending,technicalSortingFieldBySum:"arcgis_charts_category_sum",technicalSortingFieldByPercent:"arcgis_charts_category_first_series_percent",technicalFieldSplitByField:"arcgis_charts_split_by_field",color:[0,0,0,255],chartEllipsis:"...",backgroundColor:[255,255,255,255],grayColor:cn,xAxisMinGridDistance:120,xCategoryAxisMinGridDistance:40,yAxisMinGridDistance:40,yCategoryAxisMinGridDistance:20,secondRotatedValueAxisMinGridDistance:80,staggerMinGridDistance:40,shortestMinGridDistance:20,maxNumberOfXAxisLabelsInWrapModeForDateAxis:15,maxNumberOfXAxisLabelsInWrapMode:20,lineWidth:1,loaderRotationSpeed:400,loaderIntervalTimeout:400,loaderLabelFontSize:20,selectionTheme:{selectedElementsTheme:{elementOutlineColor:[0,255,255,255],elementOutlineWidth:5}},columnTooltipPosition:"pointer",guideTooltipPosition:"pointer",markerTooltipPosition:"fixed",sliceTooltipPosition:"fixed",patternLineProperties:{width:5,height:5,strokeWidth:1,tileSize:50,diagonalTileSize:1200},patternRectProperties:{rectWidth:9,rectHeight:9,width:10,height:10,strokeWidth:.3,fillOpacity:0},originalCategoryValue:"arcgis_charts_original_category_value",originalYCategoryValue:"arcgis_charts_original_category_y_value",originalDateValue:"arcgis_charts_original_date_value",dateBinningRange:"arcgis_charts_bin_range",originalServerBinningRange:"arcgis_charts_server_bin_range",dateBinModel:"arcgis_charts_bin_model",xAxisField:"arcgis_charts_axis_field",nullValue:"arcgis_charts_null",queryMaxFloatPrecision:10,dateFormatUTC:{timeZone:"UTC",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},dayDefaultFormat:{day:"numeric",month:"short"},weekDefaultFormat:{day:"numeric",month:"short"},rendererOtherValue:"arcgisChartsrendererOtherValue",rendererSymbolField:"arcgis_charts_renderer_symbol",rendererSymbolFieldForHistogram:"symbol",scatterplotAggregationFields:{dataContextXMinField:"arcgis_charts_xmin",dataContextXMaxField:"arcgis_charts_xmax",dataContextYMinField:"arcgis_charts_ymin",dataContextYMaxField:"arcgis_charts_ymax",dataContextCountDistinctX:"distinctX",dataContextCountDistinctY:"distinctY",queryNumberOfFeatures:"numberOfFeatures",queryNumberOfAggregatedFeatures:"numberOfAggregatedFeatures",xStep:"xStep",yStep:"yStep",rowCount:"rowCount",columnCount:"columnCount",realGridSize:"realGridSize"},dataTooltipVisible:!0,dataTooltipStyle:{outline:{type:Se.SLS,color:[255,255,255,255],width:1}},dataTooltipStyleReversed:{color:[255,255,255,255],outline:{type:Se.SLS,width:3}},tooltipWidth:300,axisLabelOveredOpacity:.5,generalFontSize:10,actionMode:Cb.MultiSelectionWithCtrlKey,debounceTime:100,chartDefaultPaddingRight:0,htmlEmptyContent:"<p></p>",boxPlot:{boxPlotCategory:"arcgis_charts_box_plot_category",boxPlotOutliersSuffix:"_arcgis_charts_outliers",boxPlotOutliersVisibility:!1,boxPlotStandardizeValuesVisibility:!1,boxPlotOutliersSize:4,boxPlotLineWidth:2,boxPlotOutlierId:"is_arcgis_charts_outlier",boxPlotMeanLineMarkerId:"is_arcgis_charts_mean_marker",boxPlotWhiskersColor:[153,153,153,178.5],boxPlotTooltipLabelWidth:250},binTemporalData:!0,lastTemporalBin:"is_arcgis_charts_last_bin",options:{hideEmptySeries:!0,showEmptySeries:!1,replaceNoValueCategoryWithZero:!0,hideZeroCountCategories:!1,autoInverseDataLabelTextColor:!1},nullCategory:{text:"null",symbol:{type:Se.SFS,color:cn,outline:{type:Se.SLS,style:yr.Solid,color:cn,width:1}}},classBreaks:{breaksCount:5}},ei={LegendItemVisibilityChange:"arcgisChartsJSLegendItemVisibilityChange",RenderingComplete:"arcgisChartsJSRenderingComplete",SeriesColorsChange:"arcgisChartsJSSeriesColorChange",AxesMinMaxChange:"arcgisChartsJSAxesMinMaxChange",SelectionComplete:"arcgisChartsJSSelectionComplete",TooManySelectedElements:"arcgisChartsJSTooManySelectedElements",SeriesOrder:"arcgisChartsJSSeriesOrder"};function ti(t){return{detail:t,composed:!0,cancelable:!0,bubbles:!0}}function yT(t,e){e&&e.dispatchEvent(new window.CustomEvent(ei.LegendItemVisibilityChange,ti(t)))}function gT(t){t&&t.dispatchEvent(new window.CustomEvent(ei.RenderingComplete,ti()))}function bT(t){let{data:e,htmlContainer:r}=t;r&&r.dispatchEvent(new window.CustomEvent(ei.SelectionComplete,ti(e)))}function vT(t){t&&t.dispatchEvent(new window.CustomEvent(ei.TooManySelectedElements,ti()))}function ST(t){let{data:e,htmlContainer:r,chartId:a,colorMatchApplied:i}=t;r&&r.dispatchEvent(new window.CustomEvent(ei.SeriesColorsChange,ti({chartId:a,data:e,colorMatchApplied:i})))}function wT(t,e){e&&e.dispatchEvent(new window.CustomEvent(ei.AxesMinMaxChange,ti(t)))}function Zb(t){let{data:e,htmlContainer:r}=t;r&&e&&r.dispatchEvent(new window.CustomEvent(ei.SeriesOrder,ti(e)))}function Kb(t){return t!==void 0&&t!==Qt.Solid&&t!==Qt.Null}function xT(t,e){let r="",a=(e??0)/2,i=0-a,n=0+a,s=0-a,o=0+a;switch(t){case Gt.Circle:r=`M ${i},0 a ${a},${a} 0 1,0 ${a*2},0 a ${a},${a} 0 1,0 ${-a*2},0`;break;case Gt.Cross:r=`M ${i},0 L ${n},0 M 0,${s} L 0,${o} E`;break;case Gt.Diamond:r=`M ${i},0 L 0,${s} L ${n},0 L 0,${o} L ${i},0 Z`;break;case Gt.Square:r=`M ${i},${o} L ${i},${s} L ${n},${s} L ${n},${o} L ${i},${o} Z`;break;case Gt.Triangle:r=`M ${i},${o} L 0,${s} L ${n},${o} L ${i},${o} Z`;break;case Gt.X:r=`M ${i},${o} L ${n},${s} M ${i},${s} L ${n},${o} E`;break}return r}var Fi={...A,titleAndSubtitlePaddingBottom:5,chartPadding:5,footerContainer:{...A.footerContainer,paddingTop:0,paddingBottom:0},headerContainer:{...A.headerContainer,paddingBottom:18},chartContainer:{...A.chartContainer},dataLabel:{...A.dataLabel,verticalCenter:"bottom"},scrollbarPadding:12,zIndexes:{guide:100,scatterplotTrendLine:2,lineSeries:1,axisLineLayer:30},verticalSurfaceGuideLabels:{wrap:!0},verticalLineGuideLabels:{wrap:!0,rotation:90},horizontalSurfaceGuideLabels:{wrap:!0},horizontalLineGuideLabels:{wrap:!0},overlayId:{scatterplotTrendLine:"arcgis_charts_scatter_plot_trendline",histogramMean:"arcgis_charts_histogram_mean",histogramMedian:"arcgis_charts_histogram_median",histogramStdDev:"arcgis_charts_histogram_std_dev",histogramNormalDistribution:"arcgis_charts_histogram_normal_distribution"},axisLabelSpacing:{verticalAxisLabelSidePadding:8,horizontalAxisLabelPaddingTop:6},legendPadding:20,heatChart:{gradientHeatRules:{minColor:[255,255,200,255],maxColor:[255,0,0,255],outsideRangeLowerColor:[250,250,250,255],outsideRangeUpperColor:[0,0,255,255]},legend:{position:Vi.Bottom,chartPadding:40,legendPadding:20,width:70,bottomHeight:20,topHeight:50,titleHeight:10,titlePadding:10,minMaxLabelPadding:3},emptyCells:{symbol:{type:Se.SFS,style:Qt.Solid,color:A.grayColor},text:"null"},includeLeapDay:!1},heatChartLabelPadding:{paddingTop:2},heatChartFirstDayOfWeek:7,pieChartDataLabel:{minWidth:30},focusableThreshold:500};function Jb(t){let e;return t?.[0]!==void 0&&(e=t.reduce((r,a)=>({...r,xmin:Math.min(r.xmin,a.xmin),xmax:Math.max(r.xmax,a.xmax),ymin:Math.min(r.ymin,a.ymin),ymax:Math.max(r.ymax,a.ymax)}),t[0])),e}function ta(t){let{value:e,dataContext:r,specificField:a,keepNullValues:i=!1,useRendererLabel:n=!1,config:s}=t,o=e,{originalCategoryValue:l,originalDateValue:d}=A;if(r!==void 0){let c=n?pv(r):void 0;a!==void 0&&r[a]!==void 0?o=r[a]:c!==void 0?o=c:r[d]!==void 0?o=r[d]:r[l]!==void 0?o=r[l]:r[lt]!==void 0&&(o=r[lt]),!i&&o===null&&(o="null",s?.series?.[0].type===g.BarSeries&&(o=s.series?.[0]?.nullCategory?.text??Fi.nullCategory?.text??o))}return o}function Yb(t){return t?.[A.originalCategoryValue]}function ra(t){let{arrayToSort:e,orderBy:r,sortingField:a,forceAscendingOrder:i,isNonAggregated:n,sortByCategory:s,preferLabel:o,isPieOrByFieldsChart:l}=t;if(e!==void 0&&e.length>1){let d=r===Ne.Descending&&i!==!0;e.sort((c,u)=>{let f=0,p=c[a];s===!0&&!l&&(p=ta({value:`${c[a]?.toString()}`,dataContext:c,specificField:o?A.xAxisField:void 0}));let h=u[a];return s===!0&&!l&&(h=ta({value:`${u[a]?.toString()}`,dataContext:u,specificField:o?A.xAxisField:void 0})),n===!0&&d&&s===!0&&(p=Number.isNaN(Number.parseFloat(`${p?.toString()}`))?p:Number.parseFloat(p),h=Number.isNaN(Number.parseFloat(`${h?.toString()}`))?h:Number.parseFloat(h)),s===!0&&(c[A.originalCategoryValue]===null||p===null)||c[hn.defaultGroupOfSlicesId]===!0?f=1:s===!0&&(u[A.originalCategoryValue]===null||h===null)||u[hn.defaultGroupOfSlicesId]===!0?f=-1:typeof p=="string"&&typeof h=="string"?(f=p.localeCompare(h,void 0,{numeric:!0}),d&&(f*=-1)):p===void 0?f=d?-1:1:h===void 0?f=d?1:-1:p!==null&&h!==null&&(p>h?f=d?-1:1:p<h&&(f=d?1:-1)),f})}}function Xb(t){let{arrayToSort:e,orderBy:r,sortingField:a,fieldList:i,isByFieldsChart:n,preferLabel:s}=t;e!==void 0&&e.length>1&&!_e(a)&&r!==void 0&&r.length>0&&e.sort((o,l)=>{let d=o[a];s&&n&&typeof d=="string"&&(d=Ys(i,d));let c=r.indexOf(d?.toString()??"");c===-1&&(c=r.length);let u=l[a];s&&n&&typeof u=="string"&&(u=Ys(i,u));let f=r.indexOf(u?.toString()??"");return f===-1&&(f=r.length),c-f})}function fp(t){let{statsMap:e,dataContext:r,chartLimits:a}=t,i=!1;if(e!==void 0){let{maxScatterPointsBeforeAggregation:n}=Xr(a),{queryNumberOfFeatures:s}=A.scatterplotAggregationFields;i=(e.get(s)??Number.NaN)>=n}else r!==void 0&&(i=A.scatterplotAggregationFields.dataContextXMinField in r);return i}function ev(t){let e=!0,r=K(t.series);if(r===g.BarSeries||r===g.LineSeries||r===g.ComboLineAndBarSeries){let a=X(t.series);e=a!==x.BarAndLineNoAggregation&&a!==x.BarAndLineSplitByNoAggregation}return e}function tv(t){return X(t.series)!==x.PieNoAggregation}function rv(t){let{dataContext:e,chartConfig:r,chartLimits:a}=t,i=!0;if(r!==void 0)switch(K(r.series)){case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:i=ev(r);break;case g.ScatterSeries:i=fp({dataContext:e,chartLimits:a});break;case g.PieSeries:i=tv(r);break}return i}function iv(t,e){let r=t;switch(e){case Oe.Log:r=`log(${t})`;break;case Oe.Sqrt:r=`power(CAST(${t} AS FLOAT),0.5)`;break}return r}function Ii(t){let e=new Date(t).valueOf();return Number.isNaN(e)||(e=new Intl.DateTimeFormat("en-US",A.dateFormatUTC).format(t).replace(",","")),e}function mn(t){let{dataToConvert:e,x:r,y:a,fieldList:i}=t,n=[];if(e){let s=e[Ar];Object.entries(e).forEach(([o])=>{if(o!==""&&o!==Ar&&o in e){let l={[r]:Ys(i,o),[a]:e[o],[A.xAxisField]:o,[A.originalCategoryValue]:o};s!==void 0&&(l[Ar]=s),e[`${A.rendererSymbolField}_${o}`]!==void 0&&(l[A.rendererSymbolField]=e[`${A.rendererSymbolField}_${o}`]),n.push(l)}})}return n}function av(t,e){let r=!0;if(t!==void 0&&t.length>1&&!_e(e)){let a=0,i=0,n=0;t.forEach(s=>{let o=s[e];!Wv(o)||o===0?n+=1:o>0?a+=1:i+=1}),r=n===t.length||a>=0&&i===0||a===0&&i>=0}return r}function on(t){let{countTotal:e,countPerSeries:r,numberOfSeries:a}=t,i,n=[];return typeof e=="number"&&Number.isFinite(e)&&n.push(e),typeof r=="number"&&Number.isFinite(r)&&n.push(r*a),n.length>0&&(i=Math.min(...n)),i}function hp(t,e){let r,{maxBarChartSeriesCount:a,maxBarUniqueSeriesCountTotal:i,maxBarTwoSeriesCountPerSeries:n,maxBarTwoSeriesCountTotal:s,maxBarThreePlusSeriesCountPerSeries:o,maxBarThreePlusSeriesCountTotal:l,maxLineChartSeriesCount:d,maxLineUniqueSeriesCountTotal:c,maxLineTwoSeriesCountPerSeries:u,maxLineTwoSeriesCountTotal:f,maxLineThreePlusSeriesCountPerSeries:p,maxLineThreePlusSeriesCountTotal:h,maxPieChartSliceCountTotal:m,maxGaugeByFeaturesLimit:y}=Xr(e),b=K(t.series),v=t.series.length===0?1:t.series.length,S=X(t.series);switch(b){case g.ComboLineAndBarSeries:case g.BarSeries:v<=a&&(v===1?r=i:v===2?r=on({countTotal:s,countPerSeries:n,numberOfSeries:v}):v>2&&(r=on({countTotal:l,countPerSeries:o,numberOfSeries:v})));break;case g.LineSeries:v<=d&&(v===1?r=c:v===2?r=on({countTotal:f,countPerSeries:u,numberOfSeries:v}):v>2&&(r=on({countTotal:h,countPerSeries:p,numberOfSeries:v})));break;case g.PieSeries:r=m;break;case g.GaugeSeries:r=y;break;case g.ScatterSeries:case g.HistogramSeries:case g.BoxPlotSeries:}return(S===x.BarAndLineNoAggregation||S===x.BarAndLineMultiFields)&&r!==void 0&&(r=Math.ceil(r/v)),r}function ku(t,e){let r=t;if(Number.isFinite(t)){let{factor:a,offset:i}=e??{};Number.isFinite(a)&&(r*=a),Number.isFinite(i)&&(r+=i)}return r}function nv(t){let e=!1;if(t!==void 0){let r=t.replace(" ",""),a=/^%(0*100{1,1}\.?((?:\.)0*)?$)|(^%0*\d{0,2}\.?((?:\.)\d*)?)$/u,i=/^(0*100{1,1}\.?((?:\.)0*)?%$)|(^0*\d{0,2}\.?((?:\.)\d*)?%)$/u;e=a.test(r)||i.test(r)}return e}function CT(t){let e;if(nv(t)){let r=/%(\d{1,3}(.\d+)?)$/u,a=/(\d{1,3}(.\d+)?)%$/u,i=t.replace(" ",""),n=r.exec(i)?.[1]??a.exec(i)?.[1];n!==void 0&&(e=Number(n))}return e}function sv(t){let{stringToTruncate:e,characterLimit:r,ellipsis:a=A.chartEllipsis}=t,i=e;return typeof r=="number"&&Number.isFinite(r)&&r>0&&r<e.length&&(i=e.slice(0,r),i=`${i}${a}`),i}function TT(t,e=":"){return t?`\u200F${e}`:`\u200E${e}`}function FT(t){return e=>{let r=typeof e!="string"?e?.toString()??"":e;return!_e(r)&&r!==A.htmlEmptyContent&&(r=sv({stringToTruncate:r,characterLimit:t})),r}}function ov(t){let e=/[[]/gu,r=/[\]]/gu,a=/[{]/gu,i=/[}]/gu,n=/[']/gu;return t=t.replace(e,"[["),t=t.replace(r,"]]"),t=t.replace(a,"{{"),t=t.replace(i,"}}"),t=t.replace(n,"''"),t}function lv(t,e){let r="";return t!==void 0&&(r=`${e==="amChartsV5"?"fontStyle":"font-style"}:${t};`),r}function dv(t,e){let r="";return t===!0&&(r=`${e==="amChartsV5"?"letterSpacing":"letter-spacing"}:1px;`),r}function IT(t){let{textSymbol:e,placeholderString:r,format:a,axisLabelsBehavior:i,defaults:n}=t,s=lv(e?.font?.style,a),o=dv(e?.kerning,a),l=r??e?.text??"";if(a==="html"){let{wrap:d,maxWidth:c}=n??{};i===No.Wrap&&(d=!0,c=c??A.xAxisLabelMaxWidth);let u=d===!0&&Number.isFinite(c)?`max-width: ${c}px; word-break: break-word;`:"";l=`<p style="margin:0;${s}${o}${u}">${l}</p>`}else l=ov(l),(s!==""||o!=="")&&(l=`[${s}${o}]${l}[/]`);return l}function cv(t){return t?t.replace(/[A-Z]/gu,e=>`-${e.toLowerCase()}`):void 0}var OT=[g.BarSeries,g.BoxPlotSeries,g.LineSeries,g.PieSeries,g.HistogramSeries,g.ScatterSeries],AT=1,PT={PNG:"png"},Ci={ChartRenderer:1,LayerRenderer:2};function ET(t){let{chartConfig:e,queryObject:r}=t,a=!1;if(e.chartRenderer)a=!0;else{let{series:i}=e,n=K(i),s=X(i),o=pr(e),l=fr({seriesConfig:o,queryObject:r}),d=se(r)?.renderer;switch(d?.type){case Xe.Simple:a=n===g.HistogramSeries||n===g.ScatterSeries||s===x.BarAndLineMonoField||s===x.BoxPlotMonoField||s===x.BoxPlotMultiFields||s===x.BoxPlotMonoFieldAndCategory||s===x.BarAndLineNoAggregation&&i.length===1&&!l;break;case Xe.UniqueValue:{let c=d?.field,u=Ze(o.query?.where),{x:f}=o;a=(s===x.BoxPlotMonoFieldAndSplitBy||s===x.BoxPlotMultiFieldsAndSplitBy||s===x.BoxPlotMonoFieldAndCategoryAndSplitBy||s===x.BarAndLineSplitByNoAggregation||s===x.BarAndLineSplitBy)&&c===u||(s===x.BoxPlotMonoFieldAndCategory||s===x.PieFromCategory||s===x.BarAndLineMonoField)&&c===f||s===x.BarAndLineNoAggregation||s===x.PieNoAggregation||n===g.ScatterSeries}break;case Xe.PieChart:a=s===x.PieFromFields||s===x.BarAndLineFromFields||s===x.BarAndLineMultiFields||s===x.BarAndLineMonoField||s===x.BoxPlotMonoField||s===x.BoxPlotMultiFields||s===x.BoxPlotMonoFieldAndCategory||s===x.BoxPlotMultiFieldsAndCategory;break;case Xe.ClassBreaks:a=n===g.HeatSeries||n===g.ScatterSeries||s===x.BarAndLineNoAggregation||s===x.PieNoAggregation;break;case Xe.Dictionary:case Xe.DotDensity:case Xe.Heatmap:break}}return a}function uv(t,e){return cv(t?.type)??e?.type}function pv(t){let e=A.rendererSymbolField,r=e in t?e:void 0;if(!r){let a=t[A.originalCategoryValue];r=Object.keys(t).find(i=>{let n=t[i];return i.includes(e)&&n?.label&&n?.uniqueValue===a}),r||(r=Object.keys(t).find(i=>i.includes(e))??"")}return t[r]?.label}function fv(t){return t?.type!==void 0&&(t.color!==void 0||t.label!==void 0||t.style!==void 0||t.outline!==void 0)}function mp(t){let{symbolField:e,dataItem:r,rendererSymbol:a,rendererOrigin:i}=t,n=!1;if(!fv(a))delete r[e];else{let s={...a};s.color!==void 0&&i===Ci.LayerRenderer&&(s.color[3]=dt*255),i===Ci.LayerRenderer&&(delete s.style,delete s.outline,delete s.label),r[e]=s,n=!0}return n}function hv(t){let{renderer:e,seriesConfig:r,chartSubType:a,dataItem:i,rendererOrigin:n}=t,s,o=!1,l=K(r),{outline:d,attributes:c}=e;return c.forEach(u=>{let{field:f}=u,{color:p,label:h}=u,m;Array.isArray(p)&&p?.length===4?m=p:p&&"toRgba"in p&&(m=p.toRgba());let y=!1,b=!0;switch(l){case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:case g.RadarSeries:if(a!==x.BarAndLineFromFields){let v=r.find(S=>S.query?.outStatistics?.[0]?.onStatisticField===f);v!==void 0&&"y"in v?f=[v.y].flat()[0]:f=""}y=a!==x.BarAndLineFromFields||f===i[A.originalCategoryValue];break;case g.PieSeries:y=a===x.PieFromFields&&f===i[A.originalCategoryValue];break;case g.BoxPlotSeries:a===x.BoxPlotMonoField||a===x.BoxPlotMonoFieldAndCategory?y=f===r[0].y:f&&(a===x.BoxPlotMultiFields||a===x.BoxPlotMultiFieldsAndCategory)&&(y=r.map(v=>v.y).flat().includes(f)),b=!1;break}y&&m&&(s={type:Se.SMS,color:m,label:b&&h?h:void 0},d!=null&&(s.outline=d),mp({dataItem:i,symbolField:a===x.BarAndLineFromFields||a===x.PieFromFields?A.rendererSymbolField:`${A.rendererSymbolField}_${f}`,rendererSymbol:s,rendererOrigin:n})&&(o=!0))}),{rendererSymbol:s,colorMatchApplied:o}}function mv(t){let{seriesConfig:e,chartSubType:r,rendererType:a}=t,i=A.rendererSymbolField;if(a===Xe.UniqueValue){if(xp(r)){let n=ct({where:e.query?.where,keepSurroundingQuotes:!1,escape:!1});n===null?i=A.nullValue:r===x.BarAndLineSplitBy&&typeof e.y=="string"?i=e.y:r===x.BarAndLineSplitByNoAggregation&&typeof e.y=="string"?i=`${e.y}_${n}`:i=`${n}`}}else if(a===Xe.PieChart)switch(r){case x.BoxPlotMultiFields:i=Array.isArray(e.y)?e.y.flat():e.y;break;case x.BarAndLineMonoField:case x.BarAndLineMultiFields:case x.BoxPlotMonoField:case x.BoxPlotMonoFieldAndCategory:case x.BoxPlotMultiFieldsAndCategory:i=e.y;break}return i}function yp(t){let{seriesConfig:e,chartSubType:r,rendererType:a,dataItem:i}=t,n=mv({seriesConfig:e,chartSubType:r,rendererType:a});return n instanceof Array&&e.type===g.BoxPlotSeries&&a===Xe.PieChart&&i!==void 0&&(n=n.find(s=>s===i[Di])??n[0]),n=n!==A.rendererSymbolField?`${A.rendererSymbolField}_${n.toString()}`:n,n}function yv(t){let{chartRenderer:e,queryObject:r}=t,a=e!==void 0?{...se(r),renderer:ao.fromJSON(e)}:se(r);return new Gg({layer:a})}async function gv(t){let{seriesConfig:e,dataItem:r,renderer:a,rendererType:i,rendererOrigin:n,chartSubType:s,splitByField:o,graphicTemplate:l,rendererFieldNames:d,mapAttributesToSymbol:c}=t,u,f=!1;if(i===Xe.PieChart){let p=hv({renderer:a,seriesConfig:e,chartSubType:s,dataItem:r,rendererOrigin:n});u=p.rendererSymbol,f=p.colorMatchApplied}else if(r?.[hn.defaultGroupOfSlicesId]!==!0){let{x:p}=e[0],h=new Map;o&&o.trim()!==""?e.forEach(m=>{if(m.type===g.BarSeries||m.type===g.LineSeries||m.type===g.BoxPlotSeries||m.type===g.RadarSeries){let y=yp({seriesConfig:m,chartSubType:s,rendererType:i,dataItem:r}),b=ct({where:m.query?.where,normalize:!0,keepSurroundingQuotes:!1,escape:!1});h.set(y,{...r,[o]:b})}}):e[0].type===g.HeatSeries&&i===Xe.ClassBreaks?h.set(A.rendererSymbolField,{[te.valueField]:r[te.valueField]}):h.set(K(e)===g.HistogramSeries?A.rendererSymbolFieldForHistogram:A.rendererSymbolField,{...r,[p]:Yb(r)});try{let m=Array.from(h.entries()),y=l.clone();y.layer=l.layer;let b=a?.uniqueValueInfos;for(let v=0;v<m.length;v+=1){let[S,C]=m[v];if(Wu({mode:"encode",x:p,splitByField:o,attributes:C}),d&&d.length>0&&Object.keys(C).forEach(F=>{d.includes(F)||delete C[F]}),y.attributes=C,c?.has(JSON.stringify(C)))u=c.get(JSON.stringify(C));else{if(u=(await Li.getDisplayedSymbol(y))?.toJSON(),u!=null){if(u.color===void 0){let I=(await Li.getDisplayedColor(y))?.toJSON();I&&(u.color=I.length===4?I:[...I,255])}let F=await Li.getLegendLabel(y);F!=null&&F!==""&&(u.label=F,u.uniqueValue=b?.find(I=>I.label===F)?.value??void 0)}c?.set(JSON.stringify(C),u)}Wu({mode:"revert",x:p,splitByField:o,attributes:r}),mp({dataItem:r,symbolField:S,rendererSymbol:u,rendererOrigin:n})&&(f=!0)}}catch{}}return{rendererSymbol:u,colorMatchApplied:f}}function Wu(t){let{splitByField:e,attributes:r,x:a,mode:i}=t;[a,e??""].forEach(n=>{r[n]===(i==="encode"?null:A.nullValue)&&(r[n]=i==="encode"?A.nullValue:null)})}function bv(t){let{dataItem:e,seriesConfig:r,chartSubType:a,colorMatch:i,rendererType:n}=t,s;if(i&&e!==void 0){let o=yp({seriesConfig:r,chartSubType:a,rendererType:n,dataItem:e});s=e[o]}return s}function LT(t){let{seriesSymbol:e,rendererSymbol:r,colorIndex:a}=t,i=r?.color??e.color;i=i??Lt({colorIndex:a,opacity:dt});let n={...e,color:i},s=n.type===Se.SFS&&Kb(n.style);return r?.type===e.type&&r.style!==void 0&&!s&&(n.style=r.style),n.type!==Se.SLS&&(n.outline={type:Se.SLS,style:r?.outline?.style??n.outline?.style,width:r?.outline?.width??n.outline?.width,color:r?.outline?.color??n.outline?.color??r?.color}),n}function vv(t){let e=[];return t&&(e=t.series.flatMap(r=>r.query?.outStatistics?.map(a=>a.onStatisticField)).filter(r=>r!==void 0),e.length===0&&(e=it(t.series))),e}function DT(t,e){let r=!1;if(t&&e&&e.length>0&&Sp(t)){let a=Cv(t),i=pr(t);a?r=vv(t).some(n=>e.includes(n)):r=e.includes(i.x)}return r}function Sv(t){let e=[];if(t&&"type"in t&&typeof t.type=="string")switch(t.type){case"uniqueValue":case"unique-value":"field1"in t&&typeof t.field1=="string"&&(e=[t.field1]);break;case"classBreaks":case"class-breaks":"field"in t&&typeof t.field=="string"&&(e=[t.field]);break;case"pieChart":case"pie-chart":"attributes"in t&&Array.isArray(t.attributes)&&(e=t.attributes.map(r=>r.field));break}return e}function Kr(t){return K(t?.series)===g.HeatSeries}function rt(t){return K(t?.series)===g.BoxPlotSeries}function wv(t,e){return t[0].dataTransformationType!==e[0].dataTransformationType}function xv(t,e){return t[0].binCount!==e[0].binCount}function NT(t,e){let r=!0,a=K(t?.series),i=K(e?.series);return a&&a!==i&&(r=a===g.ComboLineAndBarSeries&&(i===g.BarSeries||i===g.LineSeries)||i===g.ComboLineAndBarSeries&&(a===g.BarSeries||a===g.LineSeries)||a===g.BarSeries&&i===g.LineSeries||a===g.LineSeries&&i===g.BarSeries),r}function Zs(t,e){return t!==void 0&&e!==void 0&&e>0}function BT(t){let{chartConfig:e,queryObject:r,chartData:a}=t,i=[],n=X(e.series),s=Sp(e),o=se(r),l=e.chartRenderer??o?.renderer?.toJSON();return i=e.series.map((d,c)=>{let u=K([d]),f;return(u===g.BarSeries||u===g.LineSeries||u===g.RadarSeries)&&(d.type===g.BarSeries?f=d.fillSymbol?.color:(d.type===g.RadarSeries||d.type===g.LineSeries)&&(f=d.lineSymbol?.color),s?f=bv({dataItem:a[0],seriesConfig:d,chartSubType:n,colorMatch:s,rendererType:l?.type})?.color:f===void 0&&(f=Lt({colorIndex:c}))),f}).filter(d=>d!==void 0),i}function Ks(t){return t!==x.PieNoAggregation&&t!==x.BarAndLineNoAggregation&&t!==x.BarAndLineSplitByNoAggregation}function Cv(t){let e=X(t.series);return e===x.BarAndLineFromFields||e===x.PieFromFields||e===x.BoxPlotMonoField||e===x.BoxPlotMultiFields||e===x.BoxPlotMonoFieldAndSplitBy||e===x.BoxPlotMultiFieldsAndSplitBy}function Oi(t){return rt(t)?t?.showMean??!1:!1}function Tv(t){return rt(t)?t?.showOutliers:void 0}function $T(){return`{name} {${A.originalCategoryValue}} {dateY} {valueX} {dateX} {valueY}`}var H={Min:"min",FirstQuartile:"first_quartile",Median:"median",ThirdQuartile:"third_quartile",Max:"max",IQR:"iqr",Average:"avg",StandardDeviation:"stddev",Outlier:"outlier"};function Fv(t,e){let r=ie.now().offset/60,a=ie.now().setZone(t)??r,i=a.offset/60,n=e?a.setZone(e).offset/60:0;return i-n}function gp(t){let{outTimeZone:e=Intl.DateTimeFormat().resolvedOptions().timeZone,dataTimeZone:r="UTC",runsOnClientQueryEngine:a}=t,i="",n=Fv(e,r);if(n!==0)if(a)i=`${n>0?"+":"-"}1*INTERVAL '${Math.abs(n)}' HOUR `;else{let s=Math.abs(n%1),o=Math.round(s*60);n=Math.floor(n),i=n>0?`+INTERVAL '${Math.abs(n)}:${o!==0?o:"00"}:01' HOUR TO SECOND`:`-INTERVAL '${Math.abs(n)-(o!==0?0:1)}:${o!==0?String(o-1):"59"}:59' HOUR TO SECOND`}return i}function Iv(t){let{dateFieldName:e,unit:r,runsOnClientQueryEngine:a}=t,i=gp({runsOnClientQueryEngine:a}),n=`EXTRACT(YEAR FROM ${e} ${i})`,s=`EXTRACT(MONTH FROM ${e} ${i})`,o=`EXTRACT(DAY FROM ${e} ${i})`,l=`EXTRACT(HOUR FROM ${e} ${i})`,d=`EXTRACT(MINUTE FROM ${e} ${i})`,c=`EXTRACT(SECOND FROM ${e} ${i})`,u=[];switch(r){case Q.Second:u=[n,s,o,l,d,c];break;case Q.Minute:u=[n,s,o,l,d];break;case Q.Hour:u=[n,s,o,l];break;case Q.Day:case Q.Week:case Q.Month:case Q.Year:u=[n,s,o];break}return u}function Ov(t){let{whereValue:e,outStatistics:r,y:a}=t,i=pe.outStatistics.outStatisticFieldName??"";return r?.outStatisticFieldName!==void 0?i=r.outStatisticFieldName:r?.onStatisticField!==void 0&&r.statisticType!==void 0?i=`${r.statisticType}_${r.onStatisticField}_${e}`:a!==void 0&&(i=[a].flat()[0]),i}function Av(t){let e=new Map;for(let r=0;r<t.length;r+=1){let a=t[r],i=a.query?.where;if(i!==void 0&&"y"in a){let n=ct({where:i,normalize:!0,escape:!1});if(n!==""){let s=Ov({whereValue:n,outStatistics:a.query?.outStatistics?.[0],y:a.y});a.y=s,e.set(n,s)}}}return e}function Pv(t){let{uniqueQuery:e,splitByField:r,x:a}=t,i=[...e.groupByFieldsForStatistics??[],a,r].filter(n=>n!==void 0&&n.trim()!==""&&n!==Di);e.groupByFieldsForStatistics=Array.from(new Set(i))}function bp(t){return t.statisticType===W.ContinuousPercentile||t.statisticType===W.DiscretePercentile}function Ev(t){let{uniqueQuery:e,y:r,useGenericOutStatFieldName:a,queryObject:i,chartSubType:n,isTimeBinningSeries:s,returnFeaturesExtent:o,splitByField:l}=t,d=pe.outStatistics;if(e.outStatistics?.[0]!==void 0){n!==x.PieFromFields&&n!==x.BarAndLineFromFields&&(e.outStatistics[0].outStatisticFieldName=a?d.outStatisticFieldName:[r].flat()[0]);let{outStatistics:c}=e;for(let u=0;u<c.length;u+=1){let f=c[u];f!==void 0&&bp(f)&&(s&&!Ai(l,i)?(c[u].statisticType=W.Count,delete c[u].statisticParameters):c[u]={...c[u],statisticParameters:c[u].statisticParameters??{value:pe.defaultStatParameterValue}})}}else{let c=se(i),{idField:u,isTraditionalTypeOID:f}=_t(c),p=f?u:"*";e.outStatistics=[{statisticType:d.statisticType,onStatisticField:p,outStatisticFieldName:a?d.outStatisticFieldName:[r].flat()[0]}]}o===!0&&(!s||_e(l))&&e.outStatistics?.push({statisticType:W.EnvelopeAggregate,onStatisticField:"1"})}function Lv(t){let{chartConfig:e,fetchFullBoxPlotData:r}=t,{series:a}=e,i=Oi(e),n=[{statisticType:W.Average,suffix:H.Average}];r===!0&&(n=[...n,{statisticType:W.Minimum,suffix:H.Min},{statisticType:W.ContinuousPercentile,statisticParameters:{value:.25},suffix:H.FirstQuartile},{statisticType:W.ContinuousPercentile,statisticParameters:{value:.5},suffix:H.Median},{statisticType:W.ContinuousPercentile,statisticParameters:{value:.75},suffix:H.ThirdQuartile},{statisticType:W.Maximum,suffix:H.Max},{statisticType:W.StandardDeviation,suffix:H.StandardDeviation}]);let s=new Set;return i&&"y"in a[0]?[a[0].y].flat().forEach(o=>s.add(o)):a.forEach(o=>{"y"in o&&[o.y].flat().forEach(l=>s.add(l))}),[...s].flatMap(o=>n.map(l=>{let d={onStatisticField:o,statisticType:l.statisticType,outStatisticFieldName:`${o}_${l.suffix}`};return l.statisticType===W.ContinuousPercentile&&(d.statisticParameters=l.statisticParameters),d}))}function Dv(t,e){for(let r=1;r<e.length;r+=1){let a={...e[r].query?.outStatistics?.[0]};a!==void 0&&t.outStatistics!==void 0&&t.outStatistics.push(a)}}function Nv(t){let{uniqueQuery:e,x:r,splitByField:a,unit:i,chartSubType:n,objectIdFields:s,runsOnClientQueryEngine:o}=t;if(i!==void 0){let l=Iv({dateFieldName:r,unit:i,runsOnClientQueryEngine:o});e.orderByFields=l,e.groupByFieldsForStatistics=l,n===x.BarAndLineSplitBy&&!_e(a)?e.groupByFieldsForStatistics.push(a):n===x.BarAndLineNoAggregation&&(e.groupByFieldsForStatistics=s,e.outStatistics=[{onStatisticField:s.length>1?"*":s[0],outStatisticFieldName:`COUNT_${s[0]}`,statisticType:W.Count}])}}function vp(t){let{chartConfig:e,options:r,uniqueQuery:a}=t;if(r?.chartLimits?.behaviorAfterLimit===Dr.RenderUpToTheLimit){let i=hp(e,r?.chartLimits);if(i!==void 0){let n=X(e.series);if(n===x.PieFromFields||n===x.BarAndLineFromFields){if(a.outStatistics?.[0]!==void 0){let s=(d,c)=>d.statisticType===W.EnvelopeAggregate===c,o=a.outStatistics.filter(d=>s(d,!0)),l=a.outStatistics.filter(d=>s(d,!1));l.splice(i),a.outStatistics=[...l,...o]}}else a.num=i}}}function oo(t){let{chartConfig:e,queryConfig:r,options:a,queryObject:i,timeIntervalInfo:n,fetchFullBoxPlotData:s}=t,{setTimeBinningInfoWhenNotProvided:o,returnFeaturesExtent:l}=a??{},d=e.series,c=X(d),u=pr(e),{query:f,x:p}=u,h="y"in u?u.y:void 0,m=fr({xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:o,seriesConfig:u,queryObject:i}),y=new Map,b=!1,v=!1,S=!1,C=!1,F=!1,I={};if(f!==void 0){I=Wr(f);let $=Ze(f.where),_="";switch(r.fetchNullValues!==!0&&(p!==A.boxPlot.boxPlotCategory&&(_=`${p} IS NOT NULL`),$.trim()!==""&&$!==p&&!or(f.where)&&(_=Ae([_,`${$} IS NOT NULL`]))),c){case x.BarAndLineSplitBy:{y=Av(d),C=!0,b=!0,v=!0;break}case x.BarAndLineMultiFields:Dv(I,d),v=!0;break;case x.PieFromFields:case x.BarAndLineFromFields:_="",S=!0,v=!0;break;case x.BarAndLineMonoField:case x.PieFromCategory:v=!0;break;case x.BoxPlotMonoField:case x.BoxPlotMultiFields:S=!0,F=!0;break;case x.BoxPlotMonoFieldAndCategory:case x.BoxPlotMultiFieldsAndCategory:case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:{F=!0,C=!0,S=!0;break}case x.PieNoAggregation:case x.BarAndLineNoAggregation:case x.BarAndLineSplitByNoAggregation:}if(v&&Ev({uniqueQuery:I,y:h,useGenericOutStatFieldName:b,queryObject:i,chartSubType:c,isTimeBinningSeries:m,returnFeaturesExtent:l,splitByField:$}),C&&Pv({uniqueQuery:I,splitByField:$,x:p}),rt(e)&&F&&(I.outStatistics=Lv({chartConfig:e,fetchFullBoxPlotData:s})),S?delete I.orderByFields:r.orderByFields!==void 0&&(I.orderByFields=r.orderByFields.filter(G=>{let V=G.split(" ");return!_e(V[0])})),m&&jt(d[0])){let G=se(i),{idFields:V}=Tn(G);wt(i).find(Z=>Z.name===p)?.type!==ue.DateOnly&&V&&Nv({uniqueQuery:I,x:p,splitByField:Ze(f.where),unit:n?.unit??d[0].temporalBinning?.unit,chartSubType:c,objectIdFields:V,runsOnClientQueryEngine:Kt(i)})}I.where=_}vp({chartConfig:e,options:a,uniqueQuery:I});let{gdbVersion:N,geometry:P,distance:E,units:B,timeExtent:R,where:q,objectIds:L,spatialRelationship:k}=r;return N!==void 0&&(I.gdbVersion=N),P!==void 0&&(I.geometry=P),E!==void 0&&(I.distance=E),B!==void 0&&(I.units=B),R!==void 0&&(I.timeExtent=R),L!==void 0&&(I.objectIds=L),k!==void 0&&(I.spatialRelationship=k),q!==void 0&&(I.where=Ae([I.where,q])),{uniqueQuery:I,mapToStatField:y}}var Qe=class extends Error{constructor(e,r,a){super(r),this.name=e,this.details=a}},Ye={Default:"defaultError",LayerLoadFailure:"layerLoadFailure",QueryFeaturesError:"queryFeaturesError",ChartDisposed:"ChartDisposeError",LayerFieldsNotFound:"layerFieldsNotFound",LayerNotSupported:"layerNotSupported"},x={NonSpecific:"nonSpecific",BarAndLineNoAggregation:"barAndLineNoAggregation",BarAndLineMonoField:"barAndLineMonoField",BarAndLineMultiFields:"barAndLineMultiFields",BarAndLineFromFields:"barAndLineFromFields",BarAndLineSplitBy:"barAndLineSplitBy",BarAndLineSplitByNoAggregation:"barAndLineSplitByNoAggregation",PieNoAggregation:"pieNoAggregation",PieFromCategory:"pieFromCategory",PieFromFields:"pieFromFields",BoxPlotMonoField:"boxPlotMonoField",BoxPlotMultiFields:"boxPlotMultiFields",BoxPlotMonoFieldAndCategory:"boxPlotMonoFieldAndCategory",BoxPlotMultiFieldsAndCategory:"boxPlotMultiFieldsAndCategory",BoxPlotMonoFieldAndSplitBy:"boxPlotMonoFieldAndSplitBy",BoxPlotMultiFieldsAndSplitBy:"boxPlotMultiFieldsAndSplitBy",BoxPlotMonoFieldAndCategoryAndSplitBy:"boxPlotMonoFieldAndCategoryAndSplitBy"},MT={SelectionByClick:"SelectionByClick",SelectionByRange:"SelectionByRange",ProgrammaticSelection:"ProgrammaticSelection",ClearSelection:"ClearSelection"};function Sp(t){return t?.colorMatch??!1}function ju(t){let e=ea();if(t!==void 0){let r=K(t.series);(r===g.BarSeries||r===g.LineSeries||r===g.ComboLineAndBarSeries||r===g.BoxPlotSeries)&&(e=t.rotated??ea())}return e}function qT(t){return t?.map(e=>e.type)??[]}function lo(t){let e=t?.stackedType;if(e===void 0&&t!==void 0){let r=K(t.series);(r===g.BarSeries||r===g.LineSeries||r===g.ComboLineAndBarSeries||r===g.RadarSeries)&&(e=Ub())}return e}function Bv(t){let e=t;return e=e.replace(/'/gu,"''"),e=e.replace(/[/\\"|[\]\\]/gu,"\\$&"),e}function $v(t){let e=!1;if(typeof t!="number"){let r=new Intl.Segmenter;e=Array.from(r.segment(t),a=>a.segment).some(a=>a.charCodeAt(0)>255)}return e}function Js(t){let e=t,r="";t.startsWith("'")&&t.endsWith("'")&&(e=t.slice(1,-1),r="'"),e=e.replace(/'/gu,"''");let a="";return $v(e)&&(a="N"),`${a}${r}${e}${r}`}function wp(t){let{value:e,keepSurroundingQuotes:r,escape:a}=t,i=e?.trim();if(!_e(i)){let n="";i.startsWith("'")&&i.endsWith("'")&&(i=i.slice(1,-1),r&&(n="'")),a&&(i=Bv(i)),i=`${n}${i}${n}`}return i}function sr(t){let{count:e,seriesCount:r,chartType:a,chartLimits:i}=t,{behaviorAfterLimit:n}=i??{},s=!0;if(n!==Dr.RenderUpToTheLimit){let{maxBarChartSeriesCount:o,maxBarUniqueSeriesCountTotal:l,maxBarTwoSeriesCountPerSeries:d,maxBarTwoSeriesCountTotal:c,maxBarThreePlusSeriesCountPerSeries:u,maxBarThreePlusSeriesCountTotal:f,maxLineChartSeriesCount:p,maxLineUniqueSeriesCountTotal:h,maxLineTwoSeriesCountPerSeries:m,maxLineTwoSeriesCountTotal:y,maxLineThreePlusSeriesCountPerSeries:b,maxLineThreePlusSeriesCountTotal:v,maxPieChartSliceCountTotal:S,maxGaugeByFeaturesLimit:C,maxBoxPlotSeriesCount:F,maxBoxUniqueSeriesCountTotal:I,maxBoxTwoSeriesCountTotal:N,maxBoxTwoSeriesCountPerSeries:P,maxBoxThreePlusSeriesCountTotal:E,maxBoxThreePlusSeriesCountPerSeries:B,maxHeatChartCellLimit:R}=Xr(i);switch(a){case g.BarSeries:case g.ComboLineAndBarSeries:{let q=e/r;r<=o?r===0?s=!0:r===1?s=e<=l:r===2?s=e<=c&&q<=d:r>2&&(s=e<=f&&q<=u):s=!1}break;case g.LineSeries:case g.RadarSeries:{let q=e/r;r<=p?r===0?s=!0:r===1?s=e<=h:r===2?s=e<=y&&q<=m:r>2&&(s=e<=v&&q<=b):s=!1}break;case g.PieSeries:s=e<=S;break;case g.BoxPlotSeries:{let q=e/r;r<=F?r===0?s=!0:r===1?s=e<=I:r===2?s=e<=N&&q<=P:r>2&&(s=e<=E&&q<=B):s=!1}break;case g.HeatSeries:s=e<=R;break;case g.GaugeSeries:s=e<=C;break}}return s}function Ys(t=[],e){let r=t.find(a=>a.name===e)?.alias;return r!==""?r??e:e}function RT(t=[],e){let r=t.find(a=>a.alias===e)?.name;return r!==""?r??e:e}function kT(t){let e=!1;switch(K(t)){case g.HeatSeries:case g.PieSeries:e=!0;break;case g.BarSeries:case g.LineSeries:case g.RadarSeries:case g.ComboLineAndBarSeries:case g.BoxPlotSeries:e=t.length>1;break;case g.HistogramSeries:case g.ScatterSeries:{let r=t[0];e=r.overlays!==void 0&&Object.values(r.overlays).some(a=>a.created===!0);break}}return e}function Mv(t){let e=!0;return K(t.series)===g.ScatterSeries&&(e=t.series.length===1),e}function qv(t){let e=!0;return K(t.series)===g.HistogramSeries&&(e=t.series.length<=1&&t.series[0].type===g.HistogramSeries&&(!("dataTransformationType"in t.series[0])||t.series[0].dataTransformationType!==void 0&&Object.values(Oe).includes(t.series[0].dataTransformationType))),e}function Rv(t){let e=!0;return K(t.series)===g.PieSeries&&(e=t.series.length<=1),e}function kv(t,e){let r=K(e?.series),a=r!==void 0&&t.includes(r);if(a&&e!==void 0)switch(r){case g.HistogramSeries:a=qv(e);break;case g.ScatterSeries:a=Mv(e);break;case g.PieSeries:a=Rv(e);break}return a}function _e(t){return t==null||typeof t=="string"&&t.trim()===""}function pn(t,e){let r=e.find(a=>a in t);return{isInItem:r!==void 0,expr:r}}function xn(t){return pn(t,dp)}function WT(t,e){let r;switch(t){case Q.Second:r=e.seconds??"";break;case Q.Minute:r=e.minutes??"";break;case Q.Hour:r=e.hours??"";break;case Q.Day:r=e.days??"";break;case Q.Week:r=e.weeks??"";break;case Q.Month:r=e.months??"";break;case Q.Year:r=e.years??"";break;default:r="";break}return r}function jT(t){let e;switch(t){case ar.Mean:e=1;break;case ar.Median:e=2;break;case ar.StdDev:e=3;break;case ar.Normal:default:e=0;break}return e}function VT(t,e){if(e!==void 0){let{seriesId:r,overlayType:a,visible:i}=t.detail,n;switch(a){case ar.Mean:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.mean);break;case ar.Median:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.median);break;case ar.StdDev:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.standardDeviation);break;case ar.Normal:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.comparisonDistribution);break;case ar.Trendline:e.series[0].type===g.ScatterSeries&&(n=e.series[0].overlays?.trendLine);break;default:n=e.series.find(s=>s.id===r);break}n!==void 0&&(n.visible=i)}}function _T(t){return new Pd().sanitize(t)}function Wv(t){return t!=null&&!Number.isNaN(t)&&Number.isFinite(t)}function jv(t,e){let r={fieldToSort:""};if(!_e(t)){let a=t.trim(),i=a.split(" ").at(-1)?.toUpperCase();i===Ne.Ascending||i===Ne.Descending?r={fieldToSort:a.substring(0,a.lastIndexOf(" ")),orderBy:i}:(r={fieldToSort:a},e!==!1&&(r.orderBy=Ne.Ascending))}return r}function xp(t){return t===x.BarAndLineSplitBy||t===x.BarAndLineSplitByNoAggregation||t===x.BoxPlotMonoFieldAndSplitBy||t===x.BoxPlotMultiFieldsAndSplitBy||t===x.BoxPlotMonoFieldAndCategoryAndSplitBy}function zT(t){return t?.selectionPixelTarget?Dn(t.selectionPixelTarget.pixelRanges):t?.selectionOIDs===void 0||t.selectionOIDs.length===0}function UT(t={arrayA:[],arrayB:[],getKey:e=>e}){let{arrayA:e,arrayB:r,getKey:a}=t;if(r.length===0||e.length===0)return e;let i=new Map;r.forEach((l,d)=>{let c=a(l);i.set(c,d)});let n=[],s=[];e.forEach((l,d)=>{let c=a(l);i.has(c)&&(n.push(d),s.push(l))}),s.sort((l,d)=>{let c=a(l),u=a(d);return i.get(c)-i.get(u)});let o=[...e];return n.forEach((l,d)=>{o[l]=s[d]}),o}function HT(t,e){return(t===x.BarAndLineNoAggregation||t===x.BarAndLineSplitByNoAggregation)&&e!==void 0?e.x:A.xAxisField}function GT(t){let{r:e,g:r,b:a,a:i=1}=t,n=Math.round((1-i)*255+i*e),s=Math.round((1-i)*255+i*r),o=Math.round((1-i)*255+i*a);return .299*n+.587*s+.114*o>128}var Pr=new Map;function Vv(t){return t!==void 0&&"type"in t&&t.type==="imagery"}function _v(t){return t!==void 0&&"type"in t&&t.type==="imagery-tile"}function zv(t){return t!==void 0&&"type"in t&&t.type==="wcs"}function Uv(t){return t==="imagery"||t==="imagery-tile"||t==="wcs"}function Ke(t){return t!==void 0&&"type"in t&&Uv(t.type)}function Hv(t){let e=t?.iLayer?.layerType;return e==="ArcGISImageServiceLayer"||e==="ArcGISTiledImageServiceLayer"||e==="WCS"}function ia(t,e){if(Ke(t))throw new Error(e??"Raster layer is not supported by this operation.")}function QT(t){return t!==void 0&&(!("url"in t)||!t.url)}function Kt(t){return t!==void 0&&"view"in t&&"layer"in t&&t.layer.type==="feature"}function Cp(t){return t!==void 0&&"type"in t&&t.type==="feature"}function Tp(t){return t!==void 0&&"type"in t&&t.type==="subtype-sublayer"}function Gv(t){return Cp(t)||Tp(t)}function ut(t){return Tp(t)?t.parent??void 0:t}function Fp(t){return t?.capabilities?.query?.supportsDistance||ut(t)?.sourceJSON?.advancedQueryCapabilities?.supportsQueryWithDistance===!0}function Qv(t){return t?.capabilities?.queryAttributeBins?.supportsFixedInterval===!0&&t?.capabilities?.queryAttributeBins?.supportsStackBy}function ZT(t){let{chartConfig:e,queryObject:r,options:a}=t,i=K(e?.series),n=Ze(e?.series[0]?.query?.where);return!(i===g.HeatSeries||e&&fr({xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:a?.setTimeBinningInfoWhenNotProvided,seriesConfig:e.series[0],queryObject:r})&&Ai(n,r))}function Ai(t,e){return e!==void 0&&(Kt(e)||!Ke(e)&&"capabilities"in e&&e.capabilities?.queryAttributeBins?.supportsDate===!0&&(_e(t)||e.capabilities?.queryAttributeBins?.supportsStackBy))}function Zv(t){let e=!1,r=ut(se(t))?.sourceJSON;if(r){let a=r.queryBinsCapabilities?.supportsFixedIntervalBin,i=r.queryBinsCapabilities?.supportedStatisticTypes,n=[W.Maximum,W.Count].every(s=>i?.includes(s.toUpperCase())||i?.includes(s.toLowerCase()));e=a&&n}return e}function KT(t){let e;return Kt(t)?e=t.layer:e=t,e}function se(t){let e;return Kt(t)?e=t.layer:e=t,e}function Kv(t){let e=!1,r=ut(t)?.sourceJSON?.advancedQueryCapabilities?.supportedSpatialAggregationStatistics??[],a=t?.capabilities?.query.supportedSpatialAggregationStatistics??{};return e=r.includes("EnvelopeAggregate")||"envelope"in a&&a.envelope===!0,e}function JT(t){let{chartConfig:e,queryObject:r}=t,a;if(r){let i=se(r);Vv(i)?a={id:i.id,layerType:"ArcGISImageServiceLayer"}:_v(i)?a={id:i.id,layerType:"ArcGISTiledImageServiceLayer"}:a={id:i.id,layerType:"ArcGISFeatureLayer"},i.url&&(a.url=i.url)}return{...e,iLayer:a}}function Jv(t){let e;switch(t){case"feet":e="esriSRUnit_Foot";break;case"miles":e="esriSRUnit_StatuteMile";break;case"nautical-miles":e="esriSRUnit_NauticalMile";break;case"us-nautical-miles":e="esriSRUnit_USNauticalMile";break;case"meters":e="esriSRUnit_Meter";break;case"kilometers":e="esriSRUnit_Kilometer";break}return e}async function Yv(t){let{queryObject:e,queryConfig:r,outputFormat:a,dataFormat:i,outAnalytics:n}=t,{where:s,geometry:o,distance:l,units:d,timeExtent:c}=r,u,f=se(e),p=ut(f);if(p){let h={where:Ae([s,p.definitionExpression])},m={query:h},y=Ni(o)?.extent?.toJSON();if(y!==void 0){let v=Jv(d),{xmin:S,ymin:C,xmax:F,ymax:I}=y;h.geometryType="esriGeometryEnvelope",h.geometry=`${S},${C},${F},${I}`,l!==void 0&&(h.distance=l.toString()),v!==void 0&&(h.units=v,o?.spatialReference?.wkid!=null&&(h.inSR=o.spatialReference.wkid.toString()))}c&&(h.time=`${c[0]},${c[1]}`);let b=`${p.url}/${p.layerId}/queryAnalytic?f=${a}&dataFormat=${i}&outAnalytics=${n}`;try{u=(await fn(b,m)).data?.features?.[0]?.attributes}catch(v){let S=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,S.errors.queryError,v)}}return u}function Ip(t,e){return{lowerBoundaryAlias:`charts_lower_boundary_${t}`,upperBoundaryAlias:`charts_upper_boundary_${t}`,stackAlias:`charts_stack_alias_${e}`}}async function Xv(t){let{chartConfig:e,queryObject:r,queryConfig:a,errorStrings:i,options:n}=t,s,o=se(r),l=Qv(o);if(l&&r&&"queryAttributeBins"in r){let{x:d,y:c,xTemporalBinning:u,yTemporalBinning:f}=e.series[0],{outTimeZone:p,firstDayOfWeek:h,includeLeapDay:m}=e,y=f0({queryObject:r,queryConfig:a,x:d,y:c,xTemporalBinning:u,yTemporalBinning:f,configTimeZone:p,firstDayOfWeek:h,includeLeapDay:m,options:n});try{s=await r.queryAttributeBins(y)}catch(b){throw new Qe(Ye.QueryFeaturesError,i.errors.queryError,b)}}if(!l)throw new Qe(Ye.QueryFeaturesError,i.errors.queryBinsNotSupported,i.errors.queryBinsNotSupported);return s}async function e0(t){let{chartConfig:e,queryObject:r,queryConfig:a,returnFeaturesExtent:i,errorStrings:n,abortKey:s}=t,o=e.series[0],l,{x:d,y:c}=o;a.groupByFieldsForStatistics=[d],d!==c&&a.groupByFieldsForStatistics.push(c),a&&i===!0&&!a.outStatistics?.some(u=>u.statisticType===W.EnvelopeAggregate)&&a.outStatistics?.push({statisticType:W.EnvelopeAggregate,onStatisticField:"1"});try{l=await Dt({queryObject:r,queryConfig:a,abortKey:s})}catch(u){throw new Qe(Ye.QueryFeaturesError,n.errors.queryError,u)}return l}async function t0(t){let{queryObject:e,queryConfig:r,xStep:a,xMin:i,xMax:n,x:s,y:o,yStep:l,errorStrings:d}=t,c;if(e&&"queryAttributeBins"in e&&Number.isFinite(a)&&Number.isFinite(l)&&Number.isFinite(i)&&Number.isFinite(n)&&a>0&&l>0){let u=h0({queryObject:e,queryConfig:r,xStep:a,xMin:i,xMax:n,x:s,y:o,yStep:l});try{c=await e.queryAttributeBins(u)}catch(f){throw new Qe(Ye.QueryFeaturesError,d.errors.queryError,f)}}return c}async function r0(t){let{queryConfig:e,x:r,queryObject:a,chartSubType:i,isGaugeByFeature:n}=t,s,o=se(a),{idField:l,isTraditionalTypeOID:d}=_t(o),c=uo({queryObject:a,queryConfig:e});c.outFields=n||i===x.PieNoAggregation||i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation?[d?l:"*"]:[r],c.outFields?.[0]===r&&(c.returnDistinctValues=!0);try{s=await a.queryFeatureCount(c)}catch{s=Number.NaN}return s}async function oa(t){let{queryObject:e,queryConfig:r,abortKey:a}=t,{outStatistics:i}=r,n=new Map;if(i!==void 0&&i.length>0){let s=i.map(c=>{let{statisticType:u,onStatisticField:f,outStatisticFieldName:p}=c;return{statisticType:u,onStatisticField:f,outStatisticFieldName:p?.toUpperCase()}});r.outStatistics=s,delete r.num,delete r.orderByFields;let o=uo({queryObject:e,queryConfig:r}),l;try{l=await e.queryFeatures(o,{signal:a!==void 0?Pr.get(a)?.signal:void 0})}catch(c){if(!so.isAbortError(c)){let u=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,u.errors.queryError,c)}}let d=l?.features?.[0]?.attributes;d!==void 0&&i.forEach(c=>{let{outStatisticFieldName:u}=c;if(u!==void 0){let f=d[u.toLowerCase()]??d[u.toUpperCase()]??d[u];f!==void 0&&n.set(u,f)}})}return n}async function Op(t){let{queryObject:e,queryConfig:r,returnUniqueIdsOnly:a,abortKey:i}=t,n=[],s=se(e),o=m0(s),l=uo({queryObject:e,queryConfig:r,maxRecordCountFactor:o});try{if(a===!0)if("queryObjectIds"in e)n=await e.queryObjectIds(l);else{let{idField:d,isTraditionalTypeOID:c}=_t(s),u=c?d:"*";l.outFields=[u],n=(await e.queryFeatures(l,{signal:i!==void 0?Pr.get(i)?.signal:void 0})).features.map(f=>f.getObjectId())}else n=(await e.queryFeatures(l,{signal:i!==void 0?Pr.get(i)?.signal:void 0})).features}catch(d){if(!so.isAbortError(d)){let c=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,c.errors.queryError,d)}}return n}async function i0(t){let e=[],{featureCount:r,maxRecords:a,queryConfig:i}=t,n=[],s=0,o=i?.start??0;for(;s<pe.maxParallelRequests&&o<r;){let l={...t};l.queryConfig={...i,start:o,num:Math.min(a,r-o)},e.push(Op(l)),o+=a,s+=1}return n=(await Promise.all(e)).flat(),n}async function Dt(t){let{queryObject:e,queryConfig:r,returnUniqueIdsOnly:a,featureCount:i,noBatch:n,abortKey:s}=t,o=[],l=se(e),d=i??1,c=Pp(l);if(n!==!0&&d>c&&l?.capabilities?.query.supportsPagination){let u=0,f=0,p=Math.ceil(d/c),h=Math.ceil(p/pe.maxParallelRequests),m=[];for(;f<h;){u=f*pe.maxParallelRequests*c;let y=i0({queryConfig:{...r,start:u},queryObject:e,maxRecords:c,featureCount:d,returnUniqueIdsOnly:a,abortKey:s});m.push(y),f+=1}o=(await Promise.all(m)).flat()}else(Number.isNaN(d)||d>=0)&&(o=await Op({queryObject:e,queryConfig:r,returnUniqueIdsOnly:a,abortKey:s}));return o}async function YT(t){let{queryObject:e,queryConfig:r,uniqueFeature:a,abortKey:i}=t,n={...r,returnDistinctValues:!0};return await Dt({queryObject:e,abortKey:i,queryConfig:n,returnUniqueIdsOnly:!0,featureCount:a===!0?1:void 0})}function a0(t){if(t!==void 0){let e=Pr.get(t);e!==void 0&&e.abort(),Pr.set(t,new AbortController)}}function Ap(t){return{lowerBoundaryAlias:`charts_lower_boundary_${t}`,upperBoundaryAlias:`charts_upper_boundary_${t}`}}async function n0(t){let{queryObject:e,dateField:r,splitByField:a,queryConfig:i,temporalBinning:n,axisTimeZone:s}=t,o=[],l;if(n){let{unit:d}=n;try{if(d&&(l=Ai(a,e),l&&e&&"queryAttributeBins"in e)){let c=u0({queryObject:e,queryConfig:i,temporalBinning:n,dateField:r,axisTimeZone:s,splitByField:a});o=(await e.queryAttributeBins(c)).features}}catch(c){let u=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,u.errors.queryError,c)}}if(l===!1){let d=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,d.errors.queryBinsNotSupported,d.errors.queryBinsNotSupported)}return o}function s0(t){let e=!t.geometry||t.geometry.type==="extent",r=(t.where??"").toUpperCase(),a=!r.includes("CURRENT_TIMESTAMP")&&!r.includes("CURRENT_DATE")&&!r.includes("CURRENT_TIME");return e&&a}function Pp(t){let e=pe.maxRecords;if(t&&"sourceJSON"in t&&t.sourceJSON?.maxRecordCount){let{sourceJSON:r}=t;e=r.maxRecordCount,r.advancedQueryCapabilities?.supportsMaxRecordCountFactor===!0&&(e*=pe.maxRecordCountFactor)}return e}function Ae(t,e){let r,a=Array.from(new Set(t)).filter(i=>i!=null&&i!==""&&!or(i));return a.sort((i,n)=>n.length-i.length),a.length===1?[r]=a:a?.forEach(i=>{i!==void 0&&(_e(r)?r=`(${i})`:r?.includes(`(${i})`)||(r=`${r} ${e??"AND"} (${i})`))}),r??"1=1"}function o0(t,e){let r=e;if(t!==void 0){let a=se(t),i=ut(a)?.timeExtent;i?.start!=null&&i?.end!=null&&(r=[i.start.valueOf(),i.end.valueOf()])}return r}function l0(t){let{queryObject:e,defaultGeometry:r,ignoreViewExtent:a}=t,i=r;if(!a&&Kt(e)){let n=e.view.extent,{xmin:s,xmax:o,ymin:l,ymax:d,zmin:c,zmax:u}=n;i={xmin:s,ymin:l,zmin:c,xmax:o,ymax:d,zmax:u,spatialReference:n.spatialReference.toJSON()}}return i}function Ni(t){let e;return t!==void 0&&(e=no.fromJSON(t)),e}function d0(t){return t===void 0?["*"]:Array.from(new Set(t))}function Cn(t){let{queryType:e,queryObject:r,queryConfig:a}=t,{where:i,outStatistics:n,geometry:s,distance:o,units:l,timeExtent:d,returnDistinctValues:c}=a??{},u=se(r),f=ut(u)?.createQuery()??new rb,p,h=Tn(u).idFields;if(e==="AttributeBinsQuery"&&a?.objectIds?.[0]!==void 0&&h&&(p=`${h} IN (${a.objectIds.join(",")})`),e==="AttributeBinsQuery"&&(f=new tb(f.toJSON())),f.where=Ae([f.where,i,p]),"returnDistinctValues"in f&&(f.returnDistinctValues=c??!1),n!==void 0){let y=Kv(u);f.outStatistics=n.filter(b=>b.statisticType!==W.EnvelopeAggregate||y).map(b=>ib.fromJSON(b))}let m=Ni(s);return m!==void 0&&(f.geometry=m,a?.spatialRelationship&&(f.spatialRelationship=a.spatialRelationship),Fp(u)&&(o!==void 0&&(f.distance=o),l!==void 0&&(f.units=l))),d&&(f.timeExtent=new ab({start:d?.[0],end:d?.[1]})),s0(f)&&(f.cacheHint=!0),f}function c0(t){let e;switch(t){case $e.Start:e="first";break;case $e.End:e="last";break}return e}function u0(t){let{queryObject:e,queryConfig:r,temporalBinning:a,dateField:i,splitByField:n,axisTimeZone:s}=t,o=se(e),l=wt(e).find(v=>v.name===i)?.type,d=Cn({queryType:"AttributeBinsQuery",queryObject:e,queryConfig:r}),{unit:c,size:u,timeAggregationType:f,start:p,end:h,offset:m,outTimeZone:y}=a,b=Ap(i);if(d.lowerBoundaryAlias=b.lowerBoundaryAlias,d.upperBoundaryAlias=b.upperBoundaryAlias,l!==ue.DateOnly&&(d.outTimeZone=y??s??Intl.DateTimeFormat().resolvedOptions().timeZone),d.binParameters={type:"date",field:i,interval:{unit:c,value:u},start:p,end:h,offset:m?{unit:m.unit,value:m.size}:null},d.binParameters.type==="date"&&(o?.capabilities?.queryAttributeBins?.supportsSnapToData&&(d.binParameters.snapToData=c0(f)),o?.capabilities?.queryAttributeBins?.supportsReturnFullIntervalBin&&(d.binParameters.returnFullIntervalBin=!0)),!_e(n)){let v=ut(o)?.fields.find(S=>S.name===n)?.type;(!v||v==="string"||v==="integer"||v==="small-integer"||v==="big-integer"||v==="double")&&(d.binParameters.stackBy={type:"field",value:n,valueType:v==="string"?"string":"integer"})}return d}function co(t){let{field:e,fieldType:r,unit:a,outTimeZone:i,dataTimeZone:n,runsOnClientQueryEngine:s,addIntervalStatement:o,addLeapDayExpression:l}=t,d,c,u=1,f=1;switch(a){case gt.MinuteOfDay:r!==ue.DateOnly&&(c="MINUTE",u=0,f=59);break;case gt.HourOfDay:r!==ue.DateOnly&&(c="HOUR",u=0,f=23);break;case gt.DayOfWeek:c="DOW",f=7;break;case gt.DayOfMonth:c="DAY",f=31;break;case gt.DayOfYear:c="DOY",f=366;break;case gt.WeekOfYear:c="WEEK",f=53;break;case gt.MonthOfYear:c="MONTH",f=12;break;case gt.QuarterOfYear:c="QUARTER",f=4;break}if(c){let p=o?` ${gp({dataTimeZone:n,runsOnClientQueryEngine:s,outTimeZone:i})}`:"";d=p0({addLeapDayExpression:l,temporalKey:c,field:e,intervalStatement:p})}return{expression:d,start:u,end:f}}function p0(t){let{addLeapDayExpression:e=!1,temporalKey:r,field:a,intervalStatement:i}=t,n;return e&&a.length&&r==="DAY"?n=`CASE WHEN (EXTRACT(MONTH FROM ${a})=2 AND EXTRACT(DAY FROM ${a})=29) THEN 0 ELSE EXTRACT (${r} FROM ${a}${i}) END`:n=`EXTRACT (${r} FROM ${a}${i})`,n}function Vu(t){let{temporalBinning:e,xOrY:r,xOrYFieldType:a,addIntervalStatement:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o,includeLeapDay:l}=t,{unit:d}=e??{},c,u,f,p;return a===ue.Date||a===ue.DateOnly||a===ue.TimestampOffset?{expression:u,start:f,end:p}=co({field:r,fieldType:a,unit:d,addIntervalStatement:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o,addLeapDayExpression:!l}):c=r,{field:c,expression:u,start:f,end:p}}function f0(t){let{queryObject:e,queryConfig:r,x:a,y:i,xTemporalBinning:n,yTemporalBinning:s,firstDayOfWeek:o,includeLeapDay:l,configTimeZone:d,options:c}=t,u=wt(e),f=u.find(F=>F.name===a)?.type,p=u.find(F=>F.name===i)?.type,h=Cn({queryType:"AttributeBinsQuery",queryObject:e,queryConfig:r});if(h.binParameters={type:"fixed-interval",interval:1},h.lowerBoundaryAlias=pe.heatChartLowerBoundaryAlias,h.upperBoundaryAlias=pe.heatChartUpperBoundaryAlias,f!==ue.DateOnly){let F=Intl.DateTimeFormat().resolvedOptions().timeZone,I=c?.view&&"timeZone"in c?.view?c.view.timeZone:void 0,N=d??I??F;N==="unknown"?N="Etc/UTC":N==="system"&&(N=F),h.outTimeZone=N}o!==void 0&&(h.binParameters.firstDayOfWeek=o);let m=Vu({temporalBinning:n,xOrY:a,xOrYFieldType:f,addIntervalStatement:!1,includeLeapDay:l}),{field:y,expression:b,start:v,end:S}=m;y?h.binParameters.field=y:b&&(h.binParameters.expression=b,h.binParameters.expressionValueType="integer",h.binParameters.type==="fixed-interval"&&(v!==void 0&&(h.binParameters.start=v),S!==void 0&&(h.binParameters.end=S)));let C=Vu({temporalBinning:s,xOrY:i,xOrYFieldType:p,addIntervalStatement:!1,includeLeapDay:l});return C.field?h.binParameters.stackBy={type:"field",value:C.field}:C.expression&&(h.binParameters.stackBy={type:"expression",value:C.expression,valueType:"integer",alias:i}),h}function h0(t){let{queryObject:e,queryConfig:r,xStep:a,xMin:i,xMax:n,x:s,y:o,yStep:l}=t,d=Cn({queryType:"AttributeBinsQuery",queryObject:e,queryConfig:r}),c=Ip(s,o);return d.lowerBoundaryAlias=c.lowerBoundaryAlias,d.upperBoundaryAlias=c.upperBoundaryAlias,d.binParameters={type:"fixed-interval",field:s,interval:a,start:i,end:n,stackBy:{value:`FLOOR(${o} / ${l})`,type:"expression",alias:c.stackAlias,valueType:"integer"}},d}function uo(t){let{queryObject:e,queryConfig:r,maxRecordCountFactor:a}=t,{groupByFieldsForStatistics:i,orderByFields:n,gdbVersion:s,start:o,num:l,outFields:d}=r??{},c=Cn({queryType:"Query",queryObject:e,queryConfig:r});c.returnGeometry=!1;let u=se(e);return c.outFields=d0(d),c.groupByFieldsForStatistics=i??c.groupByFieldsForStatistics,c.orderByFields=n??[],c.objectIds=r?.objectIds,a!==void 0&&(c.maxRecordCountFactor=a),s!==void 0&&s!==""&&(c.gdbVersion=s),l!==void 0&&(c.num=l),o!==void 0&&(c.start=o,c.num=c.num??Pp(u)),c}function m0(t){return t&&"sourceJSON"in t&&t.sourceJSON?.advancedQueryCapabilities?.supportsMaxRecordCountFactor===!0?pe.maxRecordCountFactor:void 0}var Ep={NonNumericAggregation:"nonNumericAggregation",DuplicateSeriesID:"duplicateSeriesId"},Ir={Required:"required",MinLength:"minLength",MinItems:"minItems",MaxItems:"maxItems",Pattern:"pattern",AdditionalProperties:"additionalProperties",Enum:"enum",AnyOf:"anyOf"},ae={BadData:"badData",EmptyDataSet:"emptyDataSet",InvalidConfig:"invalidConfig",HistogramEmptyField:"histogramEmptyField",BarElementExceedsLimit:"barElementExceedsLimit",LineChartExceedsLimit:"lineChartExceedsLimit",BoxPlotExceedsLimit:"boxPlotExceedsLimit",BoxPlotOutliersExceedsLimit:"boxPlotOutliersExceedsLimit",HeatChartExceedsLimit:"heatChartExceedsLimit",PieChartExceedsLimit:"pieChartExceedsLimit",GaugeExceedsLimit:"gaugeExceedsLimit",PieChartMixOfNegativePositiveSlices:"PieChartMixOfNegativePositiveSlices",NegativeValueInSqrtCalculation:"negativeValueInSqrtCalculation",NegativeValueInLogCalculation:"negativeValueInLogCalculation",NegativeValueInXAxisLogScale:"negativeValueInXAxisLogScale",NegativeValueInYAxisLogScale:"negativeValueInYAxisLogScale"},y0=2048;function g0(t){let e;switch(t){case Oe.Log:e="log";break;case Oe.Sqrt:e="sqrt";break;case Oe.None:default:e=void 0;break}return e}async function b0(t){let{queryConfig:e,chartConfig:r,queryObject:a,options:i,abortKey:n}=t,s=r.series[0],{x:o,dataTransformationType:l,binCount:d}=s,c=se(a);if(!Ke(c))throw new Qe(Ye.LayerNotSupported);c.loaded||await c.load();let u=await la(c);if(!u)throw new Error("Raster info is not available for the layer.");let f=i?.view,p=Ni(e.geometry)??c.fullExtent,h=u.bandCount===1?0:u.bandInfos.findIndex(b=>b.name===o),m,y;if(f===void 0&&(l===void 0||l===Oe.None)&&d&&Array.isArray(u.histograms)&&u.histograms.length>h&&u.histograms[h].size%d===0&&Array.isArray(u.statistics)&&u?.statistics?.length>h)m=u.histograms[h],y=u.statistics[h];else{let b,v,S;if(f)b=f.resolution,v=f.resolution,S=f.spatialReference;else{let N=y0,P=2,E=u.width,B=u.height,R=Math.max(0,Math.ceil(Math.log(Math.max(E,B)/N)/Math.log(P))),q=P**R;b=u.pixelSize.x*q,v=u.pixelSize.y*q,S=c.spatialReference}let C=new op({x:b,y:v,spatialReference:S}),F=g0(l),I=await nb(c,{bandIds:[h],geometry:p,histogramSize:d??void 0,pixelSize:C,transformType:F},{signal:n!==void 0?Pr.get(n)?.signal:void 0});y=I.statistics[0],m=I.histograms[0]}return{histogram:m,statistics:y}}function v0(t,e){let r=[],a=(t.max-t.min)/t.size;for(let i=0;i<t.size;i++){let n=t.min+i*a;r.push({minValue:n,maxValue:n+a,count:t.counts[i]})}if(e&&t.size!==e&&t.size%e===0){let i=t.size/e,n=[];for(let s=0;s<e;s++){let o=r[s*i].minValue,l=r[(s+1)*i-1].maxValue,d=0;for(let c=0;c<i;c++)d+=r[s*i+c].count;n.push({minValue:o,maxValue:l,count:d})}return n}return r}async function S0(t){let{chartConfig:e,queryConfig:r,queryObject:a,options:i,abortKey:n}=t;if(a===void 0)throw new Error("QueryObject is undefined!");let s,{statistics:o,histogram:l}=await b0({queryObject:a,chartConfig:e,queryConfig:r,options:i,abortKey:n});if(o&&l){let d=e.series[0].binCount??void 0,c=v0(l,d);c.length>0?s={valid:!0,count:c.length,data:{bins:c,min:o.min,max:o.max,mean:o.avg,median:o.median,stddev:o.stddev,sum:o.sum??o.avg*o.count,count:o.count}}:s={valid:!1,invalidType:ae.EmptyDataSet}}else s={valid:!1,invalidType:ae.BadData};return s}var w0=t=>t.series[0].x;function x0(t){let{chartConfig:e,layer:r,selectionDataItems:a}=t,i=Xs(r,w0(e)),n=a.map(l=>[l.minValue,l.maxValue]).reduce((l,d,c)=>{if(c===0)l.push([...d]);else{let u=l[l.length-1];u[1]===d[0]?u[1]=d[1]:l.push([...d])}return l},[]),s=e.series[0],{dataTransformationType:o}=s;switch(o){case Oe.Log:n.forEach(l=>{l[0]=Math.exp(l[0]),l[1]=Math.exp(l[1])});break;case Oe.Sqrt:n.forEach(l=>{l[0]=l[0]*l[0],l[1]=l[1]*l[1]});break;case Oe.None:}return n.length>0?{bandId:i,pixelRanges:n}:void 0}var C0={dataFormat:"json",outputFormat:"json",typeKey:"analyticType",typeValue:"LinRegR2",fieldValue:"onAnalyticField",slopePropertyList:["Slope","SLOPE","slope"],interceptPropertyList:["Intercept","INTERCEPT","intercept"],r2PropertyList:["R2","r2"]};function aa(t,e){let r,a,i=e??(n=>n);for(let n of t){let s=i(n);s==null||Number.isNaN(s)||((r===void 0||s<r)&&(r=s),(a===void 0||s>a)&&(a=s))}return{min:r,max:a}}function T0(t,e){let r=0,a=0,i=e??(n=>n);for(let n of t){let s=i(n);s==null||Number.isNaN(s)||(r++,a+=s)}return r>0?a/r:void 0}function F0(t,e){let r=0,a=e??(i=>i);for(let i of t){let n=a(i);n==null||Number.isNaN(n)||(r+=n)}return r}function XT(t,e,r=1){let a=Math.max(0,Math.ceil((e-t)/r)),i=new Array(a);for(let n=0;n<a;n++)i[n]=t+n*r;return i}async function I0(t){let{queryObject:e}=t,r=!1;if(!Ke(e)){let a=Gv(e),i=se(e),n=ut(i);if(a&&n?.url!==void 0&&n.url!==null){let s=`${n.url}/${n.layerId}?f=json`;try{let o=(await fn(s)).data,l=o?.advancedQueryCapabilities?.supportsQueryAnalytic===!0,d=o?.sqlParserVersion===void 0||n.version!=null&&n.version>=10.91;r=l&&d}catch{}}}return r}function O0(t){let{x:e,y:r,trendlineXToY:a,data:i}=t,{min:n,max:s}=i?aa(i,o=>o[e]):{min:Number.NaN,max:Number.NaN};return[{[e]:n??Number.NaN,[r]:a(n??Number.NaN)},{[e]:s??Number.NaN,[r]:a(s??Number.NaN)}]}function A0(t){let{data:e,x:r,y:a}=t,i=[];return e!==void 0&&(i=e.filter(n=>Number.isFinite(n[r])&&Number.isFinite(n[a])).map(n=>[n[r],n[a]])),i}async function P0(t){let{statsMap:e,queryObject:r,chartConfig:a,queryConfig:i}=t,n=a.series[0],{x:s,y:o}=n;ia(r);let l=Number.NaN,d=[{[s]:Number.NaN,[o]:Number.NaN},{[s]:Number.NaN,[o]:Number.NaN}],{dataFormat:c,outputFormat:u,typeKey:f,typeValue:p,fieldValue:h,slopePropertyList:m,interceptPropertyList:y,r2PropertyList:b}=C0,v=`[{"${f}": "${p}", "${h}":"${s},${o}"}]`,S=await Yv({queryObject:r,queryConfig:i,outputFormat:u,dataFormat:c,outAnalytics:v});if(S!==void 0){let C=Number.NaN,F=Number.NaN,{expr:I}=pn(S,m),{expr:N}=pn(S,y),{expr:P}=pn(S,b);I!==void 0&&Number.isFinite(S[I])&&(C=S[I]),N!==void 0&&Number.isFinite(S[N])&&(F=S[N]),P!==void 0&&Number.isFinite(S[P])&&(l=S[P]);let{dataContextXMinField:E,dataContextXMaxField:B,dataContextYMinField:R,dataContextYMaxField:q}=A.scatterplotAggregationFields,L=e.get(E)??Number.NaN,k=e.get(B)??Number.NaN,$=e.get(R)??Number.NaN,_=e.get(q)??Number.NaN,G=(k-L)/100,V=L-G,Z=Number.NaN;for(;!(Z>=$&&Z<=_)&&V<=k;)V+=G,Z=C*V+F;let U=k+G,oe=Number.NaN;for(;!(oe>=$&&oe<=_)&&U>=L;)U-=G,oe=C*U+F;d=[{[s]:V,[o]:Z},{[s]:U,[o]:oe}]}return{r2:l,trendLinePoints:d}}function Lp(t){let{data:e,chartConfig:r}=t,a=r.series[0],{x:i,y:n}=a,{r2:s,trendLinePoints:o}=A.scatterplotSeries,l=A0({data:e,x:i,y:n});if(l!==void 0){let d=Ed(l),c=Ld(d);s=d.m===0?0:Dd(l,c),o=O0({x:i,y:n,trendlineXToY:c,data:e})}return{r2:s,trendLinePoints:o}}async function Dp(t){let e=await I0(t),{chartConfig:r}=t,a=r.series[0],{x:i,y:n}=a,{r2:s}=A.scatterplotSeries,o=[{[i]:Number.NaN,[n]:Number.NaN},{[i]:Number.NaN,[n]:Number.NaN}],l={r2:s,trendLinePoints:o},d=!1;if(e)try{l=await P0(t)}catch{d=!0}return(!e||d)&&(l=Lp(t)),l}var E0=50,L0=4194304;async function D0(t){let{layer:e,chartConfig:r,rawData:a}=t,i,n=r.series[0],{x:s,y:o}=n,{idField:l}=_t(e),d=await la(e);if(d){let c=d.bandInfos,u=c.length===1,f=u?c?.[0].name:"";i=a.map(p=>({...u&&{[s]:p.attributes?.[f],[o]:p.attributes?.[f]},...p.attributes,[pe.uniqueIdsName]:p.attributes?.[l]}))}return i??[]}async function N0(t){let{queryObject:e,queryConfig:r,abortKey:a}=t;if(!e||!Ke(e))throw new Qe(Ye.LayerNotSupported);return await Z0({queryObject:e,queryConfig:r,imagerySkipFactor:E0,imageryMaxPixelCount:L0,abortKey:a})}async function B0(t){let{chartConfig:e,queryConfig:r,queryObject:a,sortData:i,calculateTrendLine:n,options:s,abortKey:o}=t;if(!a)throw new Error("QueryObject is undefined!");let l=await N0({queryObject:a,queryConfig:r,abortKey:o}),d=await D0({layer:a,chartConfig:e,rawData:l});i!==!1&&ra({arrayToSort:d,sortingField:e.series[0].x,orderBy:Ne.Ascending});let c=new Map,{r2:u,trendLinePoints:f}=n!==!1?await Dp({data:d,statsMap:c,queryConfig:r,options:s,queryObject:a,chartConfig:e}):A.scatterplotSeries;return{dataItems:d,r2:u,trendLinePoints:f}}var $0=t=>({x:t.series[0].x,y:t.series[0].y});function M0(t){let{chartConfig:e,layer:r,selectionDataItems:a}=t,i;if(a.length>0){let{x:n,y:s}=$0(e),o=Xs(r,n),l=Xs(r,s);if(o!==void 0&&l!==void 0&&o!==l){let d=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;a.forEach(p=>{let h=p[n],m=p[s];typeof h=="number"&&(h<d&&(d=h),h>c&&(c=h)),typeof m=="number"&&(m<u&&(u=m),m>f&&(f=m))}),d!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER&&u!==Number.MAX_SAFE_INTEGER&&f!==Number.MIN_SAFE_INTEGER&&(i={xBandId:o,yBandId:l,pixelRanges:new lp({xmin:d,xmax:c,ymin:u,ymax:f})})}else if(o!==void 0&&o===l){let d=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;a.forEach(u=>{let f=u[n];typeof f=="number"&&(f<d&&(d=f),f>c&&(c=f))}),d!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER&&(i={bandId:o,pixelRanges:[[d,c]]})}}return i}function q0(t,e){let r=!0;if(e?.trim()){let a={};Object.entries(t).forEach(([s,o])=>{a[s.toUpperCase()]=o});let i=e.trim(),n=i.match(/^(\w+)\s+IS\s+(NOT\s+)?NULL$/iu);if(n){let[s,o,l]=n,d=a[o.toUpperCase()],c=d==null;r=l?!c:c}else{let s=i.match(/^(\w+)\s*(=|!=|<>|>|<|>=|<=)\s*(.+)$/iu);if(s){let[o,l,d,c]=s,u=l.toUpperCase();if(!(u in a))r=!1;else{let f=a[u],p=c.trim().replace(/^['"]|['"]$/gu,"");switch(typeof f=="number"?p=Number(p):typeof f=="boolean"&&(p=p.toLowerCase()==="true"),d){case"=":r=f===p;break;case"!=":case"<>":r=f!==p;break;case">":r=f>p;break;case"<":r=f<p;break;case">=":r=f>=p;break;case"<=":r=f<=p;break;default:r=!0}}}}}return r}function R0(t){let{features:e,aggregationType:r,onField:a}=t,i;if(!a)r==="count"&&(i=e.length);else switch(r){case"count":{a==="*"?i=e.length:i=e.filter(n=>n[a]!==null&&n[a]!==void 0).length;break}case"sum":{i=e.reduce((n,s)=>{let o=s[a];return n+(typeof o=="number"?o:0)},0);break}case"avg":{let n=0,s=0;e.forEach(o=>{let l=o[a];typeof l=="number"&&(n+=l,s++)}),i=s>0?n/s:0;break}case"min":{let n=e.map(s=>s[a]).filter(s=>typeof s=="number"&&s!==null&&s!==void 0);i=n.length>0?Math.min(...n):void 0;break}case"max":{let n=e.map(s=>s[a]).filter(s=>typeof s=="number"&&s!==null&&s!==void 0);i=n.length>0?Math.max(...n):void 0;break}case"percentile-continuous":{let n=[...e.map(o=>o[a]).filter(o=>typeof o=="number"&&o!==null&&o!==void 0)].sort((o,l)=>o-l),s=Math.floor(n.length/2);i=n.length%2!==0?n[s]:(n[s-1]+n[s])/2;break}}return i}function _u(t,e){let r;return t==null&&e?r={groupKey:A.nullValue,display:A.nullValue,original:null}:r={groupKey:t,display:t,original:t},r}async function k0(t){let{layer:e,geometry:r,options:a,abortKey:i}=t;e.loaded||await e.load();let n=await la(e),s=Ni(r)??e.fullExtent,o=n?.attributeTable;if(!(s instanceof lp&&s.equals(e.fullExtent))){let l=a?.view,d=l?new op({x:l.resolution,y:l.resolution,spatialReference:l.spatialReference}):void 0;o=await sb(e,{geometry:s,pixelSize:d},{signal:i!==void 0?Pr.get(i)?.signal:void 0})}return o}async function W0(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i}=t,n;if(a===void 0)throw new Error("QueryObject is undefined!");let s=se(a);if(!Ke(s))throw new Qe(Ye.LayerNotSupported);let o=await k0({layer:s,geometry:r.geometry,options:t.options,abortKey:i}),l=o?.features;if(!o||!l)n={valid:!1,invalidType:ae.BadData};else{let d=e.series;if(!d||d.length===0||l.length===0)n={valid:!0};else{let c=r.groupByFieldsForStatistics?.[0]??"",u=d.some(h=>h.query?.fetchNullValues),f=new Map;for(let h of l){let{groupKey:m}=_u(h.attributes[c],u);m===A.nullValue&&!u||(f.has(m)||f.set(m,[]),f.get(m).push(h.attributes))}let p=[];f.forEach(h=>{let m={},y=h[0][c],{display:b,original:v}=_u(y,u);m[c]=b,m[A.xAxisField]=b,m[A.originalCategoryValue]=v,d.forEach(S=>{let C=S.query?.outStatistics?.[0];if(!C){let{name:B}=S;m[B]=h[0][B];return}let F=h,I=S.query?.where;I&&(F=h.filter(B=>q0(B,I)));let N=C.statisticType,P=C.onStatisticField,E=C.outStatisticFieldName;m[E]=R0({features:F,aggregationType:N,onField:P})}),p.push(m)}),n={valid:!0,data:{dataItems:p}}}}return n}async function eF(t){let{layer:e,category:r,splitByField:a}=t,i=(await la(e))?.attributeTable?.features,n=a!==void 0;return Array.from(new Set(i?.map(s=>s.attributes[n?a:r]))).sort((s,o)=>typeof s=="string"&&typeof o=="string"?s.localeCompare(o):Number(s)-Number(o))}function j0(t,e){let r=new Map;return e.forEach((a,i)=>{r.set(a,i)}),t.reduce((a,i)=>{let n=a[a.length-1];if(!n)return a.push([i,i]),a;if(i===n[1])return a;let s=r.get(i),o=r.get(n[1]);return s!==void 0&&o!==void 0&&s===o+1?(n[1]=i,a):(a.push([i,i]),a)},[])}function V0(t,e){return t?.map(({attributes:r})=>r[e]).filter(r=>r!=null).sort((r,a)=>r-a)}function _0(t){let{chartConfig:e,layer:r,selectionDataItems:a}=t,i,n=r.serviceRasterInfo?.attributeTable,s=e.series?.[0]?.x,o=n?.features,l=n?.fields?.find(({name:d})=>d.toLowerCase()==="value")?.name;if(a.length>0&&s&&o&&o.length>0&&l){let d=new Set(a.map(c=>c[A.originalCategoryValue]).filter(c=>c!==void 0));if(d.size>0){let c=new Set;o.forEach(f=>{let p=f.attributes,h=p[s];d.has(h)&&c.add(p[l])});let u=Array.from(c).sort((f,p)=>f-p);if(u.length>0){let f=V0(o,l);i={bandId:0,pixelRanges:j0(u,f)}}}}return i}var Np="PixelID",z0=[g.BarSeries,g.HistogramSeries,g.ScatterSeries];async function tF(t,e){let r=!1;if(kv(z0,t))switch(K(t?.series)){case g.BarSeries:e.loaded||await e.load(),r=!!(await la(e))?.attributeTable;break;case g.HistogramSeries:case g.ScatterSeries:r=!0;break}return r}async function U0(t){let{layer:e,chartConfig:r}=t,a;return Ke(e)?a=e:r?.iLayer?.layerType==="ArcGISImageServiceLayer"?a=await $p(r.iLayer):r?.iLayer?.layerType==="ArcGISTiledImageServiceLayer"&&(a=await Mp(r.iLayer)),a}function H0(t){let e;switch(t){case"f32":e=ue.Single;break;case"f64":e=ue.Double;break;default:e=ue.Integer;break}return e}function Bp(t){if(!t.loaded)throw new Error("Raster layer must be loaded to get its ID field name");let e=t.serviceRasterInfo?.attributeTable?.fields.find(r=>r.type==="oid");return e?e.name:Np}function G0(t){let{layer:e,rasterInfo:r,popupTemplateFieldInfosEnabled:a}=t,i=r??e.serviceRasterInfo??void 0,n;if(!e.loaded||!i)throw new Error("Raster layer must be loaded and have rasterInfo available to fetch its fields info");try{if(i.attributeTable)n=i.attributeTable.fields.map(s=>s.toJSON());else{let s=H0(i.pixelType),o=i.bandInfos.map(l=>({name:l.name,alias:l.name,type:s}));a===!0&&e?.popupTemplate?.fieldInfos!==void 0&&o.map(l=>{let d=e.popupTemplate?.fieldInfos?.find(c=>c.fieldName?.toLowerCase()===l.name.toLowerCase())?.label;return d&&d!==l.name&&(l.alias=d),l}),n=[{name:Np,alias:"Pixel ID",type:ue.OID},...o]}}catch{n=[]}return n}async function la(t){return t.loaded||await t.load(),zv(t)?t.serviceRasterInfo??void 0:await t.generateRasterInfo(t.rasterFunction)}var $p=ji(async t=>{let e={},r=t.layerDefinition;e.definitionExpression=r?.definitionExpression,e.id=t.id,t.url!==void 0&&(e.url=t.url),t.itemId!==void 0&&t.layerDefinition?.id!==void 0&&(e.portalItem={id:t.itemId});let a=new lb(e);return await a.load(),a},t=>JSON.stringify(t,Object.keys(t).sort())),Mp=ji(async t=>{let e={};e.id=t.id,t.url!==void 0&&(e.url=t.url),t.itemId!==void 0&&(e.portalItem={id:t.itemId});let r=new db(e);return await r.load(),r},t=>JSON.stringify(t,Object.keys(t).sort())),Q0=ji(async t=>{let e={};e.id=t.id,t.url!==void 0&&(e.url=t.url),t.itemId!==void 0&&(e.portalItem={id:t.itemId});let r=new cb(e);return await r.load(),r},t=>JSON.stringify(t,Object.keys(t).sort())),Xs=(t,e)=>{let r,a=t.serviceRasterInfo?.bandInfos;if(a?.length===1)r=0;else if(e&&a?.length){let i=e.toLowerCase(),n=a.findIndex(s=>s.name.toLowerCase()===i);n>-1&&(r=n)}return r},rF=t=>{let{chartConfig:e,layer:r,selectionDataItems:a}=t,i=K(e.series),n;switch(i){case g.BarSeries:n=_0({chartConfig:e,layer:r,selectionDataItems:a});break;case g.HistogramSeries:n=x0({chartConfig:e,layer:r,selectionDataItems:a});break;case g.ScatterSeries:n=M0({chartConfig:e,layer:r,selectionDataItems:a});break;default:n=void 0;break}return n};async function Z0(t){let{queryObject:e,queryConfig:r,imagerySkipFactor:a,imageryMaxPixelCount:i,abortKey:n}=t,s=[];if(e!==void 0)try{let o=se(e);o.loaded||await o.load();let l={geometry:Ni(r.geometry)??o.fullExtent,autoResample:!0,maxPixelCount:i,skipFactor:a},d=n&&Pr.get(n)?.signal||void 0,c=await ob(o,l,{signal:d});s=np.fromJSON(c.featureSet).features}catch{s=[]}return s}function K0(t){let{queryObject:e,defaultGeometry:r,ignoreViewExtent:a,viewExtent:i}=t,n=r;if(!a&&i){let{xmin:s,xmax:o,ymin:l,ymax:d,zmin:c,zmax:u}=i;n={xmin:s,ymin:l,zmin:c,xmax:o,ymax:d,zmax:u,spatialReference:i.spatialReference.toJSON()}}else if(!n&&e.fullExtent){let{xmin:s,xmax:o,ymin:l,ymax:d,zmin:c,zmax:u}=e.fullExtent;n={xmin:s,ymin:l,zmin:c,xmax:o,ymax:d,zmax:u,spatialReference:e.fullExtent.spatialReference.toJSON()}}return n}function J0(t){let e,r,a;return t!==void 0&&(e=t.type,(e===Xe.UniqueValue||e===Xe.ClassBreaks)&&(r=t.field??void 0,e===Xe.ClassBreaks&&(a=t.normalizationField??void 0))),{rendererType:e,rendererField:r,rendererNormalizationField:a}}var qp=ji(async(t,e)=>{let r=t.featureCollection,a,i;if(r?.layers?.[0]!==void 0){let o=r.layers[0];a=o.featureSet,i=o.layerDefinition}else i=t.layerDefinition;let n={};if(a!==void 0){if(n.source=np.fromJSON(a).features,i?.fields!==void 0&&(n.fields=i.fields.map(o=>Kg.fromJSON(o))),i?.objectIdField!==void 0&&(n.objectIdField=i.objectIdField),i?.geometryType!==void 0){let o=no.fromJSON({geometryType:i.geometryType});o?.type!==void 0&&o?.type!=="extent"&&(n.geometryType=o.type)}i?.spatialReference!==void 0&&(n.spatialReference=i.spatialReference)}else n.id=t.id,i?.id!==void 0&&(n.layerId=i.id),t.url!==void 0&&(n.url=t.url),t.itemId!==void 0&&i?.id!==void 0&&(n.portalItem={id:t.itemId});if(i!==void 0){let o=i.drawingInfo;o?.renderer!==void 0&&(n.renderer=ao.fromJSON(o.renderer))}let s=new Qg(n);return await s.load({signal:e}),s},t=>JSON.stringify(t));async function iF(t){let e;switch(t?.layerType??""){case"ArcGISFeatureLayer":e=await qp(t);break;case"ArcGISImageServiceLayer":e=await $p(t);break;case"ArcGISTiledImageServiceLayer":e=await Mp(t);break;case"WCS":e=await Q0(t);break;default:throw new Qe(Ye.LayerNotSupported)}return e}async function aF(t){let{layer:e,view:r,chartConfig:a,filterByViewExtent:i,abortSignal:n}=t,s=Ke(e)||Hv(a),o;if(s)o=await U0(t);else{let l=se(e),d=ut(l);d!==void 0?i&&r!==void 0&&!d.isTable?(d.outFields=["*"],o=await r.whenLayerView(d)):o=e:a?.iLayer&&a.iLayer?.layerType==="ArcGISFeatureLayer"&&(o=await qp(a.iLayer,n))}return o}function wt(t,e){let r=se(t),a=[];if(r!==void 0){let i=e===!0&&r?.popupTemplate?.fieldInfos!==void 0;Ke(r)?a=G0({layer:r,popupTemplateFieldInfosEnabled:e}):a=r.fields.map(n=>{let s=n.toJSON();if(i){let o=r.popupTemplate?.fieldInfos?.find(l=>l.fieldName?.toLowerCase()===n.name.toLowerCase())?.label;o!==void 0&&o!==n.name&&(s.alias=o)}return s})}return a}function Rp(t,e=[]){return e.find(r=>r.name===t)}function Tn(t){let e,r=!1;if(Ke(t))e=[Bp(t)];else{let a=ut(t);a&&("uniqueIdFields"in a&&a.uniqueIdFields&&a.uniqueIdFields.length>0?e=a.uniqueIdFields:(e=[a.objectIdField],r=!0))}return{idFields:e,isTraditionalTypeOID:r}}function _t(t){let e="",r=!1;if(Ke(t))e=Bp(t);else if(t){let a=Tn(t);r=a.isTraditionalTypeOID,a.idFields&&(e=a.idFields[0])}return{idField:e,isTraditionalTypeOID:r}}function Pi(t){let e=[ue.Single,ue.Double,ue.SmallInteger,ue.Integer,ue.BigInteger];return t!==void 0&&e.includes(t.type)}function Y0(t){return t?.type===ue.Date||t?.type===ue.DateOnly||t?.type===ue.TimestampOffset}function nF(t){return t?.type===ue.String}function sF(t){return t?.type===ue.TimeOnly}function oF(t){let e=[ue.SmallInteger,ue.Integer,ue.BigInteger];return t!==void 0&&e.includes(t.type)}function X0(t){return t.filter(e=>Y0(e)).map(e=>e.name)}function lF(t){return t.filter(e=>Pi(e)).map(e=>e.name)}function eo(t,e){let r;if(e){let a=se(t).getFieldDomain(e);a instanceof Zg&&(r=a)}return r}function to(t,e){let r=e?.getName(t?.toString())??e?.getName(t)??e?.getName(Number(t));return r===null&&(r=void 0),r}function zu(t){let{queryObject:e,fieldName:r,fieldValue:a}=t;return Ke(e)?void 0:to(a,eo(e,r))}async function kp(t){let e=[];return t&&!ut(t)?.isTable&&t.fieldsIndex&&(e=await ap.getRendererFields(t.renderer,t.fieldsIndex)),e}function eS(t){let e="/rest/services",r=t.toLowerCase(),a=r.indexOf(e);return r=a>-1?t.substring(0,a):t,`${r}/rest/info`}async function tS(t){let e=!0,r=".arcgis.com/",a=t?.url,i=a?.includes(r);if(a&&i&&ut(t)?.sourceJSON?.serviceItemId!==void 0){let n=eS(a);try{let s=(await fn(n,{query:{f:"json"}})).data;if(s.owningTenant!==void 0&&s.owningSystemUrl!==void 0){let o=`${s.owningSystemUrl}/sharing/rest/portals/${s.owningTenant}`,l=(await fn(o,{authMode:"auto",query:{f:"json"}})).data,d=new Jg({sourceJSON:l});await d.load(),e=d?.sourceJSON?.subscriptionInfo?.dataStoreLevel===void 0}}catch{}}return e}function rS(t){let{queryObject:e,fieldToMatch:r,returnUndefinedIfNotFound:a}=t,i=wt(e),n=iS(i,r),s=a?"":r;return n?.name??s}function iS(t,e){let r=t.find(a=>e===a.name);return r||(r=t.find(a=>e.toUpperCase()===a.name.toUpperCase())),r}function dF(t){let{fieldsList:e,queryObject:r,returnUndefinedIfNotFound:a}=t,i=e;return i!==void 0&&(i=i.map(n=>rS({queryObject:r,fieldToMatch:n,returnUndefinedIfNotFound:a}))),i}function Wp(t){let{queryObject:e,chartConfig:r,runtimeDataFilters:a,ignoreViewExtent:i,viewExtent:n}=t,{series:s,dataFilters:o}=r,{where:l,gdbVersion:d,timeExtent:c,geometry:u,distance:f,units:p,objectIds:h,spatialRelationship:m}=o??{},{where:y,gdbVersion:b,timeExtent:v,geometry:S,distance:C,units:F,objectIds:I,spatialRelationship:N}=a??{},P=s[0],{query:E}=P,{where:B}=E??{},R=X(s),q={...E};return q.where=Ae([l,y]),R!==x.BarAndLineSplitBy&&R!==x.BoxPlotMonoFieldAndSplitBy&&R!==x.BoxPlotMonoFieldAndCategoryAndSplitBy&&R!==x.BoxPlotMultiFieldsAndSplitBy&&R!==x.BarAndLineSplitByNoAggregation&&(q.where=Ae([q.where,B])),r.orderOptions?.orderByFields!==void 0&&(q.orderByFields=r.orderOptions.orderByFields),q.gdbVersion=b??d,q.timeExtent=o0(e,v??c),q.geometry=Ke(e)?K0({queryObject:e,defaultGeometry:S??u,ignoreViewExtent:i,viewExtent:n}):l0({queryObject:e,defaultGeometry:S??u,ignoreViewExtent:i}),q.distance=C??f,q.units=F??p,q.objectIds=I??h,q.spatialRelationship=N??m,E?.outStatistics?.[0]?.statisticType===W.Count&&(q.returnDistinctValues=E?.returnDistinctValues??!1),q?.outStatistics?.forEach(L=>{bp(L)&&!("statisticParameters"in L)&&(L.statisticParameters={value:pe.defaultStatParameterValue})}),q}var aS=t=>{let e;if("portalItem"in t){let r=t.portalItem?.id;typeof r=="string"&&(e=r)}return e};function cF(t){let{view:e,portalItemId:r}=t,a;if(e&&r){let i=Array.from(e.map?.allLayers??[]).find(n=>aS(n)===r);i&&(a=i)}return a}var Qr=["1.0.0","1.0.1","2.0.0","3.0.0","3.1.0","3.2.0","3.3.0","3.4.0","3.5.0","3.6.0","3.7.0","3.8.0","3.9.0","3.9.1","3.9.2","3.10.0","3.11.0","4.0.0","4.0.1","5.0.0","6.0.0","6.1.0","6.2.0","6.2.1","6.3.0","6.4.0","7.0.0","7.1.0","7.1.1","7.2.0","7.2.1","7.3.1","7.4.0","7.4.1","7.5.0","7.5.1","7.6.0","8.0.0","8.0.1","9.0.0","9.1.0","9.2.0","9.3.0","9.4.0","9.5.0","9.6.0","9.6.1","9.7.0","10.0.0","11.0.0","12.0.0","13.0.0","14.0.0","14.0.1","15.0.0","16.0.0","16.1.0","16.1.1","17.0.0","17.1.0","17.2.0","17.2.1","18.0.0","18.1.0","18.1.1","18.1.2","18.1.3","19.0.0","20.0.0","20.1.0","20.2.0","21.0.0","21.1.0","22.0.0","23.0.0","23.1.0","23.2.0","23.3.0","24.0.0","24.1.0","24.2.0","24.3.0","24.4.0","24.5.0","24.6.0","24.7.0","24.8.0","25.0.0"],nS="1.0.0",sS="unrecognized.version",oS=[g.LineSeries,g.BarSeries,g.ComboLineAndBarSeries,g.RadarSeries];function Us(t,e){let r=0;if(t!==e){let a=t.split("."),i=e.split(".");for(let n=0;n<a.length;n+=1){let s=Number.parseInt(a[n],10),o=Number.parseInt(i[n],10);if(s>o||Number.isNaN(o)){r=1;break}if(s<o){r=-1;break}}}return r}function lS(t){return t!==void 0?/^([1-9]\d*|0)(\.(([1-9]\d*)|0)){2}$/u.test(t):!1}function dS(t){let e=mr.Same,r=[];if(lS(t)&&t!==void 0){Qr.sort(Us);let a=Us(t,Qr[Qr.length-1]);if(a===1?e=mr.Newer:a===-1&&(e=mr.Older),e===mr.Newer||e===mr.Same)r.push(t);else{for(let i=Qr.length-2;i>=0;i-=1)if(Us(t,Qr[i])>=0){r=Qr.slice(i,Qr.length);break}r.length===0&&r.push(nS)}}else e=mr.Unrecognized,r.push(sS);return{versionStatus:e,versions:r}}function pr(t){let{series:e}=t,r=("showMean"in t?t.showMean:!1)===!0?e.find(a=>a.type===g.LineSeries):e[0];return r??=e[0],r}function uF(t,e){let r=t!==null?t.toString():null,a=e!=null?e.toString():null;return a!==null&&a!==r?Se.SFS:Se.SLS}function Ze(t,e){let r="";return t?.includes("=")&&(r=e!==!1?wp({value:t.split("=")[0],escape:!1}):t.split("=")[0].trim()),r}function ct(t){let{where:e,normalize:r,keepSurroundingQuotes:a,escape:i=!1}=t,n="";return e?.includes("=")&&(n=e.split("=").slice(1).join("=").trim(),n==="null"?n=null:n.trim()!==""&&!Number.isNaN(Number(n))?n=Number(n):r===!1?i&&(n=Js(n)):n=wp({value:n,keepSurroundingQuotes:a,escape:i})),n}function or(t){let e=!1;if(t===void 0||t==="")e=!0;else if(t.includes("=")){let r=Ze(t,!1),a=ct({where:t,normalize:!1});e=r===`${a}`}return e}function lr(t){let{where:e,normalize:r,escape:a}=t,i=r===void 0?!0:r,n=Ze(e),s=ct({where:e,normalize:i,keepSurroundingQuotes:!0,escape:a}),o=e;return n!==""&&s!==""&&(o=`${n}=${s}`),o}function cS(t){let e=x.PieFromCategory;return t[0].query?.outStatistics===void 0?e=x.PieNoAggregation:t[0].query?.groupByFieldsForStatistics===void 0&&(e=x.PieFromFields),e}function uS(t){let e=x.BarAndLineMonoField,r=t[0].query?.where;return t[0].query?.groupByFieldsForStatistics===void 0&&(t[0].query?.outStatistics??[]).length>0?e=x.BarAndLineFromFields:r===void 0&&t[0].query?.outStatistics===void 0?e=x.BarAndLineNoAggregation:or(r)?t.length>1&&(e=x.BarAndLineMultiFields):e=t[0].query?.outStatistics===void 0?x.BarAndLineSplitByNoAggregation:x.BarAndLineSplitBy,e}function pS(t){let e=x.BoxPlotMonoField,r=t.length===1,a=t.find(o=>o.type===g.LineSeries)??t[0],{x:i}=a,n="y"in a?a.y:"",s=a.query?.where;return i===Di?typeof n=="object"&&n.length>1?or(s)?r&&(e=x.BoxPlotMultiFields):e=x.BoxPlotMultiFieldsAndSplitBy:r?e=x.BoxPlotMonoField:or(s)||(e=x.BoxPlotMonoFieldAndSplitBy):r?e=x.BoxPlotMonoFieldAndCategory:or(s)?e=x.BoxPlotMultiFieldsAndCategory:e=x.BoxPlotMonoFieldAndCategoryAndSplitBy,e}function X(t){let e=x.NonSpecific;if(t?.[0]!==void 0)switch(K(t)){case g.PieSeries:e=cS(t);break;case g.RadarSeries:case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:e=uS(t);break;case g.BoxPlotSeries:e=pS(t);break}return e}function fr(t){let{seriesConfig:e,xAxisValueFormatType:r,setTimeBinningInfoWhenNotProvided:a,queryObject:i}=t,n=!1;if(!Ke(i)&&se(i)?.fields?.find(s=>s.name===e.x)?.type!=="time-only"&&jt(e)&&e.binTemporalData!==!1&&r===g.DateAxisFormat){let s=X([e]);if(e.temporalBinning&&s!==x.BarAndLineNoAggregation&&s!==x.BarAndLineSplitByNoAggregation){let{unit:o,size:l}=e.temporalBinning;n=a===!0||l!==void 0&&l>0&&o!==void 0}}return n}function jt(t){return oS.includes(t?.type)}function fS(t){let{previousConfig:e,newConfig:r,behaviorAfterLimit:a}=t,i=e.series,n=r.series,s=!1,o=!1;(a===Dr.RenderUpToTheLimit||e.orderOptions?.data===void 0||r.orderOptions?.data===void 0)&&(o=!tr(e.orderOptions?.orderByFields,r.orderOptions?.orderByFields));let l=Nn(i.map(c=>c.query),["where","outStatistics[0].outStatisticFieldName","outStatistics[0].onStatisticField"]),d=Nn(n.map(c=>c.query),["where","outStatistics[0].outStatisticFieldName","outStatistics[0].onStatisticField"]);return s=!tr(l,d),s||o}function hS(t,e){return JSON.stringify(t.dataFilters)!==JSON.stringify(e.dataFilters)}function mS(t,e){let r=!1;if(e.length&&t.length)if(e[0].x!==t[0].x)r=!0;else{let a=K(t);if(a!==g.HistogramSeries&&a!==g.GaugeSeries){let i=it(t).sort(),n=it(e).sort();r=JSON.stringify(i)!==JSON.stringify(n)}}return r}function yS(t,e){return(t??!1)!==(e?.filterBySelection??!1)}function gS(t,e){return jt(t.series[0])&&jt(e.series[0])&&(t.series[0].binTemporalData??A.binTemporalData)!==(e.series[0].binTemporalData??A.binTemporalData)}function bS(t,e){let r=t.axes?.[0].valueFormat.type,a=e.axes?.[0].valueFormat.type,i=X(e.series),n=i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation,s=r===g.DateAxisFormat&&a===g.NumberAxisFormat,o=r===g.NumberAxisFormat&&a===g.DateAxisFormat;return r!==a&&(n||s||o)}function vS(t){let{previousSeries:e,newConfig:r,setTimeBinningInfoWhenNotProvided:a,queryObject:i}=t,n=r.series?.[0],s=!1,o=!1;if(n&&jt(n)&&fr({seriesConfig:n,xAxisValueFormatType:Vt(r),setTimeBinningInfoWhenNotProvided:a,queryObject:i})){let l=e[0];s=JSON.stringify(l.temporalBinning)!==JSON.stringify(n.temporalBinning),o=a===!0&&(n.temporalBinning?.size??0)<=0}return{timeBinningChanged:s,newTimeBinningWillBeCalculated:o}}function Uu(t,e){return e.length!==t.length}function SS(t,e){return Oi(t)!==Oi(e)}function wS(t,e){return JSON.stringify(t.series[0]?.valueConversion)!==JSON.stringify(e.series[0]?.valueConversion)}function xS(t,e){return JSON.stringify(t.series[0]?.xTemporalBinning)!==JSON.stringify(e.series[0]?.xTemporalBinning)||JSON.stringify(t.series[0]?.yTemporalBinning)!==JSON.stringify(e.series[0]?.yTemporalBinning)||(t.firstDayOfWeek??7)!==(e.firstDayOfWeek??7)||t.outTimeZone!==e.outTimeZone||(t.nullPolicy??st.Null)!==(e.nullPolicy??st.Null)}function CS(t,e){return(t.hideEmptyRowsAndColumns??!1)!==(e.hideEmptyRowsAndColumns??!1)}function TS(t,e){return(t.includeLeapDay??Fi.heatChart.includeLeapDay)!==(e.includeLeapDay??Fi.heatChart.includeLeapDay)}function FS(t){let{previousConfig:e,newConfig:r,fieldList:a}=t,i=e.series[0],n=r.series[0],s=!1;if(i.type===g.ScatterSeries&&n.type===g.ScatterSeries&&a&&a.length>0){let o=new Set(i.additionalTooltipFields||[]),l=new Set(n.additionalTooltipFields||[]);if(!tr(o,l)){let d=Array.from(l).filter(c=>!o.has(c));d.length>0&&(s=a?.some(c=>d.includes(c.name)&&!Pi(c)))}}return s}function pF(t,e){return(t.colorMatch??!1)!==(e.colorMatch??!1)}function fF(t,e){return(t.stackedType??yt.Side)!==(e.stackedType??yt.Side)}function yn(t){let e={...t};return e.position===void 0&&(e.position=Fi.heatChart.legend.position),e}function hF(t,e){let r=t.legend??{type:g.Legend},a=e.legend??{type:g.Legend},i=yn(r),n=yn(a);return!tr(i,n)}function mF(t,e){let r=t.legend??{type:g.Legend},a=e.legend??{type:g.Legend},i=yn(r),n=yn(a);return i.position!==n.position}function yF(t,e){return JSON.stringify(t.series[0]?.gradientRules)!==JSON.stringify(e.series[0]?.gradientRules)}function gF(t,e){return t.series[0].heatRulesType!==e.series[0].heatRulesType}function bF(t){let{oldConfig:e,newConfig:r}=t,a=!1,i=e.series[0],n=r.series[0],s=K(e.series),o=K(r.series);if(s===g.PieSeries&&o===g.PieSeries){let{slices:l,sliceGrouping:d}=i,{slices:c,sliceGrouping:u}=n,f=l?.map(y=>({sliceId:y.sliceId,label:y.label})),p=c?.map(y=>({sliceId:y.sliceId,label:y.label})),h=d?.label,m=u?.label;a=JSON.stringify(f)!==JSON.stringify(p)||JSON.stringify(h)!==JSON.stringify(m)}return a}function IS(t){let{previousSelectionOIDs:e,options:r}=t,a=!1;return r?.filterBySelection===!0&&(a=e?.length!==r?.selectionData?.selectionOIDs?.length||!tr(e,r?.selectionData?.selectionOIDs)),a}function vF(t,e){return t?.length!==e?.length||t?.some((r,a)=>{let i=ct({where:r?.query?.where}),n=ct({where:e?.[a]?.query?.where});return i!==n})}function SF(t,e){let r=it(t),a=it(e);return JSON.stringify(r)!==JSON.stringify(a)}function wF(t,e){let r,a,i,n;return jt(t.series[0])&&(r=t.series[0].temporalBinning?.unit,i=t.series[0].temporalBinning?.size),jt(e.series[0])&&(a=e.series[0].temporalBinning?.unit,n=e.series[0].temporalBinning?.size),Zs(r,i)&&!Zs(a,n)}function xF(t,e){return t.axes?.length===3&&e.axes?.length===2||t.axes?.length===2&&e.axes?.length===3}function CF(t,e){return JSON.stringify(t.series.map(r=>r.assignToSecondValueAxis??!1))!==JSON.stringify(e.series.map(r=>r.assignToSecondValueAxis??!1))}function TF(t,e){let r=t.axes?.map(i=>i?.guides?.map(n=>n?.above===!0)),a=e.axes?.map(i=>i?.guides?.map(n=>n?.above===!0));return JSON.stringify(r)!==JSON.stringify(a)}function FF(t,e){return ju(t)!==ju(e)}function IF(t,e){return(t.showOutliers??A.boxPlot.boxPlotOutliersVisibility)!==(e.showOutliers??A.boxPlot.boxPlotOutliersVisibility)}function OF(t,e){return(t.standardizeValues??A.boxPlot.boxPlotStandardizeValuesVisibility)!==(e.standardizeValues??A.boxPlot.boxPlotStandardizeValuesVisibility)}function AF(t,e){return JSON.stringify(t?.chartRenderer)!==JSON.stringify(e?.chartRenderer)}function PF(t,e){let r=t.axes?.[0].valueFormat.type===g.DateAxisFormat?t.axes[0].valueFormat.intlOptions.timeZone:void 0,a=e.axes?.[0].valueFormat.type===g.DateAxisFormat?e.axes[0].valueFormat.intlOptions.timeZone:void 0;return r!==a}function EF(t,e){let r=!1,a=t.series[0],i=e.series[0];if(a.type===g.ScatterSeries&&i.type===g.ScatterSeries){let{sizePolicy:n}=a,{sizePolicy:s}=i;r=JSON.stringify(n)!==JSON.stringify(s)}return r}function LF(t,e){let r=!1,a=t.series[0],i=e.series[0];if(a.type===g.ScatterSeries&&i.type===g.ScatterSeries){let{sizePolicy:n}=a,{sizePolicy:s}=i;r=n===void 0&&s!==void 0||n!==void 0&&s===void 0||n?.field!==s?.field}return r}function OS(t){let{previousConfig:e,newConfig:r,options:a,previousFilterBySelection:i,previousSelectionOIDs:n,fieldList:s,queryObject:o}=t,{series:l}=r,{series:d}=e,c=K(l),u=!1,f=!1,p=!1,h={common:{layerChanged:!1,queryChanged:!1,xOrYChanged:!1,numberOfSeriesChanged:!1,configFiltersChanged:!1,filterBySelectionChanged:!1,dataForFilterBySelectionChanged:!1,binTemporalDataChanged:!1,timeBinningChanged:!1,newTimeBinningWillBeCalculated:!1,valueFormatChangeRequiresNewData:!1},histogram:{dataPropsChanged:!1},gauge:{valueConversionChanged:!1},boxPlot:{showMeanChanged:!1},heatChart:{binningChanged:!1,hideEmptyRowsAndColumnsChanged:!1,includeLeapDay:!1},scatterPlot:{tooltipFieldsChanged:!1}};switch(h.common.queryChanged=fS({previousConfig:e,newConfig:r,behaviorAfterLimit:a?.chartLimits?.behaviorAfterLimit}),h.common.configFiltersChanged=hS(e,r),h.common.xOrYChanged=mS(d,l),h.common.filterBySelectionChanged=yS(i,a),h.common.dataForFilterBySelectionChanged=IS({previousSelectionOIDs:n,options:a}),h.common.binTemporalDataChanged=gS(e,r),h.common.valueFormatChangeRequiresNewData=bS(e,r),h.common={...h.common,...vS({previousSeries:d,newConfig:r,setTimeBinningInfoWhenNotProvided:a?.setTimeBinningInfoWhenNotProvided,queryObject:o})},c){case g.HistogramSeries:h.histogram.dataPropsChanged=xv(d,l)||wv(d,l);break;case g.LineSeries:case g.BarSeries:case g.ComboLineAndBarSeries:h.common.numberOfSeriesChanged=Uu(d,l);break;case g.BoxPlotSeries:rt(e)&&rt(r)&&(h.common.numberOfSeriesChanged=Uu(d,l),h.boxPlot.showMeanChanged=SS(e,r));break;case g.GaugeSeries:h.gauge.valueConversionChanged=wS(e,r);break;case g.HeatSeries:Kr(e)&&Kr(r)&&(h.heatChart.binningChanged=xS(e,r),h.heatChart.hideEmptyRowsAndColumnsChanged=CS(e,r),h.heatChart.includeLeapDay=TS(e,r));break;case g.ScatterSeries:h.scatterPlot.tooltipFieldsChanged=FS({previousConfig:e,newConfig:r,fieldList:s});break}return f=Object.values(h.common).some(m=>m),(h.gauge.valueConversionChanged||h.histogram.dataPropsChanged||h.boxPlot.showMeanChanged||h.heatChart.binningChanged||h.heatChart.hideEmptyRowsAndColumnsChanged||h.heatChart.includeLeapDay||h.scatterPlot.tooltipFieldsChanged)&&(p=!0),u=f||p,{dataUpdateNeeded:u,dataUpdateDetails:h}}function DF(t,e){let r=Wr(t);if(r&&r.series.length>1){let{preferLabel:a,orderBy:i}=r.orderOptions?.series??{};if(i!==void 0){let n;if(a===!1){let s=X(r.series);n=xp(s)?"splitByValue":"name"}else n="name";r.series.sort((s,o)=>{let l,d;n==="splitByValue"?(l=ct({where:s.query?.where})??"",d=ct({where:o.query?.where})??""):(l=s.name,d=o.name);let[c,u]=i.toUpperCase()===Ne.Descending?[d,l]:[l,d];return typeof c=="string"&&typeof u=="string"?c.localeCompare(u):Number(c)-Number(u)})}}return Zb({data:r?.series.map(a=>a.id),htmlContainer:e}),r}function jp(t){let e,r=t?.orderOptions?.data;return t.series?.length>0&&r?.orderType===ot.MultiAxes&&(e=[],e.push({sortingField:te.xField,orderBy:r.orderByX??Ne.Ascending}),e.push({sortingField:r.orderByY!==void 0?te.yField:"",orderBy:r.orderByY})),e}function AS(t){let{chartConfig:e,field:r}=t,a,i=jp(e);return i?.length===2&&(a=r===te.xField?i[0]?.orderBy:i[1]?.orderBy),a}function PS(t){let e=X(t.series),r;if(t.orderOptions?.data!==void 0){let a=t.orderOptions?.data?.orderType??ot.Category,i=t.orderOptions?.data&&"orderBy"in t.orderOptions.data?t.orderOptions.data.orderBy:void 0;if(a===ot.Category)a=t.series[0].x;else{a===ot.Mean?a=H.Average:a===ot.Median&&(a=H.Median);let n=e===x.BoxPlotMultiFieldsAndCategory&&typeof t.series[0].y=="string"?t.series[0].y:void 0,s=Ze(t.series[0].query?.where),o=ct({where:t.series[0].query?.where});a=ze({key:a,y:n,chartSubType:e,splitBy:s,splitByValue:o}),Array.isArray(i)&&(i=Ne.Ascending)}r={sortingField:a,orderBy:i??Ne.Ascending,preferLabel:t.orderOptions.data&&"preferLabel"in t.orderOptions.data?t.orderOptions.data.preferLabel??!0:!0}}return r}function ES(t){let e=t.series[0],{x:r,y:a}=e,i=X(t.series)===x.PieFromFields,n=X(t.series)===x.BarAndLineFromFields,s,o="",l;if(t.orderOptions?.data!==void 0){let d=t.orderOptions.data&&"preferLabel"in t.orderOptions.data?t.orderOptions.data.preferLabel:!0;if(o=t.orderOptions?.data?.orderType??ot.Category,l=t.orderOptions?.data&&"orderBy"in t.orderOptions.data?t.orderOptions.data.orderBy:void 0,o===ot.Category?i?o=lt:o=d?r:Fi.originalCategoryValue:o=i?Wt:[a].flat()[0],o!==void 0&&o!==""){let c=lo(t);if(K(t.series)!==g.PieSeries&&o!==r&&t.series?.length>1)switch(c){case yt.Stacked:o=A.technicalSortingFieldBySum;break;case yt.Stacked100:o=A.technicalSortingFieldByPercent;break;case yt.Side:typeof a=="string"&&(o=a);break}s={sortingField:o,orderBy:l??Ne.Ascending,preferLabel:d}}}else(n||i)&&t.series[0].query?.outStatistics&&(l=t.series[0].query.outStatistics.map(d=>d.onStatisticField),l?.length>1&&(s={sortingField:Fi.originalCategoryValue,orderBy:l,preferLabel:!1}));return s}function gn(t){let e,r=K(t.series);if(t.series?.length>0){let a;switch(r){case g.HeatSeries:Kr(t)&&(e=jp(t));break;case g.BoxPlotSeries:rt(t)&&(a=PS(t));break;case g.LineSeries:case g.BarSeries:case g.RadarSeries:case g.PieSeries:a=ES(t);break}!e&&a&&(e=[],e.push(a))}return e}function NF(t){let{oldConfig:e,newConfig:r,dataWasUpdated:a}=t,i=K(r.series),n=X(r.series),s=!1,o=!1;if(n!==x.BoxPlotMonoField&&n!==x.BoxPlotMonoFieldAndSplitBy&&r.orderOptions?.data!==void 0){let l=gn(e),d=gn(r);if(i===g.HeatSeries){let c=l?l[0]:void 0,u=d?d[0]:void 0,f=l?l[1]:void 0,p=d?d[1]:void 0;o=e.orderOptions?.data?.orderType!==r.orderOptions?.data?.orderType||c?.sortingField!==u?.sortingField||c?.orderBy!==u?.orderBy||f?.sortingField!==p?.sortingField||f?.orderBy!==p?.orderBy,s=o||a}else{let c=l?l[0]:void 0,u=d?d[0]:void 0;o=e.orderOptions?.data?.orderType!==r.orderOptions?.data?.orderType||c?.sortingField!==u?.sortingField||c?.orderBy!==u?.orderBy||(c?.preferLabel??!0)!==(u?.preferLabel??!0),s=o||a}}return s}function LS(t=Oe.None,e){return t===Oe.None||t===Oe.Log&&e>0||t===Oe.Sqrt&&e>=0}function Vp(t,e){let r={valid:!1};return e===!0?r.invalidType=ae.HistogramEmptyField:t===Oe.Log?r.invalidType=ae.NegativeValueInLogCalculation:t===Oe.Sqrt&&(r.invalidType=ae.NegativeValueInSqrtCalculation),r}function DS(t,e){let r=t;switch(e){case Oe.Log:r=Math.log(t);break;case Oe.Sqrt:r=Math.sqrt(t);break}return r}function NS(t){let e=t;if(t){let r=t.toString().split(".");if(r[1]!==void 0){let a=10**-r[1].length;e=t-a}}return e}function _p(t){let e="field";switch(t){case Oe.Log:e="natural-log";break;case Oe.Sqrt:e="square-root";break;case Oe.None:}return e}async function BS(t){let{queryObject:e,fieldName:r,queryConfig:a,abortKey:i}=t,n=se(e),{idField:s,isTraditionalTypeOID:o}=_t(n),l=o?s:"*",d=`${W.Count}_${s}`,c=`${W.Count}_${r}`,u=`${W.Minimum}_${r}`,f=`${W.Maximum}_${r}`,p={...a,outStatistics:[{statisticType:W.Count,onStatisticField:l,outStatisticFieldName:d},{statisticType:W.Count,onStatisticField:r,outStatisticFieldName:c},{statisticType:W.Minimum,onStatisticField:r,outStatisticFieldName:u},{statisticType:W.Maximum,onStatisticField:r,outStatisticFieldName:f}]},h=await oa({queryObject:e,queryConfig:p,abortKey:i}),m=h.get(d)??Number.NaN,y=h.get(c)??Number.NaN,b=h.get(u)??Number.NaN,v=h.get(f)??Number.NaN;return{countExcludingNulls:y,countIncludingNulls:m,min:b,max:v}}async function $S(t){let{queryConfig:e,chartConfig:r,queryObject:a,abortKey:i}=t,n=r.series[0],{x:s,dataTransformationType:o}=n,l=[],{countIncludingNulls:d,countExcludingNulls:c,min:u,max:f}=await BS({queryObject:a,queryConfig:e,fieldName:s,abortKey:i}),p=LS(o,u),h=c<2||u===f,m={...e};return m.where=Ae([m.where,`${s} is not null`]),{rawData:l,dataCompatibleWithTransformation:p,dataCountIncompatible:h,countExcludingNulls:c,countIncludingNulls:d}}function MS(t){let e={...t};return e.avg=e.avg??Number.NaN,e.count=e.count??Number.NaN,e.max=e.max??Number.NaN,e.min=e.min??Number.NaN,e.stddev=e.stddev??Number.NaN,e.sum=e.sum??Number.NaN,e.variance=e.variance??Number.NaN,e.median=e.median??Number.NaN,e}function qS(t){let{seriesConfig:e,layer:r,useFeaturesInView:a,view:i,queryConfig:n}=t,{x:s,dataTransformationType:o}=e,l={layer:r,view:i,field:s,sqlWhere:or(n.where)?void 0:n.where,useFeaturesInView:a};return o!==Oe.None&&(l={...l,normalizationType:_p(o)}),l}function RS(t){let{seriesConfig:e,layer:r,useFeaturesInView:a,view:i,minValue:n,maxValue:s,queryConfig:o}=t,{x:l,binCount:d,dataTransformationType:c}=e,u={layer:r,view:i,field:l,minValue:n,maxValue:s,numBins:d??Tb,classificationMethod:"equal-interval",sqlWhere:or(o.where)?void 0:o.where,useFeaturesInView:a};return c!==Oe.None&&(u={...u,normalizationType:_p(c)}),u}function kS(t,e){let r=Number.NaN;return t!==void 0&&e!==void 0&&(r=t-e),r}async function WS(t){let{chartConfig:e,queryConfig:r,queryObject:a,countExcludingNulls:i,countIncludingNulls:n,options:s,errorStrings:o}=t,l=e.series[0],{dataTransformationType:d}=l,c={valid:!0},u=se(a),f=Ni(r?.geometry)?.extent?.toJSON()!==void 0,p=s?.view,h=qS({seriesConfig:l,layer:u,view:p,useFeaturesInView:f,queryConfig:r}),m;if(p!==void 0&&(m=new Mu({geometry:p.extent}),p.extent!==void 0&&Fp(u))){let{distance:P,units:E}=r;P!==void 0&&(m.distance=P),E!==void 0&&(m.units=E)}if(r.timeExtent){let P={start:r.timeExtent[0],end:r.timeExtent[1]};m===void 0?m=new Mu({timeExtent:P}):m.timeExtent=P}h.filter=m;let y;h.outStatisticTypes={exclude:["median"]};try{y=await qu(h)}catch(P){throw new Qe(Ye.QueryFeaturesError,o.errors.queryError,P)}h.outStatisticTypes={include:["median"]};try{let P=await qu(h);P?.median&&(y.median=P.median)}catch{}y=MS(y);let{avg:b,count:v,stddev:S,min:C,max:F,sum:I,median:N}=y;if(v===0)c={...Vp(d)};else{let P=RS({seriesConfig:l,layer:u,view:p,useFeaturesInView:f,minValue:NS(C),maxValue:F,valueExpression:h.valueExpression,queryConfig:r});P.filter=m;let E;try{E=await Yg(P)}catch(R){throw new Qe(Ye.QueryFeaturesError,o.errors.queryError,R)}let B=kS(n,i);c.data={mean:b,stddev:S,min:C,max:F,median:Number(N),bins:E?.bins,count:i,nulls:B,sum:I??void 0},c.data.bins.length>0&&(c.data.bins[c.data.bins.length-1].isLastBin=!0)}return c}async function zp(t){let{chartConfig:e,queryConfig:r,queryObject:a,options:i,abortKey:n,errorStrings:s}=t,{series:o}=e,l=o[0],d;if(Ke(a))d=await S0(t);else{let{rawData:c,dataCompatibleWithTransformation:u,dataCountIncompatible:f,countIncludingNulls:p,countExcludingNulls:h}=await $S({queryObject:a,chartConfig:e,queryConfig:r,abortKey:n});d={valid:!0},!u||f?d=Vp(l.dataTransformationType,f):d=await WS({chartConfig:e,queryObject:a,queryConfig:r,countIncludingNulls:p,countExcludingNulls:h,options:i,errorStrings:s})}return d}async function jS(t){let{queryObject:e,queryConfig:r,chartConfig:a,x:i}=t,{series:n}=a,{dataTransformationType:s}=n[0],o={...r,orderByFields:[i],outFields:[i]};return{valid:!0,data:{dataItems:(await Dt({queryObject:e,queryConfig:o})).map(l=>({[i]:DS(l.attributes[i],s)}))}}}var Jr={groupByCaseBegin:"CASE",groupByOutKeyword:"OUT",groupByCaseEnd:"ELSE 'OUT' END"};function BF(t){return K(t.series)!==g.BoxPlotSeries?A.xAxisField:t.series[0].x}function $F(t){let e=lo(t);return e===yt.Stacked||e===yt.Stacked100}function MF(t,e){let r=[],a=new Map,i=new Map;return t.forEach((n,s)=>i.set(n.id,s)),e.forEach((n,s)=>{let o=i.get(n.id);if(o!==void 0){let l=new Set;for(;a.has(o)&&!l.has(o);)l.add(o),o=a.get(o)??o;o!==s&&(r.push([o,s]),a.set(s,o))}}),r}function VS(t){let e={...t};return t.showMean===!0&&(e.series=[e.series[0]],e.series[0].query?.where!==void 0&&delete e.series[0].query.where),e}function Up(t){return Kr(t)&&nr(t?.axes?.[0]?.valueFormat)&&nr(t?.axes?.[1]?.valueFormat)}function bn(t){let{dataInfo:e,chartType:r,subError:a}=t;switch(e.valid=!1,r){case g.BarSeries:case g.ComboLineAndBarSeries:e.invalidType=ae.BarElementExceedsLimit;break;case g.LineSeries:e.invalidType=ae.LineChartExceedsLimit;break;case g.PieSeries:e.invalidType=ae.PieChartExceedsLimit;break;case g.GaugeSeries:e.invalidType=ae.GaugeExceedsLimit;break;case g.BoxPlotSeries:a?.outlierLimit===!0?e.invalidType=ae.BoxPlotOutliersExceedsLimit:e.invalidType=ae.BoxPlotExceedsLimit;break;case g.HeatSeries:e.invalidType=ae.HeatChartExceedsLimit;break}}function _S(t,e){t.valid=!1,t.invalidType=e}function qF(t){let{invalidType:e,chartLimits:r,elementCount:a,seriesCount:i,queryObject:n,filterBySelection:s,formatLocale:o=df(document.documentElement),isTemporalChart:l,errorStrings:d}=t,c=d.errors.defaultInvalidChart,u,f=new Intl.NumberFormat(o),p=Xr(r),{maxCategoryCount:h}=p,m=d.modalHeaders.invalidChart;switch(e){case ae.BarElementExceedsLimit:{m=d.modalHeaders.tooManyFeatures;let y=Number.NaN,b=Number.NaN,v="";i!==void 0&&(i<=p.maxBarChartSeriesCount?i===1?(v=d.errors.uniqueSeriesBarCountCannotExceedLimit,y=p.maxBarUniqueSeriesCountTotal):i===2?(v=d.errors.twoSeriesBarCountCannotExceedLimit,y=p.maxBarTwoSeriesCountTotal,b=p.maxBarTwoSeriesCountPerSeries):i>2&&(v=d.errors.threePlusSeriesBarCountCannotExceedLimit,y=p.maxBarThreePlusSeriesCountTotal,b=p.maxBarThreePlusSeriesCountPerSeries):(v=d.errors.barSeriesCountCannotExceedLimit,b=p.maxBarChartSeriesCount));let S=f.format(y),C=f.format(b),F=a!==void 0?f.format(a):"";c=qe(v,{totalLimit:S,seriesLimit:C,elementCount:F}),u={actualCount:a??Number.NaN,totalLimit:y,seriesLimit:b};break}case ae.LineChartExceedsLimit:{m=d.modalHeaders.tooManyFeatures;let y=Number.NaN,b=Number.NaN,v="";i!==void 0&&(i<=p.maxLineChartSeriesCount?i===1?(v=l?d.errors.uniqueTemporalSeriesLineCountCannotExceedLimit:d.errors.uniqueSeriesLineCountCannotExceedLimit,y=p.maxLineUniqueSeriesCountTotal):i===2?(v=l?d.errors.twoTemporalSeriesLineCountCannotExceedLimit:d.errors.twoSeriesLineCountCannotExceedLimit,y=p.maxLineTwoSeriesCountTotal,b=p.maxLineTwoSeriesCountPerSeries):i>2&&(v=l?d.errors.threePlusTemporalSeriesLineCountCannotExceedLimit:d.errors.threePlusSeriesLineCountCannotExceedLimit,y=p.maxLineThreePlusSeriesCountTotal,b=p.maxLineThreePlusSeriesCountPerSeries):(v=d.errors.lineSeriesCountCannotExceedLimit,b=p.maxLineChartSeriesCount));let S=f.format(y),C=f.format(b),F=a!==void 0?f.format(a):"";c=qe(v,{elementCount:F,seriesLimit:C,totalLimit:S}),u={actualCount:a??Number.NaN,totalLimit:y,seriesLimit:b}}break;case ae.BoxPlotExceedsLimit:{m=d.modalHeaders.tooManyFeatures;let y=Number.NaN,b=Number.NaN,v="";i!==void 0&&(i<=p.maxBoxPlotSeriesCount?i===1?(v=d.errors.uniqueSeriesBoxCountCannotExceedLimit,y=p.maxBoxUniqueSeriesCountTotal):i===2?(v=d.errors.twoSeriesBoxCountCannotExceedLimit,y=p.maxBoxTwoSeriesCountTotal,b=p.maxBoxTwoSeriesCountPerSeries):i>2&&(v=d.errors.threePlusBoxLineCountCannotExceedLimit,y=p.maxBoxThreePlusSeriesCountTotal,b=p.maxBoxThreePlusSeriesCountPerSeries):(v=d.errors.boxSeriesCountCannotExceedLimit,b=p.maxBoxPlotSeriesCount));let S=f.format(y),C=f.format(b),F=a!==void 0?f.format(a):"";c=qe(v,{elementCount:F,seriesLimit:C,totalLimit:S}),u={actualCount:a??Number.NaN,totalLimit:y,seriesLimit:b}}break;case ae.BoxPlotOutliersExceedsLimit:{m=d.modalHeaders.tooManyFeatures;let y=d.errors.boxSeriesOutlierCannotExceedLimit,b=p.maxBoxPlotOutlierLimit,v=f.format(b);c=qe(y,{totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.HeatChartExceedsLimit:{m=d.modalHeaders.tooManyFeatures;let y=d.errors.heatChartCannotExceedLimit,b=p.maxHeatChartCellLimit,v=f.format(b),S=a!==void 0?f.format(a):"";c=qe(y,{featureCount:S,totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.PieChartExceedsLimit:{m=d.modalHeaders.tooManyFeatures;let y=d.errors.pieChartSlicesCannotExceedLimit,b=p.maxPieChartSliceCountTotal,v=f.format(b),S=a!==void 0?f.format(a):"";c=qe(y,{sliceCount:S,totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.GaugeExceedsLimit:{m=d.modalHeaders.tooManyFeatures;let y=d.errors.gaugeCannotExceedLimit,b=p.maxGaugeByFeaturesLimit,v=f.format(b),S=a!==void 0?f.format(a):"";c=qe(y,{featureCount:S,totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.PieChartMixOfNegativePositiveSlices:m=d.modalHeaders.cannotCombineNegativeAndPositiveSlices,c=d.errors.pieChartCannotHaveMixtureOfPositiveAndNegativeSlices;break;case ae.NegativeValueInSqrtCalculation:m=d.modalHeaders.invalidData,c=d.errors.negativeValueInDataForSqrtTransformation;break;case ae.NegativeValueInLogCalculation:m=d.modalHeaders.invalidData,c=d.errors.negativeValueInDataForLogTransformation;break;case ae.HistogramEmptyField:s===!0?(m=d.modalHeaders.noDataAvailable,c=d.errors.noDataFBSMessage):Kt(n)?(m=d.modalHeaders.noDataAvailable,c=d.errors.noDataFBEMessage):(m=d.modalHeaders.invalidChart,c=d.errors.histogramEmptyField);break;case ae.EmptyDataSet:m=d.modalHeaders.noDataAvailable,s===!0?c=d.errors.noDataFBSMessage:Kt(n)?c=d.errors.noDataFBEMessage:c=d.errors.noDataMessage;break;case ae.NegativeValueInXAxisLogScale:c=d.errors.logarithmicXAxisNotPossible;break;case ae.NegativeValueInYAxisLogScale:c=d.errors.logarithmicYAxisNotPossible;break;case ae.BadData:}if(c===d.errors.defaultInvalidChart&&(e===ae.BarElementExceedsLimit||e===ae.LineChartExceedsLimit||e===ae.HeatChartExceedsLimit||e===ae.PieChartExceedsLimit||e===ae.GaugeExceedsLimit||e===ae.BoxPlotExceedsLimit)&&typeof a=="number"&&typeof i=="number"&&a/i>h){let y=a/i;c=qe(d.errors.categoryCountCannotExceedLimit,{categoryCount:f.format(y),maxCategoryCount:f.format(h)})}return{keyword:e??ae.BadData,header:m,message:c,params:u}}function Ei(t,e){return`${e}_${t}`}function ro(t){let{value:e,mean:r,stdDev:a}=t;return(e-r)/a}function po(t){let{dataItem:e,chartSubType:r,y:a,splitByValue:i,meanPerField:n,stdDevPerField:s}=t,o=e,l={chartSubType:r,y:a,splitByValue:i},d=ze({...l,key:H.Average}),c=ze({...l,key:H.StandardDeviation}),u=n??Number(e[d]),f=s??Number(e[c]);return Number.isFinite(u)&&Number.isFinite(f)&&Object.values(H).forEach(p=>{let h=ze({key:p,y:a,chartSubType:r,splitByValue:i}),m=e[h];if(m!=null){let y=Number(m);if(Number.isFinite(y)){l={...l,key:p,showOutliers:!1,standardizeValues:!0};let b=ze(l);if(o[b]=ro({mean:u,stdDev:f,value:y}),p===H.Min||p===H.Max){l={...l,key:p,showOutliers:!0,standardizeValues:!0},b=ze(l),l={...l,standardizeValues:!1,splitByValue:i};let v=ze(l);y=Number(e[v]),Number.isFinite(y)&&(o[b]=ro({mean:u,stdDev:f,value:y}))}}}}),o}function zS(t){let{data:e,yList:r,calculateZScore:a=!1}=t,i=e[0],n=new Map;return r.forEach(s=>{let o={};Object.keys(i).forEach(l=>{l.startsWith(s)?o[l.replace(`${s}_`,"")]=i[l]:l.includes(A.rendererSymbolField)&&(o[l]=i[l]),o[A.boxPlot.boxPlotCategory]=s,a&&(o=po({dataItem:o,chartSubType:x.BoxPlotMultiFields}))}),n.set(s,o)}),Array.from(n.values())}function US(t){let{data:e,splitByField:r,y:a}=t,i={[A.boxPlot.boxPlotCategory]:a};return e.forEach(n=>{let s=n[r];s!==void 0&&Object.keys(n).forEach(o=>{o===A.rendererSymbolField?i[`${o}_${s?.toString()}`]=n[o]:o===A.boxPlot.boxPlotMeanLineMarkerId?i[o]=n[o]:i[`${s?.toString()}_${o}`]=n[o]})}),[i]}function HS(t){let{splitByField:e,data:r,yList:a,calculateZScore:i=!1,meanAndStdDevPerField:n}=t,s=new Map;return r.forEach(o=>{let l=o[e];a.forEach(d=>{let c={[A.boxPlot.boxPlotCategory]:d};Object.entries(o).forEach(([u,f])=>{u.startsWith(`${d}_`)?c[`${l}_${u.replace(`${d}_`,"")}`]=f:u.includes(A.rendererSymbolField)?c[`${u}_${l}`]=f:u===A.boxPlot.boxPlotMeanLineMarkerId&&(c[u]=o[u])}),i&&(c=po({dataItem:c,chartSubType:x.BoxPlotMultiFieldsAndSplitBy,splitByValue:l,meanPerField:n?.[Ei(d,W.Average)],stdDevPerField:n?.[Ei(d,W.StandardDeviation)]})),s.set(d,{...s.get(d)??{},...c})})}),Array.from(s.values())}function GS(t){let{data:e,yList:r,calculateZScore:a=!1,meanAndStdDevPerField:i}=t,n=e;return a&&n.forEach(s=>{r.forEach(o=>{po({dataItem:s,chartSubType:x.BoxPlotMultiFieldsAndCategory,y:o,meanPerField:i?.[Ei(o,W.Average)],stdDevPerField:i?.[Ei(o,W.StandardDeviation)]})})}),n}function QS(t){let{splitByField:e,x:r,data:a}=t,i=new Map;return a.forEach(n=>{let s=n[r],o={[r]:s},l=n[e];Object.entries(n).forEach(([d,c])=>{if(d.includes(A.rendererSymbolField))o[`${A.rendererSymbolField}_${l?.toString()}`]=c;else if(d===A.boxPlot.boxPlotMeanLineMarkerId)o[d]=n[d];else if(d!==e&&d!==r){let u=d!==A.xAxisField&&d!==A.originalCategoryValue?`${l?.toString()}_${d}`:d;o[u]=c}}),i.set(s,{...i.get(s)??{},...o})}),Array.from(i.values())}function ZS(t,e){let{series:r}=t,a=r[0],{y:i}=a,n=X(t.series),s={y:n===x.BoxPlotMultiFieldsAndCategory?i:void 0,chartSubType:n},o=t.series.map(l=>{let d=ct({where:l.query?.where,normalize:!1,escape:!0});return d!==null&&`${d}`.startsWith("'")&&`${d}`.endsWith("'")&&(d=d.substring(1,d.length-1)),d});o.length===0&&o.push(" "),e.forEach(l=>{o.forEach(d=>{s.splitByValue=d;let c=ze({...s,key:H.Min,showOutliers:!0}),u=ze({...s,key:H.Min,showOutliers:!1}),f=ze({...s,key:H.Max,showOutliers:!0}),p=ze({...s,key:H.Max,showOutliers:!1});l[f]===void 0&&l[p]!==void 0&&(l[f]=l[p]),l[c]===void 0&&l[u]!==void 0&&(l[c]=l[u])})})}function KS(t,e){let r,a,i=t[e[H.IQR]],n=t[e[H.FirstQuartile]],s=t[e[H.ThirdQuartile]];return Number.isFinite(i)&&Number.isFinite(n)&&Number.isFinite(s)&&(r=n-i*1.5,a=s+i*1.5),{outlierMinThreshold:r,outlierMaxThreshold:a}}function Hu(t){let{yField:e,xField:r,xValue:a,splitByField:i,splitByValue:n,outlierMaxThreshold:s,outlierMinThreshold:o,target:l}=t,d;if(r!==void 0&&a!==void 0){let f=typeof a!="string"?a:`'${Js(a)}'`;d=`${r}=${f.toString()}`}let c;if(i!==void 0&&n!==void 0){let f=typeof n!="string"?n:`'${Js(n)}'`;c=`${i}=${f.toString()}`}let u;return l==="outliers"&&o!==s?u=`(${e}<${o} OR ${e}>${s})`:l==="alternativeData"&&(o===s?u=`(${e}=${o})`:u=`(${e}>=${o} AND ${e}<=${s})`),[d,c,u].filter(f=>f!==void 0).join(" AND ")}function Hp(t){let{data:e,yField:r,x:a,chartSubType:i,splitByField:n}=t,s=i===x.BoxPlotMonoField||i===x.BoxPlotMonoFieldAndCategory||i===x.BoxPlotMonoFieldAndSplitBy||i===x.BoxPlotMonoFieldAndCategoryAndSplitBy?void 0:r,o=Ti(s),l=[],d=[],{maxOperandsPerWhereClause:c}=wn(),u=[],f=[],p=1;return e.forEach((h,m)=>{let{outlierMinThreshold:y,outlierMaxThreshold:b}=KS(h,o);if(typeof y=="number"&&typeof b=="number"){let v={yField:r,outlierMinThreshold:y,outlierMaxThreshold:b};(i===x.BoxPlotMonoFieldAndCategory||i===x.BoxPlotMultiFieldsAndCategory||i===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&a!==void 0&&a in h&&(v.xField=a,v.xValue=ta({value:h[a],dataContext:h,keepNullValues:!0})),(i===x.BoxPlotMonoFieldAndSplitBy||i===x.BoxPlotMultiFieldsAndSplitBy||i===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&n!==void 0&&n in h&&(v.splitByField=n,v.splitByValue=h[n]),u.push(Hu({...v,target:"outliers"})),f.push(Hu({...v,target:"alternativeData"})),(p%c===0||m===e.length-1)&&(l.push(Ae(u,"OR")),d.push(Ae(f,"OR")),u=[],f=[])}p+=1}),{outliersFilterBatches:l,dataWithoutOutliersFilterBatches:d}}function JS(t){let{data:e,outlierDataItem:r,chartSubType:a,x:i,y:n,meanAndStdDevPerField:s,splitByField:o}=t,l=s?.[Ei(n,W.Average)],d=s?.[Ei(n,W.StandardDeviation)];if(l===void 0&&d===void 0)switch(a){case x.BoxPlotMultiFields:{let c=Ti(n),u=e[0];l=Number(u[c[H.Average]]),d=Number(u[c[H.StandardDeviation]]);break}case x.BoxPlotMultiFieldsAndCategory:{let c=e.find(u=>u[i]===r[i]);if(c!==void 0){let u=Ti(n);l=Number(c[u[H.Average]]),d=Number(c[u[H.StandardDeviation]])}break}case x.BoxPlotMultiFieldsAndSplitBy:{let c=e.find(u=>u[o]===r[o]);if(c!==void 0){let u=Ti(n);l=Number(c[u[H.Average]]),d=Number(c[u[H.StandardDeviation]])}break}}return{mean:l,stdDev:d}}async function YS(t){let{seriesConfig:e,data:r,uniqueQuery:a,queryObject:i,meanAndStdDevPerField:n,abortKey:s}=t,o=X(e),l=e[0],{x:d}=l,c=Ze(l.query?.where),u=se(i),f=_t(u).idField,p=it(e),h=[];for(let b=0;b<p.length;b+=1){let v=p[b],{outliersFilterBatches:S}=Hp({data:r,yField:v,x:d,chartSubType:o,splitByField:c});for(let C=0;C<S.length;C+=1){let F=S[C];if(F!==""){let I=[];d!==A.boxPlot.boxPlotCategory&&I.push(d),I.push(v),c!==""&&I.push(c),I.push(f);let N={...a,where:Ae([a.where,F]),groupByFieldsForStatistics:void 0,outStatistics:void 0,orderByFields:void 0,num:void 0,outFields:I};h.push(Dt({queryObject:i,queryConfig:N,featureCount:1,abortKey:s}))}}}let m=await Promise.all(h),y=new Map;for(let b=0;b<m.length;b+=1){let v=m[b],S=p[b];v.forEach(C=>{let F={...C.attributes};if(F[S]!==void 0){d===A.boxPlot.boxPlotCategory&&(F[A.boxPlot.boxPlotCategory]=S);let I={key:H.Outlier,chartSubType:o};switch(o){case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:I={...I,splitByValue:F[c]};break;case x.BoxPlotMultiFieldsAndCategory:I={...I,y:S};break}let N=ze(I),P=F[S];F[N]=P;let E=`${F[d]}-${F[c]}-${P}`,B=y.get(E);if(F[pe.uniqueIdsName]=[...B?.[pe.uniqueIdsName]??[],F[f]],delete F[f],of(o)){let R=ze({...I,standardizeValues:!0}),{mean:q,stdDev:L}=JS({data:r,outlierDataItem:F,chartSubType:o,x:d,y:S,splitByField:c,meanAndStdDevPerField:n});q!==void 0&&L!==void 0&&(F[R]=ro({value:P,mean:q,stdDev:L}))}delete F[S],F[A.boxPlot.boxPlotOutlierId]=!0,y.set(E,F)}})}return Array.from(y.values())}async function XS(t){let{data:e,queryObject:r,uniqueQuery:a,elementCount:i,chartConfig:n,chartLimits:s,abortKey:o}=t,l=[],{series:d,showMean:c}=n,u=In({showMean:c,seriesConfig:d}),f=X(d),p=pr(n),{x:h}=p,m=Ze(p.query?.where),y=[];for(let v=0;v<u.length;v+=1){let S=u[v],{dataWithoutOutliersFilterBatches:C}=Hp({data:e,yField:S,x:h,chartSubType:f,splitByField:m});for(let F=0;F<C.length;F+=1){let I=C[F],N={...a,where:Ae([a.where,I])};N.outStatistics!==void 0&&(N.outStatistics=N.outStatistics?.filter(P=>(P.statisticType===W.Minimum||P.statisticType===W.Maximum)&&P.onStatisticField===S).map(P=>({...P,outStatisticFieldName:`${P.outStatisticFieldName}${A.boxPlot.boxPlotOutliersSuffix}`}))),y.push(Fn({queryObject:r,uniqueQuery:N,chartConfig:n,elementCount:i,isTimeBinningSeries:!1,showMean:c,chartLimits:s,abortKey:o}))}}let b=await Promise.all(y);for(let v=0;v<b.length;v+=1)l.push(...b[v]);return f!==x.BoxPlotMonoFieldAndCategoryAndSplitBy&&(l=na({data:l,x:m!==void 0&&m!==""?m:h})),l}async function ew(t){let{queryObject:e,uniqueQuery:r,chartConfig:a,abortKey:i}=t,n,{series:s,showMean:o}=a,l=X(s);if(l===x.BoxPlotMultiFieldsAndCategory||l===x.BoxPlotMultiFieldsAndSplitBy){let d=In({showMean:o,seriesConfig:s}),c={...r};delete c.outStatistics,delete c.groupByFieldsForStatistics,delete c.orderByFields;let u=[];for(let p=0;p<d.length;p+=1){let h=d[p];u.push({statisticType:W.Average,onStatisticField:h,outStatisticFieldName:`${W.Average}_${h}`},{statisticType:W.StandardDeviation,onStatisticField:h,outStatisticFieldName:`${W.StandardDeviation}_${h}`})}c.outStatistics=u;let f=await Dt({queryObject:e,queryConfig:c,featureCount:1,abortKey:i});f.length>0&&(n=f[0].attributes)}return n}function tw(t){let{data:e,additionalData:r,chartConfig:a}=t,i=a.series[0],{x:n}=i,s=Ze(i.query?.where);return e.map(o=>{let l=o,d=r.find(c=>c[n]===o[n]&&(s===""?!0:c[s]===o[s]));return d!==void 0&&(l={...o,...d}),l})}function Gp(t){let{chartConfig:e,data:r,calculateZScore:a=!1,meanAndStdDevPerField:i}=t,{series:n,showMean:s}=e,o=pr(e),l=X(e.series),{x:d}=o,c=In({showMean:s,seriesConfig:n}),u=r;if(r?.[0]!==void 0){let f=Ze(o.query?.where);switch(l){case x.BoxPlotMonoField:u[0][A.boxPlot.boxPlotCategory]=c[0];break;case x.BoxPlotMultiFields:u=zS({data:r,yList:c,calculateZScore:a});break;case x.BoxPlotMonoFieldAndSplitBy:u=US({data:r,splitByField:f,y:c[0]});break;case x.BoxPlotMultiFieldsAndSplitBy:u=HS({splitByField:f,data:r,yList:c,meanAndStdDevPerField:i,calculateZScore:a});break;case x.BoxPlotMultiFieldsAndCategory:u=GS({data:r,yList:c,meanAndStdDevPerField:i,calculateZScore:a});break;case x.BoxPlotMonoFieldAndCategoryAndSplitBy:u=QS({splitByField:f,x:d,data:r});break;case x.BoxPlotMonoFieldAndCategory:}}return ZS(e,u),u}async function rw(t){let{data:e,queryObject:r,uniqueQuery:a,fetchFullBoxPlotData:i,chartConfig:n,elementCount:s,chartLimits:o,abortKey:l}=t,d=e,c=[];if(d!==void 0){let{series:u}=n,f=await ew({queryObject:r,uniqueQuery:a,chartConfig:n,abortKey:l});if(i!==!1){c=await YS({queryObject:r,uniqueQuery:a,seriesConfig:u,data:d,abortKey:l});let p=await XS({queryObject:r,uniqueQuery:a,elementCount:s,data:e,chartConfig:n,chartLimits:o,abortKey:l});d=tw({data:d,additionalData:p,chartConfig:n})}d=Gp({chartConfig:n,data:d,meanAndStdDevPerField:f,calculateZScore:!0})}return{dataItems:d,outliers:c}}async function iw(t){let{queryObject:e,queryConfig:r,chartConfig:a,abortKey:i}=t,n=a.series[0],{x:s,valueConversion:o}=n,l=yo(a),d=await Dt({queryObject:e,queryConfig:r,featureCount:r.num??1,abortKey:i}),c=[{[s]:null}];if(l)c=d.map(u=>{ho(u.attributes,s);let f=ku(u.attributes[s],o);return{...u.attributes,[s]:f}});else if(d.length>0){let u=d[0].attributes[s]??d[0].attributes[s.toUpperCase()]??d[0].attributes[s.toLowerCase()];u=ku(u,o),c=[{[s]:u}]}return c}async function aw(t){let{queryObject:e,chartConfig:r,queryConfig:a,options:i,abortKey:n}=t,{chartLimits:s}=i??{},o={valid:!0},{behaviorAfterLimit:l,maxGaugeByFeaturesLimit:d}=s??{},c=yo(r),u=!0,f;if(c&&(f=(await af({chartConfig:r,queryObject:e,queryConfig:a,behaviorAfterLimit:l,numberMaxOfFeaturesToFetch:d,isGaugeByFeature:c})).elementCount,i?.chartLimits?.behaviorAfterLimit!==Dr.RenderUpToTheLimit&&(u=sr({count:f??0,seriesCount:r.series.length,chartType:g.GaugeSeries,chartLimits:s})),i&&(Number.isFinite(d)||Number.isFinite(f)))){let p=Math.min(d??Number.NaN,f??Number.NaN);Number.isFinite(p)&&(i.chartLimits={...s,maxGaugeByFeaturesLimit:p}),vp({chartConfig:r,options:i,uniqueQuery:a})}if(Number.isNaN(u)||u){let p=await iw({queryObject:e,chartConfig:r,queryConfig:a,abortKey:n});o.data={dataItems:p},o.count=p.length}else o.count=f,bn({dataInfo:o,chartType:g.GaugeSeries});return o}async function RF(t){let{queryObject:e,chartConfig:r,queryConfig:a}=t,{minimumFromField:i,maximumFromField:n}=r.axes[0],s=[],o="",l="";i!==void 0&&(typeof i=="string"?(o=`${W.Minimum}_${i}`,s.push({statisticType:W.Minimum,onStatisticField:i,outStatisticFieldName:o})):(o=`${i.statisticType}_${i.onStatisticField}`,s.push({...i,outStatisticFieldName:o}))),n!==void 0&&(typeof n=="string"?(l=`${W.Maximum}_${n}`,s.push({statisticType:W.Maximum,onStatisticField:n,outStatisticFieldName:l})):(l=`${n.statisticType}_${n.onStatisticField}`,s.push({...n,outStatisticFieldName:l})));let d={...a,outStatistics:s,orderByFields:void 0,groupByFieldsForStatistics:void 0,returnDistinctValues:void 0,fetchNullValues:void 0,num:void 0};ia(e);let c=await oa({queryObject:e,queryConfig:d}),u=c.get(o),f=c.get(l);return{minimumFromData:u,maximumFromData:f}}function Gu(t){let{orderBy:e,axisFormatOptions:r}=t;return e!==void 0&&r!==void 0&&(!Array.isArray(e)||r?.type===g.CategoryAxisFormat)}function Qu(t,e,r){let a=0;if(Array.isArray(r)){let i=t?.toString()??"",n=e?.toString()??"",s=r.indexOf(i),o=r.indexOf(n);s===-1&&(s=r.length),o===-1&&(o=r.length),a=s-o}else r===Ne.Descending?typeof t=="string"&&typeof e=="string"?a=e.localeCompare(t,void 0,{numeric:!0}):a=(Number(e)||0)-(Number(t)||0):r===Ne.Ascending&&(typeof t=="string"&&typeof e=="string"?a=t.localeCompare(e,void 0,{numeric:!0}):a=(Number(t)||0)-(Number(e)||0));return a}function nw(t){let{arrayToSort:e,chartConfig:r,dataOrderParameters:a}=t,i=a??gn(r),n,s,o=!1,l=!1,d=!1;i&&e.length>1&&([n,s]=i,o=n&&n.sortingField.length>0&&Gu({orderBy:n.orderBy,axisFormatOptions:r.axes?.[0]?.valueFormat}),l=s&&s.sortingField.length>0&&Gu({orderBy:s.orderBy,axisFormatOptions:r.axes?.[1]?.valueFormat}),d=o||l),d&&e.sort((c,u)=>{let f=0;if(o&&n?.sortingField){let p=n.orderBy;f=Qu(c[n.sortingField],u[n.sortingField],p)}if(f===0&&l&&s?.sortingField){let p=s.orderBy;f=Qu(c[s.sortingField],u[s.sortingField],p)}return f})}function sw(t,e,r){let a=0;if(Array.isArray(r)){let i=t?.toString()??"",n=e?.toString()??"",s=r.indexOf(i),o=r.indexOf(n);s===-1&&(s=r.length),o===-1&&(o=r.length),a=s-o}else r===Ne.Descending?typeof t=="string"&&typeof e=="string"?a=e.localeCompare(t,void 0,{numeric:!0}):a=(Number(e)||0)-(Number(t)||0):r===Ne.Ascending&&(typeof t=="string"&&typeof e=="string"?a=t.localeCompare(e,void 0,{numeric:!0}):a=(Number(t)||0)-(Number(e)||0));return a}function Zu(t){let{chartConfig:e,field:r,chartData:a}=t,i=AS({chartConfig:e,field:r}),n=Array.from(new Set(a.map(s=>r in s?s[r]:void 0)));return i&&n.length>1&&n.sort((s,o)=>sw(s,o,i)),n.map(s=>({[r]:s}))}function ow(t){let{chartConfig:e,chartData:r}=t;r.heatChartAxesData={xAxisData:Zu({chartConfig:e,field:te.xField,chartData:r.dataItems}),yAxisData:Zu({chartConfig:e,field:te.yField,chartData:r.dataItems})}}function vn(t){let{arrayToSort:e,chartConfig:r,fieldList:a,isTimeBinningSeries:i}=t;if(i!==!0&&e[0]!==void 0){let{series:n}=r,s=X(n),o=K(n),l=Vt(r),d=gn(r);if(Kr(r)&&e!==void 0)nw({arrayToSort:e,chartConfig:r,dataOrderParameters:d});else if(d?.[0]!==void 0&&e!==void 0&&e.length>1){let{orderBy:c}=d[0],{sortingField:u}=d[0],f=r.orderOptions?.data?.orderType===ot.Category,p=d[0].preferLabel!==!1,h=s===x.BarAndLineFromFields||s===x.PieFromFields||s===x.BoxPlotMultiFields||s===x.BoxPlotMultiFieldsAndSplitBy,m=h||o===g.PieSeries,y=s===x.PieNoAggregation||s===x.BarAndLineNoAggregation||s===x.BarAndLineSplitByNoAggregation;if(f&&m&&(!p||(o===g.LineSeries||o===g.RadarSeries)&&l===g.NumberAxisFormat)&&(u=A.originalCategoryValue),Array.isArray(c))Xb({arrayToSort:e,orderBy:c,sortingField:u,fieldList:a,isByFieldsChart:h,preferLabel:p});else{let b=l===g.DateAxisFormat&&f;ra({arrayToSort:e,orderBy:c,sortingField:u,forceAscendingOrder:b,isNonAggregated:y,sortByCategory:f,preferLabel:p,isPieOrByFieldsChart:m})}}}}function kF(t){let{alteredConfig:e,dataInfo:r,fieldList:a,options:i,queryObject:n}=t,s=go(r.data);if(s&&vn({arrayToSort:s,chartConfig:e,fieldList:a,isTimeBinningSeries:fr({seriesConfig:pr(e),xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:i?.setTimeBinningInfoWhenNotProvided,queryObject:n})}),rt(e)){let o=r?.data&&"meanLines"in r.data?r.data.meanLines:void 0;o&&vn({arrayToSort:o,chartConfig:e})}Kr(e)&&r.data&&ow({chartConfig:e,chartData:r.data})}function WF(t){let{config:e,previousConfig:r,dataUpdateNeededProps:a,updatedProps:i,options:n,filterBySelection:s,previousSelectionOIDs:o,fieldList:l,queryObject:d}=t,c=Array.from(i.keys()).some(f=>{let p=!1;if(a.includes(f)){let{oldValue:h,newValue:m}=i.get(f)??{};p=!tr(h,m)}return p}),u;if(!c&&i.get("layer")){let{oldValue:f,newValue:p}=i.get("layer")??{};c=Kt(f)!==Kt(p)}if(i.get("layer")&&(u={common:{layerChanged:!0}}),e&&r){let f=OS({previousConfig:r,newConfig:e,options:n,previousFilterBySelection:i.has("filterBySelection")?i.get("filterBySelection")?.oldValue:s,previousSelectionOIDs:o,fieldList:l,queryObject:d});u=f.dataUpdateDetails,c=c||f.dataUpdateNeeded}return{dataUpdateNeeded:c,dataUpdateDetails:u}}function lw(t){return t?.type==="uniqueValue"&&(t.uniqueValueInfos=t.uniqueValueInfos.map(e=>{let r=e.value===null?A.nullValue:e.value;return{...e,value:r}})),t}async function jF(t){let{data:e,queryObject:r,chartConfig:a,allowColorMatch:i}=t,n=!1,s=[];if(i&&!Ke(r)){let{series:o,chartRenderer:l}=a,d=lw(l),c=d?Ci.ChartRenderer:Ci.LayerRenderer,u=r?se(r):void 0,f=d??u?.renderer,p;u&&c===Ci.LayerRenderer?s=await kp(u):c===Ci.ChartRenderer&&(s=Sv(f));let h=uv(d,u?.renderer),m=yv({chartRenderer:l,queryObject:r}),y=K(o),b=X(o),v=pr(a),S=Ze(v.query?.where);p=new Map;for(let C=0;C<(y===g.HistogramSeries&&e.length>0?1:e.length);C+=1){let F=e[C],I=await gv({seriesConfig:a.series,dataItem:F,renderer:f,rendererType:h,rendererOrigin:c,chartSubType:b,splitByField:S,graphicTemplate:m,mapAttributesToSymbol:p,rendererFieldNames:s});n=n||I.colorMatchApplied}}return{dataItems:e,colorMatchApplied:n,rendererFieldNames:s}}function dw(t){let{itemsA:e,itemsB:r,isPieFromFields:a,x:i,y:n,outStatisticFieldName:s}=t,o=Wr(e),l=Wr(r),d=!1;if(o===void 0&&l!==void 0||o!==void 0&&l===void 0)d=!0;else if(!a){let c=[A.originalCategoryValue,A.originalYCategoryValue,A.originalDateValue,A.xAxisField,A.technicalSortingFieldBySum,A.technicalSortingFieldByPercent,A.pieChart.technicalFieldSlicePercent,A.pieChart.technicalFieldGroupedSlices,A.pieChart.technicalFieldSliceId,A.originalServerBinningRange,A.lastTemporalBin,A.technicalFieldSplitByField,pe.uniqueIdsName,te.valueField,...dp],u=(m,y)=>{let b=y[A.originalCategoryValue];b!==void 0&&i&&(y[i]=b);let v=y[A.originalYCategoryValue];v!==void 0&&n&&(y[n]=v),i&&y[te.xField]!==void 0&&(y[i]=y[A.originalCategoryValue]!==void 0?y[A.originalCategoryValue]:y[te.xField],delete y[te.xField]),n&&y[te.yField]!==void 0&&(y[n]=y[A.originalYCategoryValue]!==void 0?y[A.originalYCategoryValue]:y[te.yField],delete y[te.yField]),s&&y[te.valueField]!==void 0&&(y[s]=y[te.valueField],delete y[te.valueField]);let S={};return Object.keys(y).forEach(C=>{!c.includes(C)&&!C.includes(A.rendererSymbolField)&&(S[C]=y[C])}),m.push(S),m},f=(m,y)=>JSON.stringify(m).localeCompare(JSON.stringify(y)),p=o?.reduce(u,[])?.sort(f),h=l?.reduce(u,[])?.sort(f);p&&h&&i&&p.length!==h.length&&(p=na({data:p,x:i}),h=na({data:h,x:i})),d=p?.length!==h?.length||!tr(p,h)}return d}function cw(t){let{chartConfig:e,currentSelectionDataItems:r,options:a}=t,{selectionData:i}=a??{},n=[];if(e!==void 0){let s=e.series,o=X(s),{selectionItems:l}=i??{};if(l!==void 0&&dw({itemsA:l,itemsB:r,isPieFromFields:X(e.series)===x.PieFromFields,x:e.series[0].x,y:"y"in e.series[0]?e.series[0].y.toString():void 0,outStatisticFieldName:e.series[0].query?.outStatistics?.[0]?.outStatisticFieldName})?n=l:n=r??[],s.length>1&&o!==x.BarAndLineNoAggregation&&o!==x.BarAndLineSplitByNoAggregation){let d=Ze(s[0].query?.where);n=na({data:n,x:s[0].x,splitByField:d})}vn({arrayToSort:n,chartConfig:e})}return n??[]}function Er(t,e){let r="";if(t.trim()!==""&&e!==void 0)if(e===null)r=`${t} IS NULL`;else{let a=typeof e!="number"?"'":"";r=`${t}=${a}${e.toString()}${a}`}return r}function uw(t){let{dataContext:e,xAxisField:r,yAxisField:a,options:i}=t,n="",{dataContextXMinField:s,dataContextXMaxField:o,dataContextYMinField:l,dataContextYMaxField:d}=A.scatterplotAggregationFields;if(fp({dataContext:e,chartLimits:i?.chartLimits})){let{[s]:c,[o]:u}=e,f=r!==a?e[l]:c,p=r!==a?e[d]:u;if(!Number.isNaN(c)&&!Number.isNaN(u)&&!Number.isNaN(f)&&!Number.isNaN(p)){let h=[];c===u?h.push(`${r}=${c?.toString()}`):(h.push(`${r}>=${c?.toString()}`),h.push(`${r}<=${u?.toString()}`)),f===p?h.push(`${a}=${f?.toString()}`):(h.push(`${a}>=${f?.toString()}`),h.push(`${a}<=${p?.toString()}`)),n=Ae(h)}}else n=Ae([lr({where:Er(r,e[r])}),a!==void 0?lr({where:Er(a,e[a])}):""]);return n}function Ku(t){let{fieldsIndex:e,fieldName:r,inputDate:a}=t,i=e.get(r),n=e.getTimeZone(r);return eb(new Date(a),{type:"date"},{type:i,timeZone:n})}function Qp(t){let{xAxisField:e,dataContext:r,queryObject:a}=t,i="",n=r[A.originalServerBinningRange]??r[A.dateBinningRange];if(fa(n)&&n.length===2){let[s,o]=n,l=!0,d=Kt(a);if(d){let c=se(a),{fieldsIndex:u}=c;s=Ku({fieldsIndex:u,fieldName:e,inputDate:s}),o=Ku({fieldsIndex:u,fieldName:e,inputDate:o})}else typeof s=="number"&&typeof o=="number"?Number.isFinite(s)&&Number.isFinite(o)?(s=Ii(s),o=Ii(o)):l=!1:typeof s=="string"&&typeof o=="string"&&(s=new Date(s).toISOString(),o=new Date(o).toISOString());if(l){let c=d?"":"'",u=r[A.lastTemporalBin]===!0?"<=":"<";i=`${e}>=${c}${s}${c} AND ${e}${u}${c}${o}${c}`}}return i}function Zp(t,e){let r="";if(Number.isFinite(t)){let a=1/10**A.queryMaxFloatPrecision;r=`${e}>=${t-a} AND ${e}<=${t+a}`}return r}function Kp(t){let{xAxisField:e,yAxisField:r,splitBy:a,dataContext:i,xAxisFieldType:n,chartConfig:s}=t,o="";if(e!==void 0&&e!==A.boxPlot.boxPlotCategory){let c=ta({value:i[e],dataContext:i,keepNullValues:!0});n===ue.Double?o=Zp(c,e):(Zr(s.axes?.[0].valueFormat)&&(c=Ii(c)),o=lr({where:Er(e,c),normalize:!1,escape:!0}))}let l=lr({where:a??"",normalize:!1,escape:!0}),d="";if(Tv(s)){let c=X(s.series)===x.BoxPlotMultiFieldsAndCategory?r:void 0,u=ze({key:H.Min,showOutliers:!0,splitBy:a,y:c}),f=ze({key:H.Max,showOutliers:!0,splitBy:a,y:c}),p=e===A.boxPlot.boxPlotCategory?i[e]:r;if(!_e(p)){let h=i[u],m=i[f];Number.isFinite(h)&&Number.isFinite(m)&&(d=`${p?.toString()}>=${h?.toString()} AND ${p?.toString()}<=${m?.toString()}`)}}return Ae([o,l,d])}function pw(t){let{xAxisField:e,splitBy:r,dataContext:a,xAxisFieldType:i,chartConfig:n,queryObject:s}=t,o="";if(A.dateBinningRange in a)o=Qp({xAxisField:e,dataContext:a,queryObject:s});else if(X(n.series)!==x.BarAndLineFromFields){let d=ta({value:a[e],dataContext:a,keepNullValues:!0});i===ue.Double?o=Zp(d,e):(Zr(n.axes?.[0].valueFormat)&&i!==ue.TimeOnly&&(d=Ii(d)),o=lr({where:Er(e,d),normalize:!1,escape:!0}))}let l=lr({where:r??"",normalize:!1,escape:!0});return Ae([o,l])}function fw(t){let{xAxisField:e,dataContext:r,chartConfig:a}=t,i=r[A.originalCategoryValue];return i===void 0&&(i=r[e]),X(a.series)===x.PieFromFields?"":lr({where:Er(e,i),normalize:!1,escape:!0})}function Ju(t){let{field:e,fieldType:r,fieldValue:a,unit:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}=t,l,{expression:d}=co({field:e,fieldType:r,unit:i,addIntervalStatement:!0,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o});return d&&(l=`${d}=${a}`),l}function hw(t){let{xAxisFieldType:e,yAxisFieldType:r,dataContext:a,chartConfig:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}=t,l=i.series[0],d="";if(l.type===g.HeatSeries){let c,u,f=a[te.xField],p=a[A.originalCategoryValue],h=a[te.yField],m=a[A.originalYCategoryValue],y=i.axes?.[0]?.valueFormat?.type,b=i.axes?.[1]?.valueFormat?.type;y===g.CategoryAxisFormat?c=lr({where:Er(l.x,p??f),normalize:!1,escape:!0}):c=Ju({field:l.x,fieldType:e,fieldValue:f,unit:l.xTemporalBinning?.unit,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}),b===g.CategoryAxisFormat?u=lr({where:Er(l.y,m??h),normalize:!1,escape:!0}):u=Ju({field:l.y,fieldType:r,fieldValue:h,unit:l.yTemporalBinning?.unit,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}),c&&(d=c),u&&(d=Ae([d,u]))}return d}function mw(t){let{xAxisField:e,dataContext:r,chartConfig:a}=t,i="",n=a.series[0],{minValue:s,maxValue:o}=r;if(Number.isFinite(s)&&Number.isFinite(o)&&n.type===g.HistogramSeries){let l=iv(e,n.dataTransformationType),d=r.isLastBin?"<=":"<";i=Ae([`${l}>=${s?.toString()}`,`${l}${d}${o?.toString()}`])}return i}function VF(t){let{chartConfig:e}=t,r=K(e.series),a="";switch(r){case g.ScatterSeries:a=uw(t);break;case g.HeatSeries:a=hw(t);break;case g.RadarSeries:case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:a=pw(t);break;case g.BoxPlotSeries:a=Kp(t);break;case g.HistogramSeries:a=mw(t);break;case g.PieSeries:a=fw(t);break}return a}async function yw(t){let{queryObject:e,queryConfig:r,chartConfig:a,currentSelectionDataItems:i,options:n,errorStrings:s,abortKey:o}=t,l=X(a.series),d={valid:!0,data:{dataItems:[]}};if(i!==void 0&&i.length>0){let c=pr(a),{x:u}=c,f="y"in c?c.y:"",p=wt(e).find(S=>S.name===u)?.type,h=[],m=i.reduce((S,C)=>{let F=[];if(pe.uniqueIdsName in C)h.push(C[pe.uniqueIdsName]);else{switch(l){case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:{let P=Ze(c.query?.where??""),E=`_${H.Average}`;Object.keys(C).forEach(B=>{if(B.includes(E)){let R=B.replace(E,"");R.trim()!==""&&F.push(Er(P,R))}});break}}let I=[f].flat(),N=I.length===1?I[0]:"";if(l===x.BoxPlotMultiFieldsAndCategory){let P=`_${H.FirstQuartile}`,E=Object.keys(C).find(B=>B.includes(P));E!==void 0&&(N=E.replace(P,""))}F.length===0&&F.push(""),F.forEach(P=>{let E=Kp({chartConfig:a,xAxisField:u,yAxisField:N,splitBy:P,dataContext:C,xAxisFieldType:p});S.push(E)})}return S},[]),y=se(e);if(y!==void 0&&h.length>0){let S=_t(y).idField;m.push(`${S} IN (${h.join(",")})`)}let b=m.join(" OR "),v={...r};v.where=Ae([v.where,b]),d=await fo({queryObject:e,chartConfig:a,queryConfig:v,options:n,errorStrings:s,abortKey:o})}return d}async function gw(t){let{queryObject:e,queryConfig:r,chartConfig:a,currentSelectionDataItems:i,dataForFilterBySelectionChanged:n,options:s,errorStrings:o,abortKey:l}=t;ia(e);let{series:d}=a,c=K(d),u=Vt(a),f={valid:!0},p=s?.selectionData?.selectionItems??[];n||(p=cw({chartConfig:a,currentSelectionDataItems:i,options:s}));let h=!1;switch(c){case g.HeatSeries:f.data={dataItems:p};break;case g.PieSeries:if(X(a.series)===x.PieFromFields){let{x:m,y}=a.series[0],b=Wr(p);b.forEach(v=>{m in v&&(v[lt]=v[m],delete v[m]),y in v&&(v[Wt]=v[y],delete v[y])}),f.data={dataItems:b}}else f.data={dataItems:p};f.count=p.length,h=!0;break;case g.BoxPlotSeries:rt(a)&&(f=await yw({queryObject:e,queryConfig:r,chartConfig:a,currentSelectionDataItems:i,options:s,errorStrings:o,abortKey:l}));break;case g.BarSeries:case g.ComboLineAndBarSeries:case g.RadarSeries:case g.LineSeries:if(p.length===0||!fr({xAxisValueFormatType:u,setTimeBinningInfoWhenNotProvided:s?.setTimeBinningInfoWhenNotProvided,seriesConfig:d[0],queryObject:e}))f.data={dataItems:p},f.count=p.length*d.length,h=!0;else{let m={...r};if(i!==void 0&&i.length>0){let y=i.map(v=>Qp({xAxisField:d[0].x,dataContext:v,queryObject:e})),b=Ae(y,"OR");m.where=Ae([m.where,b])}f=await mo({queryObject:e,queryConfig:m,chartConfig:a,options:s})}break;case g.HistogramSeries:{if(p.length===0)f.data={mean:Number.NaN,median:Number.NaN,stddev:Number.NaN,max:Number.NaN,min:Number.NaN,bins:[]},f.count=0;else{let{x:m}=d[0],y=p.map((S,C)=>{let{minValue:F,maxValue:I}=S,N=C===p.length-1?"<=":"<";return`${m} >= ${F} AND ${m} ${N} ${I}`}),b=Ae(y,"OR"),v={...r};v.where=Ae([v.where,b]),f=await zp({queryObject:e,chartConfig:a,queryConfig:v,options:s,errorStrings:o,abortKey:l})}break}case g.ScatterSeries:{if(p.length===0){let{r2:m,trendLinePoints:y}=A.scatterplotSeries;f.data={dataItems:[],r2:m,trendLinePoints:y,count:0},f.count=0}else{let{r2:m,trendLinePoints:y}=Lp({data:p,chartConfig:a});f.data={dataItems:p,r2:m,trendLinePoints:y},f.count=p.length}break}}return h&&f.data!==void 0&&vn({arrayToSort:"dataItems"in f.data?f.data.dataItems:f.data,chartConfig:a}),f}async function fo(t){let{queryObject:e,chartConfig:r,queryConfig:a,options:i,errorStrings:n,abortKey:s}=t,o={valid:!0},l=Oi(r),d=await io({queryObject:e,queryConfig:a,fetchFullBoxPlotData:!l,options:i,chartConfig:r,abortKey:s});if(!l)o=d;else{let c={dataItems:[]};c.meanLines=d.data.dataItems;let u=VS(r),f=(await io({queryObject:e,queryConfig:a,fetchFullBoxPlotData:!0,options:i,chartConfig:u,abortKey:s})).data;c.dataItems=f.dataItems,c.outliers=f.outliers,o.data=c}return o}async function bw(t){let{queryObject:e,chartConfig:r,queryConfig:a,options:i,errorStrings:n,abortKey:s,fieldList:o,currentSelectionDataItems:l,dataForFilterBySelectionChanged:d,preFetchedQueryResponse:c}=t,{series:u}=r,{filterBySelection:f}=i??{},p=K(u),h={valid:!0};if(f===!0)h=await gw({queryObject:e,queryConfig:a,chartConfig:r,currentSelectionDataItems:l,dataForFilterBySelectionChanged:d,options:i,errorStrings:n,abortKey:s});else switch(p){case g.HeatSeries:ia(e),h=await nf({chartConfig:r,queryConfig:a,queryObject:e,errorStrings:n,options:i,abortKey:s});break;case g.BoxPlotSeries:rt(r)&&(h=await fo({queryObject:e,chartConfig:r,queryConfig:a,options:i,errorStrings:n,abortKey:s}));break;case g.BarSeries:case g.ComboLineAndBarSeries:case g.PieSeries:case g.RadarSeries:case g.LineSeries:{let m={queryObject:e,queryConfig:a,chartConfig:r,options:i,abortKey:s,fieldList:o,preFetchedQueryResponse:c};fr({xAxisValueFormatType:Vt(r),setTimeBinningInfoWhenNotProvided:i?.setTimeBinningInfoWhenNotProvided,seriesConfig:u[0],queryObject:e})?h=await mo(m):h=await io(m);break}case g.ScatterSeries:h.data=await sf({queryObject:e,queryConfig:a,options:i,chartConfig:r,errorStrings:n,abortKey:s});break;case g.HistogramSeries:h=await zp({queryObject:e,queryConfig:a,chartConfig:r,options:i,abortKey:s,errorStrings:n});break;case g.GaugeSeries:ia(e),h=await aw({queryObject:e,chartConfig:r,queryConfig:a,options:i,abortKey:s});break}return h}async function _F(t){let{queryObject:e,chartConfig:r,abortKey:a,currentSelectionDataItems:i,dataForFilterBySelectionChanged:n,options:s,errorStrings:o,fieldList:l,preFetchedQueryResponse:d}=t,c={valid:!0},u=Wp({queryObject:e,chartConfig:r,runtimeDataFilters:s?.runtimeDataFilters,ignoreViewExtent:s?.ignoreViewExtent,viewExtent:s?.view?.extent});return a0(a),c=await bw({chartConfig:r,queryObject:e,queryConfig:u,currentSelectionDataItems:i,dataForFilterBySelectionChanged:n,options:s,abortKey:a,errorStrings:o,fieldList:l,preFetchedQueryResponse:d}),c.queryConfig=u,c}function vw(t,e,r){let a=new Map;for(let i=0;i<t.length;i+=1)a.set(t[i],{[r]:t[i]});for(let i=0;i<e.length;i+=1){let n=e[i][r];(typeof n=="string"||typeof n=="number")&&a.set(n,e[i])}return[...a.values()]}async function Sw(t){let{seriesData:e,chartConfig:r,queryConfig:a,queryObject:i,categoryOrDateCount:n,behaviorAfterLimit:s,abortKey:o}=t,{series:l}=r,d=e,c=X(l),u=Vt(r);if(s!==Dr.RenderUpToTheLimit&&n!==void 0&&n>e.length&&c!==x.BarAndLineFromFields&&c!==x.BarAndLineNoAggregation&&c!==x.PieNoAggregation&&u===g.CategoryAxisFormat){let{x:f}=l[0],p={...a,returnDistinctValues:!0,outFields:[f]};delete p.outStatistics,delete p.orderByFields,delete p.groupByFieldsForStatistics;let h=(await Dt({queryObject:i,queryConfig:p,featureCount:n,abortKey:o})).map(m=>m.attributes[f]).filter(m=>m!=null);h.length>e.length&&(d=vw(h,e,f))}return d}function ww(t,e){let r=t,{series:a}=e;if(Vt(e)===g.CategoryAxisFormat&&a[0].query?.outStatistics?.[0].statisticType===W.Count){let i=a.reduce((n,s)=>{let o=s.query?.outStatistics?.[0].outStatisticFieldName??[s.y].flat()[0];return n[o]=0,n},{});for(let n=0;n<t.length;n+=1)t[n]={...i,...t[n]}}return r}var Jp=[x.BarAndLineMonoField,x.BarAndLineMultiFields,x.PieNoAggregation,x.PieFromCategory,x.BoxPlotMonoFieldAndCategory,x.BoxPlotMultiFieldsAndCategory,x.BoxPlotMonoFieldAndCategoryAndSplitBy],xw=8e3;function Yp(t,e){let r=t;return e===Q.Week?r/=7:e===Q.Month?r/=30:e===Q.Year&&(r/=365),r=Math.ceil(r),r}function Lr(t){let{date:e,unit:r,nextOrPrevious:a,size:i}=t;if(i!==void 0&&Number.isFinite(i)){let n=a==="next"?i:-i;switch(r){case Q.Second:return ie.fromMillis(e).plus({seconds:n}).valueOf();case Q.Minute:return ie.fromMillis(e).plus({minutes:n}).valueOf();case Q.Hour:return ie.fromMillis(e).plus({hours:n}).valueOf();case Q.Week:case Q.Day:return ie.fromMillis(e).plus({days:n}).valueOf();case Q.Month:return ie.fromMillis(e).plus({months:n}).valueOf();case Q.Year:return ie.fromMillis(e).plus({years:n}).valueOf()}}return e}function Cw(t){let{binFirstOrLastIndex:e,data:r,x:a,timeIntervalInfo:i}=t,{unit:n,size:s}=i,o=n===Q.Week?(s??1)*7:s,l=r[e][a],d=e,c=Lr({date:l,unit:n,size:o,nextOrPrevious:"next"}),u=r[d][a];for(;d+1<r.length&&u<c;)d+=1,u=r[d]?.[a];let f=d+1>=r.length,p=d;f&&r[p]!==void 0&&(p+=1);let h=f?Lr({date:l,unit:n,size:o,nextOrPrevious:"next"}):r[d][a];return{binStartDate:l,binEndDate:h,last:f,nextBinFirstOrLastIndex:d,sliceStartIndex:e,sliceEndIndex:p}}function Tw(t){let{binFirstOrLastIndex:e,data:r,x:a,timeIntervalInfo:i}=t,{unit:n,size:s}=i,o=n===Q.Week?(s??1)*7:s,l=r[e][a],d=e,c=Lr({date:l,unit:n,size:o,nextOrPrevious:"previous"}),u=r[d][a];for(;d-1>=0&&u>c;)d-=1,u=r[d]?.[a];let f=d-1<=0,p=e;return f&&r[p]!==void 0&&(p-=1),f&&(d=0),{binStartDate:f?Lr({date:l,unit:n,size:o,nextOrPrevious:"previous"}):r[d][a],binEndDate:l,nextBinFirstOrLastIndex:d,sliceStartIndex:d,sliceEndIndex:p,last:f}}function Fw(t){let{binsToRegroup:e,statisticType:r,y:a,nullPolicy:i}=t,n;i!==st.Interpolate&&(n=i===st.Zero?0:null);let s=e.filter(o=>Number.isFinite(o[a]));if(s.length>0)switch(r){case W.Count:case W.Sum:n=F0(s,o=>o[a]);break;case W.Minimum:n=aa(s,o=>o[a]).min;break;case W.Maximum:n=aa(s,o=>o[a]).max;break;case W.Average:n=T0(s,o=>o[a]);break;case W.ContinuousPercentile:}return n}function Iw(t){let{data:e,seriesConfig:r,timeIntervalInfo:a,dateMinTimestamp:i,dateMaxTimestamp:n}=t,s=[],{unit:o}=a,l=a.size??1,d=r[0],{x:c}=d,u,f;if(jt(d)&&(f=d.temporalBinning?.nullPolicy,u=d.temporalBinning?.timeAggregationType),l>1||o===Q.Week||o===Q.Month||o===Q.Year){let{query:p}=r[0],h=it(r),{statisticType:m}=p?.outStatistics?.[0]??ha,y=!1,b=u===$e.End?e.length-1:0,v={binFirstOrLastIndex:b,data:e,x:c,timeIntervalInfo:a};for(;!y;){let S={},{binStartDate:C,binEndDate:F,last:I,nextBinFirstOrLastIndex:N,sliceStartIndex:P,sliceEndIndex:E}=u===$e.End?Tw(v):Cw(v);if(y=I,S=u===$e.End?S=e[E-1]:S=e[b],F>n&&C<n||C<i&&F>i||C>=i&&F<=n){let B=e.slice(P,E).filter(L=>!(A.dateBinModel in L));h.forEach(L=>{S[L]=Fw({binsToRegroup:B,statisticType:m,y:L,nullPolicy:f})});let R=B.map(L=>L[Ar]).filter(L=>L!==void 0),q=Jb(R);q!==void 0&&(S[Ar]=q),S[c]=C,S[A.xAxisField]=C,S[A.dateBinningRange]=[C,F],delete S[A.dateBinModel],s.push(S)}else I&&u!==$e.End&&s.length>0&&(s[s.length-1][A.dateBinningRange][1]=s[s.length-1][A.dateBinningRange][1]+1);b=N,v.binFirstOrLastIndex=N}u===$e.End&&(s=s.reverse())}else l===1?s=e.map((p,h)=>{let m=p[c],y=e[h+1]?.[c];return y=typeof y=="number"?y-1:Lr({date:m,unit:o,size:l,nextOrPrevious:"next"}),{...p,[A.dateBinningRange]:[m,y]}}):s=e;return s}function Xp(t){let{dateMinTimestamp:e,dateMaxTimestamp:r,timeIntervalInfo:a}=t,{size:i,unit:n}=a,s=0,o=0;if(i!==void 0&&Number.isFinite(i)&&Number.isFinite(e)&&Number.isFinite(r)){let l=-1,d=ie.fromMillis(e),c=ie.fromMillis(r);switch(n){case Q.Second:l=c.diff(d,"seconds").get("seconds");break;case Q.Minute:l=c.diff(d,"minutes").get("minutes");break;case Q.Hour:l=c.diff(d,"hours").get("hours");break;case Q.Day:case Q.Month:case Q.Year:l=c.diff(d,"days").get("days");break;case Q.Week:l=c.diff(d,"weeks").get("weeks");break}Number.isFinite(l)&&(o=Math.ceil(l)+1,s=i===1?o:Math.ceil(o/i))}return{numberOfFinalBinsWithinDataRange:s,numberOfSingleBinsWithinDataRange:o}}function ef(t){let e=t[0].temporalBinning?.nullPolicy;return t.reduce((r,a)=>{r[A.dateBinModel]=void 0;let i=a.query?.outStatistics?.[0].outStatisticFieldName??[a.y].flat()[0];return e!==st.Interpolate&&(r[i]=e===st.Zero?0:null),r},{})}function Ow(t){let{dateMaxTimestamp:e,numberOfFinalBinsWithinDataRange:r,numberOfSingleBinsWithinDataRange:a,data:i,seriesConfig:n,timeIntervalInfo:s}=t,{size:o,unit:l}=s,{x:d}=n[0],c=n[0].temporalBinning?.timeAggregationType,u=i[0][d],f=e;if(o!==void 0&&Number.isFinite(o)&&a/r!==o){let p=Math.ceil(a/r)*r-a;l===Q.Week&&(p*=7);let h=ef(n);if(c===$e.End){let m=i[0][d];for(let y=0;y<p;y+=1)m=Lr({date:m,unit:l,size:1,nextOrPrevious:"previous"}),i.push({...h,[d]:m,[A.xAxisField]:m});p>0&&(u=i[i.length-1][d])}else{let m=i[i.length-1][d];for(let y=0;y<p;y+=1)m=Lr({date:m,unit:l,size:1,nextOrPrevious:"next"}),i.push({...h,[d]:m,[A.xAxisField]:m});f=i[i.length-1][d]}}return{newDateMin:u,newDateMax:f}}function Aw(t){let{numberOfSingleBinsWithinDataRange:e,dataLength:r,unit:a}=t;return Yp(r,a)>=e}async function Pw(t){let{queryObject:e,queryConfig:r,x:a}=t,i=`MIN_${a}`,n=`MAX_${a}`,s=`COUNT_${a}`,o={...r,outStatistics:[{statisticType:W.Minimum,onStatisticField:a,outStatisticFieldName:i},{statisticType:W.Maximum,onStatisticField:a,outStatisticFieldName:n},{statisticType:W.Count,onStatisticField:a,outStatisticFieldName:s}]};delete o.groupByFieldsForStatistics,delete o.orderByFields;let l=await oa({queryObject:e,queryConfig:o}),d=l.get(i),c=l.get(n),u=l.get(s);return typeof d=="string"&&(d=new Date(d).valueOf()),typeof c=="string"&&(c=new Date(c).valueOf()),{dateRange:{dateMinTimestamp:d,dateMaxTimestamp:c},numberOfFeatures:u}}function Ew(t){let{newDateMin:e,newDateMax:r,seriesConfig:a,data:i,numberOfSingleBinsWithinDataRange:n,initialNumberOfBins:s,timeIntervalInfo:o}=t,{unit:l}=o,d=i;if(!Aw({numberOfSingleBinsWithinDataRange:n,dataLength:s,unit:l})){let{x:c}=a[0],u=a[0].temporalBinning?.timeAggregationType,f=ef(a),p=u===$e.End?r:e,h=u===$e.End?i.length-1:0;for(;h<i.length&&(u===$e.End&&p>e||u!==$e.End&&p<r);)p!==i[h][c]?d.push({...f,[c]:p,[A.xAxisField]:p}):h=u===$e.End?h-1:h+1,p=Lr({date:p,unit:l===Q.Month||l===Q.Year?Q.Day:l,size:1,nextOrPrevious:u===$e.End?"previous":"next"})}return d}function Lw(t){let{data:e,seriesConfig:r,dateMinTimestamp:a,dateMaxTimestamp:i}=t,n=e;if(r[0].temporalBinning?.trimIncompleteTimeInterval!==!1){let{timeAggregationType:s}=r[0].temporalBinning??{},o=e[0]?.[A.dateBinningRange]?.[0],l=e[e.length-1]?.[A.dateBinningRange]?.[1];if(s===$e.End?o<a:l>i)if(s===$e.End){let d=o;for(;d<a&&e.length>0;)e.shift(),e.length>0&&(d=e[0][A.dateBinningRange]?.[0])}else{let d=l;for(;d>i&&e.length>0;)e.pop(),e.length>0&&(d=e[e.length-1][A.dateBinningRange]?.[1])}}return n}function Dw(t){let{groupByFieldsForStatistics:e,dateField:r,queryStartDate:a,queryEndDate:i,y:n,binIndex:s,lastBin:o}=t,l=e===""?Jr.groupByCaseBegin:e;return l=qe(_x,{groupByFieldsForStatistics:l,dateField:r,startDate:`${a}`,endDate:`${i}`,y:[n].flat()[0],binIndex:`${s}`,endDateOperand:o?"<=":"<"}),l}function*Nw(t){let{queryObject:e,seriesConfig:r,queryConfig:a,completeData:i}=t;for(let n=0;n<r.length;n+=1){let s=r[n],{query:o,x:l,y:d}=s,c=[{onStatisticField:o?.outStatistics?.[0]?.onStatisticField??"",outStatisticFieldName:W.ContinuousPercentile,statisticType:W.ContinuousPercentile,statisticParameters:{value:.5}}],u=Jr.groupByCaseBegin;for(let p=0;p<i.length;p+=1){let h=i[p],[m,y]=h[A.dateBinningRange],b=Ii(m),v=Ii(y);u=Dw({groupByFieldsForStatistics:u,queryStartDate:b,queryEndDate:v,dateField:l,y:[d].flat()[0],binIndex:p,lastBin:p===i.length-1})}u=`${u} ${Jr.groupByCaseEnd}`;let f={...a,groupByFieldsForStatistics:[u],outStatistics:c,orderByFields:void 0};yield Dt({queryObject:e,queryConfig:f,noBatch:!0})}}async function Bw(t){let{queryObject:e,data:r,seriesConfig:a,queryConfig:i}=t,n=r,{statisticType:s}=a[0].query?.outStatistics?.[0]??ha;if(s===W.ContinuousPercentile&&n.length>0){let o=Nw({queryObject:e,completeData:n,seriesConfig:a,queryConfig:i}),l=(await Promise.all(o)).flat();if(l.length>0){let{isInItem:d,expr:c}=xn(l[0].attributes);d&&l.forEach(u=>{let f=u.attributes[`${c}`];if(f!==void 0){let[p,h]=f.split("|");if(h!==void 0){let m=u.attributes[W.ContinuousPercentile];n[h][`${p}`]=m}}})}}return n}function Yu(t){let{dataItem:e,nullPolicy:r,statField:a}=t;if(a&&e[a]==null)switch(!0){case r===st.Zero:e[a]=0;break;case r===st.Null:e[a]=null;break;case r===st.Interpolate:delete e[a];break}}function $w(t){let{chartConfig:e,queryResults:r,mapToStatField:a,splitByField:i,x:n,y:s,nullPolicy:o,queryObject:l}=t,d=Ap(n),c=wt(l).find(m=>m.name===n)?.type,u=[],f=e.series[0],p="temporalBinning"in f?f.temporalBinning?.trimIncompleteTimeInterval:!1,h="temporalBinning"in f?f.temporalBinning?.timeAggregationType:!1;return r.forEach((m,y)=>{if(!(p&&(y===0&&h===$e.End||y===r.length-1&&h===$e.Start))){let{attributes:b,stackedAttributes:v}=m,S=b[d.lowerBoundaryAlias],C=b[d.upperBoundaryAlias],F=S,I=C,N=(P,E)=>{let B=P;if(E===ue.DateOnly&&(typeof P=="string"&&P.length===10||typeof P=="number"))if(typeof P=="string"){let R=P.split("-");R.length===3&&(B=ie.local(Number(R[0]),Number(R[1]),Number(R[2])).valueOf())}else B=new Date(P),B=new Date(B.valueOf()+B.getTimezoneOffset()*6e4),B=ie.local(B.getFullYear(),B.getMonth()+1,B.getDate()).valueOf();else typeof P=="string"&&["+","-"].forEach(R=>{R&&P.lastIndexOf(R)===P.length-6&&(B=new Date(P.slice(0,P.lastIndexOf(R))).valueOf())});return B};if(S=N(S,c),C=N(C,c),typeof S=="number"&&typeof C=="number"){let P={...b};P[A.originalServerBinningRange]=[F,I],P[n]=S,P[A.xAxisField]=S,P[A.dateBinningRange]=[S,C],delete P[d.lowerBoundaryAlias],delete P[d.upperBoundaryAlias],v&&i&&!_e(i)&&a?v.forEach(R=>{let q=R[i];if(q===null||typeof q=="string"||typeof q=="number"){let L=a?.get(q);L!==void 0&&(P[L]=R[pe.outStatistics?.outStatisticFieldName??""],Yu({dataItem:P,statField:L,nullPolicy:o}))}}):typeof s=="string"&&Yu({dataItem:P,statField:s,nullPolicy:o});let{featureExtent:E,featureExtentKey:B}=tf({feature:m,splitByField:i});E&&(P[B]=E),u.push(P)}}}),u}async function Mw(t){let{queryObject:e,queryResults:r,x:a,queryConfig:i,seriesConfig:n,dateRange:s,timeIntervalInfo:o}=t,l=r,{dateMinTimestamp:d,dateMaxTimestamp:c}=s;if(d&&c){let u=r.length;if(ra({arrayToSort:l,sortingField:a}),u>1){let{numberOfFinalBinsWithinDataRange:f,numberOfSingleBinsWithinDataRange:p}=Xp({dateMinTimestamp:d,dateMaxTimestamp:c,timeIntervalInfo:o}),{newDateMin:h,newDateMax:m}=Ow({dateMaxTimestamp:c,data:l,numberOfFinalBinsWithinDataRange:f,numberOfSingleBinsWithinDataRange:p,seriesConfig:n,timeIntervalInfo:o});l=Ew({newDateMin:h,newDateMax:m,seriesConfig:n,data:l,initialNumberOfBins:u,numberOfSingleBinsWithinDataRange:p,timeIntervalInfo:o}),ra({arrayToSort:l,sortingField:a}),l=Iw({data:l,seriesConfig:n,dateMinTimestamp:d,dateMaxTimestamp:c,timeIntervalInfo:o}),l=Lw({data:l,seriesConfig:n,dateMinTimestamp:d,dateMaxTimestamp:c}),e&&(l=await Bw({queryObject:e,data:l,seriesConfig:n,queryConfig:i}))}}return l}function qw(t){return Math.floor(Math.min(Math.max(8,Math.sqrt(t??8)),128)+.5)}function Rw(t){let{dateRange:e,numberOfFeatures:r}=t,a,i,{dateMinTimestamp:n,dateMaxTimestamp:s}=e;if(n&&s){typeof n=="string"&&(n=new Date(n).valueOf()),typeof s=="string"&&(s=new Date(s).valueOf());let o=qw(r),l=(s-n)/o,d=ip.findIndex(b=>b.threshold>l),c=ip[d],{unitMs:u,preferredIntervalSize:f}=c;({unit:a}=c);let p=l/u,h=f.findIndex(b=>b>=p),m=f[h],y=h===0?f[0]:f[h-1];i=m-p<p-y?m:y}return{size:i,unit:a}}function kw(t){let{series:e,isTimeBinningSeries:r,setTimeBinningInfoWhenNotProvided:a}=t,i=!1;if(jt(e)&&r){let{unit:n,size:s}=e.temporalBinning??{};i=!Zs(n,s)&&a===!0}return i}function Ww(t){let e=[];for(let r=1;r<=6;r+=1){let a=t[`EXPR_${r}`]??t[`Expr${r}`]??t[`expr${r}`]??t[`EXPR${r}`];a!==null&&e.push(a)}return ie.local(Number(e[0]??1969),Number(e[1]??1),Number(e[2]??1),Number(e[3]??0),Number(e[4]??0),Number(e[5]??0)).valueOf()}function tf(t){let{feature:e,splitByField:r,chartSubType:a}=t,i;if(e.aggregateGeometries&&"Extent"in e.aggregateGeometries)i=e.aggregateGeometries.Extent;else{let o=e.aggregateGeometries??e.geometry;o?.extent&&(i=o.extent)}let n=i?.toJSON(),s=Ar;return n!==void 0&&r!==void 0&&a!==void 0&&a===x.BarAndLineSplitBy&&(s=e.attributes[r]!==void 0?`${Ar}_${e.attributes[r]}`:Ar),{featureExtent:n,featureExtentKey:s}}function jw(t){let{input:e,x:r,splitByField:a}=t;return e.reduce((i,n)=>(a!==void 0&&a!==r&&!(A.technicalFieldSplitByField in n)&&delete n[a],Object.assign(i,n)),{})}function na(t){let{data:e,x:r,splitByField:a}=t,i=e;if(e!==void 0&&e.length>0){let n=new Map;for(let s of e){let o=s[r];if(o==null||o===void 0)continue;let l=n.get(o)??[];l.push(s),n.set(o,l)}i=Array.from(n.values(),s=>jw({input:s,x:r,splitByField:a}))}return i}function Vw(t,e){let r=t,a=K(e);if(a!==g.PieSeries&&a!==g.BoxPlotSeries){let i=it(e),n=e[0].y;t.forEach(s=>{let o=0;if(i.forEach(l=>{let d=s[l];Number.isFinite(d)&&(o+=d)}),s[A.technicalSortingFieldBySum]=o,Number.isFinite(o)&&o>0){let l=s[n];if(Number.isFinite(l)){let d=l/o;s[A.technicalSortingFieldByPercent]=d}}})}return r}function _w(t,e){let r=e,a=it(t),i=a.length===1;return a.forEach(n=>{let s=Ti(i?void 0:n),o=r[s[H.FirstQuartile]],l=r[s[H.ThirdQuartile]];Number.isFinite(o)&&Number.isFinite(l)&&l>=o&&(r[s[H.IQR]]=l-o)}),r}function zw(t,e){let r=e.series[0],a=t;if(r.type===g.HeatSeries){let{x:i,y:n}=r;a[te.xField]=a[i]?.toString(),delete a[i],a[te.yField]=a[n]?.toString(),delete a[n];let s=r.query?.outStatistics?.[0]?.outStatisticFieldName;s&&(a[te.valueField]=a[s],delete a[s])}return a}function ho(t,e){[e].flat().forEach(r=>{r&&(t[r]===void 0&&(t[r]=t[r.toUpperCase()]!==void 0?t[r.toUpperCase()]:t[r.toLowerCase()]),t[r]!==void 0?(r!==r.toUpperCase()&&delete t[r.toUpperCase()],r!==r.toLowerCase()&&delete t[r.toLowerCase()]):delete t[r])})}function Uw(t,e){let r=[];pe.outStatistics.outStatisticFieldName&&Object.keys(t).includes(pe.outStatistics.outStatisticFieldName)?r=[pe.outStatistics.outStatisticFieldName]:r=Array.from(new Set(e.flatMap(a=>a.query?.outStatistics?.map(i=>i.outStatisticFieldName)))),ho(t,r)}function Hw(t,e){let r={...t};return t!==void 0&&e[0]!==void 0&&(r=Object.keys(t).reduce((a,i)=>{let n=e.find(s=>s.outStatisticFieldName?.toLowerCase()===i.toLowerCase())?.onStatisticField;return n!==void 0&&t[i]!==void 0&&n!==i?a[n]=t[i]:a[i]=t[i],a},{})),r}function Gw(t){let{dataItem:e,splitByField:r,y:a,fieldOID:i}=t;if(e!==void 0&&!_e(r)&&!_e(a)){let n=e[r],s=`${a}_${n?.toString()}`;e[s]=e[a],i&&a!==i&&delete e[a]}}function Qw(t,e){Object.keys(t).forEach(r=>{if(r.startsWith(`${e}_`)){let a=r.slice(e.length+1);t[a]=t[r],delete t[r]}})}function Zw(t,e){let r=1;switch(t){case x.BarAndLineFromFields:case x.PieFromFields:r=e.series[0].query?.outStatistics?.length??1;break;case x.BoxPlotMultiFields:case x.BoxPlotMultiFieldsAndSplitBy:r=e.series[0].y.length;break;case x.BarAndLineNoAggregation:case x.BoxPlotMonoField:case x.BoxPlotMonoFieldAndCategory:case x.BoxPlotMultiFieldsAndCategory:case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:case x.PieFromCategory:case x.BarAndLineSplitByNoAggregation:case x.PieNoAggregation:case x.BarAndLineSplitBy:case x.BarAndLineMonoField:case x.BarAndLineMultiFields:case x.NonSpecific:}return r}function Kw(t){let{attributes:e,showMean:r,chartSubType:a}=t;r&&(a===x.BoxPlotMonoFieldAndSplitBy||a===x.BoxPlotMultiFieldsAndSplitBy||a===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&(e[A.boxPlot.boxPlotMeanLineMarkerId]=!0)}function Jw(t){let{queryResponse:e,chartConfig:r,maxCategoryCount:a}=t,i=X(r.series);return a&&Number.isFinite(a)&&a<e.length&&Jp.includes(i)?e.slice(0,a):e}function Yw(t){let{attributes:e,uniqueCategoryList:r,maxCategoryCount:a,x:i,chartSubType:n}=t,s=!1;if(i&&a&&Number.isFinite(a)&&!Jp.includes(n))if((n===x.BarAndLineFromFields||n===x.PieFromFields)&&Object.keys(e).length>a)Object.keys(e).filter(o=>o!==W.EnvelopeAggregate).forEach((o,l)=>{l>=a&&delete e[o]});else{let o=e[i];o!==void 0&&(r.size===a&&!r.has(o)?s=!0:r.add(o))}return s}function Xw(t){let{attributes:e,xValue:r,yValue:a,x:i,y:n,xFieldDomain:s,yFieldDomain:o,chartType:l,chartSubType:d,xAxisValueFormat:c,yAxisValueFormat:u}=t,f,p;d!==x.PieFromFields&&(s&&(typeof r=="string"||typeof r=="number")&&(f=to(r,s)),o&&l===g.HeatSeries&&typeof n=="string"&&(typeof a=="string"||typeof a=="number")&&(p=to(a,o)),f!==void 0&&f!==r&&(typeof f!="string"||!et(c))&&(e[A.originalCategoryValue]=e[i],e[i]=f),typeof n=="string"&&!et(u)&&p!==void 0&&p!==a&&(e[A.originalYCategoryValue]=e[n],e[n]=p))}function ex(t){let e,[r,a,i]=t.split(":");return Number.isFinite(Number(r))&&Number.isFinite(Number(a))&&Number.isFinite(Number(i))&&(e=new Date(2e3,0,1,Number(r),Number(a),Number(i)).valueOf()),e}function rf(t){let{queryObject:e,queryResponse:r,chartConfig:a,mapToStatField:i,splitByField:n,isTimeBinningSeries:s,resultLimit:o,showMean:l,chartLimits:d,fieldList:c}=t,{series:u}=a,f=X(u),p=K(u),{x:h}=u[0],m="y"in u[0]?u[0].y:void 0,y=u[0].query?.outStatistics??[],b=nr(a?.axes?.[0]?.valueFormat),{originalYCategoryValue:v,originalCategoryValue:S,originalDateValue:C}=A,F=eo(e,h),I=typeof m=="string"?eo(e,m):void 0,N=X0(c??[]).includes(h),P=[],E=0,B=new Set,{maxCategoryCount:R}=Xr(d),q=Jw({queryResponse:r,chartConfig:a,maxCategoryCount:R});for(let L=0;q[L]&&L<q.length&&!(o!==void 0&&E>=o);L+=1){E+=Zw(f,a);let k=q[L],$={...k.attributes};if(Yw({attributes:$,uniqueCategoryList:B,maxCategoryCount:R,x:h,chartSubType:f}))continue;if(Uw($,u),f===x.PieFromFields||f===x.BarAndLineFromFields)$=Hw($,y);else if(typeof m=="string"&&f===x.BarAndLineSplitByNoAggregation){let oe=se(e),{idField:Te,isTraditionalTypeOID:Re}=_t(oe);Gw({dataItem:$,splitByField:n,y:m,fieldOID:Re?Te:void 0})}else m&&(f===x.BoxPlotMonoField||f===x.BoxPlotMonoFieldAndCategory||f===x.BoxPlotMonoFieldAndSplitBy||f===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&Qw($,typeof m=="string"?m:m[0]);Kw({attributes:$,showMean:l,chartSubType:f});let _=$[h],G=typeof m=="string"?$[m]:void 0;_===null&&u[0]?.query?.fetchNullValues===!0&&f!==x.PieFromFields&&($[S]=null,_=A.nullValue),b||(N&&typeof _=="string"?_=new Date(_).valueOf():s&&(_=Ww($))),typeof _=="string"&&c?.find(oe=>oe.name===h)?.type===ue.TimeOnly&&($[S]=_,_=ex(_));let{outStatisticFieldName:V}=pe.outStatistics??{},{featureExtent:Z,featureExtentKey:U}=tf({feature:k,splitByField:n,chartSubType:f});if(Z&&($[U]=Z),f===x.BarAndLineSplitBy&&V!==void 0){let oe=$[n],Te=i?.get(oe);Te!==void 0&&(oe===n&&($[A.technicalFieldSplitByField]=$[Te]),$[Te]=$[V]),delete $[V]}else(f===x.PieNoAggregation||f===x.BarAndLineNoAggregation||f===x.BarAndLineSplitByNoAggregation)&&(N?$[C]=_:_!==A.nullValue&&($[S]=_),xb({isXAxis:!0,chartType:p,valueFormat:a.axes?.[0]?.valueFormat})&&($[A.xAxisField]=`${_}-${L}`),$[pe.uniqueIdsName]=k.getObjectId());p===g.BoxPlotSeries&&($=_w(u,$)),p===g.PieSeries&&typeof _=="number"&&($[S]===void 0&&($[S]=$[h]),_=`${_}`),_!==void 0&&($[S]===void 0&&($[S]=$[h]),$[h]===null?$[h]=p===g.HeatSeries?"null":A.nullValue:$[h]=_,Xw({attributes:$,xValue:_,yValue:G,x:h,y:m,xFieldDomain:F,yFieldDomain:I,chartType:p,chartSubType:f,xAxisValueFormat:a.axes?.[0].valueFormat,yAxisValueFormat:a.axes?.[1]?.valueFormat}),p===g.HeatSeries&&typeof m=="string"&&$[m]===null&&($[m]="null",$[v]=null),$[A.xAxisField]===void 0&&($[A.xAxisField]=$[h])),$=zw($,a),P.push($)}return P}async function Fn(t){let{queryObject:e,uniqueQuery:r,chartConfig:a,mapToStatField:i,abortKey:n,elementCount:s,isTimeBinningSeries:o,showMean:l,chartLimits:d,popupTemplateFieldInfosEnabled:c,preFetchedQueryResponse:u}=t,{series:f}=a,p=X(f),h=[],m=p===x.BarAndLineSplitBy||p===x.BarAndLineSplitByNoAggregation?Ze(f[0].query?.where):"",y=u??await Dt({queryObject:e,queryConfig:r,featureCount:s,abortKey:n}),b=wt(e,c),{x:v}=f[0];return h=rf({queryObject:e,queryResponse:y,chartConfig:a,mapToStatField:i,splitByField:m,isTimeBinningSeries:o,fieldList:b,resultLimit:r.num,showMean:l,chartLimits:d}),p!==x.BarAndLineSplitByNoAggregation&&p!==x.BarAndLineFromFields&&(m!==""&&(h=na({data:h,x:v,splitByField:m})),h=Vw(h,f)),h}async function af(t){let{chartConfig:e,queryObject:r,queryConfig:a,numberMaxOfFeaturesToFetch:i,behaviorAfterLimit:n,isGaugeByFeature:s}=t,{series:o}=e,l=X(o),{x:d}=o[0],c=o.length,u,f;if(l===x.BoxPlotMonoField||l===x.BoxPlotMonoFieldAndSplitBy?(f=c,u=f):l===x.BoxPlotMultiFields||l===x.BoxPlotMultiFieldsAndSplitBy?(f=e.series[0].y.length,u=f):l===x.PieFromFields||l===x.BarAndLineFromFields?(f=o[0].query?.outStatistics?.filter(p=>p.statisticType!==W.EnvelopeAggregate).length??0,u=f):u=await r0({queryObject:r,x:d,chartSubType:l,queryConfig:a,isGaugeByFeature:s}),u!==void 0){let p=l===x.BoxPlotMonoField||l===x.BoxPlotMonoFieldAndCategory||l===x.BoxPlotMonoFieldAndSplitBy;f=Ks(l)&&!p?u*c:u}return n===Dr.RenderUpToTheLimit&&f!==void 0&&i!==void 0&&i<f&&(f=i,u=Math.ceil(f/c)),{categoryOrDateCount:u,elementCount:f}}async function io(t){let{chartConfig:e,queryConfig:r,fetchFullBoxPlotData:a,options:i,queryObject:n,abortKey:s,fieldList:o,preFetchedQueryResponse:l}=t,d=Oi(e),{chartLimits:c,popupTemplateFieldInfosEnabled:u}=i??{},f=i?.replaceNoValueCategoryWithZero??A.options.replaceNoValueCategoryWithZero,p=!(i?.hideZeroCountCategories??!f),{behaviorAfterLimit:h}=c??{},m,y={valid:!0},b,v=!1,S=e.series,C=S[0],F=X(e.series);if(Ke(n))m=K(S)===g.BarSeries?await W0(t):y;else{if(C!==void 0){let I=K(S),{uniqueQuery:N,mapToStatField:P}=oo({chartConfig:e,queryObject:n,queryConfig:r,fetchFullBoxPlotData:a,options:i}),{categoryOrDateCount:E,elementCount:B}=await af({chartConfig:e,queryObject:n,queryConfig:r,behaviorAfterLimit:h,numberMaxOfFeaturesToFetch:N.num}),R=!Number.isFinite(B),q=R||sr({count:B??0,seriesCount:S.length,chartType:I,chartLimits:c});if(q&&(b=await Fn({queryObject:n,uniqueQuery:N,chartConfig:e,preFetchedQueryResponse:l,mapToStatField:P,elementCount:B,isTimeBinningSeries:!1,showMean:d,chartLimits:c,popupTemplateFieldInfosEnabled:u,abortKey:s}),rt(e)&&b!==void 0&&(y.data=await rw({data:b,queryObject:n,fetchFullBoxPlotData:a,uniqueQuery:N,chartConfig:e,elementCount:B,chartLimits:c,abortKey:s}),c?.maxBoxPlotOutlierLimit!==void 0&&(q=(y.data.outliers??[]).length<=c.maxBoxPlotOutlierLimit,v=!q)),R&&(E=b.length,B=Ks(F)?E*S.length:E,q=sr({count:B,seriesCount:S.length,chartType:I,chartLimits:c})),q)){if(I===g.PieSeries){F===x.PieFromFields&&(b=mn({dataToConvert:b[0],x:lt,y:Wt,fieldList:o}));let L="";F===x.PieFromFields?L=Wt:"y"in C&&typeof C.y=="string"&&(L=C.y),av(b,L)?y.data={dataItems:b}:_S(y,ae.PieChartMixOfNegativePositiveSlices)}else if((I===g.RadarSeries||I===g.BarSeries||I===g.LineSeries||I===g.ComboLineAndBarSeries)&&(F===x.BarAndLineFromFields&&"y"in C&&typeof C.y=="string"?b=mn({dataToConvert:b[0],x:C.x,y:C.y,fieldList:o}):b=await Sw({queryObject:n,seriesData:b,chartConfig:e,queryConfig:r,categoryOrDateCount:E,behaviorAfterLimit:h,abortKey:s}),B=Ks(F)?b.length*S.length:b.length,q=sr({count:B,seriesCount:S.length,chartType:I,chartLimits:c}),q)){p&&(b=ww(b,e));let L={};if(jt(C)){let{size:k,unit:$}=C.temporalBinning??{};k!==void 0&&$!==void 0&&(L={size:k,unit:$})}y.data={dataItems:b,timeIntervalInfo:L}}}q||bn({dataInfo:y,chartType:I,subError:{outlierLimit:v}}),y.count=B}m=y}return m}function tx(t){let e,{start:r,end:a}=co({field:"",unit:t,addIntervalStatement:!1});return a&&(e=Array.from({length:a+(r===0?1:0)},(i,n)=>(n+(r??1)).toString())),e}function rx(t){return t.hideEmptyRowsAndColumns===!0&&(t.nullPolicy!==st.Zero||t.series[0].query?.outStatistics?.[0].statisticType===W.Count)}function ix(t){let{dataItems:e,valueField:r,filterOutZero:a}=t,i=[null];a&&i.push(0);let n=new Set(e.filter(o=>!i.includes(o[r])).map(o=>o[te.xField])),s=new Set(e.filter(o=>!i.includes(o[r])).map(o=>o[te.yField]));return e.filter(o=>n.has(o[te.xField])&&s.has(o[te.yField]))}function ax(t){let{dataItems:e,xUniqueValues:r,yUniqueValues:a,valueField:i,emptyCellValue:n,x:s,y:o,queryObject:l}=t,d=[],c=new Set;for(let u of e){let f=u[A.originalCategoryValue]!==void 0?u[A.originalCategoryValue]:u[te.xField],p=u[A.originalYCategoryValue]!==void 0?u[A.originalYCategoryValue]:u[te.yField];c.add(`${f}|${p}`)}for(let u of r){let f=String(u);for(let p of a){let h=String(p);if(!c.has(`${f}|${h}`)){let m=l?zu({queryObject:l,fieldName:s,fieldValue:f})??u:u,y=l?zu({queryObject:l,fieldName:o,fieldValue:h})??p:p;d.push({[A.originalCategoryValue]:u===null?null:u,[A.originalYCategoryValue]:p===null?null:p,[te.xField]:u===null?"null":m,[te.yField]:p===null?"null":y,[i]:n})}}}return d}function Xu(t){let{day:e,month:r,includeLeapDay:a}=t;return r===2&&e>(a?29:28)||[4,6,9,11].includes(r)&&e>30}async function nf(t){let{chartConfig:e,queryConfig:r,queryObject:a,completeHeatChartDataset:i=!0,errorStrings:n,options:s,abortKey:o}=t,l={valid:!0},d;if(Kr(e)){let{nullPolicy:c}=e,u=e.series[0],{x:f,y:p,query:h,xTemporalBinning:m,yTemporalBinning:y}=u,b=h?.outStatistics?.[0]?.outStatisticFieldName??"",v=h?.outStatistics?.[0]?.statisticType??W.Count,S=rx(e),C=te.valueField,F=c===st.Zero?0:null;if(Up(e)){let I=await e0({chartConfig:e,queryObject:a,queryConfig:r,returnFeaturesExtent:s?.returnFeaturesExtent,errorStrings:n,abortKey:o});if(!sr({count:I?.length??0,seriesCount:1,chartType:g.HeatSeries,chartLimits:s?.chartLimits}))bn({dataInfo:l,chartType:g.HeatSeries});else if(typeof I?.[0]=="object"){let N=wt(a,s?.popupTemplateFieldInfosEnabled);d=rf({queryObject:a,queryResponse:I,chartConfig:e,splitByField:"",isTimeBinningSeries:!1,chartLimits:s?.chartLimits,resultLimit:r.num,fieldList:N});let P=await Gs({queryObject:a,queryConfig:r,category:f,abortKey:o}),E=await Gs({queryObject:a,queryConfig:r,category:p,abortKey:o});d.length!==P?.length*E?.length&&(d=[...d,...ax({dataItems:d,xUniqueValues:P,yUniqueValues:E,valueField:C,emptyCellValue:F,x:f,y:p,queryObject:a})],S&&(d=ix({dataItems:d,valueField:C,filterOutZero:v===W.Count})))}}else{let I=await Xv({chartConfig:e,queryObject:a,queryConfig:r,options:s,errorStrings:n}),N=y?tx(y.unit):await Gs({queryObject:a,queryConfig:r,category:p,abortKey:o}),P=0;d=I?.features.flatMap(E=>{let B=[],{attributes:R,stackedAttributes:q}=E,L=[];if(q?.forEach(k=>{let $=`${k[p]}`;L.push($),B.push({[te.xField]:`${R[pe.heatChartLowerBoundaryAlias]}`,[te.yField]:$,[C]:k[b]})}),i&&N&&L.length!==N?.length){let k=N.filter($=>!L.includes($.toString()));S&&(k.length!==N.length||L.length===0)||k.forEach($=>{Number.isFinite(Number(R[pe.heatChartLowerBoundaryAlias]))&&Number.isFinite(Number($))&&(m?.unit===gt.DayOfMonth&&y?.unit===gt.MonthOfYear&&Xu({day:Number(R[pe.heatChartLowerBoundaryAlias]),month:Number($),includeLeapDay:e.includeLeapDay})||y?.unit===gt.DayOfMonth&&m?.unit===gt.MonthOfYear&&Xu({day:Number($),month:Number(R[pe.heatChartLowerBoundaryAlias]),includeLeapDay:e.includeLeapDay}))||B.push({[te.xField]:`${R[pe.heatChartLowerBoundaryAlias]}`,[te.yField]:$,[C]:c===st.Zero?0:null})})}return P+=B.length,B}),sr({count:P,seriesCount:1,chartType:g.HeatSeries,chartLimits:s?.chartLimits})||bn({dataInfo:l,chartType:g.HeatSeries})}}return d&&(l.data={dataItems:d}),l}function nx(t){let{chartConfig:e,options:r,data:a}=t,i=e.series,n=a,s=hp(e,r?.chartLimits);if(s!==void 0){let o=it(i);if(o.length===1)n=a.filter(l=>Number.isFinite(l[o[0]])).slice(0,s);else if(a.length*o.length>s){let l=[],d=0,c=0;for(;d<=s&&c<a.length;){let u=a[c];if(l.push(u),d+=o.filter(f=>Number.isFinite(u[f])).length,d>s){let f=d-s,p=o.length-1;for(;f!==0&&p>=0;){let h=o[p];Number.isFinite(u[h])&&(delete u[h],f-=1),p-=1}}c+=1}n=l}}return n}async function mo(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i,options:n,preFetchedQueryResponse:s}=t,{chartLimits:o,popupTemplateFieldInfosEnabled:l}=n??{},{behaviorAfterLimit:d}=o??{},c=e.series,u=c[0],{x:f}=u,p=Ze(u.query?.where),h={valid:!0},m;if(jt(u)){let{temporalBinning:y}=u;if(a&&y){let{unit:b,size:v}=y,S=1,C={unit:b,size:v},F=!1,I=kw({series:u,isTimeBinningSeries:!0,setTimeBinningInfoWhenNotProvided:n?.setTimeBinningInfoWhenNotProvided}),N=!Ai(p,a)||I?await Pw({queryObject:a,queryConfig:r,x:f}):void 0;I&&N&&N.numberOfFeatures>0&&N.dateRange.dateMaxTimestamp!==void 0&&N.dateRange.dateMinTimestamp!==void 0&&(C=Rw(N),wt(a).find(R=>R.name===f)?.type===ue.DateOnly&&C.unit!==void 0&&[Q.Hour,Q.Minute,Q.Second].includes(C.unit)&&(C.unit=Q.Day,C.size=1),y.size=C.size,y.unit=C.unit);let{uniqueQuery:P,mapToStatField:E}=oo({chartConfig:e,queryConfig:r,queryObject:a,timeIntervalInfo:C,options:n}),B=sr({count:S??0,seriesCount:c.length,chartType:g.LineSeries,chartLimits:o});if(B){if(Ai(p,a)){let R=e.axes?.[0].valueFormat.type===g.DateAxisFormat?e.axes[0].valueFormat.intlOptions.timeZone:void 0,q=s?.[0]instanceof Xg?s:await n0({queryObject:a,dateField:f,splitByField:p,queryConfig:P,axisTimeZone:R,temporalBinning:y}),L="y"in u&&typeof u.y=="string"?u.y:void 0;if(m=$w({chartConfig:e,queryResults:q,mapToStatField:E,splitByField:p,x:f,y:L,nullPolicy:y.nullPolicy,queryObject:a}),!sr({count:m.length,seriesCount:c.length,chartType:g.LineSeries,chartLimits:o})){let k=it(c),$=m.filter(_=>k.some(G=>G in _&&Number.isFinite(_[G]))).length;sr({count:$,seriesCount:c.length,chartType:g.LineSeries,chartLimits:o})||(B=!1)}}else if(N?.dateRange.dateMinTimestamp&&N.dateRange.dateMaxTimestamp){let{numberOfFinalBinsWithinDataRange:R}=Xp({dateMinTimestamp:N.dateRange.dateMinTimestamp,dateMaxTimestamp:N.dateRange.dateMaxTimestamp,timeIntervalInfo:C});S=R*c.length,S=Yp(S,C.unit),m=await Fn({queryObject:a,uniqueQuery:P,chartConfig:e,mapToStatField:E,elementCount:S,chartLimits:o,isTimeBinningSeries:!0,popupTemplateFieldInfosEnabled:l,abortKey:i}),m=await Mw({queryObject:a,queryConfig:r,queryResults:m,x:f,seriesConfig:c,dateRange:N.dateRange,timeIntervalInfo:C})}Cp(a)&&m&&m?.length===xw&&(F=!0),d===Dr.RenderUpToTheLimit&&m&&(m=nx({chartConfig:e,options:n,data:m}))}B||(h.valid=!1,h.invalidType=ae.LineChartExceedsLimit),m&&m.length>0&&(m[m.length-1][A.lastTemporalBin]=!0),h.data={dataItems:m,timeIntervalInfo:C,serverLimitReached:F},h.count=S}}return h}async function sx(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i,options:n}=t,s=Oi(e),{setTimeBinningInfoWhenNotProvided:o,chartLimits:l,popupTemplateFieldInfosEnabled:d}=n??{},c={valid:!0},u=e.series,f=fr({seriesConfig:u[0],xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:o,queryObject:a}),{uniqueQuery:p,mapToStatField:h}=oo({chartConfig:e,queryObject:a,queryConfig:r,fetchFullBoxPlotData:!s,options:n}),m=await Fn({queryObject:a,uniqueQuery:p,elementCount:1,chartConfig:e,mapToStatField:h,isTimeBinningSeries:f,showMean:s,chartLimits:l,popupTemplateFieldInfosEnabled:d,abortKey:i});return rt(e)&&(m=Gp({chartConfig:e,data:m,calculateZScore:!1})),c.data={dataItems:m},c}async function ox(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i,options:n,errorStrings:s}=t,o={valid:!0};if(rt(e)){let l=rt(e)?e.showMean:!1;o=await fo({queryObject:a,chartConfig:e,queryConfig:r,options:n,errorStrings:s,abortKey:i}),l&&o.data&&"dataItems"in o.data&&"meanLines"in o.data&&o.data.meanLines&&(o.data.dataItems=[...o.data.dataItems,...o.data.meanLines])}return o}var lx="{ groupByFieldsForStatistics } WHEN ({ y } { yMinOperand } { yValue } AND { y } { yMaxOperand } { yValuePlusStep } AND { x } { xMinOperand } { xValue } AND { x } { xMaxOperand } { xValuePlusStep }) THEN '{ xValue }|{ xValuePlusStep}|{ yValue }|{ yValuePlusStep }'";async function dx(t){let{chartConfig:e,queryObject:r,queryConfig:a,abortKey:i}=t,n=e.series[0],{x:s,y:o}=n,{dataContextCountDistinctX:l,dataContextCountDistinctY:d}=A.scatterplotAggregationFields,c={...a,outStatistics:[{statisticType:W.Count,outStatisticFieldName:l,onStatisticField:s},{statisticType:W.Count,outStatisticFieldName:d,onStatisticField:o}],returnDistinctValues:!0};return await oa({queryObject:r,queryConfig:c,abortKey:i})}async function cx(t){let{statsMap:e,chartConfig:r,queryObject:a,options:i,queryConfig:n,abortKey:s}=t,{dataContextXMinField:o,dataContextXMaxField:l,dataContextYMinField:d,dataContextYMaxField:c,dataContextCountDistinctX:u,dataContextCountDistinctY:f}=A.scatterplotAggregationFields,p,h,m,y,b,v=e.get(o),S=e.get(l),C=e.get(d),F=e.get(c);if(v!=null&&C!==void 0&&C!==null&&S!==void 0&&S!==null&&F!==void 0&&F!==null&&!Number.isNaN(v+S+C+F)){let{maxScatterPointsAfterAggregation:I}=Xr(i?.chartLimits),N=Math.floor(Math.sqrt(I)),P=await dx({queryObject:a,chartConfig:r,queryConfig:n,abortKey:s});m=Math.min(P.get(f)??Number.NaN,N),y=Math.min(P.get(u)??Number.NaN,N),b=y*m,p=S===v?0:(S-v)/(y-1),h=F===C?0:(F-C)/(m-1),e.set(A.scatterplotAggregationFields.xStep,p),e.set(A.scatterplotAggregationFields.yStep,h),e.set(A.scatterplotAggregationFields.rowCount,m),e.set(A.scatterplotAggregationFields.columnCount,y),e.set(A.scatterplotAggregationFields.realGridSize,b)}}function ux(t){let{groupByFieldsForStatistics:e,x:r,y:a,xValue:i,yValue:n,xStep:s,yStep:o,endOfRow:l,endOfColumn:d}=t,c=e===""?Jr.groupByCaseBegin:e;return c=qe(lx,{groupByFieldsForStatistics:c,x:r,y:a,xValue:`${i}`,yValue:`${n}`,xValuePlusStep:`${i+(d?0:s)}`,yValuePlusStep:`${n+(l?0:o)}`,xMinOperand:d?"=":">=",yMinOperand:l?"=":">=",xMaxOperand:d?"=":"<",yMaxOperand:l?"=":"<"}),c}async function px(t){let{chartConfig:e,queryConfig:r,queryObject:a,xMin:i,xMax:n,yMin:s,yMax:o,abortKey:l}=t,d=e.series[0],{x:c,y:u}=d,f={...r};return f.where=Ae([f.where,`${c}>=${i}`,`${c}<=${n}`]),c!==u&&(f.where=Ae([f.where,`${u}>=${s}`,`${u}<=${o}`])),await Dt({queryObject:a,queryConfig:f,noBatch:!0,featureCount:1,abortKey:l})}async function fx(t){let{statsMap:e,chartConfig:r,queryObject:a,queryConfig:i,useQueryAttributeBins:n,errorStrings:s,abortKey:o}=t,l=r.series[0],{x:d,y:c}=l,{dataContextXMinField:u,dataContextXMaxField:f,dataContextYMinField:p,dataContextYMaxField:h,queryNumberOfFeatures:m,queryNumberOfAggregatedFeatures:y}=A.scatterplotAggregationFields,b,v=e?.get(u)??Number.NaN,S=e?.get(f)??Number.NaN,C=e?.get(m)??Number.NaN,F=e?.get(p)??v,I=e?.get(h)??S;if(v!=null&&F!==void 0&&F!==null&&S!==void 0&&S!==null&&I!==void 0&&I!==null&&!Number.isNaN(v+S+F+I)){let N=se(a),{idField:P,isTraditionalTypeOID:E}=_t(N),B=E?P:"*",R=e?.get(A.scatterplotAggregationFields.xStep),q=e?.get(A.scatterplotAggregationFields.yStep),L=e?.get(A.scatterplotAggregationFields.realGridSize),k=e?.get(A.scatterplotAggregationFields.rowCount),$=e?.get(A.scatterplotAggregationFields.columnCount),_=new Map,G=wt(a);if(G?.forEach(V=>{Pi(V)&&_.set(V.name,{onStatisticField:V.name,outStatisticFieldName:V.name,statisticType:W.Maximum})}),(G.filter(V=>l?.additionalTooltipFields?.includes(V.name))??[])?.forEach(V=>{Pi(V)||_.set(V.name,{onStatisticField:V.name,outStatisticFieldName:V.name,statisticType:W.Maximum})}),(await kp(N)).forEach(V=>{_.set(V,{onStatisticField:V,outStatisticFieldName:V,statisticType:W.Maximum})}),P!==""&&_.set(P,{onStatisticField:B,outStatisticFieldName:y,statisticType:W.Count}),_.set(d,{onStatisticField:d,outStatisticFieldName:d,statisticType:W.Maximum}).set(c,{onStatisticField:c,outStatisticFieldName:c,statisticType:W.Maximum}),R!==void 0&&q!==void 0){if(n){let V={...i,outStatistics:[..._.values()]};b=await t0({queryObject:a,queryConfig:V,xStep:R,xMin:v,xMax:S,x:d,y:c,yStep:q,errorStrings:s})}else if(k!==void 0&&$!==void 0){let V=0,{maxScatterCellsPerQuery:Z,maxScatterCellsPerQueryForStandard:U}=wn(),oe=await tS(N)?U:Z,Te=[],Re=!0,re=v,be=F,Fe="",ke=1,xt=1,at=Number.MAX_SAFE_INTEGER,Ie=Number.MIN_SAFE_INTEGER,we=Number.MAX_SAFE_INTEGER,Ct=Number.MIN_SAFE_INTEGER;for(;xt<=$&&Re;){for(be=F,ke=1;ke<=k&&Re;){if(Fe=ux({groupByFieldsForStatistics:Fe,x:d,y:c,xValue:re,yValue:be,xStep:R,yStep:q,endOfRow:ke===k,endOfColumn:xt===$}),re<at&&(at=re),re+R>Ie&&(Ie=re+R),be<we&&(we=be),be+R>Ct&&(Ct=be+q),V+=1,V%oe===0||V===L||V===C){Fe=`${Fe} ${Jr.groupByCaseEnd}`;let Ue={...i,groupByFieldsForStatistics:[Fe],outStatistics:[..._.values()]};Te.push(px({chartConfig:r,queryConfig:Ue,queryObject:a,xMin:at,xMax:Ie,yMin:we,yMax:Ct,abortKey:o})),at=Number.MAX_SAFE_INTEGER,Ie=Number.MIN_SAFE_INTEGER,we=Number.MAX_SAFE_INTEGER,Ct=Number.MIN_SAFE_INTEGER,Fe="",V===L&&(Re=!1)}be+=q,ke+=1}re+=R,xt+=1}b=(await Promise.all(Te)).flat()}}}return b}async function hx(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i}=t,n=e.series[0],{x:s,y:o}=n,l=new Map,{dataContextXMinField:d,dataContextXMaxField:c,dataContextYMinField:u,dataContextYMaxField:f,queryNumberOfFeatures:p}=A.scatterplotAggregationFields,{idField:h,isTraditionalTypeOID:m}=_t(se(a)),y=m?h:"*",b=[{statisticType:W.Count,onStatisticField:y,outStatisticFieldName:p},{statisticType:W.Minimum,outStatisticFieldName:d,onStatisticField:s},{statisticType:W.Maximum,outStatisticFieldName:c,onStatisticField:s}];s!==o&&b.push({statisticType:W.Minimum,outStatisticFieldName:u,onStatisticField:o},{statisticType:W.Maximum,outStatisticFieldName:f,onStatisticField:o});let v={...r};return v.outStatistics=b,l=await oa({queryObject:a,queryConfig:v,abortKey:i}),s===o&&(l.set(u,l.get(d)??Number.NaN),l.set(f,l.get(c)??Number.NaN)),l}function ln(t){let{value:e,valueMin:r,valueMax:a}=t;return e===r||e===a?e:Math.random()*(a-r)+r}function mx(t){let{useQueryAttributeBins:e,graphic:r,x:a,y:i,yStep:n}=t,{groupByOutKeyword:s}=Jr,{dataContextXMinField:o,dataContextXMaxField:l,dataContextYMinField:d,dataContextYMaxField:c}=A.scatterplotAggregationFields,u=[];if(e&&"stackedAttributes"in r&&r.stackedAttributes){let f=Ip(a,i),p=r.attributes[f.lowerBoundaryAlias],h=r.attributes[f.upperBoundaryAlias];r.stackedAttributes.forEach(m=>{let y=m[f.stackAlias],b;typeof y=="number"&&typeof n=="number"&&(y*=n),typeof y=="number"&&typeof n=="number"&&(b=y+n);let v=m[a],S=m[i];typeof y=="number"&&typeof b=="number"&&typeof v=="number"&&typeof S=="number"&&u.push({...m,[a]:ln({value:v,valueMin:p,valueMax:h}),[i]:ln({value:S,valueMin:y,valueMax:b}),[o]:Math.min(p,h),[l]:Math.max(p,h),[d]:y,[c]:b})})}else{let{expr:f,isInItem:p}=xn(r.attributes);if(p&&f&&r.attributes[f]!==s){let[h,m,y,b]=r.attributes[f].split("|");h=Math.min(h,m),m=Math.max(h,m),y=Math.min(y,b),b=Math.max(y,b);let v={...r.attributes,[o]:h,[l]:m,[d]:y,[c]:b};v[a]=ln({value:v[a],valueMin:h,valueMax:m}),v[i]=ln({value:v[i],valueMin:y,valueMax:b}),u=[v]}}return u}function yx(t){let{chartConfig:e,rawData:r,isAggregationMode:a,yStep:i,useQueryAttributeBins:n}=t,s=e.series[0],{x:o,y:l}=s,d=(Array.isArray(r)?r:r?.features)?.flatMap(c=>{let u=[{...c.attributes}];return ho(u[0],[o,l]),a?u=mx({useQueryAttributeBins:n,graphic:c,x:o,y:l,yStep:i}):u[0][pe.uniqueIdsName]=c.getObjectId(),u});return d=d?.filter(c=>{let{expr:u}=xn(c);return Number.isFinite(c[o])&&Number.isFinite(c[l])&&(u===void 0||c[u]!==Jr.groupByOutKeyword)}),d??[]}async function gx(t){let{queryObject:e,queryConfig:r,chartConfig:a,featureCount:i,abortKey:n}=t,s=a.series[0],{x:o,y:l}=s,d=se(e),c=[],u=wt(e),f=Tn(d).idFields,p=(u?.filter(v=>Pi(v)&&v.name!==o&&v.name!==l)??[]).map(v=>v.name)??[],h=s?.additionalTooltipFields??[],m=Array.from(new Set([o,l,...f??[],...p,...h])),y=ut(d);if(y&&!y.isTable){let{rendererField:v,rendererNormalizationField:S}=J0(d?.renderer??void 0);_e(v)||m.push(v),_e(S)||m.push(S)}let b={...r,orderByFields:[`${o} ${Ne.Ascending}`],outFields:m};return c=await Dt({queryObject:e,queryConfig:b,featureCount:i,abortKey:n}),c}async function bx(t){let e,{chartConfig:r,queryConfig:a,queryObject:i,statsMap:n,numberOfFeatures:s,isAggregationMode:o,useQueryAttributeBins:l,errorStrings:d,abortKey:c}=t,u=r.series[0],{x:f,y:p}=u;if(!Number.isNaN(s)&&s>0){let h={...a};h.where=Ae([h.where,`${f} IS NOT NULL`,`${p} IS NOT NULL`]),o?e=await fx({chartConfig:r,queryObject:i,queryConfig:h,statsMap:n,useQueryAttributeBins:l,errorStrings:d,abortKey:c}):e=await gx({queryObject:i,chartConfig:r,queryConfig:h,featureCount:s,abortKey:c})}return e}async function sf(t){let{chartConfig:e,queryConfig:r,queryObject:a,sortData:i,calculateTrendLine:n,options:s,abortKey:o}=t,l;if(Ke(a))l=await B0(t);else{let d=await hx({chartConfig:e,queryConfig:r,queryObject:a,abortKey:o}),{queryNumberOfFeatures:c,yStep:u}=A.scatterplotAggregationFields,{maxScatterPointsBeforeAggregation:f}=Xr(s?.chartLimits),p=d?.get(c)??Number.NaN,h=p>=f,m=Zv(a);h&&await cx({statsMap:d,chartConfig:e,queryObject:a,options:s,queryConfig:r,abortKey:o});let y=await bx({...t,queryObject:a,statsMap:d,numberOfFeatures:p,isAggregationMode:h,useQueryAttributeBins:m}),b=yx({chartConfig:e,rawData:y,isAggregationMode:h,yStep:d.get(u),useQueryAttributeBins:m});i!==!1&&ra({arrayToSort:b,sortingField:e.series[0].x,orderBy:Ne.Ascending});let{r2:v,trendLinePoints:S}=n!==!1?await Dp({data:b,statsMap:d,queryConfig:r,options:s,queryObject:a,chartConfig:e}):A.scatterplotSeries;l={dataItems:b,r2:v,trendLinePoints:S,aggregated:h}}return l}function Ti(t){let e=t===void 0||t==="";return{[H.Average]:`${e?"":`${t}_`}${H.Average}`,[H.Min]:`${e?"":`${t}_`}${H.Min}`,[H.Max]:`${e?"":`${t}_`}${H.Max}`,[H.FirstQuartile]:`${e?"":`${t}_`}${H.FirstQuartile}`,[H.Median]:`${e?"":`${t}_`}${H.Median}`,[H.ThirdQuartile]:`${e?"":`${t}_`}${H.ThirdQuartile}`,[H.IQR]:`${e?"":`${t}_`}${H.IQR}`,[H.Outlier]:`${e?"":`${t}_`}${H.Outlier}`,[H.StandardDeviation]:`${e?"":`${t}_`}${H.StandardDeviation}`}}function yo(t){return"subType"in t&&t.subType===Bo.FeatureGauge}function go(t){let e;return t!==void 0&&("bins"in t?e=t.bins:"dataItems"in t&&(e=t.dataItems)),e}function of(t){return t===x.BoxPlotMultiFields||t===x.BoxPlotMultiFieldsAndCategory||t===x.BoxPlotMultiFieldsAndSplitBy}function ze(t){let{key:e,y:r,chartSubType:a,splitBy:i,splitByValue:n,showOutliers:s,standardizeValues:o}=t,l=n,d=Ti(r)[e];return s===!0&&(e===H.Min||e===H.Max)&&(d=`${d}${Gb}`),o===!0&&(of(a)||e===H.Outlier)&&(d=`${d}${Qb}`),(n===void 0||`${n}`.trim()==="")&&(l=ct({where:i,normalize:!0,escape:!1})),l!==void 0&&`${l}`.trim()!==""&&(d=`${l}${d!==""?`_${d}`:""}`),d}function Hs(t){let{dataItem:e,y:r,splitBy:a,showOutliers:i}=t,n=ze({key:H.FirstQuartile,y:r,splitBy:a,showOutliers:i}),s=ze({key:H.ThirdQuartile,y:r,splitBy:a,showOutliers:i});return Number.isFinite(e[n])||Number.isFinite(e[s])}function vx(t){let{configSeries:e,boxPlotDataItem:r,yList:a,showOutliers:i}=t,n=X(e),s=!1;switch(n){case x.BoxPlotMonoField:case x.BoxPlotMultiFields:case x.BoxPlotMonoFieldAndCategory:s=Hs({dataItem:r,showOutliers:i});break;case x.BoxPlotMultiFieldsAndCategory:s=a.some(o=>Hs({dataItem:r,y:o,showOutliers:i}));break;case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:s=e.some(o=>Hs({dataItem:r,splitBy:o.query?.where,showOutliers:i}));break;default:s=!1;break}return s}function lf(t){return t.map(e=>e.id).filter(e=>e!==void 0)}function it(t,e){let r=[],a=e??lf(t),i=X(t);return r=t.filter(n=>a.includes(n.id)).map(n=>{let s="y"in n?n.y:void 0;return s!==void 0&&i===x.BarAndLineSplitByNoAggregation&&(s=`${s.toString()}_${ct({where:n.query?.where,keepSurroundingQuotes:!1,escape:!1})}`),s}).filter(n=>n!==void 0),Array.from(new Set(r.flat()))}function In(t){let{seriesConfig:e,filteredSeriesIds:r,showMean:a}=t,i=[];if(a===!0){let n=e.find(s=>s.type===g.BoxPlotSeries);n!==void 0&&"y"in n&&(i=[n.y].flat())}else i=it(e,r);return i}function Or(t,e){return t===null&&e===!0||Number.isFinite(t)}function Sx(t){let{dataItem:e,x:r,y:a,nullAsValid:i=!1}=t;return e[r]!==void 0&&(typeof e[r]!="number"||Number.isFinite(e[r]))&&Or(e[a],i)}function zF(t){let{chartConfig:e,nullAsValid:r=!1,dataSet:a}=t,i=!0;if(e!==void 0){let n=K(e.series);if(a===void 0||a.length===0)i=!0;else{let s=it(e.series);i=!a.some(o=>{let l=!1;switch(n){case g.HistogramSeries:{let d=o;l=Or(d.minValue,r)&&Or(d.maxValue,r)}break;case g.ScatterSeries:{let d=o,{x:c,y:u}=e.series[0];l=Or(d[c],r)&&Or(d[u],r)}break;case g.ComboLineAndBarSeries:case g.RadarSeries:case g.LineSeries:case g.BarSeries:{let d=o,{x:c}=e.series[0];l=s.some(u=>Sx({dataItem:d,x:c,y:u,nullAsValid:r}));break}case g.BoxPlotSeries:{if(rt(e)){let d=e.series;l=vx({configSeries:d,boxPlotDataItem:o,yList:s,showOutliers:e.showOutliers})}break}case g.PieSeries:{let d=o,{x:c,y:u}=e.series[0];X(e.series)===x.PieFromFields&&(c=lt,u=Wt);let f=d[u];l=d[c]!==void 0&&d[c]!==null&&!Lo(f)&&Or(Number(f),r)}break;case g.GaugeSeries:{let{x:d}=e.series[0];l=Or(o[d],r)}break;case g.HeatSeries:l=a.some(d=>Or(d[te.valueField],r));break}return l})}}return i}function wx(t,e){let r=new Map,a=e??lf(t);return t.forEach(i=>{if(a.includes(i.id)&&"y"in i){let n=r.get(i.type)??[];n.push(i.y),r.set(i.type,n)}}),r}function xx(t){let{seriesConfig:e,filteredSeriesIds:r,filteredData:a}=t,i=wx(e,r),n=e.find(d=>d.type===g.LineSeries||d.type===g.RadarSeries)?.stackNegativeValuesToBaseline??!0,s=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,l=!1;return a.forEach(d=>{i.forEach(c=>{if(n){let u=0,f=0,p=!1,h=!1;for(let m=0;m<c.length;m+=1){let y=d[c[m]];Number.isFinite(y)&&(y<0?(f+=y,h=!0,l=!0):(u+=y,p=!0))}s=p?Math.max(s,u):s,o=h?Math.min(o,f):o,p&&!h&&(o=Math.min(o,u)),!p&&h&&(s=Math.max(s,f)),p&&u<=0&&(l=!0)}else{let u=0;for(let f=0;f<c.length;f+=1){let p=d[c[f]];u+=p,s=Math.max(s,u),o=Math.min(o,u)}(s<=0||o<=0)&&(l=!0)}})}),{stackedMinY:o,stackedMaxY:s,dataHasNegativeValues:l}}function Cx(t){let{dataItem:e,...r}=t,a=ze({key:H.Min,...r}),i=ze({key:H.Max,...r}),n=e[a],s=e[i];return{min:n,max:s}}function ep(t){let e=Number.NaN,r=Number.NaN,a,i,{chartConfig:n,chartData:s,filteredSeriesIds:o}=t,{series:l}=n;if(l?.length>0){let{x:d}=l[0],c=K(n.series);if(c===g.HistogramSeries&&s.length>0){let u=s[0]?.[Ru.Start],f=s[s.length-1]?.[Ru.End];a=typeof u=="number"?u:a,i=typeof f=="number"?f:i}else{let u=s.filter(f=>f[d]!==null);if({min:a,max:i}=aa(u,f=>f[d]),n.axes?.[0]?.valueFormat.type===g.DateAxisFormat&&a!==void 0&&i!==void 0&&([a,i]=[new Date(a).valueOf(),new Date(i).valueOf()]),c===g.BoxPlotSeries){e=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;let f=it(l,o),p=X(l),h="standardizeValues"in n?n.standardizeValues===!0:void 0,m=n.series.map(y=>y.visible!==!1?ct({where:y.query?.where}):"");m.length===0&&m.push(" "),u.forEach(y=>{f.forEach(b=>{let v=p===x.BoxPlotMultiFieldsAndCategory?b:void 0;m.forEach(S=>{let{min:C,max:F}=Cx({y:v,splitByValue:S,chartSubType:p,showOutliers:!1,standardizeValues:h,dataItem:y});C!=null&&C<e&&(e=C),F!=null&&F>r&&(r=F)})})})}else switch(lo(n)){case yt.Stacked100:case yt.Stacked:{let{stackedMinY:f,stackedMaxY:p}=xx({seriesConfig:l,filteredData:u,filteredSeriesIds:o});e=f,r=p;break}case yt.Side:default:{e=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,it(l,o).forEach(f=>{let{min:p,max:h}=aa(u,m=>m[f]);p!==void 0&&p<e&&(e=p),h!==void 0&&h>r&&(r=h)});break}}}}return{minY:e,maxY:r,minX:a,maxX:i}}function Tx(t){let{chartConfig:e,isSecondValueAxis:r,seriesIds:a}=t,i=a;return e.axes?.length===3&&(i=e.series.map(n=>{let s="";return(a===void 0||a.includes(n.id))&&(r===!0&&"assignToSecondValueAxis"in n&&n.assignToSecondValueAxis===!0||r!==!0&&(!("assignToSecondValueAxis"in n)||n.assignToSecondValueAxis!==!0))&&({id:s}=n),s}).filter(n=>n!=="")),i}function Fx(t){let e=!1;if(t){let r=t.axes?.[0],a=r?.isLogarithmic===!0,i=r?.valueFormat?.type;e=(i===g.NumberAxisFormat||i===g.DateAxisFormat)&&a}return e}function tp(t,e){let r=!1;return Number.isFinite(t)&&t!==Number.MAX_SAFE_INTEGER&&Number.isFinite(e)&&e!==Number.MIN_SAFE_INTEGER&&(r=t<=0||e<=0),r}function Ix(t){let{chartConfig:e,chartData:r,axisConfigIndex:a}=t,i=!1;if(a===0){if(Fx(e)){let{minX:n,maxX:s}=ep({chartConfig:e,chartData:r});i=tp(n,s)}}else{let n=Tx({chartConfig:e,isSecondValueAxis:a===2}),{minY:s,maxY:o}=ep({chartConfig:e,chartData:r,filteredSeriesIds:n});i=tp(s,o)}return i}function UF(t){let{chartConfig:e,axisConfigIndex:r,chartData:a}=t,i=!0,n=e?.axes?.[r];return e&&a&&n?.isLogarithmic===!0&&(i=!Ix({chartConfig:e,chartData:a,axisConfigIndex:r})),i}function Ox(t,e){let r=t;if(e?.[0]!==void 0&&X(e)===x.PieFromFields){let{x:a,y:i}=e[0];(fa(t)?r:r.dataItems).forEach(n=>(lt in n&&a!==lt&&(n[a]=n[a]!==void 0?n[a]:n[lt],delete n[lt]),Wt in n&&i!==Wt&&(n[i]=n[i]!==void 0?n[i]:n[Wt],delete n[Wt]),n))}return r}function Ax(t,e){let r=K(e),a=t,i=e?.[0];if((r===g.PieSeries||r===g.BoxPlotSeries||r===g.LineSeries||r===g.RadarSeries||r===g.BarSeries||r===g.HeatSeries||r===g.ComboLineAndBarSeries)&&i!==void 0){let n=fa(t),s=n?t:t.dataItems;if(t!==void 0){let{originalCategoryValue:o,originalYCategoryValue:l,originalDateValue:d,xAxisField:c}=A,u=r===g.HeatSeries?te.xField:i.x,f=r===g.HeatSeries?te.yField:void 0;s=s.map(p=>{let h=p[u];p[d]!==void 0?h=p[d]:p[o]!==void 0&&(h=p[o]);let m={...p,[u]:h};if(delete m[d],delete m[o],delete m[c],f){let y=p[f];p[l]!==void 0&&(y=p[l]),m={...m,[f]:y},delete m[l]}return m}),n?a=s:"dataItems"in a&&(a.dataItems=s)}}return a}function rp(t){let e={...t};delete e[A.technicalSortingFieldBySum],delete e[A.technicalSortingFieldByPercent],delete e[A.pieChart.technicalFieldSlicePercent],delete e[A.pieChart.technicalFieldGroupedSlices],delete e[A.lastTemporalBin],delete e[A.originalServerBinningRange],delete e[A.technicalFieldSplitByField],delete e[pe.uniqueIdsName],Object.keys(e).filter(a=>a.includes(A.rendererSymbolField)).forEach(a=>delete e[a]);let r=xn(e);return r.isInItem&&delete e[r.expr??""],e}function Px(t,e){let r=t,a=K(e),i=go(r);if(i!==void 0)switch(a){case g.ComboLineAndBarSeries:case g.BarSeries:case g.LineSeries:case g.RadarSeries:case g.PieSeries:{i=i.map(rp),r={dataItems:i};let{timeIntervalInfo:n,serverLimitReached:s}=t??{};Dn(n)||(r.timeIntervalInfo=n),s!==void 0&&(r.serverLimitReached=s)}break;case g.ScatterSeries:r={...r,dataItems:i.map(rp)};break}return r}var HF=(t,e)=>{let r=10**e;return Math.round(t*r)/r};function GF(t){let{data:e,seriesConfig:r}=t,a=Wr(e);return a!==void 0&&(a=Ax(a,r),a=Px(a,r),a=Ox(a,r)),a}function Ex(t){let{dataFetchingResults:e,numberOfQueries:r,series:a}=t,i=K(a),n=X(a),s=[],o=new Map;for(let l=0;l<r;l+=1){let d=e[l];if(d!==void 0){let c;if(i===g.ScatterSeries)c=d.dataItems;else if("data"in d&&d.data){let u=d.data;"dataItems"in u&&(c=u.dataItems),"outliers"in u&&u.outliers&&s.push(...u.outliers),"meanLines"in u&&u.meanLines&&s.push(...u.meanLines)}if(c)if(a[0].type===g.HeatSeries)r>0&&c.forEach(u=>{o.set(`${u[te.xField]}-${u[te.yField]}`,u)});else if(a[0].type===g.ScatterSeries){let{x:u,y:f}=a[0];s.push(...c.map(p=>({[u]:p[u],[f]:p[f]})))}else d.valid&&(n===x.PieFromFields?s=mn({dataToConvert:c[0],x:lt,y:Wt}):n===x.BarAndLineFromFields?s=mn({dataToConvert:c[0],x:a[0].x,y:a[0].y}):s.push(...c))}}return o.size>0&&(s=Array.from(o.values())),s}async function Lx(t){let{numberOfQueries:e,selectionOIDs:r,chartConfig:a,queryConfig:i,options:n,errorStrings:s,queryObject:o,splitByField:l}=t,{setTimeBinningInfoWhenNotProvided:d}=n??{},{series:c}=a,u=K(c),f=[],{maxOIDsPerSelectionQuery:p}=wn();for(let h=0;h<e;h+=1){let m=h*p,y=(h+1)*p-1,b=r.slice(m===0?0:m-1,y),v={...i};switch(v.objectIds=b,u){case g.HeatSeries:f.push(nf({completeHeatChartDataset:!1,chartConfig:a,queryConfig:v,queryObject:o,errorStrings:s,options:n}));break;case g.PieSeries:case g.BarSeries:case g.LineSeries:case g.RadarSeries:case g.ComboLineAndBarSeries:if(fr({xAxisValueFormatType:Vt(a),setTimeBinningInfoWhenNotProvided:d,seriesConfig:c[0],queryObject:o})){let S=a;"temporalBinning"in S.series[0]&&S.series[0].temporalBinning&&(S.series[0].temporalBinning.trimIncompleteTimeInterval=!1,Ai(l,o)&&(delete S.series[0].temporalBinning.start,delete S.series[0].temporalBinning.end)),f.push(mo({chartConfig:S,queryConfig:v,queryObject:o,options:n}))}else f.push(sx({queryObject:o,chartConfig:a,options:n,queryConfig:v}));break;case g.BoxPlotSeries:f.push(ox({queryObject:o,chartConfig:a,options:n,errorStrings:s,queryConfig:v}));break;case g.ScatterSeries:f.push(sf({queryObject:o,chartConfig:a,queryConfig:v,options:n,errorStrings:s,sortData:!1,calculateTrendLine:!1}));break;case g.HistogramSeries:f.push(jS({queryObject:o,queryConfig:v,chartConfig:a,x:c[0].x}));break}}return await Promise.all(f)}async function QF(t){let{updatedPropsSnapshot:e,chartConfig:r,chartData:a,dataWasUpdated:i,queryObject:n,options:s,errorStrings:o}=t,{series:l}=r,{selectionData:d,viewExtentUpdated:c,returnSelectionOIDs:u,chartLimits:f}=s??{},{selectionItems:p,selectionOIDs:h}=d??{},m,y=K(l),b=!1;if(e.has("selectionData")){let{oldValue:S,newValue:C}=e.get("selectionData");b=!tr(S?.selectionOIDs,C?.selectionOIDs)}let v=y!==g.HistogramSeries&&y!==g.HeatSeries&&p!==void 0&&p.length>0&&!(l[0].x in p[0])&&!(lt in p[0])&&!(A.boxPlot.boxPlotCategory in p[0]);if(c!==!0&&u!==!1&&h!==void 0&&h.length>0&&(i===!0||v||b)){let S=go(a),C=Wp({queryObject:n,chartConfig:r,runtimeDataFilters:s?.runtimeDataFilters,ignoreViewExtent:s?.ignoreViewExtent,viewExtent:s?.view?.extent});if(S!==void 0&&!rv({dataContext:S[0],chartConfig:r,chartLimits:f}))m=S.filter(F=>{let I=F[pe.uniqueIdsName];return typeof I=="number"||typeof I=="string"?h?.includes(I):!1});else if(h?.[0]!==void 0&&C!==void 0){let{maxOIDsPerSelectionQuery:F}=wn(),I=Math.ceil(h.length/F),N=Ze(r.series[0]?.query?.where),P=await Lx({numberOfQueries:I,selectionOIDs:h,queryConfig:C,queryObject:n,options:s,splitByField:N,errorStrings:o,chartConfig:r});m=Ex({dataFetchingResults:P,numberOfQueries:I,series:l})}}return m}var xi={$schema:"http://json-schema.org/draft-07/schema#",definitions:{ValueConversion:{type:"object",properties:{factor:{type:"number",description:"A numeric value multiplying the value to convert."},offset:{type:"number",description:"A numeric offset to apply to the value to convert."}},description:"Stores information regarding a numeric conversion.",title:"ValueConversion"},WebChartAxisScrollBar:{type:"object",properties:{visible:{type:"boolean",description:"Scrollbar visibility.",default:!1},width:{type:"number",description:"Scrollbar width in pixels."},color:{$ref:"#/definitions/Color",description:"Scrollbar color."},gripSize:{type:"number",description:"Grip size in pixels."},margin:{type:"number",description:"Margin between the scrollbar and the series container in pixels."}},description:"Describes the properties of an axis scrollbar.",title:"WebChartAxisScrollBar"},Color:{type:"array",items:{type:"number"},minItems:4,maxItems:4,description:"Represents the color information (R, G, B, A).",title:"Color"},WebChartTextSymbol:{type:"object",properties:{xoffset:{type:["number","string"],description:"Horizontal offset. Can be a number for a fixed value in pixels, or a string such as `25%` for a value relative to the label's container width."},yoffset:{type:["number","string"],description:"Vertical offset. Can be a number for a fixed value in pixels, or a string such as `25%` for a value relative to the label's container height."},angle:{type:"number",description:"Rotation angle of the label."},style:{type:"string",description:"Label style."},type:{type:"string",const:"esriTS"},color:{$ref:"#/definitions/Color"},backgroundColor:{$ref:"#/definitions/Color"},borderLineSize:{type:"number"},borderLineColor:{$ref:"#/definitions/Color"},haloSize:{type:"number"},haloColor:{$ref:"#/definitions/Color"},verticalAlignment:{type:"string",enum:["baseline","bottom","middle","top"]},horizontalAlignment:{type:"string",enum:["center","justify","left","right"]},rightToLeft:{type:"boolean"},kerning:{type:"boolean"},font:{$ref:"#/definitions/IFont"},text:{type:"string",description:"Only applicable when specified as a client-side graphic."}},required:["type"],description:"Represents a text symbol.",title:"WebChartTextSymbol"},'Omit<ITextSymbol,("angle"|"style"|"xoffset"|"yoffset")>':{$ref:"#/definitions/Pick%3CITextSymbol%2CExclude%3C(%22type%22%7C%22color%22%7C%22backgroundColor%22%7C%22borderLineSize%22%7C%22borderLineColor%22%7C%22haloSize%22%7C%22haloColor%22%7C%22verticalAlignment%22%7C%22horizontalAlignment%22%7C%22rightToLeft%22%7C%22kerning%22%7C%22font%22%7C%22text%22%7C%22angle%22%7C%22xoffset%22%7C%22yoffset%22%7C%22style%22%7Cstring)%2C(%22angle%22%7C%22style%22%7C%22xoffset%22%7C%22yoffset%22)%3E%3E",title:'Omit<ITextSymbol,("angle"|"style"|"xoffset"|"yoffset")>'},'Pick<ITextSymbol,Exclude<("type"|"color"|"backgroundColor"|"borderLineSize"|"borderLineColor"|"haloSize"|"haloColor"|"verticalAlignment"|"horizontalAlignment"|"rightToLeft"|"kerning"|"font"|"text"|"angle"|"xoffset"|"yoffset"|"style"|string),("angle"|"style"|"xoffset"|"yoffset")>>':{type:"object",properties:{type:{type:"string",const:"esriTS"},color:{$ref:"#/definitions/Color"},backgroundColor:{$ref:"#/definitions/Color"},borderLineSize:{type:"number"},borderLineColor:{$ref:"#/definitions/Color"},haloSize:{type:"number"},haloColor:{$ref:"#/definitions/Color"},verticalAlignment:{type:"string",enum:["baseline","bottom","middle","top"]},horizontalAlignment:{type:"string",enum:["center","justify","left","right"]},rightToLeft:{type:"boolean"},kerning:{type:"boolean"},font:{$ref:"#/definitions/IFont"},text:{type:"string",description:"Only applicable when specified as a client-side graphic."}},required:["type"],title:'Pick<ITextSymbol,Exclude<("type"|"color"|"backgroundColor"|"borderLineSize"|"borderLineColor"|"haloSize"|"haloColor"|"verticalAlignment"|"horizontalAlignment"|"rightToLeft"|"kerning"|"font"|"text"|"angle"|"xoffset"|"yoffset"|"style"|string),("angle"|"style"|"xoffset"|"yoffset")>>'},IFont:{type:"object",properties:{family:{type:"string"},size:{type:"number"},style:{type:"string",enum:["italic","normal","oblique"]},weight:{type:"string",enum:["bold","bolder","lighter","normal"]},decoration:{type:"string",enum:["line-through","none","underline"]}},title:"IFont"},WebChartText:{type:"object",properties:{type:{type:"string",const:"chartText",description:"A unique string identifier for the `ChartText` object. This value is `chartText`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},content:{$ref:"#/definitions/WebChartTextSymbol",description:"Contains the styling information and text content."}},required:["type","content"],description:"Stores information on how some text is rendered on the chart and whether it is visible or not.",title:"WebChartText"},WebChartCursorCrosshair:{type:"object",properties:{type:{type:"string",const:"cursorCrosshair",description:"Represents a unique string identifier for the chart cursor's crosshair."},style:{$ref:"#/definitions/ISimpleLineSymbol",description:"Contains styling information on how the chart cursor's crosshair should be rendered."},verticalLineVisible:{type:"boolean",description:"Indicates whether the vertical crosshair line should be displayed.",default:!1},horizontalLineVisible:{type:"boolean",description:"Indicates whether the horizontal crosshair line should be displayed.",default:!1}},required:["type"],description:"JSON representation of the cursor's crosshair for a chart.",title:"WebChartCursorCrosshair"},ISimpleLineSymbol:{type:"object",properties:{type:{type:"string",const:"esriSLS"},style:{$ref:"#/definitions/SimpleLineSymbolStyle"},color:{$ref:"#/definitions/Color"},width:{type:"number"}},required:["type"],title:"ISimpleLineSymbol"},ISymbol:{type:"object",properties:{type:{$ref:"#/definitions/SymbolType"},style:{type:"string"}},required:["type"],title:"ISymbol"},SymbolType:{type:"string",enum:["esriPFS","esriPMS","esriSFS","esriSLS","esriSMS","esriTS"],deprecated:"since 5.1. Won't be replaced.",title:"SymbolType"},SimpleLineSymbolStyle:{type:"string",enum:["esriSLSDash","esriSLSDashDot","esriSLSDashDotDot","esriSLSDot","esriSLSNull","esriSLSSolid"],title:"SimpleLineSymbolStyle"},WebChartLegend:{type:"object",properties:{type:{type:"string",const:"chartLegend",description:"A unique string identifier for the `ChartLegend` object. This value is `chartLegend`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},title:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the title of the legend box should be rendered."},body:{$ref:"#/definitions/WebChartTextSymbol",description:"Contains styling information on how legend body (excluding the `title`) should be rendered. Will use default styling if not provided."},position:{$ref:"#/definitions/WebChartLegendPositions",description:'Positions the legends at `"right"`, `"left"`, `"top"`, or `"bottom"` of the chart.',default:"`right`"},maxHeight:{type:["number","null"],description:"Legend's maximum height. If not set the legend will occupy the same height as the series container.",default:null},roundMarkers:{type:"boolean",description:"Allows the legend markers to be displayed as circles.\n- `false` or `undefined`: rounded rectangles\n- `true`: circles",default:!1}},required:["type"],description:"JSON representation of the chart's legend.",title:"WebChartLegend"},WebChartLegendPositions:{type:"string",enum:["left","right","top","bottom"],title:"WebChartLegendPositions"},WebChartNullCategory:{type:"object",properties:{text:{type:"string",description:"Specifies the text to use for the null category. If none is provided, the default `null` text will be used."},symbol:{$ref:"#/definitions/ISimpleFillSymbol",description:"Contains styling information on how the overlay should be rendered. If not provided a default style is applied.",default:"1 - symbol.outline.width"}},title:"WebChartNullCategory"},ISimpleFillSymbol:{type:"object",properties:{type:{type:"string",const:"esriSFS"},style:{$ref:"#/definitions/SimpleFillSymbolStyle"},color:{$ref:"#/definitions/Color"},outline:{$ref:"#/definitions/ISimpleLineSymbol"}},required:["type"],title:"ISimpleFillSymbol"},SimpleFillSymbolStyle:{type:"string",enum:["esriSFSBackwardDiagonal","esriSFSCross","esriSFSDiagonalCross","esriSFSForwardDiagonal","esriSFSHorizontal","esriSFSNull","esriSFSSolid","esriSFSVertical"],title:"SimpleFillSymbolStyle"},WebChartPieChartLegend:{type:"object",properties:{type:{type:"string",const:"chartLegend",description:"A unique string identifier for the `ChartLegend` object. This value is `chartLegend`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},title:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the title of the legend box should be rendered."},body:{$ref:"#/definitions/WebChartTextSymbol",description:"Contains styling information on how legend body (excluding the `title`) should be rendered. Will use default styling if not provided."},position:{$ref:"#/definitions/WebChartLegendPositions",description:'Positions the legends at `"right"`, `"left"`, `"top"`, or `"bottom"` of the chart.',default:"`right`"},maxHeight:{type:["number","null"],description:"Legend's maximum height. If not set the legend will occupy the same height as the series container.",default:null},roundMarkers:{type:"boolean",description:"Allows the legend markers to be displayed as circles.\n- `false` or `undefined`: rounded rectangles\n- `true`: circles",default:!1},displayCategory:{type:"boolean",description:"Indicates whether the category associated to a slice is to be displayed in the legend.",default:!0},displayNumericValue:{type:"boolean",description:"Indicates whether the numeric value associated to a slice is to be displayed in the legend. If both `displayNumericValue` and `displayPercentage` are true on a same label, they will be displayed as `percentage (value)`",default:!1},displayPercentage:{type:"boolean",description:"Indicates whether the percentage to a slice is to be displayed in the legend. If both `displayNumericValue` and `displayPercentage` are true on a same label, they will be displayed as `percentage (value)`",default:!1},labelMaxWidth:{type:"number",description:"Maximum width in pixels of the label displaying the slice name. If the label is larger than the maximum width, it will automatically wrap.",default:200},valueLabelMaxWidth:{type:"number",description:"Maximum width in pixels of the value label displaying the slice value. If the label is larger than the maximum width, it will automatically wrap.",default:200}},required:["type"],description:"Specific legend for pie charts",title:"WebChartPieChartLegend"},WebChartOverlay:{type:"object",properties:{type:{type:"string",const:"chartOverlay",description:"A unique string identifier for the `ChartOverlay` object. This value is `chartOverlay`."},created:{type:"boolean",description:"Determines whether the overlay is created under the hood. It may or may not be visible.",default:!1},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},symbol:{$ref:"#/definitions/ISimpleLineSymbol",description:"Contains styling information on how the overlay should be rendered. If not provided a default style is applied."}},required:["type"],description:"JSON representation of the chart's overlays such as the trendline in scatterplot, and the median overlay in histogram.",title:"WebChartOverlay"},NumberFormatOptions:{type:"object",properties:{type:{type:"string",const:"number",description:"Represents a unique string identifier for the `NumberFormatOptions` object. For the `NumberFormatOptions` object, it is `number`. It can help to differentiate numerical (value) axis from other types of axes such as date-time axis and category axis."},intlOptions:{$ref:"#/definitions/Intl.NumberFormatOptions",description:"Represents the JS native [Intl.NumberFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat), which is based on [CLDR](http://cldr.unicode.org/translation/numbers-currency/number-patterns) specifications."}},required:["type","intlOptions"],description:"Defines how the numerical(value) axis data should be formatted.",title:"NumberFormatOptions"},"Intl.NumberFormatOptions":{type:"object",properties:{localeMatcher:{type:"string",enum:["lookup","best fit"]},style:{$ref:"#/definitions/Intl.NumberFormatOptionsStyle"},currency:{type:"string"},currencyDisplay:{$ref:"#/definitions/Intl.NumberFormatOptionsCurrencyDisplay"},useGrouping:{$ref:"#/definitions/Intl.NumberFormatOptionsUseGrouping"},minimumIntegerDigits:{type:"number"},minimumFractionDigits:{type:"number"},maximumFractionDigits:{type:"number"},minimumSignificantDigits:{type:"number"},maximumSignificantDigits:{type:"number"}},title:"Intl.NumberFormatOptions"},"Intl.NumberFormatOptionsStyle":{title:"Intl.NumberFormatOptionsStyle"},"Intl.NumberFormatOptionsCurrencyDisplay":{title:"Intl.NumberFormatOptionsCurrencyDisplay"},"Intl.NumberFormatOptionsUseGrouping":{type:"boolean",title:"Intl.NumberFormatOptionsUseGrouping"},WebChartDateTimeUnitFormatOptions:{type:"object",properties:{year:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},month:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},day:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},hour:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},minute:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},second:{$ref:"#/definitions/Intl.DateTimeFormatOptions"}},description:"Interface used by the axis `valueFormat` property to describe how to format specific date and time units when displayed on the axis.",title:"WebChartDateTimeUnitFormatOptions"},"Intl.DateTimeFormatOptions":{type:"object",properties:{localeMatcher:{type:"string",enum:["best fit","lookup"]},weekday:{type:"string",enum:["long","short","narrow"]},era:{type:"string",enum:["long","short","narrow"]},year:{type:"string",enum:["numeric","2-digit"]},month:{type:"string",enum:["numeric","2-digit","long","short","narrow"]},day:{type:"string",enum:["numeric","2-digit"]},hour:{type:"string",enum:["numeric","2-digit"]},minute:{type:"string",enum:["numeric","2-digit"]},second:{type:"string",enum:["numeric","2-digit"]},timeZoneName:{type:"string",enum:["short","long","shortOffset","longOffset","shortGeneric","longGeneric"]},formatMatcher:{type:"string",enum:["best fit","basic"]},hour12:{type:"boolean"},timeZone:{type:"string"}},title:"Intl.DateTimeFormatOptions"},DateTimeFormatOptions:{type:"object",properties:{type:{type:"string",const:"date",description:"Represents a unique string identifier for the `NumberFormatOptions` object. For the `NumberFormatOptions` object, it is `date`. It can help to differentiate date-time axis from other types of axes such as numeric (value) axis and category axis."},intlOptions:{$ref:"#/definitions/Intl.DateTimeFormatOptions",description:"Represent the JS native [Intl.DateTimeFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat), which is based on [CLDR](http://cldr.unicode.org/translation/date-time-1/date-time-patterns) specifications."},formatPerDateTimeUnit:{$ref:"#/definitions/WebChartDateTimeUnitFormatOptions",description:"Represents how to format specific date and time units when displayed on the axis, independently from the `intlOptions`."}},required:["type","intlOptions"],description:"Defines how the `DateTime` axis data should be formatted.",title:"DateTimeFormatOptions"},CategoryFormatOptions:{type:"object",properties:{type:{type:"string",const:"category",description:"Represents a unique string identifier for the `CategoryFormatOptions` object. For the `CategoryFormatOptions` object, it is `category`. It can help to differentiate category axis from other types of axes such as date-time axis and numeric (value) axis."},characterLimit:{type:["number","null"],description:"Represents a positive integer which represents the limit on the number of characters to be displayed for all the category strings. The truncated string are appended with `...`. If property is not present or `null`, no truncation is done."}},required:["type"],description:"Defines how the category axis data (categories) should be formatted.",title:"CategoryFormatOptions"},WebChartGuide:{type:"object",properties:{type:{type:"string",const:"chartGuide",description:"Represents a unique string identifier for the `Guide` object. For the `Guide` class, it is `chartGuide`."},start:{anyOf:[{type:"string",format:"date-time"},{type:"number"},{type:"string"},{type:"null"}],description:"Determines the value where the guide should begin."},end:{anyOf:[{type:"string",format:"date-time"},{type:"number"},{type:"string"},{type:"null"}],description:"Determines the value where the guide should end. If it is not specified, a line guide is used, otherwise a fill/rectangular guide is used."},style:{anyOf:[{$ref:"#/definitions/ISimpleFillSymbol"},{$ref:"#/definitions/ISimpleLineSymbol"}],description:"Determines how the guide should be rendered."},name:{type:"string",description:"A unique string identifier which is used to refer to a particular guide. It is displayed in the charts config UI to differentiate between different guides."},label:{$ref:"#/definitions/WebChartTextSymbol",description:"Defines a text label for the given guide. It is displayed on the chart next to the concerned guide and is styled using **esriTS** format."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},above:{type:"boolean",description:"Determines whether the guide should be rendered on top of (overlapping) the series or under the series.",default:!1},tooltipReverseColor:{type:"boolean",description:"Indicates whether to apply the hovered element's color to the guide's tooltip background (false) or its outline (true).",default:!1}},required:["type","start","style","name"],description:"JSON representation of the chart's guide object. Can be used to represent both line and fill guides.",title:"WebChartGuide"},WebChartAxis:{type:"object",properties:{type:{type:"string",const:"chartAxis",description:"Represents a unique string identifier for the `WebChartAxis` object. For `ChartAxis` object, it is `chartAxis`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},isLogarithmic:{type:"boolean",description:"Specifies whether the axis has a logarithmic scale or not.",default:!1},title:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the title of the axis should be rendered"},valueFormat:{anyOf:[{$ref:"#/definitions/CategoryFormatOptions"},{$ref:"#/definitions/DateTimeFormatOptions"},{$ref:"#/definitions/NumberFormatOptions"}],description:"Specifies how numerical/categorical/date-time values should be formatted."},minimum:{type:["number","null"],description:"The minimum value which the axis should represent, when it is not defined or null, then the minimum value for the corresponding axis is automatically calculated."},maximum:{type:["number","null"],description:"The maximum value which the axis should represent, when it is not defined or null, then the maximum value for the corresponding axis is automatically calculated."},grid:{$ref:"#/definitions/ISimpleLineSymbol",description:"Dictates how the grid lines associated with a particular axis should be rendered."},guides:{type:"array",items:{$ref:"#/definitions/WebChartGuide"},description:"Represent an array of guides that should be rendered onto the axis."},lineSymbol:{$ref:"#/definitions/ISimpleLineSymbol",description:"Contains styling information on how the axis line should be rendered. If not provided a default style is applied."},labels:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the axis labels should be rendered."},scrollbar:{$ref:"#/definitions/WebChartAxisScrollBar",description:"Represents the axis scrollbar style and visibility."},displayZeroLine:{type:"boolean",description:"Represents an option to hide/un-hide the zero line on value axis.",default:!1},integerOnlyValues:{type:"boolean",description:"Represents an option to show `integer-only` values for a value axis",default:!1},displayCursorTooltip:{type:"boolean",description:"Specifies whether cursor tooltip should be displayed.",default:!1},buffer:{type:"boolean",description:"Allows setting a buffer to a **value axis** to provide some space around the series.",default:!1},tickSpacing:{type:"number",description:`The desired minimum distance between two adjacent axis ticks. The actual distance may fluctuate depending on the chart's size. When not provided a default value is assigned according to the axis type and axis labels behavior.
2
+ import{a as fa,d as ji,g as Wr,k as Dn,l as tr,n as Lo,r as Nn,t as fe,u as yr,v as Gt,w as Qt,x as Xe,y as Se}from"./URX6VCYJ.js";import{c as Eo,d as Ln,f as $t,g as mt}from"./6ES4YKXX.js";import{a as g,b as W,c as Oe,e as Vi,f as yt,h as Ne,i as ha,j as Do,k as Q,l as gt,n as st,o as $e,p as No,q as mr,s as Bo,t as $o,v as ot,y as K}from"./ETLJKITO.js";import{H as Bt}from"./GDFOZNYR.js";import{b as Y,d as Ef}from"./QPIMTXPL.js";export default $arcgis.t(([Qg,ao,Li,no,Zg,Kg,Jg,ap,Yg,fn,np,Mu,Xg,qu,eb,{substitute:qe},{sqlLiteral:tb},rb,ib,ab,nb,so,{computeStatisticsHistograms:sb,computeRasterAttributeTable:ob,fetchPixelFeatureSet:lb},db,cb,ub,op,lp])=>{var Md=Y((ja,$d)=>{(function(t,e){typeof ja=="object"&&typeof $d<"u"?e(ja):typeof define=="function"&&define.amd?define(["exports"],e):e(t.URI=t.URI||{})})(ja,(function(t){"use strict";function e(){for(var T=arguments.length,w=Array(T),O=0;O<T;O++)w[O]=arguments[O];if(w.length>1){w[0]=w[0].slice(0,-1);for(var D=w.length-1,$=1;$<D;++$)w[$]=w[$].slice(1,-1);return w[D]=w[D].slice(1),w.join("")}else return w[0]}function r(T){return"(?:"+T+")"}function a(T){return T===void 0?"undefined":T===null?"null":Object.prototype.toString.call(T).split(" ").pop().split("]").shift().toLowerCase()}function i(T){return T.toUpperCase()}function n(T){return T!=null?T instanceof Array?T:typeof T.length!="number"||T.split||T.setInterval||T.call?[T]:Array.prototype.slice.call(T):[]}function s(T,w){var O=T;if(w)for(var D in w)O[D]=w[D];return O}function o(T){var w="[A-Za-z]",O="[\\x0D]",D="[0-9]",$="[\\x22]",z=e(D,"[A-Fa-f]"),ee="[\\x0A]",ce="[\\x20]",ye=r(r("%[EFef]"+z+"%"+z+z+"%"+z+z)+"|"+r("%[89A-Fa-f]"+z+"%"+z+z)+"|"+r("%"+z+z)),We="[\\:\\/\\?\\#\\[\\]\\@]",le="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Le=e(We,le),je=T?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Pe=T?"[\\uE000-\\uF8FF]":"[]",pe=e(w,D,"[\\-\\.\\_\\~]",je),De=r(w+e(w,D,"[\\+\\-\\.]")+"*"),ve=r(r(ye+"|"+e(pe,le,"[\\:]"))+"*"),qr=r(r("25[0-5]")+"|"+r("2[0-4]"+D)+"|"+r("1"+D+D)+"|"+r("[1-9]"+D)+"|"+D),ft=r(r("25[0-5]")+"|"+r("2[0-4]"+D)+"|"+r("1"+D+D)+"|"+r("0?[1-9]"+D)+"|0?0?"+D),Ft=r(ft+"\\."+ft+"\\."+ft+"\\."+ft),xe=r(z+"{1,4}"),ht=r(r(xe+"\\:"+xe)+"|"+Ft),It=r(r(xe+"\\:")+"{6}"+ht),Ht=r("\\:\\:"+r(xe+"\\:")+"{5}"+ht),Rr=r(r(xe)+"?\\:\\:"+r(xe+"\\:")+"{4}"+ht),Yt=r(r(r(xe+"\\:")+"{0,1}"+xe)+"?\\:\\:"+r(xe+"\\:")+"{3}"+ht),Mi=r(r(r(xe+"\\:")+"{0,2}"+xe)+"?\\:\\:"+r(xe+"\\:")+"{2}"+ht),ca=r(r(r(xe+"\\:")+"{0,3}"+xe)+"?\\:\\:"+xe+"\\:"+ht),ua=r(r(r(xe+"\\:")+"{0,4}"+xe)+"?\\:\\:"+ht),ii=r(r(r(xe+"\\:")+"{0,5}"+xe)+"?\\:\\:"+xe),ai=r(r(r(xe+"\\:")+"{0,6}"+xe)+"?\\:\\:"),Xt=r([It,Ht,Rr,Yt,Mi,ca,ua,ii,ai].join("|")),ni=r(r(pe+"|"+ye)+"+"),Pn=r(Xt+"\\%25"+ni),kr=r(Xt+r("\\%25|\\%(?!"+z+"{2})")+ni),Cf=r("[vV]"+z+"+\\."+e(pe,le,"[\\:]")+"+"),Tf=r("\\["+r(kr+"|"+Xt+"|"+Cf)+"\\]"),Io=r(r(ye+"|"+e(pe,le))+"*"),qi=r(Tf+"|"+Ft+"(?!"+Io+")|"+Io),Ri=r(D+"*"),Oo=r(r(ve+"@")+"?"+qi+r("\\:"+Ri)+"?"),ki=r(ye+"|"+e(pe,le,"[\\:\\@]")),Ff=r(ki+"*"),Ao=r(ki+"+"),If=r(r(ye+"|"+e(pe,le,"[\\@]"))+"+"),er=r(r("\\/"+Ff)+"*"),si=r("\\/"+r(Ao+er)+"?"),En=r(If+er),pa=r(Ao+er),oi="(?!"+ki+")",Hx=r(er+"|"+si+"|"+En+"|"+pa+"|"+oi),li=r(r(ki+"|"+e("[\\/\\?]",Pe))+"*"),Wi=r(r(ki+"|[\\/\\?]")+"*"),Po=r(r("\\/\\/"+Oo+er)+"|"+si+"|"+pa+"|"+oi),Of=r(De+"\\:"+Po+r("\\?"+li)+"?"+r("\\#"+Wi)+"?"),Af=r(r("\\/\\/"+Oo+er)+"|"+si+"|"+En+"|"+oi),Pf=r(Af+r("\\?"+li)+"?"+r("\\#"+Wi)+"?"),Gx=r(Of+"|"+Pf),Qx=r(De+"\\:"+Po+r("\\?"+li)+"?"),Zx="^("+De+")\\:"+r(r("\\/\\/("+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?)")+"?("+er+"|"+si+"|"+pa+"|"+oi+")")+r("\\?("+li+")")+"?"+r("\\#("+Wi+")")+"?$",Kx="^(){0}"+r(r("\\/\\/("+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?)")+"?("+er+"|"+si+"|"+En+"|"+oi+")")+r("\\?("+li+")")+"?"+r("\\#("+Wi+")")+"?$",Jx="^("+De+")\\:"+r(r("\\/\\/("+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?)")+"?("+er+"|"+si+"|"+pa+"|"+oi+")")+r("\\?("+li+")")+"?$",Yx="^"+r("\\#("+Wi+")")+"?$",Xx="^"+r("("+ve+")@")+"?("+qi+")"+r("\\:("+Ri+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",w,D,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",pe,le),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",pe,le),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",pe,le),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",pe,le),"g"),NOT_QUERY:new RegExp(e("[^\\%]",pe,le,"[\\:\\@\\/\\?]",Pe),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",pe,le,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",pe,le),"g"),UNRESERVED:new RegExp(pe,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",pe,Le),"g"),PCT_ENCODED:new RegExp(ye,"g"),IPV4ADDRESS:new RegExp("^("+Ft+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Xt+")"+r(r("\\%25|\\%(?!"+z+"{2})")+"("+ni+")")+"?\\]?$")}}var l=o(!1),d=o(!0),c=(function(){function T(w,O){var D=[],$=!0,z=!1,ee=void 0;try{for(var ce=w[Symbol.iterator](),ye;!($=(ye=ce.next()).done)&&(D.push(ye.value),!(O&&D.length===O));$=!0);}catch(We){z=!0,ee=We}finally{try{!$&&ce.return&&ce.return()}finally{if(z)throw ee}}return D}return function(w,O){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return T(w,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=function(T){if(Array.isArray(T)){for(var w=0,O=Array(T.length);w<T.length;w++)O[w]=T[w];return O}else return Array.from(T)},f=2147483647,p=36,h=1,y=26,m=38,b=700,v=72,S=128,C="-",F=/^xn--/,I=/[^\0-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=p-h,N=Math.floor,R=String.fromCharCode;function q(T){throw new RangeError(P[T])}function L(T,w){for(var O=[],D=T.length;D--;)O[D]=w(T[D]);return O}function k(T,w){var O=T.split("@"),D="";O.length>1&&(D=O[0]+"@",T=O[1]),T=T.replace(M,".");var $=T.split("."),z=L($,w).join(".");return D+z}function B(T){for(var w=[],O=0,D=T.length;O<D;){var $=T.charCodeAt(O++);if($>=55296&&$<=56319&&O<D){var z=T.charCodeAt(O++);(z&64512)==56320?w.push((($&1023)<<10)+(z&1023)+65536):(w.push($),O--)}else w.push($)}return w}var _=function(w){return String.fromCodePoint.apply(String,u(w))},G=function(w){return w-48<10?w-22:w-65<26?w-65:w-97<26?w-97:p},V=function(w,O){return w+22+75*(w<26)-((O!=0)<<5)},Z=function(w,O,D){var $=0;for(w=D?N(w/b):w>>1,w+=N(w/O);w>E*y>>1;$+=p)w=N(w/E);return N($+(E+1)*w/(w+m))},U=function(w){var O=[],D=w.length,$=0,z=S,ee=v,ce=w.lastIndexOf(C);ce<0&&(ce=0);for(var ye=0;ye<ce;++ye)w.charCodeAt(ye)>=128&&q("not-basic"),O.push(w.charCodeAt(ye));for(var We=ce>0?ce+1:0;We<D;){for(var le=$,Le=1,je=p;;je+=p){We>=D&&q("invalid-input");var Pe=G(w.charCodeAt(We++));(Pe>=p||Pe>N((f-$)/Le))&&q("overflow"),$+=Pe*Le;var pe=je<=ee?h:je>=ee+y?y:je-ee;if(Pe<pe)break;var De=p-pe;Le>N(f/De)&&q("overflow"),Le*=De}var ve=O.length+1;ee=Z($-le,ve,le==0),N($/ve)>f-z&&q("overflow"),z+=N($/ve),$%=ve,O.splice($++,0,z)}return String.fromCodePoint.apply(String,O)},oe=function(w){var O=[];w=B(w);var D=w.length,$=S,z=0,ee=v,ce=!0,ye=!1,We=void 0;try{for(var le=w[Symbol.iterator](),Le;!(ce=(Le=le.next()).done);ce=!0){var je=Le.value;je<128&&O.push(R(je))}}catch(kr){ye=!0,We=kr}finally{try{!ce&&le.return&&le.return()}finally{if(ye)throw We}}var Pe=O.length,pe=Pe;for(Pe&&O.push(C);pe<D;){var De=f,ve=!0,qr=!1,ft=void 0;try{for(var Ft=w[Symbol.iterator](),xe;!(ve=(xe=Ft.next()).done);ve=!0){var ht=xe.value;ht>=$&&ht<De&&(De=ht)}}catch(kr){qr=!0,ft=kr}finally{try{!ve&&Ft.return&&Ft.return()}finally{if(qr)throw ft}}var It=pe+1;De-$>N((f-z)/It)&&q("overflow"),z+=(De-$)*It,$=De;var Ht=!0,Rr=!1,Yt=void 0;try{for(var Mi=w[Symbol.iterator](),ca;!(Ht=(ca=Mi.next()).done);Ht=!0){var ua=ca.value;if(ua<$&&++z>f&&q("overflow"),ua==$){for(var ii=z,ai=p;;ai+=p){var Xt=ai<=ee?h:ai>=ee+y?y:ai-ee;if(ii<Xt)break;var ni=ii-Xt,Pn=p-Xt;O.push(R(V(Xt+ni%Pn,0))),ii=N(ni/Pn)}O.push(R(V(ii,0))),ee=Z(z,It,pe==Pe),z=0,++pe}}}catch(kr){Rr=!0,Yt=kr}finally{try{!Ht&&Mi.return&&Mi.return()}finally{if(Rr)throw Yt}}++z,++$}return O.join("")},Te=function(w){return k(w,function(O){return F.test(O)?U(O.slice(4).toLowerCase()):O})},Re=function(w){return k(w,function(O){return I.test(O)?"xn--"+oe(O):O})},re={version:"2.1.0",ucs2:{decode:B,encode:_},decode:U,encode:oe,toASCII:Re,toUnicode:Te},be={};function Fe(T){var w=T.charCodeAt(0),O=void 0;return w<16?O="%0"+w.toString(16).toUpperCase():w<128?O="%"+w.toString(16).toUpperCase():w<2048?O="%"+(w>>6|192).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase():O="%"+(w>>12|224).toString(16).toUpperCase()+"%"+(w>>6&63|128).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase(),O}function ke(T){for(var w="",O=0,D=T.length;O<D;){var $=parseInt(T.substr(O+1,2),16);if($<128)w+=String.fromCharCode($),O+=3;else if($>=194&&$<224){if(D-O>=6){var z=parseInt(T.substr(O+4,2),16);w+=String.fromCharCode(($&31)<<6|z&63)}else w+=T.substr(O,6);O+=6}else if($>=224){if(D-O>=9){var ee=parseInt(T.substr(O+4,2),16),ce=parseInt(T.substr(O+7,2),16);w+=String.fromCharCode(($&15)<<12|(ee&63)<<6|ce&63)}else w+=T.substr(O,9);O+=9}else w+=T.substr(O,3),O+=3}return w}function xt(T,w){function O(D){var $=ke(D);return $.match(w.UNRESERVED)?$:D}return T.scheme&&(T.scheme=String(T.scheme).replace(w.PCT_ENCODED,O).toLowerCase().replace(w.NOT_SCHEME,"")),T.userinfo!==void 0&&(T.userinfo=String(T.userinfo).replace(w.PCT_ENCODED,O).replace(w.NOT_USERINFO,Fe).replace(w.PCT_ENCODED,i)),T.host!==void 0&&(T.host=String(T.host).replace(w.PCT_ENCODED,O).toLowerCase().replace(w.NOT_HOST,Fe).replace(w.PCT_ENCODED,i)),T.path!==void 0&&(T.path=String(T.path).replace(w.PCT_ENCODED,O).replace(T.scheme?w.NOT_PATH:w.NOT_PATH_NOSCHEME,Fe).replace(w.PCT_ENCODED,i)),T.query!==void 0&&(T.query=String(T.query).replace(w.PCT_ENCODED,O).replace(w.NOT_QUERY,Fe).replace(w.PCT_ENCODED,i)),T.fragment!==void 0&&(T.fragment=String(T.fragment).replace(w.PCT_ENCODED,O).replace(w.NOT_FRAGMENT,Fe).replace(w.PCT_ENCODED,i)),T}function at(T){return T.replace(/^0*(.*)/,"$1")||"0"}function Ie(T,w){var O=T.match(w.IPV4ADDRESS)||[],D=c(O,2),$=D[1];return $?$.split(".").map(at).join("."):T}function we(T,w){var O=T.match(w.IPV6ADDRESS)||[],D=c(O,3),$=D[1],z=D[2];if($){for(var ee=$.toLowerCase().split("::").reverse(),ce=c(ee,2),ye=ce[0],We=ce[1],le=We?We.split(":").map(at):[],Le=ye.split(":").map(at),je=w.IPV4ADDRESS.test(Le[Le.length-1]),Pe=je?7:8,pe=Le.length-Pe,De=Array(Pe),ve=0;ve<Pe;++ve)De[ve]=le[ve]||Le[pe+ve]||"";je&&(De[Pe-1]=Ie(De[Pe-1],w));var qr=De.reduce(function(It,Ht,Rr){if(!Ht||Ht==="0"){var Yt=It[It.length-1];Yt&&Yt.index+Yt.length===Rr?Yt.length++:It.push({index:Rr,length:1})}return It},[]),ft=qr.sort(function(It,Ht){return Ht.length-It.length})[0],Ft=void 0;if(ft&&ft.length>1){var xe=De.slice(0,ft.index),ht=De.slice(ft.index+ft.length);Ft=xe.join(":")+"::"+ht.join(":")}else Ft=De.join(":");return z&&(Ft+="%"+z),Ft}else return T}var Ct=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Ue="".match(/(){0}/)[1]===void 0;function he(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O={},D=w.iri!==!1?d:l;w.reference==="suffix"&&(T=(w.scheme?w.scheme+":":"")+"//"+T);var $=T.match(Ct);if($){Ue?(O.scheme=$[1],O.userinfo=$[3],O.host=$[4],O.port=parseInt($[5],10),O.path=$[6]||"",O.query=$[7],O.fragment=$[8],isNaN(O.port)&&(O.port=$[5])):(O.scheme=$[1]||void 0,O.userinfo=T.indexOf("@")!==-1?$[3]:void 0,O.host=T.indexOf("//")!==-1?$[4]:void 0,O.port=parseInt($[5],10),O.path=$[6]||"",O.query=T.indexOf("?")!==-1?$[7]:void 0,O.fragment=T.indexOf("#")!==-1?$[8]:void 0,isNaN(O.port)&&(O.port=T.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?$[4]:void 0)),O.host&&(O.host=we(Ie(O.host,D),D)),O.scheme===void 0&&O.userinfo===void 0&&O.host===void 0&&O.port===void 0&&!O.path&&O.query===void 0?O.reference="same-document":O.scheme===void 0?O.reference="relative":O.fragment===void 0?O.reference="absolute":O.reference="uri",w.reference&&w.reference!=="suffix"&&w.reference!==O.reference&&(O.error=O.error||"URI is not a "+w.reference+" reference.");var z=be[(w.scheme||O.scheme||"").toLowerCase()];if(!w.unicodeSupport&&(!z||!z.unicodeSupport)){if(O.host&&(w.domainHost||z&&z.domainHost))try{O.host=re.toASCII(O.host.replace(D.PCT_ENCODED,ke).toLowerCase())}catch(ee){O.error=O.error||"Host's domain name can not be converted to ASCII via punycode: "+ee}xt(O,l)}else xt(O,D);z&&z.parse&&z.parse(O,w)}else O.error=O.error||"URI can not be parsed.";return O}function hr(T,w){var O=w.iri!==!1?d:l,D=[];return T.userinfo!==void 0&&(D.push(T.userinfo),D.push("@")),T.host!==void 0&&D.push(we(Ie(String(T.host),O),O).replace(O.IPV6ADDRESS,function($,z,ee){return"["+z+(ee?"%25"+ee:"")+"]"})),(typeof T.port=="number"||typeof T.port=="string")&&(D.push(":"),D.push(String(T.port))),D.length?D.join(""):void 0}var Jt=/^\.\.?\//,$r=/^\/\.(\/|$)/,Mr=/^\/\.\.(\/|$)/,Je=/^\/?(?:.|\n)*?(?=\/|$)/;function Tt(T){for(var w=[];T.length;)if(T.match(Jt))T=T.replace(Jt,"");else if(T.match($r))T=T.replace($r,"/");else if(T.match(Mr))T=T.replace(Mr,"/"),w.pop();else if(T==="."||T==="..")T="";else{var O=T.match(Je);if(O){var D=O[0];T=T.slice(D.length),w.push(D)}else throw new Error("Unexpected dot segment condition")}return w.join("")}function nt(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=w.iri?d:l,D=[],$=be[(w.scheme||T.scheme||"").toLowerCase()];if($&&$.serialize&&$.serialize(T,w),T.host&&!O.IPV6ADDRESS.test(T.host)){if(w.domainHost||$&&$.domainHost)try{T.host=w.iri?re.toUnicode(T.host):re.toASCII(T.host.replace(O.PCT_ENCODED,ke).toLowerCase())}catch(ce){T.error=T.error||"Host's domain name can not be converted to "+(w.iri?"Unicode":"ASCII")+" via punycode: "+ce}}xt(T,O),w.reference!=="suffix"&&T.scheme&&(D.push(T.scheme),D.push(":"));var z=hr(T,w);if(z!==void 0&&(w.reference!=="suffix"&&D.push("//"),D.push(z),T.path&&T.path.charAt(0)!=="/"&&D.push("/")),T.path!==void 0){var ee=T.path;!w.absolutePath&&(!$||!$.absolutePath)&&(ee=Tt(ee)),z===void 0&&(ee=ee.replace(/^\/\//,"/%2F")),D.push(ee)}return T.query!==void 0&&(D.push("?"),D.push(T.query)),T.fragment!==void 0&&(D.push("#"),D.push(T.fragment)),D.join("")}function tt(T,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=arguments[3],$={};return D||(T=he(nt(T,O),O),w=he(nt(w,O),O)),O=O||{},!O.tolerant&&w.scheme?($.scheme=w.scheme,$.userinfo=w.userinfo,$.host=w.host,$.port=w.port,$.path=Tt(w.path||""),$.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?($.userinfo=w.userinfo,$.host=w.host,$.port=w.port,$.path=Tt(w.path||""),$.query=w.query):(w.path?(w.path.charAt(0)==="/"?$.path=Tt(w.path):((T.userinfo!==void 0||T.host!==void 0||T.port!==void 0)&&!T.path?$.path="/"+w.path:T.path?$.path=T.path.slice(0,T.path.lastIndexOf("/")+1)+w.path:$.path=w.path,$.path=Tt($.path)),$.query=w.query):($.path=T.path,w.query!==void 0?$.query=w.query:$.query=T.query),$.userinfo=T.userinfo,$.host=T.host,$.port=T.port),$.scheme=T.scheme),$.fragment=w.fragment,$}function zt(T,w,O){var D=s({scheme:"null"},O);return nt(tt(he(T,D),he(w,D),D,!0),D)}function pt(T,w){return typeof T=="string"?T=nt(he(T,w),w):a(T)==="object"&&(T=he(nt(T,w),w)),T}function da(T,w,O){return typeof T=="string"?T=nt(he(T,O),O):a(T)==="object"&&(T=nt(T,O)),typeof w=="string"?w=nt(he(w,O),O):a(w)==="object"&&(w=nt(w,O)),T===w}function On(T,w){return T&&T.toString().replace(!w||!w.iri?l.ESCAPE:d.ESCAPE,Fe)}function Nt(T,w){return T&&T.toString().replace(!w||!w.iri?l.PCT_ENCODED:d.PCT_ENCODED,ke)}var Bi={scheme:"http",domainHost:!0,parse:function(w,O){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w},serialize:function(w,O){var D=String(w.scheme).toLowerCase()==="https";return(w.port===(D?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w}},bo={scheme:"https",domainHost:Bi.domainHost,parse:Bi.parse,serialize:Bi.serialize};function vo(T){return typeof T.secure=="boolean"?T.secure:String(T.scheme).toLowerCase()==="wss"}var $i={scheme:"ws",domainHost:!0,parse:function(w,O){var D=w;return D.secure=vo(D),D.resourceName=(D.path||"/")+(D.query?"?"+D.query:""),D.path=void 0,D.query=void 0,D},serialize:function(w,O){if((w.port===(vo(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){var D=w.resourceName.split("?"),$=c(D,2),z=$[0],ee=$[1];w.path=z&&z!=="/"?z:void 0,w.query=ee,w.resourceName=void 0}return w.fragment=void 0,w}},So={scheme:"wss",domainHost:$i.domainHost,parse:$i.parse,serialize:$i.serialize},uf={},pf=!0,wo="[A-Za-z0-9\\-\\.\\_\\~"+(pf?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Ut="[0-9A-Fa-f]",ff=r(r("%[EFef]"+Ut+"%"+Ut+Ut+"%"+Ut+Ut)+"|"+r("%[89A-Fa-f]"+Ut+"%"+Ut+Ut)+"|"+r("%"+Ut+Ut)),hf="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",mf="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",yf=e(mf,'[\\"\\\\]'),gf="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",bf=new RegExp(wo,"g"),ri=new RegExp(ff,"g"),vf=new RegExp(e("[^]",hf,"[\\.]",'[\\"]',yf),"g"),xo=new RegExp(e("[^]",wo,gf),"g"),Sf=xo;function An(T){var w=ke(T);return w.match(bf)?w:T}var Co={scheme:"mailto",parse:function(w,O){var D=w,$=D.to=D.path?D.path.split(","):[];if(D.path=void 0,D.query){for(var z=!1,ee={},ce=D.query.split("&"),ye=0,We=ce.length;ye<We;++ye){var le=ce[ye].split("=");switch(le[0]){case"to":for(var Le=le[1].split(","),je=0,Pe=Le.length;je<Pe;++je)$.push(Le[je]);break;case"subject":D.subject=Nt(le[1],O);break;case"body":D.body=Nt(le[1],O);break;default:z=!0,ee[Nt(le[0],O)]=Nt(le[1],O);break}}z&&(D.headers=ee)}D.query=void 0;for(var pe=0,De=$.length;pe<De;++pe){var ve=$[pe].split("@");if(ve[0]=Nt(ve[0]),O.unicodeSupport)ve[1]=Nt(ve[1],O).toLowerCase();else try{ve[1]=re.toASCII(Nt(ve[1],O).toLowerCase())}catch(qr){D.error=D.error||"Email address's domain name can not be converted to ASCII via punycode: "+qr}$[pe]=ve.join("@")}return D},serialize:function(w,O){var D=w,$=n(w.to);if($){for(var z=0,ee=$.length;z<ee;++z){var ce=String($[z]),ye=ce.lastIndexOf("@"),We=ce.slice(0,ye).replace(ri,An).replace(ri,i).replace(vf,Fe),le=ce.slice(ye+1);try{le=O.iri?re.toUnicode(le):re.toASCII(Nt(le,O).toLowerCase())}catch(pe){D.error=D.error||"Email address's domain name can not be converted to "+(O.iri?"Unicode":"ASCII")+" via punycode: "+pe}$[z]=We+"@"+le}D.path=$.join(",")}var Le=w.headers=w.headers||{};w.subject&&(Le.subject=w.subject),w.body&&(Le.body=w.body);var je=[];for(var Pe in Le)Le[Pe]!==uf[Pe]&&je.push(Pe.replace(ri,An).replace(ri,i).replace(xo,Fe)+"="+Le[Pe].replace(ri,An).replace(ri,i).replace(Sf,Fe));return je.length&&(D.query=je.join("&")),D}},wf=/^([^\:]+)\:(.*)/,To={scheme:"urn",parse:function(w,O){var D=w.path&&w.path.match(wf),$=w;if(D){var z=O.scheme||$.scheme||"urn",ee=D[1].toLowerCase(),ce=D[2],ye=z+":"+(O.nid||ee),We=be[ye];$.nid=ee,$.nss=ce,$.path=void 0,We&&($=We.parse($,O))}else $.error=$.error||"URN can not be parsed.";return $},serialize:function(w,O){var D=O.scheme||w.scheme||"urn",$=w.nid,z=D+":"+(O.nid||$),ee=be[z];ee&&(w=ee.serialize(w,O));var ce=w,ye=w.nss;return ce.path=($||O.nid)+":"+ye,ce}},xf=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Fo={scheme:"urn:uuid",parse:function(w,O){var D=w;return D.uuid=D.nss,D.nss=void 0,!O.tolerant&&(!D.uuid||!D.uuid.match(xf))&&(D.error=D.error||"UUID is not valid."),D},serialize:function(w,O){var D=w;return D.nss=(w.uuid||"").toLowerCase(),D}};be[Bi.scheme]=Bi,be[bo.scheme]=bo,be[$i.scheme]=$i,be[So.scheme]=So,be[Co.scheme]=Co,be[To.scheme]=To,be[Fo.scheme]=Fo,t.SCHEMES=be,t.pctEncChar=Fe,t.pctDecChars=ke,t.parse=he,t.removeDotSegments=Tt,t.serialize=nt,t.resolveComponents=tt,t.resolve=zt,t.normalize=pt,t.equal=da,t.escapeComponent=On,t.unescapeComponent=Nt,Object.defineProperty(t,"__esModule",{value:!0})}))});var Va=Y((sC,qd)=>{"use strict";qd.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var a,i,n;if(Array.isArray(e)){if(a=e.length,a!=r.length)return!1;for(i=a;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(n=Object.keys(e),a=n.length,a!==Object.keys(r).length)return!1;for(i=a;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,n[i]))return!1;for(i=a;i--!==0;){var s=n[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var kd=Y((oC,Rd)=>{"use strict";Rd.exports=function(e){for(var r=0,a=e.length,i=0,n;i<a;)r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<a&&(n=e.charCodeAt(i),(n&64512)==56320&&i++);return r}});var Hr=Y((lC,Vd)=>{"use strict";Vd.exports={copy:yy,checkDataType:vs,checkDataTypes:gy,coerceToTypes:by,toHash:ws,getProperty:xs,escapeQuotes:Cs,equal:Va(),ucs2length:kd(),varOccurences:wy,varReplace:xy,schemaHasRules:Cy,schemaHasRulesExcept:Ty,schemaUnknownRules:Fy,toQuotedString:Ss,getPathExpr:Iy,getPath:Oy,getData:Ey,unescapeFragment:Ly,unescapeJsonPointer:Fs,escapeFragment:Dy,escapeJsonPointer:Ts};function yy(t,e){e=e||{};for(var r in t)e[r]=t[r];return e}function vs(t,e,r,a){var i=a?" !== ":" === ",n=a?" || ":" && ",s=a?"!":"",o=a?"":"!";switch(t){case"null":return e+i+"null";case"array":return s+"Array.isArray("+e+")";case"object":return"("+s+e+n+"typeof "+e+i+'"object"'+n+o+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+i+'"number"'+n+o+"("+e+" % 1)"+n+e+i+e+(r?n+s+"isFinite("+e+")":"")+")";case"number":return"(typeof "+e+i+'"'+t+'"'+(r?n+s+"isFinite("+e+")":"")+")";default:return"typeof "+e+i+'"'+t+'"'}}function gy(t,e,r){switch(t.length){case 1:return vs(t[0],e,r,!0);default:var a="",i=ws(t);i.array&&i.object&&(a=i.null?"(":"(!"+e+" || ",a+="typeof "+e+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer;for(var n in i)a+=(a?" && ":"")+vs(n,e,r,!0);return a}}var Wd=ws(["string","number","integer","boolean","null"]);function by(t,e){if(Array.isArray(e)){for(var r=[],a=0;a<e.length;a++){var i=e[a];(Wd[i]||t==="array"&&i==="array")&&(r[r.length]=i)}if(r.length)return r}else{if(Wd[e])return[e];if(t==="array"&&e==="array")return["array"]}}function ws(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!0;return e}var vy=/^[a-z$_][a-z$_0-9]*$/i,Sy=/'|\\/g;function xs(t){return typeof t=="number"?"["+t+"]":vy.test(t)?"."+t:"['"+Cs(t)+"']"}function Cs(t){return t.replace(Sy,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function wy(t,e){e+="[^0-9]";var r=t.match(new RegExp(e,"g"));return r?r.length:0}function xy(t,e,r){return e+="([^0-9])",r=r.replace(/\$/g,"$$$$"),t.replace(new RegExp(e,"g"),r+"$1")}function Cy(t,e){if(typeof t=="boolean")return!t;for(var r in t)if(e[r])return!0}function Ty(t,e,r){if(typeof t=="boolean")return!t&&r!="not";for(var a in t)if(a!=r&&e[a])return!0}function Fy(t,e){if(typeof t!="boolean"){for(var r in t)if(!e[r])return r}}function Ss(t){return"'"+Cs(t)+"'"}function Iy(t,e,r,a){var i=r?"'/' + "+e+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+e+" + ']'":"'[\\'' + "+e+" + '\\']'";return jd(t,i)}function Oy(t,e,r){var a=Ss(r?"/"+Ts(e):xs(e));return jd(t,a)}var Ay=/^\/(?:[^~]|~0|~1)*$/,Py=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ey(t,e,r){var a,i,n,s;if(t==="")return"rootData";if(t[0]=="/"){if(!Ay.test(t))throw new Error("Invalid JSON-pointer: "+t);i=t,n="rootData"}else{if(s=t.match(Py),!s)throw new Error("Invalid JSON-pointer: "+t);if(a=+s[1],i=s[2],i=="#"){if(a>=e)throw new Error("Cannot access property/index "+a+" levels up, current level is "+e);return r[e-a]}if(a>e)throw new Error("Cannot access data "+a+" levels up, current level is "+e);if(n="data"+(e-a||""),!i)return n}for(var o=n,l=i.split("/"),d=0;d<l.length;d++){var c=l[d];c&&(n+=xs(Fs(c)),o+=" && "+n)}return o}function jd(t,e){return t=='""'?e:(t+" + "+e).replace(/([^\\])' \+ '/g,"$1")}function Ly(t){return Fs(decodeURIComponent(t))}function Dy(t){return encodeURIComponent(Ts(t))}function Ts(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Fs(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}});var Is=Y((dC,_d)=>{"use strict";var Ny=Hr();_d.exports=By;function By(t){Ny.copy(t,this)}});var Ud=Y((cC,zd)=>{"use strict";var Cr=zd.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var a=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};_a(e,a,i,t,"",t)};Cr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};Cr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Cr.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Cr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function _a(t,e,r,a,i,n,s,o,l,d){if(a&&typeof a=="object"&&!Array.isArray(a)){e(a,i,n,s,o,l,d);for(var c in a){var u=a[c];if(Array.isArray(u)){if(c in Cr.arrayKeywords)for(var f=0;f<u.length;f++)_a(t,e,r,u[f],i+"/"+c+"/"+f,n,i,c,a,f)}else if(c in Cr.propsKeywords){if(u&&typeof u=="object")for(var p in u)_a(t,e,r,u[p],i+"/"+c+"/"+$y(p),n,i,c,a,p)}else(c in Cr.keywords||t.allKeys&&!(c in Cr.skipKeywords))&&_a(t,e,r,u,i+"/"+c,n,i,c,a)}r(a,i,n,s,o,l,d)}}function $y(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Za=Y((uC,Zd)=>{"use strict";var Xi=Md(),Hd=Va(),Ga=Hr(),za=Is(),My=Ud();Zd.exports=Fr;Fr.normalizeId=Tr;Fr.fullPath=Ua;Fr.url=Ha;Fr.ids=jy;Fr.inlineRef=Os;Fr.schema=Qa;function Fr(t,e,r){var a=this._refs[r];if(typeof a=="string")if(this._refs[a])a=this._refs[a];else return Fr.call(this,t,e,a);if(a=a||this._schemas[r],a instanceof za)return Os(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var i=Qa.call(this,e,r),n,s,o;return i&&(n=i.schema,e=i.root,o=i.baseId),n instanceof za?s=n.validate||t.call(this,n.schema,e,void 0,o):n!==void 0&&(s=Os(n,this._opts.inlineRefs)?n:t.call(this,n,e,void 0,o)),s}function Qa(t,e){var r=Xi.parse(e),a=Qd(r),i=Ua(this._getId(t.schema));if(Object.keys(t.schema).length===0||a!==i){var n=Tr(a),s=this._refs[n];if(typeof s=="string")return qy.call(this,t,s,r);if(s instanceof za)s.validate||this._compile(s),t=s;else if(s=this._schemas[n],s instanceof za){if(s.validate||this._compile(s),n==Tr(e))return{schema:s,root:t,baseId:i};t=s}else return;if(!t.schema)return;i=Ua(this._getId(t.schema))}return Gd.call(this,r,i,t.schema,t)}function qy(t,e,r){var a=Qa.call(this,t,e);if(a){var i=a.schema,n=a.baseId;t=a.root;var s=this._getId(i);return s&&(n=Ha(n,s)),Gd.call(this,r,n,i,t)}}var Ry=Ga.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Gd(t,e,r,a){if(t.fragment=t.fragment||"",t.fragment.slice(0,1)=="/"){for(var i=t.fragment.split("/"),n=1;n<i.length;n++){var s=i[n];if(s){if(s=Ga.unescapeFragment(s),r=r[s],r===void 0)break;var o;if(!Ry[s]&&(o=this._getId(r),o&&(e=Ha(e,o)),r.$ref)){var l=Ha(e,r.$ref),d=Qa.call(this,a,l);d&&(r=d.schema,a=d.root,e=d.baseId)}}}if(r!==void 0&&r!==a.schema)return{schema:r,root:a,baseId:e}}}var ky=Ga.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function Os(t,e){if(e===!1)return!1;if(e===void 0||e===!0)return As(t);if(e)return Ps(t)<=e}function As(t){var e;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(e=t[r],typeof e=="object"&&!As(e))return!1}else for(var a in t)if(a=="$ref"||(e=t[a],typeof e=="object"&&!As(e)))return!1;return!0}function Ps(t){var e=0,r;if(Array.isArray(t)){for(var a=0;a<t.length;a++)if(r=t[a],typeof r=="object"&&(e+=Ps(r)),e==1/0)return 1/0}else for(var i in t){if(i=="$ref")return 1/0;if(ky[i])e++;else if(r=t[i],typeof r=="object"&&(e+=Ps(r)+1),e==1/0)return 1/0}return e}function Ua(t,e){e!==!1&&(t=Tr(t));var r=Xi.parse(t);return Qd(r)}function Qd(t){return Xi.serialize(t).split("#")[0]+"#"}var Wy=/#\/?$/;function Tr(t){return t?t.replace(Wy,""):""}function Ha(t,e){return e=Tr(e),Xi.resolve(t,e)}function jy(t){var e=Tr(this._getId(t)),r={"":e},a={"":Ua(e,!1)},i={},n=this;return My(t,{allKeys:!0},function(s,o,l,d,c,u,f){if(o!==""){var p=n._getId(s),h=r[d],y=a[d]+"/"+c;if(f!==void 0&&(y+="/"+(typeof f=="number"?f:Ga.escapeFragment(f))),typeof p=="string"){p=h=Tr(h?Xi.resolve(h,p):p);var m=n._refs[p];if(typeof m=="string"&&(m=n._refs[m]),m&&m.schema){if(!Hd(s,m.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=Tr(y))if(p[0]=="#"){if(i[p]&&!Hd(s,i[p]))throw new Error('id "'+p+'" resolves to more than one schema');i[p]=s}else n._refs[p]=y}r[o]=h,a[o]=y}}),i}});var Ka=Y((pC,Jd)=>{"use strict";var Es=Za();Jd.exports={Validation:Kd(Vy),MissingRef:Kd(Ls)};function Vy(t){this.message="validation failed",this.errors=t,this.ajv=this.validation=!0}Ls.message=function(t,e){return"can't resolve reference "+e+" from id "+t};function Ls(t,e,r){this.message=r||Ls.message(t,e),this.missingRef=Es.url(t,e),this.missingSchema=Es.normalizeId(Es.fullPath(this.missingRef))}function Kd(t){return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}});var Ds=Y((fC,Yd)=>{"use strict";Yd.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,a=e.cmp&&(function(n){return function(s){return function(o,l){var d={key:o,value:s[o]},c={key:l,value:s[l]};return n(d,c)}}})(e.cmp),i=[];return(function n(s){if(s&&s.toJSON&&typeof s.toJSON=="function"&&(s=s.toJSON()),s!==void 0){if(typeof s=="number")return isFinite(s)?""+s:"null";if(typeof s!="object")return JSON.stringify(s);var o,l;if(Array.isArray(s)){for(l="[",o=0;o<s.length;o++)o&&(l+=","),l+=n(s[o])||"null";return l+"]"}if(s===null)return"null";if(i.indexOf(s)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var d=i.push(s)-1,c=Object.keys(s).sort(a&&a(s));for(l="",o=0;o<c.length;o++){var u=c[o],f=n(s[u]);f&&(l&&(l+=","),l+=JSON.stringify(u)+":"+f)}return i.splice(d,1),"{"+l+"}"}})(t)}});var Ns=Y((hC,Xd)=>{"use strict";Xd.exports=function(e,r,a){var i="",n=e.schema.$async===!0,s=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var l=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(l){var d="unknown keyword: "+l;if(e.opts.strictKeywords==="log")e.logger.warn(d);else throw new Error(d)}}if(e.isTop&&(i+=" var validate = ",n&&(e.async=!0,i+="async "),i+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(e.opts.sourceCode||e.opts.processCode)&&(i+=" "+("/*# sourceURL="+o+" */")+" ")),typeof e.schema=="boolean"||!(s||e.schema.$ref)){var r="false schema",c=e.level,u=e.dataLevel,f=e.schema[r],p=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,F=!e.opts.allErrors,P,y="data"+(u||""),C="valid"+c;if(e.schema===!1){e.isTop?F=!0:i+=" var "+C+" = false; ";var m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'boolean schema is false' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var b=i;i=m.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n?i+=" return data; ":i+=" validate.errors = null; return true; ":i+=" var "+C+" = true; ";return e.isTop&&(i+=" }; return validate; "),i}if(e.isTop){var v=e.isTop,c=e.level=0,u=e.dataLevel=0,y="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var S="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(S);else throw new Error(S)}i+=" var vErrors = null; ",i+=" var errors = 0; ",i+=" if (rootData === undefined) rootData = data; "}else{var c=e.level,u=e.dataLevel,y="data"+(u||"");if(o&&(e.baseId=e.resolve.url(e.baseId,o)),n&&!e.async)throw new Error("async schema in sync schema");i+=" var errs_"+c+" = errors;"}var C="valid"+c,F=!e.opts.allErrors,I="",M="",P,E=e.schema.type,N=Array.isArray(E);if(E&&e.opts.nullable&&e.schema.nullable===!0&&(N?E.indexOf("null")==-1&&(E=E.concat("null")):E!="null"&&(E=[E,"null"],N=!0)),N&&E.length==1&&(E=E[0],N=!1),e.schema.$ref&&s){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(s=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(i+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var R=e.util.coerceToTypes(e.opts.coerceTypes,E);var q=e.RULES.types[E];if(R||N||q===!0||q&&!Je(q)){var p=e.schemaPath+".type",h=e.errSchemaPath+"/type",p=e.schemaPath+".type",h=e.errSchemaPath+"/type",L=N?"checkDataTypes":"checkDataType";if(i+=" if ("+e.util[L](E,y,e.opts.strictNumbers,!0)+") { ",R){var k="dataType"+c,B="coerced"+c;i+=" var "+k+" = typeof "+y+"; var "+B+" = undefined; ",e.opts.coerceTypes=="array"&&(i+=" if ("+k+" == 'object' && Array.isArray("+y+") && "+y+".length == 1) { "+y+" = "+y+"[0]; "+k+" = typeof "+y+"; if ("+e.util.checkDataType(e.schema.type,y,e.opts.strictNumbers)+") "+B+" = "+y+"; } "),i+=" if ("+B+" !== undefined) ; ";var _=R;if(_)for(var G,V=-1,Z=_.length-1;V<Z;)G=_[V+=1],G=="string"?i+=" else if ("+k+" == 'number' || "+k+" == 'boolean') "+B+" = '' + "+y+"; else if ("+y+" === null) "+B+" = ''; ":G=="number"||G=="integer"?(i+=" else if ("+k+" == 'boolean' || "+y+" === null || ("+k+" == 'string' && "+y+" && "+y+" == +"+y+" ",G=="integer"&&(i+=" && !("+y+" % 1)"),i+=")) "+B+" = +"+y+"; "):G=="boolean"?i+=" else if ("+y+" === 'false' || "+y+" === 0 || "+y+" === null) "+B+" = false; else if ("+y+" === 'true' || "+y+" === 1) "+B+" = true; ":G=="null"?i+=" else if ("+y+" === '' || "+y+" === 0 || "+y+" === false) "+B+" = null; ":e.opts.coerceTypes=="array"&&G=="array"&&(i+=" else if ("+k+" == 'string' || "+k+" == 'number' || "+k+" == 'boolean' || "+y+" == null) "+B+" = ["+y+"]; ");i+=" else { ";var m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",N?i+=""+E.join(","):i+=""+E,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",N?i+=""+E.join(","):i+=""+E,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var b=i;i=m.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } if ("+B+" !== undefined) { ";var U=u?"data"+(u-1||""):"parentData",oe=u?e.dataPathArr[u]:"parentDataProperty";i+=" "+y+" = "+B+"; ",u||(i+="if ("+U+" !== undefined)"),i+=" "+U+"["+oe+"] = "+B+"; } "}else{var m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",N?i+=""+E.join(","):i+=""+E,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",N?i+=""+E.join(","):i+=""+E,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var b=i;i=m.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" } "}}if(e.schema.$ref&&!s)i+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",F&&(i+=" } if (errors === ",v?i+="0":i+="errs_"+c,i+=") { ",M+="}");else{var Te=e.RULES;if(Te){for(var q,Re=-1,re=Te.length-1;Re<re;)if(q=Te[Re+=1],Je(q)){if(q.type&&(i+=" if ("+e.util.checkDataType(q.type,y,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(q.type=="object"&&e.schema.properties){var f=e.schema.properties,be=Object.keys(f),Fe=be;if(Fe)for(var ke,xt=-1,at=Fe.length-1;xt<at;){ke=Fe[xt+=1];var Ie=f[ke];if(Ie.default!==void 0){var we=y+e.util.getProperty(ke);if(e.compositeRule){if(e.opts.strictDefaults){var S="default is ignored for: "+we;if(e.opts.strictDefaults==="log")e.logger.warn(S);else throw new Error(S)}}else i+=" if ("+we+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+we+" === null || "+we+" === '' "),i+=" ) "+we+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(Ie.default)+" ":i+=" "+JSON.stringify(Ie.default)+" ",i+="; "}}}else if(q.type=="array"&&Array.isArray(e.schema.items)){var Ct=e.schema.items;if(Ct){for(var Ie,V=-1,Ue=Ct.length-1;V<Ue;)if(Ie=Ct[V+=1],Ie.default!==void 0){var we=y+"["+V+"]";if(e.compositeRule){if(e.opts.strictDefaults){var S="default is ignored for: "+we;if(e.opts.strictDefaults==="log")e.logger.warn(S);else throw new Error(S)}}else i+=" if ("+we+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+we+" === null || "+we+" === '' "),i+=" ) "+we+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(Ie.default)+" ":i+=" "+JSON.stringify(Ie.default)+" ",i+="; "}}}}var he=q.rules;if(he){for(var hr,Jt=-1,$r=he.length-1;Jt<$r;)if(hr=he[Jt+=1],Tt(hr)){var Mr=hr.code(e,hr.keyword,q.type);Mr&&(i+=" "+Mr+" ",F&&(I+="}"))}}if(F&&(i+=" "+I+" ",I=""),q.type&&(i+=" } ",E&&E===q.type&&!R)){i+=" else { ";var p=e.schemaPath+".type",h=e.errSchemaPath+"/type",m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(P||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",N?i+=""+E.join(","):i+=""+E,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",N?i+=""+E.join(","):i+=""+E,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var b=i;i=m.pop(),!e.compositeRule&&F?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}F&&(i+=" if (errors === ",v?i+="0":i+="errs_"+c,i+=") { ",M+="}")}}}F&&(i+=" "+M+" "),v?(n?(i+=" if (errors === 0) return data; ",i+=" else throw new ValidationError(vErrors); "):(i+=" validate.errors = vErrors; ",i+=" return errors === 0; "),i+=" }; return validate;"):i+=" var "+C+" = errors === errs_"+c+";";function Je(tt){for(var zt=tt.rules,pt=0;pt<zt.length;pt++)if(Tt(zt[pt]))return!0}function Tt(tt){return e.schema[tt.keyword]!==void 0||tt.implements&&nt(tt)}function nt(tt){for(var zt=tt.implements,pt=0;pt<zt.length;pt++)if(e.schema[zt[pt]]!==void 0)return!0}return i}});var ac=Y((mC,ic)=>{"use strict";var Ja=Za(),Xa=Hr(),tc=Ka(),_y=Ds(),ec=Ns(),zy=Xa.ucs2length,Uy=Va(),Hy=tc.Validation;ic.exports=Bs;function Bs(t,e,r,a){var i=this,n=this._opts,s=[void 0],o={},l=[],d={},c=[],u={},f=[];e=e||{schema:t,refVal:s,refs:o};var p=Gy.call(this,t,e,a),h=this._compilations[p.index];if(p.compiling)return h.callValidate=S;var y=this._formats,m=this.RULES;try{var b=C(t,e,r,a);h.validate=b;var v=h.callValidate;return v&&(v.schema=b.schema,v.errors=null,v.refs=b.refs,v.refVal=b.refVal,v.root=b.root,v.$async=b.$async,n.sourceCode&&(v.source=b.source)),b}finally{Qy.call(this,t,e,a)}function S(){var L=h.validate,k=L.apply(this,arguments);return S.errors=L.errors,k}function C(L,k,B,_){var G=!k||k&&k.schema==L;if(k.schema!=e.schema)return Bs.call(i,L,k,B,_);var V=L.$async===!0,Z=ec({isTop:!0,schema:L,isRoot:G,baseId:_,root:k,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:tc.MissingRef,RULES:m,validate:ec,util:Xa,resolve:Ja,resolveRef:F,usePattern:N,useDefault:R,useCustomRule:q,opts:n,formats:y,logger:i.logger,self:i});Z=Ya(s,Jy)+Ya(l,Zy)+Ya(c,Ky)+Ya(f,Yy)+Z,n.processCode&&(Z=n.processCode(Z,L));var U;try{var oe=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",Z);U=oe(i,m,y,e,s,c,f,Uy,zy,Hy),s[0]=U}catch(Te){throw i.logger.error("Error compiling schema, function code:",Z),Te}return U.schema=L,U.errors=null,U.refs=o,U.refVal=s,U.root=G?U:k,V&&(U.$async=!0),n.sourceCode===!0&&(U.source={code:Z,patterns:l,defaults:c}),U}function F(L,k,B){k=Ja.url(L,k);var _=o[k],G,V;if(_!==void 0)return G=s[_],V="refVal["+_+"]",E(G,V);if(!B&&e.refs){var Z=e.refs[k];if(Z!==void 0)return G=e.refVal[Z],V=I(k,G),E(G,V)}V=I(k);var U=Ja.call(i,C,e,k);if(U===void 0){var oe=r&&r[k];oe&&(U=Ja.inlineRef(oe,n.inlineRefs)?oe:Bs.call(i,oe,e,r,L))}if(U===void 0)M(k);else return P(k,U),E(U,V)}function I(L,k){var B=s.length;return s[B]=k,o[L]=B,"refVal"+B}function M(L){delete o[L]}function P(L,k){var B=o[L];s[B]=k}function E(L,k){return typeof L=="object"||typeof L=="boolean"?{code:k,schema:L,inline:!0}:{code:k,$async:L&&!!L.$async}}function N(L){var k=d[L];return k===void 0&&(k=d[L]=l.length,l[k]=L),"pattern"+k}function R(L){switch(typeof L){case"boolean":case"number":return""+L;case"string":return Xa.toQuotedString(L);case"object":if(L===null)return"null";var k=_y(L),B=u[k];return B===void 0&&(B=u[k]=c.length,c[B]=L),"default"+B}}function q(L,k,B,_){if(i._opts.validateSchema!==!1){var G=L.definition.dependencies;if(G&&!G.every(function(Fe){return Object.prototype.hasOwnProperty.call(B,Fe)}))throw new Error("parent schema must have all required keywords: "+G.join(","));var V=L.definition.validateSchema;if(V){var Z=V(k);if(!Z){var U="keyword schema is invalid: "+i.errorsText(V.errors);if(i._opts.validateSchema=="log")i.logger.error(U);else throw new Error(U)}}}var oe=L.definition.compile,Te=L.definition.inline,Re=L.definition.macro,re;if(oe)re=oe.call(i,k,B,_);else if(Re)re=Re.call(i,k,B,_),n.validateSchema!==!1&&i.validateSchema(re,!0);else if(Te)re=Te.call(i,_,L.keyword,k,B);else if(re=L.definition.validate,!re)return;if(re===void 0)throw new Error('custom keyword "'+L.keyword+'"failed to compile');var be=f.length;return f[be]=re,{code:"customRule"+be,validate:re}}}function Gy(t,e,r){var a=rc.call(this,t,e,r);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:t,root:e,baseId:r},{index:a,compiling:!1})}function Qy(t,e,r){var a=rc.call(this,t,e,r);a>=0&&this._compilations.splice(a,1)}function rc(t,e,r){for(var a=0;a<this._compilations.length;a++){var i=this._compilations[a];if(i.schema==t&&i.root==e&&i.baseId==r)return a}return-1}function Zy(t,e){return"var pattern"+t+" = new RegExp("+Xa.toQuotedString(e[t])+");"}function Ky(t){return"var default"+t+" = defaults["+t+"];"}function Jy(t,e){return e[t]===void 0?"":"var refVal"+t+" = refVal["+t+"];"}function Yy(t){return"var customRule"+t+" = customRules["+t+"];"}function Ya(t,e){if(!t.length)return"";for(var r="",a=0;a<t.length;a++)r+=e(a,t);return r}});var sc=Y((yC,nc)=>{"use strict";var en=nc.exports=function(){this._cache={}};en.prototype.put=function(e,r){this._cache[e]=r};en.prototype.get=function(e){return this._cache[e]};en.prototype.del=function(e){delete this._cache[e]};en.prototype.clear=function(){this._cache={}}});var bc=Y((gC,gc)=>{"use strict";var Xy=Hr(),eg=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,tg=[0,31,28,31,30,31,30,31,31,30,31,30,31],rg=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,oc=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ig=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,ag=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,lc=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,dc=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,cc=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,uc=/^(?:\/(?:[^~/]|~0|~1)*)*$/,pc=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,fc=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;gc.exports=tn;function tn(t){return t=t=="full"?"full":"fast",Xy.copy(tn[t])}tn.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":lc,url:dc,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:oc,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:yc,uuid:cc,"json-pointer":uc,"json-pointer-uri-fragment":pc,"relative-json-pointer":fc};tn.full={date:hc,time:mc,"date-time":og,uri:dg,"uri-reference":ag,"uri-template":lc,url:dc,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:oc,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:yc,uuid:cc,"json-pointer":uc,"json-pointer-uri-fragment":pc,"relative-json-pointer":fc};function ng(t){return t%4===0&&(t%100!==0||t%400===0)}function hc(t){var e=t.match(eg);if(!e)return!1;var r=+e[1],a=+e[2],i=+e[3];return a>=1&&a<=12&&i>=1&&i<=(a==2&&ng(r)?29:tg[a])}function mc(t,e){var r=t.match(rg);if(!r)return!1;var a=r[1],i=r[2],n=r[3],s=r[5];return(a<=23&&i<=59&&n<=59||a==23&&i==59&&n==60)&&(!e||s)}var sg=/t|\s/i;function og(t){var e=t.split(sg);return e.length==2&&hc(e[0])&&mc(e[1],!0)}var lg=/\/|:/;function dg(t){return lg.test(t)&&ig.test(t)}var cg=/[^\\]\\Z/;function yc(t){if(cg.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Sc=Y((bC,vc)=>{"use strict";vc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,c="data"+(s||""),u="valid"+n,f,p;if(o=="#"||o=="#/")e.isRoot?(f=e.async,p="validate"):(f=e.root.schema.$async===!0,p="root.refVal[0]");else{var h=e.resolveRef(e.baseId,o,e.isRoot);if(h===void 0){var y=e.MissingRefError.message(e.baseId,o);if(e.opts.missingRefs=="fail"){e.logger.error(y);var m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(o)+"' } ",e.opts.messages!==!1&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(o)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(o)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var b=i;i=m.pop(),!e.compositeRule&&d?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d&&(i+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(y),d&&(i+=" if (true) { ");else throw new e.MissingRefError(e.baseId,o,y)}else if(h.inline){var v=e.util.copy(e);v.level++;var S="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=o;var C=e.validate(v).replace(/validate\.schema/g,h.code);i+=" "+C+" ",d&&(i+=" if ("+S+") { ")}else f=h.$async===!0||e.async&&h.$async!==!1,p=h.code}if(p){var m=m||[];m.push(i),i="",e.opts.passContext?i+=" "+p+".call(this, ":i+=" "+p+"( ",i+=" "+c+", (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var F=s?"data"+(s-1||""):"parentData",I=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+F+" , "+I+", rootData) ";var M=i;if(i=m.pop(),f){if(!e.async)throw new Error("async schema referenced by sync schema");d&&(i+=" var "+u+"; "),i+=" try { await "+M+"; ",d&&(i+=" "+u+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",d&&(i+=" "+u+" = false; "),i+=" } ",d&&(i+=" if ("+u+") { ")}else i+=" if (!"+M+") { if (vErrors === null) vErrors = "+p+".errors; else vErrors = vErrors.concat("+p+".errors); errors = vErrors.length; } ",d&&(i+=" else { ")}return i}});var xc=Y((vC,wc)=>{"use strict";wc.exports=function(e,r,a){var i=" ",n=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,d=e.util.copy(e),c="";d.level++;var u="valid"+d.level,f=d.baseId,p=!0,h=n;if(h)for(var y,m=-1,b=h.length-1;m<b;)y=h[m+=1],(e.opts.strictKeywords?typeof y=="object"&&Object.keys(y).length>0||y===!1:e.util.schemaHasRules(y,e.RULES.all))&&(p=!1,d.schema=y,d.schemaPath=s+"["+m+"]",d.errSchemaPath=o+"/"+m,i+=" "+e.validate(d)+" ",d.baseId=f,l&&(i+=" if ("+u+") { ",c+="}"));return l&&(p?i+=" if (true) { ":i+=" "+c.slice(0,-1)+" "),i}});var Tc=Y((SC,Cc)=>{"use strict";Cc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),y="";h.level++;var m="valid"+h.level,b=o.every(function(P){return e.opts.strictKeywords?typeof P=="object"&&Object.keys(P).length>0||P===!1:e.util.schemaHasRules(P,e.RULES.all)});if(b){var v=h.baseId;i+=" var "+p+" = errors; var "+f+" = false; ";var S=e.compositeRule;e.compositeRule=h.compositeRule=!0;var C=o;if(C)for(var F,I=-1,M=C.length-1;I<M;)F=C[I+=1],h.schema=F,h.schemaPath=l+"["+I+"]",h.errSchemaPath=d+"/"+I,i+=" "+e.validate(h)+" ",h.baseId=v,i+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ",y+="}";e.compositeRule=h.compositeRule=S,i+=" "+y+" if (!"+f+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else c&&(i+=" if (true) { ");return i}});var Ic=Y((wC,Fc)=>{"use strict";Fc.exports=function(e,r,a){var i=" ",n=e.schema[r],s=e.errSchemaPath+"/"+r,o=!e.opts.allErrors,l=e.util.toQuotedString(n);return e.opts.$comment===!0?i+=" console.log("+l+");":typeof e.opts.$comment=="function"&&(i+=" self._opts.$comment("+l+", "+e.util.toQuotedString(s)+", validate.root.schema);"),i}});var Ac=Y((xC,Oc)=>{"use strict";Oc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o,p||(i+=" var schema"+n+" = validate.schema"+l+";"),i+="var "+f+" = equal("+u+", schema"+n+"); if (!"+f+") { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { allowedValue: schema"+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var m=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Ec=Y((CC,Pc)=>{"use strict";Pc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),y="";h.level++;var m="valid"+h.level,b="i"+n,v=h.dataLevel=e.dataLevel+1,S="data"+v,C=e.baseId,F=e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all);if(i+="var "+p+" = errors;var "+f+";",F){var I=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=o,h.schemaPath=l,h.errSchemaPath=d,i+=" var "+m+" = false; for (var "+b+" = 0; "+b+" < "+u+".length; "+b+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);var M=u+"["+b+"]";h.dataPathArr[v]=b;var P=e.validate(h);h.baseId=C,e.util.varOccurences(P,S)<2?i+=" "+e.util.varReplace(P,S,M)+" ":i+=" var "+S+" = "+M+"; "+P+" ",i+=" if ("+m+") break; } ",e.compositeRule=h.compositeRule=I,i+=" "+y+" if (!"+m+") {"}else i+=" if ("+u+".length == 0) {";var E=E||[];E.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var N=i;return i=E.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+N+"]); ":i+=" validate.errors = ["+N+"]; return false; ":i+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",F&&(i+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i}});var Dc=Y((TC,Lc)=>{"use strict";Lc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e),h="";p.level++;var y="valid"+p.level,m={},b={},v=e.opts.ownProperties;for(I in o)if(I!="__proto__"){var S=o[I],C=Array.isArray(S)?b:m;C[I]=S}i+="var "+f+" = errors;";var F=e.errorPath;i+="var missing"+n+";";for(var I in b)if(C=b[I],C.length){if(i+=" if ( "+u+e.util.getProperty(I)+" !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),c){i+=" && ( ";var M=C;if(M)for(var P,E=-1,N=M.length-1;E<N;){P=M[E+=1],E&&(i+=" || ");var R=e.util.getProperty(P),q=u+R;i+=" ( ( "+q+" === undefined ",v&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),i+=") && (missing"+n+" = "+e.util.toQuotedString(e.opts.jsonPointers?P:R)+") ) "}i+=")) { ";var L="missing"+n,k="' + "+L+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(F,L,!0):F+" + "+L);var B=B||[];B.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { property: '"+e.util.escapeQuotes(I)+"', missingProperty: '"+k+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",C.length==1?i+="property "+e.util.escapeQuotes(C[0]):i+="properties "+e.util.escapeQuotes(C.join(", ")),i+=" when property "+e.util.escapeQuotes(I)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var _=i;i=B.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{i+=" ) { ";var G=C;if(G)for(var P,V=-1,Z=G.length-1;V<Z;){P=G[V+=1];var R=e.util.getProperty(P),k=e.util.escapeQuotes(P),q=u+R;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(F,P,e.opts.jsonPointers)),i+=" if ( "+q+" === undefined ",v&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { property: '"+e.util.escapeQuotes(I)+"', missingProperty: '"+k+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",C.length==1?i+="property "+e.util.escapeQuotes(C[0]):i+="properties "+e.util.escapeQuotes(C.join(", ")),i+=" when property "+e.util.escapeQuotes(I)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}i+=" } ",c&&(h+="}",i+=" else { ")}e.errorPath=F;var U=p.baseId;for(var I in m){var S=m[I];(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===!1:e.util.schemaHasRules(S,e.RULES.all))&&(i+=" "+y+" = true; if ( "+u+e.util.getProperty(I)+" !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(I)+"') "),i+=") { ",p.schema=S,p.schemaPath=l+e.util.getProperty(I),p.errSchemaPath=d+"/"+e.util.escapeFragment(I),i+=" "+e.validate(p)+" ",p.baseId=U,i+=" } ",c&&(i+=" if ("+y+") { ",h+="}"))}return c&&(i+=" "+h+" if ("+f+" == errors) {"),i}});var Bc=Y((FC,Nc)=>{"use strict";Nc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o;var y="i"+n,m="schema"+n;p||(i+=" var "+m+" = validate.schema"+l+";"),i+="var "+f+";",p&&(i+=" if (schema"+n+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+n+")) "+f+" = false; else {"),i+=""+f+" = false;for (var "+y+"=0; "+y+"<"+m+".length; "+y+"++) if (equal("+u+", "+m+"["+y+"])) { "+f+" = true; break; }",p&&(i+=" } "),i+=" if (!"+f+") { ";var b=b||[];b.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { allowedValues: schema"+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var v=i;return i=b.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}});var Mc=Y((IC,$c)=>{"use strict";$c.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||"");if(e.opts.format===!1)return c&&(i+=" if (true) { "),i;var f=e.opts.$data&&o&&o.$data,p;f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o;var h=e.opts.unknownFormats,y=Array.isArray(h);if(f){var m="format"+n,b="isObject"+n,v="formatType"+n;i+=" var "+m+" = formats["+p+"]; var "+b+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+v+" = "+b+" && "+m+".type || 'string'; if ("+b+") { ",e.async&&(i+=" var async"+n+" = "+m+".async; "),i+=" "+m+" = "+m+".validate; } if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),i+=" (",h!="ignore"&&(i+=" ("+p+" && !"+m+" ",y&&(i+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),i+=") || "),i+=" ("+m+" && "+v+" == '"+a+"' && !(typeof "+m+" == 'function' ? ",e.async?i+=" (async"+n+" ? await "+m+"("+u+") : "+m+"("+u+")) ":i+=" "+m+"("+u+") ",i+=" : "+m+".test("+u+"))))) {"}else{var m=e.formats[o];if(!m){if(h=="ignore")return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(i+=" if (true) { "),i;if(y&&h.indexOf(o)>=0)return c&&(i+=" if (true) { "),i;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var b=typeof m=="object"&&!(m instanceof RegExp)&&m.validate,v=b&&m.type||"string";if(b){var S=m.async===!0;m=m.validate}if(v!=a)return c&&(i+=" if (true) { "),i;if(S){if(!e.async)throw new Error("async format in sync schema");var C="formats"+e.util.getProperty(o)+".validate";i+=" if (!(await "+C+"("+u+"))) { "}else{i+=" if (! ";var C="formats"+e.util.getProperty(o);b&&(C+=".validate"),typeof m=="function"?i+=" "+C+"("+u+") ":i+=" "+C+".test("+u+") ",i+=") { "}}var F=F||[];F.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { format: ",f?i+=""+p:i+=""+e.util.toQuotedString(o),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match format "`,f?i+="' + "+p+" + '":i+=""+e.util.escapeQuotes(o),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var I=i;return i=F.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+I+"]); ":i+=" validate.errors = ["+I+"]; return false; ":i+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var Rc=Y((OC,qc)=>{"use strict";qc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e);h.level++;var y="valid"+h.level,m=e.schema.then,b=e.schema.else,v=m!==void 0&&(e.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===!1:e.util.schemaHasRules(m,e.RULES.all)),S=b!==void 0&&(e.opts.strictKeywords?typeof b=="object"&&Object.keys(b).length>0||b===!1:e.util.schemaHasRules(b,e.RULES.all)),C=h.baseId;if(v||S){var F;h.createErrors=!1,h.schema=o,h.schemaPath=l,h.errSchemaPath=d,i+=" var "+p+" = errors; var "+f+" = true; ";var I=e.compositeRule;e.compositeRule=h.compositeRule=!0,i+=" "+e.validate(h)+" ",h.baseId=C,h.createErrors=!0,i+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.compositeRule=h.compositeRule=I,v?(i+=" if ("+y+") { ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",i+=" "+e.validate(h)+" ",h.baseId=C,i+=" "+f+" = "+y+"; ",v&&S?(F="ifClause"+n,i+=" var "+F+" = 'then'; "):F="'then'",i+=" } ",S&&(i+=" else { ")):i+=" if (!"+y+") { ",S&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",i+=" "+e.validate(h)+" ",h.baseId=C,i+=" "+f+" = "+y+"; ",v&&S?(F="ifClause"+n,i+=" var "+F+" = 'else'; "):F="'else'",i+=" } "),i+=" if (!"+f+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { failingKeyword: "+F+" } ",e.opts.messages!==!1&&(i+=` , message: 'should match "' + `+F+` + '" schema' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var Wc=Y((AC,kc)=>{"use strict";kc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),y="";h.level++;var m="valid"+h.level,b="i"+n,v=h.dataLevel=e.dataLevel+1,S="data"+v,C=e.baseId;if(i+="var "+p+" = errors;var "+f+";",Array.isArray(o)){var F=e.schema.additionalItems;if(F===!1){i+=" "+f+" = "+u+".length <= "+o.length+"; ";var I=d;d=e.errSchemaPath+"/additionalItems",i+=" if (!"+f+") { ";var M=M||[];M.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+o.length+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var P=i;i=M.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+P+"]); ":i+=" validate.errors = ["+P+"]; return false; ":i+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d=I,c&&(y+="}",i+=" else { ")}var E=o;if(E){for(var N,R=-1,q=E.length-1;R<q;)if(N=E[R+=1],e.opts.strictKeywords?typeof N=="object"&&Object.keys(N).length>0||N===!1:e.util.schemaHasRules(N,e.RULES.all)){i+=" "+m+" = true; if ("+u+".length > "+R+") { ";var L=u+"["+R+"]";h.schema=N,h.schemaPath=l+"["+R+"]",h.errSchemaPath=d+"/"+R,h.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers,!0),h.dataPathArr[v]=R;var k=e.validate(h);h.baseId=C,e.util.varOccurences(k,S)<2?i+=" "+e.util.varReplace(k,S,L)+" ":i+=" var "+S+" = "+L+"; "+k+" ",i+=" } ",c&&(i+=" if ("+m+") { ",y+="}")}}if(typeof F=="object"&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))){h.schema=F,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+m+" = true; if ("+u+".length > "+o.length+") { for (var "+b+" = "+o.length+"; "+b+" < "+u+".length; "+b+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);var L=u+"["+b+"]";h.dataPathArr[v]=b;var k=e.validate(h);h.baseId=C,e.util.varOccurences(k,S)<2?i+=" "+e.util.varReplace(k,S,L)+" ":i+=" var "+S+" = "+L+"; "+k+" ",c&&(i+=" if (!"+m+") break; "),i+=" } } ",c&&(i+=" if ("+m+") { ",y+="}")}}else if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=l,h.errSchemaPath=d,i+=" for (var "+b+" = 0; "+b+" < "+u+".length; "+b+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);var L=u+"["+b+"]";h.dataPathArr[v]=b;var k=e.validate(h);h.baseId=C,e.util.varOccurences(k,S)<2?i+=" "+e.util.varReplace(k,S,L)+" ":i+=" var "+S+" = "+L+"; "+k+" ",c&&(i+=" if (!"+m+") break; "),i+=" }"}return c&&(i+=" "+y+" if ("+p+" == errors) {"),i}});var $s=Y((PC,jc)=>{"use strict";jc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,C,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o;var h=r=="maximum",y=h?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[y],b=e.opts.$data&&m&&m.$data,v=h?"<":">",S=h?">":"<",C=void 0;if(!(f||typeof o=="number"||o===void 0))throw new Error(r+" must be number");if(!(b||m===void 0||typeof m=="number"||typeof m=="boolean"))throw new Error(y+" must be number or boolean");if(b){var F=e.util.getData(m.$data,s,e.dataPathArr),I="exclusive"+n,M="exclType"+n,P="exclIsNumber"+n,E="op"+n,N="' + "+E+" + '";i+=" var schemaExcl"+n+" = "+F+"; ",F="schemaExcl"+n,i+=" var "+I+"; var "+M+" = typeof "+F+"; if ("+M+" != 'boolean' && "+M+" != 'undefined' && "+M+" != 'number') { ";var C=y,R=R||[];R.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(C||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: '"+y+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var q=i;i=R.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" "+M+" == 'number' ? ( ("+I+" = "+p+" === undefined || "+F+" "+v+"= "+p+") ? "+u+" "+S+"= "+F+" : "+u+" "+S+" "+p+" ) : ( ("+I+" = "+F+" === true) ? "+u+" "+S+"= "+p+" : "+u+" "+S+" "+p+" ) || "+u+" !== "+u+") { var op"+n+" = "+I+" ? '"+v+"' : '"+v+"='; ",o===void 0&&(C=y,d=e.errSchemaPath+"/"+y,p=F,f=b)}else{var P=typeof m=="number",N=v;if(P&&f){var E="'"+N+"'";i+=" if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" ( "+p+" === undefined || "+m+" "+v+"= "+p+" ? "+u+" "+S+"= "+m+" : "+u+" "+S+" "+p+" ) || "+u+" !== "+u+") { "}else{P&&o===void 0?(I=!0,C=y,d=e.errSchemaPath+"/"+y,p=m,S+="="):(P&&(p=Math[h?"min":"max"](m,o)),m===(P?p:!0)?(I=!0,C=y,d=e.errSchemaPath+"/"+y,S+="="):(I=!1,N+="="));var E="'"+N+"'";i+=" if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" "+u+" "+S+" "+p+" || "+u+" !== "+u+") { "}}C=C||r;var R=R||[];R.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(C||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { comparison: "+E+", limit: "+p+", exclusive: "+I+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be "+N+" ",f?i+="' + "+p:i+=""+p+"'"),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var q=i;return i=R.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}});var Ms=Y((EC,Vc)=>{"use strict";Vc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,y,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");var h=r=="maxItems"?">":"<";i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" "+u+".length "+h+" "+p+") { ";var y=r,m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",r=="maxItems"?i+="more":i+="fewer",i+=" than ",f?i+="' + "+p+" + '":i+=""+o,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var b=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var qs=Y((LC,_c)=>{"use strict";_c.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,y,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");var h=r=="maxLength"?">":"<";i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),e.opts.unicode===!1?i+=" "+u+".length ":i+=" ucs2length("+u+") ",i+=" "+h+" "+p+") { ";var y=r,m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be ",r=="maxLength"?i+="longer":i+="shorter",i+=" than ",f?i+="' + "+p+" + '":i+=""+o,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var b=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Rs=Y((DC,zc)=>{"use strict";zc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,y,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");var h=r=="maxProperties"?">":"<";i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "),i+=" Object.keys("+u+").length "+h+" "+p+") { ";var y=r,m=m||[];m.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(y||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { limit: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",r=="maxProperties"?i+="more":i+="fewer",i+=" than ",f?i+="' + "+p+" + '":i+=""+o,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var b=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Hc=Y((NC,Uc)=>{"use strict";Uc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;if(f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o,!(f||typeof o=="number"))throw new Error(r+" must be number");i+="var division"+n+";if (",f&&(i+=" "+p+" !== undefined && ( typeof "+p+" != 'number' || "),i+=" (division"+n+" = "+u+" / "+p+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+n+") - division"+n+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+n+" !== parseInt(division"+n+") ",i+=" ) ",f&&(i+=" ) "),i+=" ) { ";var h=h||[];h.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { multipleOf: "+p+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be multiple of ",f?i+="' + "+p:i+=""+p+"'"),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var y=i;return i=h.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var Qc=Y((BC,Gc)=>{"use strict";Gc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o,p.schemaPath=l,p.errSchemaPath=d,i+=" var "+f+" = errors; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1;var m;p.opts.allErrors&&(m=p.opts.allErrors,p.opts.allErrors=!1),i+=" "+e.validate(p)+" ",p.createErrors=!0,m&&(p.opts.allErrors=m),e.compositeRule=p.compositeRule=y,i+=" if ("+h+") { ";var b=b||[];b.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var v=i;i=b.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ");return i}});var Kc=Y(($C,Zc)=>{"use strict";Zc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p="errs__"+n,h=e.util.copy(e),y="";h.level++;var m="valid"+h.level,b=h.baseId,v="prevValid"+n,S="passingSchemas"+n;i+="var "+p+" = errors , "+v+" = false , "+f+" = false , "+S+" = null; ";var C=e.compositeRule;e.compositeRule=h.compositeRule=!0;var F=o;if(F)for(var I,M=-1,P=F.length-1;M<P;)I=F[M+=1],(e.opts.strictKeywords?typeof I=="object"&&Object.keys(I).length>0||I===!1:e.util.schemaHasRules(I,e.RULES.all))?(h.schema=I,h.schemaPath=l+"["+M+"]",h.errSchemaPath=d+"/"+M,i+=" "+e.validate(h)+" ",h.baseId=b):i+=" var "+m+" = true; ",M&&(i+=" if ("+m+" && "+v+") { "+f+" = false; "+S+" = ["+S+", "+M+"]; } else { ",y+="}"),i+=" if ("+m+") { "+f+" = "+v+" = true; "+S+" = "+M+"; }";return e.compositeRule=h.compositeRule=C,i+=""+y+"if (!"+f+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { passingSchemas: "+S+" } ",e.opts.messages!==!1&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i}});var Yc=Y((MC,Jc)=>{"use strict";Jc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f=e.opts.$data&&o&&o.$data,p;f?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",p="schema"+n):p=o;var h=f?"(new RegExp("+p+"))":e.usePattern(o);i+="if ( ",f&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),i+=" !"+h+".test("+u+") ) { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { pattern: ",f?i+=""+p:i+=""+e.util.toQuotedString(o),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match pattern "`,f?i+="' + "+p+" + '":i+=""+e.util.escapeQuotes(o),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",f?i+="validate.schema"+l:i+=""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var m=i;return i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}});var eu=Y((qC,Xc)=>{"use strict";Xc.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e),h="";p.level++;var y="valid"+p.level,m="key"+n,b="idx"+n,v=p.dataLevel=e.dataLevel+1,S="data"+v,C="dataProperties"+n,F=Object.keys(o||{}).filter(V),I=e.schema.patternProperties||{},M=Object.keys(I).filter(V),P=e.schema.additionalProperties,E=F.length||M.length,N=P===!1,R=typeof P=="object"&&Object.keys(P).length,q=e.opts.removeAdditional,L=N||R||q,k=e.opts.ownProperties,B=e.baseId,_=e.schema.required;if(_&&!(e.opts.$data&&_.$data)&&_.length<e.opts.loopRequired)var G=e.util.toHash(_);function V(Nt){return Nt!=="__proto__"}if(i+="var "+f+" = errors;var "+y+" = true;",k&&(i+=" var "+C+" = undefined;"),L){if(k?i+=" "+C+" = "+C+" || Object.keys("+u+"); for (var "+b+"=0; "+b+"<"+C+".length; "+b+"++) { var "+m+" = "+C+"["+b+"]; ":i+=" for (var "+m+" in "+u+") { ",E){if(i+=" var isAdditional"+n+" = !(false ",F.length)if(F.length>8)i+=" || validate.schema"+l+".hasOwnProperty("+m+") ";else{var Z=F;if(Z)for(var U,oe=-1,Te=Z.length-1;oe<Te;)U=Z[oe+=1],i+=" || "+m+" == "+e.util.toQuotedString(U)+" "}if(M.length){var Re=M;if(Re)for(var re,be=-1,Fe=Re.length-1;be<Fe;)re=Re[be+=1],i+=" || "+e.usePattern(re)+".test("+m+") "}i+=" ); if (isAdditional"+n+") { "}if(q=="all")i+=" delete "+u+"["+m+"]; ";else{var ke=e.errorPath,xt="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),N)if(q)i+=" delete "+u+"["+m+"]; ";else{i+=" "+y+" = false; ";var at=d;d=e.errSchemaPath+"/additionalProperties";var Ie=Ie||[];Ie.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { additionalProperty: '"+xt+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is an invalid additional property":i+="should NOT have additional properties",i+="' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var we=i;i=Ie.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+we+"]); ":i+=" validate.errors = ["+we+"]; return false; ":i+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d=at,c&&(i+=" break; ")}else if(R)if(q=="failing"){i+=" var "+f+" = errors; ";var Ct=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=P,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Ue=u+"["+m+"]";p.dataPathArr[v]=m;var he=e.validate(p);p.baseId=B,e.util.varOccurences(he,S)<2?i+=" "+e.util.varReplace(he,S,Ue)+" ":i+=" var "+S+" = "+Ue+"; "+he+" ",i+=" if (!"+y+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+m+"]; } ",e.compositeRule=p.compositeRule=Ct}else{p.schema=P,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Ue=u+"["+m+"]";p.dataPathArr[v]=m;var he=e.validate(p);p.baseId=B,e.util.varOccurences(he,S)<2?i+=" "+e.util.varReplace(he,S,Ue)+" ":i+=" var "+S+" = "+Ue+"; "+he+" ",c&&(i+=" if (!"+y+") break; ")}e.errorPath=ke}E&&(i+=" } "),i+=" } ",c&&(i+=" if ("+y+") { ",h+="}")}var hr=e.opts.useDefaults&&!e.compositeRule;if(F.length){var Jt=F;if(Jt)for(var U,$r=-1,Mr=Jt.length-1;$r<Mr;){U=Jt[$r+=1];var Je=o[U];if(e.opts.strictKeywords?typeof Je=="object"&&Object.keys(Je).length>0||Je===!1:e.util.schemaHasRules(Je,e.RULES.all)){var Tt=e.util.getProperty(U),Ue=u+Tt,nt=hr&&Je.default!==void 0;p.schema=Je,p.schemaPath=l+Tt,p.errSchemaPath=d+"/"+e.util.escapeFragment(U),p.errorPath=e.util.getPath(e.errorPath,U,e.opts.jsonPointers),p.dataPathArr[v]=e.util.toQuotedString(U);var he=e.validate(p);if(p.baseId=B,e.util.varOccurences(he,S)<2){he=e.util.varReplace(he,S,Ue);var tt=Ue}else{var tt=S;i+=" var "+S+" = "+Ue+"; "}if(nt)i+=" "+he+" ";else{if(G&&G[U]){i+=" if ( "+tt+" === undefined ",k&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(U)+"') "),i+=") { "+y+" = false; ";var ke=e.errorPath,at=d,zt=e.util.escapeQuotes(U);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(ke,U,e.opts.jsonPointers)),d=e.errSchemaPath+"/required";var Ie=Ie||[];Ie.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+zt+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+zt+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var we=i;i=Ie.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+we+"]); ":i+=" validate.errors = ["+we+"]; return false; ":i+=" var err = "+we+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d=at,e.errorPath=ke,i+=" } else { "}else c?(i+=" if ( "+tt+" === undefined ",k&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(U)+"') "),i+=") { "+y+" = true; } else { "):(i+=" if ("+tt+" !== undefined ",k&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(U)+"') "),i+=" ) { ");i+=" "+he+" } "}}c&&(i+=" if ("+y+") { ",h+="}")}}if(M.length){var pt=M;if(pt)for(var re,da=-1,On=pt.length-1;da<On;){re=pt[da+=1];var Je=I[re];if(e.opts.strictKeywords?typeof Je=="object"&&Object.keys(Je).length>0||Je===!1:e.util.schemaHasRules(Je,e.RULES.all)){p.schema=Je,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(re),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(re),k?i+=" "+C+" = "+C+" || Object.keys("+u+"); for (var "+b+"=0; "+b+"<"+C+".length; "+b+"++) { var "+m+" = "+C+"["+b+"]; ":i+=" for (var "+m+" in "+u+") { ",i+=" if ("+e.usePattern(re)+".test("+m+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Ue=u+"["+m+"]";p.dataPathArr[v]=m;var he=e.validate(p);p.baseId=B,e.util.varOccurences(he,S)<2?i+=" "+e.util.varReplace(he,S,Ue)+" ":i+=" var "+S+" = "+Ue+"; "+he+" ",c&&(i+=" if (!"+y+") break; "),i+=" } ",c&&(i+=" else "+y+" = true; "),i+=" } ",c&&(i+=" if ("+y+") { ",h+="}")}}}return c&&(i+=" "+h+" if ("+f+" == errors) {"),i}});var ru=Y((RC,tu)=>{"use strict";tu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="errs__"+n,p=e.util.copy(e),h="";p.level++;var y="valid"+p.level;if(i+="var "+f+" = errors;",e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===!1:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o,p.schemaPath=l,p.errSchemaPath=d;var m="key"+n,b="idx"+n,v="i"+n,S="' + "+m+" + '",C=p.dataLevel=e.dataLevel+1,F="data"+C,I="dataProperties"+n,M=e.opts.ownProperties,P=e.baseId;M&&(i+=" var "+I+" = undefined; "),M?i+=" "+I+" = "+I+" || Object.keys("+u+"); for (var "+b+"=0; "+b+"<"+I+".length; "+b+"++) { var "+m+" = "+I+"["+b+"]; ":i+=" for (var "+m+" in "+u+") { ",i+=" var startErrs"+n+" = errors; ";var E=m,N=e.compositeRule;e.compositeRule=p.compositeRule=!0;var R=e.validate(p);p.baseId=P,e.util.varOccurences(R,F)<2?i+=" "+e.util.varReplace(R,F,E)+" ":i+=" var "+F+" = "+E+"; "+R+" ",e.compositeRule=p.compositeRule=N,i+=" if (!"+y+") { for (var "+v+"=startErrs"+n+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+m+"; } var err = ",e.createErrors!==!1?(i+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { propertyName: '"+S+"' } ",e.opts.messages!==!1&&(i+=" , message: 'property name \\'"+S+"\\' is invalid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),c&&(i+=" break; "),i+=" } }"}return c&&(i+=" "+h+" if ("+f+" == errors) {"),i}});var au=Y((kC,iu)=>{"use strict";iu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o;var y="schema"+n;if(!p)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var m=[],b=o;if(b)for(var v,S=-1,C=b.length-1;S<C;){v=b[S+=1];var F=e.schema.properties[v];F&&(e.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:e.util.schemaHasRules(F,e.RULES.all))||(m[m.length]=v)}}else var m=o;if(p||m.length){var I=e.errorPath,M=p||m.length>=e.opts.loopRequired,P=e.opts.ownProperties;if(c)if(i+=" var missing"+n+"; ",M){p||(i+=" var "+y+" = validate.schema"+l+"; ");var E="i"+n,N="schema"+n+"["+E+"]",R="' + "+N+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,N,e.opts.jsonPointers)),i+=" var "+f+" = true; ",p&&(i+=" if (schema"+n+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+n+")) "+f+" = false; else {"),i+=" for (var "+E+" = 0; "+E+" < "+y+".length; "+E+"++) { "+f+" = "+u+"["+y+"["+E+"]] !== undefined ",P&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", "+y+"["+E+"]) "),i+="; if (!"+f+") break; } ",p&&(i+=" } "),i+=" if (!"+f+") { ";var q=q||[];q.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var L=i;i=q.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var k=m;if(k)for(var B,E=-1,_=k.length-1;E<_;){B=k[E+=1],E&&(i+=" || ");var G=e.util.getProperty(B),V=u+G;i+=" ( ( "+V+" === undefined ",P&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(B)+"') "),i+=") && (missing"+n+" = "+e.util.toQuotedString(e.opts.jsonPointers?B:G)+") ) "}i+=") { ";var N="missing"+n,R="' + "+N+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(I,N,!0):I+" + "+N);var q=q||[];q.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var L=i;i=q.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+L+"]); ":i+=" validate.errors = ["+L+"]; return false; ":i+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(M){p||(i+=" var "+y+" = validate.schema"+l+"; ");var E="i"+n,N="schema"+n+"["+E+"]",R="' + "+N+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,N,e.opts.jsonPointers)),p&&(i+=" if ("+y+" && !Array.isArray("+y+")) { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+y+" !== undefined) { "),i+=" for (var "+E+" = 0; "+E+" < "+y+".length; "+E+"++) { if ("+u+"["+y+"["+E+"]] === undefined ",P&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+y+"["+E+"]) "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(i+=" } ")}else{var Z=m;if(Z)for(var B,U=-1,oe=Z.length-1;U<oe;){B=Z[U+=1];var G=e.util.getProperty(B),R=e.util.escapeQuotes(B),V=u+G;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(I,B,e.opts.jsonPointers)),i+=" if ( "+V+" === undefined ",P&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(B)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+R+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=I}else c&&(i+=" if (true) {");return i}});var su=Y((WC,nu)=>{"use strict";nu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(s||""),f="valid"+n,p=e.opts.$data&&o&&o.$data,h;if(p?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",h="schema"+n):h=o,(o||p)&&e.opts.uniqueItems!==!1){p&&(i+=" var "+f+"; if ("+h+" === false || "+h+" === undefined) "+f+" = true; else if (typeof "+h+" != 'boolean') "+f+" = false; else { "),i+=" var i = "+u+".length , "+f+" = true , j; if (i > 1) { ";var y=e.schema.items&&e.schema.items.type,m=Array.isArray(y);if(!y||y=="object"||y=="array"||m&&(y.indexOf("object")>=0||y.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+f+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ";var b="checkDataType"+(m?"s":"");i+=" if ("+e.util[b](y,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=` if (typeof item == 'string') item = '"' + item; `),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+f+") { ";var v=v||[];v.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",p?i+="validate.schema"+l:i+=""+o,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var S=i;i=v.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}});var lu=Y((jC,ou)=>{"use strict";ou.exports={$ref:Sc(),allOf:xc(),anyOf:Tc(),$comment:Ic(),const:Ac(),contains:Ec(),dependencies:Dc(),enum:Bc(),format:Mc(),if:Rc(),items:Wc(),maximum:$s(),minimum:$s(),maxItems:Ms(),minItems:Ms(),maxLength:qs(),minLength:qs(),maxProperties:Rs(),minProperties:Rs(),multipleOf:Hc(),not:Qc(),oneOf:Kc(),pattern:Yc(),properties:eu(),propertyNames:ru(),required:au(),uniqueItems:su(),validate:Ns()}});var uu=Y((VC,cu)=>{"use strict";var du=lu(),ks=Hr().toHash;cu.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],r=["type","$comment"],a=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],i=["number","integer","string","array","object","boolean","null"];return e.all=ks(r),e.types=ks(i),e.forEach(function(n){n.rules=n.rules.map(function(s){var o;if(typeof s=="object"){var l=Object.keys(s)[0];o=s[l],s=l,o.forEach(function(c){r.push(c),e.all[c]=!0})}r.push(s);var d=e.all[s]={keyword:s,code:du[s],implements:o};return d}),e.all.$comment={keyword:"$comment",code:du.$comment},n.type&&(e.types[n.type]=n)}),e.keywords=ks(r.concat(a)),e.custom={},e}});var hu=Y((_C,fu)=>{"use strict";var pu=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];fu.exports=function(t,e){for(var r=0;r<e.length;r++){t=JSON.parse(JSON.stringify(t));var a=e[r].split("/"),i=t,n;for(n=1;n<a.length;n++)i=i[a[n]];for(n=0;n<pu.length;n++){var s=pu[n],o=i[s];o&&(i[s]={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return t}});var gu=Y((zC,yu)=>{"use strict";var ug=Ka().MissingRef;yu.exports=mu;function mu(t,e,r){var a=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof e=="function"&&(r=e,e=void 0);var i=n(t).then(function(){var o=a._addSchema(t,void 0,e);return o.validate||s(o)});return r&&i.then(function(o){r(null,o)},r),i;function n(o){var l=o.$schema;return l&&!a.getSchema(l)?mu.call(a,{$ref:l},!0):Promise.resolve()}function s(o){try{return a._compile(o)}catch(d){if(d instanceof ug)return l(d);throw d}function l(d){var c=d.missingSchema;if(p(c))throw new Error("Schema "+c+" is loaded but "+d.missingRef+" cannot be resolved");var u=a._loadingSchemas[c];return u||(u=a._loadingSchemas[c]=a._opts.loadSchema(c),u.then(f,f)),u.then(function(h){if(!p(c))return n(h).then(function(){p(c)||a.addSchema(h,c,void 0,e)})}).then(function(){return s(o)});function f(){delete a._loadingSchemas[c]}function p(h){return a._refs[h]||a._schemas[h]}}}}});var vu=Y((UC,bu)=>{"use strict";bu.exports=function(e,r,a){var i=" ",n=e.level,s=e.dataLevel,o=e.schema[r],l=e.schemaPath+e.util.getProperty(r),d=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u,f="data"+(s||""),p="valid"+n,h="errs__"+n,y=e.opts.$data&&o&&o.$data,m;y?(i+=" var schema"+n+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ",m="schema"+n):m=o;var b=this,v="definition"+n,S=b.definition,C="",F,I,M,P,E;if(y&&S.$data){E="keywordValidate"+n;var N=S.validateSchema;i+=" var "+v+" = RULES.custom['"+r+"'].definition; var "+E+" = "+v+".validate;"}else{if(P=e.useCustomRule(b,o,e.schema,e),!P)return;m="validate.schema"+l,E=P.code,F=S.compile,I=S.inline,M=S.macro}var R=E+".errors",q="i"+n,L="ruleErr"+n,k=S.async;if(k&&!e.async)throw new Error("async keyword in sync schema");if(I||M||(i+=""+R+" = null;"),i+="var "+h+" = errors;var "+p+";",y&&S.$data&&(C+="}",i+=" if ("+m+" === undefined) { "+p+" = true; } else { ",N&&(C+="}",i+=" "+p+" = "+v+".validateSchema("+m+"); if ("+p+") { ")),I)S.statements?i+=" "+P.validate+" ":i+=" "+p+" = "+P.validate+"; ";else if(M){var B=e.util.copy(e),C="";B.level++;var _="valid"+B.level;B.schema=P.validate,B.schemaPath="";var G=e.compositeRule;e.compositeRule=B.compositeRule=!0;var V=e.validate(B).replace(/validate\.schema/g,E);e.compositeRule=B.compositeRule=G,i+=" "+V}else{var Z=Z||[];Z.push(i),i="",i+=" "+E+".call( ",e.opts.passContext?i+="this":i+="self",F||S.schema===!1?i+=" , "+f+" ":i+=" , "+m+" , "+f+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var U=s?"data"+(s-1||""):"parentData",oe=s?e.dataPathArr[s]:"parentDataProperty";i+=" , "+U+" , "+oe+" , rootData ) ";var Te=i;i=Z.pop(),S.errors===!1?(i+=" "+p+" = ",k&&(i+="await "),i+=""+Te+"; "):k?(R="customErrors"+n,i+=" var "+R+" = null; try { "+p+" = await "+Te+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+R+" = e.errors; else throw e; } "):i+=" "+R+" = null; "+p+" = "+Te+"; "}if(S.modifying&&(i+=" if ("+U+") "+f+" = "+U+"["+oe+"];"),i+=""+C,S.valid)c&&(i+=" if (true) { ");else{i+=" if ( ",S.valid===void 0?(i+=" !",M?i+=""+_:i+=""+p):i+=" "+!S.valid+" ",i+=") { ",u=b.keyword;var Z=Z||[];Z.push(i),i="";var Z=Z||[];Z.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(u||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { keyword: '"+b.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+b.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var Re=i;i=Z.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+Re+"]); ":i+=" validate.errors = ["+Re+"]; return false; ":i+=" var err = "+Re+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var re=i;i=Z.pop(),I?S.errors?S.errors!="full"&&(i+=" for (var "+q+"="+h+"; "+q+"<errors; "+q+"++) { var "+L+" = vErrors["+q+"]; if ("+L+".dataPath === undefined) "+L+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+L+".schemaPath === undefined) { "+L+'.schemaPath = "'+d+'"; } ',e.opts.verbose&&(i+=" "+L+".schema = "+m+"; "+L+".data = "+f+"; "),i+=" } "):S.errors===!1?i+=" "+re+" ":(i+=" if ("+h+" == errors) { "+re+" } else { for (var "+q+"="+h+"; "+q+"<errors; "+q+"++) { var "+L+" = vErrors["+q+"]; if ("+L+".dataPath === undefined) "+L+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+L+".schemaPath === undefined) { "+L+'.schemaPath = "'+d+'"; } ',e.opts.verbose&&(i+=" "+L+".schema = "+m+"; "+L+".data = "+f+"; "),i+=" } } "):M?(i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: '"+(u||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { keyword: '"+b.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+b.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):S.errors===!1?i+=" "+re+" ":(i+=" if (Array.isArray("+R+")) { if (vErrors === null) vErrors = "+R+"; else vErrors = vErrors.concat("+R+"); errors = vErrors.length; for (var "+q+"="+h+"; "+q+"<errors; "+q+"++) { var "+L+" = vErrors["+q+"]; if ("+L+".dataPath === undefined) "+L+".dataPath = (dataPath || '') + "+e.errorPath+"; "+L+'.schemaPath = "'+d+'"; ',e.opts.verbose&&(i+=" "+L+".schema = "+m+"; "+L+".data = "+f+"; "),i+=" } } else { "+re+" } "),i+=" } ",c&&(i+=" else { ")}return i}});var Ws=Y((HC,pg)=>{pg.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var xu=Y((GC,wu)=>{"use strict";var Su=Ws();wu.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Su.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Su.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}});var Tu=Y((QC,Cu)=>{"use strict";var fg=/^[a-z_$][a-z0-9_$-]*$/i,hg=vu(),mg=xu();Cu.exports={add:yg,get:gg,remove:bg,validate:js};function yg(t,e){var r=this.RULES;if(r.keywords[t])throw new Error("Keyword "+t+" is already defined");if(!fg.test(t))throw new Error("Keyword "+t+" is not a valid identifier");if(e){this.validateKeyword(e,!0);var a=e.type;if(Array.isArray(a))for(var i=0;i<a.length;i++)s(t,a[i],e);else s(t,a,e);var n=e.metaSchema;n&&(e.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),e.validateSchema=this.compile(n,!0))}r.keywords[t]=r.all[t]=!0;function s(o,l,d){for(var c,u=0;u<r.length;u++){var f=r[u];if(f.type==l){c=f;break}}c||(c={type:l,rules:[]},r.push(c));var p={keyword:o,definition:d,custom:!0,code:hg,implements:d.implements};c.rules.push(p),r.custom[o]=p}return this}function gg(t){var e=this.RULES.custom[t];return e?e.definition:this.RULES.keywords[t]||!1}function bg(t){var e=this.RULES;delete e.keywords[t],delete e.all[t],delete e.custom[t];for(var r=0;r<e.length;r++)for(var a=e[r].rules,i=0;i<a.length;i++)if(a[i].keyword==t){a.splice(i,1);break}return this}function js(t,e){js.errors=null;var r=this._validateKeyword=this._validateKeyword||this.compile(mg,!0);if(r(t))return!0;if(js.errors=r.errors,e)throw new Error("custom keyword definition is invalid: "+this.errorsText(r.errors));return!1}});var Fu=Y((ZC,vg)=>{vg.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var $u=Y((KC,Bu)=>{"use strict";var Ou=ac(),Gr=Za(),Sg=sc(),Au=Is(),wg=Ds(),xg=bc(),Cg=uu(),Pu=hu(),Eu=Hr();Bu.exports=Me;Me.prototype.validate=Fg;Me.prototype.compile=Ig;Me.prototype.addSchema=Og;Me.prototype.addMetaSchema=Ag;Me.prototype.validateSchema=Pg;Me.prototype.getSchema=Lg;Me.prototype.removeSchema=Ng;Me.prototype.addFormat=jg;Me.prototype.errorsText=Wg;Me.prototype._addSchema=Bg;Me.prototype._compile=$g;Me.prototype.compileAsync=gu();var nn=Tu();Me.prototype.addKeyword=nn.add;Me.prototype.getKeyword=nn.get;Me.prototype.removeKeyword=nn.remove;Me.prototype.validateKeyword=nn.validate;var Lu=Ka();Me.ValidationError=Lu.Validation;Me.MissingRefError=Lu.MissingRef;Me.$dataMetaSchema=Pu;var an="http://json-schema.org/draft-07/schema",Iu=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],Tg=["/properties"];function Me(t){if(!(this instanceof Me))return new Me(t);t=this._opts=Eu.copy(t)||{},Gg(this),this._schemas={},this._refs={},this._fragments={},this._formats=xg(t.format),this._cache=t.cache||new Sg,this._loadingSchemas={},this._compilations=[],this.RULES=Cg(),this._getId=Mg(t),t.loopRequired=t.loopRequired||1/0,t.errorDataPath=="property"&&(t._errorDataPathProperty=!0),t.serialize===void 0&&(t.serialize=wg),this._metaOpts=Hg(this),t.formats&&zg(this),t.keywords&&Ug(this),Vg(this),typeof t.meta=="object"&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),_g(this)}function Fg(t,e){var r;if(typeof t=="string"){if(r=this.getSchema(t),!r)throw new Error('no schema with key or ref "'+t+'"')}else{var a=this._addSchema(t);r=a.validate||this._compile(a)}var i=r(e);return r.$async!==!0&&(this.errors=r.errors),i}function Ig(t,e){var r=this._addSchema(t,void 0,e);return r.validate||this._compile(r)}function Og(t,e,r,a){if(Array.isArray(t)){for(var i=0;i<t.length;i++)this.addSchema(t[i],void 0,r,a);return this}var n=this._getId(t);if(n!==void 0&&typeof n!="string")throw new Error("schema id must be string");return e=Gr.normalizeId(e||n),Nu(this,e),this._schemas[e]=this._addSchema(t,r,a,!0),this}function Ag(t,e,r){return this.addSchema(t,e,r,!0),this}function Pg(t,e){var r=t.$schema;if(r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this._opts.defaultMeta||Eg(this),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var a=this.validate(r,t);if(!a&&e){var i="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(i);else throw new Error(i)}return a}function Eg(t){var e=t._opts.meta;return t._opts.defaultMeta=typeof e=="object"?t._getId(e)||e:t.getSchema(an)?an:void 0,t._opts.defaultMeta}function Lg(t){var e=Du(this,t);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return Dg(this,t)}}function Dg(t,e){var r=Gr.schema.call(t,{schema:{}},e);if(r){var a=r.schema,i=r.root,n=r.baseId,s=Ou.call(t,a,i,void 0,n);return t._fragments[e]=new Au({ref:e,fragment:!0,schema:a,root:i,baseId:n,validate:s}),s}}function Du(t,e){return e=Gr.normalizeId(e),t._schemas[e]||t._refs[e]||t._fragments[e]}function Ng(t){if(t instanceof RegExp)return rn(this,this._schemas,t),rn(this,this._refs,t),this;switch(typeof t){case"undefined":return rn(this,this._schemas),rn(this,this._refs),this._cache.clear(),this;case"string":var e=Du(this,t);return e&&this._cache.del(e.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":var r=this._opts.serialize,a=r?r(t):t;this._cache.del(a);var i=this._getId(t);i&&(i=Gr.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this}function rn(t,e,r){for(var a in e){var i=e[a];!i.meta&&(!r||r.test(a))&&(t._cache.del(i.cacheKey),delete e[a])}}function Bg(t,e,r,a){if(typeof t!="object"&&typeof t!="boolean")throw new Error("schema should be object or boolean");var i=this._opts.serialize,n=i?i(t):t,s=this._cache.get(n);if(s)return s;a=a||this._opts.addUsedSchema!==!1;var o=Gr.normalizeId(this._getId(t));o&&a&&Nu(this,o);var l=this._opts.validateSchema!==!1&&!e,d;l&&!(d=o&&o==Gr.normalizeId(t.$schema))&&this.validateSchema(t,!0);var c=Gr.ids.call(this,t),u=new Au({id:o,schema:t,localRefs:c,cacheKey:n,meta:r});return o[0]!="#"&&a&&(this._refs[o]=u),this._cache.put(n,u),l&&d&&this.validateSchema(t,!0),u}function $g(t,e){if(t.compiling)return t.validate=i,i.schema=t.schema,i.errors=null,i.root=e||i,t.schema.$async===!0&&(i.$async=!0),i;t.compiling=!0;var r;t.meta&&(r=this._opts,this._opts=this._metaOpts);var a;try{a=Ou.call(this,t.schema,e,t.localRefs)}catch(n){throw delete t.validate,n}finally{t.compiling=!1,t.meta&&(this._opts=r)}return t.validate=a,t.refs=a.refs,t.refVal=a.refVal,t.root=a.root,a;function i(){var n=t.validate,s=n.apply(this,arguments);return i.errors=n.errors,s}}function Mg(t){switch(t.schemaId){case"auto":return kg;case"id":return qg;default:return Rg}}function qg(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function Rg(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function kg(t){if(t.$id&&t.id&&t.$id!=t.id)throw new Error("schema $id is different from id");return t.$id||t.id}function Wg(t,e){if(t=t||this.errors,!t)return"No errors";e=e||{};for(var r=e.separator===void 0?", ":e.separator,a=e.dataVar===void 0?"data":e.dataVar,i="",n=0;n<t.length;n++){var s=t[n];s&&(i+=a+s.dataPath+" "+s.message+r)}return i.slice(0,-r.length)}function jg(t,e){return typeof e=="string"&&(e=new RegExp(e)),this._formats[t]=e,this}function Vg(t){var e;if(t._opts.$data&&(e=Fu(),t.addMetaSchema(e,e.$id,!0)),t._opts.meta!==!1){var r=Ws();t._opts.$data&&(r=Pu(r,Tg)),t.addMetaSchema(r,an,!0),t._refs["http://json-schema.org/schema"]=an}}function _g(t){var e=t._opts.schemas;if(e)if(Array.isArray(e))t.addSchema(e);else for(var r in e)t.addSchema(e[r],r)}function zg(t){for(var e in t._opts.formats){var r=t._opts.formats[e];t.addFormat(e,r)}}function Ug(t){for(var e in t._opts.keywords){var r=t._opts.keywords[e];t.addKeyword(e,r)}}function Nu(t,e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function Hg(t){for(var e=Eu.copy(t._opts),r=0;r<Iu.length;r++)delete e[Iu[r]];return e}function Gg(t){var e=t._opts.logger;if(e===!1)t.logger={log:Vs,warn:Vs,error:Vs};else{if(e===void 0&&(e=console),!(typeof e=="object"&&e.log&&e.warn&&e.error))throw new Error("logger must implement log, warn and error methods");t.logger=e}}function Vs(){}});var ir=class extends Error{},_n=class extends ir{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},zn=class extends ir{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},Un=class extends ir{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},vr=class extends ir{},xa=class extends ir{constructor(e){super(`Invalid unit ${e}`)}},He=class extends ir{},Zt=class extends ir{constructor(){super("Zone is an abstract class")}},j="numeric",Rt="short",St="long",Ca={year:j,month:j,day:j},pl={year:j,month:Rt,day:j},Lf={year:j,month:Rt,day:j,weekday:Rt},fl={year:j,month:St,day:j},hl={year:j,month:St,day:j,weekday:St},ml={hour:j,minute:j},yl={hour:j,minute:j,second:j},gl={hour:j,minute:j,second:j,timeZoneName:Rt},bl={hour:j,minute:j,second:j,timeZoneName:St},vl={hour:j,minute:j,hourCycle:"h23"},Sl={hour:j,minute:j,second:j,hourCycle:"h23"},wl={hour:j,minute:j,second:j,hourCycle:"h23",timeZoneName:Rt},xl={hour:j,minute:j,second:j,hourCycle:"h23",timeZoneName:St},Cl={year:j,month:j,day:j,hour:j,minute:j},Tl={year:j,month:j,day:j,hour:j,minute:j,second:j},Fl={year:j,month:Rt,day:j,hour:j,minute:j},Il={year:j,month:Rt,day:j,hour:j,minute:j,second:j},Df={year:j,month:Rt,day:j,weekday:Rt,hour:j,minute:j},Ol={year:j,month:St,day:j,hour:j,minute:j,timeZoneName:Rt},Al={year:j,month:St,day:j,hour:j,minute:j,second:j,timeZoneName:Rt},Pl={year:j,month:St,day:j,weekday:St,hour:j,minute:j,timeZoneName:St},El={year:j,month:St,day:j,weekday:St,hour:j,minute:j,second:j,timeZoneName:St},zr=class{get type(){throw new Zt}get name(){throw new Zt}get ianaName(){return this.name}get isUniversal(){throw new Zt}offsetName(e,r){throw new Zt}formatOffset(e,r){throw new Zt}offset(e){throw new Zt}equals(e){throw new Zt}get isValid(){throw new Zt}},Bn=null,Ta=class t extends zr{static get instance(){return Bn===null&&(Bn=new t),Bn}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:a}){return jl(e,r,a)}formatOffset(e,r){return Gi(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},Hn=new Map;function Nf(t){let e=Hn.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Hn.set(t,e)),e}var Bf={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function $f(t,e){let r=t.format(e).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,n,s,o,l,d,c]=a;return[s,i,n,o,l,d,c]}function Mf(t,e){let r=t.formatToParts(e),a=[];for(let i=0;i<r.length;i++){let{type:n,value:s}=r[i],o=Bf[n];n==="era"?a[o]=s:J(o)||(a[o]=parseInt(s,10))}return a}var $n=new Map,wr=class t extends zr{static create(e){let r=$n.get(e);return r===void 0&&$n.set(e,r=new t(e)),r}static resetCache(){$n.clear(),Hn.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:a}){return jl(e,r,a,this.name)}formatOffset(e,r){return Gi(this.offset(e),r)}offset(e){if(!this.valid)return NaN;let r=new Date(e);if(isNaN(r))return NaN;let a=Nf(this.name),[i,n,s,o,l,d,c]=a.formatToParts?Mf(a,r):$f(a,r);o==="BC"&&(i=-Math.abs(i)+1);let f=Ea({year:i,month:n,day:s,hour:l===24?0:l,minute:d,second:c,millisecond:0}),p=+r,h=p%1e3;return p-=h>=0?h:1e3+h,(f-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Mo={};function qf(t,e={}){let r=JSON.stringify([t,e]),a=Mo[r];return a||(a=new Intl.ListFormat(t,e),Mo[r]=a),a}var Gn=new Map;function Qn(t,e={}){let r=JSON.stringify([t,e]),a=Gn.get(r);return a===void 0&&(a=new Intl.DateTimeFormat(t,e),Gn.set(r,a)),a}var Zn=new Map;function Rf(t,e={}){let r=JSON.stringify([t,e]),a=Zn.get(r);return a===void 0&&(a=new Intl.NumberFormat(t,e),Zn.set(r,a)),a}var Kn=new Map;function kf(t,e={}){let{base:r,...a}=e,i=JSON.stringify([t,a]),n=Kn.get(i);return n===void 0&&(n=new Intl.RelativeTimeFormat(t,e),Kn.set(i,n)),n}var zi=null;function Wf(){return zi||(zi=new Intl.DateTimeFormat().resolvedOptions().locale,zi)}var Jn=new Map;function Ll(t){let e=Jn.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Jn.set(t,e)),e}var Yn=new Map;function jf(t){let e=Yn.get(t);if(!e){let r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in e||(e={...Dl,...e}),Yn.set(t,e)}return e}function Vf(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let r=t.indexOf("-u-");if(r===-1)return[t];{let a,i;try{a=Qn(t).resolvedOptions(),i=t}catch{let l=t.substring(0,r);a=Qn(l).resolvedOptions(),i=l}let{numberingSystem:n,calendar:s}=a;return[i,n,s]}}function _f(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function zf(t){let e=[];for(let r=1;r<=12;r++){let a=ie.utc(2009,r,1);e.push(t(a))}return e}function Uf(t){let e=[];for(let r=1;r<=7;r++){let a=ie.utc(2016,11,13+r);e.push(t(a))}return e}function ma(t,e,r,a){let i=t.listingMode();return i==="error"?null:i==="en"?r(e):a(e)}function Hf(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||Ll(t.locale).numberingSystem==="latn"}var Xn=class{constructor(e,r,a){this.padTo=a.padTo||0,this.floor=a.floor||!1;let{padTo:i,floor:n,...s}=a;if(!r||Object.keys(s).length>0){let o={useGrouping:!1,...a};a.padTo>0&&(o.minimumIntegerDigits=a.padTo),this.inf=Rf(e,o)}}format(e){if(this.inf){let r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{let r=this.floor?Math.floor(e):us(e,3);return Ve(r,this.padTo)}}},es=class{constructor(e,r,a){this.opts=a,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),o=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&wr.create(o).valid?(i=o,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let n={...this.opts};n.timeZone=n.timeZone||i,this.dtf=Qn(r,n)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){let a=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:a}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},ts=class{constructor(e,r,a){this.opts={style:"long",...a},!r&&kl()&&(this.rtf=kf(e,a))}format(e,r){return this.rtf?this.rtf.format(e,r):fh(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}},Dl={firstDay:1,minimalDays:4,weekend:[6,7]},Ce=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,a,i,n=!1){let s=e||Ee.defaultLocale,o=s||(n?"en-US":Wf()),l=r||Ee.defaultNumberingSystem,d=a||Ee.defaultOutputCalendar,c=as(i)||Ee.defaultWeekSettings;return new t(o,l,d,c,s)}static resetCache(){zi=null,Gn.clear(),Zn.clear(),Kn.clear(),Jn.clear(),Yn.clear()}static fromObject({locale:e,numberingSystem:r,outputCalendar:a,weekSettings:i}={}){return t.create(e,r,a,i)}constructor(e,r,a,i,n){let[s,o,l]=Vf(e);this.locale=s,this.numberingSystem=r||o||null,this.outputCalendar=a||l||null,this.weekSettings=i,this.intl=_f(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Hf(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,as(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return ma(this,e,zl,()=>{let a=this.intl==="ja"||this.intl.startsWith("ja-");r&=!a;let i=r?{month:e,day:"numeric"}:{month:e},n=r?"format":"standalone";if(!this.monthsCache[n][e]){let s=a?o=>this.dtFormatter(o,i).format():o=>this.extract(o,i,"month");this.monthsCache[n][e]=zf(s)}return this.monthsCache[n][e]})}weekdays(e,r=!1){return ma(this,e,Gl,()=>{let a=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=r?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Uf(n=>this.extract(n,a,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return ma(this,void 0,()=>Ql,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ie.utc(2016,11,13,9),ie.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ma(this,e,Zl,()=>{let r={era:e};return this.eraCache[e]||(this.eraCache[e]=[ie.utc(-40,1,1),ie.utc(2017,1,1)].map(a=>this.extract(a,r,"era"))),this.eraCache[e]})}extract(e,r,a){let i=this.dtFormatter(e,r),n=i.formatToParts(),s=n.find(o=>o.type.toLowerCase()===a);return s?s.value:null}numberFormatter(e={}){return new Xn(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new es(e,this.intl,r)}relFormatter(e={}){return new ts(this.intl,this.isEnglish(),e)}listFormatter(e={}){return qf(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Ll(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Wl()?jf(this.locale):Dl}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},Mn=null,Et=class t extends zr{static get utcInstance(){return Mn===null&&(Mn=new t(0)),Mn}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new t(La(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Gi(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Gi(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return Gi(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},rs=class extends zr{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function br(t,e){if(J(t)||t===null)return e;if(t instanceof zr)return t;if(Yf(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?Ta.instance:r==="utc"||r==="gmt"?Et.utcInstance:Et.parseSpecifier(r)||wr.create(t)}else return Sr(t)?Et.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new rs(t)}var os={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},qo={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Gf=os.hanidec.replace(/[\[|\]]/g,"").split("");function Qf(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){let a=t.charCodeAt(r);if(t[r].search(os.hanidec)!==-1)e+=Gf.indexOf(t[r]);else for(let i in qo){let[n,s]=qo[i];a>=n&&a<=s&&(e+=a-n)}}return parseInt(e,10)}else return e}var is=new Map;function Zf(){is.clear()}function Mt({numberingSystem:t},e=""){let r=t||"latn",a=is.get(r);a===void 0&&(a=new Map,is.set(r,a));let i=a.get(e);return i===void 0&&(i=new RegExp(`${os[r]}${e}`),a.set(e,i)),i}var Ro=()=>Date.now(),ko="system",Wo=null,jo=null,Vo=null,_o=60,zo,Uo=null,Ee=class{static get now(){return Ro}static set now(e){Ro=e}static set defaultZone(e){ko=e}static get defaultZone(){return br(ko,Ta.instance)}static get defaultLocale(){return Wo}static set defaultLocale(e){Wo=e}static get defaultNumberingSystem(){return jo}static set defaultNumberingSystem(e){jo=e}static get defaultOutputCalendar(){return Vo}static set defaultOutputCalendar(e){Vo=e}static get defaultWeekSettings(){return Uo}static set defaultWeekSettings(e){Uo=as(e)}static get twoDigitCutoffYear(){return _o}static set twoDigitCutoffYear(e){_o=e%100}static get throwOnInvalid(){return zo}static set throwOnInvalid(e){zo=e}static resetCaches(){Ce.resetCache(),wr.resetCache(),ie.resetCache(),Zf()}},vt=class{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Nl=[0,31,59,90,120,151,181,212,243,273,304,334],Bl=[0,31,60,91,121,152,182,213,244,274,305,335];function At(t,e){return new vt("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function ls(t,e,r){let a=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&a.setUTCFullYear(a.getUTCFullYear()-1900);let i=a.getUTCDay();return i===0?7:i}function $l(t,e,r){return r+(Zi(t)?Bl:Nl)[e-1]}function Ml(t,e){let r=Zi(t)?Bl:Nl,a=r.findIndex(n=>n<e),i=e-r[a];return{month:a+1,day:i}}function ds(t,e){return(t-e+7)%7+1}function Fa(t,e=4,r=1){let{year:a,month:i,day:n}=t,s=$l(a,i,n),o=ds(ls(a,i,n),r),l=Math.floor((s-o+14-e)/7),d;return l<1?(d=a-1,l=Qi(d,e,r)):l>Qi(a,e,r)?(d=a+1,l=1):d=a,{weekYear:d,weekNumber:l,weekday:o,...Da(t)}}function Ho(t,e=4,r=1){let{weekYear:a,weekNumber:i,weekday:n}=t,s=ds(ls(a,1,e),r),o=fi(a),l=i*7+n-s-7+e,d;l<1?(d=a-1,l+=fi(d)):l>o?(d=a+1,l-=fi(a)):d=a;let{month:c,day:u}=Ml(d,l);return{year:d,month:c,day:u,...Da(t)}}function qn(t){let{year:e,month:r,day:a}=t,i=$l(e,r,a);return{year:e,ordinal:i,...Da(t)}}function Go(t){let{year:e,ordinal:r}=t,{month:a,day:i}=Ml(e,r);return{year:e,month:a,day:i,...Da(t)}}function Qo(t,e){if(!J(t.localWeekday)||!J(t.localWeekNumber)||!J(t.localWeekYear)){if(!J(t.weekday)||!J(t.weekNumber)||!J(t.weekYear))throw new vr("Cannot mix locale-based week fields with ISO-based week fields");return J(t.localWeekday)||(t.weekday=t.localWeekday),J(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),J(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Kf(t,e=4,r=1){let a=Pa(t.weekYear),i=Pt(t.weekNumber,1,Qi(t.weekYear,e,r)),n=Pt(t.weekday,1,7);return a?i?n?!1:At("weekday",t.weekday):At("week",t.weekNumber):At("weekYear",t.weekYear)}function Jf(t){let e=Pa(t.year),r=Pt(t.ordinal,1,fi(t.year));return e?r?!1:At("ordinal",t.ordinal):At("year",t.year)}function ql(t){let e=Pa(t.year),r=Pt(t.month,1,12),a=Pt(t.day,1,Ia(t.year,t.month));return e?r?a?!1:At("day",t.day):At("month",t.month):At("year",t.year)}function Rl(t){let{hour:e,minute:r,second:a,millisecond:i}=t,n=Pt(e,0,23)||e===24&&r===0&&a===0&&i===0,s=Pt(r,0,59),o=Pt(a,0,59),l=Pt(i,0,999);return n?s?o?l?!1:At("millisecond",i):At("second",a):At("minute",r):At("hour",e)}function J(t){return typeof t>"u"}function Sr(t){return typeof t=="number"}function Pa(t){return typeof t=="number"&&t%1===0}function Yf(t){return typeof t=="string"}function Xf(t){return Object.prototype.toString.call(t)==="[object Date]"}function kl(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Wl(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function eh(t){return Array.isArray(t)?t:[t]}function Zo(t,e,r){if(t.length!==0)return t.reduce((a,i)=>{let n=[e(i),i];return a&&r(a[0],n[0])===a[0]?a:n},null)[1]}function th(t,e){return e.reduce((r,a)=>(r[a]=t[a],r),{})}function yi(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function as(t){if(t==null)return null;if(typeof t!="object")throw new He("Week settings must be an object");if(!Pt(t.firstDay,1,7)||!Pt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Pt(e,1,7)))throw new He("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Pt(t,e,r){return Pa(t)&&t>=e&&t<=r}function rh(t,e){return t-e*Math.floor(t/e)}function Ve(t,e=2){let r=t<0,a;return r?a="-"+(""+-t).padStart(e,"0"):a=(""+t).padStart(e,"0"),a}function gr(t){if(!(J(t)||t===null||t===""))return parseInt(t,10)}function jr(t){if(!(J(t)||t===null||t===""))return parseFloat(t)}function cs(t){if(!(J(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function us(t,e,r="round"){let a=10**e;switch(r){case"expand":return t>0?Math.ceil(t*a)/a:Math.floor(t*a)/a;case"trunc":return Math.trunc(t*a)/a;case"round":return Math.round(t*a)/a;case"floor":return Math.floor(t*a)/a;case"ceil":return Math.ceil(t*a)/a;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function Zi(t){return t%4===0&&(t%100!==0||t%400===0)}function fi(t){return Zi(t)?366:365}function Ia(t,e){let r=rh(e-1,12)+1,a=t+(e-r)/12;return r===2?Zi(a)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Ea(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Ko(t,e,r){return-ds(ls(t,1,e),r)+e-1}function Qi(t,e=4,r=1){let a=Ko(t,e,r),i=Ko(t+1,e,r);return(fi(t)-a+i)/7}function ns(t){return t>99?t:t>Ee.twoDigitCutoffYear?1900+t:2e3+t}function jl(t,e,r,a=null){let i=new Date(t),n={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(n.timeZone=a);let s={timeZoneName:e,...n},o=new Intl.DateTimeFormat(r,s).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return o?o.value:null}function La(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);let a=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-a:a;return r*60+i}function Vl(t){let e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new He(`Invalid unit value ${t}`);return e}function Oa(t,e){let r={};for(let a in t)if(yi(t,a)){let i=t[a];if(i==null)continue;r[e(a)]=Vl(i)}return r}function Gi(t,e){let r=Math.trunc(Math.abs(t/60)),a=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Ve(r,2)}:${Ve(a,2)}`;case"narrow":return`${i}${r}${a>0?`:${a}`:""}`;case"techie":return`${i}${Ve(r,2)}${Ve(a,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Da(t){return th(t,["hour","minute","second","millisecond"])}var ih=["January","February","March","April","May","June","July","August","September","October","November","December"],_l=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ah=["J","F","M","A","M","J","J","A","S","O","N","D"];function zl(t){switch(t){case"narrow":return[...ah];case"short":return[..._l];case"long":return[...ih];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ul=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Hl=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],nh=["M","T","W","T","F","S","S"];function Gl(t){switch(t){case"narrow":return[...nh];case"short":return[...Hl];case"long":return[...Ul];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Ql=["AM","PM"],sh=["Before Christ","Anno Domini"],oh=["BC","AD"],lh=["B","A"];function Zl(t){switch(t){case"narrow":return[...lh];case"short":return[...oh];case"long":return[...sh];default:return null}}function dh(t){return Ql[t.hour<12?0:1]}function ch(t,e){return Gl(e)[t.weekday-1]}function uh(t,e){return zl(e)[t.month-1]}function ph(t,e){return Zl(e)[t.year<0?0:1]}function fh(t,e,r="always",a=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},n=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&n){let u=t==="days";switch(e){case 1:return u?"tomorrow":`next ${i[t][0]}`;case-1:return u?"yesterday":`last ${i[t][0]}`;case 0:return u?"today":`this ${i[t][0]}`}}let s=Object.is(e,-0)||e<0,o=Math.abs(e),l=o===1,d=i[t],c=a?l?d[1]:d[2]||d[1]:l?i[t][0]:t;return s?`${o} ${c} ago`:`in ${o} ${c}`}function Jo(t,e){let r="";for(let a of t)a.literal?r+=a.val:r+=e(a.val);return r}var hh={D:Ca,DD:pl,DDD:fl,DDDD:hl,t:ml,tt:yl,ttt:gl,tttt:bl,T:vl,TT:Sl,TTT:wl,TTTT:xl,f:Cl,ff:Fl,fff:Ol,ffff:Pl,F:Tl,FF:Il,FFF:Al,FFFF:El},bt=class t{static create(e,r={}){return new t(e,r)}static parseFormat(e){let r=null,a="",i=!1,n=[];for(let s=0;s<e.length;s++){let o=e.charAt(s);o==="'"?((a.length>0||i)&&n.push({literal:i||/^\s+$/.test(a),val:a===""?"'":a}),r=null,a="",i=!i):i||o===r?a+=o:(a.length>0&&n.push({literal:/^\s+$/.test(a),val:a}),a=o,r=o)}return a.length>0&&n.push({literal:i||/^\s+$/.test(a),val:a}),n}static macroTokenToFormatOpts(e){return hh[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0,a=void 0){if(this.opts.forceSimple)return Ve(e,r);let i={...this.opts};return r>0&&(i.padTo=r),a&&(i.signDisplay=a),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,r){let a=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",n=(p,h)=>this.loc.extract(e,p,h),s=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",o=()=>a?dh(e):n({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,h)=>a?uh(e,p):n(h?{month:p}:{month:p,day:"numeric"},"month"),d=(p,h)=>a?ch(e,p):n(h?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),c=p=>{let h=t.macroTokenToFormatOpts(p);return h?this.formatWithSystemDefault(e,h):p},u=p=>a?ph(e,p):n({era:p},"era"),f=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return i?n({day:"numeric"},"day"):this.num(e.day);case"dd":return i?n({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return i?n({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?n({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?n({month:"numeric"},"month"):this.num(e.month);case"MM":return i?n({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?n({year:"numeric"},"year"):this.num(e.year);case"yy":return i?n({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?n({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?n({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(p)}};return Jo(t.parseFormat(r),f)}formatDurationFromString(e,r){let a=this.opts.signMode==="negativeLargestOnly"?-1:1,i=c=>{switch(c[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},n=(c,u)=>f=>{let p=i(f);if(p){let h=u.isNegativeDuration&&p!==u.largestUnit?a:1,y;return this.opts.signMode==="negativeLargestOnly"&&p!==u.largestUnit?y="never":this.opts.signMode==="all"?y="always":y="auto",this.num(c.get(p)*h,f.length,y)}else return f},s=t.parseFormat(r),o=s.reduce((c,{literal:u,val:f})=>u?c:c.concat(f),[]),l=e.shiftTo(...o.map(i).filter(c=>c)),d={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Jo(s,n(l,d))}},Kl=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function gi(...t){let e=t.reduce((r,a)=>r+a.source,"");return RegExp(`^${e}$`)}function bi(...t){return e=>t.reduce(([r,a,i],n)=>{let[s,o,l]=n(e,i);return[{...r,...s},o||a,l]},[{},null,1]).slice(0,2)}function vi(t,...e){if(t==null)return[null,null];for(let[r,a]of e){let i=r.exec(t);if(i)return a(i)}return[null,null]}function Jl(...t){return(e,r)=>{let a={},i;for(i=0;i<t.length;i++)a[t[i]]=gr(e[r+i]);return[a,null,r+i]}}var Yl=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,mh=`(?:${Yl.source}?(?:\\[(${Kl.source})\\])?)?`,ps=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xl=RegExp(`${ps.source}${mh}`),fs=RegExp(`(?:[Tt]${Xl.source})?`),yh=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,gh=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bh=/(\d{4})-?(\d{3})/,vh=Jl("weekYear","weekNumber","weekDay"),Sh=Jl("year","ordinal"),wh=/(\d{4})-(\d\d)-(\d\d)/,ed=RegExp(`${ps.source} ?(?:${Yl.source}|(${Kl.source}))?`),xh=RegExp(`(?: ${ed.source})?`);function hi(t,e,r){let a=t[e];return J(a)?r:gr(a)}function Ch(t,e){return[{year:hi(t,e),month:hi(t,e+1,1),day:hi(t,e+2,1)},null,e+3]}function Si(t,e){return[{hours:hi(t,e,0),minutes:hi(t,e+1,0),seconds:hi(t,e+2,0),milliseconds:cs(t[e+3])},null,e+4]}function Ki(t,e){let r=!t[e]&&!t[e+1],a=La(t[e+1],t[e+2]),i=r?null:Et.instance(a);return[{},i,e+3]}function Ji(t,e){let r=t[e]?wr.create(t[e]):null;return[{},r,e+1]}var Th=RegExp(`^T?${ps.source}$`),Fh=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Ih(t){let[e,r,a,i,n,s,o,l,d]=t,c=e[0]==="-",u=l&&l[0]==="-",f=(p,h=!1)=>p!==void 0&&(h||p&&c)?-p:p;return[{years:f(jr(r)),months:f(jr(a)),weeks:f(jr(i)),days:f(jr(n)),hours:f(jr(s)),minutes:f(jr(o)),seconds:f(jr(l),l==="-0"),milliseconds:f(cs(d),u)}]}var Oh={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function hs(t,e,r,a,i,n,s){let o={year:e.length===2?ns(gr(e)):gr(e),month:_l.indexOf(r)+1,day:gr(a),hour:gr(i),minute:gr(n)};return s&&(o.second=gr(s)),t&&(o.weekday=t.length>3?Ul.indexOf(t)+1:Hl.indexOf(t)+1),o}var Ah=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ph(t){let[,e,r,a,i,n,s,o,l,d,c,u]=t,f=hs(e,i,a,r,n,s,o),p;return l?p=Oh[l]:d?p=0:p=La(c,u),[f,new Et(p)]}function Eh(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var Lh=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Dh=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Nh=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Yo(t){let[,e,r,a,i,n,s,o]=t;return[hs(e,i,a,r,n,s,o),Et.utcInstance]}function Bh(t){let[,e,r,a,i,n,s,o]=t;return[hs(e,o,r,a,i,n,s),Et.utcInstance]}var $h=gi(yh,fs),Mh=gi(gh,fs),qh=gi(bh,fs),Rh=gi(Xl),td=bi(Ch,Si,Ki,Ji),kh=bi(vh,Si,Ki,Ji),Wh=bi(Sh,Si,Ki,Ji),jh=bi(Si,Ki,Ji);function Vh(t){return vi(t,[$h,td],[Mh,kh],[qh,Wh],[Rh,jh])}function _h(t){return vi(Eh(t),[Ah,Ph])}function zh(t){return vi(t,[Lh,Yo],[Dh,Yo],[Nh,Bh])}function Uh(t){return vi(t,[Fh,Ih])}var Hh=bi(Si);function Gh(t){return vi(t,[Th,Hh])}var Qh=gi(wh,xh),Zh=gi(ed),Kh=bi(Si,Ki,Ji);function Jh(t){return vi(t,[Qh,td],[Zh,Kh])}var Xo="Invalid Duration",rd={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Yh={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...rd},Ot=146097/400,di=146097/4800,Xh={years:{quarters:4,months:12,weeks:Ot/7,days:Ot,hours:Ot*24,minutes:Ot*24*60,seconds:Ot*24*60*60,milliseconds:Ot*24*60*60*1e3},quarters:{months:3,weeks:Ot/28,days:Ot/4,hours:Ot*24/4,minutes:Ot*24*60/4,seconds:Ot*24*60*60/4,milliseconds:Ot*24*60*60*1e3/4},months:{weeks:di/7,days:di,hours:di*24,minutes:di*24*60,seconds:di*24*60*60,milliseconds:di*24*60*60*1e3},...rd},_r=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],em=_r.slice(0).reverse();function rr(t,e,r=!1){let a={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Ge(a)}function id(t,e){let r=e.milliseconds??0;for(let a of em.slice(1))e[a]&&(r+=e[a]*t[a].milliseconds);return r}function el(t,e){let r=id(t,e)<0?-1:1;_r.reduceRight((a,i)=>{if(J(e[i]))return a;if(a){let n=e[a]*r,s=t[i][a],o=Math.floor(n/s);e[i]+=o*r,e[a]-=o*s*r}return i},null),_r.reduce((a,i)=>{if(J(e[i]))return a;if(a){let n=e[a]%1;e[a]-=n,e[i]+=n*t[a][i]}return i},null)}function tl(t){let e={};for(let[r,a]of Object.entries(t))a!==0&&(e[r]=a);return e}var Ge=class t{constructor(e){let r=e.conversionAccuracy==="longterm"||!1,a=r?Xh:Yh;e.matrix&&(a=e.matrix),this.values=e.values,this.loc=e.loc||Ce.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=a,this.isLuxonDuration=!0}static fromMillis(e,r){return t.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new He(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:Oa(e,t.normalizeUnit),loc:Ce.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(Sr(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new He(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){let[a]=Uh(e);return a?t.fromObject(a,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){let[a]=Gh(e);return a?t.fromObject(a,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new He("need to specify a reason the Duration is invalid");let a=e instanceof vt?e:new vt(e,r);if(Ee.throwOnInvalid)throw new Un(a);return new t({invalid:a})}static normalizeUnit(e){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new xa(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){let a={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?bt.create(this.loc,a).formatDurationFromString(this,e):Xo}toHuman(e={}){if(!this.isValid)return Xo;let r=e.showZeros!==!1,a=_r.map(i=>{let n=this.values[i];return J(n)||n===0&&!r?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(n)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(a)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=us(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},ie.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?id(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e),a={};for(let i of _r)(yi(r.values,i)||yi(this.values,i))&&(a[i]=r.get(i)+this.get(i));return rr(this,{values:a},!0)}minus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;let r={};for(let a of Object.keys(this.values))r[a]=Vl(e(this.values[a],a));return rr(this,{values:r},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let r={...this.values,...Oa(e,t.normalizeUnit)};return rr(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:a,matrix:i}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:i,conversionAccuracy:a};return rr(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return el(this.matrix,e),rr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=tl(this.normalize().shiftToAll().toObject());return rr(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let r={},a={},i=this.toObject(),n;for(let s of _r)if(e.indexOf(s)>=0){n=s;let o=0;for(let d in a)o+=this.matrix[d][s]*a[d],a[d]=0;Sr(i[s])&&(o+=i[s]);let l=Math.trunc(o);r[s]=l,a[s]=(o*1e3-l*1e3)/1e3}else Sr(i[s])&&(a[s]=i[s]);for(let s in a)a[s]!==0&&(r[n]+=s===n?a[s]:a[s]/this.matrix[n][s]);return el(this.matrix,r),rr(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return rr(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=tl(this.values);return rr(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(a,i){return a===void 0||a===0?i===void 0||i===0:a===i}for(let a of _r)if(!r(this.values[a],e.values[a]))return!1;return!0}},ci="Invalid Interval";function tm(t,e){return!t||!t.isValid?mi.invalid("missing or invalid start"):!e||!e.isValid?mi.invalid("missing or invalid end"):e<t?mi.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var mi=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new He("need to specify a reason the Interval is invalid");let a=e instanceof vt?e:new vt(e,r);if(Ee.throwOnInvalid)throw new zn(a);return new t({invalid:a})}static fromDateTimes(e,r){let a=_i(e),i=_i(r),n=tm(a,i);return n??new t({start:a,end:i})}static after(e,r){let a=Ge.fromDurationLike(r),i=_i(e);return t.fromDateTimes(i,i.plus(a))}static before(e,r){let a=Ge.fromDurationLike(r),i=_i(e);return t.fromDateTimes(i.minus(a),i)}static fromISO(e,r){let[a,i]=(e||"").split("/",2);if(a&&i){let n,s;try{n=ie.fromISO(a,r),s=n.isValid}catch{s=!1}let o,l;try{o=ie.fromISO(i,r),l=o.isValid}catch{l=!1}if(s&&l)return t.fromDateTimes(n,o);if(s){let d=Ge.fromISO(i,r);if(d.isValid)return t.after(n,d)}else if(l){let d=Ge.fromISO(a,r);if(d.isValid)return t.before(o,d)}}return t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",r){if(!this.isValid)return NaN;let a=this.start.startOf(e,r),i;return r?.useLocaleWeeks?i=this.end.reconfigure({locale:a.locale}):i=this.end,i=i.startOf(e,r),Math.floor(i.diff(a,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?t.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];let r=e.map(_i).filter(s=>this.contains(s)).sort((s,o)=>s.toMillis()-o.toMillis()),a=[],{s:i}=this,n=0;for(;i<this.e;){let s=r[n]||this.e,o=+s>+this.e?this.e:s;a.push(t.fromDateTimes(i,o)),i=o,n+=1}return a}splitBy(e){let r=Ge.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:a}=this,i=1,n,s=[];for(;a<this.e;){let o=this.start.plus(r.mapUnits(l=>l*i));n=+o>+this.e?this.e:o,s.push(t.fromDateTimes(a,n)),a=n,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let r=this.s>e.s?this.s:e.s,a=this.e<e.e?this.e:e.e;return r>=a?null:t.fromDateTimes(r,a)}union(e){if(!this.isValid)return this;let r=this.s<e.s?this.s:e.s,a=this.e>e.e?this.e:e.e;return t.fromDateTimes(r,a)}static merge(e){let[r,a]=e.sort((i,n)=>i.s-n.s).reduce(([i,n],s)=>n?n.overlaps(s)||n.abutsStart(s)?[i,n.union(s)]:[i.concat([n]),s]:[i,s],[[],null]);return a&&r.push(a),r}static xor(e){let r=null,a=0,i=[],n=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),s=Array.prototype.concat(...n),o=s.sort((l,d)=>l.time-d.time);for(let l of o)a+=l.type==="s"?1:-1,a===1?r=l.time:(r&&+r!=+l.time&&i.push(t.fromDateTimes(r,l.time)),r=null);return t.merge(i)}difference(...e){return t.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:ci}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ca,r={}){return this.isValid?bt.create(this.s.loc.clone(r),e).formatInterval(this):ci}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:ci}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ci}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:ci}toFormat(e,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:ci}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):Ge.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},pi=class{static hasDST(e=Ee.defaultZone){let r=ie.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return wr.isValidZone(e)}static normalizeZone(e){return br(e,Ee.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||Ce.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||Ce.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||Ce.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Ce.create(r,a,n)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Ce.create(r,a,n)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null}={}){return(i||Ce.create(r,a,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:a=null,locObj:i=null}={}){return(i||Ce.create(r,a,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Ce.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return Ce.create(r,null,"gregory").eras(e)}static features(){return{relative:kl(),localeWeek:Wl()}}};function rl(t,e){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),a=r(e)-r(t);return Math.floor(Ge.fromMillis(a).as("days"))}function rm(t,e,r){let a=[["years",(l,d)=>d.year-l.year],["quarters",(l,d)=>d.quarter-l.quarter+(d.year-l.year)*4],["months",(l,d)=>d.month-l.month+(d.year-l.year)*12],["weeks",(l,d)=>{let c=rl(l,d);return(c-c%7)/7}],["days",rl]],i={},n=t,s,o;for(let[l,d]of a)r.indexOf(l)>=0&&(s=l,i[l]=d(t,e),o=n.plus(i),o>e?(i[l]--,t=n.plus(i),t>e&&(o=t,i[l]--,t=n.plus(i))):t=o);return[t,i,o,s]}function im(t,e,r,a){let[i,n,s,o]=rm(t,e,r),l=e-i,d=r.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(s<e&&(s=i.plus({[o]:1})),s!==i&&(n[o]=(n[o]||0)+l/(s-i)));let c=Ge.fromObject(n,a);return d.length>0?Ge.fromMillis(l,a).shiftTo(...d).plus(c):c}var am="missing Intl.DateTimeFormat.formatToParts support";function me(t,e=r=>r){return{regex:t,deser:([r])=>e(Qf(r))}}var nm="\xA0",ad=`[ ${nm}]`,nd=new RegExp(ad,"g");function sm(t){return t.replace(/\./g,"\\.?").replace(nd,ad)}function il(t){return t.replace(/\./g,"").replace(nd," ").toLowerCase()}function qt(t,e){return t===null?null:{regex:RegExp(t.map(sm).join("|")),deser:([r])=>t.findIndex(a=>il(r)===il(a))+e}}function al(t,e){return{regex:t,deser:([,r,a])=>La(r,a),groups:e}}function ya(t){return{regex:t,deser:([e])=>e}}function om(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function lm(t,e){let r=Mt(e),a=Mt(e,"{2}"),i=Mt(e,"{3}"),n=Mt(e,"{4}"),s=Mt(e,"{6}"),o=Mt(e,"{1,2}"),l=Mt(e,"{1,3}"),d=Mt(e,"{1,6}"),c=Mt(e,"{1,9}"),u=Mt(e,"{2,4}"),f=Mt(e,"{4,6}"),p=m=>({regex:RegExp(om(m.val)),deser:([b])=>b,literal:!0}),y=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return qt(e.eras("short"),0);case"GG":return qt(e.eras("long"),0);case"y":return me(d);case"yy":return me(u,ns);case"yyyy":return me(n);case"yyyyy":return me(f);case"yyyyyy":return me(s);case"M":return me(o);case"MM":return me(a);case"MMM":return qt(e.months("short",!0),1);case"MMMM":return qt(e.months("long",!0),1);case"L":return me(o);case"LL":return me(a);case"LLL":return qt(e.months("short",!1),1);case"LLLL":return qt(e.months("long",!1),1);case"d":return me(o);case"dd":return me(a);case"o":return me(l);case"ooo":return me(i);case"HH":return me(a);case"H":return me(o);case"hh":return me(a);case"h":return me(o);case"mm":return me(a);case"m":return me(o);case"q":return me(o);case"qq":return me(a);case"s":return me(o);case"ss":return me(a);case"S":return me(l);case"SSS":return me(i);case"u":return ya(c);case"uu":return ya(o);case"uuu":return me(r);case"a":return qt(e.meridiems(),0);case"kkkk":return me(n);case"kk":return me(u,ns);case"W":return me(o);case"WW":return me(a);case"E":case"c":return me(r);case"EEE":return qt(e.weekdays("short",!1),1);case"EEEE":return qt(e.weekdays("long",!1),1);case"ccc":return qt(e.weekdays("short",!0),1);case"cccc":return qt(e.weekdays("long",!0),1);case"Z":case"ZZ":return al(new RegExp(`([+-]${o.source})(?::(${a.source}))?`),2);case"ZZZ":return al(new RegExp(`([+-]${o.source})(${a.source})?`),2);case"z":return ya(/[a-z_+-/]{1,256}?/i);case" ":return ya(/[^\S\n\r]/);default:return p(m)}})(t)||{invalidReason:am};return y.token=t,y}var dm={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function cm(t,e,r){let{type:a,value:i}=t;if(a==="literal"){let l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}let n=e[a],s=a;a==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let o=dm[s];if(typeof o=="object"&&(o=o[n]),o)return{literal:!1,val:o}}function um(t){return[`^${t.map(r=>r.regex).reduce((r,a)=>`${r}(${a.source})`,"")}$`,t]}function pm(t,e,r){let a=t.match(e);if(a){let i={},n=1;for(let s in r)if(yi(r,s)){let o=r[s],l=o.groups?o.groups+1:1;!o.literal&&o.token&&(i[o.token.val[0]]=o.deser(a.slice(n,n+l))),n+=l}return[a,i]}else return[a,{}]}function fm(t){let e=n=>{switch(n){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,a;return J(t.z)||(r=wr.create(t.z)),J(t.Z)||(r||(r=new Et(t.Z)),a=t.Z),J(t.q)||(t.M=(t.q-1)*3+1),J(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),J(t.u)||(t.S=cs(t.u)),[Object.keys(t).reduce((n,s)=>{let o=e(s);return o&&(n[o]=t[s]),n},{}),r,a]}var Rn=null;function hm(){return Rn||(Rn=ie.fromMillis(1555555555555)),Rn}function mm(t,e){if(t.literal)return t;let r=bt.macroTokenToFormatOpts(t.val),a=ld(r,e);return a==null||a.includes(void 0)?t:a}function sd(t,e){return Array.prototype.concat(...t.map(r=>mm(r,e)))}var Aa=class{constructor(e,r){if(this.locale=e,this.format=r,this.tokens=sd(bt.parseFormat(r),e),this.units=this.tokens.map(a=>lm(a,e)),this.disqualifyingUnit=this.units.find(a=>a.invalidReason),!this.disqualifyingUnit){let[a,i]=um(this.units);this.regex=RegExp(a,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[r,a]=pm(e,this.regex,this.handlers),[i,n,s]=a?fm(a):[null,null,void 0];if(yi(a,"a")&&yi(a,"H"))throw new vr("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:a,result:i,zone:n,specificOffset:s}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function od(t,e,r){return new Aa(t,r).explainFromTokens(e)}function ym(t,e,r){let{result:a,zone:i,specificOffset:n,invalidReason:s}=od(t,e,r);return[a,i,n,s]}function ld(t,e){if(!t)return null;let a=bt.create(e,t).dtFormatter(hm()),i=a.formatToParts(),n=a.resolvedOptions();return i.map(s=>cm(s,t,n))}var kn="Invalid DateTime",nl=864e13;function Ui(t){return new vt("unsupported zone",`the zone "${t.name}" is not supported`)}function Wn(t){return t.weekData===null&&(t.weekData=Fa(t.c)),t.weekData}function jn(t){return t.localWeekData===null&&(t.localWeekData=Fa(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Vr(t,e){let r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new ie({...r,...e,old:r})}function dd(t,e,r){let a=t-e*60*1e3,i=r.offset(a);if(e===i)return[a,e];a-=(i-e)*60*1e3;let n=r.offset(a);return i===n?[a,i]:[t-Math.min(i,n)*60*1e3,Math.max(i,n)]}function ga(t,e){t+=e*60*1e3;let r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function va(t,e,r){return dd(Ea(t),e,r)}function sl(t,e){let r=t.o,a=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,n={...t.c,year:a,month:i,day:Math.min(t.c.day,Ia(a,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=Ge.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Ea(n),[l,d]=dd(o,r,t.zone);return s!==0&&(l+=s,d=t.zone.offset(l)),{ts:l,o:d}}function ui(t,e,r,a,i,n){let{setZone:s,zone:o}=r;if(t&&Object.keys(t).length!==0||e){let l=e||o,d=ie.fromObject(t,{...r,zone:l,specificOffset:n});return s?d:d.setZone(o)}else return ie.invalid(new vt("unparsable",`the input "${i}" can't be parsed as ${a}`))}function ba(t,e,r=!0){return t.isValid?bt.create(Ce.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Vn(t,e,r){let a=t.c.year>9999||t.c.year<0,i="";if(a&&t.c.year>=0&&(i+="+"),i+=Ve(t.c.year,a?6:4),r==="year")return i;if(e){if(i+="-",i+=Ve(t.c.month),r==="month")return i;i+="-"}else if(i+=Ve(t.c.month),r==="month")return i;return i+=Ve(t.c.day),i}function ol(t,e,r,a,i,n,s){let o=!r||t.c.millisecond!==0||t.c.second!==0,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=Ve(t.c.hour),s==="hour")break;if(e){if(l+=":",l+=Ve(t.c.minute),s==="minute")break;o&&(l+=":",l+=Ve(t.c.second))}else{if(l+=Ve(t.c.minute),s==="minute")break;o&&(l+=Ve(t.c.second))}if(s==="second")break;o&&(!a||t.c.millisecond!==0)&&(l+=".",l+=Ve(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!n?l+="Z":t.o<0?(l+="-",l+=Ve(Math.trunc(-t.o/60)),l+=":",l+=Ve(Math.trunc(-t.o%60))):(l+="+",l+=Ve(Math.trunc(t.o/60)),l+=":",l+=Ve(Math.trunc(t.o%60)))),n&&(l+="["+t.zone.ianaName+"]"),l}var cd={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},gm={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},bm={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Sa=["year","month","day","hour","minute","second","millisecond"],vm=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Sm=["year","ordinal","hour","minute","second","millisecond"];function wa(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new xa(t);return e}function ll(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return wa(t)}}function wm(t){if(Hi===void 0&&(Hi=Ee.now()),t.type!=="iana")return t.offset(Hi);let e=t.name,r=ss.get(e);return r===void 0&&(r=t.offset(Hi),ss.set(e,r)),r}function dl(t,e){let r=br(e.zone,Ee.defaultZone);if(!r.isValid)return ie.invalid(Ui(r));let a=Ce.fromObject(e),i,n;if(J(t.year))i=Ee.now();else{for(let l of Sa)J(t[l])&&(t[l]=cd[l]);let s=ql(t)||Rl(t);if(s)return ie.invalid(s);let o=wm(r);[i,n]=va(t,o,r)}return new ie({ts:i,zone:r,loc:a,o:n})}function cl(t,e,r){let a=J(r.round)?!0:r.round,i=J(r.rounding)?"trunc":r.rounding,n=(o,l)=>(o=us(o,a||r.calendary?0:2,r.calendary?"round":i),e.loc.clone(r).relFormatter(r).format(o,l)),s=o=>r.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(r.unit)return n(s(r.unit),r.unit);for(let o of r.units){let l=s(o);if(Math.abs(l)>=1)return n(l,o)}return n(t>e?-0:0,r.units[r.units.length-1])}function ul(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var Hi,ss=new Map,ie=class t{constructor(e){let r=e.zone||Ee.defaultZone,a=e.invalid||(Number.isNaN(e.ts)?new vt("invalid input"):null)||(r.isValid?null:Ui(r));this.ts=J(e.ts)?Ee.now():e.ts;let i=null,n=null;if(!a)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[i,n]=[e.old.c,e.old.o];else{let o=Sr(e.o)&&!e.old?e.o:r.offset(this.ts);i=ga(this.ts,o),a=Number.isNaN(i.year)?new vt("invalid input"):null,i=a?null:i,n=a?null:o}this._zone=r,this.loc=e.loc||Ce.create(),this.invalid=a,this.weekData=null,this.localWeekData=null,this.c=i,this.o=n,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,r]=ul(arguments),[a,i,n,s,o,l,d]=r;return dl({year:a,month:i,day:n,hour:s,minute:o,second:l,millisecond:d},e)}static utc(){let[e,r]=ul(arguments),[a,i,n,s,o,l,d]=r;return e.zone=Et.utcInstance,dl({year:a,month:i,day:n,hour:s,minute:o,second:l,millisecond:d},e)}static fromJSDate(e,r={}){let a=Xf(e)?e.valueOf():NaN;if(Number.isNaN(a))return t.invalid("invalid input");let i=br(r.zone,Ee.defaultZone);return i.isValid?new t({ts:a,zone:i,loc:Ce.fromObject(r)}):t.invalid(Ui(i))}static fromMillis(e,r={}){if(Sr(e))return e<-nl||e>nl?t.invalid("Timestamp out of range"):new t({ts:e,zone:br(r.zone,Ee.defaultZone),loc:Ce.fromObject(r)});throw new He(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(Sr(e))return new t({ts:e*1e3,zone:br(r.zone,Ee.defaultZone),loc:Ce.fromObject(r)});throw new He("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};let a=br(r.zone,Ee.defaultZone);if(!a.isValid)return t.invalid(Ui(a));let i=Ce.fromObject(r),n=Oa(e,ll),{minDaysInFirstWeek:s,startOfWeek:o}=Qo(n,i),l=Ee.now(),d=J(r.specificOffset)?a.offset(l):r.specificOffset,c=!J(n.ordinal),u=!J(n.year),f=!J(n.month)||!J(n.day),p=u||f,h=n.weekYear||n.weekNumber;if((p||c)&&h)throw new vr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&c)throw new vr("Can't mix ordinal dates with month/day");let y=h||n.weekday&&!p,m,b,v=ga(l,d);y?(m=vm,b=gm,v=Fa(v,s,o)):c?(m=Sm,b=bm,v=qn(v)):(m=Sa,b=cd);let S=!1;for(let N of m){let R=n[N];J(R)?S?n[N]=b[N]:n[N]=v[N]:S=!0}let C=y?Kf(n,s,o):c?Jf(n):ql(n),F=C||Rl(n);if(F)return t.invalid(F);let I=y?Ho(n,s,o):c?Go(n):n,[M,P]=va(I,d,a),E=new t({ts:M,zone:a,o:P,loc:i});return n.weekday&&p&&e.weekday!==E.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${n.weekday} and a date of ${E.toISO()}`):E.isValid?E:t.invalid(E.invalid)}static fromISO(e,r={}){let[a,i]=Vh(e);return ui(a,i,r,"ISO 8601",e)}static fromRFC2822(e,r={}){let[a,i]=_h(e);return ui(a,i,r,"RFC 2822",e)}static fromHTTP(e,r={}){let[a,i]=zh(e);return ui(a,i,r,"HTTP",r)}static fromFormat(e,r,a={}){if(J(e)||J(r))throw new He("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:n=null}=a,s=Ce.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0}),[o,l,d,c]=ym(s,e,r);return c?t.invalid(c):ui(o,l,a,`format ${r}`,e,d)}static fromString(e,r,a={}){return t.fromFormat(e,r,a)}static fromSQL(e,r={}){let[a,i]=Jh(e);return ui(a,i,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new He("need to specify a reason the DateTime is invalid");let a=e instanceof vt?e:new vt(e,r);if(Ee.throwOnInvalid)throw new _n(a);return new t({invalid:a})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){let a=ld(e,Ce.fromObject(r));return a?a.map(i=>i?i.val:null).join(""):null}static expandFormat(e,r={}){return sd(bt.parseFormat(e),Ce.fromObject(r)).map(i=>i.val).join("")}static resetCache(){Hi=void 0,ss.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wn(this).weekYear:NaN}get weekNumber(){return this.isValid?Wn(this).weekNumber:NaN}get weekday(){return this.isValid?Wn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?jn(this).weekday:NaN}get localWeekNumber(){return this.isValid?jn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?jn(this).weekYear:NaN}get ordinal(){return this.isValid?qn(this.c).ordinal:NaN}get monthShort(){return this.isValid?pi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?pi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?pi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?pi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,r=6e4,a=Ea(this.c),i=this.zone.offset(a-e),n=this.zone.offset(a+e),s=this.zone.offset(a-i*r),o=this.zone.offset(a-n*r);if(s===o)return[this];let l=a-s*r,d=a-o*r,c=ga(l,s),u=ga(d,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Vr(this,{ts:l}),Vr(this,{ts:d})]:[this]}get isInLeapYear(){return Zi(this.year)}get daysInMonth(){return Ia(this.year,this.month)}get daysInYear(){return this.isValid?fi(this.year):NaN}get weeksInWeekYear(){return this.isValid?Qi(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Qi(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:r,numberingSystem:a,calendar:i}=bt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:a,outputCalendar:i}}toUTC(e=0,r={}){return this.setZone(Et.instance(e),r)}toLocal(){return this.setZone(Ee.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:a=!1}={}){if(e=br(e,Ee.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(r||a){let n=e.offset(this.ts),s=this.toObject();[i]=va(s,n,e)}return Vr(this,{ts:i,zone:e})}else return t.invalid(Ui(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:a}={}){let i=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:a});return Vr(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let r=Oa(e,ll),{minDaysInFirstWeek:a,startOfWeek:i}=Qo(r,this.loc),n=!J(r.weekYear)||!J(r.weekNumber)||!J(r.weekday),s=!J(r.ordinal),o=!J(r.year),l=!J(r.month)||!J(r.day),d=o||l,c=r.weekYear||r.weekNumber;if((d||s)&&c)throw new vr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new vr("Can't mix ordinal dates with month/day");let u;n?u=Ho({...Fa(this.c,a,i),...r},a,i):J(r.ordinal)?(u={...this.toObject(),...r},J(r.day)&&(u.day=Math.min(Ia(u.year,u.month),u.day))):u=Go({...qn(this.c),...r});let[f,p]=va(u,this.o,this.zone);return Vr(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let r=Ge.fromDurationLike(e);return Vr(this,sl(this,r))}minus(e){if(!this.isValid)return this;let r=Ge.fromDurationLike(e).negate();return Vr(this,sl(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let a={},i=Ge.normalizeUnit(e);switch(i){case"years":a.month=1;case"quarters":case"months":a.day=1;case"weeks":case"days":a.hour=0;case"hours":a.minute=0;case"minutes":a.second=0;case"seconds":a.millisecond=0;break}if(i==="weeks")if(r){let n=this.loc.getStartOfWeek(),{weekday:s}=this;s<n&&(a.weekNumber=this.weekNumber-1),a.weekday=n}else a.weekday=1;if(i==="quarters"){let n=Math.ceil(this.month/3);a.month=(n-1)*3+1}return this.set(a)}endOf(e,r){return this.isValid?this.plus({[e]:1}).startOf(e,r).minus(1):this}toFormat(e,r={}){return this.isValid?bt.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,e):kn}toLocaleString(e=Ca,r={}){return this.isValid?bt.create(this.loc.clone(r),e).formatDateTime(this):kn}toLocaleParts(e={}){return this.isValid?bt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:r=!1,suppressMilliseconds:a=!1,includeOffset:i=!0,extendedZone:n=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=wa(s);let o=e==="extended",l=Vn(this,o,s);return Sa.indexOf(s)>=3&&(l+="T"),l+=ol(this,o,r,a,i,n,s),l}toISODate({format:e="extended",precision:r="day"}={}){return this.isValid?Vn(this,e==="extended",wa(r)):null}toISOWeekDate(){return ba(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:r=!1,includeOffset:a=!0,includePrefix:i=!1,extendedZone:n=!1,format:s="extended",precision:o="milliseconds"}={}){return this.isValid?(o=wa(o),(i&&Sa.indexOf(o)>=3?"T":"")+ol(this,s==="extended",r,e,a,n,o)):null}toRFC2822(){return ba(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ba(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Vn(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:r=!1,includeOffsetSpace:a=!0}={}){let i="HH:mm:ss.SSS";return(r||e)&&(a&&(i+=" "),r?i+="z":e&&(i+="ZZ")),ba(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():kn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let r={...this.c};return e.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,r="milliseconds",a={}){if(!this.isValid||!e.isValid)return Ge.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...a},n=eh(r).map(Ge.normalizeUnit),s=e.valueOf()>this.valueOf(),o=s?this:e,l=s?e:this,d=im(o,l,n,i);return s?d.negate():d}diffNow(e="milliseconds",r={}){return this.diff(t.now(),e,r)}until(e){return this.isValid?mi.fromDateTimes(this,e):this}hasSame(e,r,a){if(!this.isValid)return!1;let i=e.valueOf(),n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(r,a)<=i&&i<=n.endOf(r,a)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let r=e.base||t.fromObject({},{zone:this.zone}),a=e.padding?this<r?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],n=e.unit;return Array.isArray(e.unit)&&(i=e.unit,n=void 0),cl(r,this.plus(a),{...e,numeric:"always",units:i,unit:n})}toRelativeCalendar(e={}){return this.isValid?cl(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new He("min requires all arguments be DateTimes");return Zo(e,r=>r.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new He("max requires all arguments be DateTimes");return Zo(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,a={}){let{locale:i=null,numberingSystem:n=null}=a,s=Ce.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0});return od(s,e,r)}static fromStringExplain(e,r,a={}){return t.fromFormatExplain(e,r,a)}static buildFormatParser(e,r={}){let{locale:a=null,numberingSystem:i=null}=r,n=Ce.fromOpts({locale:a,numberingSystem:i,defaultToEN:!0});return new Aa(n,e)}static fromFormatParser(e,r,a={}){if(J(e)||J(r))throw new He("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:n=null}=a,s=Ce.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0});if(!s.equals(r.locale))throw new He(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:o,zone:l,specificOffset:d,invalidReason:c}=r.explainFromTokens(e);return c?t.invalid(c):ui(o,l,a,`format ${r.format}`,e,d)}static get DATE_SHORT(){return Ca}static get DATE_MED(){return pl}static get DATE_MED_WITH_WEEKDAY(){return Lf}static get DATE_FULL(){return fl}static get DATE_HUGE(){return hl}static get TIME_SIMPLE(){return ml}static get TIME_WITH_SECONDS(){return yl}static get TIME_WITH_SHORT_OFFSET(){return gl}static get TIME_WITH_LONG_OFFSET(){return bl}static get TIME_24_SIMPLE(){return vl}static get TIME_24_WITH_SECONDS(){return Sl}static get TIME_24_WITH_SHORT_OFFSET(){return wl}static get TIME_24_WITH_LONG_OFFSET(){return xl}static get DATETIME_SHORT(){return Cl}static get DATETIME_SHORT_WITH_SECONDS(){return Tl}static get DATETIME_MED(){return Fl}static get DATETIME_MED_WITH_SECONDS(){return Il}static get DATETIME_MED_WITH_WEEKDAY(){return Df}static get DATETIME_FULL(){return Ol}static get DATETIME_FULL_WITH_SECONDS(){return Al}static get DATETIME_HUGE(){return Pl}static get DATETIME_HUGE_WITH_SECONDS(){return El}};function _i(t){if(ie.isDateTime(t))return t;if(t&&t.valueOf&&Sr(t.valueOf()))return ie.fromJSDate(t);if(t&&typeof t=="object")return ie.fromObject(t);throw new He(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var qa=function(){return qa=Object.assign||function(e){for(var r,a=1,i=arguments.length;a<i;a++){r=arguments[a];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qa.apply(this,arguments)},ms={exports:{}},Be={},ys={exports:{}},Ur={};function md(){var t={};return t["align-content"]=!1,t["align-items"]=!1,t["align-self"]=!1,t["alignment-adjust"]=!1,t["alignment-baseline"]=!1,t.all=!1,t["anchor-point"]=!1,t.animation=!1,t["animation-delay"]=!1,t["animation-direction"]=!1,t["animation-duration"]=!1,t["animation-fill-mode"]=!1,t["animation-iteration-count"]=!1,t["animation-name"]=!1,t["animation-play-state"]=!1,t["animation-timing-function"]=!1,t.azimuth=!1,t["backface-visibility"]=!1,t.background=!0,t["background-attachment"]=!0,t["background-clip"]=!0,t["background-color"]=!0,t["background-image"]=!0,t["background-origin"]=!0,t["background-position"]=!0,t["background-repeat"]=!0,t["background-size"]=!0,t["baseline-shift"]=!1,t.binding=!1,t.bleed=!1,t["bookmark-label"]=!1,t["bookmark-level"]=!1,t["bookmark-state"]=!1,t.border=!0,t["border-bottom"]=!0,t["border-bottom-color"]=!0,t["border-bottom-left-radius"]=!0,t["border-bottom-right-radius"]=!0,t["border-bottom-style"]=!0,t["border-bottom-width"]=!0,t["border-collapse"]=!0,t["border-color"]=!0,t["border-image"]=!0,t["border-image-outset"]=!0,t["border-image-repeat"]=!0,t["border-image-slice"]=!0,t["border-image-source"]=!0,t["border-image-width"]=!0,t["border-left"]=!0,t["border-left-color"]=!0,t["border-left-style"]=!0,t["border-left-width"]=!0,t["border-radius"]=!0,t["border-right"]=!0,t["border-right-color"]=!0,t["border-right-style"]=!0,t["border-right-width"]=!0,t["border-spacing"]=!0,t["border-style"]=!0,t["border-top"]=!0,t["border-top-color"]=!0,t["border-top-left-radius"]=!0,t["border-top-right-radius"]=!0,t["border-top-style"]=!0,t["border-top-width"]=!0,t["border-width"]=!0,t.bottom=!1,t["box-decoration-break"]=!0,t["box-shadow"]=!0,t["box-sizing"]=!0,t["box-snap"]=!0,t["box-suppress"]=!0,t["break-after"]=!0,t["break-before"]=!0,t["break-inside"]=!0,t["caption-side"]=!1,t.chains=!1,t.clear=!0,t.clip=!1,t["clip-path"]=!1,t["clip-rule"]=!1,t.color=!0,t["color-interpolation-filters"]=!0,t["column-count"]=!1,t["column-fill"]=!1,t["column-gap"]=!1,t["column-rule"]=!1,t["column-rule-color"]=!1,t["column-rule-style"]=!1,t["column-rule-width"]=!1,t["column-span"]=!1,t["column-width"]=!1,t.columns=!1,t.contain=!1,t.content=!1,t["counter-increment"]=!1,t["counter-reset"]=!1,t["counter-set"]=!1,t.crop=!1,t.cue=!1,t["cue-after"]=!1,t["cue-before"]=!1,t.cursor=!1,t.direction=!1,t.display=!0,t["display-inside"]=!0,t["display-list"]=!0,t["display-outside"]=!0,t["dominant-baseline"]=!1,t.elevation=!1,t["empty-cells"]=!1,t.filter=!1,t.flex=!1,t["flex-basis"]=!1,t["flex-direction"]=!1,t["flex-flow"]=!1,t["flex-grow"]=!1,t["flex-shrink"]=!1,t["flex-wrap"]=!1,t.float=!1,t["float-offset"]=!1,t["flood-color"]=!1,t["flood-opacity"]=!1,t["flow-from"]=!1,t["flow-into"]=!1,t.font=!0,t["font-family"]=!0,t["font-feature-settings"]=!0,t["font-kerning"]=!0,t["font-language-override"]=!0,t["font-size"]=!0,t["font-size-adjust"]=!0,t["font-stretch"]=!0,t["font-style"]=!0,t["font-synthesis"]=!0,t["font-variant"]=!0,t["font-variant-alternates"]=!0,t["font-variant-caps"]=!0,t["font-variant-east-asian"]=!0,t["font-variant-ligatures"]=!0,t["font-variant-numeric"]=!0,t["font-variant-position"]=!0,t["font-weight"]=!0,t.grid=!1,t["grid-area"]=!1,t["grid-auto-columns"]=!1,t["grid-auto-flow"]=!1,t["grid-auto-rows"]=!1,t["grid-column"]=!1,t["grid-column-end"]=!1,t["grid-column-start"]=!1,t["grid-row"]=!1,t["grid-row-end"]=!1,t["grid-row-start"]=!1,t["grid-template"]=!1,t["grid-template-areas"]=!1,t["grid-template-columns"]=!1,t["grid-template-rows"]=!1,t["hanging-punctuation"]=!1,t.height=!0,t.hyphens=!1,t.icon=!1,t["image-orientation"]=!1,t["image-resolution"]=!1,t["ime-mode"]=!1,t["initial-letters"]=!1,t["inline-box-align"]=!1,t["justify-content"]=!1,t["justify-items"]=!1,t["justify-self"]=!1,t.left=!1,t["letter-spacing"]=!0,t["lighting-color"]=!0,t["line-box-contain"]=!1,t["line-break"]=!1,t["line-grid"]=!1,t["line-height"]=!1,t["line-snap"]=!1,t["line-stacking"]=!1,t["line-stacking-ruby"]=!1,t["line-stacking-shift"]=!1,t["line-stacking-strategy"]=!1,t["list-style"]=!0,t["list-style-image"]=!0,t["list-style-position"]=!0,t["list-style-type"]=!0,t.margin=!0,t["margin-bottom"]=!0,t["margin-left"]=!0,t["margin-right"]=!0,t["margin-top"]=!0,t["marker-offset"]=!1,t["marker-side"]=!1,t.marks=!1,t.mask=!1,t["mask-box"]=!1,t["mask-box-outset"]=!1,t["mask-box-repeat"]=!1,t["mask-box-slice"]=!1,t["mask-box-source"]=!1,t["mask-box-width"]=!1,t["mask-clip"]=!1,t["mask-image"]=!1,t["mask-origin"]=!1,t["mask-position"]=!1,t["mask-repeat"]=!1,t["mask-size"]=!1,t["mask-source-type"]=!1,t["mask-type"]=!1,t["max-height"]=!0,t["max-lines"]=!1,t["max-width"]=!0,t["min-height"]=!0,t["min-width"]=!0,t["move-to"]=!1,t["nav-down"]=!1,t["nav-index"]=!1,t["nav-left"]=!1,t["nav-right"]=!1,t["nav-up"]=!1,t["object-fit"]=!1,t["object-position"]=!1,t.opacity=!1,t.order=!1,t.orphans=!1,t.outline=!1,t["outline-color"]=!1,t["outline-offset"]=!1,t["outline-style"]=!1,t["outline-width"]=!1,t.overflow=!1,t["overflow-wrap"]=!1,t["overflow-x"]=!1,t["overflow-y"]=!1,t.padding=!0,t["padding-bottom"]=!0,t["padding-left"]=!0,t["padding-right"]=!0,t["padding-top"]=!0,t.page=!1,t["page-break-after"]=!1,t["page-break-before"]=!1,t["page-break-inside"]=!1,t["page-policy"]=!1,t.pause=!1,t["pause-after"]=!1,t["pause-before"]=!1,t.perspective=!1,t["perspective-origin"]=!1,t.pitch=!1,t["pitch-range"]=!1,t["play-during"]=!1,t.position=!1,t["presentation-level"]=!1,t.quotes=!1,t["region-fragment"]=!1,t.resize=!1,t.rest=!1,t["rest-after"]=!1,t["rest-before"]=!1,t.richness=!1,t.right=!1,t.rotation=!1,t["rotation-point"]=!1,t["ruby-align"]=!1,t["ruby-merge"]=!1,t["ruby-position"]=!1,t["shape-image-threshold"]=!1,t["shape-outside"]=!1,t["shape-margin"]=!1,t.size=!1,t.speak=!1,t["speak-as"]=!1,t["speak-header"]=!1,t["speak-numeral"]=!1,t["speak-punctuation"]=!1,t["speech-rate"]=!1,t.stress=!1,t["string-set"]=!1,t["tab-size"]=!1,t["table-layout"]=!1,t["text-align"]=!0,t["text-align-last"]=!0,t["text-combine-upright"]=!0,t["text-decoration"]=!0,t["text-decoration-color"]=!0,t["text-decoration-line"]=!0,t["text-decoration-skip"]=!0,t["text-decoration-style"]=!0,t["text-emphasis"]=!0,t["text-emphasis-color"]=!0,t["text-emphasis-position"]=!0,t["text-emphasis-style"]=!0,t["text-height"]=!0,t["text-indent"]=!0,t["text-justify"]=!0,t["text-orientation"]=!0,t["text-overflow"]=!0,t["text-shadow"]=!0,t["text-space-collapse"]=!0,t["text-transform"]=!0,t["text-underline-position"]=!0,t["text-wrap"]=!0,t.top=!1,t.transform=!1,t["transform-origin"]=!1,t["transform-style"]=!1,t.transition=!1,t["transition-delay"]=!1,t["transition-duration"]=!1,t["transition-property"]=!1,t["transition-timing-function"]=!1,t["unicode-bidi"]=!1,t["vertical-align"]=!1,t.visibility=!1,t["voice-balance"]=!1,t["voice-duration"]=!1,t["voice-family"]=!1,t["voice-pitch"]=!1,t["voice-range"]=!1,t["voice-rate"]=!1,t["voice-stress"]=!1,t["voice-volume"]=!1,t.volume=!1,t["white-space"]=!1,t.widows=!1,t.width=!0,t["will-change"]=!1,t["word-break"]=!0,t["word-spacing"]=!0,t["word-wrap"]=!0,t["wrap-flow"]=!1,t["wrap-through"]=!1,t["writing-mode"]=!1,t["z-index"]=!1,t}function xm(t,e,r){}function Cm(t,e,r){}var Tm=/javascript\s*\:/img;function Fm(t,e){return Tm.test(e)?"":e}Ur.whiteList=md();Ur.getDefaultWhiteList=md;Ur.onAttr=xm;Ur.onIgnoreAttr=Cm;Ur.safeAttrValue=Fm;var Im={indexOf:function(t,e){var r,a;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,a=t.length;r<a;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var a,i;if(Array.prototype.forEach)return t.forEach(e,r);for(a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}},Yi=Im;function Om(t,e){t=Yi.trimRight(t),t[t.length-1]!==";"&&(t+=";");var r=t.length,a=!1,i=0,n=0,s="";function o(){if(!a){var c=Yi.trim(t.slice(i,n)),u=c.indexOf(":");if(u!==-1){var f=Yi.trim(c.slice(0,u)),p=Yi.trim(c.slice(u+1));if(f){var h=e(i,s.length,f,p,c);h&&(s+=h+"; ")}}}i=n+1}for(;n<r;n++){var l=t[n];if(l==="/"&&t[n+1]==="*"){var d=t.indexOf("*/",n+2);if(d===-1)break;n=d+1,i=n+1,a=!1}else l==="("?a=!0:l===")"?a=!1:l===";"?a||o():l===`
3
+ `&&o()}return Yi.trim(s)}var Am=Om,Na=Ur,Pm=Am;function ud(t){return t==null}function Em(t){var e={};for(var r in t)e[r]=t[r];return e}function yd(t){t=Em(t||{}),t.whiteList=t.whiteList||Na.whiteList,t.onAttr=t.onAttr||Na.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||Na.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||Na.safeAttrValue,this.options=t}yd.prototype.process=function(t){if(t=t||"",t=t.toString(),!t)return"";var e=this,r=e.options,a=r.whiteList,i=r.onAttr,n=r.onIgnoreAttr,s=r.safeAttrValue,o=Pm(t,function(l,d,c,u,f){var p=a[c],h=!1;if(p===!0?h=p:typeof p=="function"?h=p(u):p instanceof RegExp&&(h=p.test(u)),h!==!0&&(h=!1),u=s(c,u),!!u){var y={position:d,sourcePosition:l,source:f,isWhite:h};if(h){var m=i(c,u,y);return ud(m)?c+":"+u:m}else{var m=n(c,u,y);if(!ud(m))return m}}});return o};var Lm=yd;(function(t,e){var r=Ur,a=Lm;function i(s,o){var l=new a(o);return l.process(s)}e=t.exports=i,e.FilterCSS=a;for(var n in r)e[n]=r[n]})(ys,ys.exports);var gs=ys.exports,bs={indexOf:function(t,e){var r,a;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,a=t.length;r<a;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var a,i;if(Array.prototype.forEach)return t.forEach(e,r);for(a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/,r=e.exec(t);return r?r.index:-1}},Dm=gs.FilterCSS,Nm=gs.getDefaultWhiteList,Ra=bs;function gd(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var bd=new Dm;function Bm(t,e,r){}function $m(t,e,r){}function Mm(t,e,r){}function qm(t,e,r){}function vd(t){return t.replace(km,"&lt;").replace(Wm,"&gt;")}function Rm(t,e,r,a){if(r=Fd(r),e==="href"||e==="src"){if(r=Ra.trim(r),r==="#")return"#";if(!(r.substr(0,7)==="http://"||r.substr(0,8)==="https://"||r.substr(0,7)==="mailto:"||r.substr(0,4)==="tel:"||r.substr(0,11)==="data:image/"||r.substr(0,6)==="ftp://"||r.substr(0,2)==="./"||r.substr(0,3)==="../"||r[0]==="#"||r[0]==="/"))return""}else if(e==="background"){if(Ba.lastIndex=0,Ba.test(r))return""}else if(e==="style"){if(pd.lastIndex=0,pd.test(r)||(fd.lastIndex=0,fd.test(r)&&(Ba.lastIndex=0,Ba.test(r))))return"";a!==!1&&(a=a||bd,r=a.process(r))}return r=Id(r),r}var km=/</g,Wm=/>/g,jm=/"/g,Vm=/&quot;/g,_m=/&#([a-zA-Z0-9]*);?/gim,zm=/&colon;?/gim,Um=/&newline;?/gim,Ba=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,pd=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,fd=/u\s*r\s*l\s*\(.*/gi;function Sd(t){return t.replace(jm,"&quot;")}function wd(t){return t.replace(Vm,'"')}function xd(t){return t.replace(_m,function(r,a){return a[0]==="x"||a[0]==="X"?String.fromCharCode(parseInt(a.substr(1),16)):String.fromCharCode(parseInt(a,10))})}function Cd(t){return t.replace(zm,":").replace(Um," ")}function Td(t){for(var e="",r=0,a=t.length;r<a;r++)e+=t.charCodeAt(r)<32?" ":t.charAt(r);return Ra.trim(e)}function Fd(t){return t=wd(t),t=xd(t),t=Cd(t),t=Td(t),t}function Id(t){return t=Sd(t),t=vd(t),t}function Hm(){return""}function Gm(t,e){typeof e!="function"&&(e=function(){});var r=!Array.isArray(t);function a(s){return r?!0:Ra.indexOf(t,s)!==-1}var i=[],n=!1;return{onIgnoreTag:function(s,o,l){if(a(s))if(l.isClosing){var d="[/removed]",c=l.position+d.length;return i.push([n!==!1?n:l.position,c]),n=!1,d}else return n||(n=l.position),"[removed]";else return e(s,o,l)},remove:function(s){var o="",l=0;return Ra.forEach(i,function(d){o+=s.slice(l,d[0]),l=d[1]}),o+=s.slice(l),o}}}function Qm(t){for(var e="",r=0;r<t.length;){var a=t.indexOf("<!--",r);if(a===-1){e+=t.slice(r);break}e+=t.slice(r,a);var i=t.indexOf("-->",a);if(i===-1)break;r=i+3}return e}function Zm(t){var e=t.split("");return e=e.filter(function(r){var a=r.charCodeAt(0);return a===127?!1:a<=31?a===10||a===13:!0}),e.join("")}Be.whiteList=gd();Be.getDefaultWhiteList=gd;Be.onTag=Bm;Be.onIgnoreTag=$m;Be.onTagAttr=Mm;Be.onIgnoreTagAttr=qm;Be.safeAttrValue=Rm;Be.escapeHtml=vd;Be.escapeQuote=Sd;Be.unescapeQuote=wd;Be.escapeHtmlEntities=xd;Be.escapeDangerHtml5Entities=Cd;Be.clearNonPrintableCharacter=Td;Be.friendlyAttrValue=Fd;Be.escapeAttrValue=Id;Be.onIgnoreTagStripAll=Hm;Be.StripTagBody=Gm;Be.stripCommentTag=Qm;Be.stripBlankChar=Zm;Be.cssFilter=bd;Be.getDefaultCSSWhiteList=Nm;var ka={},xr=bs;function Km(t){var e=xr.spaceIndex(t),r;return e===-1?r=t.slice(1,-1):r=t.slice(1,e+1),r=xr.trim(r).toLowerCase(),r.slice(0,1)==="/"&&(r=r.slice(1)),r.slice(-1)==="/"&&(r=r.slice(0,-1)),r}function Jm(t){return t.slice(0,2)==="</"}function Ym(t,e,r){var a="",i=0,n=!1,s=!1,o=0,l=t.length,d="",c="";e:for(o=0;o<l;o++){var u=t.charAt(o);if(n===!1){if(u==="<"){n=o;continue}}else if(s===!1){if(u==="<"){a+=r(t.slice(i,o)),n=o,i=o;continue}if(u===">"){a+=r(t.slice(i,n)),c=t.slice(n,o+1),d=Km(c),a+=e(n,a.length,d,c,Jm(c)),i=o+1,n=!1;continue}if(u==='"'||u==="'")for(var f=1,p=t.charAt(o-f);p.trim()===""||p==="=";){if(p==="="){s=u;continue e}p=t.charAt(o-++f)}}else if(u===s){s=!1;continue}}return i<t.length&&(a+=r(t.substr(i))),a}var Xm=/[^a-zA-Z0-9\\_:.-]/gim;function ey(t,e){var r=0,a=0,i=[],n=!1,s=t.length;function o(f,p){if(f=xr.trim(f),f=f.replace(Xm,"").toLowerCase(),!(f.length<1)){var h=e(f,p||"");h&&i.push(h)}}for(var l=0;l<s;l++){var d=t.charAt(l),c,u;if(n===!1&&d==="="){n=t.slice(r,l),r=l+1,a=t.charAt(r)==='"'||t.charAt(r)==="'"?r:ry(t,l+1);continue}if(n!==!1&&l===a){if(u=t.indexOf(d,l+1),u===-1)break;c=xr.trim(t.slice(a+1,u)),o(n,c),n=!1,l=u,r=l+1;continue}if(/\s|\n|\t/.test(d))if(t=t.replace(/\s|\n|\t/g," "),n===!1)if(u=ty(t,l),u===-1){c=xr.trim(t.slice(r,l)),o(c),n=!1,r=l+1;continue}else{l=u-1;continue}else if(u=iy(t,l-1),u===-1){c=xr.trim(t.slice(r,l)),c=hd(c),o(n,c),n=!1,r=l+1;continue}else continue}return r<t.length&&(n===!1?o(t.slice(r)):o(n,hd(xr.trim(t.slice(r))))),xr.trim(i.join(" "))}function ty(t,e){for(;e<t.length;e++){var r=t[e];if(r!==" ")return r==="="?e:-1}}function ry(t,e){for(;e<t.length;e++){var r=t[e];if(r!==" ")return r==="'"||r==='"'?e:-1}}function iy(t,e){for(;e>0;e--){var r=t[e];if(r!==" ")return r==="="?e:-1}}function ay(t){return t[0]==='"'&&t[t.length-1]==='"'||t[0]==="'"&&t[t.length-1]==="'"}function hd(t){return ay(t)?t.substr(1,t.length-2):t}ka.parseTag=Ym;ka.parseAttr=ey;var ny=gs.FilterCSS,kt=Be,Od=ka,sy=Od.parseTag,oy=Od.parseAttr,Ma=bs;function $a(t){return t==null}function ly(t){var e=Ma.spaceIndex(t);if(e===-1)return{html:"",closing:t[t.length-2]==="/"};t=Ma.trim(t.slice(e+1,-1));var r=t[t.length-1]==="/";return r&&(t=Ma.trim(t.slice(0,-1))),{html:t,closing:r}}function dy(t){var e={};for(var r in t)e[r]=t[r];return e}function cy(t){var e={};for(var r in t)Array.isArray(t[r])?e[r.toLowerCase()]=t[r].map(function(a){return a.toLowerCase()}):e[r.toLowerCase()]=t[r];return e}function Ad(t){t=dy(t||{}),t.stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=kt.onIgnoreTagStripAll),t.whiteList||t.allowList?t.whiteList=cy(t.whiteList||t.allowList):t.whiteList=kt.whiteList,t.onTag=t.onTag||kt.onTag,t.onTagAttr=t.onTagAttr||kt.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||kt.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||kt.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||kt.safeAttrValue,t.escapeHtml=t.escapeHtml||kt.escapeHtml,this.options=t,t.css===!1?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new ny(t.css))}Ad.prototype.process=function(t){if(t=t||"",t=t.toString(),!t)return"";var e=this,r=e.options,a=r.whiteList,i=r.onTag,n=r.onIgnoreTag,s=r.onTagAttr,o=r.onIgnoreTagAttr,l=r.safeAttrValue,d=r.escapeHtml,c=e.cssFilter;r.stripBlankChar&&(t=kt.stripBlankChar(t)),r.allowCommentTag||(t=kt.stripCommentTag(t));var u=!1;r.stripIgnoreTagBody&&(u=kt.StripTagBody(r.stripIgnoreTagBody,n),n=u.onIgnoreTag);var f=sy(t,function(p,h,y,m,b){var v={sourcePosition:p,position:h,isClosing:b,isWhite:Object.prototype.hasOwnProperty.call(a,y)},S=i(y,m,v);if(!$a(S))return S;if(v.isWhite){if(v.isClosing)return"</"+y+">";var C=ly(m),F=a[y],I=oy(C.html,function(M,P){var E=Ma.indexOf(F,M)!==-1,N=s(y,M,P,E);return $a(N)?E?(P=l(y,M,P,c),P?M+'="'+P+'"':M):(N=o(y,M,P,E),$a(N)?void 0:N):N});return m="<"+y,I&&(m+=" "+I),C.closing&&(m+=" /"),m+=">",m}else return S=n(y,m,v),$a(S)?d(m):S},d);return u&&(f=u.remove(f)),f};var uy=Ad;(function(t,e){var r=Be,a=ka,i=uy;function n(o,l){var d=new i(l);return d.process(o)}e=t.exports=n,e.filterXSS=n,e.FilterXSS=i,(function(){for(var o in r)e[o]=r[o];for(var l in a)e[l]=a[l]})();function s(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}s()&&(self.filterXSS=t.exports)})(ms,ms.exports);var wi=ms.exports,py=function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Pd=(function(){function t(e,r){var a=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],code:["style"],dd:["style"],del:["style"],details:["open","style"],div:["align","aria-hidden","aria-label","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],main:["style"],mark:["style"],nav:["style"],ol:[],p:["style"],pre:["style"],section:["style"],source:["media","src","type"],span:["aria-hidden","aria-label","style"],strong:[],sub:["style"],summary:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],time:["style"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=qa(qa({},wi.getDefaultCSSWhiteList()),{"align-items":!0,"align-self":!0,flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,float:!0,gap:!0,grid:!0,"grid-area":!0,"grid-auto-columns":!0,"grid-auto-flow":!0,"grid-auto-rows":!0,"grid-column":!0,"grid-column-end":!0,"grid-column-start":!0,"grid-row":!0,"grid-row-end":!0,"grid-row-start":!0,"grid-template":!0,"grid-template-areas":!0,"grid-template-columns":!0,"grid-template-rows":!0,"justify-content":!0,"justify-items":!0,"justify-self":!0,"line-height":!0,overflow:!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(n,s,o,l){return n==="a"&&s==="href"||(n==="img"||n==="source")&&s==="src"?a.sanitizeUrl(o):wi.safeAttrValue(n,s,o,l)}},this._entityMap={"&":"&#x38;","<":"&#x3C;",">":"&#x3E;",'"':"&#x22;","'":"&#x27;","/":"&#x2F;"};var i;e&&!r?i=e:e&&r?(i=Object.create(this.arcgisFilterOptions),i.css={whiteList:this.arcgisCSSWhiteList},Object.keys(e).forEach(function(n){if(n==="whiteList")i.whiteList=a._extendObjectOfArrays([a.arcgisWhiteList,e.whiteList||{}]);else if(n==="css"){var s=e.css.whiteList;s!=null&&e.css instanceof Object&&Object.keys(s).forEach(function(o){return i.css.whiteList[o]=s[o]})}else i[n]=e[n]})):(i=Object.create(this.arcgisFilterOptions),i.whiteList=this.arcgisWhiteList,i.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=i,this._xssFilter=new wi.FilterXSS(i)}return t.prototype.sanitize=function(e,r){switch(r===void 0&&(r={}),typeof e){case"number":return isNaN(e)||!isFinite(e)?null:e;case"boolean":return e;case"string":return this._xssFilter.process(e);case"object":return this._iterateOverObject(e,r);default:return r.allowUndefined&&typeof e>"u"?void 0:null}},t.prototype.sanitizeUrl=function(e,r){var a=(r??{}).isProtocolRequired,i=a===void 0?!0:a,n=this._trim(e.substring(0,e.indexOf(":"))),s=e==="/",o=/^#/.test(e),l=n&&this.allowedProtocols.indexOf(n.toLowerCase())>-1;return s||o||l?wi.escapeAttrValue(e):!n&&!i?wi.escapeAttrValue("https://".concat(e)):""},t.prototype.sanitizeHTMLAttribute=function(e,r,a,i){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(e,r,a,i):wi.safeAttrValue(e,r,a,i)},t.prototype.validate=function(e,r){r===void 0&&(r={});var a=this.sanitize(e,r);return{isValid:e===a,sanitized:a}},t.prototype.encodeHTML=function(e){var r=this;return String(e).replace(/[&<>"'\/]/g,function(a){return r._entityMap[a]})},t.prototype.encodeAttrValue=function(e){var r=/^[a-zA-Z0-9]$/;return String(e).replace(/[\x00-\xFF]/g,function(a,i){return r.test(a)?a:"&#x".concat(Number(e.charCodeAt(i)).toString(16),";")})},t.prototype._extendObjectOfArrays=function(e){var r={};return e.forEach(function(a){Object.keys(a).forEach(function(i){Array.isArray(a[i])&&Array.isArray(r[i])?r[i]=r[i].concat(a[i]):r[i]=a[i]})}),r},t.prototype._iterateOverObject=function(e,r){var a=this;r===void 0&&(r={});try{var i=!1,n=void 0;if(Array.isArray(e))n=e.reduce(function(o,l){var d=a.validate(l,r);return d.isValid?o.concat([l]):(i=!0,o.concat([d.sanitized]))},[]);else if(py(e)){var s=Object.keys(e);n=s.reduce(function(o,l){var d=e[l],c=a.validate(d,r);return c.isValid?o[l]=d:(i=!0,o[l]=c.sanitized),o},{})}else return r.allowUndefined&&typeof e>"u"?void 0:null;return i?n:e}catch{return null}},t.prototype._trim=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},t})();function Ed(t){var e,r,a=t.length;if(a===1)e=0,r=t[0][1];else{for(var i=0,n=0,s=0,o=0,l,d,c,u=0;u<a;u++)l=t[u],d=l[0],c=l[1],i+=d,n+=c,s+=d*d,o+=d*c;e=(a*o-i*n)/(a*s-i*i),r=n/a-e*i/a}return{m:e,b:r}}function Ld(t){return function(e){return t.b+t.m*e}}function Dd(t,e){if(t.length<2)return 1;for(var r=0,a=0;a<t.length;a++)r+=t[a][1];for(var i=r/t.length,n=0,s=0;s<t.length;s++)n+=Math.pow(i-t[s][1],2);for(var o=0,l=0;l<t.length;l++)o+=Math.pow(t[l][1]-e(t[l][0]),2);return 1-o/n}var Nd=function(){this.totalCount=0,this.data={}};Nd.prototype.train=function(e,r){this.data[r]||(this.data[r]={});for(var a in e){var i=e[a];this.data[r][a]===void 0&&(this.data[r][a]={}),this.data[r][a][i]===void 0&&(this.data[r][a][i]=0),this.data[r][a][i]++}this.totalCount++};Nd.prototype.score=function(e){var r={},a;for(var i in e){var n=e[i];for(a in this.data)r[a]={},this.data[a][i]?r[a][i+"_"+n]=(this.data[a][i][n]||0)/this.totalCount:r[a][i+"_"+n]=0}var s={};for(a in r){s[a]=0;for(var o in r[a])s[a]+=r[a][o]}return s};var Bd=function(){this.weights=[],this.bias=0};Bd.prototype.predict=function(e){if(e.length!==this.weights.length)return null;for(var r=0,a=0;a<this.weights.length;a++)r+=this.weights[a]*e[a];return r+=this.bias,r>0?1:0};Bd.prototype.train=function(e,r){if(r!==0&&r!==1)return null;e.length!==this.weights.length&&(this.weights=e,this.bias=1);var a=this.predict(e);if(typeof a=="number"&&a!==r){for(var i=r-a,n=0;n<this.weights.length;n++)this.weights[n]+=i*e[n];this.bias+=i}return this};var rC=607/128,iC=Math.log(Math.sqrt(2*Math.PI));var aC=Math.sqrt(2*Math.PI);var fy=Math.sqrt(2*Math.PI);function hy(t){for(var e=t,r=t,a=1;a<15;a++)r*=t*t/(2*a+1),e+=r;return Math.round((.5+e/fy*Math.exp(-t*t/2))*1e4)/1e4}var my=[];for(Wa=0;Wa<=3.09;Wa+=.01)my.push(hy(Wa));var Wa;var sp=Ef($u(),1);var dr="25.0.0",lt="arcgis_charts_pie_from_fields_name",Wt="arcgis_charts_pie_from_fields_value",pb="arcgis_charts_bar_line_from_fields_name",fb="arcgis_charts_bar_line_from_fields_value",ar={Mean:"Mean",Median:"Median",StdDev:"Standard Deviation",Normal:"Normal Distribution",Trendline:"Trendline"},Ru={Count:"count",Start:"minValue",End:"maxValue"};function hb(t,e){let r=e.errors[t];throw new Qe(e.modalHeaders.error,r??e.errors.simpleError)}function Vt(t){return t.axes?.[0]?.valueFormat?.type}function P1(t){return t.intlOptions}function et(t){return t?.type===g.NumberAxisFormat}function E1(t){return et(t)&&t.intlOptions?.style==="percent"}function nr(t){return t?.type===g.CategoryAxisFormat}function Zr(t){return t?.type===g.DateAxisFormat}function L1(t){let{oldConfig:e,newConfig:r,rotationChanged:a}=t;return a?[!0,!0]:[e.horizontalAxisLabelsBehavior!==r.horizontalAxisLabelsBehavior,e.verticalAxisLabelsBehavior!==r.verticalAxisLabelsBehavior]}function mb(t){return et(t?.[1]?.valueFormat)&&(t?.[2]?.valueFormat===void 0||et(t[2].valueFormat))}function yb(t){return et(t?.[1]?.valueFormat)&&(t?.[2]?.valueFormat===void 0||et(t[2].valueFormat))}function gb(t){return(nr(t?.[0]?.valueFormat)||Zr(t?.[0]?.valueFormat))&&et(t?.[1]?.valueFormat)&&(t?.[2]?.valueFormat===void 0||et(t[2].valueFormat))}function bb(t){return nr(t?.[0]?.valueFormat)&&nr(t?.[1]?.valueFormat)||Zr(t?.[0]?.valueFormat)&&nr(t?.[1]?.valueFormat)||Zr(t?.[0]?.valueFormat)&&Zr(t?.[1]?.valueFormat)}function vb(t){return(nr(t?.[0]?.valueFormat)||Zr(t?.[0]?.valueFormat))&&et(t?.[1]?.valueFormat)}function Sb(t){return et(t?.[0]?.valueFormat)&&et(t?.[1]?.valueFormat)}function wb(t){return et(t?.[0]?.valueFormat)&&et(t?.[1]?.valueFormat)}function xb(t){return et(t?.[0]?.valueFormat)}function D1(t){let{chartType:e,axesConfig:r,errorStrings:a}=t,i,n;switch(e){case g.GaugeSeries:i=xb,n="invalidValueFormatForGauge";break;case g.ScatterSeries:i=Sb,n="invalidValueFormatForScatterplot";break;case g.HistogramSeries:i=wb,n="invalidValueFormatForHistogram";break;case g.LineSeries:i=mb,n="invalidValueFormatForLineChart";break;case g.BarSeries:i=yb,n="invalidValueFormatForBarChart";break;case g.ComboLineAndBarSeries:i=vb,n="invalidValueFormatForComboBarLineChart";break;case g.BoxPlotSeries:i=gb,n="invalidValueFormatForBoxPlot";break;case g.HeatSeries:i=bb,n="invalidValueFormatForHeatChart";break}i!==void 0&&n!==void 0&&(i(r)||hb(n,a))}function Cb(t){let{isXAxis:e,chartType:r,valueFormat:a,isAxisForHistogramOverlaySeries:i}=t;return e&&(nr(a)||r===g.HistogramSeries&&!i||r===g.BarSeries&&et(a))}var Tb={MonoSelection:"monoSelection",MultiSelection:"multiSelection",MultiSelectionWithCtrlKey:"multiSelectionWithCtrlKey",Zoom:"zoom",None:"none"},N1={MultiAxes:"multi-axes",XAxis:"x-axis",YAxis:"y-axis"},Dr={Reject:"reject",RenderUpToTheLimit:"renderUpToTheLimit"},ne={AxisLabels:"axisLabels",GuideLabel:"guideLabel",AxisTitle:"axisTitle",ChartTitle:"chartTitle",ChartSubtitle:"chartSubtitle",DataLabels:"dataLabels",LegendTitle:"legendTitle",LegendText:"legendText",DescriptionText:"descriptionText"},Fb=32,Ar="arcgis_charts_features_extent",ue={maxRecordCountFactor:5,maxParallelRequests:4,maxRecords:2e3,orderByJSAPIDelimiter:" ",outStatistics:{statisticType:ha.statisticType,onStatisticField:"OBJECTID",outStatisticFieldName:"arcgis_charts_outStatisticFieldName_default_key"},uniqueIdsName:"arcgisChartsUniqueIds",heatChartLowerBoundaryAlias:"lowerBoundary5x1",heatChartUpperBoundaryAlias:"upperBoundary5x1",defaultStatParameterValue:.5},dp=["EXPR_1","Expr1","expr1","EXPR1"],B1=1,dt=.7,Ib=25,cp=[156,156,156,255],Ob=[156,156,156,255],$1=yr.Solid,M1=2,hn={defaultGroupOfSlicesId:"arcgis_charts_group_of_slices",sliceIdPrefix:"arcgis-charts-slice-id",undefinedSliceId:"arcgis-charts-slice-id-undefined",nullSliceId:"arcgis-charts-slice-id-null",emptySliceId:"arcgis-charts-slice-id-empty"},Di="arcgis_charts_box_plot_category",te={valueField:"arcgis_charts_heat_chart_value",xField:"arcgis_charts_heat_chart_x",yField:"arcgis_charts_heat_chart_y"},q1={min:1,max:10},Ab=[[31,120,180,255],[166,206,227,255],[51,160,44,255],[178,223,138,255],[227,26,28,255],[251,154,153,255],[255,127,0,255],[253,191,111,255],[106,61,154,255],[202,178,214,255]],R1=[[90,180,255,255],[165,220,255,255],[90,215,80,255],[165,245,150,255],[255,80,85,255],[255,170,170,255],[255,165,70,255],[255,205,130,255],[155,110,255,255],[220,195,255,255]],Pb=[[104,104,104,255],[51,124,235,255],[132,0,168,255],[156,156,156,255]],k1=[[104,104,104,255],[51,124,235,255],[175,90,255,255],[156,156,156,255]],W1=[255,255,255,255],j1=[43,43,43,255],V1=[0,122,194,255],_1=[255,255,255,255],z1=[0,0,0,255],cn=[150,150,150,178.5];function Lt(t){let{colorIndex:e,opacity:r,histogramOverlays:a}=t,i=Math.max(0,e??0),n=[...a===!0?Pb:Ab],[s,o,l,d]=n[i%n.length],c=r!==void 0?r*255:d;return[s,o,l,c]}function up(t){return[0,0,0,(t??dt)*255]}function U1(){return{type:g.CursorCrosshair,verticalLineVisible:!1,horizontalLineVisible:!1,style:{type:Se.SLS,style:yr.Dot,color:[211,211,211,255],width:1}}}function Sn(t=1){return[Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256),t*255]}function ge(t){let e={family:"Arial, Helvetica, sans-serif",size:10};switch(t){case ne.ChartTitle:e.size=18;break;case ne.AxisTitle:e.size=14;break;case ne.LegendText:e.size=12;break;case ne.LegendTitle:e.size=13;break;case ne.DescriptionText:e.size=11;break}return e}function pp(t="",e=ge(),r){let a="center";return(r===ne.DataLabels||r===ne.GuideLabel)&&(a=void 0),{type:Se.TS,color:up(),text:t,font:e,horizontalAlignment:a}}function de(t){let{text:e,visible:r,font:a,type:i}=t??{text:"",visible:!0,font:ge()};return{type:g.Text,visible:r,content:pp(e,a,i)}}function sa(t){let e=t?.useRandomColor??!1,r=t?.useRampColor,a=t?.width??1,i=t?.isHistogramOverlay,n=t?.color??up(1);return e?n=Sn():r!==void 0&&(i===!0?n=Lt({colorIndex:r.colorIndex,histogramOverlays:i}):n=Lt({colorIndex:r.colorIndex})),t?.opacity!==void 0&&(n[3]=t.opacity),{type:Se.SLS,style:yr.Solid,color:n,width:a}}function Eb(){return{type:g.CategoryAxisFormat,characterLimit:11}}function H1(){return{type:g.DateAxisFormat,intlOptions:{}}}function Qs(){return{type:g.NumberAxisFormat,intlOptions:{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:3,useGrouping:!0}}}function G1(){return{type:g.NumberAxisFormat,intlOptions:{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:2}}}function Q1(){return{type:g.NumberAxisFormat,intlOptions:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:0}}}function _s(t="Category Axis"){let e=de({text:t,visible:!0,font:ge(ne.AxisTitle)});e.content.horizontalAlignment="center",e.content.verticalAlignment="middle";let r=de({text:t,visible:!0,font:ge(ne.AxisLabels)});return{type:g.Axis,visible:!0,title:e,labels:r,valueFormat:Eb(),lineSymbol:sa({color:cp})}}function un(t="Value Axis"){let e=de({text:t,visible:!0,font:ge(ne.AxisTitle)}),r=de({text:t,visible:!0,font:ge(ne.AxisLabels)});return e.content.verticalAlignment="middle",e.content.horizontalAlignment="center",{type:g.Axis,visible:!0,title:e,labels:r,valueFormat:Qs(),lineSymbol:sa({color:cp})}}function Nr(){return{type:g.Legend,visible:!0,title:de({text:"",visible:!0,font:ge(ne.LegendTitle)}),body:pp("",ge(ne.LegendText)),position:Vi.Right}}function sn(t){return{type:g.Overlay,visible:!0,created:!1,symbol:sa({useRampColor:{colorIndex:t},isHistogramOverlay:!0})}}function Br(){return[255,255,255,255]}function cr(t){return t.utilsStrings.chartType.chart}function ur(){return`Chart ${Date.now()}`}function Z1(t,e=!1){return{type:Se.SFS,style:Qt.Solid,color:e?Sn(dt):Lt({colorIndex:t??0,opacity:dt})}}function Lb(t=0){return{type:Se.SMS,style:Gt.Circle,color:Lt({colorIndex:t,opacity:dt}),size:4}}function Db(t){return{type:Se.SLS,style:yr.Solid,color:Lt({colorIndex:t,opacity:dt}),width:2}}function Nb(t=!1){return{type:Se.SMS,style:Gt.Circle,color:t?Sn(dt):Lt({colorIndex:0,opacity:dt}),size:7}}function K1(){return{type:g.SizePolicy,field:"",scaleType:$o.Linear,minSize:5,maxSize:30}}function Bb(t=!1){return{type:g.Overlays,trendLine:{type:g.Overlay,created:!1,visible:!0,symbol:{type:Se.SLS,style:yr.Solid,color:t?Sn():Lt({colorIndex:1}),width:2}}}}function $b(t,e){let r=t.countSeries;return{type:g.HeatSeries,id:r,name:r,y:"",x:"",dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)}),query:{outStatistics:[{statisticType:W.Count,onStatisticField:e??"ObjectID",outStatisticFieldName:`${W.Count}_${e}_0`.toUpperCase()}],groupByFieldsForStatistics:[]},emptyCells:{symbol:{type:Se.SFS,style:Qt.Solid,color:cn},text:t.utilsStrings.null}}}function Mb(){return{type:g.ScatterSeries,id:g.ScatterSeries,name:g.ScatterSeries,x:"",y:"",markerSymbol:Nb(),overlays:Bb(),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)})}}function Yr(t,e){let r=[],a=t.xAxis,i=t.utilsStrings.statistics.count,n,s,o=sa({opacity:Ib});switch(e===g.HeatSeries?s=_s(i):(s=un(i),s.grid=o),e){case g.BarSeries:case g.HeatSeries:{n=_s(a);break}case g.ScatterSeries:{n=un(a),n.grid=o;break}case g.RadarSeries:case g.LineSeries:case g.HistogramSeries:{n=un(a);break}case g.BoxPlotSeries:{n=_s("");break}}return n!==void 0&&r.push(n,s),r}function qb(){return{type:g.GaugeNeedle,symbol:{type:Se.SFS,color:[0,0,0,200]}}}function Rb(t){let e=[],r=t.xAxis,a=un(r);return a.needle=qb(),e.push(a),e}function kb(t){let e=t.commonStrings,r=t.objectIDField??"ObjectID",a=`${W.Count}_${r}_0`.toUpperCase(),i=e.countSeries;return{type:g.LineSeries,id:i,name:i,query:{outStatistics:[{statisticType:W.Count,onStatisticField:r,outStatisticFieldName:a}],groupByFieldsForStatistics:[]},x:"",y:a,lineSymbol:Db(t.seriesIndex),markerSymbol:Lb(t.seriesIndex),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)}),temporalBinning:{unit:Q.Day,size:0,timeAggregationType:$e.Start,trimIncompleteTimeInterval:!0,nullPolicy:st.Interpolate}}}function J1(t){return{...kb(t),type:g.RadarSeries}}function Wb(t){return{type:Se.SFS,style:Qt.Solid,color:Lt({colorIndex:t,opacity:dt})}}function Y1(t){let e=t.objectIDField??"*",r=t.commonStrings,a=`${W.Count}_Y_0`.toUpperCase(),i=r.countSeries;return{type:g.BarSeries,id:i,name:i,query:{outStatistics:[{statisticType:W.Count,onStatisticField:e,outStatisticFieldName:a}],groupByFieldsForStatistics:[]},x:"",y:a,fillSymbol:Wb(t.seriesIndex),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels),type:ne.DataLabels})}}function X1(t,e){let r=t.countSeries;return{name:r,type:g.BoxPlotSeries,id:r,fillSymbol:{type:Se.SFS,style:Qt.Solid,color:Lt({colorIndex:e,opacity:dt})},query:{},x:Di,y:""}}function jb(){return{type:g.PieTick,visible:!0,lineSymbol:sa({width:1,color:Ob})}}function Vb(){return{type:Se.SFS,style:Qt.Solid}}function eT(t,e){let r=`${W.Count}_${e}_0`.toUpperCase(),a=t.countSeries;return{type:g.PieSeries,id:a,name:a,query:{outStatistics:[{statisticType:W.Count,onStatisticField:e??"ObjectID",outStatisticFieldName:r}],groupByFieldsForStatistics:[]},x:"",y:r,fillSymbol:Vb(),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels),type:ne.DataLabels}),startAngle:-90,endAngle:270,dataLabelsCharacterLimit:11,displayCategoryOnDataLabel:!0,displayNumericValueOnDataLabel:!1,displayPercentageOnDataLabel:!0,numericValueFormat:{...Qs(),intlOptions:{minimumFractionDigits:1,maximumFractionDigits:1}},percentValueFormat:{...Qs(),intlOptions:{minimumFractionDigits:1,maximumFractionDigits:1}},ticks:jb()}}function tT(t){let e=t.objectIDField??"ObjectID",r=`${W.Count}_${e}_0`.toUpperCase(),a="Series0";return{type:g.GaugeSeries,id:a,name:a,query:{outStatistics:[{statisticType:W.Count,onStatisticField:e,outStatisticFieldName:r}]},x:""}}function ea(){return!1}function rT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,rotated:ea(),orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.BarSeries),series:[],legend:Nr()}}function iT(t,e=ur()){return{version:dr,type:g.Chart,id:e,rotated:ea(),colorMatch:!0,orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),series:[],legend:Nr(),axes:Yr(t,g.BoxPlotSeries),standardizeValues:!0,showOutliers:!1}}function aT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,rotated:ea(),orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.LineSeries),series:[],legend:Nr()}}function nT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,orderOptions:{data:{orderType:ot.Category,orderBy:Ne.Ascending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.RadarSeries),series:[],legend:Nr()}}function sT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,orderOptions:{data:{orderType:ot.YValue,orderBy:Ne.Descending}},title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),series:[],legend:{...Nr(),displayNumericValue:!1,displayPercentage:!0}}}function oT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),series:[],axes:Rb(t)}}function lT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.ScatterSeries),series:[Mb()],legend:Nr()}}function dT(t,e){return{version:dr,type:g.Chart,id:ur(),title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),background:Br(),axes:Yr(t,g.HeatSeries),series:[$b(t,e)],legend:{...Nr(),position:Vi.Bottom}}}function _b(){return{type:g.Overlays,mean:sn(1),median:sn(2),standardDeviation:sn(3),comparisonDistribution:sn(4)}}function zb(){return{type:Se.SFS,style:Qt.Solid,color:Lt({colorIndex:0,opacity:dt})}}function Ub(){return{type:g.HistogramSeries,id:g.HistogramSeries,name:g.HistogramSeries,visible:!0,dataTooltipVisible:!0,dataTooltipReverseColor:!1,assignToSecondValueAxis:!1,x:"",binCount:32,overlays:_b(),dataTransformationType:Oe.None,fillSymbol:zb(),dataLabels:de({text:"",visible:!1,font:ge(ne.DataLabels)})}}function cT(t,e=ur()){return{version:dr,type:g.Chart,id:e,colorMatch:!0,title:de({text:cr(t),visible:!0,font:ge(ne.ChartTitle)}),subtitle:de(),footer:de({text:"",visible:!0,font:ge(ne.DescriptionText)}),background:Br(),axes:Yr(t,g.HistogramSeries),series:[Ub()],legend:Nr()}}var zs={behaviorAfterLimit:Dr.Reject,maxCategoryCount:Number.NaN,maxBarChartSeriesCount:100,maxBarUniqueSeriesCountTotal:1e4,maxBarTwoSeriesCountPerSeries:1e3,maxBarTwoSeriesCountTotal:2e3,maxBarThreePlusSeriesCountPerSeries:100,maxBarThreePlusSeriesCountTotal:2e3,maxScatterPointsBeforeAggregation:1e4,maxScatterPointsAfterAggregation:1e4,maxLineChartSeriesCount:100,maxLineUniqueSeriesCountTotal:1e4,maxLineTwoSeriesCountPerSeries:5e3,maxLineTwoSeriesCountTotal:1e4,maxLineThreePlusSeriesCountPerSeries:1e3,maxLineThreePlusSeriesCountTotal:1e4,maxPieChartSliceCountTotal:300,maxGaugeByFeaturesLimit:50,maxBoxPlotSeriesCount:100,maxBoxUniqueSeriesCountTotal:1e4,maxBoxTwoSeriesCountPerSeries:1e3,maxBoxTwoSeriesCountTotal:2e3,maxBoxThreePlusSeriesCountPerSeries:100,maxBoxThreePlusSeriesCountTotal:2e3,maxBoxPlotOutlierLimit:1e4,maxHeatChartCellLimit:1e4};function Xr(t){let e={...zs};return t!==void 0&&Object.keys(zs).forEach(r=>{let a=r;e[a]=t[a]??zs[a]}),e}function wn(){return{maxScatterCellsPerQuery:500,maxScatterCellsPerQueryForStandard:175,maxElementsPerSelectionQuery:25,maxOIDsPerSelectionQuery:2e3,maxOperandsPerWhereClause:50}}function uT(t,e){let r;switch(t){case W.Average:{r=e.utilsStrings.statistics.mean;break}case W.ContinuousPercentile:{r=e.utilsStrings.statistics.median;break}case W.Sum:{r=e.utilsStrings.statistics.sum;break}case W.Minimum:{r=e.utilsStrings.statistics.minimum;break}case W.Maximum:{r=e.utilsStrings.statistics.maximum;break}case W.Variance:{r=e.utilsStrings.statistics.variance;break}case W.DiscretePercentile:{r=e.utilsStrings.statistics.discretePercentile;break}case W.NoAggregation:{r=e.utilsStrings.statistics.noAggregation;break}case W.Count:default:{r=e.utilsStrings.statistics.count;break}}return r}function pT(t,e){let r;switch(t){case $e.End:{r=e.timeAggregationTypes.end;break}case $e.Start:{r=e.timeAggregationTypes.start;break}default:r="";break}return r}function Hb(){return yt.Side}function fT(t){return t.utilsStrings.notAvailable}var Gb=0,Qb="_arcgis_charts_outliers",Zb="_arcgis_charts_z_score",hT=[210,210,210,255*dt],mT=" percentage ";var A={aria:{defaultChartItemRole:"figure"},title:{marginBottom:8,wrap:!0},subtitle:{marginBottom:10,wrap:!0},rotated:!1,legendProperties:{legendLabels:{marginLeft:5,marginRight:5,truncate:!1,applyOnClones:!0,wrap:!0,maxWidth:200},valueLabels:{wrap:!0,maxWidth:200},legendTitle:{wrap:!0,maxWidth:220,marginLeft:10,marginRight:10,marginTop:10},legendMarkersSize:14,legendLabelReducedOpacity:.5,rectangleMarkerRadius:3,roundedMarkerRadius:12,legendPaddingRightWithScrollbarVisible:10,maxHeight:100,marginTop:2,marginBottom:2,marginLeft:0,marginRight:0,paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,position:Vi.Right},footer:{wrap:!0,horizontalCenter:"center",verticalCenter:"middle",align:"center"},axisLabel:{rotation:0,align:"center",horizontalCenter:"center",verticalCenter:"top",dy:5,paddingTop:5,paddingRight:5,paddingLeft:5,maxWidth:Number.NaN},axisTickLength:5,rotatedAxisLabel:{rotation:-45,horizontalCenter:"left",verticalCenter:"bottom",dy:6,paddingTop:5,paddingLeft:0,paddingRight:5},histogramAxisLabel:{rotation:0,horizontalCenter:"center",verticalCenter:"middle",dy:0,dx:0,paddingLeft:3,paddingRight:3},xAxisTitleLabel:{align:"center",valign:"middle",rotation:0,fontSize:10,wrap:!0},yAxisTitleLabel:{align:"center",valign:"middle",rotation:270,wrap:!0},titleLabel:{align:"center",wrap:!0},subtitleLabel:{align:"center",wrap:!0},horizontalSurfaceGuideLabels:{horizontalCenter:"right",align:"right",verticalCenter:"middle",wrap:!0},horizontalLineGuideLabels:{horizontalCenter:"right",align:"right",verticalCenter:"top",wrap:!0},verticalSurfaceGuideLabels:{horizontalCenter:"center",verticalCenter:"top",valign:"top"},verticalLineGuideLabels:{horizontalCenter:"right",verticalCenter:"bottom",valign:"top",wrap:!0,rotation:90},guideAbove:!1,cursorCrosshair:{style:{type:Se.SLS,style:yr.Dash,color:[0,0,0,102],width:1},horizontalLineVisible:!1,verticalLineVisible:!1},gauge:{innerRadius:80,radius:80,startAngle:-180,endAngle:180,innerLabelToInnerChartRatio:.5,axisLabelToInnerChartRatio:.13,innerLabelAutoMinFontSize:14,innerLabelAutoMaxFontSize:100,axisLabelAutoMinFontSize:14,axisLabelAutoMaxFontSize:40,gaugeMinGridDistance:1,axisMinimum:0,axisMaximum:100,numberOfLabelIntervals:5,numberOfTicksBetweenTwoLabels:4,maximumNumberOfLabelIntervals:24,paddingTop:10,paddingBottom:10,paddingRight:5,paddingLeft:5},gaugeTicksLength:7,gaugeInnerLabel:{horizontalCenter:"center",verticalCenter:"middle"},gaugeNeedle:{startWidth:10,endWidth:1,innerRadius:25,displayPin:!1},gaugeFirstLabelId:"arcgis_charts_gauge_first_label",gaugeLastLabelId:"arcgis_charts_gauge_last_label",headerContainer:{layout:"vertical",width:"100%",paddingBottom:5},footerContainer:{layout:"vertical",width:"100%",paddingTop:5,paddingBottom:15},paddingMinSize:0,marginMinSize:0,chartPaddingMinSize:7,chartPaddingRightWhenLegendNotOnRight:15,chartAndLegendContainer:{paddingTop:0},chartContainer:{paddingBottom:0,paddingTop:15},chartContainerPaddingTopWhenRotated:5,dataLabelInitialize:{strokeWidth:0,applyOnClones:!0},dataLabel:{align:"center",horizontalCenter:"center",valign:"bottom",verticalCenter:"top",dy:-3},dataLabelRotated:{align:"right",horizontalCenter:"right",valign:"middle",verticalCenter:"middle",dx:2},dataLabelStackedRotated:{align:"center",horizontalCenter:"center",valign:"middle",verticalCenter:"middle"},dataLabelStackedNonRotated:{align:"center",horizontalCenter:"center",valign:"middle",verticalCenter:"middle"},dataLabelNegative:{paddingTop:5,paddingRight:5},rotatedChartPadding:{paddingTop:2,paddingRight:2},scatterplotSeries:{strokeOpacity:0,r2:Number.NaN,trendLinePoints:[{},{}]},histogramSeries:{normalDistribNumberOfPoints:100},lineSeries:{strokeWidth:2,lineSmoothed:!1,lineSmoothedKind:Do.Bezier,showArea:!1,areaOpacity:.25,markerVisible:!0,rotated:!1,stackedType:yt.Side,stackNegativeValuesToBaseline:!0,marker:{markerBigSize:7,markerSizeThresholdForTooltipDisplay:9,markerStyle:Gt.Circle}},buffer:!1,treatZeroValueAs:1e-4,elementLimitForSmoothRendering:1e3,pieChart:{dataLabels:{maxWidth:100,wrap:!1},dataLabelsOffset:10,dataLabelsInside:!1,chartRadius:80,chartOptimizedRadius:70,innerRadius:Gb,min:-90,max:270,displayCategoryOnLegend:!0,displayCategoryOnTooltip:!0,displayCategoryOnDataLabel:!0,displayNumericValueOnLegend:!1,displayNumericValueOnDataLabel:!0,displayNumericValueOnTooltip:!0,displayPercentageOnLegend:!1,displayPercentageOnDataLabel:!1,displayPercentageOnTooltip:!0,sliceGrouping:{sliceId:hn.defaultGroupOfSlicesId,percentageThreshold:0,fillSymbol:{type:Se.SFS,color:[210,210,210,255*dt]}},defaultPadding:0,alignDataLabels:!1,ticksOpacity:1,minimumSize:20,technicalFieldSliceId:"arcgis_charts_slice_id",technicalFieldSlicePercent:"arcgis_charts_slice_percent",technicalFieldGroupedSlices:"arcgis_charts_grouped_slices"},pieSliceCustomLabelName:"customLabel",yAxisLabelMaxWidth:100,xAxisLabelMaxWidth:75,axisLabelPadding:1.5,categoryAxisLabelPadding:3,seriesSort:Ne.Ascending,technicalSortingFieldBySum:"arcgis_charts_category_sum",technicalSortingFieldByPercent:"arcgis_charts_category_first_series_percent",technicalFieldSplitByField:"arcgis_charts_split_by_field",color:[0,0,0,255],chartEllipsis:"...",backgroundColor:[255,255,255,255],grayColor:cn,xAxisMinGridDistance:120,xCategoryAxisMinGridDistance:40,yAxisMinGridDistance:40,yCategoryAxisMinGridDistance:20,secondRotatedValueAxisMinGridDistance:80,staggerMinGridDistance:40,shortestMinGridDistance:20,maxNumberOfXAxisLabelsInWrapModeForDateAxis:15,maxNumberOfXAxisLabelsInWrapMode:20,lineWidth:1,loaderRotationSpeed:400,loaderIntervalTimeout:400,loaderLabelFontSize:20,selectionTheme:{selectedElementsTheme:{elementOutlineColor:[0,255,255,255],elementOutlineWidth:5}},columnTooltipPosition:"pointer",guideTooltipPosition:"pointer",markerTooltipPosition:"fixed",sliceTooltipPosition:"fixed",patternLineProperties:{width:5,height:5,strokeWidth:1,tileSize:50,diagonalTileSize:1200},patternRectProperties:{rectWidth:9,rectHeight:9,width:10,height:10,strokeWidth:.3,fillOpacity:0},originalCategoryValue:"arcgis_charts_original_category_value",originalYCategoryValue:"arcgis_charts_original_category_y_value",originalDateValue:"arcgis_charts_original_date_value",dateBinningRange:"arcgis_charts_bin_range",originalServerBinningRange:"arcgis_charts_server_bin_range",dateBinModel:"arcgis_charts_bin_model",xAxisField:"arcgis_charts_axis_field",nullValue:"arcgis_charts_null",queryMaxFloatPrecision:10,dateFormatUTC:{timeZone:"UTC",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},dayDefaultFormat:{day:"numeric",month:"short"},weekDefaultFormat:{day:"numeric",month:"short"},rendererOtherValue:"arcgisChartsrendererOtherValue",rendererSymbolField:"arcgis_charts_renderer_symbol",rendererSymbolFieldForHistogram:"symbol",scatterplotAggregationFields:{dataContextXMinField:"arcgis_charts_xmin",dataContextXMaxField:"arcgis_charts_xmax",dataContextYMinField:"arcgis_charts_ymin",dataContextYMaxField:"arcgis_charts_ymax",dataContextCountDistinctX:"distinctX",dataContextCountDistinctY:"distinctY",queryNumberOfFeatures:"numberOfFeatures",queryNumberOfAggregatedFeatures:"numberOfAggregatedFeatures",xStep:"xStep",yStep:"yStep",rowCount:"rowCount",columnCount:"columnCount",realGridSize:"realGridSize"},dataTooltipVisible:!0,dataTooltipStyle:{outline:{type:Se.SLS,color:[255,255,255,255],width:1}},dataTooltipStyleReversed:{color:[255,255,255,255],outline:{type:Se.SLS,width:3}},tooltipWidth:300,axisLabelOveredOpacity:.5,generalFontSize:10,actionMode:Tb.MultiSelectionWithCtrlKey,debounceTime:100,chartDefaultPaddingRight:0,htmlEmptyContent:"<p></p>",boxPlot:{boxPlotCategory:"arcgis_charts_box_plot_category",boxPlotOutliersSuffix:"_arcgis_charts_outliers",boxPlotOutliersVisibility:!1,boxPlotStandardizeValuesVisibility:!1,boxPlotOutliersSize:4,boxPlotLineWidth:2,boxPlotOutlierId:"is_arcgis_charts_outlier",boxPlotMeanLineMarkerId:"is_arcgis_charts_mean_marker",boxPlotWhiskersColor:[153,153,153,178.5],boxPlotTooltipLabelWidth:250},binTemporalData:!0,lastTemporalBin:"is_arcgis_charts_last_bin",options:{hideEmptySeries:!0,showEmptySeries:!1,replaceNoValueCategoryWithZero:!0,hideZeroCountCategories:!1,autoInverseDataLabelTextColor:!1},nullCategory:{text:"null",symbol:{type:Se.SFS,color:cn,outline:{type:Se.SLS,style:yr.Solid,color:cn,width:1}}},classBreaks:{breaksCount:5}},ei={LegendItemVisibilityChange:"arcgisChartsJSLegendItemVisibilityChange",RenderingComplete:"arcgisChartsJSRenderingComplete",SeriesColorsChange:"arcgisChartsJSSeriesColorChange",AxesMinMaxChange:"arcgisChartsJSAxesMinMaxChange",SelectionComplete:"arcgisChartsJSSelectionComplete",TooManySelectedElements:"arcgisChartsJSTooManySelectedElements",SeriesOrder:"arcgisChartsJSSeriesOrder"};function ti(t){return{detail:t,composed:!0,cancelable:!0,bubbles:!0}}function yT(t,e){e&&e.dispatchEvent(new window.CustomEvent(ei.LegendItemVisibilityChange,ti(t)))}function gT(t){t&&t.dispatchEvent(new window.CustomEvent(ei.RenderingComplete,ti()))}function bT(t){let{data:e,htmlContainer:r}=t;r&&r.dispatchEvent(new window.CustomEvent(ei.SelectionComplete,ti(e)))}function vT(t){t&&t.dispatchEvent(new window.CustomEvent(ei.TooManySelectedElements,ti()))}function ST(t){let{data:e,htmlContainer:r,chartId:a,colorMatchApplied:i}=t;r&&r.dispatchEvent(new window.CustomEvent(ei.SeriesColorsChange,ti({chartId:a,data:e,colorMatchApplied:i})))}function wT(t,e){e&&e.dispatchEvent(new window.CustomEvent(ei.AxesMinMaxChange,ti(t)))}function Kb(t){let{data:e,htmlContainer:r}=t;r&&e&&r.dispatchEvent(new window.CustomEvent(ei.SeriesOrder,ti(e)))}function Jb(t){return t!==void 0&&t!==Qt.Solid&&t!==Qt.Null}function xT(t,e){let r="",a=(e??0)/2,i=0-a,n=0+a,s=0-a,o=0+a;switch(t){case Gt.Circle:r=`M ${i},0 a ${a},${a} 0 1,0 ${a*2},0 a ${a},${a} 0 1,0 ${-a*2},0`;break;case Gt.Cross:r=`M ${i},0 L ${n},0 M 0,${s} L 0,${o} E`;break;case Gt.Diamond:r=`M ${i},0 L 0,${s} L ${n},0 L 0,${o} L ${i},0 Z`;break;case Gt.Square:r=`M ${i},${o} L ${i},${s} L ${n},${s} L ${n},${o} L ${i},${o} Z`;break;case Gt.Triangle:r=`M ${i},${o} L 0,${s} L ${n},${o} L ${i},${o} Z`;break;case Gt.X:r=`M ${i},${o} L ${n},${s} M ${i},${s} L ${n},${o} E`;break}return r}var Fi={...A,titleAndSubtitlePaddingBottom:5,chartPadding:5,footerContainer:{...A.footerContainer,paddingTop:0,paddingBottom:0},headerContainer:{...A.headerContainer,paddingBottom:18},chartContainer:{...A.chartContainer},dataLabel:{...A.dataLabel,verticalCenter:"bottom"},scrollbarPadding:12,zIndexes:{guide:100,scatterplotTrendLine:2,lineSeries:1,axisLineLayer:30},verticalSurfaceGuideLabels:{wrap:!0},verticalLineGuideLabels:{wrap:!0,rotation:90},horizontalSurfaceGuideLabels:{wrap:!0},horizontalLineGuideLabels:{wrap:!0},overlayId:{scatterplotTrendLine:"arcgis_charts_scatter_plot_trendline",histogramMean:"arcgis_charts_histogram_mean",histogramMedian:"arcgis_charts_histogram_median",histogramStdDev:"arcgis_charts_histogram_std_dev",histogramNormalDistribution:"arcgis_charts_histogram_normal_distribution"},axisLabelSpacing:{verticalAxisLabelSidePadding:8,horizontalAxisLabelPaddingTop:6},legendPadding:20,heatChart:{gradientHeatRules:{minColor:[255,255,200,255],maxColor:[255,0,0,255],outsideRangeLowerColor:[250,250,250,255],outsideRangeUpperColor:[0,0,255,255]},legend:{position:Vi.Bottom,chartPadding:40,legendPadding:20,width:70,bottomHeight:20,topHeight:50,titleHeight:10,titlePadding:10,minMaxLabelPadding:3},emptyCells:{symbol:{type:Se.SFS,style:Qt.Solid,color:A.grayColor},text:"null"},includeLeapDay:!1},heatChartLabelPadding:{paddingTop:2},heatChartFirstDayOfWeek:7,pieChartDataLabel:{minWidth:30},focusableThreshold:500};function Yb(t){let e;return t?.[0]!==void 0&&(e=t.reduce((r,a)=>({...r,xmin:Math.min(r.xmin,a.xmin),xmax:Math.max(r.xmax,a.xmax),ymin:Math.min(r.ymin,a.ymin),ymax:Math.max(r.ymax,a.ymax)}),t[0])),e}function ta(t){let{value:e,dataContext:r,specificField:a,keepNullValues:i=!1,useRendererLabel:n=!1,config:s}=t,o=e,{originalCategoryValue:l,originalDateValue:d}=A;if(r!==void 0){let c=n?pv(r):void 0;a!==void 0&&r[a]!==void 0?o=r[a]:c!==void 0?o=c:r[d]!==void 0?o=r[d]:r[l]!==void 0?o=r[l]:r[lt]!==void 0&&(o=r[lt]),!i&&o===null&&(o="null",s?.series?.[0].type===g.BarSeries&&(o=s.series?.[0]?.nullCategory?.text??Fi.nullCategory?.text??o))}return o}function Xb(t){return t?.[A.originalCategoryValue]}function ra(t){let{arrayToSort:e,orderBy:r,sortingField:a,forceAscendingOrder:i,isNonAggregated:n,sortByCategory:s,preferLabel:o,isPieOrByFieldsChart:l}=t;if(e!==void 0&&e.length>1){let d=r===Ne.Descending&&i!==!0;e.sort((c,u)=>{let f=0,p=c[a];s===!0&&!l&&(p=ta({value:`${c[a]?.toString()}`,dataContext:c,specificField:o?A.xAxisField:void 0}));let h=u[a];return s===!0&&!l&&(h=ta({value:`${u[a]?.toString()}`,dataContext:u,specificField:o?A.xAxisField:void 0})),n===!0&&d&&s===!0&&(p=Number.isNaN(Number.parseFloat(`${p?.toString()}`))?p:Number.parseFloat(p),h=Number.isNaN(Number.parseFloat(`${h?.toString()}`))?h:Number.parseFloat(h)),s===!0&&(c[A.originalCategoryValue]===null||p===null)||c[hn.defaultGroupOfSlicesId]===!0?f=1:s===!0&&(u[A.originalCategoryValue]===null||h===null)||u[hn.defaultGroupOfSlicesId]===!0?f=-1:typeof p=="string"&&typeof h=="string"?(f=p.localeCompare(h,void 0,{numeric:!0}),d&&(f*=-1)):p===void 0?f=d?-1:1:h===void 0?f=d?1:-1:p!==null&&h!==null&&(p>h?f=d?-1:1:p<h&&(f=d?1:-1)),f})}}function ev(t){let{arrayToSort:e,orderBy:r,sortingField:a,fieldList:i,isByFieldsChart:n,preferLabel:s}=t;e!==void 0&&e.length>1&&!_e(a)&&r!==void 0&&r.length>0&&e.sort((o,l)=>{let d=o[a];s&&n&&typeof d=="string"&&(d=Ys(i,d));let c=r.indexOf(d?.toString()??"");c===-1&&(c=r.length);let u=l[a];s&&n&&typeof u=="string"&&(u=Ys(i,u));let f=r.indexOf(u?.toString()??"");return f===-1&&(f=r.length),c-f})}function fp(t){let{statsMap:e,dataContext:r,chartLimits:a}=t,i=!1;if(e!==void 0){let{maxScatterPointsBeforeAggregation:n}=Xr(a),{queryNumberOfFeatures:s}=A.scatterplotAggregationFields;i=(e.get(s)??Number.NaN)>=n}else r!==void 0&&(i=A.scatterplotAggregationFields.dataContextXMinField in r);return i}function tv(t){let e=!0,r=K(t.series);if(r===g.BarSeries||r===g.LineSeries||r===g.ComboLineAndBarSeries){let a=X(t.series);e=a!==x.BarAndLineNoAggregation&&a!==x.BarAndLineSplitByNoAggregation}return e}function rv(t){return X(t.series)!==x.PieNoAggregation}function iv(t){let{dataContext:e,chartConfig:r,chartLimits:a}=t,i=!0;if(r!==void 0)switch(K(r.series)){case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:i=tv(r);break;case g.ScatterSeries:i=fp({dataContext:e,chartLimits:a});break;case g.PieSeries:i=rv(r);break}return i}function av(t,e){let r=t;switch(e){case Oe.Log:r=`log(${t})`;break;case Oe.Sqrt:r=`power(CAST(${t} AS FLOAT),0.5)`;break}return r}function Ii(t){let e=new Date(t).valueOf();return Number.isNaN(e)||(e=new Intl.DateTimeFormat("en-US",A.dateFormatUTC).format(t).replace(",","")),e}function mn(t){let{dataToConvert:e,x:r,y:a,fieldList:i}=t,n=[];if(e){let s=e[Ar];Object.entries(e).forEach(([o])=>{if(o!==""&&o!==Ar&&o in e){let l={[r]:Ys(i,o),[a]:e[o],[A.xAxisField]:o,[A.originalCategoryValue]:o};s!==void 0&&(l[Ar]=s),e[`${A.rendererSymbolField}_${o}`]!==void 0&&(l[A.rendererSymbolField]=e[`${A.rendererSymbolField}_${o}`]),n.push(l)}})}return n}function nv(t,e){let r=!0;if(t!==void 0&&t.length>1&&!_e(e)){let a=0,i=0,n=0;t.forEach(s=>{let o=s[e];!Wv(o)||o===0?n+=1:o>0?a+=1:i+=1}),r=n===t.length||a>=0&&i===0||a===0&&i>=0}return r}function on(t){let{countTotal:e,countPerSeries:r,numberOfSeries:a}=t,i,n=[];return typeof e=="number"&&Number.isFinite(e)&&n.push(e),typeof r=="number"&&Number.isFinite(r)&&n.push(r*a),n.length>0&&(i=Math.min(...n)),i}function hp(t,e){let r,{maxBarChartSeriesCount:a,maxBarUniqueSeriesCountTotal:i,maxBarTwoSeriesCountPerSeries:n,maxBarTwoSeriesCountTotal:s,maxBarThreePlusSeriesCountPerSeries:o,maxBarThreePlusSeriesCountTotal:l,maxLineChartSeriesCount:d,maxLineUniqueSeriesCountTotal:c,maxLineTwoSeriesCountPerSeries:u,maxLineTwoSeriesCountTotal:f,maxLineThreePlusSeriesCountPerSeries:p,maxLineThreePlusSeriesCountTotal:h,maxPieChartSliceCountTotal:y,maxGaugeByFeaturesLimit:m}=Xr(e),b=K(t.series),v=t.series.length===0?1:t.series.length,S=X(t.series);switch(b){case g.ComboLineAndBarSeries:case g.BarSeries:v<=a&&(v===1?r=i:v===2?r=on({countTotal:s,countPerSeries:n,numberOfSeries:v}):v>2&&(r=on({countTotal:l,countPerSeries:o,numberOfSeries:v})));break;case g.LineSeries:v<=d&&(v===1?r=c:v===2?r=on({countTotal:f,countPerSeries:u,numberOfSeries:v}):v>2&&(r=on({countTotal:h,countPerSeries:p,numberOfSeries:v})));break;case g.PieSeries:r=y;break;case g.GaugeSeries:r=m;break;case g.ScatterSeries:case g.HistogramSeries:case g.BoxPlotSeries:}return(S===x.BarAndLineNoAggregation||S===x.BarAndLineMultiFields)&&r!==void 0&&(r=Math.ceil(r/v)),r}function ku(t,e){let r=t;if(Number.isFinite(t)){let{factor:a,offset:i}=e??{};Number.isFinite(a)&&(r*=a),Number.isFinite(i)&&(r+=i)}return r}function sv(t){let e=!1;if(t!==void 0){let r=t.replace(" ",""),a=/^%(0*100{1,1}\.?((?:\.)0*)?$)|(^%0*\d{0,2}\.?((?:\.)\d*)?)$/u,i=/^(0*100{1,1}\.?((?:\.)0*)?%$)|(^0*\d{0,2}\.?((?:\.)\d*)?%)$/u;e=a.test(r)||i.test(r)}return e}function CT(t){let e;if(sv(t)){let r=/%(\d{1,3}(.\d+)?)$/u,a=/(\d{1,3}(.\d+)?)%$/u,i=t.replace(" ",""),n=r.exec(i)?.[1]??a.exec(i)?.[1];n!==void 0&&(e=Number(n))}return e}function mp(t){let{stringToTruncate:e,characterLimit:r,ellipsis:a=A.chartEllipsis}=t,i=e;return typeof r=="number"&&Number.isFinite(r)&&r>0&&r<e.length&&(i=e.slice(0,r),i=`${i}${a}`),i}function TT(t){let{input:e,charsPerLine:r}=t,a=e;if(r>0&&e.length>r){let i=e.lastIndexOf(" ",r),n=e.lastIndexOf("-",r),s=Math.max(i,n),o=s===n&&n>0,l=s>0?s+(o?1:0):r,d=Math.min(r,l),c=e.slice(0,d).trimEnd(),u=e.slice(d).trimStart();u.length>r&&(u=mp({stringToTruncate:u,characterLimit:Math.max(1,r-1)})),a=`${c}
4
+ ${u}`}return a}function FT(t,e=":"){return t?`\u200F${e}`:`\u200E${e}`}function IT(t){return e=>{let r=typeof e!="string"?e?.toString()??"":e;return!_e(r)&&r!==A.htmlEmptyContent&&(r=mp({stringToTruncate:r,characterLimit:t})),r}}function ov(t){let e=/[[]/gu,r=/[\]]/gu,a=/[{]/gu,i=/[}]/gu,n=/[']/gu;return t=t.replace(e,"[["),t=t.replace(r,"]]"),t=t.replace(a,"{{"),t=t.replace(i,"}}"),t=t.replace(n,"''"),t}function lv(t,e){let r="";return t!==void 0&&(r=`${e==="amChartsV5"?"fontStyle":"font-style"}:${t};`),r}function dv(t,e){let r="";return t===!0&&(r=`${e==="amChartsV5"?"letterSpacing":"letter-spacing"}:1px;`),r}function OT(t){let{textSymbol:e,placeholderString:r,format:a,axisLabelsBehavior:i,defaults:n}=t,s=lv(e?.font?.style,a),o=dv(e?.kerning,a),l=r??e?.text??"";if(a==="html"){let{wrap:d,maxWidth:c}=n??{};i===No.Wrap&&(d=!0,c=c??A.xAxisLabelMaxWidth);let u=d===!0&&Number.isFinite(c)?`max-width: ${c}px; word-break: break-word;`:"";l=`<p style="margin:0;${s}${o}${u}">${l}</p>`}else l=ov(l),(s!==""||o!=="")&&(l=`[${s}${o}]${l}[/]`);return l}function cv(t){return t?t.replace(/[A-Z]/gu,e=>`-${e.toLowerCase()}`):void 0}var AT=[g.BarSeries,g.BoxPlotSeries,g.LineSeries,g.PieSeries,g.HistogramSeries,g.ScatterSeries],PT=1,ET={PNG:"png"},Ci={ChartRenderer:1,LayerRenderer:2};function LT(t){let{chartConfig:e,queryObject:r}=t,a=!1;if(e.chartRenderer)a=!0;else{let{series:i}=e,n=K(i),s=X(i),o=pr(e),l=fr({seriesConfig:o,queryObject:r}),d=se(r)?.renderer;switch(d?.type){case Xe.Simple:a=n===g.HistogramSeries||n===g.ScatterSeries||s===x.BarAndLineMonoField||s===x.BoxPlotMonoField||s===x.BoxPlotMultiFields||s===x.BoxPlotMonoFieldAndCategory||s===x.BarAndLineNoAggregation&&i.length===1&&!l;break;case Xe.UniqueValue:{let c=d?.field,u=Ze(o.query?.where),{x:f}=o;a=(s===x.BoxPlotMonoFieldAndSplitBy||s===x.BoxPlotMultiFieldsAndSplitBy||s===x.BoxPlotMonoFieldAndCategoryAndSplitBy||s===x.BarAndLineSplitByNoAggregation||s===x.BarAndLineSplitBy)&&c===u||(s===x.BoxPlotMonoFieldAndCategory||s===x.PieFromCategory||s===x.BarAndLineMonoField)&&c===f||s===x.BarAndLineNoAggregation||s===x.PieNoAggregation||n===g.ScatterSeries}break;case Xe.PieChart:a=s===x.PieFromFields||s===x.BarAndLineFromFields||s===x.BarAndLineMultiFields||s===x.BarAndLineMonoField||s===x.BoxPlotMonoField||s===x.BoxPlotMultiFields||s===x.BoxPlotMonoFieldAndCategory||s===x.BoxPlotMultiFieldsAndCategory;break;case Xe.ClassBreaks:a=n===g.HeatSeries||n===g.ScatterSeries||s===x.BarAndLineNoAggregation||s===x.PieNoAggregation;break;case Xe.Dictionary:case Xe.DotDensity:case Xe.Heatmap:break}}return a}function uv(t,e){return cv(t?.type)??e?.type}function pv(t){let e=A.rendererSymbolField,r=e in t?e:void 0;if(!r){let a=t[A.originalCategoryValue];r=Object.keys(t).find(i=>{let n=t[i];return i.includes(e)&&n?.label&&n?.uniqueValue===a}),r||(r=Object.keys(t).find(i=>i.includes(e))??"")}return t[r]?.label}function fv(t){return t?.type!==void 0&&(t.color!==void 0||t.label!==void 0||t.style!==void 0||t.outline!==void 0)}function yp(t){let{symbolField:e,dataItem:r,rendererSymbol:a,rendererOrigin:i}=t,n=!1;if(!fv(a))delete r[e];else{let s={...a};s.color!==void 0&&i===Ci.LayerRenderer&&(s.color[3]=dt*255),i===Ci.LayerRenderer&&(delete s.style,delete s.outline,delete s.label),r[e]=s,n=!0}return n}function hv(t){let{renderer:e,seriesConfig:r,chartSubType:a,dataItem:i,rendererOrigin:n}=t,s,o=!1,l=K(r),{outline:d,attributes:c}=e;return c.forEach(u=>{let{field:f}=u,{color:p,label:h}=u,y;Array.isArray(p)&&p?.length===4?y=p:p&&"toRgba"in p&&(y=p.toRgba());let m=!1,b=!0;switch(l){case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:case g.RadarSeries:if(a!==x.BarAndLineFromFields){let v=r.find(S=>S.query?.outStatistics?.[0]?.onStatisticField===f);v!==void 0&&"y"in v?f=[v.y].flat()[0]:f=""}m=a!==x.BarAndLineFromFields||f===i[A.originalCategoryValue];break;case g.PieSeries:m=a===x.PieFromFields&&f===i[A.originalCategoryValue];break;case g.BoxPlotSeries:a===x.BoxPlotMonoField||a===x.BoxPlotMonoFieldAndCategory?m=f===r[0].y:f&&(a===x.BoxPlotMultiFields||a===x.BoxPlotMultiFieldsAndCategory)&&(m=r.map(v=>v.y).flat().includes(f)),b=!1;break}m&&y&&(s={type:Se.SMS,color:y,label:b&&h?h:void 0},d!=null&&(s.outline=d),yp({dataItem:i,symbolField:a===x.BarAndLineFromFields||a===x.PieFromFields?A.rendererSymbolField:`${A.rendererSymbolField}_${f}`,rendererSymbol:s,rendererOrigin:n})&&(o=!0))}),{rendererSymbol:s,colorMatchApplied:o}}function mv(t){let{seriesConfig:e,chartSubType:r,rendererType:a}=t,i=A.rendererSymbolField;if(a===Xe.UniqueValue){if(Cp(r)){let n=ct({where:e.query?.where,keepSurroundingQuotes:!1,escape:!1});n===null?i=A.nullValue:r===x.BarAndLineSplitBy&&typeof e.y=="string"?i=e.y:r===x.BarAndLineSplitByNoAggregation&&typeof e.y=="string"?i=`${e.y}_${n}`:i=`${n}`}}else if(a===Xe.PieChart)switch(r){case x.BoxPlotMultiFields:i=Array.isArray(e.y)?e.y.flat():e.y;break;case x.BarAndLineMonoField:case x.BarAndLineMultiFields:case x.BoxPlotMonoField:case x.BoxPlotMonoFieldAndCategory:case x.BoxPlotMultiFieldsAndCategory:i=e.y;break}return i}function gp(t){let{seriesConfig:e,chartSubType:r,rendererType:a,dataItem:i}=t,n=mv({seriesConfig:e,chartSubType:r,rendererType:a});return n instanceof Array&&e.type===g.BoxPlotSeries&&a===Xe.PieChart&&i!==void 0&&(n=n.find(s=>s===i[Di])??n[0]),n=n!==A.rendererSymbolField?`${A.rendererSymbolField}_${n.toString()}`:n,n}function yv(t){let{chartRenderer:e,queryObject:r}=t,a=e!==void 0?{...se(r),renderer:ao.fromJSON(e)}:se(r);return new Qg({layer:a})}async function gv(t){let{seriesConfig:e,dataItem:r,renderer:a,rendererType:i,rendererOrigin:n,chartSubType:s,splitByField:o,graphicTemplate:l,rendererFieldNames:d,mapAttributesToSymbol:c}=t,u,f=!1;if(i===Xe.PieChart){let p=hv({renderer:a,seriesConfig:e,chartSubType:s,dataItem:r,rendererOrigin:n});u=p.rendererSymbol,f=p.colorMatchApplied}else if(r?.[hn.defaultGroupOfSlicesId]!==!0){let{x:p}=e[0],h=new Map;o&&o.trim()!==""?e.forEach(y=>{if(y.type===g.BarSeries||y.type===g.LineSeries||y.type===g.BoxPlotSeries||y.type===g.RadarSeries){let m=gp({seriesConfig:y,chartSubType:s,rendererType:i,dataItem:r}),b=ct({where:y.query?.where,normalize:!0,keepSurroundingQuotes:!1,escape:!1});h.set(m,{...r,[o]:b})}}):e[0].type===g.HeatSeries&&i===Xe.ClassBreaks?h.set(A.rendererSymbolField,{[te.valueField]:r[te.valueField]}):h.set(K(e)===g.HistogramSeries?A.rendererSymbolFieldForHistogram:A.rendererSymbolField,{...r,[p]:Xb(r)});try{let y=Array.from(h.entries()),m=l.clone();m.layer=l.layer;let b=a?.uniqueValueInfos;for(let v=0;v<y.length;v+=1){let[S,C]=y[v];if(Wu({mode:"encode",x:p,splitByField:o,attributes:C}),d&&d.length>0&&Object.keys(C).forEach(F=>{d.includes(F)||delete C[F]}),m.attributes=C,c?.has(JSON.stringify(C)))u=c.get(JSON.stringify(C));else{if(u=(await Li.getDisplayedSymbol(m))?.toJSON(),u!=null){if(u.color===void 0){let I=(await Li.getDisplayedColor(m))?.toJSON();I&&(u.color=I.length===4?I:[...I,255])}let F=await Li.getLegendLabel(m);F!=null&&F!==""&&(u.label=F,u.uniqueValue=b?.find(I=>I.label===F)?.value??void 0)}c?.set(JSON.stringify(C),u)}Wu({mode:"revert",x:p,splitByField:o,attributes:r}),yp({dataItem:r,symbolField:S,rendererSymbol:u,rendererOrigin:n})&&(f=!0)}}catch{}}return{rendererSymbol:u,colorMatchApplied:f}}function Wu(t){let{splitByField:e,attributes:r,x:a,mode:i}=t;[a,e??""].forEach(n=>{r[n]===(i==="encode"?null:A.nullValue)&&(r[n]=i==="encode"?A.nullValue:null)})}function bv(t){let{dataItem:e,seriesConfig:r,chartSubType:a,colorMatch:i,rendererType:n}=t,s;if(i&&e!==void 0){let o=gp({seriesConfig:r,chartSubType:a,rendererType:n,dataItem:e});s=e[o]}return s}function DT(t){let{seriesSymbol:e,rendererSymbol:r,colorIndex:a}=t,i=r?.color??e.color;i=i??Lt({colorIndex:a,opacity:dt});let n={...e,color:i},s=n.type===Se.SFS&&Jb(n.style);return r?.type===e.type&&r.style!==void 0&&!s&&(n.style=r.style),n.type!==Se.SLS&&(n.outline={type:Se.SLS,style:r?.outline?.style??n.outline?.style,width:r?.outline?.width??n.outline?.width,color:r?.outline?.color??n.outline?.color??r?.color}),n}function vv(t){let e=[];return t&&(e=t.series.flatMap(r=>r.query?.outStatistics?.map(a=>a.onStatisticField)).filter(r=>r!==void 0),e.length===0&&(e=it(t.series))),e}function NT(t,e){let r=!1;if(t&&e&&e.length>0&&wp(t)){let a=Cv(t),i=pr(t);a?r=vv(t).some(n=>e.includes(n)):r=e.includes(i.x)}return r}function Sv(t){let e=[];if(t&&"type"in t&&typeof t.type=="string")switch(t.type){case"uniqueValue":case"unique-value":"field1"in t&&typeof t.field1=="string"&&(e=[t.field1]);break;case"classBreaks":case"class-breaks":"field"in t&&typeof t.field=="string"&&(e=[t.field]);break;case"pieChart":case"pie-chart":"attributes"in t&&Array.isArray(t.attributes)&&(e=t.attributes.map(r=>r.field));break}return e}function Kr(t){return K(t?.series)===g.HeatSeries}function rt(t){return K(t?.series)===g.BoxPlotSeries}function wv(t,e){return t[0].dataTransformationType!==e[0].dataTransformationType}function xv(t,e){return t[0].binCount!==e[0].binCount}function BT(t,e){let r=!0,a=K(t?.series),i=K(e?.series);return a&&a!==i&&(r=a===g.ComboLineAndBarSeries&&(i===g.BarSeries||i===g.LineSeries)||i===g.ComboLineAndBarSeries&&(a===g.BarSeries||a===g.LineSeries)||a===g.BarSeries&&i===g.LineSeries||a===g.LineSeries&&i===g.BarSeries),r}function Zs(t,e){return t!==void 0&&e!==void 0&&e>0}function $T(t){let{chartConfig:e,queryObject:r,chartData:a}=t,i=[],n=X(e.series),s=wp(e),o=se(r),l=e.chartRenderer??o?.renderer?.toJSON();return i=e.series.map((d,c)=>{let u=K([d]),f;return(u===g.BarSeries||u===g.LineSeries||u===g.RadarSeries)&&(d.type===g.BarSeries?f=d.fillSymbol?.color:(d.type===g.RadarSeries||d.type===g.LineSeries)&&(f=d.lineSymbol?.color),s?f=bv({dataItem:a[0],seriesConfig:d,chartSubType:n,colorMatch:s,rendererType:l?.type})?.color:f===void 0&&(f=Lt({colorIndex:c}))),f}).filter(d=>d!==void 0),i}function Ks(t){return t!==x.PieNoAggregation&&t!==x.BarAndLineNoAggregation&&t!==x.BarAndLineSplitByNoAggregation}function Cv(t){let e=X(t.series);return e===x.BarAndLineFromFields||e===x.PieFromFields||e===x.BoxPlotMonoField||e===x.BoxPlotMultiFields||e===x.BoxPlotMonoFieldAndSplitBy||e===x.BoxPlotMultiFieldsAndSplitBy}function Oi(t){return rt(t)?t?.showMean??!1:!1}function Tv(t){return rt(t)?t?.showOutliers:void 0}function MT(){return`{name} {${A.originalCategoryValue}} {dateY} {valueX} {dateX} {valueY}`}var H={Min:"min",FirstQuartile:"first_quartile",Median:"median",ThirdQuartile:"third_quartile",Max:"max",IQR:"iqr",Average:"avg",StandardDeviation:"stddev",Outlier:"outlier"};function Fv(t,e){let r=ie.now().offset/60,a=ie.now().setZone(t)??r,i=a.offset/60,n=e?a.setZone(e).offset/60:0;return i-n}function bp(t){let{outTimeZone:e=Intl.DateTimeFormat().resolvedOptions().timeZone,dataTimeZone:r="UTC",runsOnClientQueryEngine:a}=t,i="",n=Fv(e,r);if(n!==0)if(a)i=`${n>0?"+":"-"}1*INTERVAL '${Math.abs(n)}' HOUR `;else{let s=Math.abs(n%1),o=Math.round(s*60);n=Math.floor(n),i=n>0?`+INTERVAL '${Math.abs(n)}:${o!==0?o:"00"}:01' HOUR TO SECOND`:`-INTERVAL '${Math.abs(n)-(o!==0?0:1)}:${o!==0?String(o-1):"59"}:59' HOUR TO SECOND`}return i}function Iv(t){let{dateFieldName:e,unit:r,runsOnClientQueryEngine:a}=t,i=bp({runsOnClientQueryEngine:a}),n=`EXTRACT(YEAR FROM ${e} ${i})`,s=`EXTRACT(MONTH FROM ${e} ${i})`,o=`EXTRACT(DAY FROM ${e} ${i})`,l=`EXTRACT(HOUR FROM ${e} ${i})`,d=`EXTRACT(MINUTE FROM ${e} ${i})`,c=`EXTRACT(SECOND FROM ${e} ${i})`,u=[];switch(r){case Q.Second:u=[n,s,o,l,d,c];break;case Q.Minute:u=[n,s,o,l,d];break;case Q.Hour:u=[n,s,o,l];break;case Q.Day:case Q.Week:case Q.Month:case Q.Year:u=[n,s,o];break}return u}function Ov(t){let{whereValue:e,outStatistics:r,y:a}=t,i=ue.outStatistics.outStatisticFieldName??"";return r?.outStatisticFieldName!==void 0?i=r.outStatisticFieldName:r?.onStatisticField!==void 0&&r.statisticType!==void 0?i=`${r.statisticType}_${r.onStatisticField}_${e}`:a!==void 0&&(i=[a].flat()[0]),i}function Av(t){let e=new Map;for(let r=0;r<t.length;r+=1){let a=t[r],i=a.query?.where;if(i!==void 0&&"y"in a){let n=ct({where:i,normalize:!0,escape:!1});if(n!==""){let s=Ov({whereValue:n,outStatistics:a.query?.outStatistics?.[0],y:a.y});a.y=s,e.set(n,s)}}}return e}function Pv(t){let{uniqueQuery:e,splitByField:r,x:a}=t,i=[...e.groupByFieldsForStatistics??[],a,r].filter(n=>n!==void 0&&n.trim()!==""&&n!==Di);e.groupByFieldsForStatistics=Array.from(new Set(i))}function vp(t){return t.statisticType===W.ContinuousPercentile||t.statisticType===W.DiscretePercentile}function Ev(t){let{uniqueQuery:e,y:r,useGenericOutStatFieldName:a,queryObject:i,chartSubType:n,isTimeBinningSeries:s,returnFeaturesExtent:o,splitByField:l}=t,d=ue.outStatistics;if(e.outStatistics?.[0]!==void 0){n!==x.PieFromFields&&n!==x.BarAndLineFromFields&&(e.outStatistics[0].outStatisticFieldName=a?d.outStatisticFieldName:[r].flat()[0]);let{outStatistics:c}=e;for(let u=0;u<c.length;u+=1){let f=c[u];f!==void 0&&vp(f)&&(s&&!Ai(l,i)?(c[u].statisticType=W.Count,delete c[u].statisticParameters):c[u]={...c[u],statisticParameters:c[u].statisticParameters??{value:ue.defaultStatParameterValue}})}}else{let c=se(i),{idField:u,isTraditionalTypeOID:f}=_t(c),p=f?u:"*";e.outStatistics=[{statisticType:d.statisticType,onStatisticField:p,outStatisticFieldName:a?d.outStatisticFieldName:[r].flat()[0]}]}o===!0&&(!s||_e(l))&&e.outStatistics?.push({statisticType:W.EnvelopeAggregate,onStatisticField:"1"})}function Lv(t){let{chartConfig:e,fetchFullBoxPlotData:r}=t,{series:a}=e,i=Oi(e),n=[{statisticType:W.Average,suffix:H.Average}];r===!0&&(n=[...n,{statisticType:W.Minimum,suffix:H.Min},{statisticType:W.ContinuousPercentile,statisticParameters:{value:.25},suffix:H.FirstQuartile},{statisticType:W.ContinuousPercentile,statisticParameters:{value:.5},suffix:H.Median},{statisticType:W.ContinuousPercentile,statisticParameters:{value:.75},suffix:H.ThirdQuartile},{statisticType:W.Maximum,suffix:H.Max},{statisticType:W.StandardDeviation,suffix:H.StandardDeviation}]);let s=new Set;return i&&"y"in a[0]?[a[0].y].flat().forEach(o=>s.add(o)):a.forEach(o=>{"y"in o&&[o.y].flat().forEach(l=>s.add(l))}),[...s].flatMap(o=>n.map(l=>{let d={onStatisticField:o,statisticType:l.statisticType,outStatisticFieldName:`${o}_${l.suffix}`};return l.statisticType===W.ContinuousPercentile&&(d.statisticParameters=l.statisticParameters),d}))}function Dv(t,e){for(let r=1;r<e.length;r+=1){let a={...e[r].query?.outStatistics?.[0]};a!==void 0&&t.outStatistics!==void 0&&t.outStatistics.push(a)}}function Nv(t){let{uniqueQuery:e,x:r,splitByField:a,unit:i,chartSubType:n,objectIdFields:s,runsOnClientQueryEngine:o}=t;if(i!==void 0){let l=Iv({dateFieldName:r,unit:i,runsOnClientQueryEngine:o});e.orderByFields=l,e.groupByFieldsForStatistics=l,n===x.BarAndLineSplitBy&&!_e(a)?e.groupByFieldsForStatistics.push(a):n===x.BarAndLineNoAggregation&&(e.groupByFieldsForStatistics=s,e.outStatistics=[{onStatisticField:s.length>1?"*":s[0],outStatisticFieldName:`COUNT_${s[0]}`,statisticType:W.Count}])}}function Sp(t){let{chartConfig:e,options:r,uniqueQuery:a}=t;if(r?.chartLimits?.behaviorAfterLimit===Dr.RenderUpToTheLimit){let i=hp(e,r?.chartLimits);if(i!==void 0){let n=X(e.series);if(n===x.PieFromFields||n===x.BarAndLineFromFields){if(a.outStatistics?.[0]!==void 0){let s=(d,c)=>d.statisticType===W.EnvelopeAggregate===c,o=a.outStatistics.filter(d=>s(d,!0)),l=a.outStatistics.filter(d=>s(d,!1));l.splice(i),a.outStatistics=[...l,...o]}}else a.num=i}}}function oo(t){let{chartConfig:e,queryConfig:r,options:a,queryObject:i,timeIntervalInfo:n,fetchFullBoxPlotData:s}=t,{setTimeBinningInfoWhenNotProvided:o,returnFeaturesExtent:l}=a??{},d=e.series,c=X(d),u=pr(e),{query:f,x:p}=u,h="y"in u?u.y:void 0,y=fr({xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:o,seriesConfig:u,queryObject:i}),m=new Map,b=!1,v=!1,S=!1,C=!1,F=!1,I={};if(f!==void 0){I=Wr(f);let B=Ze(f.where),_="";switch(r.fetchNullValues!==!0&&(p!==A.boxPlot.boxPlotCategory&&(_=`${p} IS NOT NULL`),B.trim()!==""&&B!==p&&!or(f.where)&&(_=Ae([_,`${B} IS NOT NULL`]))),c){case x.BarAndLineSplitBy:{m=Av(d),C=!0,b=!0,v=!0;break}case x.BarAndLineMultiFields:Dv(I,d),v=!0;break;case x.PieFromFields:case x.BarAndLineFromFields:_="",S=!0,v=!0;break;case x.BarAndLineMonoField:case x.PieFromCategory:v=!0;break;case x.BoxPlotMonoField:case x.BoxPlotMultiFields:S=!0,F=!0;break;case x.BoxPlotMonoFieldAndCategory:case x.BoxPlotMultiFieldsAndCategory:case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:{F=!0,C=!0,S=!0;break}case x.PieNoAggregation:case x.BarAndLineNoAggregation:case x.BarAndLineSplitByNoAggregation:}if(v&&Ev({uniqueQuery:I,y:h,useGenericOutStatFieldName:b,queryObject:i,chartSubType:c,isTimeBinningSeries:y,returnFeaturesExtent:l,splitByField:B}),C&&Pv({uniqueQuery:I,splitByField:B,x:p}),rt(e)&&F&&(I.outStatistics=Lv({chartConfig:e,fetchFullBoxPlotData:s})),S?delete I.orderByFields:r.orderByFields!==void 0&&(I.orderByFields=r.orderByFields.filter(G=>{let V=G.split(" ");return!_e(V[0])})),y&&jt(d[0])){let G=se(i),{idFields:V}=Tn(G);wt(i).find(Z=>Z.name===p)?.type!==fe.DateOnly&&V&&Nv({uniqueQuery:I,x:p,splitByField:Ze(f.where),unit:n?.unit??d[0].temporalBinning?.unit,chartSubType:c,objectIdFields:V,runsOnClientQueryEngine:Kt(i)})}I.where=_}Sp({chartConfig:e,options:a,uniqueQuery:I});let{gdbVersion:M,geometry:P,distance:E,units:N,timeExtent:R,where:q,objectIds:L,spatialRelationship:k}=r;return M!==void 0&&(I.gdbVersion=M),P!==void 0&&(I.geometry=P),E!==void 0&&(I.distance=E),N!==void 0&&(I.units=N),R!==void 0&&(I.timeExtent=R),L!==void 0&&(I.objectIds=L),k!==void 0&&(I.spatialRelationship=k),q!==void 0&&(I.where=Ae([I.where,q])),{uniqueQuery:I,mapToStatField:m}}var Qe=class extends Error{constructor(e,r,a){super(r),this.name=e,this.details=a}},Ye={Default:"defaultError",LayerLoadFailure:"layerLoadFailure",QueryFeaturesError:"queryFeaturesError",ChartDisposed:"ChartDisposeError",LayerFieldsNotFound:"layerFieldsNotFound",LayerNotSupported:"layerNotSupported"},x={NonSpecific:"nonSpecific",BarAndLineNoAggregation:"barAndLineNoAggregation",BarAndLineMonoField:"barAndLineMonoField",BarAndLineMultiFields:"barAndLineMultiFields",BarAndLineFromFields:"barAndLineFromFields",BarAndLineSplitBy:"barAndLineSplitBy",BarAndLineSplitByNoAggregation:"barAndLineSplitByNoAggregation",PieNoAggregation:"pieNoAggregation",PieFromCategory:"pieFromCategory",PieFromFields:"pieFromFields",BoxPlotMonoField:"boxPlotMonoField",BoxPlotMultiFields:"boxPlotMultiFields",BoxPlotMonoFieldAndCategory:"boxPlotMonoFieldAndCategory",BoxPlotMultiFieldsAndCategory:"boxPlotMultiFieldsAndCategory",BoxPlotMonoFieldAndSplitBy:"boxPlotMonoFieldAndSplitBy",BoxPlotMultiFieldsAndSplitBy:"boxPlotMultiFieldsAndSplitBy",BoxPlotMonoFieldAndCategoryAndSplitBy:"boxPlotMonoFieldAndCategoryAndSplitBy"},qT={SelectionByClick:"SelectionByClick",SelectionByRange:"SelectionByRange",ProgrammaticSelection:"ProgrammaticSelection",ClearSelection:"ClearSelection"};function wp(t){return t?.colorMatch??!1}function ju(t){let e=ea();if(t!==void 0){let r=K(t.series);(r===g.BarSeries||r===g.LineSeries||r===g.ComboLineAndBarSeries||r===g.BoxPlotSeries)&&(e=t.rotated??ea())}return e}function RT(t){return t?.map(e=>e.type)??[]}function lo(t){let e=t?.stackedType;if(e===void 0&&t!==void 0){let r=K(t.series);(r===g.BarSeries||r===g.LineSeries||r===g.ComboLineAndBarSeries||r===g.RadarSeries)&&(e=Hb())}return e}function Bv(t){let e=t;return e=e.replace(/'/gu,"''"),e=e.replace(/[/\\"|[\]\\]/gu,"\\$&"),e}function $v(t){let e=!1;if(typeof t!="number"){let r=new Intl.Segmenter;e=Array.from(r.segment(t),a=>a.segment).some(a=>a.charCodeAt(0)>255)}return e}function Js(t){let e=t,r="";t.startsWith("'")&&t.endsWith("'")&&(e=t.slice(1,-1),r="'"),e=e.replace(/'/gu,"''");let a="";return $v(e)&&(a="N"),`${a}${r}${e}${r}`}function xp(t){let{value:e,keepSurroundingQuotes:r,escape:a}=t,i=e?.trim();if(!_e(i)){let n="";i.startsWith("'")&&i.endsWith("'")&&(i=i.slice(1,-1),r&&(n="'")),a&&(i=Bv(i)),i=`${n}${i}${n}`}return i}function sr(t){let{count:e,seriesCount:r,chartType:a,chartLimits:i}=t,{behaviorAfterLimit:n}=i??{},s=!0;if(n!==Dr.RenderUpToTheLimit){let{maxBarChartSeriesCount:o,maxBarUniqueSeriesCountTotal:l,maxBarTwoSeriesCountPerSeries:d,maxBarTwoSeriesCountTotal:c,maxBarThreePlusSeriesCountPerSeries:u,maxBarThreePlusSeriesCountTotal:f,maxLineChartSeriesCount:p,maxLineUniqueSeriesCountTotal:h,maxLineTwoSeriesCountPerSeries:y,maxLineTwoSeriesCountTotal:m,maxLineThreePlusSeriesCountPerSeries:b,maxLineThreePlusSeriesCountTotal:v,maxPieChartSliceCountTotal:S,maxGaugeByFeaturesLimit:C,maxBoxPlotSeriesCount:F,maxBoxUniqueSeriesCountTotal:I,maxBoxTwoSeriesCountTotal:M,maxBoxTwoSeriesCountPerSeries:P,maxBoxThreePlusSeriesCountTotal:E,maxBoxThreePlusSeriesCountPerSeries:N,maxHeatChartCellLimit:R}=Xr(i);switch(a){case g.BarSeries:case g.ComboLineAndBarSeries:{let q=e/r;r<=o?r===0?s=!0:r===1?s=e<=l:r===2?s=e<=c&&q<=d:r>2&&(s=e<=f&&q<=u):s=!1}break;case g.LineSeries:case g.RadarSeries:{let q=e/r;r<=p?r===0?s=!0:r===1?s=e<=h:r===2?s=e<=m&&q<=y:r>2&&(s=e<=v&&q<=b):s=!1}break;case g.PieSeries:s=e<=S;break;case g.BoxPlotSeries:{let q=e/r;r<=F?r===0?s=!0:r===1?s=e<=I:r===2?s=e<=M&&q<=P:r>2&&(s=e<=E&&q<=N):s=!1}break;case g.HeatSeries:s=e<=R;break;case g.GaugeSeries:s=e<=C;break}}return s}function Ys(t=[],e){let r=t.find(a=>a.name===e)?.alias;return r!==""?r??e:e}function kT(t=[],e){let r=t.find(a=>a.alias===e)?.name;return r!==""?r??e:e}function WT(t){let e=!1;switch(K(t)){case g.HeatSeries:case g.PieSeries:e=!0;break;case g.BarSeries:case g.LineSeries:case g.RadarSeries:case g.ComboLineAndBarSeries:case g.BoxPlotSeries:e=t.length>1;break;case g.HistogramSeries:case g.ScatterSeries:{let r=t[0];e=r.overlays!==void 0&&Object.values(r.overlays).some(a=>a.created===!0);break}}return e}function Mv(t){let e=!0;return K(t.series)===g.ScatterSeries&&(e=t.series.length===1),e}function qv(t){let e=!0;return K(t.series)===g.HistogramSeries&&(e=t.series.length<=1&&t.series[0].type===g.HistogramSeries&&(!("dataTransformationType"in t.series[0])||t.series[0].dataTransformationType!==void 0&&Object.values(Oe).includes(t.series[0].dataTransformationType))),e}function Rv(t){let e=!0;return K(t.series)===g.PieSeries&&(e=t.series.length<=1),e}function kv(t,e){let r=K(e?.series),a=r!==void 0&&t.includes(r);if(a&&e!==void 0)switch(r){case g.HistogramSeries:a=qv(e);break;case g.ScatterSeries:a=Mv(e);break;case g.PieSeries:a=Rv(e);break}return a}function _e(t){return t==null||typeof t=="string"&&t.trim()===""}function pn(t,e){let r=e.find(a=>a in t);return{isInItem:r!==void 0,expr:r}}function xn(t){return pn(t,dp)}function jT(t,e){let r;switch(t){case Q.Second:r=e.seconds??"";break;case Q.Minute:r=e.minutes??"";break;case Q.Hour:r=e.hours??"";break;case Q.Day:r=e.days??"";break;case Q.Week:r=e.weeks??"";break;case Q.Month:r=e.months??"";break;case Q.Year:r=e.years??"";break;default:r="";break}return r}function VT(t){let e;switch(t){case ar.Mean:e=1;break;case ar.Median:e=2;break;case ar.StdDev:e=3;break;case ar.Normal:default:e=0;break}return e}function _T(t,e){if(e!==void 0){let{seriesId:r,overlayType:a,visible:i}=t.detail,n;switch(a){case ar.Mean:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.mean);break;case ar.Median:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.median);break;case ar.StdDev:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.standardDeviation);break;case ar.Normal:e.series[0].type===g.HistogramSeries&&(n=e.series[0].overlays?.comparisonDistribution);break;case ar.Trendline:e.series[0].type===g.ScatterSeries&&(n=e.series[0].overlays?.trendLine);break;default:n=e.series.find(s=>s.id===r);break}n!==void 0&&(n.visible=i)}}function zT(t){return new Pd().sanitize(t)}function Wv(t){return t!=null&&!Number.isNaN(t)&&Number.isFinite(t)}function jv(t,e){let r={fieldToSort:""};if(!_e(t)){let a=t.trim(),i=a.split(" ").at(-1)?.toUpperCase();i===Ne.Ascending||i===Ne.Descending?r={fieldToSort:a.substring(0,a.lastIndexOf(" ")),orderBy:i}:(r={fieldToSort:a},e!==!1&&(r.orderBy=Ne.Ascending))}return r}function Cp(t){return t===x.BarAndLineSplitBy||t===x.BarAndLineSplitByNoAggregation||t===x.BoxPlotMonoFieldAndSplitBy||t===x.BoxPlotMultiFieldsAndSplitBy||t===x.BoxPlotMonoFieldAndCategoryAndSplitBy}function UT(t){return t?.selectionPixelTarget?Dn(t.selectionPixelTarget.pixelRanges):t?.selectionOIDs===void 0||t.selectionOIDs.length===0}function HT(t={arrayA:[],arrayB:[],getKey:e=>e}){let{arrayA:e,arrayB:r,getKey:a}=t;if(r.length===0||e.length===0)return e;let i=new Map;r.forEach((l,d)=>{let c=a(l);i.set(c,d)});let n=[],s=[];e.forEach((l,d)=>{let c=a(l);i.has(c)&&(n.push(d),s.push(l))}),s.sort((l,d)=>{let c=a(l),u=a(d);return i.get(c)-i.get(u)});let o=[...e];return n.forEach((l,d)=>{o[l]=s[d]}),o}function GT(t,e){return(t===x.BarAndLineNoAggregation||t===x.BarAndLineSplitByNoAggregation)&&e!==void 0?e.x:A.xAxisField}function QT(t){let{r:e,g:r,b:a,a:i=1}=t,n=Math.round((1-i)*255+i*e),s=Math.round((1-i)*255+i*r),o=Math.round((1-i)*255+i*a);return .299*n+.587*s+.114*o>128}var Pr=new Map;function Vv(t){return t!==void 0&&"type"in t&&t.type==="imagery"}function _v(t){return t!==void 0&&"type"in t&&t.type==="imagery-tile"}function zv(t){return t!==void 0&&"type"in t&&t.type==="wcs"}function Uv(t){return t==="imagery"||t==="imagery-tile"||t==="wcs"}function Ke(t){return t!==void 0&&"type"in t&&Uv(t.type)}function Hv(t){let e=t?.iLayer?.layerType;return e==="ArcGISImageServiceLayer"||e==="ArcGISTiledImageServiceLayer"||e==="WCS"}function ia(t,e){if(Ke(t))throw new Error(e??"Raster layer is not supported by this operation.")}function ZT(t){return t!==void 0&&(!("url"in t)||!t.url)}function Kt(t){return t!==void 0&&"view"in t&&"layer"in t&&t.layer.type==="feature"}function Tp(t){return t!==void 0&&"type"in t&&t.type==="feature"}function Fp(t){return t!==void 0&&"type"in t&&t.type==="subtype-sublayer"}function Gv(t){return Tp(t)||Fp(t)}function ut(t){return Fp(t)?t.parent??void 0:t}function Ip(t){return t?.capabilities?.query?.supportsDistance||ut(t)?.sourceJSON?.advancedQueryCapabilities?.supportsQueryWithDistance===!0}function Qv(t){return t?.capabilities?.queryAttributeBins?.supportsFixedInterval===!0&&t?.capabilities?.queryAttributeBins?.supportsStackBy}function KT(t){let{chartConfig:e,queryObject:r,options:a}=t,i=K(e?.series),n=Ze(e?.series[0]?.query?.where);return!(i===g.HeatSeries||e&&fr({xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:a?.setTimeBinningInfoWhenNotProvided,seriesConfig:e.series[0],queryObject:r})&&Ai(n,r))}function Ai(t,e){return e!==void 0&&(Kt(e)||!Ke(e)&&"capabilities"in e&&e.capabilities?.queryAttributeBins?.supportsDate===!0&&(_e(t)||e.capabilities?.queryAttributeBins?.supportsStackBy))}function Zv(t){let e=!1,r=ut(se(t))?.sourceJSON;if(r){let a=r.queryBinsCapabilities?.supportsFixedIntervalBin,i=r.queryBinsCapabilities?.supportedStatisticTypes,n=[W.Maximum,W.Count].every(s=>i?.includes(s.toUpperCase())||i?.includes(s.toLowerCase()));e=a&&n}return e}function JT(t){let e;return Kt(t)?e=t.layer:e=t,e}function se(t){let e;return Kt(t)?e=t.layer:e=t,e}function Kv(t){let e=!1,r=ut(t)?.sourceJSON?.advancedQueryCapabilities?.supportedSpatialAggregationStatistics??[],a=t?.capabilities?.query.supportedSpatialAggregationStatistics??{};return e=r.includes("EnvelopeAggregate")||"envelope"in a&&a.envelope===!0,e}function YT(t){let{chartConfig:e,queryObject:r}=t,a;if(r){let i=se(r);Vv(i)?a={id:i.id,layerType:"ArcGISImageServiceLayer"}:_v(i)?a={id:i.id,layerType:"ArcGISTiledImageServiceLayer"}:a={id:i.id,layerType:"ArcGISFeatureLayer"},i.url&&(a.url=i.url)}return{...e,iLayer:a}}function Jv(t){let e;switch(t){case"feet":e="esriSRUnit_Foot";break;case"miles":e="esriSRUnit_StatuteMile";break;case"nautical-miles":e="esriSRUnit_NauticalMile";break;case"us-nautical-miles":e="esriSRUnit_USNauticalMile";break;case"meters":e="esriSRUnit_Meter";break;case"kilometers":e="esriSRUnit_Kilometer";break}return e}async function Yv(t){let{queryObject:e,queryConfig:r,outputFormat:a,dataFormat:i,outAnalytics:n}=t,{where:s,geometry:o,distance:l,units:d,timeExtent:c}=r,u,f=se(e),p=ut(f);if(p){let h={where:Ae([s,p.definitionExpression])},y={query:h},m=Ni(o)?.extent?.toJSON();if(m!==void 0){let v=Jv(d),{xmin:S,ymin:C,xmax:F,ymax:I}=m;h.geometryType="esriGeometryEnvelope",h.geometry=`${S},${C},${F},${I}`,l!==void 0&&(h.distance=l.toString()),v!==void 0&&(h.units=v,o?.spatialReference?.wkid!=null&&(h.inSR=o.spatialReference.wkid.toString()))}c&&(h.time=`${c[0]},${c[1]}`);let b=`${p.url}/${p.layerId}/queryAnalytic?f=${a}&dataFormat=${i}&outAnalytics=${n}`;try{u=(await fn(b,y)).data?.features?.[0]?.attributes}catch(v){let S=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,S.errors.queryError,v)}}return u}function Op(t,e){return{lowerBoundaryAlias:`charts_lower_boundary_${t}`,upperBoundaryAlias:`charts_upper_boundary_${t}`,stackAlias:`charts_stack_alias_${e}`}}async function Xv(t){let{chartConfig:e,queryObject:r,queryConfig:a,errorStrings:i,options:n}=t,s,o=se(r),l=Qv(o);if(l&&r&&"queryAttributeBins"in r){let{x:d,y:c,xTemporalBinning:u,yTemporalBinning:f}=e.series[0],{outTimeZone:p,firstDayOfWeek:h,includeLeapDay:y}=e,m=f0({queryObject:r,queryConfig:a,x:d,y:c,xTemporalBinning:u,yTemporalBinning:f,configTimeZone:p,firstDayOfWeek:h,includeLeapDay:y,options:n});try{s=await r.queryAttributeBins(m)}catch(b){throw new Qe(Ye.QueryFeaturesError,i.errors.queryError,b)}}if(!l)throw new Qe(Ye.QueryFeaturesError,i.errors.queryBinsNotSupported,i.errors.queryBinsNotSupported);return s}async function e0(t){let{chartConfig:e,queryObject:r,queryConfig:a,returnFeaturesExtent:i,errorStrings:n,abortKey:s}=t,o=e.series[0],l,{x:d,y:c}=o;a.groupByFieldsForStatistics=[d],d!==c&&a.groupByFieldsForStatistics.push(c),a&&i===!0&&!a.outStatistics?.some(u=>u.statisticType===W.EnvelopeAggregate)&&a.outStatistics?.push({statisticType:W.EnvelopeAggregate,onStatisticField:"1"});try{l=await Dt({queryObject:r,queryConfig:a,abortKey:s})}catch(u){throw new Qe(Ye.QueryFeaturesError,n.errors.queryError,u)}return l}async function t0(t){let{queryObject:e,queryConfig:r,xStep:a,xMin:i,xMax:n,x:s,y:o,yStep:l,errorStrings:d}=t,c;if(e&&"queryAttributeBins"in e&&Number.isFinite(a)&&Number.isFinite(l)&&Number.isFinite(i)&&Number.isFinite(n)&&a>0&&l>0){let u=h0({queryObject:e,queryConfig:r,xStep:a,xMin:i,xMax:n,x:s,y:o,yStep:l});try{c=await e.queryAttributeBins(u)}catch(f){throw new Qe(Ye.QueryFeaturesError,d.errors.queryError,f)}}return c}async function r0(t){let{queryConfig:e,x:r,queryObject:a,chartSubType:i,isGaugeByFeature:n}=t,s,o=se(a),{idField:l,isTraditionalTypeOID:d}=_t(o),c=uo({queryObject:a,queryConfig:e});c.outFields=n||i===x.PieNoAggregation||i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation?[d?l:"*"]:[r],c.outFields?.[0]===r&&(c.returnDistinctValues=!0);try{s=await a.queryFeatureCount(c)}catch{s=Number.NaN}return s}async function oa(t){let{queryObject:e,queryConfig:r,abortKey:a}=t,{outStatistics:i}=r,n=new Map;if(i!==void 0&&i.length>0){let s=i.map(c=>{let{statisticType:u,onStatisticField:f,outStatisticFieldName:p}=c;return{statisticType:u,onStatisticField:f,outStatisticFieldName:p?.toUpperCase()}});r.outStatistics=s,delete r.num,delete r.orderByFields;let o=uo({queryObject:e,queryConfig:r}),l;try{l=await e.queryFeatures(o,{signal:a!==void 0?Pr.get(a)?.signal:void 0})}catch(c){if(!so.isAbortError(c)){let u=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,u.errors.queryError,c)}}let d=l?.features?.[0]?.attributes;d!==void 0&&i.forEach(c=>{let{outStatisticFieldName:u}=c;if(u!==void 0){let f=d[u.toLowerCase()]??d[u.toUpperCase()]??d[u];f!==void 0&&n.set(u,f)}})}return n}async function Ap(t){let{queryObject:e,queryConfig:r,returnUniqueIdsOnly:a,abortKey:i}=t,n=[],s=se(e),o=m0(s),l=uo({queryObject:e,queryConfig:r,maxRecordCountFactor:o});try{if(a===!0)if("queryObjectIds"in e)n=await e.queryObjectIds(l);else{let{idField:d,isTraditionalTypeOID:c}=_t(s),u=c?d:"*";l.outFields=[u],n=(await e.queryFeatures(l,{signal:i!==void 0?Pr.get(i)?.signal:void 0})).features.map(f=>f.getObjectId())}else n=(await e.queryFeatures(l,{signal:i!==void 0?Pr.get(i)?.signal:void 0})).features}catch(d){if(!so.isAbortError(d)){let c=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,c.errors.queryError,d)}}return n}async function i0(t){let e=[],{featureCount:r,maxRecords:a,queryConfig:i}=t,n=[],s=0,o=i?.start??0;for(;s<ue.maxParallelRequests&&o<r;){let l={...t};l.queryConfig={...i,start:o,num:Math.min(a,r-o)},e.push(Ap(l)),o+=a,s+=1}return n=(await Promise.all(e)).flat(),n}async function Dt(t){let{queryObject:e,queryConfig:r,returnUniqueIdsOnly:a,featureCount:i,noBatch:n,abortKey:s}=t,o=[],l=se(e),d=i??1,c=Ep(l);if(n!==!0&&d>c&&l?.capabilities?.query.supportsPagination){let u=0,f=0,p=Math.ceil(d/c),h=Math.ceil(p/ue.maxParallelRequests),y=[];for(;f<h;){u=f*ue.maxParallelRequests*c;let m=i0({queryConfig:{...r,start:u},queryObject:e,maxRecords:c,featureCount:d,returnUniqueIdsOnly:a,abortKey:s});y.push(m),f+=1}o=(await Promise.all(y)).flat()}else(Number.isNaN(d)||d>=0)&&(o=await Ap({queryObject:e,queryConfig:r,returnUniqueIdsOnly:a,abortKey:s}));return o}async function XT(t){let{queryObject:e,queryConfig:r,uniqueFeature:a,abortKey:i}=t,n={...r,returnDistinctValues:!0};return await Dt({queryObject:e,abortKey:i,queryConfig:n,returnUniqueIdsOnly:!0,featureCount:a===!0?1:void 0})}function a0(t){if(t!==void 0){let e=Pr.get(t);e!==void 0&&e.abort(),Pr.set(t,new AbortController)}}function Pp(t){return{lowerBoundaryAlias:`charts_lower_boundary_${t}`,upperBoundaryAlias:`charts_upper_boundary_${t}`}}async function n0(t){let{queryObject:e,dateField:r,splitByField:a,queryConfig:i,temporalBinning:n,options:s,axisTimeZone:o}=t,l=[],d;if(n){let{unit:c}=n;try{if(c&&(d=Ai(a,e),d&&e&&"queryAttributeBins"in e)){let u=u0({queryObject:e,queryConfig:i,temporalBinning:n,dateField:r,axisTimeZone:o,splitByField:a,options:s});l=(await e.queryAttributeBins(u)).features}}catch(u){let f=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,f.errors.queryError,u)}}if(d===!1){let c=(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;throw new Qe(Ye.QueryFeaturesError,c.errors.queryBinsNotSupported,c.errors.queryBinsNotSupported)}return l}function s0(t){let e=!t.geometry||t.geometry.type==="extent",r=(t.where??"").toUpperCase(),a=!r.includes("CURRENT_TIMESTAMP")&&!r.includes("CURRENT_DATE")&&!r.includes("CURRENT_TIME");return e&&a}function Ep(t){let e=ue.maxRecords;if(t&&"sourceJSON"in t&&t.sourceJSON?.maxRecordCount){let{sourceJSON:r}=t;e=r.maxRecordCount,r.advancedQueryCapabilities?.supportsMaxRecordCountFactor===!0&&(e*=ue.maxRecordCountFactor)}return e}function Ae(t,e){let r,a=Array.from(new Set(t)).filter(i=>i!=null&&i!==""&&!or(i));return a.sort((i,n)=>n.length-i.length),a.length===1?[r]=a:a?.forEach(i=>{i!==void 0&&(_e(r)?r=`(${i})`:r?.includes(`(${i})`)||(r=`${r} ${e??"AND"} (${i})`))}),r??"1=1"}function o0(t,e){let r=e;if(t!==void 0){let a=se(t),i=ut(a)?.timeExtent;i?.start!=null&&i?.end!=null&&(r=[i.start.valueOf(),i.end.valueOf()])}return r}function l0(t){let{queryObject:e,defaultGeometry:r,ignoreViewExtent:a}=t,i=r;if(!a&&Kt(e)){let n=e.view.extent,{xmin:s,xmax:o,ymin:l,ymax:d,zmin:c,zmax:u}=n;i={xmin:s,ymin:l,zmin:c,xmax:o,ymax:d,zmax:u,spatialReference:n.spatialReference.toJSON()}}return i}function Ni(t){let e;return t!==void 0&&(e=no.fromJSON(t)),e}function d0(t){return t===void 0?["*"]:Array.from(new Set(t))}function Cn(t){let{queryType:e,queryObject:r,queryConfig:a,options:i,configTimeZone:n,dateField:s,useViewTimeZone:o}=t,{where:l,outStatistics:d,geometry:c,distance:u,units:f,timeExtent:p,returnDistinctValues:h}=a??{},y=se(r),m=ut(y)?.createQuery()??new ib,b,v=Tn(y).idFields;if(e==="AttributeBinsQuery"&&a?.objectIds?.[0]!==void 0&&v&&(b=`${v} IN (${a.objectIds.join(",")})`),e==="AttributeBinsQuery"&&o&&(m=new rb(m.toJSON()),wt(r).find(C=>C.name===s)?.type!==fe.DateOnly)){let C=Intl.DateTimeFormat().resolvedOptions().timeZone,F=i?.view&&"timeZone"in i?.view?i.view.timeZone:void 0,I=n??F??C;I==="unknown"?I="Etc/UTC":I==="system"&&(I=C),m.outTimeZone=I}if(m.where=Ae([m.where,l,b]),"returnDistinctValues"in m&&(m.returnDistinctValues=h??!1),d!==void 0){let C=Kv(y);m.outStatistics=d.filter(F=>F.statisticType!==W.EnvelopeAggregate||C).map(F=>ab.fromJSON(F))}let S=Ni(c);return S!==void 0&&(m.geometry=S,a?.spatialRelationship&&(m.spatialRelationship=a.spatialRelationship),Ip(y)&&(u!==void 0&&(m.distance=u),f!==void 0&&(m.units=f))),p&&(m.timeExtent=new nb({start:p?.[0],end:p?.[1]})),s0(m)&&(m.cacheHint=!0),m}function c0(t){let e;switch(t){case $e.Start:e="first";break;case $e.End:e="last";break}return e}function u0(t){let{queryObject:e,queryConfig:r,temporalBinning:a,dateField:i,splitByField:n,options:s,axisTimeZone:o}=t,{unit:l,size:d,timeAggregationType:c,start:u,end:f,offset:p,outTimeZone:h}=a,y=se(e),m=Cn({queryType:"AttributeBinsQuery",queryObject:e,queryConfig:r,configTimeZone:h??o,options:s,dateField:i,useViewTimeZone:s?.syncViewTimeZone??!1}),b=Pp(i);if(m.lowerBoundaryAlias=b.lowerBoundaryAlias,m.upperBoundaryAlias=b.upperBoundaryAlias,m.binParameters={type:"date",field:i,interval:{unit:l,value:d},start:u,end:f,offset:p?{unit:p.unit,value:p.size}:null},m.binParameters.type==="date"&&(y?.capabilities?.queryAttributeBins?.supportsSnapToData&&(m.binParameters.snapToData=c0(c)),y?.capabilities?.queryAttributeBins?.supportsReturnFullIntervalBin&&(m.binParameters.returnFullIntervalBin=!0)),!_e(n)){let v=ut(y)?.fields.find(S=>S.name===n)?.type;(!v||v==="string"||v==="integer"||v==="small-integer"||v==="big-integer"||v==="double")&&(m.binParameters.stackBy={type:"field",value:n,valueType:v==="string"?"string":"integer"})}return m}function co(t){let{field:e,fieldType:r,unit:a,outTimeZone:i,dataTimeZone:n,runsOnClientQueryEngine:s,addIntervalStatement:o,addLeapDayExpression:l}=t,d,c,u=1,f=1;switch(a){case gt.MinuteOfDay:r!==fe.DateOnly&&(c="MINUTE",u=0,f=59);break;case gt.HourOfDay:r!==fe.DateOnly&&(c="HOUR",u=0,f=23);break;case gt.DayOfWeek:c="DOW",f=7;break;case gt.DayOfMonth:c="DAY",f=31;break;case gt.DayOfYear:c="DOY",f=366;break;case gt.WeekOfYear:c="WEEK",f=53;break;case gt.MonthOfYear:c="MONTH",f=12;break;case gt.QuarterOfYear:c="QUARTER",f=4;break}if(c){let p=o?` ${bp({dataTimeZone:n,runsOnClientQueryEngine:s,outTimeZone:i})}`:"";d=p0({addLeapDayExpression:l,temporalKey:c,field:e,intervalStatement:p})}return{expression:d,start:u,end:f}}function p0(t){let{addLeapDayExpression:e=!1,temporalKey:r,field:a,intervalStatement:i}=t,n;return e&&a.length&&r==="DAY"?n=`CASE WHEN (EXTRACT(MONTH FROM ${a})=2 AND EXTRACT(DAY FROM ${a})=29) THEN 0 ELSE EXTRACT (${r} FROM ${a}${i}) END`:n=`EXTRACT (${r} FROM ${a}${i})`,n}function Vu(t){let{temporalBinning:e,xOrY:r,xOrYFieldType:a,addIntervalStatement:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o,includeLeapDay:l}=t,{unit:d}=e??{},c,u,f,p;return a===fe.Date||a===fe.DateOnly||a===fe.TimestampOffset?{expression:u,start:f,end:p}=co({field:r,fieldType:a,unit:d,addIntervalStatement:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o,addLeapDayExpression:!l}):c=r,{field:c,expression:u,start:f,end:p}}function f0(t){let{queryObject:e,queryConfig:r,x:a,y:i,xTemporalBinning:n,yTemporalBinning:s,firstDayOfWeek:o,includeLeapDay:l,configTimeZone:d,options:c}=t,u=wt(e),f=u.find(F=>F.name===a)?.type,p=u.find(F=>F.name===i)?.type,h=Cn({queryType:"AttributeBinsQuery",queryObject:e,queryConfig:r,configTimeZone:d,options:c,dateField:a,useViewTimeZone:c?.syncViewTimeZone??!1});h.binParameters={type:"fixed-interval",interval:1},h.lowerBoundaryAlias=ue.heatChartLowerBoundaryAlias,h.upperBoundaryAlias=ue.heatChartUpperBoundaryAlias,o!==void 0&&(h.binParameters.firstDayOfWeek=o);let y=Vu({temporalBinning:n,xOrY:a,xOrYFieldType:f,addIntervalStatement:!1,includeLeapDay:l}),{field:m,expression:b,start:v,end:S}=y;m?h.binParameters.field=m:b&&(h.binParameters.expression=b,h.binParameters.expressionValueType="integer",h.binParameters.type==="fixed-interval"&&(v!==void 0&&(h.binParameters.start=v),S!==void 0&&(h.binParameters.end=S)));let C=Vu({temporalBinning:s,xOrY:i,xOrYFieldType:p,addIntervalStatement:!1,includeLeapDay:l});return C.field?h.binParameters.stackBy={type:"field",value:C.field}:C.expression&&(h.binParameters.stackBy={type:"expression",value:C.expression,valueType:"integer",alias:i}),h}function h0(t){let{queryObject:e,queryConfig:r,xStep:a,xMin:i,xMax:n,x:s,y:o,yStep:l}=t,d=Cn({queryType:"AttributeBinsQuery",queryObject:e,queryConfig:r,useViewTimeZone:!1}),c=Op(s,o);return d.lowerBoundaryAlias=c.lowerBoundaryAlias,d.upperBoundaryAlias=c.upperBoundaryAlias,d.binParameters={type:"fixed-interval",field:s,interval:a,start:i,end:n,stackBy:{value:`FLOOR(${o} / ${l})`,type:"expression",alias:c.stackAlias,valueType:"integer"}},d}function uo(t){let{queryObject:e,queryConfig:r,maxRecordCountFactor:a}=t,{groupByFieldsForStatistics:i,orderByFields:n,gdbVersion:s,start:o,num:l,outFields:d}=r??{},c=Cn({queryType:"Query",queryObject:e,queryConfig:r,useViewTimeZone:!1});c.returnGeometry=!1;let u=se(e);return c.outFields=d0(d),c.groupByFieldsForStatistics=i??c.groupByFieldsForStatistics,c.orderByFields=n??[],c.objectIds=r?.objectIds,a!==void 0&&(c.maxRecordCountFactor=a),s!==void 0&&s!==""&&(c.gdbVersion=s),l!==void 0&&(c.num=l),o!==void 0&&(c.start=o,c.num=c.num??Ep(u)),c}function m0(t){return t&&"sourceJSON"in t&&t.sourceJSON?.advancedQueryCapabilities?.supportsMaxRecordCountFactor===!0?ue.maxRecordCountFactor:void 0}var Lp={NonNumericAggregation:"nonNumericAggregation",DuplicateSeriesID:"duplicateSeriesId"},Ir={Required:"required",MinLength:"minLength",MinItems:"minItems",MaxItems:"maxItems",Pattern:"pattern",AdditionalProperties:"additionalProperties",Enum:"enum",AnyOf:"anyOf"},ae={BadData:"badData",EmptyDataSet:"emptyDataSet",InvalidConfig:"invalidConfig",HistogramEmptyField:"histogramEmptyField",BarElementExceedsLimit:"barElementExceedsLimit",LineChartExceedsLimit:"lineChartExceedsLimit",BoxPlotExceedsLimit:"boxPlotExceedsLimit",BoxPlotOutliersExceedsLimit:"boxPlotOutliersExceedsLimit",HeatChartExceedsLimit:"heatChartExceedsLimit",PieChartExceedsLimit:"pieChartExceedsLimit",GaugeExceedsLimit:"gaugeExceedsLimit",PieChartMixOfNegativePositiveSlices:"PieChartMixOfNegativePositiveSlices",NegativeValueInSqrtCalculation:"negativeValueInSqrtCalculation",NegativeValueInLogCalculation:"negativeValueInLogCalculation",NegativeValueInXAxisLogScale:"negativeValueInXAxisLogScale",NegativeValueInYAxisLogScale:"negativeValueInYAxisLogScale"},y0=2048;function g0(t){let e;switch(t){case Oe.Log:e="log";break;case Oe.Sqrt:e="sqrt";break;case Oe.None:default:e=void 0;break}return e}async function b0(t){let{queryConfig:e,chartConfig:r,queryObject:a,options:i,abortKey:n}=t,s=r.series[0],{x:o,dataTransformationType:l,binCount:d}=s,c=se(a);if(!Ke(c))throw new Qe(Ye.LayerNotSupported);c.loaded||await c.load();let u=await la(c);if(!u)throw new Error("Raster info is not available for the layer.");let f=i?.view,p=Ni(e.geometry)??c.fullExtent,h=u.bandCount===1?0:u.bandInfos.findIndex(b=>b.name===o),y,m;if(f===void 0&&(l===void 0||l===Oe.None)&&d&&Array.isArray(u.histograms)&&u.histograms.length>h&&u.histograms[h].size%d===0&&Array.isArray(u.statistics)&&u?.statistics?.length>h)y=u.histograms[h],m=u.statistics[h];else{let b,v,S;if(f)b=f.resolution,v=f.resolution,S=f.spatialReference;else{let M=y0,P=2,E=u.width,N=u.height,R=Math.max(0,Math.ceil(Math.log(Math.max(E,N)/M)/Math.log(P))),q=P**R;b=u.pixelSize.x*q,v=u.pixelSize.y*q,S=c.spatialReference}let C=new op({x:b,y:v,spatialReference:S}),F=g0(l),I=await sb(c,{bandIds:[h],geometry:p,histogramSize:d??void 0,pixelSize:C,transformType:F},{signal:n!==void 0?Pr.get(n)?.signal:void 0});m=I.statistics[0],y=I.histograms[0]}return{histogram:y,statistics:m}}function v0(t,e){let r=[],a=(t.max-t.min)/t.size;for(let i=0;i<t.size;i++){let n=t.min+i*a;r.push({minValue:n,maxValue:n+a,count:t.counts[i]})}if(e&&t.size!==e&&t.size%e===0){let i=t.size/e,n=[];for(let s=0;s<e;s++){let o=r[s*i].minValue,l=r[(s+1)*i-1].maxValue,d=0;for(let c=0;c<i;c++)d+=r[s*i+c].count;n.push({minValue:o,maxValue:l,count:d})}return n}return r}async function S0(t){let{chartConfig:e,queryConfig:r,queryObject:a,options:i,abortKey:n}=t;if(a===void 0)throw new Error("QueryObject is undefined!");let s,{statistics:o,histogram:l}=await b0({queryObject:a,chartConfig:e,queryConfig:r,options:i,abortKey:n});if(o&&l){let d=e.series[0].binCount??void 0,c=v0(l,d);c.length>0?s={valid:!0,count:c.length,data:{bins:c,min:o.min,max:o.max,mean:o.avg,median:o.median,stddev:o.stddev,sum:o.sum??o.avg*o.count,count:o.count}}:s={valid:!1,invalidType:ae.EmptyDataSet}}else s={valid:!1,invalidType:ae.BadData};return s}var w0=t=>t.series[0].x;function x0(t){let{chartConfig:e,layer:r,selectionDataItems:a}=t,i=Xs(r,w0(e)),n=a.map(l=>[l.minValue,l.maxValue]).reduce((l,d,c)=>{if(c===0)l.push([...d]);else{let u=l[l.length-1];u[1]===d[0]?u[1]=d[1]:l.push([...d])}return l},[]),s=e.series[0],{dataTransformationType:o}=s;switch(o){case Oe.Log:n.forEach(l=>{l[0]=Math.exp(l[0]),l[1]=Math.exp(l[1])});break;case Oe.Sqrt:n.forEach(l=>{l[0]=l[0]*l[0],l[1]=l[1]*l[1]});break;case Oe.None:}return n.length>0?{bandId:i,pixelRanges:n}:void 0}var C0={dataFormat:"json",outputFormat:"json",typeKey:"analyticType",typeValue:"LinRegR2",fieldValue:"onAnalyticField",slopePropertyList:["Slope","SLOPE","slope"],interceptPropertyList:["Intercept","INTERCEPT","intercept"],r2PropertyList:["R2","r2"]};function aa(t,e){let r,a,i=e??(n=>n);for(let n of t){let s=i(n);s==null||Number.isNaN(s)||((r===void 0||s<r)&&(r=s),(a===void 0||s>a)&&(a=s))}return{min:r,max:a}}function T0(t,e){let r=0,a=0,i=e??(n=>n);for(let n of t){let s=i(n);s==null||Number.isNaN(s)||(r++,a+=s)}return r>0?a/r:void 0}function F0(t,e){let r=0,a=e??(i=>i);for(let i of t){let n=a(i);n==null||Number.isNaN(n)||(r+=n)}return r}function eF(t,e,r=1){let a=Math.max(0,Math.ceil((e-t)/r)),i=new Array(a);for(let n=0;n<a;n++)i[n]=t+n*r;return i}async function I0(t){let{queryObject:e}=t,r=!1;if(!Ke(e)){let a=Gv(e),i=se(e),n=ut(i);if(a&&n?.url!==void 0&&n.url!==null){let s=`${n.url}/${n.layerId}?f=json`;try{let o=(await fn(s)).data,l=o?.advancedQueryCapabilities?.supportsQueryAnalytic===!0,d=o?.sqlParserVersion===void 0||n.version!=null&&n.version>=10.91;r=l&&d}catch{}}}return r}function O0(t){let{x:e,y:r,trendlineXToY:a,data:i}=t,{min:n,max:s}=i?aa(i,o=>o[e]):{min:Number.NaN,max:Number.NaN};return[{[e]:n??Number.NaN,[r]:a(n??Number.NaN)},{[e]:s??Number.NaN,[r]:a(s??Number.NaN)}]}function A0(t){let{data:e,x:r,y:a}=t,i=[];return e!==void 0&&(i=e.filter(n=>Number.isFinite(n[r])&&Number.isFinite(n[a])).map(n=>[n[r],n[a]])),i}async function P0(t){let{statsMap:e,queryObject:r,chartConfig:a,queryConfig:i}=t,n=a.series[0],{x:s,y:o}=n;ia(r);let l=Number.NaN,d=[{[s]:Number.NaN,[o]:Number.NaN},{[s]:Number.NaN,[o]:Number.NaN}],{dataFormat:c,outputFormat:u,typeKey:f,typeValue:p,fieldValue:h,slopePropertyList:y,interceptPropertyList:m,r2PropertyList:b}=C0,v=`[{"${f}": "${p}", "${h}":"${s},${o}"}]`,S=await Yv({queryObject:r,queryConfig:i,outputFormat:u,dataFormat:c,outAnalytics:v});if(S!==void 0){let C=Number.NaN,F=Number.NaN,{expr:I}=pn(S,y),{expr:M}=pn(S,m),{expr:P}=pn(S,b);I!==void 0&&Number.isFinite(S[I])&&(C=S[I]),M!==void 0&&Number.isFinite(S[M])&&(F=S[M]),P!==void 0&&Number.isFinite(S[P])&&(l=S[P]);let{dataContextXMinField:E,dataContextXMaxField:N,dataContextYMinField:R,dataContextYMaxField:q}=A.scatterplotAggregationFields,L=e.get(E)??Number.NaN,k=e.get(N)??Number.NaN,B=e.get(R)??Number.NaN,_=e.get(q)??Number.NaN,G=(k-L)/100,V=L-G,Z=Number.NaN;for(;!(Z>=B&&Z<=_)&&V<=k;)V+=G,Z=C*V+F;let U=k+G,oe=Number.NaN;for(;!(oe>=B&&oe<=_)&&U>=L;)U-=G,oe=C*U+F;d=[{[s]:V,[o]:Z},{[s]:U,[o]:oe}]}return{r2:l,trendLinePoints:d}}function Dp(t){let{data:e,chartConfig:r}=t,a=r.series[0],{x:i,y:n}=a,{r2:s,trendLinePoints:o}=A.scatterplotSeries,l=A0({data:e,x:i,y:n});if(l!==void 0){let d=Ed(l),c=Ld(d);s=d.m===0?0:Dd(l,c),o=O0({x:i,y:n,trendlineXToY:c,data:e})}return{r2:s,trendLinePoints:o}}async function Np(t){let e=await I0(t),{chartConfig:r}=t,a=r.series[0],{x:i,y:n}=a,{r2:s}=A.scatterplotSeries,o=[{[i]:Number.NaN,[n]:Number.NaN},{[i]:Number.NaN,[n]:Number.NaN}],l={r2:s,trendLinePoints:o},d=!1;if(e)try{l=await P0(t)}catch{d=!0}return(!e||d)&&(l=Dp(t)),l}var E0=50,L0=4194304;async function D0(t){let{layer:e,chartConfig:r,rawData:a}=t,i,n=r.series[0],{x:s,y:o}=n,{idField:l}=_t(e),d=await la(e);if(d){let c=d.bandInfos,u=c.length===1,f=u?c?.[0].name:"";i=a.map(p=>({...u&&{[s]:p.attributes?.[f],[o]:p.attributes?.[f]},...p.attributes,[ue.uniqueIdsName]:p.attributes?.[l]}))}return i??[]}async function N0(t){let{queryObject:e,queryConfig:r,abortKey:a}=t;if(!e||!Ke(e))throw new Qe(Ye.LayerNotSupported);return await Z0({queryObject:e,queryConfig:r,imagerySkipFactor:E0,imageryMaxPixelCount:L0,abortKey:a})}async function B0(t){let{chartConfig:e,queryConfig:r,queryObject:a,sortData:i,calculateTrendLine:n,options:s,abortKey:o}=t;if(!a)throw new Error("QueryObject is undefined!");let l=await N0({queryObject:a,queryConfig:r,abortKey:o}),d=await D0({layer:a,chartConfig:e,rawData:l});i!==!1&&ra({arrayToSort:d,sortingField:e.series[0].x,orderBy:Ne.Ascending});let c=new Map,{r2:u,trendLinePoints:f}=n!==!1?await Np({data:d,statsMap:c,queryConfig:r,options:s,queryObject:a,chartConfig:e}):A.scatterplotSeries;return{dataItems:d,r2:u,trendLinePoints:f}}var $0=t=>({x:t.series[0].x,y:t.series[0].y});function M0(t){let{chartConfig:e,layer:r,selectionDataItems:a}=t,i;if(a.length>0){let{x:n,y:s}=$0(e),o=Xs(r,n),l=Xs(r,s);if(o!==void 0&&l!==void 0&&o!==l){let d=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;a.forEach(p=>{let h=p[n],y=p[s];typeof h=="number"&&(h<d&&(d=h),h>c&&(c=h)),typeof y=="number"&&(y<u&&(u=y),y>f&&(f=y))}),d!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER&&u!==Number.MAX_SAFE_INTEGER&&f!==Number.MIN_SAFE_INTEGER&&(i={xBandId:o,yBandId:l,pixelRanges:new lp({xmin:d,xmax:c,ymin:u,ymax:f})})}else if(o!==void 0&&o===l){let d=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;a.forEach(u=>{let f=u[n];typeof f=="number"&&(f<d&&(d=f),f>c&&(c=f))}),d!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER&&(i={bandId:o,pixelRanges:[[d,c]]})}}return i}function q0(t,e){let r=!0;if(e?.trim()){let a={};Object.entries(t).forEach(([s,o])=>{a[s.toUpperCase()]=o});let i=e.trim(),n=i.match(/^(\w+)\s+IS\s+(NOT\s+)?NULL$/iu);if(n){let[s,o,l]=n,d=a[o.toUpperCase()],c=d==null;r=l?!c:c}else{let s=i.match(/^(\w+)\s*(=|!=|<>|>|<|>=|<=)\s*(.+)$/iu);if(s){let[o,l,d,c]=s,u=l.toUpperCase();if(!(u in a))r=!1;else{let f=a[u],p=c.trim().replace(/^['"]|['"]$/gu,"");switch(typeof f=="number"?p=Number(p):typeof f=="boolean"&&(p=p.toLowerCase()==="true"),d){case"=":r=f===p;break;case"!=":case"<>":r=f!==p;break;case">":r=f>p;break;case"<":r=f<p;break;case">=":r=f>=p;break;case"<=":r=f<=p;break;default:r=!0}}}}}return r}function R0(t){let{features:e,aggregationType:r,onField:a}=t,i;if(!a)r==="count"&&(i=e.length);else switch(r){case"count":{a==="*"?i=e.length:i=e.filter(n=>n[a]!==null&&n[a]!==void 0).length;break}case"sum":{i=e.reduce((n,s)=>{let o=s[a];return n+(typeof o=="number"?o:0)},0);break}case"avg":{let n=0,s=0;e.forEach(o=>{let l=o[a];typeof l=="number"&&(n+=l,s++)}),i=s>0?n/s:0;break}case"min":{let n=e.map(s=>s[a]).filter(s=>typeof s=="number"&&s!==null&&s!==void 0);i=n.length>0?Math.min(...n):void 0;break}case"max":{let n=e.map(s=>s[a]).filter(s=>typeof s=="number"&&s!==null&&s!==void 0);i=n.length>0?Math.max(...n):void 0;break}case"percentile-continuous":{let n=[...e.map(o=>o[a]).filter(o=>typeof o=="number"&&o!==null&&o!==void 0)].sort((o,l)=>o-l),s=Math.floor(n.length/2);i=n.length%2!==0?n[s]:(n[s-1]+n[s])/2;break}}return i}function _u(t,e){let r;return t==null&&e?r={groupKey:A.nullValue,display:A.nullValue,original:null}:r={groupKey:t,display:t,original:t},r}async function k0(t){let{layer:e,geometry:r,options:a,abortKey:i}=t;e.loaded||await e.load();let n=await la(e),s=Ni(r)??e.fullExtent,o=n?.attributeTable;if(!(s instanceof lp&&s.equals(e.fullExtent))){let l=a?.view,d=l?new op({x:l.resolution,y:l.resolution,spatialReference:l.spatialReference}):void 0;o=await ob(e,{geometry:s,pixelSize:d},{signal:i!==void 0?Pr.get(i)?.signal:void 0})}return o}async function W0(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i}=t,n;if(a===void 0)throw new Error("QueryObject is undefined!");let s=se(a);if(!Ke(s))throw new Qe(Ye.LayerNotSupported);let o=await k0({layer:s,geometry:r.geometry,options:t.options,abortKey:i}),l=o?.features;if(!o||!l)n={valid:!1,invalidType:ae.BadData};else{let d=e.series;if(!d||d.length===0||l.length===0)n={valid:!0};else{let c=r.groupByFieldsForStatistics?.[0]??"",u=d.some(h=>h.query?.fetchNullValues),f=new Map;for(let h of l){let{groupKey:y}=_u(h.attributes[c],u);y===A.nullValue&&!u||(f.has(y)||f.set(y,[]),f.get(y).push(h.attributes))}let p=[];f.forEach(h=>{let y={},m=h[0][c],{display:b,original:v}=_u(m,u);y[c]=b,y[A.xAxisField]=b,y[A.originalCategoryValue]=v,d.forEach(S=>{let C=S.query?.outStatistics?.[0];if(!C){let{name:N}=S;y[N]=h[0][N];return}let F=h,I=S.query?.where;I&&(F=h.filter(N=>q0(N,I)));let M=C.statisticType,P=C.onStatisticField,E=C.outStatisticFieldName;y[E]=R0({features:F,aggregationType:M,onField:P})}),p.push(y)}),n={valid:!0,data:{dataItems:p}}}}return n}async function tF(t){let{layer:e,category:r,splitByField:a}=t,i=(await la(e))?.attributeTable?.features,n=a!==void 0;return Array.from(new Set(i?.map(s=>s.attributes[n?a:r]))).sort((s,o)=>typeof s=="string"&&typeof o=="string"?s.localeCompare(o):Number(s)-Number(o))}function j0(t,e){let r=new Map;return e.forEach((a,i)=>{r.set(a,i)}),t.reduce((a,i)=>{let n=a[a.length-1];if(!n)return a.push([i,i]),a;if(i===n[1])return a;let s=r.get(i),o=r.get(n[1]);return s!==void 0&&o!==void 0&&s===o+1?(n[1]=i,a):(a.push([i,i]),a)},[])}function V0(t,e){return t?.map(({attributes:r})=>r[e]).filter(r=>r!=null).sort((r,a)=>r-a)}function _0(t){let{chartConfig:e,layer:r,selectionDataItems:a}=t,i,n=r.serviceRasterInfo?.attributeTable,s=e.series?.[0]?.x,o=n?.features,l=n?.fields?.find(({name:d})=>d.toLowerCase()==="value")?.name;if(a.length>0&&s&&o&&o.length>0&&l){let d=new Set(a.map(c=>c[A.originalCategoryValue]).filter(c=>c!==void 0));if(d.size>0){let c=new Set;o.forEach(f=>{let p=f.attributes,h=p[s];d.has(h)&&c.add(p[l])});let u=Array.from(c).sort((f,p)=>f-p);if(u.length>0){let f=V0(o,l);i={bandId:0,pixelRanges:j0(u,f)}}}}return i}var Bp="PixelID",z0=[g.BarSeries,g.HistogramSeries,g.ScatterSeries];async function rF(t,e){let r=!1;if(kv(z0,t))switch(K(t?.series)){case g.BarSeries:e.loaded||await e.load(),r=!!(await la(e))?.attributeTable;break;case g.HistogramSeries:case g.ScatterSeries:r=!0;break}return r}async function U0(t){let{layer:e,chartConfig:r}=t,a;return Ke(e)?a=e:r?.iLayer?.layerType==="ArcGISImageServiceLayer"?a=await Mp(r.iLayer):r?.iLayer?.layerType==="ArcGISTiledImageServiceLayer"&&(a=await qp(r.iLayer)),a}function H0(t){let e;switch(t){case"f32":e=fe.Single;break;case"f64":e=fe.Double;break;default:e=fe.Integer;break}return e}function $p(t){if(!t.loaded)throw new Error("Raster layer must be loaded to get its ID field name");let e=t.serviceRasterInfo?.attributeTable?.fields.find(r=>r.type==="oid");return e?e.name:Bp}function G0(t){let{layer:e,rasterInfo:r,popupTemplateFieldInfosEnabled:a}=t,i=r??e.serviceRasterInfo??void 0,n;if(!e.loaded||!i)throw new Error("Raster layer must be loaded and have rasterInfo available to fetch its fields info");try{if(i.attributeTable)n=i.attributeTable.fields.map(s=>s.toJSON());else{let s=H0(i.pixelType),o=i.bandInfos.map(l=>({name:l.name,alias:l.name,type:s}));a===!0&&e?.popupTemplate?.fieldInfos!==void 0&&o.map(l=>{let d=e.popupTemplate?.fieldInfos?.find(c=>c.fieldName?.toLowerCase()===l.name.toLowerCase())?.label;return d&&d!==l.name&&(l.alias=d),l}),n=[{name:Bp,alias:"Pixel ID",type:fe.OID},...o]}}catch{n=[]}return n}async function la(t){return t.loaded||await t.load(),zv(t)?t.serviceRasterInfo??void 0:await t.generateRasterInfo(t.rasterFunction)}var Mp=ji(async t=>{let e={},r=t.layerDefinition;e.definitionExpression=r?.definitionExpression,e.id=t.id,t.url!==void 0&&(e.url=t.url),t.itemId!==void 0&&t.layerDefinition?.id!==void 0&&(e.portalItem={id:t.itemId});let a=new db(e);return await a.load(),a},t=>JSON.stringify(t,Object.keys(t).sort())),qp=ji(async t=>{let e={};e.id=t.id,t.url!==void 0&&(e.url=t.url),t.itemId!==void 0&&(e.portalItem={id:t.itemId});let r=new cb(e);return await r.load(),r},t=>JSON.stringify(t,Object.keys(t).sort())),Q0=ji(async t=>{let e={};e.id=t.id,t.url!==void 0&&(e.url=t.url),t.itemId!==void 0&&(e.portalItem={id:t.itemId});let r=new ub(e);return await r.load(),r},t=>JSON.stringify(t,Object.keys(t).sort())),Xs=(t,e)=>{let r,a=t.serviceRasterInfo?.bandInfos;if(a?.length===1)r=0;else if(e&&a?.length){let i=e.toLowerCase(),n=a.findIndex(s=>s.name.toLowerCase()===i);n>-1&&(r=n)}return r},iF=t=>{let{chartConfig:e,layer:r,selectionDataItems:a}=t,i=K(e.series),n;switch(i){case g.BarSeries:n=_0({chartConfig:e,layer:r,selectionDataItems:a});break;case g.HistogramSeries:n=x0({chartConfig:e,layer:r,selectionDataItems:a});break;case g.ScatterSeries:n=M0({chartConfig:e,layer:r,selectionDataItems:a});break;default:n=void 0;break}return n};async function Z0(t){let{queryObject:e,queryConfig:r,imagerySkipFactor:a,imageryMaxPixelCount:i,abortKey:n}=t,s=[];if(e!==void 0)try{let o=se(e);o.loaded||await o.load();let l={geometry:Ni(r.geometry)??o.fullExtent,autoResample:!0,maxPixelCount:i,skipFactor:a},d=n&&Pr.get(n)?.signal||void 0,c=await lb(o,l,{signal:d});s=np.fromJSON(c.featureSet).features}catch{s=[]}return s}function K0(t){let{queryObject:e,defaultGeometry:r,ignoreViewExtent:a,viewExtent:i}=t,n=r;if(!a&&i){let{xmin:s,xmax:o,ymin:l,ymax:d,zmin:c,zmax:u}=i;n={xmin:s,ymin:l,zmin:c,xmax:o,ymax:d,zmax:u,spatialReference:i.spatialReference.toJSON()}}else if(!n&&e.fullExtent){let{xmin:s,xmax:o,ymin:l,ymax:d,zmin:c,zmax:u}=e.fullExtent;n={xmin:s,ymin:l,zmin:c,xmax:o,ymax:d,zmax:u,spatialReference:e.fullExtent.spatialReference.toJSON()}}return n}function J0(t){let e,r,a;return t!==void 0&&(e=t.type,(e===Xe.UniqueValue||e===Xe.ClassBreaks)&&(r=t.field??void 0,e===Xe.ClassBreaks&&(a=t.normalizationField??void 0))),{rendererType:e,rendererField:r,rendererNormalizationField:a}}var Rp=ji(async(t,e)=>{let r=t.featureCollection,a,i;if(r?.layers?.[0]!==void 0){let o=r.layers[0];a=o.featureSet,i=o.layerDefinition}else i=t.layerDefinition;let n={};if(a!==void 0){if(n.source=np.fromJSON(a).features,i?.fields!==void 0&&(n.fields=i.fields.map(o=>Jg.fromJSON(o))),i?.objectIdField!==void 0&&(n.objectIdField=i.objectIdField),i?.geometryType!==void 0){let o=no.fromJSON({geometryType:i.geometryType});o?.type!==void 0&&o?.type!=="extent"&&(n.geometryType=o.type)}i?.spatialReference!==void 0&&(n.spatialReference=i.spatialReference)}else n.id=t.id,i?.id!==void 0&&(n.layerId=i.id),t.url!==void 0&&(n.url=t.url),t.itemId!==void 0&&i?.id!==void 0&&(n.portalItem={id:t.itemId});if(i!==void 0){let o=i.drawingInfo;o?.renderer!==void 0&&(n.renderer=ao.fromJSON(o.renderer))}let s=new Zg(n);return await s.load({signal:e}),s},t=>JSON.stringify(t));async function aF(t){let e;switch(t?.layerType??""){case"ArcGISFeatureLayer":e=await Rp(t);break;case"ArcGISImageServiceLayer":e=await Mp(t);break;case"ArcGISTiledImageServiceLayer":e=await qp(t);break;case"WCS":e=await Q0(t);break;default:throw new Qe(Ye.LayerNotSupported)}return e}async function nF(t){let{layer:e,view:r,chartConfig:a,filterByViewExtent:i,abortSignal:n}=t,s=Ke(e)||Hv(a),o;if(s)o=await U0(t);else{let l=se(e),d=ut(l);d!==void 0?i&&r!==void 0&&!d.isTable?(d.outFields=["*"],o=await r.whenLayerView(d)):o=e:a?.iLayer&&a.iLayer?.layerType==="ArcGISFeatureLayer"&&(o=await Rp(a.iLayer,n))}return o}function wt(t,e){let r=se(t),a=[];if(r!==void 0){let i=e===!0&&r?.popupTemplate?.fieldInfos!==void 0;Ke(r)?a=G0({layer:r,popupTemplateFieldInfosEnabled:e}):a=r.fields.map(n=>{let s=n.toJSON();if(i){let o=r.popupTemplate?.fieldInfos?.find(l=>l.fieldName?.toLowerCase()===n.name.toLowerCase())?.label;o!==void 0&&o!==n.name&&(s.alias=o)}return s})}return a}function kp(t,e=[]){return e.find(r=>r.name===t)}function Tn(t){let e,r=!1;if(Ke(t))e=[$p(t)];else{let a=ut(t);a&&("uniqueIdFields"in a&&a.uniqueIdFields&&a.uniqueIdFields.length>0?e=a.uniqueIdFields:(e=[a.objectIdField],r=!0))}return{idFields:e,isTraditionalTypeOID:r}}function _t(t){let e="",r=!1;if(Ke(t))e=$p(t);else if(t){let a=Tn(t);r=a.isTraditionalTypeOID,a.idFields&&(e=a.idFields[0])}return{idField:e,isTraditionalTypeOID:r}}function Pi(t){let e=[fe.Single,fe.Double,fe.SmallInteger,fe.Integer,fe.BigInteger];return t!==void 0&&e.includes(t.type)}function Y0(t){return t?.type===fe.Date||t?.type===fe.DateOnly||t?.type===fe.TimestampOffset}function sF(t){return t?.type===fe.String}function oF(t){return t?.type===fe.TimeOnly}function lF(t){let e=[fe.SmallInteger,fe.Integer,fe.BigInteger];return t!==void 0&&e.includes(t.type)}function X0(t){return t.filter(e=>Y0(e)).map(e=>e.name)}function dF(t){return t.filter(e=>Pi(e)).map(e=>e.name)}function eo(t,e){let r;if(e){let a=se(t).getFieldDomain(e);a instanceof Kg&&(r=a)}return r}function to(t,e){let r=e?.getName(t?.toString())??e?.getName(t)??e?.getName(Number(t));return r===null&&(r=void 0),r}function zu(t){let{queryObject:e,fieldName:r,fieldValue:a}=t;return Ke(e)?void 0:to(a,eo(e,r))}async function Wp(t){let e=[];return t&&!ut(t)?.isTable&&t.fieldsIndex&&(e=await ap.getRendererFields(t.renderer,t.fieldsIndex)),e}function eS(t){let e="/rest/services",r=t.toLowerCase(),a=r.indexOf(e);return r=a>-1?t.substring(0,a):t,`${r}/rest/info`}async function tS(t){let e=!0,r=".arcgis.com/",a=t?.url,i=a?.includes(r);if(a&&i&&ut(t)?.sourceJSON?.serviceItemId!==void 0){let n=eS(a);try{let s=(await fn(n,{query:{f:"json"}})).data;if(s.owningTenant!==void 0&&s.owningSystemUrl!==void 0){let o=`${s.owningSystemUrl}/sharing/rest/portals/${s.owningTenant}`,l=(await fn(o,{authMode:"auto",query:{f:"json"}})).data,d=new Yg({sourceJSON:l});await d.load(),e=d?.sourceJSON?.subscriptionInfo?.dataStoreLevel===void 0}}catch{}}return e}function rS(t){let{queryObject:e,fieldToMatch:r,returnUndefinedIfNotFound:a}=t,i=wt(e),n=iS(i,r),s=a?"":r;return n?.name??s}function iS(t,e){let r=t.find(a=>e===a.name);return r||(r=t.find(a=>e.toUpperCase()===a.name.toUpperCase())),r}function cF(t){let{fieldsList:e,queryObject:r,returnUndefinedIfNotFound:a}=t,i=e;return i!==void 0&&(i=i.map(n=>rS({queryObject:r,fieldToMatch:n,returnUndefinedIfNotFound:a}))),i}function jp(t){let{queryObject:e,chartConfig:r,runtimeDataFilters:a,ignoreViewExtent:i,viewExtent:n}=t,{series:s,dataFilters:o}=r,{where:l,gdbVersion:d,timeExtent:c,geometry:u,distance:f,units:p,objectIds:h,spatialRelationship:y}=o??{},{where:m,gdbVersion:b,timeExtent:v,geometry:S,distance:C,units:F,objectIds:I,spatialRelationship:M}=a??{},P=s[0],{query:E}=P,{where:N}=E??{},R=X(s),q={...E};return q.where=Ae([l,m]),R!==x.BarAndLineSplitBy&&R!==x.BoxPlotMonoFieldAndSplitBy&&R!==x.BoxPlotMonoFieldAndCategoryAndSplitBy&&R!==x.BoxPlotMultiFieldsAndSplitBy&&R!==x.BarAndLineSplitByNoAggregation&&(q.where=Ae([q.where,N])),r.orderOptions?.orderByFields!==void 0&&(q.orderByFields=r.orderOptions.orderByFields),q.gdbVersion=b??d,q.timeExtent=o0(e,v??c),q.geometry=Ke(e)?K0({queryObject:e,defaultGeometry:S??u,ignoreViewExtent:i,viewExtent:n}):l0({queryObject:e,defaultGeometry:S??u,ignoreViewExtent:i}),q.distance=C??f,q.units=F??p,q.objectIds=I??h,q.spatialRelationship=M??y,E?.outStatistics?.[0]?.statisticType===W.Count&&(q.returnDistinctValues=E?.returnDistinctValues??!1),q?.outStatistics?.forEach(L=>{vp(L)&&!("statisticParameters"in L)&&(L.statisticParameters={value:ue.defaultStatParameterValue})}),q}var aS=t=>{let e;if("portalItem"in t){let r=t.portalItem?.id;typeof r=="string"&&(e=r)}return e};function uF(t){let{view:e,portalItemId:r}=t,a;if(e&&r){let i=Array.from(e.map?.allLayers??[]).find(n=>aS(n)===r);i&&(a=i)}return a}var Qr=["1.0.0","1.0.1","2.0.0","3.0.0","3.1.0","3.2.0","3.3.0","3.4.0","3.5.0","3.6.0","3.7.0","3.8.0","3.9.0","3.9.1","3.9.2","3.10.0","3.11.0","4.0.0","4.0.1","5.0.0","6.0.0","6.1.0","6.2.0","6.2.1","6.3.0","6.4.0","7.0.0","7.1.0","7.1.1","7.2.0","7.2.1","7.3.1","7.4.0","7.4.1","7.5.0","7.5.1","7.6.0","8.0.0","8.0.1","9.0.0","9.1.0","9.2.0","9.3.0","9.4.0","9.5.0","9.6.0","9.6.1","9.7.0","10.0.0","11.0.0","12.0.0","13.0.0","14.0.0","14.0.1","15.0.0","16.0.0","16.1.0","16.1.1","17.0.0","17.1.0","17.2.0","17.2.1","18.0.0","18.1.0","18.1.1","18.1.2","18.1.3","19.0.0","20.0.0","20.1.0","20.2.0","21.0.0","21.1.0","22.0.0","23.0.0","23.1.0","23.2.0","23.3.0","24.0.0","24.1.0","24.2.0","24.3.0","24.4.0","24.5.0","24.6.0","24.7.0","24.8.0","25.0.0"],nS="1.0.0",sS="unrecognized.version",oS=[g.LineSeries,g.BarSeries,g.ComboLineAndBarSeries,g.RadarSeries];function Us(t,e){let r=0;if(t!==e){let a=t.split("."),i=e.split(".");for(let n=0;n<a.length;n+=1){let s=Number.parseInt(a[n],10),o=Number.parseInt(i[n],10);if(s>o||Number.isNaN(o)){r=1;break}if(s<o){r=-1;break}}}return r}function lS(t){return t!==void 0?/^([1-9]\d*|0)(\.(([1-9]\d*)|0)){2}$/u.test(t):!1}function dS(t){let e=mr.Same,r=[];if(lS(t)&&t!==void 0){Qr.sort(Us);let a=Us(t,Qr[Qr.length-1]);if(a===1?e=mr.Newer:a===-1&&(e=mr.Older),e===mr.Newer||e===mr.Same)r.push(t);else{for(let i=Qr.length-2;i>=0;i-=1)if(Us(t,Qr[i])>=0){r=Qr.slice(i,Qr.length);break}r.length===0&&r.push(nS)}}else e=mr.Unrecognized,r.push(sS);return{versionStatus:e,versions:r}}function pr(t){let{series:e}=t,r=("showMean"in t?t.showMean:!1)===!0?e.find(a=>a.type===g.LineSeries):e[0];return r??=e[0],r}function pF(t,e){let r=t!==null?t.toString():null,a=e!=null?e.toString():null;return a!==null&&a!==r?Se.SFS:Se.SLS}function Ze(t,e){let r="";return t?.includes("=")&&(r=e!==!1?xp({value:t.split("=")[0],escape:!1}):t.split("=")[0].trim()),r}function ct(t){let{where:e,normalize:r,keepSurroundingQuotes:a,escape:i=!1}=t,n="";return e?.includes("=")&&(n=e.split("=").slice(1).join("=").trim(),n==="null"?n=null:n.trim()!==""&&!Number.isNaN(Number(n))?n=Number(n):r===!1?i&&(n=Js(n)):n=xp({value:n,keepSurroundingQuotes:a,escape:i})),n}function or(t){let e=!1;if(t===void 0||t==="")e=!0;else if(t.includes("=")){let r=Ze(t,!1),a=ct({where:t,normalize:!1});e=r===`${a}`}return e}function lr(t){let{where:e,normalize:r,escape:a}=t,i=r===void 0?!0:r,n=Ze(e),s=ct({where:e,normalize:i,keepSurroundingQuotes:!0,escape:a}),o=e;return n!==""&&s!==""&&(o=`${n}=${s}`),o}function cS(t){let e=x.PieFromCategory;return t[0].query?.outStatistics===void 0?e=x.PieNoAggregation:t[0].query?.groupByFieldsForStatistics===void 0&&(e=x.PieFromFields),e}function uS(t){let e=x.BarAndLineMonoField,r=t[0].query?.where;return t[0].query?.groupByFieldsForStatistics===void 0&&(t[0].query?.outStatistics??[]).length>0?e=x.BarAndLineFromFields:r===void 0&&t[0].query?.outStatistics===void 0?e=x.BarAndLineNoAggregation:or(r)?t.length>1&&(e=x.BarAndLineMultiFields):e=t[0].query?.outStatistics===void 0?x.BarAndLineSplitByNoAggregation:x.BarAndLineSplitBy,e}function pS(t){let e=x.BoxPlotMonoField,r=t.length===1,a=t.find(o=>o.type===g.LineSeries)??t[0],{x:i}=a,n="y"in a?a.y:"",s=a.query?.where;return i===Di?typeof n=="object"&&n.length>1?or(s)?r&&(e=x.BoxPlotMultiFields):e=x.BoxPlotMultiFieldsAndSplitBy:r?e=x.BoxPlotMonoField:or(s)||(e=x.BoxPlotMonoFieldAndSplitBy):r?e=x.BoxPlotMonoFieldAndCategory:or(s)?e=x.BoxPlotMultiFieldsAndCategory:e=x.BoxPlotMonoFieldAndCategoryAndSplitBy,e}function X(t){let e=x.NonSpecific;if(t?.[0]!==void 0)switch(K(t)){case g.PieSeries:e=cS(t);break;case g.RadarSeries:case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:e=uS(t);break;case g.BoxPlotSeries:e=pS(t);break}return e}function fr(t){let{seriesConfig:e,xAxisValueFormatType:r,setTimeBinningInfoWhenNotProvided:a,queryObject:i}=t,n=!1;if(!Ke(i)&&se(i)?.fields?.find(s=>s.name===e.x)?.type!=="time-only"&&jt(e)&&e.binTemporalData!==!1&&r===g.DateAxisFormat){let s=X([e]);if(e.temporalBinning&&s!==x.BarAndLineNoAggregation&&s!==x.BarAndLineSplitByNoAggregation){let{unit:o,size:l}=e.temporalBinning;n=a===!0||l!==void 0&&l>0&&o!==void 0}}return n}function jt(t){return oS.includes(t?.type)}function fS(t){let{previousConfig:e,newConfig:r,behaviorAfterLimit:a}=t,i=e.series,n=r.series,s=!1,o=!1;(a===Dr.RenderUpToTheLimit||e.orderOptions?.data===void 0||r.orderOptions?.data===void 0)&&(o=!tr(e.orderOptions?.orderByFields,r.orderOptions?.orderByFields));let l=Nn(i.map(c=>c.query),["where","outStatistics[0].outStatisticFieldName","outStatistics[0].onStatisticField"]),d=Nn(n.map(c=>c.query),["where","outStatistics[0].outStatisticFieldName","outStatistics[0].onStatisticField"]);return s=!tr(l,d),s||o}function hS(t,e){return JSON.stringify(t.dataFilters)!==JSON.stringify(e.dataFilters)}function mS(t,e){let r=!1;if(e.length&&t.length)if(e[0].x!==t[0].x)r=!0;else{let a=K(t);if(a!==g.HistogramSeries&&a!==g.GaugeSeries){let i=it(t).sort(),n=it(e).sort();r=JSON.stringify(i)!==JSON.stringify(n)}}return r}function yS(t,e){return(t??!1)!==(e?.filterBySelection??!1)}function gS(t,e){return jt(t.series[0])&&jt(e.series[0])&&(t.series[0].binTemporalData??A.binTemporalData)!==(e.series[0].binTemporalData??A.binTemporalData)}function bS(t,e){let r=t.axes?.[0].valueFormat.type,a=e.axes?.[0].valueFormat.type,i=X(e.series),n=i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation,s=r===g.DateAxisFormat&&a===g.NumberAxisFormat,o=r===g.NumberAxisFormat&&a===g.DateAxisFormat;return r!==a&&(n||s||o)}function vS(t){let{previousSeries:e,newConfig:r,setTimeBinningInfoWhenNotProvided:a,queryObject:i}=t,n=r.series?.[0],s=!1,o=!1;if(n&&jt(n)&&fr({seriesConfig:n,xAxisValueFormatType:Vt(r),setTimeBinningInfoWhenNotProvided:a,queryObject:i})){let l=e[0];s=JSON.stringify(l.temporalBinning)!==JSON.stringify(n.temporalBinning),o=a===!0&&(n.temporalBinning?.size??0)<=0}return{timeBinningChanged:s,newTimeBinningWillBeCalculated:o}}function Uu(t,e){return e.length!==t.length}function SS(t,e){return Oi(t)!==Oi(e)}function wS(t,e){return JSON.stringify(t.series[0]?.valueConversion)!==JSON.stringify(e.series[0]?.valueConversion)}function xS(t,e){return JSON.stringify(t.series[0]?.xTemporalBinning)!==JSON.stringify(e.series[0]?.xTemporalBinning)||JSON.stringify(t.series[0]?.yTemporalBinning)!==JSON.stringify(e.series[0]?.yTemporalBinning)||(t.firstDayOfWeek??7)!==(e.firstDayOfWeek??7)||t.outTimeZone!==e.outTimeZone||(t.nullPolicy??st.Null)!==(e.nullPolicy??st.Null)}function CS(t,e){return(t.hideEmptyRowsAndColumns??!1)!==(e.hideEmptyRowsAndColumns??!1)}function TS(t,e){return(t.includeLeapDay??Fi.heatChart.includeLeapDay)!==(e.includeLeapDay??Fi.heatChart.includeLeapDay)}function FS(t){let{previousConfig:e,newConfig:r,fieldList:a}=t,i=e.series[0],n=r.series[0],s=!1;if(i.type===g.ScatterSeries&&n.type===g.ScatterSeries&&a&&a.length>0){let o=new Set(i.additionalTooltipFields||[]),l=new Set(n.additionalTooltipFields||[]);if(!tr(o,l)){let d=Array.from(l).filter(c=>!o.has(c));d.length>0&&(s=a?.some(c=>d.includes(c.name)&&!Pi(c)))}}return s}function fF(t,e){return(t.colorMatch??!1)!==(e.colorMatch??!1)}function hF(t,e){return(t.stackedType??yt.Side)!==(e.stackedType??yt.Side)}function yn(t){let e={...t};return e.position===void 0&&(e.position=Fi.heatChart.legend.position),e}function mF(t,e){let r=t.legend??{type:g.Legend},a=e.legend??{type:g.Legend},i=yn(r),n=yn(a);return!tr(i,n)}function yF(t,e){let r=t.legend??{type:g.Legend},a=e.legend??{type:g.Legend},i=yn(r),n=yn(a);return i.position!==n.position}function gF(t,e){return JSON.stringify(t.series[0]?.gradientRules)!==JSON.stringify(e.series[0]?.gradientRules)}function bF(t,e){return t.series[0].heatRulesType!==e.series[0].heatRulesType}function vF(t){let{oldConfig:e,newConfig:r}=t,a=!1,i=e.series[0],n=r.series[0],s=K(e.series),o=K(r.series);if(s===g.PieSeries&&o===g.PieSeries){let{slices:l,sliceGrouping:d}=i,{slices:c,sliceGrouping:u}=n,f=l?.map(m=>({sliceId:m.sliceId,label:m.label})),p=c?.map(m=>({sliceId:m.sliceId,label:m.label})),h=d?.label,y=u?.label;a=JSON.stringify(f)!==JSON.stringify(p)||JSON.stringify(h)!==JSON.stringify(y)}return a}function IS(t){let{previousSelectionOIDs:e,options:r}=t,a=!1;return r?.filterBySelection===!0&&(a=e?.length!==r?.selectionData?.selectionOIDs?.length||!tr(e,r?.selectionData?.selectionOIDs)),a}function SF(t,e){return t?.length!==e?.length||t?.some((r,a)=>{let i=ct({where:r?.query?.where}),n=ct({where:e?.[a]?.query?.where});return i!==n})}function wF(t,e){let r=it(t),a=it(e);return JSON.stringify(r)!==JSON.stringify(a)}function xF(t,e){let r,a,i,n;return jt(t.series[0])&&(r=t.series[0].temporalBinning?.unit,i=t.series[0].temporalBinning?.size),jt(e.series[0])&&(a=e.series[0].temporalBinning?.unit,n=e.series[0].temporalBinning?.size),Zs(r,i)&&!Zs(a,n)}function CF(t,e){return t.axes?.length===3&&e.axes?.length===2||t.axes?.length===2&&e.axes?.length===3}function TF(t,e){return JSON.stringify(t.series.map(r=>r.assignToSecondValueAxis??!1))!==JSON.stringify(e.series.map(r=>r.assignToSecondValueAxis??!1))}function FF(t,e){let r=t.axes?.map(i=>i?.guides?.map(n=>n?.above===!0)),a=e.axes?.map(i=>i?.guides?.map(n=>n?.above===!0));return JSON.stringify(r)!==JSON.stringify(a)}function IF(t,e){return ju(t)!==ju(e)}function OF(t,e){return(t.showOutliers??A.boxPlot.boxPlotOutliersVisibility)!==(e.showOutliers??A.boxPlot.boxPlotOutliersVisibility)}function AF(t,e){return(t.standardizeValues??A.boxPlot.boxPlotStandardizeValuesVisibility)!==(e.standardizeValues??A.boxPlot.boxPlotStandardizeValuesVisibility)}function PF(t,e){return JSON.stringify(t?.chartRenderer)!==JSON.stringify(e?.chartRenderer)}function EF(t,e){let r=t.axes?.[0].valueFormat.type===g.DateAxisFormat?t.axes[0].valueFormat.intlOptions.timeZone:void 0,a=e.axes?.[0].valueFormat.type===g.DateAxisFormat?e.axes[0].valueFormat.intlOptions.timeZone:void 0;return r!==a}function LF(t,e){let r=!1,a=t.series[0],i=e.series[0];if(a.type===g.ScatterSeries&&i.type===g.ScatterSeries){let{sizePolicy:n}=a,{sizePolicy:s}=i;r=JSON.stringify(n)!==JSON.stringify(s)}return r}function DF(t,e){let r=!1,a=t.series[0],i=e.series[0];if(a.type===g.ScatterSeries&&i.type===g.ScatterSeries){let{sizePolicy:n}=a,{sizePolicy:s}=i;r=n===void 0&&s!==void 0||n!==void 0&&s===void 0||n?.field!==s?.field}return r}function OS(t){let{previousConfig:e,newConfig:r,options:a,previousFilterBySelection:i,previousSelectionOIDs:n,fieldList:s,queryObject:o}=t,{series:l}=r,{series:d}=e,c=K(l),u=!1,f=!1,p=!1,h={common:{layerChanged:!1,queryChanged:!1,xOrYChanged:!1,numberOfSeriesChanged:!1,configFiltersChanged:!1,filterBySelectionChanged:!1,dataForFilterBySelectionChanged:!1,binTemporalDataChanged:!1,timeBinningChanged:!1,newTimeBinningWillBeCalculated:!1,valueFormatChangeRequiresNewData:!1},histogram:{dataPropsChanged:!1},gauge:{valueConversionChanged:!1},boxPlot:{showMeanChanged:!1},heatChart:{binningChanged:!1,hideEmptyRowsAndColumnsChanged:!1,includeLeapDay:!1},scatterPlot:{tooltipFieldsChanged:!1}};switch(h.common.queryChanged=fS({previousConfig:e,newConfig:r,behaviorAfterLimit:a?.chartLimits?.behaviorAfterLimit}),h.common.configFiltersChanged=hS(e,r),h.common.xOrYChanged=mS(d,l),h.common.filterBySelectionChanged=yS(i,a),h.common.dataForFilterBySelectionChanged=IS({previousSelectionOIDs:n,options:a}),h.common.binTemporalDataChanged=gS(e,r),h.common.valueFormatChangeRequiresNewData=bS(e,r),h.common={...h.common,...vS({previousSeries:d,newConfig:r,setTimeBinningInfoWhenNotProvided:a?.setTimeBinningInfoWhenNotProvided,queryObject:o})},c){case g.HistogramSeries:h.histogram.dataPropsChanged=xv(d,l)||wv(d,l);break;case g.LineSeries:case g.BarSeries:case g.ComboLineAndBarSeries:h.common.numberOfSeriesChanged=Uu(d,l);break;case g.BoxPlotSeries:rt(e)&&rt(r)&&(h.common.numberOfSeriesChanged=Uu(d,l),h.boxPlot.showMeanChanged=SS(e,r));break;case g.GaugeSeries:h.gauge.valueConversionChanged=wS(e,r);break;case g.HeatSeries:Kr(e)&&Kr(r)&&(h.heatChart.binningChanged=xS(e,r),h.heatChart.hideEmptyRowsAndColumnsChanged=CS(e,r),h.heatChart.includeLeapDay=TS(e,r));break;case g.ScatterSeries:h.scatterPlot.tooltipFieldsChanged=FS({previousConfig:e,newConfig:r,fieldList:s});break}return f=Object.values(h.common).some(y=>y),(h.gauge.valueConversionChanged||h.histogram.dataPropsChanged||h.boxPlot.showMeanChanged||h.heatChart.binningChanged||h.heatChart.hideEmptyRowsAndColumnsChanged||h.heatChart.includeLeapDay||h.scatterPlot.tooltipFieldsChanged)&&(p=!0),u=f||p,{dataUpdateNeeded:u,dataUpdateDetails:h}}function NF(t,e){let r=Wr(t);if(r&&r.series.length>1){let{preferLabel:a,orderBy:i}=r.orderOptions?.series??{};if(i!==void 0){let n;if(a===!1){let s=X(r.series);n=Cp(s)?"splitByValue":"name"}else n="name";r.series.sort((s,o)=>{let l,d;n==="splitByValue"?(l=ct({where:s.query?.where})??"",d=ct({where:o.query?.where})??""):(l=s.name,d=o.name);let[c,u]=i.toUpperCase()===Ne.Descending?[d,l]:[l,d];return typeof c=="string"&&typeof u=="string"?c.localeCompare(u):Number(c)-Number(u)})}}return Kb({data:r?.series.map(a=>a.id),htmlContainer:e}),r}function Vp(t){let e,r=t?.orderOptions?.data;return t.series?.length>0&&r?.orderType===ot.MultiAxes&&(e=[],e.push({sortingField:te.xField,orderBy:r.orderByX??Ne.Ascending}),e.push({sortingField:r.orderByY!==void 0?te.yField:"",orderBy:r.orderByY})),e}function AS(t){let{chartConfig:e,field:r}=t,a,i=Vp(e);return i?.length===2&&(a=r===te.xField?i[0]?.orderBy:i[1]?.orderBy),a}function PS(t){let e=X(t.series),r;if(t.orderOptions?.data!==void 0){let a=t.orderOptions?.data?.orderType??ot.Category,i=t.orderOptions?.data&&"orderBy"in t.orderOptions.data?t.orderOptions.data.orderBy:void 0;if(a===ot.Category)a=t.series[0].x;else{a===ot.Mean?a=H.Average:a===ot.Median&&(a=H.Median);let n=e===x.BoxPlotMultiFieldsAndCategory&&typeof t.series[0].y=="string"?t.series[0].y:void 0,s=Ze(t.series[0].query?.where),o=ct({where:t.series[0].query?.where});a=ze({key:a,y:n,chartSubType:e,splitBy:s,splitByValue:o}),Array.isArray(i)&&(i=Ne.Ascending)}r={sortingField:a,orderBy:i??Ne.Ascending,preferLabel:t.orderOptions.data&&"preferLabel"in t.orderOptions.data?t.orderOptions.data.preferLabel??!0:!0}}return r}function ES(t){let e=t.series[0],{x:r,y:a}=e,i=X(t.series)===x.PieFromFields,n=X(t.series)===x.BarAndLineFromFields,s,o="",l;if(t.orderOptions?.data!==void 0){let d=t.orderOptions.data&&"preferLabel"in t.orderOptions.data?t.orderOptions.data.preferLabel:!0;if(o=t.orderOptions?.data?.orderType??ot.Category,l=t.orderOptions?.data&&"orderBy"in t.orderOptions.data?t.orderOptions.data.orderBy:void 0,o===ot.Category?i?o=lt:o=d?r:Fi.originalCategoryValue:o=i?Wt:[a].flat()[0],o!==void 0&&o!==""){let c=lo(t);if(K(t.series)!==g.PieSeries&&o!==r&&t.series?.length>1)switch(c){case yt.Stacked:o=A.technicalSortingFieldBySum;break;case yt.Stacked100:o=A.technicalSortingFieldByPercent;break;case yt.Side:typeof a=="string"&&(o=a);break}s={sortingField:o,orderBy:l??Ne.Ascending,preferLabel:d}}}else(n||i)&&t.series[0].query?.outStatistics&&(l=t.series[0].query.outStatistics.map(d=>d.onStatisticField),l?.length>1&&(s={sortingField:Fi.originalCategoryValue,orderBy:l,preferLabel:!1}));return s}function gn(t){let e,r=K(t.series);if(t.series?.length>0){let a;switch(r){case g.HeatSeries:Kr(t)&&(e=Vp(t));break;case g.BoxPlotSeries:rt(t)&&(a=PS(t));break;case g.LineSeries:case g.BarSeries:case g.RadarSeries:case g.PieSeries:a=ES(t);break}!e&&a&&(e=[],e.push(a))}return e}function BF(t){let{oldConfig:e,newConfig:r,dataWasUpdated:a}=t,i=K(r.series),n=X(r.series),s=!1,o=!1;if(n!==x.BoxPlotMonoField&&n!==x.BoxPlotMonoFieldAndSplitBy&&r.orderOptions?.data!==void 0){let l=gn(e),d=gn(r);if(i===g.HeatSeries){let c=l?l[0]:void 0,u=d?d[0]:void 0,f=l?l[1]:void 0,p=d?d[1]:void 0;o=e.orderOptions?.data?.orderType!==r.orderOptions?.data?.orderType||c?.sortingField!==u?.sortingField||c?.orderBy!==u?.orderBy||f?.sortingField!==p?.sortingField||f?.orderBy!==p?.orderBy,s=o||a}else{let c=l?l[0]:void 0,u=d?d[0]:void 0;o=e.orderOptions?.data?.orderType!==r.orderOptions?.data?.orderType||c?.sortingField!==u?.sortingField||c?.orderBy!==u?.orderBy||(c?.preferLabel??!0)!==(u?.preferLabel??!0),s=o||a}}return s}function LS(t=Oe.None,e){return t===Oe.None||t===Oe.Log&&e>0||t===Oe.Sqrt&&e>=0}function _p(t,e){let r={valid:!1};return e===!0?r.invalidType=ae.HistogramEmptyField:t===Oe.Log?r.invalidType=ae.NegativeValueInLogCalculation:t===Oe.Sqrt&&(r.invalidType=ae.NegativeValueInSqrtCalculation),r}function DS(t,e){let r=t;switch(e){case Oe.Log:r=Math.log(t);break;case Oe.Sqrt:r=Math.sqrt(t);break}return r}function NS(t){let e=t;if(t){let r=t.toString().split(".");if(r[1]!==void 0){let a=10**-r[1].length;e=t-a}}return e}function zp(t){let e="field";switch(t){case Oe.Log:e="natural-log";break;case Oe.Sqrt:e="square-root";break;case Oe.None:}return e}async function BS(t){let{queryObject:e,fieldName:r,queryConfig:a,abortKey:i}=t,n=se(e),{idField:s,isTraditionalTypeOID:o}=_t(n),l=o?s:"*",d=`${W.Count}_${s}`,c=`${W.Count}_${r}`,u=`${W.Minimum}_${r}`,f=`${W.Maximum}_${r}`,p={...a,outStatistics:[{statisticType:W.Count,onStatisticField:l,outStatisticFieldName:d},{statisticType:W.Count,onStatisticField:r,outStatisticFieldName:c},{statisticType:W.Minimum,onStatisticField:r,outStatisticFieldName:u},{statisticType:W.Maximum,onStatisticField:r,outStatisticFieldName:f}]},h=await oa({queryObject:e,queryConfig:p,abortKey:i}),y=h.get(d)??Number.NaN,m=h.get(c)??Number.NaN,b=h.get(u)??Number.NaN,v=h.get(f)??Number.NaN;return{countExcludingNulls:m,countIncludingNulls:y,min:b,max:v}}async function $S(t){let{queryConfig:e,chartConfig:r,queryObject:a,abortKey:i}=t,n=r.series[0],{x:s,dataTransformationType:o}=n,l=[],{countIncludingNulls:d,countExcludingNulls:c,min:u,max:f}=await BS({queryObject:a,queryConfig:e,fieldName:s,abortKey:i}),p=LS(o,u),h=c<2||u===f,y={...e};return y.where=Ae([y.where,`${s} is not null`]),{rawData:l,dataCompatibleWithTransformation:p,dataCountIncompatible:h,countExcludingNulls:c,countIncludingNulls:d}}function MS(t){let e={...t};return e.avg=e.avg??Number.NaN,e.count=e.count??Number.NaN,e.max=e.max??Number.NaN,e.min=e.min??Number.NaN,e.stddev=e.stddev??Number.NaN,e.sum=e.sum??Number.NaN,e.variance=e.variance??Number.NaN,e.median=e.median??Number.NaN,e}function qS(t){let{seriesConfig:e,layer:r,useFeaturesInView:a,view:i,queryConfig:n}=t,{x:s,dataTransformationType:o}=e,l={layer:r,view:i,field:s,sqlWhere:or(n.where)?void 0:n.where,useFeaturesInView:a};return o!==Oe.None&&(l={...l,normalizationType:zp(o)}),l}function RS(t){let{seriesConfig:e,layer:r,useFeaturesInView:a,view:i,minValue:n,maxValue:s,queryConfig:o}=t,{x:l,binCount:d,dataTransformationType:c}=e,u={layer:r,view:i,field:l,minValue:n,maxValue:s,numBins:d??Fb,classificationMethod:"equal-interval",sqlWhere:or(o.where)?void 0:o.where,useFeaturesInView:a};return c!==Oe.None&&(u={...u,normalizationType:zp(c)}),u}function kS(t,e){let r=Number.NaN;return t!==void 0&&e!==void 0&&(r=t-e),r}async function WS(t){let{chartConfig:e,queryConfig:r,queryObject:a,countExcludingNulls:i,countIncludingNulls:n,options:s,errorStrings:o}=t,l=e.series[0],{dataTransformationType:d}=l,c={valid:!0},u=se(a),f=Ni(r?.geometry)?.extent?.toJSON()!==void 0,p=s?.view,h=qS({seriesConfig:l,layer:u,view:p,useFeaturesInView:f,queryConfig:r}),y;if(p!==void 0&&(y=new Mu({geometry:p.extent}),p.extent!==void 0&&Ip(u))){let{distance:P,units:E}=r;P!==void 0&&(y.distance=P),E!==void 0&&(y.units=E)}if(r.timeExtent){let P={start:r.timeExtent[0],end:r.timeExtent[1]};y===void 0?y=new Mu({timeExtent:P}):y.timeExtent=P}h.filter=y;let m;h.outStatisticTypes={exclude:["median"]};try{m=await qu(h)}catch(P){throw new Qe(Ye.QueryFeaturesError,o.errors.queryError,P)}h.outStatisticTypes={include:["median"]};try{let P=await qu(h);P?.median&&(m.median=P.median)}catch{}m=MS(m);let{avg:b,count:v,stddev:S,min:C,max:F,sum:I,median:M}=m;if(v===0)c={..._p(d)};else{let P=RS({seriesConfig:l,layer:u,view:p,useFeaturesInView:f,minValue:NS(C),maxValue:F,valueExpression:h.valueExpression,queryConfig:r});P.filter=y;let E;try{E=await Xg(P)}catch(R){throw new Qe(Ye.QueryFeaturesError,o.errors.queryError,R)}let N=kS(n,i);c.data={mean:b,stddev:S,min:C,max:F,median:Number(M),bins:E?.bins,count:i,nulls:N,sum:I??void 0},c.data.bins.length>0&&(c.data.bins[c.data.bins.length-1].isLastBin=!0)}return c}async function Up(t){let{chartConfig:e,queryConfig:r,queryObject:a,options:i,abortKey:n,errorStrings:s}=t,{series:o}=e,l=o[0],d;if(Ke(a))d=await S0(t);else{let{rawData:c,dataCompatibleWithTransformation:u,dataCountIncompatible:f,countIncludingNulls:p,countExcludingNulls:h}=await $S({queryObject:a,chartConfig:e,queryConfig:r,abortKey:n});d={valid:!0},!u||f?d=_p(l.dataTransformationType,f):d=await WS({chartConfig:e,queryObject:a,queryConfig:r,countIncludingNulls:p,countExcludingNulls:h,options:i,errorStrings:s})}return d}async function jS(t){let{queryObject:e,queryConfig:r,chartConfig:a,x:i}=t,{series:n}=a,{dataTransformationType:s}=n[0],o={...r,orderByFields:[i],outFields:[i]};return{valid:!0,data:{dataItems:(await Dt({queryObject:e,queryConfig:o})).map(l=>({[i]:DS(l.attributes[i],s)}))}}}var Jr={groupByCaseBegin:"CASE",groupByOutKeyword:"OUT",groupByCaseEnd:"ELSE 'OUT' END"};function $F(t){return K(t.series)!==g.BoxPlotSeries?A.xAxisField:t.series[0].x}function MF(t){let e=lo(t);return e===yt.Stacked||e===yt.Stacked100}function qF(t,e){let r=[],a=new Map,i=new Map;return t.forEach((n,s)=>i.set(n.id,s)),e.forEach((n,s)=>{let o=i.get(n.id);if(o!==void 0){let l=new Set;for(;a.has(o)&&!l.has(o);)l.add(o),o=a.get(o)??o;o!==s&&(r.push([o,s]),a.set(s,o))}}),r}function VS(t){let e={...t};return t.showMean===!0&&(e.series=[e.series[0]],e.series[0].query?.where!==void 0&&delete e.series[0].query.where),e}function Hp(t){return Kr(t)&&nr(t?.axes?.[0]?.valueFormat)&&nr(t?.axes?.[1]?.valueFormat)}function bn(t){let{dataInfo:e,chartType:r,subError:a}=t;switch(e.valid=!1,r){case g.BarSeries:case g.ComboLineAndBarSeries:e.invalidType=ae.BarElementExceedsLimit;break;case g.LineSeries:e.invalidType=ae.LineChartExceedsLimit;break;case g.PieSeries:e.invalidType=ae.PieChartExceedsLimit;break;case g.GaugeSeries:e.invalidType=ae.GaugeExceedsLimit;break;case g.BoxPlotSeries:a?.outlierLimit===!0?e.invalidType=ae.BoxPlotOutliersExceedsLimit:e.invalidType=ae.BoxPlotExceedsLimit;break;case g.HeatSeries:e.invalidType=ae.HeatChartExceedsLimit;break}}function _S(t,e){t.valid=!1,t.invalidType=e}function RF(t){let{invalidType:e,chartLimits:r,elementCount:a,seriesCount:i,queryObject:n,filterBySelection:s,formatLocale:o=cf(document.documentElement),isTemporalChart:l,errorStrings:d}=t,c=d.errors.defaultInvalidChart,u,f=new Intl.NumberFormat(o),p=Xr(r),{maxCategoryCount:h}=p,y=d.modalHeaders.invalidChart;switch(e){case ae.BarElementExceedsLimit:{y=d.modalHeaders.tooManyFeatures;let m=Number.NaN,b=Number.NaN,v="";i!==void 0&&(i<=p.maxBarChartSeriesCount?i===1?(v=d.errors.uniqueSeriesBarCountCannotExceedLimit,m=p.maxBarUniqueSeriesCountTotal):i===2?(v=d.errors.twoSeriesBarCountCannotExceedLimit,m=p.maxBarTwoSeriesCountTotal,b=p.maxBarTwoSeriesCountPerSeries):i>2&&(v=d.errors.threePlusSeriesBarCountCannotExceedLimit,m=p.maxBarThreePlusSeriesCountTotal,b=p.maxBarThreePlusSeriesCountPerSeries):(v=d.errors.barSeriesCountCannotExceedLimit,b=p.maxBarChartSeriesCount));let S=f.format(m),C=f.format(b),F=a!==void 0?f.format(a):"";c=qe(v,{totalLimit:S,seriesLimit:C,elementCount:F}),u={actualCount:a??Number.NaN,totalLimit:m,seriesLimit:b};break}case ae.LineChartExceedsLimit:{y=d.modalHeaders.tooManyFeatures;let m=Number.NaN,b=Number.NaN,v="";i!==void 0&&(i<=p.maxLineChartSeriesCount?i===1?(v=l?d.errors.uniqueTemporalSeriesLineCountCannotExceedLimit:d.errors.uniqueSeriesLineCountCannotExceedLimit,m=p.maxLineUniqueSeriesCountTotal):i===2?(v=l?d.errors.twoTemporalSeriesLineCountCannotExceedLimit:d.errors.twoSeriesLineCountCannotExceedLimit,m=p.maxLineTwoSeriesCountTotal,b=p.maxLineTwoSeriesCountPerSeries):i>2&&(v=l?d.errors.threePlusTemporalSeriesLineCountCannotExceedLimit:d.errors.threePlusSeriesLineCountCannotExceedLimit,m=p.maxLineThreePlusSeriesCountTotal,b=p.maxLineThreePlusSeriesCountPerSeries):(v=d.errors.lineSeriesCountCannotExceedLimit,b=p.maxLineChartSeriesCount));let S=f.format(m),C=f.format(b),F=a!==void 0?f.format(a):"";c=qe(v,{elementCount:F,seriesLimit:C,totalLimit:S}),u={actualCount:a??Number.NaN,totalLimit:m,seriesLimit:b}}break;case ae.BoxPlotExceedsLimit:{y=d.modalHeaders.tooManyFeatures;let m=Number.NaN,b=Number.NaN,v="";i!==void 0&&(i<=p.maxBoxPlotSeriesCount?i===1?(v=d.errors.uniqueSeriesBoxCountCannotExceedLimit,m=p.maxBoxUniqueSeriesCountTotal):i===2?(v=d.errors.twoSeriesBoxCountCannotExceedLimit,m=p.maxBoxTwoSeriesCountTotal,b=p.maxBoxTwoSeriesCountPerSeries):i>2&&(v=d.errors.threePlusBoxLineCountCannotExceedLimit,m=p.maxBoxThreePlusSeriesCountTotal,b=p.maxBoxThreePlusSeriesCountPerSeries):(v=d.errors.boxSeriesCountCannotExceedLimit,b=p.maxBoxPlotSeriesCount));let S=f.format(m),C=f.format(b),F=a!==void 0?f.format(a):"";c=qe(v,{elementCount:F,seriesLimit:C,totalLimit:S}),u={actualCount:a??Number.NaN,totalLimit:m,seriesLimit:b}}break;case ae.BoxPlotOutliersExceedsLimit:{y=d.modalHeaders.tooManyFeatures;let m=d.errors.boxSeriesOutlierCannotExceedLimit,b=p.maxBoxPlotOutlierLimit,v=f.format(b);c=qe(m,{totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.HeatChartExceedsLimit:{y=d.modalHeaders.tooManyFeatures;let m=d.errors.heatChartCannotExceedLimit,b=p.maxHeatChartCellLimit,v=f.format(b),S=a!==void 0?f.format(a):"";c=qe(m,{featureCount:S,totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.PieChartExceedsLimit:{y=d.modalHeaders.tooManyFeatures;let m=d.errors.pieChartSlicesCannotExceedLimit,b=p.maxPieChartSliceCountTotal,v=f.format(b),S=a!==void 0?f.format(a):"";c=qe(m,{sliceCount:S,totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.GaugeExceedsLimit:{y=d.modalHeaders.tooManyFeatures;let m=d.errors.gaugeCannotExceedLimit,b=p.maxGaugeByFeaturesLimit,v=f.format(b),S=a!==void 0?f.format(a):"";c=qe(m,{featureCount:S,totalLimit:v}),u={actualCount:a??Number.NaN,totalLimit:b}}break;case ae.PieChartMixOfNegativePositiveSlices:y=d.modalHeaders.cannotCombineNegativeAndPositiveSlices,c=d.errors.pieChartCannotHaveMixtureOfPositiveAndNegativeSlices;break;case ae.NegativeValueInSqrtCalculation:y=d.modalHeaders.invalidData,c=d.errors.negativeValueInDataForSqrtTransformation;break;case ae.NegativeValueInLogCalculation:y=d.modalHeaders.invalidData,c=d.errors.negativeValueInDataForLogTransformation;break;case ae.HistogramEmptyField:s===!0?(y=d.modalHeaders.noDataAvailable,c=d.errors.noDataFBSMessage):Kt(n)?(y=d.modalHeaders.noDataAvailable,c=d.errors.noDataFBEMessage):(y=d.modalHeaders.invalidChart,c=d.errors.histogramEmptyField);break;case ae.EmptyDataSet:y=d.modalHeaders.noDataAvailable,s===!0?c=d.errors.noDataFBSMessage:Kt(n)?c=d.errors.noDataFBEMessage:c=d.errors.noDataMessage;break;case ae.NegativeValueInXAxisLogScale:c=d.errors.logarithmicXAxisNotPossible;break;case ae.NegativeValueInYAxisLogScale:c=d.errors.logarithmicYAxisNotPossible;break;case ae.BadData:}if(c===d.errors.defaultInvalidChart&&(e===ae.BarElementExceedsLimit||e===ae.LineChartExceedsLimit||e===ae.HeatChartExceedsLimit||e===ae.PieChartExceedsLimit||e===ae.GaugeExceedsLimit||e===ae.BoxPlotExceedsLimit)&&typeof a=="number"&&typeof i=="number"&&a/i>h){let m=a/i;c=qe(d.errors.categoryCountCannotExceedLimit,{categoryCount:f.format(m),maxCategoryCount:f.format(h)})}return{keyword:e??ae.BadData,header:y,message:c,params:u}}function Ei(t,e){return`${e}_${t}`}function ro(t){let{value:e,mean:r,stdDev:a}=t;return(e-r)/a}function po(t){let{dataItem:e,chartSubType:r,y:a,splitByValue:i,meanPerField:n,stdDevPerField:s}=t,o=e,l={chartSubType:r,y:a,splitByValue:i},d=ze({...l,key:H.Average}),c=ze({...l,key:H.StandardDeviation}),u=n??Number(e[d]),f=s??Number(e[c]);return Number.isFinite(u)&&Number.isFinite(f)&&Object.values(H).forEach(p=>{let h=ze({key:p,y:a,chartSubType:r,splitByValue:i}),y=e[h];if(y!=null){let m=Number(y);if(Number.isFinite(m)){l={...l,key:p,showOutliers:!1,standardizeValues:!0};let b=ze(l);if(o[b]=ro({mean:u,stdDev:f,value:m}),p===H.Min||p===H.Max){l={...l,key:p,showOutliers:!0,standardizeValues:!0},b=ze(l),l={...l,standardizeValues:!1,splitByValue:i};let v=ze(l);m=Number(e[v]),Number.isFinite(m)&&(o[b]=ro({mean:u,stdDev:f,value:m}))}}}}),o}function zS(t){let{data:e,yList:r,calculateZScore:a=!1}=t,i=e[0],n=new Map;return r.forEach(s=>{let o={};Object.keys(i).forEach(l=>{l.startsWith(s)?o[l.replace(`${s}_`,"")]=i[l]:l.includes(A.rendererSymbolField)&&(o[l]=i[l]),o[A.boxPlot.boxPlotCategory]=s,a&&(o=po({dataItem:o,chartSubType:x.BoxPlotMultiFields}))}),n.set(s,o)}),Array.from(n.values())}function US(t){let{data:e,splitByField:r,y:a}=t,i={[A.boxPlot.boxPlotCategory]:a};return e.forEach(n=>{let s=n[r];s!==void 0&&Object.keys(n).forEach(o=>{o===A.rendererSymbolField?i[`${o}_${s?.toString()}`]=n[o]:o===A.boxPlot.boxPlotMeanLineMarkerId?i[o]=n[o]:i[`${s?.toString()}_${o}`]=n[o]})}),[i]}function HS(t){let{splitByField:e,data:r,yList:a,calculateZScore:i=!1,meanAndStdDevPerField:n}=t,s=new Map;return r.forEach(o=>{let l=o[e];a.forEach(d=>{let c={[A.boxPlot.boxPlotCategory]:d};Object.entries(o).forEach(([u,f])=>{u.startsWith(`${d}_`)?c[`${l}_${u.replace(`${d}_`,"")}`]=f:u.includes(A.rendererSymbolField)?c[`${u}_${l}`]=f:u===A.boxPlot.boxPlotMeanLineMarkerId&&(c[u]=o[u])}),i&&(c=po({dataItem:c,chartSubType:x.BoxPlotMultiFieldsAndSplitBy,splitByValue:l,meanPerField:n?.[Ei(d,W.Average)],stdDevPerField:n?.[Ei(d,W.StandardDeviation)]})),s.set(d,{...s.get(d)??{},...c})})}),Array.from(s.values())}function GS(t){let{data:e,yList:r,calculateZScore:a=!1,meanAndStdDevPerField:i}=t,n=e;return a&&n.forEach(s=>{r.forEach(o=>{po({dataItem:s,chartSubType:x.BoxPlotMultiFieldsAndCategory,y:o,meanPerField:i?.[Ei(o,W.Average)],stdDevPerField:i?.[Ei(o,W.StandardDeviation)]})})}),n}function QS(t){let{splitByField:e,x:r,data:a}=t,i=new Map;return a.forEach(n=>{let s=n[r],o={[r]:s},l=n[e];Object.entries(n).forEach(([d,c])=>{if(d.includes(A.rendererSymbolField))o[`${A.rendererSymbolField}_${l?.toString()}`]=c;else if(d===A.boxPlot.boxPlotMeanLineMarkerId)o[d]=n[d];else if(d!==e&&d!==r){let u=d!==A.xAxisField&&d!==A.originalCategoryValue?`${l?.toString()}_${d}`:d;o[u]=c}}),i.set(s,{...i.get(s)??{},...o})}),Array.from(i.values())}function ZS(t,e){let{series:r}=t,a=r[0],{y:i}=a,n=X(t.series),s={y:n===x.BoxPlotMultiFieldsAndCategory?i:void 0,chartSubType:n},o=t.series.map(l=>{let d=ct({where:l.query?.where,normalize:!1,escape:!0});return d!==null&&`${d}`.startsWith("'")&&`${d}`.endsWith("'")&&(d=d.substring(1,d.length-1)),d});o.length===0&&o.push(" "),e.forEach(l=>{o.forEach(d=>{s.splitByValue=d;let c=ze({...s,key:H.Min,showOutliers:!0}),u=ze({...s,key:H.Min,showOutliers:!1}),f=ze({...s,key:H.Max,showOutliers:!0}),p=ze({...s,key:H.Max,showOutliers:!1});l[f]===void 0&&l[p]!==void 0&&(l[f]=l[p]),l[c]===void 0&&l[u]!==void 0&&(l[c]=l[u])})})}function KS(t,e){let r,a,i=t[e[H.IQR]],n=t[e[H.FirstQuartile]],s=t[e[H.ThirdQuartile]];return Number.isFinite(i)&&Number.isFinite(n)&&Number.isFinite(s)&&(r=n-i*1.5,a=s+i*1.5),{outlierMinThreshold:r,outlierMaxThreshold:a}}function Hu(t){let{yField:e,xField:r,xValue:a,splitByField:i,splitByValue:n,outlierMaxThreshold:s,outlierMinThreshold:o,target:l}=t,d;if(r!==void 0&&a!==void 0){let f=typeof a!="string"?a:`'${Js(a)}'`;d=`${r}=${f.toString()}`}let c;if(i!==void 0&&n!==void 0){let f=typeof n!="string"?n:`'${Js(n)}'`;c=`${i}=${f.toString()}`}let u;return l==="outliers"&&o!==s?u=`(${e}<${o} OR ${e}>${s})`:l==="alternativeData"&&(o===s?u=`(${e}=${o})`:u=`(${e}>=${o} AND ${e}<=${s})`),[d,c,u].filter(f=>f!==void 0).join(" AND ")}function Gp(t){let{data:e,yField:r,x:a,chartSubType:i,splitByField:n}=t,s=i===x.BoxPlotMonoField||i===x.BoxPlotMonoFieldAndCategory||i===x.BoxPlotMonoFieldAndSplitBy||i===x.BoxPlotMonoFieldAndCategoryAndSplitBy?void 0:r,o=Ti(s),l=[],d=[],{maxOperandsPerWhereClause:c}=wn(),u=[],f=[],p=1;return e.forEach((h,y)=>{let{outlierMinThreshold:m,outlierMaxThreshold:b}=KS(h,o);if(typeof m=="number"&&typeof b=="number"){let v={yField:r,outlierMinThreshold:m,outlierMaxThreshold:b};(i===x.BoxPlotMonoFieldAndCategory||i===x.BoxPlotMultiFieldsAndCategory||i===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&a!==void 0&&a in h&&(v.xField=a,v.xValue=ta({value:h[a],dataContext:h,keepNullValues:!0})),(i===x.BoxPlotMonoFieldAndSplitBy||i===x.BoxPlotMultiFieldsAndSplitBy||i===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&n!==void 0&&n in h&&(v.splitByField=n,v.splitByValue=h[n]),u.push(Hu({...v,target:"outliers"})),f.push(Hu({...v,target:"alternativeData"})),(p%c===0||y===e.length-1)&&(l.push(Ae(u,"OR")),d.push(Ae(f,"OR")),u=[],f=[])}p+=1}),{outliersFilterBatches:l,dataWithoutOutliersFilterBatches:d}}function JS(t){let{data:e,outlierDataItem:r,chartSubType:a,x:i,y:n,meanAndStdDevPerField:s,splitByField:o}=t,l=s?.[Ei(n,W.Average)],d=s?.[Ei(n,W.StandardDeviation)];if(l===void 0&&d===void 0)switch(a){case x.BoxPlotMultiFields:{let c=Ti(n),u=e[0];l=Number(u[c[H.Average]]),d=Number(u[c[H.StandardDeviation]]);break}case x.BoxPlotMultiFieldsAndCategory:{let c=e.find(u=>u[i]===r[i]);if(c!==void 0){let u=Ti(n);l=Number(c[u[H.Average]]),d=Number(c[u[H.StandardDeviation]])}break}case x.BoxPlotMultiFieldsAndSplitBy:{let c=e.find(u=>u[o]===r[o]);if(c!==void 0){let u=Ti(n);l=Number(c[u[H.Average]]),d=Number(c[u[H.StandardDeviation]])}break}}return{mean:l,stdDev:d}}async function YS(t){let{seriesConfig:e,data:r,uniqueQuery:a,queryObject:i,meanAndStdDevPerField:n,abortKey:s}=t,o=X(e),l=e[0],{x:d}=l,c=Ze(l.query?.where),u=se(i),f=_t(u).idField,p=it(e),h=[];for(let b=0;b<p.length;b+=1){let v=p[b],{outliersFilterBatches:S}=Gp({data:r,yField:v,x:d,chartSubType:o,splitByField:c});for(let C=0;C<S.length;C+=1){let F=S[C];if(F!==""){let I=[];d!==A.boxPlot.boxPlotCategory&&I.push(d),I.push(v),c!==""&&I.push(c),I.push(f);let M={...a,where:Ae([a.where,F]),groupByFieldsForStatistics:void 0,outStatistics:void 0,orderByFields:void 0,num:void 0,outFields:I};h.push(Dt({queryObject:i,queryConfig:M,featureCount:1,abortKey:s}))}}}let y=await Promise.all(h),m=new Map;for(let b=0;b<y.length;b+=1){let v=y[b],S=p[b];v.forEach(C=>{let F={...C.attributes};if(F[S]!==void 0){d===A.boxPlot.boxPlotCategory&&(F[A.boxPlot.boxPlotCategory]=S);let I={key:H.Outlier,chartSubType:o};switch(o){case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:I={...I,splitByValue:F[c]};break;case x.BoxPlotMultiFieldsAndCategory:I={...I,y:S};break}let M=ze(I),P=F[S];F[M]=P;let E=`${F[d]}-${F[c]}-${P}`,N=m.get(E);if(F[ue.uniqueIdsName]=[...N?.[ue.uniqueIdsName]??[],F[f]],delete F[f],lf(o)){let R=ze({...I,standardizeValues:!0}),{mean:q,stdDev:L}=JS({data:r,outlierDataItem:F,chartSubType:o,x:d,y:S,splitByField:c,meanAndStdDevPerField:n});q!==void 0&&L!==void 0&&(F[R]=ro({value:P,mean:q,stdDev:L}))}delete F[S],F[A.boxPlot.boxPlotOutlierId]=!0,m.set(E,F)}})}return Array.from(m.values())}async function XS(t){let{data:e,queryObject:r,uniqueQuery:a,elementCount:i,chartConfig:n,chartLimits:s,abortKey:o}=t,l=[],{series:d,showMean:c}=n,u=In({showMean:c,seriesConfig:d}),f=X(d),p=pr(n),{x:h}=p,y=Ze(p.query?.where),m=[];for(let v=0;v<u.length;v+=1){let S=u[v],{dataWithoutOutliersFilterBatches:C}=Gp({data:e,yField:S,x:h,chartSubType:f,splitByField:y});for(let F=0;F<C.length;F+=1){let I=C[F],M={...a,where:Ae([a.where,I])};M.outStatistics!==void 0&&(M.outStatistics=M.outStatistics?.filter(P=>(P.statisticType===W.Minimum||P.statisticType===W.Maximum)&&P.onStatisticField===S).map(P=>({...P,outStatisticFieldName:`${P.outStatisticFieldName}${A.boxPlot.boxPlotOutliersSuffix}`}))),m.push(Fn({queryObject:r,uniqueQuery:M,chartConfig:n,elementCount:i,isTimeBinningSeries:!1,showMean:c,chartLimits:s,abortKey:o}))}}let b=await Promise.all(m);for(let v=0;v<b.length;v+=1)l.push(...b[v]);return f!==x.BoxPlotMonoFieldAndCategoryAndSplitBy&&(l=na({data:l,x:y!==void 0&&y!==""?y:h})),l}async function ew(t){let{queryObject:e,uniqueQuery:r,chartConfig:a,abortKey:i}=t,n,{series:s,showMean:o}=a,l=X(s);if(l===x.BoxPlotMultiFieldsAndCategory||l===x.BoxPlotMultiFieldsAndSplitBy){let d=In({showMean:o,seriesConfig:s}),c={...r};delete c.outStatistics,delete c.groupByFieldsForStatistics,delete c.orderByFields;let u=[];for(let p=0;p<d.length;p+=1){let h=d[p];u.push({statisticType:W.Average,onStatisticField:h,outStatisticFieldName:`${W.Average}_${h}`},{statisticType:W.StandardDeviation,onStatisticField:h,outStatisticFieldName:`${W.StandardDeviation}_${h}`})}c.outStatistics=u;let f=await Dt({queryObject:e,queryConfig:c,featureCount:1,abortKey:i});f.length>0&&(n=f[0].attributes)}return n}function tw(t){let{data:e,additionalData:r,chartConfig:a}=t,i=a.series[0],{x:n}=i,s=Ze(i.query?.where);return e.map(o=>{let l=o,d=r.find(c=>c[n]===o[n]&&(s===""?!0:c[s]===o[s]));return d!==void 0&&(l={...o,...d}),l})}function Qp(t){let{chartConfig:e,data:r,calculateZScore:a=!1,meanAndStdDevPerField:i}=t,{series:n,showMean:s}=e,o=pr(e),l=X(e.series),{x:d}=o,c=In({showMean:s,seriesConfig:n}),u=r;if(r?.[0]!==void 0){let f=Ze(o.query?.where);switch(l){case x.BoxPlotMonoField:u[0][A.boxPlot.boxPlotCategory]=c[0];break;case x.BoxPlotMultiFields:u=zS({data:r,yList:c,calculateZScore:a});break;case x.BoxPlotMonoFieldAndSplitBy:u=US({data:r,splitByField:f,y:c[0]});break;case x.BoxPlotMultiFieldsAndSplitBy:u=HS({splitByField:f,data:r,yList:c,meanAndStdDevPerField:i,calculateZScore:a});break;case x.BoxPlotMultiFieldsAndCategory:u=GS({data:r,yList:c,meanAndStdDevPerField:i,calculateZScore:a});break;case x.BoxPlotMonoFieldAndCategoryAndSplitBy:u=QS({splitByField:f,x:d,data:r});break;case x.BoxPlotMonoFieldAndCategory:}}return ZS(e,u),u}async function rw(t){let{data:e,queryObject:r,uniqueQuery:a,fetchFullBoxPlotData:i,chartConfig:n,elementCount:s,chartLimits:o,abortKey:l}=t,d=e,c=[];if(d!==void 0){let{series:u}=n,f=await ew({queryObject:r,uniqueQuery:a,chartConfig:n,abortKey:l});if(i!==!1){c=await YS({queryObject:r,uniqueQuery:a,seriesConfig:u,data:d,abortKey:l});let p=await XS({queryObject:r,uniqueQuery:a,elementCount:s,data:e,chartConfig:n,chartLimits:o,abortKey:l});d=tw({data:d,additionalData:p,chartConfig:n})}d=Qp({chartConfig:n,data:d,meanAndStdDevPerField:f,calculateZScore:!0})}return{dataItems:d,outliers:c}}async function iw(t){let{queryObject:e,queryConfig:r,chartConfig:a,abortKey:i}=t,n=a.series[0],{x:s,valueConversion:o}=n,l=yo(a),d=await Dt({queryObject:e,queryConfig:r,featureCount:r.num??1,abortKey:i}),c=[{[s]:null}];if(l)c=d.map(u=>{ho(u.attributes,s);let f=ku(u.attributes[s],o);return{...u.attributes,[s]:f}});else if(d.length>0){let u=d[0].attributes[s]??d[0].attributes[s.toUpperCase()]??d[0].attributes[s.toLowerCase()];u=ku(u,o),c=[{[s]:u}]}return c}async function aw(t){let{queryObject:e,chartConfig:r,queryConfig:a,options:i,abortKey:n}=t,{chartLimits:s}=i??{},o={valid:!0},{behaviorAfterLimit:l,maxGaugeByFeaturesLimit:d}=s??{},c=yo(r),u=!0,f;if(c&&(f=(await nf({chartConfig:r,queryObject:e,queryConfig:a,behaviorAfterLimit:l,numberMaxOfFeaturesToFetch:d,isGaugeByFeature:c})).elementCount,i?.chartLimits?.behaviorAfterLimit!==Dr.RenderUpToTheLimit&&(u=sr({count:f??0,seriesCount:r.series.length,chartType:g.GaugeSeries,chartLimits:s})),i&&(Number.isFinite(d)||Number.isFinite(f)))){let p=Math.min(d??Number.NaN,f??Number.NaN);Number.isFinite(p)&&(i.chartLimits={...s,maxGaugeByFeaturesLimit:p}),Sp({chartConfig:r,options:i,uniqueQuery:a})}if(Number.isNaN(u)||u){let p=await iw({queryObject:e,chartConfig:r,queryConfig:a,abortKey:n});o.data={dataItems:p},o.count=p.length}else o.count=f,bn({dataInfo:o,chartType:g.GaugeSeries});return o}async function kF(t){let{queryObject:e,chartConfig:r,queryConfig:a}=t,{minimumFromField:i,maximumFromField:n}=r.axes[0],s=[],o="",l="";i!==void 0&&(typeof i=="string"?(o=`${W.Minimum}_${i}`,s.push({statisticType:W.Minimum,onStatisticField:i,outStatisticFieldName:o})):(o=`${i.statisticType}_${i.onStatisticField}`,s.push({...i,outStatisticFieldName:o}))),n!==void 0&&(typeof n=="string"?(l=`${W.Maximum}_${n}`,s.push({statisticType:W.Maximum,onStatisticField:n,outStatisticFieldName:l})):(l=`${n.statisticType}_${n.onStatisticField}`,s.push({...n,outStatisticFieldName:l})));let d={...a,outStatistics:s,orderByFields:void 0,groupByFieldsForStatistics:void 0,returnDistinctValues:void 0,fetchNullValues:void 0,num:void 0};ia(e);let c=await oa({queryObject:e,queryConfig:d}),u=c.get(o),f=c.get(l);return{minimumFromData:u,maximumFromData:f}}function Gu(t){let{orderBy:e,axisFormatOptions:r}=t;return e!==void 0&&r!==void 0&&(!Array.isArray(e)||r?.type===g.CategoryAxisFormat)}function Qu(t,e,r){let a=0;if(Array.isArray(r)){let i=t?.toString()??"",n=e?.toString()??"",s=r.indexOf(i),o=r.indexOf(n);s===-1&&(s=r.length),o===-1&&(o=r.length),a=s-o}else r===Ne.Descending?typeof t=="string"&&typeof e=="string"?a=e.localeCompare(t,void 0,{numeric:!0}):a=(Number(e)||0)-(Number(t)||0):r===Ne.Ascending&&(typeof t=="string"&&typeof e=="string"?a=t.localeCompare(e,void 0,{numeric:!0}):a=(Number(t)||0)-(Number(e)||0));return a}function nw(t){let{arrayToSort:e,chartConfig:r,dataOrderParameters:a}=t,i=a??gn(r),n,s,o=!1,l=!1,d=!1;i&&e.length>1&&([n,s]=i,o=n&&n.sortingField.length>0&&Gu({orderBy:n.orderBy,axisFormatOptions:r.axes?.[0]?.valueFormat}),l=s&&s.sortingField.length>0&&Gu({orderBy:s.orderBy,axisFormatOptions:r.axes?.[1]?.valueFormat}),d=o||l),d&&e.sort((c,u)=>{let f=0;if(o&&n?.sortingField){let p=n.orderBy;f=Qu(c[n.sortingField],u[n.sortingField],p)}if(f===0&&l&&s?.sortingField){let p=s.orderBy;f=Qu(c[s.sortingField],u[s.sortingField],p)}return f})}function sw(t,e,r){let a=0;if(Array.isArray(r)){let i=t?.toString()??"",n=e?.toString()??"",s=r.indexOf(i),o=r.indexOf(n);s===-1&&(s=r.length),o===-1&&(o=r.length),a=s-o}else r===Ne.Descending?typeof t=="string"&&typeof e=="string"?a=e.localeCompare(t,void 0,{numeric:!0}):a=(Number(e)||0)-(Number(t)||0):r===Ne.Ascending&&(typeof t=="string"&&typeof e=="string"?a=t.localeCompare(e,void 0,{numeric:!0}):a=(Number(t)||0)-(Number(e)||0));return a}function Zu(t){let{chartConfig:e,field:r,chartData:a}=t,i=AS({chartConfig:e,field:r}),n=Array.from(new Set(a.map(s=>r in s?s[r]:void 0)));return i&&n.length>1&&n.sort((s,o)=>sw(s,o,i)),n.map(s=>({[r]:s}))}function ow(t){let{chartConfig:e,chartData:r}=t;r.heatChartAxesData={xAxisData:Zu({chartConfig:e,field:te.xField,chartData:r.dataItems}),yAxisData:Zu({chartConfig:e,field:te.yField,chartData:r.dataItems})}}function vn(t){let{arrayToSort:e,chartConfig:r,fieldList:a,isTimeBinningSeries:i}=t;if(i!==!0&&e[0]!==void 0){let{series:n}=r,s=X(n),o=K(n),l=Vt(r),d=gn(r);if(Kr(r)&&e!==void 0)nw({arrayToSort:e,chartConfig:r,dataOrderParameters:d});else if(d?.[0]!==void 0&&e!==void 0&&e.length>1){let{orderBy:c}=d[0],{sortingField:u}=d[0],f=r.orderOptions?.data?.orderType===ot.Category,p=d[0].preferLabel!==!1,h=s===x.BarAndLineFromFields||s===x.PieFromFields||s===x.BoxPlotMultiFields||s===x.BoxPlotMultiFieldsAndSplitBy,y=h||o===g.PieSeries,m=s===x.PieNoAggregation||s===x.BarAndLineNoAggregation||s===x.BarAndLineSplitByNoAggregation;if(f&&y&&(!p||(o===g.LineSeries||o===g.RadarSeries)&&l===g.NumberAxisFormat)&&(u=A.originalCategoryValue),Array.isArray(c))ev({arrayToSort:e,orderBy:c,sortingField:u,fieldList:a,isByFieldsChart:h,preferLabel:p});else{let b=l===g.DateAxisFormat&&f;ra({arrayToSort:e,orderBy:c,sortingField:u,forceAscendingOrder:b,isNonAggregated:m,sortByCategory:f,preferLabel:p,isPieOrByFieldsChart:y})}}}}function WF(t){let{alteredConfig:e,dataInfo:r,fieldList:a,options:i,queryObject:n}=t,s=go(r.data);if(s&&vn({arrayToSort:s,chartConfig:e,fieldList:a,isTimeBinningSeries:fr({seriesConfig:pr(e),xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:i?.setTimeBinningInfoWhenNotProvided,queryObject:n})}),rt(e)){let o=r?.data&&"meanLines"in r.data?r.data.meanLines:void 0;o&&vn({arrayToSort:o,chartConfig:e})}Kr(e)&&r.data&&ow({chartConfig:e,chartData:r.data})}function jF(t){let{config:e,previousConfig:r,dataUpdateNeededProps:a,updatedProps:i,options:n,filterBySelection:s,previousSelectionOIDs:o,fieldList:l,queryObject:d}=t,c=Array.from(i.keys()).some(f=>{let p=!1;if(a.includes(f)){let{oldValue:h,newValue:y}=i.get(f)??{};p=!tr(h,y)}return p}),u;if(!c&&i.get("layer")){let{oldValue:f,newValue:p}=i.get("layer")??{};c=Kt(f)!==Kt(p)}if(i.get("layer")&&(u={common:{layerChanged:!0}}),e&&r){let f=OS({previousConfig:r,newConfig:e,options:n,previousFilterBySelection:i.has("filterBySelection")?i.get("filterBySelection")?.oldValue:s,previousSelectionOIDs:o,fieldList:l,queryObject:d});u=f.dataUpdateDetails,c=c||f.dataUpdateNeeded}return{dataUpdateNeeded:c,dataUpdateDetails:u}}function lw(t){return t?.type==="uniqueValue"&&(t.uniqueValueInfos=t.uniqueValueInfos.map(e=>{let r=e.value===null?A.nullValue:e.value;return{...e,value:r}})),t}async function VF(t){let{data:e,queryObject:r,chartConfig:a,allowColorMatch:i}=t,n=!1,s=[];if(i&&!Ke(r)){let{series:o,chartRenderer:l}=a,d=lw(l),c=d?Ci.ChartRenderer:Ci.LayerRenderer,u=r?se(r):void 0,f=d??u?.renderer,p;u&&c===Ci.LayerRenderer?s=await Wp(u):c===Ci.ChartRenderer&&(s=Sv(f));let h=uv(d,u?.renderer),y=yv({chartRenderer:l,queryObject:r}),m=K(o),b=X(o),v=pr(a),S=Ze(v.query?.where);p=new Map;for(let C=0;C<(m===g.HistogramSeries&&e.length>0?1:e.length);C+=1){let F=e[C],I=await gv({seriesConfig:a.series,dataItem:F,renderer:f,rendererType:h,rendererOrigin:c,chartSubType:b,splitByField:S,graphicTemplate:y,mapAttributesToSymbol:p,rendererFieldNames:s});n=n||I.colorMatchApplied}}return{dataItems:e,colorMatchApplied:n,rendererFieldNames:s}}function dw(t){let{itemsA:e,itemsB:r,isPieFromFields:a,x:i,y:n,outStatisticFieldName:s}=t,o=Wr(e),l=Wr(r),d=!1;if(o===void 0&&l!==void 0||o!==void 0&&l===void 0)d=!0;else if(!a){let c=[A.originalCategoryValue,A.originalYCategoryValue,A.originalDateValue,A.xAxisField,A.technicalSortingFieldBySum,A.technicalSortingFieldByPercent,A.pieChart.technicalFieldSlicePercent,A.pieChart.technicalFieldGroupedSlices,A.pieChart.technicalFieldSliceId,A.originalServerBinningRange,A.lastTemporalBin,A.technicalFieldSplitByField,ue.uniqueIdsName,te.valueField,...dp],u=(y,m)=>{let b=m[A.originalCategoryValue];b!==void 0&&i&&(m[i]=b);let v=m[A.originalYCategoryValue];v!==void 0&&n&&(m[n]=v),i&&m[te.xField]!==void 0&&(m[i]=m[A.originalCategoryValue]!==void 0?m[A.originalCategoryValue]:m[te.xField],delete m[te.xField]),n&&m[te.yField]!==void 0&&(m[n]=m[A.originalYCategoryValue]!==void 0?m[A.originalYCategoryValue]:m[te.yField],delete m[te.yField]),s&&m[te.valueField]!==void 0&&(m[s]=m[te.valueField],delete m[te.valueField]);let S={};return Object.keys(m).forEach(C=>{!c.includes(C)&&!C.includes(A.rendererSymbolField)&&(S[C]=m[C])}),y.push(S),y},f=(y,m)=>JSON.stringify(y).localeCompare(JSON.stringify(m)),p=o?.reduce(u,[])?.sort(f),h=l?.reduce(u,[])?.sort(f);p&&h&&i&&p.length!==h.length&&(p=na({data:p,x:i}),h=na({data:h,x:i})),d=p?.length!==h?.length||!tr(p,h)}return d}function cw(t){let{chartConfig:e,currentSelectionDataItems:r,options:a}=t,{selectionData:i}=a??{},n=[];if(e!==void 0){let s=e.series,o=X(s),{selectionItems:l}=i??{};if(l!==void 0&&dw({itemsA:l,itemsB:r,isPieFromFields:X(e.series)===x.PieFromFields,x:e.series[0].x,y:"y"in e.series[0]?e.series[0].y.toString():void 0,outStatisticFieldName:e.series[0].query?.outStatistics?.[0]?.outStatisticFieldName})?n=l:n=r??[],s.length>1&&o!==x.BarAndLineNoAggregation&&o!==x.BarAndLineSplitByNoAggregation){let d=Ze(s[0].query?.where);n=na({data:n,x:s[0].x,splitByField:d})}vn({arrayToSort:n,chartConfig:e})}return n??[]}function Er(t,e){let r="";if(t.trim()!==""&&e!==void 0)if(e===null)r=`${t} IS NULL`;else{let a=typeof e!="number"?"'":"";r=`${t}=${a}${e.toString()}${a}`}return r}function uw(t){let{dataContext:e,xAxisField:r,yAxisField:a,options:i}=t,n="",{dataContextXMinField:s,dataContextXMaxField:o,dataContextYMinField:l,dataContextYMaxField:d}=A.scatterplotAggregationFields;if(fp({dataContext:e,chartLimits:i?.chartLimits})){let{[s]:c,[o]:u}=e,f=r!==a?e[l]:c,p=r!==a?e[d]:u;if(!Number.isNaN(c)&&!Number.isNaN(u)&&!Number.isNaN(f)&&!Number.isNaN(p)){let h=[];c===u?h.push(`${r}=${c?.toString()}`):(h.push(`${r}>=${c?.toString()}`),h.push(`${r}<=${u?.toString()}`)),f===p?h.push(`${a}=${f?.toString()}`):(h.push(`${a}>=${f?.toString()}`),h.push(`${a}<=${p?.toString()}`)),n=Ae(h)}}else n=Ae([lr({where:Er(r,e[r])}),a!==void 0?lr({where:Er(a,e[a])}):""]);return n}function Ku(t){let{fieldsIndex:e,fieldName:r,inputDate:a}=t,i=e.get(r),n=e.getTimeZone(r);return tb(new Date(a),{type:"date"},{type:i,timeZone:n})}function Zp(t){let{xAxisField:e,dataContext:r,queryObject:a}=t,i="",n=r[A.originalServerBinningRange]??r[A.dateBinningRange];if(fa(n)&&n.length===2){let[s,o]=n,l=!0,d=Kt(a);if(d){let c=se(a),{fieldsIndex:u}=c;s=Ku({fieldsIndex:u,fieldName:e,inputDate:s}),o=Ku({fieldsIndex:u,fieldName:e,inputDate:o})}else typeof s=="number"&&typeof o=="number"?Number.isFinite(s)&&Number.isFinite(o)?(s=Ii(s),o=Ii(o)):l=!1:typeof s=="string"&&typeof o=="string"&&(s=new Date(s).toISOString(),o=new Date(o).toISOString());if(l){let c=d?"":"'",u=r[A.lastTemporalBin]===!0?"<=":"<";i=`${e}>=${c}${s}${c} AND ${e}${u}${c}${o}${c}`}}return i}function Kp(t,e){let r="";if(Number.isFinite(t)){let a=1/10**A.queryMaxFloatPrecision;r=`${e}>=${t-a} AND ${e}<=${t+a}`}return r}function Jp(t){let{xAxisField:e,yAxisField:r,splitBy:a,dataContext:i,xAxisFieldType:n,chartConfig:s}=t,o="";if(e!==void 0&&e!==A.boxPlot.boxPlotCategory){let c=ta({value:i[e],dataContext:i,keepNullValues:!0});n===fe.Double?o=Kp(c,e):(Zr(s.axes?.[0].valueFormat)&&(c=Ii(c)),o=lr({where:Er(e,c),normalize:!1,escape:!0}))}let l=lr({where:a??"",normalize:!1,escape:!0}),d="";if(Tv(s)){let c=X(s.series)===x.BoxPlotMultiFieldsAndCategory?r:void 0,u=ze({key:H.Min,showOutliers:!0,splitBy:a,y:c}),f=ze({key:H.Max,showOutliers:!0,splitBy:a,y:c}),p=e===A.boxPlot.boxPlotCategory?i[e]:r;if(!_e(p)){let h=i[u],y=i[f];Number.isFinite(h)&&Number.isFinite(y)&&(d=`${p?.toString()}>=${h?.toString()} AND ${p?.toString()}<=${y?.toString()}`)}}return Ae([o,l,d])}function pw(t){let{xAxisField:e,splitBy:r,dataContext:a,xAxisFieldType:i,chartConfig:n,queryObject:s}=t,o="";if(A.dateBinningRange in a)o=Zp({xAxisField:e,dataContext:a,queryObject:s});else if(X(n.series)!==x.BarAndLineFromFields){let d=ta({value:a[e],dataContext:a,keepNullValues:!0});i===fe.Double?o=Kp(d,e):(Zr(n.axes?.[0].valueFormat)&&i!==fe.TimeOnly&&(d=Ii(d)),o=lr({where:Er(e,d),normalize:!1,escape:!0}))}let l=lr({where:r??"",normalize:!1,escape:!0});return Ae([o,l])}function fw(t){let{xAxisField:e,dataContext:r,chartConfig:a}=t,i=r[A.originalCategoryValue];return i===void 0&&(i=r[e]),X(a.series)===x.PieFromFields?"":lr({where:Er(e,i),normalize:!1,escape:!0})}function Ju(t){let{field:e,fieldType:r,fieldValue:a,unit:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}=t,l,{expression:d}=co({field:e,fieldType:r,unit:i,addIntervalStatement:!0,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o});return d&&(l=`${d}=${a}`),l}function hw(t){let{xAxisFieldType:e,yAxisFieldType:r,dataContext:a,chartConfig:i,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}=t,l=i.series[0],d="";if(l.type===g.HeatSeries){let c,u,f=a[te.xField],p=a[A.originalCategoryValue],h=a[te.yField],y=a[A.originalYCategoryValue],m=i.axes?.[0]?.valueFormat?.type,b=i.axes?.[1]?.valueFormat?.type;m===g.CategoryAxisFormat?c=lr({where:Er(l.x,p??f),normalize:!1,escape:!0}):c=Ju({field:l.x,fieldType:e,fieldValue:f,unit:l.xTemporalBinning?.unit,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}),b===g.CategoryAxisFormat?u=lr({where:Er(l.y,y??h),normalize:!1,escape:!0}):u=Ju({field:l.y,fieldType:r,fieldValue:h,unit:l.yTemporalBinning?.unit,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}),c&&(d=c),u&&(d=Ae([d,u]))}return d}function mw(t){let{xAxisField:e,dataContext:r,chartConfig:a}=t,i="",n=a.series[0],{minValue:s,maxValue:o}=r;if(Number.isFinite(s)&&Number.isFinite(o)&&n.type===g.HistogramSeries){let l=av(e,n.dataTransformationType),d=r.isLastBin?"<=":"<";i=Ae([`${l}>=${s?.toString()}`,`${l}${d}${o?.toString()}`])}return i}function _F(t){let{chartConfig:e}=t,r=K(e.series),a="";switch(r){case g.ScatterSeries:a=uw(t);break;case g.HeatSeries:a=hw(t);break;case g.RadarSeries:case g.BarSeries:case g.LineSeries:case g.ComboLineAndBarSeries:a=pw(t);break;case g.BoxPlotSeries:a=Jp(t);break;case g.HistogramSeries:a=mw(t);break;case g.PieSeries:a=fw(t);break}return a}async function yw(t){let{queryObject:e,queryConfig:r,chartConfig:a,currentSelectionDataItems:i,options:n,errorStrings:s,abortKey:o}=t,l=X(a.series),d={valid:!0,data:{dataItems:[]}};if(i!==void 0&&i.length>0){let c=pr(a),{x:u}=c,f="y"in c?c.y:"",p=wt(e).find(S=>S.name===u)?.type,h=[],y=i.reduce((S,C)=>{let F=[];if(ue.uniqueIdsName in C)h.push(C[ue.uniqueIdsName]);else{switch(l){case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:{let P=Ze(c.query?.where??""),E=`_${H.Average}`;Object.keys(C).forEach(N=>{if(N.includes(E)){let R=N.replace(E,"");R.trim()!==""&&F.push(Er(P,R))}});break}}let I=[f].flat(),M=I.length===1?I[0]:"";if(l===x.BoxPlotMultiFieldsAndCategory){let P=`_${H.FirstQuartile}`,E=Object.keys(C).find(N=>N.includes(P));E!==void 0&&(M=E.replace(P,""))}F.length===0&&F.push(""),F.forEach(P=>{let E=Jp({chartConfig:a,xAxisField:u,yAxisField:M,splitBy:P,dataContext:C,xAxisFieldType:p});S.push(E)})}return S},[]),m=se(e);if(m!==void 0&&h.length>0){let S=_t(m).idField;y.push(`${S} IN (${h.join(",")})`)}let b=y.join(" OR "),v={...r};v.where=Ae([v.where,b]),d=await fo({queryObject:e,chartConfig:a,queryConfig:v,options:n,errorStrings:s,abortKey:o})}return d}async function gw(t){let{queryObject:e,queryConfig:r,chartConfig:a,currentSelectionDataItems:i,dataForFilterBySelectionChanged:n,options:s,errorStrings:o,abortKey:l}=t;ia(e);let{series:d}=a,c=K(d),u=Vt(a),f={valid:!0},p=s?.selectionData?.selectionItems??[];n||(p=cw({chartConfig:a,currentSelectionDataItems:i,options:s}));let h=!1;switch(c){case g.HeatSeries:f.data={dataItems:p};break;case g.PieSeries:if(X(a.series)===x.PieFromFields){let{x:y,y:m}=a.series[0],b=Wr(p);b.forEach(v=>{y in v&&(v[lt]=v[y],delete v[y]),m in v&&(v[Wt]=v[m],delete v[m])}),f.data={dataItems:b}}else f.data={dataItems:p};f.count=p.length,h=!0;break;case g.BoxPlotSeries:rt(a)&&(f=await yw({queryObject:e,queryConfig:r,chartConfig:a,currentSelectionDataItems:i,options:s,errorStrings:o,abortKey:l}));break;case g.BarSeries:case g.ComboLineAndBarSeries:case g.RadarSeries:case g.LineSeries:if(p.length===0||!fr({xAxisValueFormatType:u,setTimeBinningInfoWhenNotProvided:s?.setTimeBinningInfoWhenNotProvided,seriesConfig:d[0],queryObject:e}))f.data={dataItems:p},f.count=p.length*d.length,h=!0;else{let y={...r};if(i!==void 0&&i.length>0){let m=i.map(v=>Zp({xAxisField:d[0].x,dataContext:v,queryObject:e})),b=Ae(m,"OR");y.where=Ae([y.where,b])}f=await mo({queryObject:e,queryConfig:y,chartConfig:a,options:s})}break;case g.HistogramSeries:{if(p.length===0)f.data={mean:Number.NaN,median:Number.NaN,stddev:Number.NaN,max:Number.NaN,min:Number.NaN,bins:[]},f.count=0;else{let{x:y}=d[0],m=p.map((S,C)=>{let{minValue:F,maxValue:I}=S,M=C===p.length-1?"<=":"<";return`${y} >= ${F} AND ${y} ${M} ${I}`}),b=Ae(m,"OR"),v={...r};v.where=Ae([v.where,b]),f=await Up({queryObject:e,chartConfig:a,queryConfig:v,options:s,errorStrings:o,abortKey:l})}break}case g.ScatterSeries:{if(p.length===0){let{r2:y,trendLinePoints:m}=A.scatterplotSeries;f.data={dataItems:[],r2:y,trendLinePoints:m,count:0},f.count=0}else{let{r2:y,trendLinePoints:m}=Dp({data:p,chartConfig:a});f.data={dataItems:p,r2:y,trendLinePoints:m},f.count=p.length}break}}return h&&f.data!==void 0&&vn({arrayToSort:"dataItems"in f.data?f.data.dataItems:f.data,chartConfig:a}),f}async function fo(t){let{queryObject:e,chartConfig:r,queryConfig:a,options:i,errorStrings:n,abortKey:s}=t,o={valid:!0},l=Oi(r),d=await io({queryObject:e,queryConfig:a,fetchFullBoxPlotData:!l,options:i,chartConfig:r,abortKey:s});if(!l)o=d;else{let c={dataItems:[]};c.meanLines=d.data.dataItems;let u=VS(r),f=(await io({queryObject:e,queryConfig:a,fetchFullBoxPlotData:!0,options:i,chartConfig:u,abortKey:s})).data;c.dataItems=f.dataItems,c.outliers=f.outliers,o.data=c}return o}async function bw(t){let{queryObject:e,chartConfig:r,queryConfig:a,options:i,errorStrings:n,abortKey:s,fieldList:o,currentSelectionDataItems:l,dataForFilterBySelectionChanged:d,preFetchedQueryResponse:c}=t,{series:u}=r,{filterBySelection:f}=i??{},p=K(u),h={valid:!0};if(f===!0)h=await gw({queryObject:e,queryConfig:a,chartConfig:r,currentSelectionDataItems:l,dataForFilterBySelectionChanged:d,options:i,errorStrings:n,abortKey:s});else switch(p){case g.HeatSeries:ia(e),h=await sf({chartConfig:r,queryConfig:a,queryObject:e,errorStrings:n,options:i,abortKey:s});break;case g.BoxPlotSeries:rt(r)&&(h=await fo({queryObject:e,chartConfig:r,queryConfig:a,options:i,errorStrings:n,abortKey:s}));break;case g.BarSeries:case g.ComboLineAndBarSeries:case g.PieSeries:case g.RadarSeries:case g.LineSeries:{let y={queryObject:e,queryConfig:a,chartConfig:r,options:i,abortKey:s,fieldList:o,preFetchedQueryResponse:c};fr({xAxisValueFormatType:Vt(r),setTimeBinningInfoWhenNotProvided:i?.setTimeBinningInfoWhenNotProvided,seriesConfig:u[0],queryObject:e})?h=await mo(y):h=await io(y);break}case g.ScatterSeries:h.data=await of({queryObject:e,queryConfig:a,options:i,chartConfig:r,errorStrings:n,abortKey:s});break;case g.HistogramSeries:h=await Up({queryObject:e,queryConfig:a,chartConfig:r,options:i,abortKey:s,errorStrings:n});break;case g.GaugeSeries:ia(e),h=await aw({queryObject:e,chartConfig:r,queryConfig:a,options:i,abortKey:s});break}return h}async function zF(t){let{queryObject:e,chartConfig:r,abortKey:a,currentSelectionDataItems:i,dataForFilterBySelectionChanged:n,options:s,errorStrings:o,fieldList:l,preFetchedQueryResponse:d}=t,c={valid:!0},u=jp({queryObject:e,chartConfig:r,runtimeDataFilters:s?.runtimeDataFilters,ignoreViewExtent:s?.ignoreViewExtent,viewExtent:s?.view?.extent});return a0(a),c=await bw({chartConfig:r,queryObject:e,queryConfig:u,currentSelectionDataItems:i,dataForFilterBySelectionChanged:n,options:s,abortKey:a,errorStrings:o,fieldList:l,preFetchedQueryResponse:d}),c.queryConfig=u,c}function vw(t,e,r){let a=new Map;for(let i=0;i<t.length;i+=1)a.set(t[i],{[r]:t[i]});for(let i=0;i<e.length;i+=1){let n=e[i][r];(typeof n=="string"||typeof n=="number")&&a.set(n,e[i])}return[...a.values()]}async function Sw(t){let{seriesData:e,chartConfig:r,queryConfig:a,queryObject:i,categoryOrDateCount:n,behaviorAfterLimit:s,abortKey:o}=t,{series:l}=r,d=e,c=X(l),u=Vt(r);if(s!==Dr.RenderUpToTheLimit&&n!==void 0&&n>e.length&&c!==x.BarAndLineFromFields&&c!==x.BarAndLineNoAggregation&&c!==x.PieNoAggregation&&u===g.CategoryAxisFormat){let{x:f}=l[0],p={...a,returnDistinctValues:!0,outFields:[f]};delete p.outStatistics,delete p.orderByFields,delete p.groupByFieldsForStatistics;let h=(await Dt({queryObject:i,queryConfig:p,featureCount:n,abortKey:o})).map(y=>y.attributes[f]).filter(y=>y!=null);h.length>e.length&&(d=vw(h,e,f))}return d}function ww(t,e){let r=t,{series:a}=e;if(Vt(e)===g.CategoryAxisFormat&&a[0].query?.outStatistics?.[0].statisticType===W.Count){let i=a.reduce((n,s)=>{let o=s.query?.outStatistics?.[0].outStatisticFieldName??[s.y].flat()[0];return n[o]=0,n},{});for(let n=0;n<t.length;n+=1)t[n]={...i,...t[n]}}return r}var Yp=[x.BarAndLineMonoField,x.BarAndLineMultiFields,x.PieNoAggregation,x.PieFromCategory,x.BoxPlotMonoFieldAndCategory,x.BoxPlotMultiFieldsAndCategory,x.BoxPlotMonoFieldAndCategoryAndSplitBy],xw=8e3;function Xp(t,e){let r=t;return e===Q.Week?r/=7:e===Q.Month?r/=30:e===Q.Year&&(r/=365),r=Math.ceil(r),r}function Lr(t){let{date:e,unit:r,nextOrPrevious:a,size:i}=t;if(i!==void 0&&Number.isFinite(i)){let n=a==="next"?i:-i;switch(r){case Q.Second:return ie.fromMillis(e).plus({seconds:n}).valueOf();case Q.Minute:return ie.fromMillis(e).plus({minutes:n}).valueOf();case Q.Hour:return ie.fromMillis(e).plus({hours:n}).valueOf();case Q.Week:case Q.Day:return ie.fromMillis(e).plus({days:n}).valueOf();case Q.Month:return ie.fromMillis(e).plus({months:n}).valueOf();case Q.Year:return ie.fromMillis(e).plus({years:n}).valueOf()}}return e}function Cw(t){let{binFirstOrLastIndex:e,data:r,x:a,timeIntervalInfo:i}=t,{unit:n,size:s}=i,o=n===Q.Week?(s??1)*7:s,l=r[e][a],d=e,c=Lr({date:l,unit:n,size:o,nextOrPrevious:"next"}),u=r[d][a];for(;d+1<r.length&&u<c;)d+=1,u=r[d]?.[a];let f=d+1>=r.length,p=d;f&&r[p]!==void 0&&(p+=1);let h=f?Lr({date:l,unit:n,size:o,nextOrPrevious:"next"}):r[d][a];return{binStartDate:l,binEndDate:h,last:f,nextBinFirstOrLastIndex:d,sliceStartIndex:e,sliceEndIndex:p}}function Tw(t){let{binFirstOrLastIndex:e,data:r,x:a,timeIntervalInfo:i}=t,{unit:n,size:s}=i,o=n===Q.Week?(s??1)*7:s,l=r[e][a],d=e,c=Lr({date:l,unit:n,size:o,nextOrPrevious:"previous"}),u=r[d][a];for(;d-1>=0&&u>c;)d-=1,u=r[d]?.[a];let f=d-1<=0,p=e;return f&&r[p]!==void 0&&(p-=1),f&&(d=0),{binStartDate:f?Lr({date:l,unit:n,size:o,nextOrPrevious:"previous"}):r[d][a],binEndDate:l,nextBinFirstOrLastIndex:d,sliceStartIndex:d,sliceEndIndex:p,last:f}}function Fw(t){let{binsToRegroup:e,statisticType:r,y:a,nullPolicy:i}=t,n;i!==st.Interpolate&&(n=i===st.Zero?0:null);let s=e.filter(o=>Number.isFinite(o[a]));if(s.length>0)switch(r){case W.Count:case W.Sum:n=F0(s,o=>o[a]);break;case W.Minimum:n=aa(s,o=>o[a]).min;break;case W.Maximum:n=aa(s,o=>o[a]).max;break;case W.Average:n=T0(s,o=>o[a]);break;case W.ContinuousPercentile:}return n}function Iw(t){let{data:e,seriesConfig:r,timeIntervalInfo:a,dateMinTimestamp:i,dateMaxTimestamp:n}=t,s=[],{unit:o}=a,l=a.size??1,d=r[0],{x:c}=d,u,f;if(jt(d)&&(f=d.temporalBinning?.nullPolicy,u=d.temporalBinning?.timeAggregationType),l>1||o===Q.Week||o===Q.Month||o===Q.Year){let{query:p}=r[0],h=it(r),{statisticType:y}=p?.outStatistics?.[0]??ha,m=!1,b=u===$e.End?e.length-1:0,v={binFirstOrLastIndex:b,data:e,x:c,timeIntervalInfo:a};for(;!m;){let S={},{binStartDate:C,binEndDate:F,last:I,nextBinFirstOrLastIndex:M,sliceStartIndex:P,sliceEndIndex:E}=u===$e.End?Tw(v):Cw(v);if(m=I,S=u===$e.End?S=e[E-1]:S=e[b],F>n&&C<n||C<i&&F>i||C>=i&&F<=n){let N=e.slice(P,E).filter(L=>!(A.dateBinModel in L));h.forEach(L=>{S[L]=Fw({binsToRegroup:N,statisticType:y,y:L,nullPolicy:f})});let R=N.map(L=>L[Ar]).filter(L=>L!==void 0),q=Yb(R);q!==void 0&&(S[Ar]=q),S[c]=C,S[A.xAxisField]=C,S[A.dateBinningRange]=[C,F],delete S[A.dateBinModel],s.push(S)}else I&&u!==$e.End&&s.length>0&&(s[s.length-1][A.dateBinningRange][1]=s[s.length-1][A.dateBinningRange][1]+1);b=M,v.binFirstOrLastIndex=M}u===$e.End&&(s=s.reverse())}else l===1?s=e.map((p,h)=>{let y=p[c],m=e[h+1]?.[c];return m=typeof m=="number"?m-1:Lr({date:y,unit:o,size:l,nextOrPrevious:"next"}),{...p,[A.dateBinningRange]:[y,m]}}):s=e;return s}function ef(t){let{dateMinTimestamp:e,dateMaxTimestamp:r,timeIntervalInfo:a}=t,{size:i,unit:n}=a,s=0,o=0;if(i!==void 0&&Number.isFinite(i)&&Number.isFinite(e)&&Number.isFinite(r)){let l=-1,d=ie.fromMillis(e),c=ie.fromMillis(r);switch(n){case Q.Second:l=c.diff(d,"seconds").get("seconds");break;case Q.Minute:l=c.diff(d,"minutes").get("minutes");break;case Q.Hour:l=c.diff(d,"hours").get("hours");break;case Q.Day:case Q.Month:case Q.Year:l=c.diff(d,"days").get("days");break;case Q.Week:l=c.diff(d,"weeks").get("weeks");break}Number.isFinite(l)&&(o=Math.ceil(l)+1,s=i===1?o:Math.ceil(o/i))}return{numberOfFinalBinsWithinDataRange:s,numberOfSingleBinsWithinDataRange:o}}function tf(t){let e=t[0].temporalBinning?.nullPolicy;return t.reduce((r,a)=>{r[A.dateBinModel]=void 0;let i=a.query?.outStatistics?.[0].outStatisticFieldName??[a.y].flat()[0];return e!==st.Interpolate&&(r[i]=e===st.Zero?0:null),r},{})}function Ow(t){let{dateMaxTimestamp:e,numberOfFinalBinsWithinDataRange:r,numberOfSingleBinsWithinDataRange:a,data:i,seriesConfig:n,timeIntervalInfo:s}=t,{size:o,unit:l}=s,{x:d}=n[0],c=n[0].temporalBinning?.timeAggregationType,u=i[0][d],f=e;if(o!==void 0&&Number.isFinite(o)&&a/r!==o){let p=Math.ceil(a/r)*r-a;l===Q.Week&&(p*=7);let h=tf(n);if(c===$e.End){let y=i[0][d];for(let m=0;m<p;m+=1)y=Lr({date:y,unit:l,size:1,nextOrPrevious:"previous"}),i.push({...h,[d]:y,[A.xAxisField]:y});p>0&&(u=i[i.length-1][d])}else{let y=i[i.length-1][d];for(let m=0;m<p;m+=1)y=Lr({date:y,unit:l,size:1,nextOrPrevious:"next"}),i.push({...h,[d]:y,[A.xAxisField]:y});f=i[i.length-1][d]}}return{newDateMin:u,newDateMax:f}}function Aw(t){let{numberOfSingleBinsWithinDataRange:e,dataLength:r,unit:a}=t;return Xp(r,a)>=e}async function Pw(t){let{queryObject:e,queryConfig:r,x:a}=t,i=`MIN_${a}`,n=`MAX_${a}`,s=`COUNT_${a}`,o={...r,outStatistics:[{statisticType:W.Minimum,onStatisticField:a,outStatisticFieldName:i},{statisticType:W.Maximum,onStatisticField:a,outStatisticFieldName:n},{statisticType:W.Count,onStatisticField:a,outStatisticFieldName:s}]};delete o.groupByFieldsForStatistics,delete o.orderByFields;let l=await oa({queryObject:e,queryConfig:o}),d=l.get(i),c=l.get(n),u=l.get(s);return typeof d=="string"&&(d=new Date(d).valueOf()),typeof c=="string"&&(c=new Date(c).valueOf()),{dateRange:{dateMinTimestamp:d,dateMaxTimestamp:c},numberOfFeatures:u}}function Ew(t){let{newDateMin:e,newDateMax:r,seriesConfig:a,data:i,numberOfSingleBinsWithinDataRange:n,initialNumberOfBins:s,timeIntervalInfo:o}=t,{unit:l}=o,d=i;if(!Aw({numberOfSingleBinsWithinDataRange:n,dataLength:s,unit:l})){let{x:c}=a[0],u=a[0].temporalBinning?.timeAggregationType,f=tf(a),p=u===$e.End?r:e,h=u===$e.End?i.length-1:0;for(;h<i.length&&(u===$e.End&&p>e||u!==$e.End&&p<r);)p!==i[h][c]?d.push({...f,[c]:p,[A.xAxisField]:p}):h=u===$e.End?h-1:h+1,p=Lr({date:p,unit:l===Q.Month||l===Q.Year?Q.Day:l,size:1,nextOrPrevious:u===$e.End?"previous":"next"})}return d}function Lw(t){let{data:e,seriesConfig:r,dateMinTimestamp:a,dateMaxTimestamp:i}=t,n=e;if(r[0].temporalBinning?.trimIncompleteTimeInterval!==!1){let{timeAggregationType:s}=r[0].temporalBinning??{},o=e[0]?.[A.dateBinningRange]?.[0],l=e[e.length-1]?.[A.dateBinningRange]?.[1];if(s===$e.End?o<a:l>i)if(s===$e.End){let d=o;for(;d<a&&e.length>0;)e.shift(),e.length>0&&(d=e[0][A.dateBinningRange]?.[0])}else{let d=l;for(;d>i&&e.length>0;)e.pop(),e.length>0&&(d=e[e.length-1][A.dateBinningRange]?.[1])}}return n}function Dw(t){let{groupByFieldsForStatistics:e,dateField:r,queryStartDate:a,queryEndDate:i,y:n,binIndex:s,lastBin:o}=t,l=e===""?Jr.groupByCaseBegin:e;return l=qe(_x,{groupByFieldsForStatistics:l,dateField:r,startDate:`${a}`,endDate:`${i}`,y:[n].flat()[0],binIndex:`${s}`,endDateOperand:o?"<=":"<"}),l}function*Nw(t){let{queryObject:e,seriesConfig:r,queryConfig:a,completeData:i}=t;for(let n=0;n<r.length;n+=1){let s=r[n],{query:o,x:l,y:d}=s,c=[{onStatisticField:o?.outStatistics?.[0]?.onStatisticField??"",outStatisticFieldName:W.ContinuousPercentile,statisticType:W.ContinuousPercentile,statisticParameters:{value:.5}}],u=Jr.groupByCaseBegin;for(let p=0;p<i.length;p+=1){let h=i[p],[y,m]=h[A.dateBinningRange],b=Ii(y),v=Ii(m);u=Dw({groupByFieldsForStatistics:u,queryStartDate:b,queryEndDate:v,dateField:l,y:[d].flat()[0],binIndex:p,lastBin:p===i.length-1})}u=`${u} ${Jr.groupByCaseEnd}`;let f={...a,groupByFieldsForStatistics:[u],outStatistics:c,orderByFields:void 0};yield Dt({queryObject:e,queryConfig:f,noBatch:!0})}}async function Bw(t){let{queryObject:e,data:r,seriesConfig:a,queryConfig:i}=t,n=r,{statisticType:s}=a[0].query?.outStatistics?.[0]??ha;if(s===W.ContinuousPercentile&&n.length>0){let o=Nw({queryObject:e,completeData:n,seriesConfig:a,queryConfig:i}),l=(await Promise.all(o)).flat();if(l.length>0){let{isInItem:d,expr:c}=xn(l[0].attributes);d&&l.forEach(u=>{let f=u.attributes[`${c}`];if(f!==void 0){let[p,h]=f.split("|");if(h!==void 0){let y=u.attributes[W.ContinuousPercentile];n[h][`${p}`]=y}}})}}return n}function Yu(t){let{dataItem:e,nullPolicy:r,statField:a}=t;if(a&&e[a]==null)switch(!0){case r===st.Zero:e[a]=0;break;case r===st.Null:e[a]=null;break;case r===st.Interpolate:delete e[a];break}}function $w(t){let{chartConfig:e,queryResults:r,mapToStatField:a,splitByField:i,x:n,y:s,nullPolicy:o,queryObject:l}=t,d=Pp(n),c=wt(l).find(y=>y.name===n)?.type,u=[],f=e.series[0],p="temporalBinning"in f?f.temporalBinning?.trimIncompleteTimeInterval:!1,h="temporalBinning"in f?f.temporalBinning?.timeAggregationType:!1;return r.forEach((y,m)=>{if(!(p&&(m===0&&h===$e.End||m===r.length-1&&h===$e.Start))){let{attributes:b,stackedAttributes:v}=y,S=b[d.lowerBoundaryAlias],C=b[d.upperBoundaryAlias],F=S,I=C,M=(P,E)=>{let N=P;if(E===fe.DateOnly&&(typeof P=="string"&&P.length===10||typeof P=="number"))if(typeof P=="string"){let R=P.split("-");R.length===3&&(N=ie.local(Number(R[0]),Number(R[1]),Number(R[2])).valueOf())}else N=new Date(P),N=new Date(N.valueOf()+N.getTimezoneOffset()*6e4),N=ie.local(N.getFullYear(),N.getMonth()+1,N.getDate()).valueOf();else typeof P=="string"&&["+","-"].forEach(R=>{R&&P.lastIndexOf(R)===P.length-6&&(N=new Date(P.slice(0,P.lastIndexOf(R))).valueOf())});return N};if(S=M(S,c),C=M(C,c),typeof S=="number"&&typeof C=="number"){let P={...b};P[A.originalServerBinningRange]=[F,I],P[n]=S,P[A.xAxisField]=S,P[A.dateBinningRange]=[S,C],delete P[d.lowerBoundaryAlias],delete P[d.upperBoundaryAlias],v&&i&&!_e(i)&&a?v.forEach(R=>{let q=R[i];if(q===null||typeof q=="string"||typeof q=="number"){let L=a?.get(q);L!==void 0&&(P[L]=R[ue.outStatistics?.outStatisticFieldName??""],Yu({dataItem:P,statField:L,nullPolicy:o}))}}):typeof s=="string"&&Yu({dataItem:P,statField:s,nullPolicy:o});let{featureExtent:E,featureExtentKey:N}=rf({feature:y,splitByField:i});E&&(P[N]=E),u.push(P)}}}),u}async function Mw(t){let{queryObject:e,queryResults:r,x:a,queryConfig:i,seriesConfig:n,dateRange:s,timeIntervalInfo:o}=t,l=r,{dateMinTimestamp:d,dateMaxTimestamp:c}=s;if(d&&c){let u=r.length;if(ra({arrayToSort:l,sortingField:a}),u>1){let{numberOfFinalBinsWithinDataRange:f,numberOfSingleBinsWithinDataRange:p}=ef({dateMinTimestamp:d,dateMaxTimestamp:c,timeIntervalInfo:o}),{newDateMin:h,newDateMax:y}=Ow({dateMaxTimestamp:c,data:l,numberOfFinalBinsWithinDataRange:f,numberOfSingleBinsWithinDataRange:p,seriesConfig:n,timeIntervalInfo:o});l=Ew({newDateMin:h,newDateMax:y,seriesConfig:n,data:l,initialNumberOfBins:u,numberOfSingleBinsWithinDataRange:p,timeIntervalInfo:o}),ra({arrayToSort:l,sortingField:a}),l=Iw({data:l,seriesConfig:n,dateMinTimestamp:d,dateMaxTimestamp:c,timeIntervalInfo:o}),l=Lw({data:l,seriesConfig:n,dateMinTimestamp:d,dateMaxTimestamp:c}),e&&(l=await Bw({queryObject:e,data:l,seriesConfig:n,queryConfig:i}))}}return l}function qw(t){return Math.floor(Math.min(Math.max(8,Math.sqrt(t??8)),128)+.5)}function Rw(t){let{dateRange:e,numberOfFeatures:r}=t,a,i,{dateMinTimestamp:n,dateMaxTimestamp:s}=e;if(n&&s){typeof n=="string"&&(n=new Date(n).valueOf()),typeof s=="string"&&(s=new Date(s).valueOf());let o=qw(r),l=(s-n)/o,d=ip.findIndex(b=>b.threshold>l),c=ip[d],{unitMs:u,preferredIntervalSize:f}=c;({unit:a}=c);let p=l/u,h=f.findIndex(b=>b>=p),y=f[h],m=h===0?f[0]:f[h-1];i=y-p<p-m?y:m}return{size:i,unit:a}}function kw(t){let{series:e,isTimeBinningSeries:r,setTimeBinningInfoWhenNotProvided:a}=t,i=!1;if(jt(e)&&r){let{unit:n,size:s}=e.temporalBinning??{};i=!Zs(n,s)&&a===!0}return i}function Ww(t){let e=[];for(let r=1;r<=6;r+=1){let a=t[`EXPR_${r}`]??t[`Expr${r}`]??t[`expr${r}`]??t[`EXPR${r}`];a!==null&&e.push(a)}return ie.local(Number(e[0]??1969),Number(e[1]??1),Number(e[2]??1),Number(e[3]??0),Number(e[4]??0),Number(e[5]??0)).valueOf()}function rf(t){let{feature:e,splitByField:r,chartSubType:a}=t,i;if(e.aggregateGeometries&&"Extent"in e.aggregateGeometries)i=e.aggregateGeometries.Extent;else{let o=e.aggregateGeometries??e.geometry;o?.extent&&(i=o.extent)}let n=i?.toJSON(),s=Ar;return n!==void 0&&r!==void 0&&a!==void 0&&a===x.BarAndLineSplitBy&&(s=e.attributes[r]!==void 0?`${Ar}_${e.attributes[r]}`:Ar),{featureExtent:n,featureExtentKey:s}}function jw(t){let{input:e,x:r,splitByField:a}=t;return e.reduce((i,n)=>(a!==void 0&&a!==r&&!(A.technicalFieldSplitByField in n)&&delete n[a],Object.assign(i,n)),{})}function na(t){let{data:e,x:r,splitByField:a}=t,i=e;if(e!==void 0&&e.length>0){let n=new Map;for(let s of e){let o=s[r];if(o==null||o===void 0)continue;let l=n.get(o)??[];l.push(s),n.set(o,l)}i=Array.from(n.values(),s=>jw({input:s,x:r,splitByField:a}))}return i}function Vw(t,e){let r=t,a=K(e);if(a!==g.PieSeries&&a!==g.BoxPlotSeries){let i=it(e),n=e[0].y;t.forEach(s=>{let o=0;if(i.forEach(l=>{let d=s[l];Number.isFinite(d)&&(o+=d)}),s[A.technicalSortingFieldBySum]=o,Number.isFinite(o)&&o>0){let l=s[n];if(Number.isFinite(l)){let d=l/o;s[A.technicalSortingFieldByPercent]=d}}})}return r}function _w(t,e){let r=e,a=it(t),i=a.length===1;return a.forEach(n=>{let s=Ti(i?void 0:n),o=r[s[H.FirstQuartile]],l=r[s[H.ThirdQuartile]];Number.isFinite(o)&&Number.isFinite(l)&&l>=o&&(r[s[H.IQR]]=l-o)}),r}function zw(t,e){let r=e.series[0],a=t;if(r.type===g.HeatSeries){let{x:i,y:n}=r;a[te.xField]=a[i]?.toString(),delete a[i],a[te.yField]=a[n]?.toString(),delete a[n];let s=r.query?.outStatistics?.[0]?.outStatisticFieldName;s&&(a[te.valueField]=a[s],delete a[s])}return a}function ho(t,e){[e].flat().forEach(r=>{r&&(t[r]===void 0&&(t[r]=t[r.toUpperCase()]!==void 0?t[r.toUpperCase()]:t[r.toLowerCase()]),t[r]!==void 0?(r!==r.toUpperCase()&&delete t[r.toUpperCase()],r!==r.toLowerCase()&&delete t[r.toLowerCase()]):delete t[r])})}function Uw(t,e){let r=[];ue.outStatistics.outStatisticFieldName&&Object.keys(t).includes(ue.outStatistics.outStatisticFieldName)?r=[ue.outStatistics.outStatisticFieldName]:r=Array.from(new Set(e.flatMap(a=>a.query?.outStatistics?.map(i=>i.outStatisticFieldName)))),ho(t,r)}function Hw(t,e){let r={...t};return t!==void 0&&e[0]!==void 0&&(r=Object.keys(t).reduce((a,i)=>{let n=e.find(s=>s.outStatisticFieldName?.toLowerCase()===i.toLowerCase())?.onStatisticField;return n!==void 0&&t[i]!==void 0&&n!==i?a[n]=t[i]:a[i]=t[i],a},{})),r}function Gw(t){let{dataItem:e,splitByField:r,y:a,fieldOID:i}=t;if(e!==void 0&&!_e(r)&&!_e(a)){let n=e[r],s=`${a}_${n?.toString()}`;e[s]=e[a],i&&a!==i&&delete e[a]}}function Qw(t,e){Object.keys(t).forEach(r=>{if(r.startsWith(`${e}_`)){let a=r.slice(e.length+1);t[a]=t[r],delete t[r]}})}function Zw(t,e){let r=1;switch(t){case x.BarAndLineFromFields:case x.PieFromFields:r=e.series[0].query?.outStatistics?.length??1;break;case x.BoxPlotMultiFields:case x.BoxPlotMultiFieldsAndSplitBy:r=e.series[0].y.length;break;case x.BarAndLineNoAggregation:case x.BoxPlotMonoField:case x.BoxPlotMonoFieldAndCategory:case x.BoxPlotMultiFieldsAndCategory:case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:case x.PieFromCategory:case x.BarAndLineSplitByNoAggregation:case x.PieNoAggregation:case x.BarAndLineSplitBy:case x.BarAndLineMonoField:case x.BarAndLineMultiFields:case x.NonSpecific:}return r}function Kw(t){let{attributes:e,showMean:r,chartSubType:a}=t;r&&(a===x.BoxPlotMonoFieldAndSplitBy||a===x.BoxPlotMultiFieldsAndSplitBy||a===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&(e[A.boxPlot.boxPlotMeanLineMarkerId]=!0)}function Jw(t){let{queryResponse:e,chartConfig:r,maxCategoryCount:a}=t,i=X(r.series);return a&&Number.isFinite(a)&&a<e.length&&Yp.includes(i)?e.slice(0,a):e}function Yw(t){let{attributes:e,uniqueCategoryList:r,maxCategoryCount:a,x:i,chartSubType:n}=t,s=!1;if(i&&a&&Number.isFinite(a)&&!Yp.includes(n))if((n===x.BarAndLineFromFields||n===x.PieFromFields)&&Object.keys(e).length>a)Object.keys(e).filter(o=>o!==W.EnvelopeAggregate).forEach((o,l)=>{l>=a&&delete e[o]});else{let o=e[i];o!==void 0&&(r.size===a&&!r.has(o)?s=!0:r.add(o))}return s}function Xw(t){let{attributes:e,xValue:r,yValue:a,x:i,y:n,xFieldDomain:s,yFieldDomain:o,chartType:l,chartSubType:d,xAxisValueFormat:c,yAxisValueFormat:u}=t,f,p;d!==x.PieFromFields&&(s&&(typeof r=="string"||typeof r=="number")&&(f=to(r,s)),o&&l===g.HeatSeries&&typeof n=="string"&&(typeof a=="string"||typeof a=="number")&&(p=to(a,o)),f!==void 0&&f!==r&&(typeof f!="string"||!et(c))&&(e[A.originalCategoryValue]=e[i],e[i]=f),typeof n=="string"&&!et(u)&&p!==void 0&&p!==a&&(e[A.originalYCategoryValue]=e[n],e[n]=p))}function ex(t){let e,[r,a,i]=t.split(":");return Number.isFinite(Number(r))&&Number.isFinite(Number(a))&&Number.isFinite(Number(i))&&(e=new Date(2e3,0,1,Number(r),Number(a),Number(i)).valueOf()),e}function af(t){let{queryObject:e,queryResponse:r,chartConfig:a,mapToStatField:i,splitByField:n,isTimeBinningSeries:s,resultLimit:o,showMean:l,chartLimits:d,fieldList:c}=t,{series:u}=a,f=X(u),p=K(u),{x:h}=u[0],y="y"in u[0]?u[0].y:void 0,m=u[0].query?.outStatistics??[],b=nr(a?.axes?.[0]?.valueFormat),{originalYCategoryValue:v,originalCategoryValue:S,originalDateValue:C}=A,F=eo(e,h),I=typeof y=="string"?eo(e,y):void 0,M=X0(c??[]).includes(h),P=[],E=0,N=new Set,{maxCategoryCount:R}=Xr(d),q=Jw({queryResponse:r,chartConfig:a,maxCategoryCount:R});for(let L=0;q[L]&&L<q.length&&!(o!==void 0&&E>=o);L+=1){E+=Zw(f,a);let k=q[L],B={...k.attributes};if(Yw({attributes:B,uniqueCategoryList:N,maxCategoryCount:R,x:h,chartSubType:f}))continue;if(Uw(B,u),f===x.PieFromFields||f===x.BarAndLineFromFields)B=Hw(B,m);else if(typeof y=="string"&&f===x.BarAndLineSplitByNoAggregation){let oe=se(e),{idField:Te,isTraditionalTypeOID:Re}=_t(oe);Gw({dataItem:B,splitByField:n,y,fieldOID:Re?Te:void 0})}else y&&(f===x.BoxPlotMonoField||f===x.BoxPlotMonoFieldAndCategory||f===x.BoxPlotMonoFieldAndSplitBy||f===x.BoxPlotMonoFieldAndCategoryAndSplitBy)&&Qw(B,typeof y=="string"?y:y[0]);Kw({attributes:B,showMean:l,chartSubType:f});let _=B[h],G=typeof y=="string"?B[y]:void 0;_===null&&u[0]?.query?.fetchNullValues===!0&&f!==x.PieFromFields&&(B[S]=null,_=A.nullValue),b||(M&&typeof _=="string"?_=new Date(_).valueOf():s&&(_=Ww(B))),typeof _=="string"&&c?.find(oe=>oe.name===h)?.type===fe.TimeOnly&&(B[S]=_,_=ex(_));let{outStatisticFieldName:V}=ue.outStatistics??{},{featureExtent:Z,featureExtentKey:U}=rf({feature:k,splitByField:n,chartSubType:f});if(Z&&(B[U]=Z),f===x.BarAndLineSplitBy&&V!==void 0){let oe=B[n],Te=i?.get(oe);Te!==void 0&&(oe===n&&(B[A.technicalFieldSplitByField]=B[Te]),B[Te]=B[V]),delete B[V]}else(f===x.PieNoAggregation||f===x.BarAndLineNoAggregation||f===x.BarAndLineSplitByNoAggregation)&&(M?B[C]=_:_!==A.nullValue&&(B[S]=_),Cb({isXAxis:!0,chartType:p,valueFormat:a.axes?.[0]?.valueFormat})&&(B[A.xAxisField]=`${_}-${L}`),B[ue.uniqueIdsName]=k.getObjectId());p===g.BoxPlotSeries&&(B=_w(u,B)),p===g.PieSeries&&typeof _=="number"&&(B[S]===void 0&&(B[S]=B[h]),_=`${_}`),_!==void 0&&(B[S]===void 0&&(B[S]=B[h]),B[h]===null?B[h]=p===g.HeatSeries?"null":A.nullValue:B[h]=_,Xw({attributes:B,xValue:_,yValue:G,x:h,y,xFieldDomain:F,yFieldDomain:I,chartType:p,chartSubType:f,xAxisValueFormat:a.axes?.[0].valueFormat,yAxisValueFormat:a.axes?.[1]?.valueFormat}),p===g.HeatSeries&&typeof y=="string"&&B[y]===null&&(B[y]="null",B[v]=null),B[A.xAxisField]===void 0&&(B[A.xAxisField]=B[h])),B=zw(B,a),P.push(B)}return P}async function Fn(t){let{queryObject:e,uniqueQuery:r,chartConfig:a,mapToStatField:i,abortKey:n,elementCount:s,isTimeBinningSeries:o,showMean:l,chartLimits:d,popupTemplateFieldInfosEnabled:c,preFetchedQueryResponse:u}=t,{series:f}=a,p=X(f),h=[],y=p===x.BarAndLineSplitBy||p===x.BarAndLineSplitByNoAggregation?Ze(f[0].query?.where):"",m=u??await Dt({queryObject:e,queryConfig:r,featureCount:s,abortKey:n}),b=wt(e,c),{x:v}=f[0];return h=af({queryObject:e,queryResponse:m,chartConfig:a,mapToStatField:i,splitByField:y,isTimeBinningSeries:o,fieldList:b,resultLimit:r.num,showMean:l,chartLimits:d}),p!==x.BarAndLineSplitByNoAggregation&&p!==x.BarAndLineFromFields&&(y!==""&&(h=na({data:h,x:v,splitByField:y})),h=Vw(h,f)),h}async function nf(t){let{chartConfig:e,queryObject:r,queryConfig:a,numberMaxOfFeaturesToFetch:i,behaviorAfterLimit:n,isGaugeByFeature:s}=t,{series:o}=e,l=X(o),{x:d}=o[0],c=o.length,u,f;if(l===x.BoxPlotMonoField||l===x.BoxPlotMonoFieldAndSplitBy?(f=c,u=f):l===x.BoxPlotMultiFields||l===x.BoxPlotMultiFieldsAndSplitBy?(f=e.series[0].y.length,u=f):l===x.PieFromFields||l===x.BarAndLineFromFields?(f=o[0].query?.outStatistics?.filter(p=>p.statisticType!==W.EnvelopeAggregate).length??0,u=f):u=await r0({queryObject:r,x:d,chartSubType:l,queryConfig:a,isGaugeByFeature:s}),u!==void 0){let p=l===x.BoxPlotMonoField||l===x.BoxPlotMonoFieldAndCategory||l===x.BoxPlotMonoFieldAndSplitBy;f=Ks(l)&&!p?u*c:u}return n===Dr.RenderUpToTheLimit&&f!==void 0&&i!==void 0&&i<f&&(f=i,u=Math.ceil(f/c)),{categoryOrDateCount:u,elementCount:f}}async function io(t){let{chartConfig:e,queryConfig:r,fetchFullBoxPlotData:a,options:i,queryObject:n,abortKey:s,fieldList:o,preFetchedQueryResponse:l}=t,d=Oi(e),{chartLimits:c,popupTemplateFieldInfosEnabled:u}=i??{},f=i?.replaceNoValueCategoryWithZero??A.options.replaceNoValueCategoryWithZero,p=!(i?.hideZeroCountCategories??!f),{behaviorAfterLimit:h}=c??{},y,m={valid:!0},b,v=!1,S=e.series,C=S[0],F=X(e.series);if(Ke(n))y=K(S)===g.BarSeries?await W0(t):m;else{if(C!==void 0){let I=K(S),{uniqueQuery:M,mapToStatField:P}=oo({chartConfig:e,queryObject:n,queryConfig:r,fetchFullBoxPlotData:a,options:i}),{categoryOrDateCount:E,elementCount:N}=await nf({chartConfig:e,queryObject:n,queryConfig:r,behaviorAfterLimit:h,numberMaxOfFeaturesToFetch:M.num}),R=!Number.isFinite(N),q=R||sr({count:N??0,seriesCount:S.length,chartType:I,chartLimits:c});if(q&&(b=await Fn({queryObject:n,uniqueQuery:M,chartConfig:e,preFetchedQueryResponse:l,mapToStatField:P,elementCount:N,isTimeBinningSeries:!1,showMean:d,chartLimits:c,popupTemplateFieldInfosEnabled:u,abortKey:s}),rt(e)&&b!==void 0&&(m.data=await rw({data:b,queryObject:n,fetchFullBoxPlotData:a,uniqueQuery:M,chartConfig:e,elementCount:N,chartLimits:c,abortKey:s}),c?.maxBoxPlotOutlierLimit!==void 0&&(q=(m.data.outliers??[]).length<=c.maxBoxPlotOutlierLimit,v=!q)),R&&(E=b.length,N=Ks(F)?E*S.length:E,q=sr({count:N,seriesCount:S.length,chartType:I,chartLimits:c})),q)){if(I===g.PieSeries){F===x.PieFromFields&&(b=mn({dataToConvert:b[0],x:lt,y:Wt,fieldList:o}));let L="";F===x.PieFromFields?L=Wt:"y"in C&&typeof C.y=="string"&&(L=C.y),nv(b,L)?m.data={dataItems:b}:_S(m,ae.PieChartMixOfNegativePositiveSlices)}else if((I===g.RadarSeries||I===g.BarSeries||I===g.LineSeries||I===g.ComboLineAndBarSeries)&&(F===x.BarAndLineFromFields&&"y"in C&&typeof C.y=="string"?b=mn({dataToConvert:b[0],x:C.x,y:C.y,fieldList:o}):b=await Sw({queryObject:n,seriesData:b,chartConfig:e,queryConfig:r,categoryOrDateCount:E,behaviorAfterLimit:h,abortKey:s}),N=Ks(F)?b.length*S.length:b.length,q=sr({count:N,seriesCount:S.length,chartType:I,chartLimits:c}),q)){p&&(b=ww(b,e));let L={};if(jt(C)){let{size:k,unit:B}=C.temporalBinning??{};k!==void 0&&B!==void 0&&(L={size:k,unit:B})}m.data={dataItems:b,timeIntervalInfo:L}}}q||bn({dataInfo:m,chartType:I,subError:{outlierLimit:v}}),m.count=N}y=m}return y}function tx(t){let e,{start:r,end:a}=co({field:"",unit:t,addIntervalStatement:!1});return a&&(e=Array.from({length:a+(r===0?1:0)},(i,n)=>(n+(r??1)).toString())),e}function rx(t){return t.hideEmptyRowsAndColumns===!0&&(t.nullPolicy!==st.Zero||t.series[0].query?.outStatistics?.[0].statisticType===W.Count)}function ix(t){let{dataItems:e,valueField:r,filterOutZero:a}=t,i=[null];a&&i.push(0);let n=new Set(e.filter(o=>!i.includes(o[r])).map(o=>o[te.xField])),s=new Set(e.filter(o=>!i.includes(o[r])).map(o=>o[te.yField]));return e.filter(o=>n.has(o[te.xField])&&s.has(o[te.yField]))}function ax(t){let{dataItems:e,xUniqueValues:r,yUniqueValues:a,valueField:i,emptyCellValue:n,x:s,y:o,queryObject:l}=t,d=[],c=new Set;for(let u of e){let f=u[A.originalCategoryValue]!==void 0?u[A.originalCategoryValue]:u[te.xField],p=u[A.originalYCategoryValue]!==void 0?u[A.originalYCategoryValue]:u[te.yField];c.add(`${f}|${p}`)}for(let u of r){let f=String(u);for(let p of a){let h=String(p);if(!c.has(`${f}|${h}`)){let y=l?zu({queryObject:l,fieldName:s,fieldValue:f})??u:u,m=l?zu({queryObject:l,fieldName:o,fieldValue:h})??p:p;d.push({[A.originalCategoryValue]:u===null?null:u,[A.originalYCategoryValue]:p===null?null:p,[te.xField]:u===null?"null":y,[te.yField]:p===null?"null":m,[i]:n})}}}return d}function Xu(t){let{day:e,month:r,includeLeapDay:a}=t;return r===2&&e>(a?29:28)||[4,6,9,11].includes(r)&&e>30}async function sf(t){let{chartConfig:e,queryConfig:r,queryObject:a,completeHeatChartDataset:i=!0,errorStrings:n,options:s,abortKey:o}=t,l={valid:!0},d;if(Kr(e)){let{nullPolicy:c}=e,u=e.series[0],{x:f,y:p,query:h,xTemporalBinning:y,yTemporalBinning:m}=u,b=h?.outStatistics?.[0]?.outStatisticFieldName??"",v=h?.outStatistics?.[0]?.statisticType??W.Count,S=rx(e),C=te.valueField,F=c===st.Zero?0:null;if(Hp(e)){let I=await e0({chartConfig:e,queryObject:a,queryConfig:r,returnFeaturesExtent:s?.returnFeaturesExtent,errorStrings:n,abortKey:o});if(!sr({count:I?.length??0,seriesCount:1,chartType:g.HeatSeries,chartLimits:s?.chartLimits}))bn({dataInfo:l,chartType:g.HeatSeries});else if(typeof I?.[0]=="object"){let M=wt(a,s?.popupTemplateFieldInfosEnabled);d=af({queryObject:a,queryResponse:I,chartConfig:e,splitByField:"",isTimeBinningSeries:!1,chartLimits:s?.chartLimits,resultLimit:r.num,fieldList:M});let P=await Gs({queryObject:a,queryConfig:r,category:f,abortKey:o}),E=await Gs({queryObject:a,queryConfig:r,category:p,abortKey:o});d.length!==P?.length*E?.length&&(d=[...d,...ax({dataItems:d,xUniqueValues:P,yUniqueValues:E,valueField:C,emptyCellValue:F,x:f,y:p,queryObject:a})],S&&(d=ix({dataItems:d,valueField:C,filterOutZero:v===W.Count})))}}else{let I=await Xv({chartConfig:e,queryObject:a,queryConfig:r,options:s,errorStrings:n}),M=m?tx(m.unit):await Gs({queryObject:a,queryConfig:r,category:p,abortKey:o}),P=0;d=I?.features.flatMap(E=>{let N=[],{attributes:R,stackedAttributes:q}=E,L=[];if(q?.forEach(k=>{let B=`${k[p]}`;L.push(B),N.push({[te.xField]:`${R[ue.heatChartLowerBoundaryAlias]}`,[te.yField]:B,[C]:k[b]})}),i&&M&&L.length!==M?.length){let k=M.filter(B=>!L.includes(B.toString()));S&&(k.length!==M.length||L.length===0)||k.forEach(B=>{Number.isFinite(Number(R[ue.heatChartLowerBoundaryAlias]))&&Number.isFinite(Number(B))&&(y?.unit===gt.DayOfMonth&&m?.unit===gt.MonthOfYear&&Xu({day:Number(R[ue.heatChartLowerBoundaryAlias]),month:Number(B),includeLeapDay:e.includeLeapDay})||m?.unit===gt.DayOfMonth&&y?.unit===gt.MonthOfYear&&Xu({day:Number(B),month:Number(R[ue.heatChartLowerBoundaryAlias]),includeLeapDay:e.includeLeapDay}))||N.push({[te.xField]:`${R[ue.heatChartLowerBoundaryAlias]}`,[te.yField]:B,[C]:c===st.Zero?0:null})})}return P+=N.length,N}),sr({count:P,seriesCount:1,chartType:g.HeatSeries,chartLimits:s?.chartLimits})||bn({dataInfo:l,chartType:g.HeatSeries})}}return d&&(l.data={dataItems:d}),l}function nx(t){let{chartConfig:e,options:r,data:a}=t,i=e.series,n=a,s=hp(e,r?.chartLimits);if(s!==void 0){let o=it(i);if(o.length===1)n=a.filter(l=>Number.isFinite(l[o[0]])).slice(0,s);else if(a.length*o.length>s){let l=[],d=0,c=0;for(;d<=s&&c<a.length;){let u=a[c];if(l.push(u),d+=o.filter(f=>Number.isFinite(u[f])).length,d>s){let f=d-s,p=o.length-1;for(;f!==0&&p>=0;){let h=o[p];Number.isFinite(u[h])&&(delete u[h],f-=1),p-=1}}c+=1}n=l}}return n}async function mo(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i,options:n,preFetchedQueryResponse:s}=t,{chartLimits:o,popupTemplateFieldInfosEnabled:l}=n??{},{behaviorAfterLimit:d}=o??{},c=e.series,u=c[0],{x:f}=u,p=Ze(u.query?.where),h={valid:!0},y;if(jt(u)){let{temporalBinning:m}=u;if(a&&m){let{unit:b,size:v}=m,S=1,C={unit:b,size:v},F=!1,I=kw({series:u,isTimeBinningSeries:!0,setTimeBinningInfoWhenNotProvided:n?.setTimeBinningInfoWhenNotProvided}),M=!Ai(p,a)||I?await Pw({queryObject:a,queryConfig:r,x:f}):void 0;I&&M&&M.numberOfFeatures>0&&M.dateRange.dateMaxTimestamp!==void 0&&M.dateRange.dateMinTimestamp!==void 0&&(C=Rw(M),wt(a).find(R=>R.name===f)?.type===fe.DateOnly&&C.unit!==void 0&&[Q.Hour,Q.Minute,Q.Second].includes(C.unit)&&(C.unit=Q.Day,C.size=1),m.size=C.size,m.unit=C.unit);let{uniqueQuery:P,mapToStatField:E}=oo({chartConfig:e,queryConfig:r,queryObject:a,timeIntervalInfo:C,options:n}),N=sr({count:S??0,seriesCount:c.length,chartType:g.LineSeries,chartLimits:o});if(N){if(Ai(p,a)){let R=e.axes?.[0].valueFormat.type===g.DateAxisFormat?e.axes[0].valueFormat.intlOptions.timeZone:void 0,q=s?.[0]instanceof eb?s:await n0({queryObject:a,dateField:f,splitByField:p,queryConfig:P,axisTimeZone:R,temporalBinning:m,options:n}),L="y"in u&&typeof u.y=="string"?u.y:void 0;if(y=$w({chartConfig:e,queryResults:q,mapToStatField:E,splitByField:p,x:f,y:L,nullPolicy:m.nullPolicy,queryObject:a}),!sr({count:y.length,seriesCount:c.length,chartType:g.LineSeries,chartLimits:o})){let k=it(c),B=y.filter(_=>k.some(G=>G in _&&Number.isFinite(_[G]))).length;sr({count:B,seriesCount:c.length,chartType:g.LineSeries,chartLimits:o})||(N=!1)}}else if(M?.dateRange.dateMinTimestamp&&M.dateRange.dateMaxTimestamp){let{numberOfFinalBinsWithinDataRange:R}=ef({dateMinTimestamp:M.dateRange.dateMinTimestamp,dateMaxTimestamp:M.dateRange.dateMaxTimestamp,timeIntervalInfo:C});S=R*c.length,S=Xp(S,C.unit),y=await Fn({queryObject:a,uniqueQuery:P,chartConfig:e,mapToStatField:E,elementCount:S,chartLimits:o,isTimeBinningSeries:!0,popupTemplateFieldInfosEnabled:l,abortKey:i}),y=await Mw({queryObject:a,queryConfig:r,queryResults:y,x:f,seriesConfig:c,dateRange:M.dateRange,timeIntervalInfo:C})}Tp(a)&&y&&y?.length===xw&&(F=!0),d===Dr.RenderUpToTheLimit&&y&&(y=nx({chartConfig:e,options:n,data:y}))}N||(h.valid=!1,h.invalidType=ae.LineChartExceedsLimit),y&&y.length>0&&(y[y.length-1][A.lastTemporalBin]=!0),h.data={dataItems:y,timeIntervalInfo:C,serverLimitReached:F},h.count=S}}return h}async function sx(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i,options:n}=t,s=Oi(e),{setTimeBinningInfoWhenNotProvided:o,chartLimits:l,popupTemplateFieldInfosEnabled:d}=n??{},c={valid:!0},u=e.series,f=fr({seriesConfig:u[0],xAxisValueFormatType:Vt(e),setTimeBinningInfoWhenNotProvided:o,queryObject:a}),{uniqueQuery:p,mapToStatField:h}=oo({chartConfig:e,queryObject:a,queryConfig:r,fetchFullBoxPlotData:!s,options:n}),y=await Fn({queryObject:a,uniqueQuery:p,elementCount:1,chartConfig:e,mapToStatField:h,isTimeBinningSeries:f,showMean:s,chartLimits:l,popupTemplateFieldInfosEnabled:d,abortKey:i});return rt(e)&&(y=Qp({chartConfig:e,data:y,calculateZScore:!1})),c.data={dataItems:y},c}async function ox(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i,options:n,errorStrings:s}=t,o={valid:!0};if(rt(e)){let l=rt(e)?e.showMean:!1;o=await fo({queryObject:a,chartConfig:e,queryConfig:r,options:n,errorStrings:s,abortKey:i}),l&&o.data&&"dataItems"in o.data&&"meanLines"in o.data&&o.data.meanLines&&(o.data.dataItems=[...o.data.dataItems,...o.data.meanLines])}return o}var lx="{ groupByFieldsForStatistics } WHEN ({ y } { yMinOperand } { yValue } AND { y } { yMaxOperand } { yValuePlusStep } AND { x } { xMinOperand } { xValue } AND { x } { xMaxOperand } { xValuePlusStep }) THEN '{ xValue }|{ xValuePlusStep}|{ yValue }|{ yValuePlusStep }'";async function dx(t){let{chartConfig:e,queryObject:r,queryConfig:a,abortKey:i}=t,n=e.series[0],{x:s,y:o}=n,{dataContextCountDistinctX:l,dataContextCountDistinctY:d}=A.scatterplotAggregationFields,c={...a,outStatistics:[{statisticType:W.Count,outStatisticFieldName:l,onStatisticField:s},{statisticType:W.Count,outStatisticFieldName:d,onStatisticField:o}],returnDistinctValues:!0};return await oa({queryObject:r,queryConfig:c,abortKey:i})}async function cx(t){let{statsMap:e,chartConfig:r,queryObject:a,options:i,queryConfig:n,abortKey:s}=t,{dataContextXMinField:o,dataContextXMaxField:l,dataContextYMinField:d,dataContextYMaxField:c,dataContextCountDistinctX:u,dataContextCountDistinctY:f}=A.scatterplotAggregationFields,p,h,y,m,b,v=e.get(o),S=e.get(l),C=e.get(d),F=e.get(c);if(v!=null&&C!==void 0&&C!==null&&S!==void 0&&S!==null&&F!==void 0&&F!==null&&!Number.isNaN(v+S+C+F)){let{maxScatterPointsAfterAggregation:I}=Xr(i?.chartLimits),M=Math.floor(Math.sqrt(I)),P=await dx({queryObject:a,chartConfig:r,queryConfig:n,abortKey:s});y=Math.min(P.get(f)??Number.NaN,M),m=Math.min(P.get(u)??Number.NaN,M),b=m*y,p=S===v?0:(S-v)/(m-1),h=F===C?0:(F-C)/(y-1),e.set(A.scatterplotAggregationFields.xStep,p),e.set(A.scatterplotAggregationFields.yStep,h),e.set(A.scatterplotAggregationFields.rowCount,y),e.set(A.scatterplotAggregationFields.columnCount,m),e.set(A.scatterplotAggregationFields.realGridSize,b)}}function ux(t){let{groupByFieldsForStatistics:e,x:r,y:a,xValue:i,yValue:n,xStep:s,yStep:o,endOfRow:l,endOfColumn:d}=t,c=e===""?Jr.groupByCaseBegin:e;return c=qe(lx,{groupByFieldsForStatistics:c,x:r,y:a,xValue:`${i}`,yValue:`${n}`,xValuePlusStep:`${i+(d?0:s)}`,yValuePlusStep:`${n+(l?0:o)}`,xMinOperand:d?"=":">=",yMinOperand:l?"=":">=",xMaxOperand:d?"=":"<",yMaxOperand:l?"=":"<"}),c}async function px(t){let{chartConfig:e,queryConfig:r,queryObject:a,xMin:i,xMax:n,yMin:s,yMax:o,abortKey:l}=t,d=e.series[0],{x:c,y:u}=d,f={...r};return f.where=Ae([f.where,`${c}>=${i}`,`${c}<=${n}`]),c!==u&&(f.where=Ae([f.where,`${u}>=${s}`,`${u}<=${o}`])),await Dt({queryObject:a,queryConfig:f,noBatch:!0,featureCount:1,abortKey:l})}async function fx(t){let{statsMap:e,chartConfig:r,queryObject:a,queryConfig:i,useQueryAttributeBins:n,errorStrings:s,abortKey:o}=t,l=r.series[0],{x:d,y:c}=l,{dataContextXMinField:u,dataContextXMaxField:f,dataContextYMinField:p,dataContextYMaxField:h,queryNumberOfFeatures:y,queryNumberOfAggregatedFeatures:m}=A.scatterplotAggregationFields,b,v=e?.get(u)??Number.NaN,S=e?.get(f)??Number.NaN,C=e?.get(y)??Number.NaN,F=e?.get(p)??v,I=e?.get(h)??S;if(v!=null&&F!==void 0&&F!==null&&S!==void 0&&S!==null&&I!==void 0&&I!==null&&!Number.isNaN(v+S+F+I)){let M=se(a),{idField:P,isTraditionalTypeOID:E}=_t(M),N=E?P:"*",R=e?.get(A.scatterplotAggregationFields.xStep),q=e?.get(A.scatterplotAggregationFields.yStep),L=e?.get(A.scatterplotAggregationFields.realGridSize),k=e?.get(A.scatterplotAggregationFields.rowCount),B=e?.get(A.scatterplotAggregationFields.columnCount),_=new Map,G=wt(a);if(G?.forEach(V=>{Pi(V)&&_.set(V.name,{onStatisticField:V.name,outStatisticFieldName:V.name,statisticType:W.Maximum})}),(G.filter(V=>l?.additionalTooltipFields?.includes(V.name))??[])?.forEach(V=>{Pi(V)||_.set(V.name,{onStatisticField:V.name,outStatisticFieldName:V.name,statisticType:W.Maximum})}),(await Wp(M)).forEach(V=>{_.set(V,{onStatisticField:V,outStatisticFieldName:V,statisticType:W.Maximum})}),P!==""&&_.set(P,{onStatisticField:N,outStatisticFieldName:m,statisticType:W.Count}),_.set(d,{onStatisticField:d,outStatisticFieldName:d,statisticType:W.Maximum}).set(c,{onStatisticField:c,outStatisticFieldName:c,statisticType:W.Maximum}),R!==void 0&&q!==void 0){if(n){let V={...i,outStatistics:[..._.values()]};b=await t0({queryObject:a,queryConfig:V,xStep:R,xMin:v,xMax:S,x:d,y:c,yStep:q,errorStrings:s})}else if(k!==void 0&&B!==void 0){let V=0,{maxScatterCellsPerQuery:Z,maxScatterCellsPerQueryForStandard:U}=wn(),oe=await tS(M)?U:Z,Te=[],Re=!0,re=v,be=F,Fe="",ke=1,xt=1,at=Number.MAX_SAFE_INTEGER,Ie=Number.MIN_SAFE_INTEGER,we=Number.MAX_SAFE_INTEGER,Ct=Number.MIN_SAFE_INTEGER;for(;xt<=B&&Re;){for(be=F,ke=1;ke<=k&&Re;){if(Fe=ux({groupByFieldsForStatistics:Fe,x:d,y:c,xValue:re,yValue:be,xStep:R,yStep:q,endOfRow:ke===k,endOfColumn:xt===B}),re<at&&(at=re),re+R>Ie&&(Ie=re+R),be<we&&(we=be),be+R>Ct&&(Ct=be+q),V+=1,V%oe===0||V===L||V===C){Fe=`${Fe} ${Jr.groupByCaseEnd}`;let Ue={...i,groupByFieldsForStatistics:[Fe],outStatistics:[..._.values()]};Te.push(px({chartConfig:r,queryConfig:Ue,queryObject:a,xMin:at,xMax:Ie,yMin:we,yMax:Ct,abortKey:o})),at=Number.MAX_SAFE_INTEGER,Ie=Number.MIN_SAFE_INTEGER,we=Number.MAX_SAFE_INTEGER,Ct=Number.MIN_SAFE_INTEGER,Fe="",V===L&&(Re=!1)}be+=q,ke+=1}re+=R,xt+=1}b=(await Promise.all(Te)).flat()}}}return b}async function hx(t){let{chartConfig:e,queryConfig:r,queryObject:a,abortKey:i}=t,n=e.series[0],{x:s,y:o}=n,l=new Map,{dataContextXMinField:d,dataContextXMaxField:c,dataContextYMinField:u,dataContextYMaxField:f,queryNumberOfFeatures:p}=A.scatterplotAggregationFields,{idField:h,isTraditionalTypeOID:y}=_t(se(a)),m=y?h:"*",b=[{statisticType:W.Count,onStatisticField:m,outStatisticFieldName:p},{statisticType:W.Minimum,outStatisticFieldName:d,onStatisticField:s},{statisticType:W.Maximum,outStatisticFieldName:c,onStatisticField:s}];s!==o&&b.push({statisticType:W.Minimum,outStatisticFieldName:u,onStatisticField:o},{statisticType:W.Maximum,outStatisticFieldName:f,onStatisticField:o});let v={...r};return v.outStatistics=b,l=await oa({queryObject:a,queryConfig:v,abortKey:i}),s===o&&(l.set(u,l.get(d)??Number.NaN),l.set(f,l.get(c)??Number.NaN)),l}function ln(t){let{value:e,valueMin:r,valueMax:a}=t;return e===r||e===a?e:Math.random()*(a-r)+r}function mx(t){let{useQueryAttributeBins:e,graphic:r,x:a,y:i,yStep:n}=t,{groupByOutKeyword:s}=Jr,{dataContextXMinField:o,dataContextXMaxField:l,dataContextYMinField:d,dataContextYMaxField:c}=A.scatterplotAggregationFields,u=[];if(e&&"stackedAttributes"in r&&r.stackedAttributes){let f=Op(a,i),p=r.attributes[f.lowerBoundaryAlias],h=r.attributes[f.upperBoundaryAlias];r.stackedAttributes.forEach(y=>{let m=y[f.stackAlias],b;typeof m=="number"&&typeof n=="number"&&(m*=n),typeof m=="number"&&typeof n=="number"&&(b=m+n);let v=y[a],S=y[i];typeof m=="number"&&typeof b=="number"&&typeof v=="number"&&typeof S=="number"&&u.push({...y,[a]:ln({value:v,valueMin:p,valueMax:h}),[i]:ln({value:S,valueMin:m,valueMax:b}),[o]:Math.min(p,h),[l]:Math.max(p,h),[d]:m,[c]:b})})}else{let{expr:f,isInItem:p}=xn(r.attributes);if(p&&f&&r.attributes[f]!==s){let[h,y,m,b]=r.attributes[f].split("|");h=Math.min(h,y),y=Math.max(h,y),m=Math.min(m,b),b=Math.max(m,b);let v={...r.attributes,[o]:h,[l]:y,[d]:m,[c]:b};v[a]=ln({value:v[a],valueMin:h,valueMax:y}),v[i]=ln({value:v[i],valueMin:m,valueMax:b}),u=[v]}}return u}function yx(t){let{chartConfig:e,rawData:r,isAggregationMode:a,yStep:i,useQueryAttributeBins:n}=t,s=e.series[0],{x:o,y:l}=s,d=(Array.isArray(r)?r:r?.features)?.flatMap(c=>{let u=[{...c.attributes}];return ho(u[0],[o,l]),a?u=mx({useQueryAttributeBins:n,graphic:c,x:o,y:l,yStep:i}):u[0][ue.uniqueIdsName]=c.getObjectId(),u});return d=d?.filter(c=>{let{expr:u}=xn(c);return Number.isFinite(c[o])&&Number.isFinite(c[l])&&(u===void 0||c[u]!==Jr.groupByOutKeyword)}),d??[]}async function gx(t){let{queryObject:e,queryConfig:r,chartConfig:a,featureCount:i,abortKey:n}=t,s=a.series[0],{x:o,y:l}=s,d=se(e),c=[],u=wt(e),f=Tn(d).idFields,p=(u?.filter(v=>Pi(v)&&v.name!==o&&v.name!==l)??[]).map(v=>v.name)??[],h=s?.additionalTooltipFields??[],y=Array.from(new Set([o,l,...f??[],...p,...h])),m=ut(d);if(m&&!m.isTable){let{rendererField:v,rendererNormalizationField:S}=J0(d?.renderer??void 0);_e(v)||y.push(v),_e(S)||y.push(S)}let b={...r,orderByFields:[`${o} ${Ne.Ascending}`],outFields:y};return c=await Dt({queryObject:e,queryConfig:b,featureCount:i,abortKey:n}),c}async function bx(t){let e,{chartConfig:r,queryConfig:a,queryObject:i,statsMap:n,numberOfFeatures:s,isAggregationMode:o,useQueryAttributeBins:l,errorStrings:d,abortKey:c}=t,u=r.series[0],{x:f,y:p}=u;if(!Number.isNaN(s)&&s>0){let h={...a};h.where=Ae([h.where,`${f} IS NOT NULL`,`${p} IS NOT NULL`]),o?e=await fx({chartConfig:r,queryObject:i,queryConfig:h,statsMap:n,useQueryAttributeBins:l,errorStrings:d,abortKey:c}):e=await gx({queryObject:i,chartConfig:r,queryConfig:h,featureCount:s,abortKey:c})}return e}async function of(t){let{chartConfig:e,queryConfig:r,queryObject:a,sortData:i,calculateTrendLine:n,options:s,abortKey:o}=t,l;if(Ke(a))l=await B0(t);else{let d=await hx({chartConfig:e,queryConfig:r,queryObject:a,abortKey:o}),{queryNumberOfFeatures:c,yStep:u}=A.scatterplotAggregationFields,{maxScatterPointsBeforeAggregation:f}=Xr(s?.chartLimits),p=d?.get(c)??Number.NaN,h=p>=f,y=Zv(a);h&&await cx({statsMap:d,chartConfig:e,queryObject:a,options:s,queryConfig:r,abortKey:o});let m=await bx({...t,queryObject:a,statsMap:d,numberOfFeatures:p,isAggregationMode:h,useQueryAttributeBins:y}),b=yx({chartConfig:e,rawData:m,isAggregationMode:h,yStep:d.get(u),useQueryAttributeBins:y});i!==!1&&ra({arrayToSort:b,sortingField:e.series[0].x,orderBy:Ne.Ascending});let{r2:v,trendLinePoints:S}=n!==!1?await Np({data:b,statsMap:d,queryConfig:r,options:s,queryObject:a,chartConfig:e}):A.scatterplotSeries;l={dataItems:b,r2:v,trendLinePoints:S,aggregated:h}}return l}function Ti(t){let e=t===void 0||t==="";return{[H.Average]:`${e?"":`${t}_`}${H.Average}`,[H.Min]:`${e?"":`${t}_`}${H.Min}`,[H.Max]:`${e?"":`${t}_`}${H.Max}`,[H.FirstQuartile]:`${e?"":`${t}_`}${H.FirstQuartile}`,[H.Median]:`${e?"":`${t}_`}${H.Median}`,[H.ThirdQuartile]:`${e?"":`${t}_`}${H.ThirdQuartile}`,[H.IQR]:`${e?"":`${t}_`}${H.IQR}`,[H.Outlier]:`${e?"":`${t}_`}${H.Outlier}`,[H.StandardDeviation]:`${e?"":`${t}_`}${H.StandardDeviation}`}}function yo(t){return"subType"in t&&t.subType===Bo.FeatureGauge}function go(t){let e;return t!==void 0&&("bins"in t?e=t.bins:"dataItems"in t&&(e=t.dataItems)),e}function lf(t){return t===x.BoxPlotMultiFields||t===x.BoxPlotMultiFieldsAndCategory||t===x.BoxPlotMultiFieldsAndSplitBy}function ze(t){let{key:e,y:r,chartSubType:a,splitBy:i,splitByValue:n,showOutliers:s,standardizeValues:o}=t,l=n,d=Ti(r)[e];return s===!0&&(e===H.Min||e===H.Max)&&(d=`${d}${Qb}`),o===!0&&(lf(a)||e===H.Outlier)&&(d=`${d}${Zb}`),(n===void 0||`${n}`.trim()==="")&&(l=ct({where:i,normalize:!0,escape:!1})),l!==void 0&&`${l}`.trim()!==""&&(d=`${l}${d!==""?`_${d}`:""}`),d}function Hs(t){let{dataItem:e,y:r,splitBy:a,showOutliers:i}=t,n=ze({key:H.FirstQuartile,y:r,splitBy:a,showOutliers:i}),s=ze({key:H.ThirdQuartile,y:r,splitBy:a,showOutliers:i});return Number.isFinite(e[n])||Number.isFinite(e[s])}function vx(t){let{configSeries:e,boxPlotDataItem:r,yList:a,showOutliers:i}=t,n=X(e),s=!1;switch(n){case x.BoxPlotMonoField:case x.BoxPlotMultiFields:case x.BoxPlotMonoFieldAndCategory:s=Hs({dataItem:r,showOutliers:i});break;case x.BoxPlotMultiFieldsAndCategory:s=a.some(o=>Hs({dataItem:r,y:o,showOutliers:i}));break;case x.BoxPlotMonoFieldAndSplitBy:case x.BoxPlotMultiFieldsAndSplitBy:case x.BoxPlotMonoFieldAndCategoryAndSplitBy:s=e.some(o=>Hs({dataItem:r,splitBy:o.query?.where,showOutliers:i}));break;default:s=!1;break}return s}function df(t){return t.map(e=>e.id).filter(e=>e!==void 0)}function it(t,e){let r=[],a=e??df(t),i=X(t);return r=t.filter(n=>a.includes(n.id)).map(n=>{let s="y"in n?n.y:void 0;return s!==void 0&&i===x.BarAndLineSplitByNoAggregation&&(s=`${s.toString()}_${ct({where:n.query?.where,keepSurroundingQuotes:!1,escape:!1})}`),s}).filter(n=>n!==void 0),Array.from(new Set(r.flat()))}function In(t){let{seriesConfig:e,filteredSeriesIds:r,showMean:a}=t,i=[];if(a===!0){let n=e.find(s=>s.type===g.BoxPlotSeries);n!==void 0&&"y"in n&&(i=[n.y].flat())}else i=it(e,r);return i}function Or(t,e){return t===null&&e===!0||Number.isFinite(t)}function Sx(t){let{dataItem:e,x:r,y:a,nullAsValid:i=!1}=t;return e[r]!==void 0&&(typeof e[r]!="number"||Number.isFinite(e[r]))&&Or(e[a],i)}function UF(t){let{chartConfig:e,nullAsValid:r=!1,dataSet:a}=t,i=!0;if(e!==void 0){let n=K(e.series);if(a===void 0||a.length===0)i=!0;else{let s=it(e.series);i=!a.some(o=>{let l=!1;switch(n){case g.HistogramSeries:{let d=o;l=Or(d.minValue,r)&&Or(d.maxValue,r)}break;case g.ScatterSeries:{let d=o,{x:c,y:u}=e.series[0];l=Or(d[c],r)&&Or(d[u],r)}break;case g.ComboLineAndBarSeries:case g.RadarSeries:case g.LineSeries:case g.BarSeries:{let d=o,{x:c}=e.series[0];l=s.some(u=>Sx({dataItem:d,x:c,y:u,nullAsValid:r}));break}case g.BoxPlotSeries:{if(rt(e)){let d=e.series;l=vx({configSeries:d,boxPlotDataItem:o,yList:s,showOutliers:e.showOutliers})}break}case g.PieSeries:{let d=o,{x:c,y:u}=e.series[0];X(e.series)===x.PieFromFields&&(c=lt,u=Wt);let f=d[u];l=d[c]!==void 0&&d[c]!==null&&!Lo(f)&&Or(Number(f),r)}break;case g.GaugeSeries:{let{x:d}=e.series[0];l=Or(o[d],r)}break;case g.HeatSeries:l=a.some(d=>Or(d[te.valueField],r));break}return l})}}return i}function wx(t,e){let r=new Map,a=e??df(t);return t.forEach(i=>{if(a.includes(i.id)&&"y"in i){let n=r.get(i.type)??[];n.push(i.y),r.set(i.type,n)}}),r}function xx(t){let{seriesConfig:e,filteredSeriesIds:r,filteredData:a}=t,i=wx(e,r),n=e.find(d=>d.type===g.LineSeries||d.type===g.RadarSeries)?.stackNegativeValuesToBaseline??!0,s=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,l=!1;return a.forEach(d=>{i.forEach(c=>{if(n){let u=0,f=0,p=!1,h=!1;for(let y=0;y<c.length;y+=1){let m=d[c[y]];Number.isFinite(m)&&(m<0?(f+=m,h=!0,l=!0):(u+=m,p=!0))}s=p?Math.max(s,u):s,o=h?Math.min(o,f):o,p&&!h&&(o=Math.min(o,u)),!p&&h&&(s=Math.max(s,f)),p&&u<=0&&(l=!0)}else{let u=0;for(let f=0;f<c.length;f+=1){let p=d[c[f]];u+=p,s=Math.max(s,u),o=Math.min(o,u)}(s<=0||o<=0)&&(l=!0)}})}),{stackedMinY:o,stackedMaxY:s,dataHasNegativeValues:l}}function Cx(t){let{dataItem:e,...r}=t,a=ze({key:H.Min,...r}),i=ze({key:H.Max,...r}),n=e[a],s=e[i];return{min:n,max:s}}function ep(t){let e=Number.NaN,r=Number.NaN,a,i,{chartConfig:n,chartData:s,filteredSeriesIds:o}=t,{series:l}=n;if(l?.length>0){let{x:d}=l[0],c=K(n.series);if(c===g.HistogramSeries&&s.length>0){let u=s[0]?.[Ru.Start],f=s[s.length-1]?.[Ru.End];a=typeof u=="number"?u:a,i=typeof f=="number"?f:i}else{let u=s.filter(f=>f[d]!==null);if({min:a,max:i}=aa(u,f=>f[d]),n.axes?.[0]?.valueFormat.type===g.DateAxisFormat&&a!==void 0&&i!==void 0&&([a,i]=[new Date(a).valueOf(),new Date(i).valueOf()]),c===g.BoxPlotSeries){e=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;let f=it(l,o),p=X(l),h="standardizeValues"in n?n.standardizeValues===!0:void 0,y=n.series.map(m=>m.visible!==!1?ct({where:m.query?.where}):"");y.length===0&&y.push(" "),u.forEach(m=>{f.forEach(b=>{let v=p===x.BoxPlotMultiFieldsAndCategory?b:void 0;y.forEach(S=>{let{min:C,max:F}=Cx({y:v,splitByValue:S,chartSubType:p,showOutliers:!1,standardizeValues:h,dataItem:m});C!=null&&C<e&&(e=C),F!=null&&F>r&&(r=F)})})})}else switch(lo(n)){case yt.Stacked100:case yt.Stacked:{let{stackedMinY:f,stackedMaxY:p}=xx({seriesConfig:l,filteredData:u,filteredSeriesIds:o});e=f,r=p;break}case yt.Side:default:{e=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,it(l,o).forEach(f=>{let{min:p,max:h}=aa(u,y=>y[f]);p!==void 0&&p<e&&(e=p),h!==void 0&&h>r&&(r=h)});break}}}}return{minY:e,maxY:r,minX:a,maxX:i}}function Tx(t){let{chartConfig:e,isSecondValueAxis:r,seriesIds:a}=t,i=a;return e.axes?.length===3&&(i=e.series.map(n=>{let s="";return(a===void 0||a.includes(n.id))&&(r===!0&&"assignToSecondValueAxis"in n&&n.assignToSecondValueAxis===!0||r!==!0&&(!("assignToSecondValueAxis"in n)||n.assignToSecondValueAxis!==!0))&&({id:s}=n),s}).filter(n=>n!=="")),i}function Fx(t){let e=!1;if(t){let r=t.axes?.[0],a=r?.isLogarithmic===!0,i=r?.valueFormat?.type;e=(i===g.NumberAxisFormat||i===g.DateAxisFormat)&&a}return e}function tp(t,e){let r=!1;return Number.isFinite(t)&&t!==Number.MAX_SAFE_INTEGER&&Number.isFinite(e)&&e!==Number.MIN_SAFE_INTEGER&&(r=t<=0||e<=0),r}function Ix(t){let{chartConfig:e,chartData:r,axisConfigIndex:a}=t,i=!1;if(a===0){if(Fx(e)){let{minX:n,maxX:s}=ep({chartConfig:e,chartData:r});i=tp(n,s)}}else{let n=Tx({chartConfig:e,isSecondValueAxis:a===2}),{minY:s,maxY:o}=ep({chartConfig:e,chartData:r,filteredSeriesIds:n});i=tp(s,o)}return i}function HF(t){let{chartConfig:e,axisConfigIndex:r,chartData:a}=t,i=!0,n=e?.axes?.[r];return e&&a&&n?.isLogarithmic===!0&&(i=!Ix({chartConfig:e,chartData:a,axisConfigIndex:r})),i}function Ox(t,e){let r=t;if(e?.[0]!==void 0&&X(e)===x.PieFromFields){let{x:a,y:i}=e[0];(fa(t)?r:r.dataItems).forEach(n=>(lt in n&&a!==lt&&(n[a]=n[a]!==void 0?n[a]:n[lt],delete n[lt]),Wt in n&&i!==Wt&&(n[i]=n[i]!==void 0?n[i]:n[Wt],delete n[Wt]),n))}return r}function Ax(t,e){let r=K(e),a=t,i=e?.[0];if((r===g.PieSeries||r===g.BoxPlotSeries||r===g.LineSeries||r===g.RadarSeries||r===g.BarSeries||r===g.HeatSeries||r===g.ComboLineAndBarSeries)&&i!==void 0){let n=fa(t),s=n?t:t.dataItems;if(t!==void 0){let{originalCategoryValue:o,originalYCategoryValue:l,originalDateValue:d,xAxisField:c}=A,u=r===g.HeatSeries?te.xField:i.x,f=r===g.HeatSeries?te.yField:void 0;s=s.map(p=>{let h=p[u];p[d]!==void 0?h=p[d]:p[o]!==void 0&&(h=p[o]);let y={...p,[u]:h};if(delete y[d],delete y[o],delete y[c],f){let m=p[f];p[l]!==void 0&&(m=p[l]),y={...y,[f]:m},delete y[l]}return y}),n?a=s:"dataItems"in a&&(a.dataItems=s)}}return a}function rp(t){let e={...t};delete e[A.technicalSortingFieldBySum],delete e[A.technicalSortingFieldByPercent],delete e[A.pieChart.technicalFieldSlicePercent],delete e[A.pieChart.technicalFieldGroupedSlices],delete e[A.lastTemporalBin],delete e[A.originalServerBinningRange],delete e[A.technicalFieldSplitByField],delete e[ue.uniqueIdsName],Object.keys(e).filter(a=>a.includes(A.rendererSymbolField)).forEach(a=>delete e[a]);let r=xn(e);return r.isInItem&&delete e[r.expr??""],e}function Px(t,e){let r=t,a=K(e),i=go(r);if(i!==void 0)switch(a){case g.ComboLineAndBarSeries:case g.BarSeries:case g.LineSeries:case g.RadarSeries:case g.PieSeries:{i=i.map(rp),r={dataItems:i};let{timeIntervalInfo:n,serverLimitReached:s}=t??{};Dn(n)||(r.timeIntervalInfo=n),s!==void 0&&(r.serverLimitReached=s)}break;case g.ScatterSeries:r={...r,dataItems:i.map(rp)};break}return r}var GF=(t,e)=>{let r=10**e;return Math.round(t*r)/r};function QF(t){let{data:e,seriesConfig:r}=t,a=Wr(e);return a!==void 0&&(a=Ax(a,r),a=Px(a,r),a=Ox(a,r)),a}function Ex(t){let{dataFetchingResults:e,numberOfQueries:r,series:a}=t,i=K(a),n=X(a),s=[],o=new Map;for(let l=0;l<r;l+=1){let d=e[l];if(d!==void 0){let c;if(i===g.ScatterSeries)c=d.dataItems;else if("data"in d&&d.data){let u=d.data;"dataItems"in u&&(c=u.dataItems),"outliers"in u&&u.outliers&&s.push(...u.outliers),"meanLines"in u&&u.meanLines&&s.push(...u.meanLines)}if(c)if(a[0].type===g.HeatSeries)r>0&&c.forEach(u=>{o.set(`${u[te.xField]}-${u[te.yField]}`,u)});else if(a[0].type===g.ScatterSeries){let{x:u,y:f}=a[0];s.push(...c.map(p=>({[u]:p[u],[f]:p[f]})))}else d.valid&&(n===x.PieFromFields?s=mn({dataToConvert:c[0],x:lt,y:Wt}):n===x.BarAndLineFromFields?s=mn({dataToConvert:c[0],x:a[0].x,y:a[0].y}):s.push(...c))}}return o.size>0&&(s=Array.from(o.values())),s}async function Lx(t){let{numberOfQueries:e,selectionOIDs:r,chartConfig:a,queryConfig:i,options:n,errorStrings:s,queryObject:o,splitByField:l}=t,{setTimeBinningInfoWhenNotProvided:d}=n??{},{series:c}=a,u=K(c),f=[],{maxOIDsPerSelectionQuery:p}=wn();for(let h=0;h<e;h+=1){let y=h*p,m=(h+1)*p-1,b=r.slice(y===0?0:y-1,m),v={...i};switch(v.objectIds=b,u){case g.HeatSeries:f.push(sf({completeHeatChartDataset:!1,chartConfig:a,queryConfig:v,queryObject:o,errorStrings:s,options:n}));break;case g.PieSeries:case g.BarSeries:case g.LineSeries:case g.RadarSeries:case g.ComboLineAndBarSeries:if(fr({xAxisValueFormatType:Vt(a),setTimeBinningInfoWhenNotProvided:d,seriesConfig:c[0],queryObject:o})){let S=a;"temporalBinning"in S.series[0]&&S.series[0].temporalBinning&&(S.series[0].temporalBinning.trimIncompleteTimeInterval=!1,Ai(l,o)&&(delete S.series[0].temporalBinning.start,delete S.series[0].temporalBinning.end)),f.push(mo({chartConfig:S,queryConfig:v,queryObject:o,options:n}))}else f.push(sx({queryObject:o,chartConfig:a,options:n,queryConfig:v}));break;case g.BoxPlotSeries:f.push(ox({queryObject:o,chartConfig:a,options:n,errorStrings:s,queryConfig:v}));break;case g.ScatterSeries:f.push(of({queryObject:o,chartConfig:a,queryConfig:v,options:n,errorStrings:s,sortData:!1,calculateTrendLine:!1}));break;case g.HistogramSeries:f.push(jS({queryObject:o,queryConfig:v,chartConfig:a,x:c[0].x}));break}}return await Promise.all(f)}async function ZF(t){let{updatedPropsSnapshot:e,chartConfig:r,chartData:a,dataWasUpdated:i,queryObject:n,options:s,errorStrings:o}=t,{series:l}=r,{selectionData:d,viewExtentUpdated:c,returnSelectionOIDs:u,chartLimits:f}=s??{},{selectionItems:p,selectionOIDs:h}=d??{},y,m=K(l),b=!1;if(e.has("selectionData")){let{oldValue:S,newValue:C}=e.get("selectionData");b=!tr(S?.selectionOIDs,C?.selectionOIDs)}let v=m!==g.HistogramSeries&&m!==g.HeatSeries&&p!==void 0&&p.length>0&&!(l[0].x in p[0])&&!(lt in p[0])&&!(A.boxPlot.boxPlotCategory in p[0]);if(c!==!0&&u!==!1&&h!==void 0&&h.length>0&&(i===!0||v||b)){let S=go(a),C=jp({queryObject:n,chartConfig:r,runtimeDataFilters:s?.runtimeDataFilters,ignoreViewExtent:s?.ignoreViewExtent,viewExtent:s?.view?.extent});if(S!==void 0&&!iv({dataContext:S[0],chartConfig:r,chartLimits:f}))y=S.filter(F=>{let I=F[ue.uniqueIdsName];return typeof I=="number"||typeof I=="string"?h?.includes(I):!1});else if(h?.[0]!==void 0&&C!==void 0){let{maxOIDsPerSelectionQuery:F}=wn(),I=Math.ceil(h.length/F),M=Ze(r.series[0]?.query?.where),P=await Lx({numberOfQueries:I,selectionOIDs:h,queryConfig:C,queryObject:n,options:s,splitByField:M,errorStrings:o,chartConfig:r});y=Ex({dataFetchingResults:P,numberOfQueries:I,series:l})}}return y}var xi={$schema:"http://json-schema.org/draft-07/schema#",definitions:{ValueConversion:{type:"object",properties:{factor:{type:"number",description:"A numeric value multiplying the value to convert."},offset:{type:"number",description:"A numeric offset to apply to the value to convert."}},description:"Stores information regarding a numeric conversion.",title:"ValueConversion"},WebChartAxisScrollBar:{type:"object",properties:{visible:{type:"boolean",description:"Scrollbar visibility.",default:!1},width:{type:"number",description:"Scrollbar width in pixels."},color:{$ref:"#/definitions/Color",description:"Scrollbar color."},gripSize:{type:"number",description:"Grip size in pixels."},margin:{type:"number",description:"Margin between the scrollbar and the series container in pixels."}},description:"Describes the properties of an axis scrollbar.",title:"WebChartAxisScrollBar"},Color:{type:"array",items:{type:"number"},minItems:4,maxItems:4,description:"Represents the color information (R, G, B, A).",title:"Color"},WebChartTextSymbol:{type:"object",properties:{xoffset:{type:["number","string"],description:"Horizontal offset. Can be a number for a fixed value in pixels, or a string such as `25%` for a value relative to the label's container width."},yoffset:{type:["number","string"],description:"Vertical offset. Can be a number for a fixed value in pixels, or a string such as `25%` for a value relative to the label's container height."},angle:{type:"number",description:"Rotation angle of the label."},style:{type:"string",description:"Label style."},type:{type:"string",const:"esriTS"},color:{$ref:"#/definitions/Color"},backgroundColor:{$ref:"#/definitions/Color"},borderLineSize:{type:"number"},borderLineColor:{$ref:"#/definitions/Color"},haloSize:{type:"number"},haloColor:{$ref:"#/definitions/Color"},verticalAlignment:{type:"string",enum:["baseline","bottom","middle","top"]},horizontalAlignment:{type:"string",enum:["center","justify","left","right"]},rightToLeft:{type:"boolean"},kerning:{type:"boolean"},font:{$ref:"#/definitions/IFont"},text:{type:"string",description:"Only applicable when specified as a client-side graphic."}},required:["type"],description:"Represents a text symbol.",title:"WebChartTextSymbol"},'Omit<ITextSymbol,("angle"|"style"|"xoffset"|"yoffset")>':{$ref:"#/definitions/Pick%3CITextSymbol%2CExclude%3C(%22type%22%7C%22color%22%7C%22backgroundColor%22%7C%22borderLineSize%22%7C%22borderLineColor%22%7C%22haloSize%22%7C%22haloColor%22%7C%22verticalAlignment%22%7C%22horizontalAlignment%22%7C%22rightToLeft%22%7C%22kerning%22%7C%22font%22%7C%22text%22%7C%22angle%22%7C%22xoffset%22%7C%22yoffset%22%7C%22style%22%7Cstring)%2C(%22angle%22%7C%22style%22%7C%22xoffset%22%7C%22yoffset%22)%3E%3E",title:'Omit<ITextSymbol,("angle"|"style"|"xoffset"|"yoffset")>'},'Pick<ITextSymbol,Exclude<("type"|"color"|"backgroundColor"|"borderLineSize"|"borderLineColor"|"haloSize"|"haloColor"|"verticalAlignment"|"horizontalAlignment"|"rightToLeft"|"kerning"|"font"|"text"|"angle"|"xoffset"|"yoffset"|"style"|string),("angle"|"style"|"xoffset"|"yoffset")>>':{type:"object",properties:{type:{type:"string",const:"esriTS"},color:{$ref:"#/definitions/Color"},backgroundColor:{$ref:"#/definitions/Color"},borderLineSize:{type:"number"},borderLineColor:{$ref:"#/definitions/Color"},haloSize:{type:"number"},haloColor:{$ref:"#/definitions/Color"},verticalAlignment:{type:"string",enum:["baseline","bottom","middle","top"]},horizontalAlignment:{type:"string",enum:["center","justify","left","right"]},rightToLeft:{type:"boolean"},kerning:{type:"boolean"},font:{$ref:"#/definitions/IFont"},text:{type:"string",description:"Only applicable when specified as a client-side graphic."}},required:["type"],title:'Pick<ITextSymbol,Exclude<("type"|"color"|"backgroundColor"|"borderLineSize"|"borderLineColor"|"haloSize"|"haloColor"|"verticalAlignment"|"horizontalAlignment"|"rightToLeft"|"kerning"|"font"|"text"|"angle"|"xoffset"|"yoffset"|"style"|string),("angle"|"style"|"xoffset"|"yoffset")>>'},IFont:{type:"object",properties:{family:{type:"string"},size:{type:"number"},style:{type:"string",enum:["italic","normal","oblique"]},weight:{type:"string",enum:["bold","bolder","lighter","normal"]},decoration:{type:"string",enum:["line-through","none","underline"]}},title:"IFont"},WebChartText:{type:"object",properties:{type:{type:"string",const:"chartText",description:"A unique string identifier for the `ChartText` object. This value is `chartText`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},content:{$ref:"#/definitions/WebChartTextSymbol",description:"Contains the styling information and text content."}},required:["type","content"],description:"Stores information on how some text is rendered on the chart and whether it is visible or not.",title:"WebChartText"},WebChartCursorCrosshair:{type:"object",properties:{type:{type:"string",const:"cursorCrosshair",description:"Represents a unique string identifier for the chart cursor's crosshair."},style:{$ref:"#/definitions/ISimpleLineSymbol",description:"Contains styling information on how the chart cursor's crosshair should be rendered."},verticalLineVisible:{type:"boolean",description:"Indicates whether the vertical crosshair line should be displayed.",default:!1},horizontalLineVisible:{type:"boolean",description:"Indicates whether the horizontal crosshair line should be displayed.",default:!1}},required:["type"],description:"JSON representation of the cursor's crosshair for a chart.",title:"WebChartCursorCrosshair"},ISimpleLineSymbol:{type:"object",properties:{type:{type:"string",const:"esriSLS"},style:{$ref:"#/definitions/SimpleLineSymbolStyle"},color:{$ref:"#/definitions/Color"},width:{type:"number"}},required:["type"],title:"ISimpleLineSymbol"},ISymbol:{type:"object",properties:{type:{$ref:"#/definitions/SymbolType"},style:{type:"string"}},required:["type"],title:"ISymbol"},SymbolType:{type:"string",enum:["esriPFS","esriPMS","esriSFS","esriSLS","esriSMS","esriTS"],deprecated:"since 5.1. Won't be replaced.",title:"SymbolType"},SimpleLineSymbolStyle:{type:"string",enum:["esriSLSDash","esriSLSDashDot","esriSLSDashDotDot","esriSLSDot","esriSLSNull","esriSLSSolid"],title:"SimpleLineSymbolStyle"},WebChartLegend:{type:"object",properties:{type:{type:"string",const:"chartLegend",description:"A unique string identifier for the `ChartLegend` object. This value is `chartLegend`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},title:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the title of the legend box should be rendered."},body:{$ref:"#/definitions/WebChartTextSymbol",description:"Contains styling information on how legend body (excluding the `title`) should be rendered. Will use default styling if not provided."},position:{$ref:"#/definitions/WebChartLegendPositions",description:'Positions the legends at `"right"`, `"left"`, `"top"`, or `"bottom"` of the chart.',default:"`right`"},maxHeight:{type:["number","null"],description:"Legend's maximum height. If not set the legend will occupy the same height as the series container.",default:null},roundMarkers:{type:"boolean",description:"Allows the legend markers to be displayed as circles.\n- `false` or `undefined`: rounded rectangles\n- `true`: circles",default:!1}},required:["type"],description:"JSON representation of the chart's legend.",title:"WebChartLegend"},WebChartLegendPositions:{type:"string",enum:["left","right","top","bottom"],title:"WebChartLegendPositions"},WebChartNullCategory:{type:"object",properties:{text:{type:"string",description:"Specifies the text to use for the null category. If none is provided, the default `null` text will be used."},symbol:{$ref:"#/definitions/ISimpleFillSymbol",description:"Contains styling information on how the overlay should be rendered. If not provided a default style is applied.",default:"1 - symbol.outline.width"}},title:"WebChartNullCategory"},ISimpleFillSymbol:{type:"object",properties:{type:{type:"string",const:"esriSFS"},style:{$ref:"#/definitions/SimpleFillSymbolStyle"},color:{$ref:"#/definitions/Color"},outline:{$ref:"#/definitions/ISimpleLineSymbol"}},required:["type"],title:"ISimpleFillSymbol"},SimpleFillSymbolStyle:{type:"string",enum:["esriSFSBackwardDiagonal","esriSFSCross","esriSFSDiagonalCross","esriSFSForwardDiagonal","esriSFSHorizontal","esriSFSNull","esriSFSSolid","esriSFSVertical"],title:"SimpleFillSymbolStyle"},WebChartPieChartLegend:{type:"object",properties:{type:{type:"string",const:"chartLegend",description:"A unique string identifier for the `ChartLegend` object. This value is `chartLegend`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},title:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the title of the legend box should be rendered."},body:{$ref:"#/definitions/WebChartTextSymbol",description:"Contains styling information on how legend body (excluding the `title`) should be rendered. Will use default styling if not provided."},position:{$ref:"#/definitions/WebChartLegendPositions",description:'Positions the legends at `"right"`, `"left"`, `"top"`, or `"bottom"` of the chart.',default:"`right`"},maxHeight:{type:["number","null"],description:"Legend's maximum height. If not set the legend will occupy the same height as the series container.",default:null},roundMarkers:{type:"boolean",description:"Allows the legend markers to be displayed as circles.\n- `false` or `undefined`: rounded rectangles\n- `true`: circles",default:!1},displayCategory:{type:"boolean",description:"Indicates whether the category associated to a slice is to be displayed in the legend.",default:!0},displayNumericValue:{type:"boolean",description:"Indicates whether the numeric value associated to a slice is to be displayed in the legend. If both `displayNumericValue` and `displayPercentage` are true on a same label, they will be displayed as `percentage (value)`",default:!1},displayPercentage:{type:"boolean",description:"Indicates whether the percentage to a slice is to be displayed in the legend. If both `displayNumericValue` and `displayPercentage` are true on a same label, they will be displayed as `percentage (value)`",default:!1},labelMaxWidth:{type:"number",description:"Maximum width in pixels of the label displaying the slice name. If the label is larger than the maximum width, it will automatically wrap.",default:200},valueLabelMaxWidth:{type:"number",description:"Maximum width in pixels of the value label displaying the slice value. If the label is larger than the maximum width, it will automatically wrap.",default:200}},required:["type"],description:"Specific legend for pie charts",title:"WebChartPieChartLegend"},WebChartOverlay:{type:"object",properties:{type:{type:"string",const:"chartOverlay",description:"A unique string identifier for the `ChartOverlay` object. This value is `chartOverlay`."},created:{type:"boolean",description:"Determines whether the overlay is created under the hood. It may or may not be visible.",default:!1},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},symbol:{$ref:"#/definitions/ISimpleLineSymbol",description:"Contains styling information on how the overlay should be rendered. If not provided a default style is applied."}},required:["type"],description:"JSON representation of the chart's overlays such as the trendline in scatterplot, and the median overlay in histogram.",title:"WebChartOverlay"},NumberFormatOptions:{type:"object",properties:{type:{type:"string",const:"number",description:"Represents a unique string identifier for the `NumberFormatOptions` object. For the `NumberFormatOptions` object, it is `number`. It can help to differentiate numerical (value) axis from other types of axes such as date-time axis and category axis."},intlOptions:{$ref:"#/definitions/Intl.NumberFormatOptions",description:"Represents the JS native [Intl.NumberFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat), which is based on [CLDR](http://cldr.unicode.org/translation/numbers-currency/number-patterns) specifications."}},required:["type","intlOptions"],description:"Defines how the numerical(value) axis data should be formatted.",title:"NumberFormatOptions"},"Intl.NumberFormatOptions":{type:"object",properties:{localeMatcher:{type:"string",enum:["lookup","best fit"]},style:{$ref:"#/definitions/Intl.NumberFormatOptionsStyle"},currency:{type:"string"},currencyDisplay:{$ref:"#/definitions/Intl.NumberFormatOptionsCurrencyDisplay"},useGrouping:{$ref:"#/definitions/Intl.NumberFormatOptionsUseGrouping"},minimumIntegerDigits:{type:"number"},minimumFractionDigits:{type:"number"},maximumFractionDigits:{type:"number"},minimumSignificantDigits:{type:"number"},maximumSignificantDigits:{type:"number"}},title:"Intl.NumberFormatOptions"},"Intl.NumberFormatOptionsStyle":{title:"Intl.NumberFormatOptionsStyle"},"Intl.NumberFormatOptionsCurrencyDisplay":{title:"Intl.NumberFormatOptionsCurrencyDisplay"},"Intl.NumberFormatOptionsUseGrouping":{type:"boolean",title:"Intl.NumberFormatOptionsUseGrouping"},WebChartDateTimeUnitFormatOptions:{type:"object",properties:{year:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},month:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},day:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},hour:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},minute:{$ref:"#/definitions/Intl.DateTimeFormatOptions"},second:{$ref:"#/definitions/Intl.DateTimeFormatOptions"}},description:"Interface used by the axis `valueFormat` property to describe how to format specific date and time units when displayed on the axis.",title:"WebChartDateTimeUnitFormatOptions"},"Intl.DateTimeFormatOptions":{type:"object",properties:{localeMatcher:{type:"string",enum:["best fit","lookup"]},weekday:{type:"string",enum:["long","short","narrow"]},era:{type:"string",enum:["long","short","narrow"]},year:{type:"string",enum:["numeric","2-digit"]},month:{type:"string",enum:["numeric","2-digit","long","short","narrow"]},day:{type:"string",enum:["numeric","2-digit"]},hour:{type:"string",enum:["numeric","2-digit"]},minute:{type:"string",enum:["numeric","2-digit"]},second:{type:"string",enum:["numeric","2-digit"]},timeZoneName:{type:"string",enum:["short","long","shortOffset","longOffset","shortGeneric","longGeneric"]},formatMatcher:{type:"string",enum:["best fit","basic"]},hour12:{type:"boolean"},timeZone:{type:"string"}},title:"Intl.DateTimeFormatOptions"},DateTimeFormatOptions:{type:"object",properties:{type:{type:"string",const:"date",description:"Represents a unique string identifier for the `NumberFormatOptions` object. For the `NumberFormatOptions` object, it is `date`. It can help to differentiate date-time axis from other types of axes such as numeric (value) axis and category axis."},intlOptions:{$ref:"#/definitions/Intl.DateTimeFormatOptions",description:"Represent the JS native [Intl.DateTimeFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat), which is based on [CLDR](http://cldr.unicode.org/translation/date-time-1/date-time-patterns) specifications."},formatPerDateTimeUnit:{$ref:"#/definitions/WebChartDateTimeUnitFormatOptions",description:"Represents how to format specific date and time units when displayed on the axis, independently from the `intlOptions`."}},required:["type","intlOptions"],description:"Defines how the `DateTime` axis data should be formatted.",title:"DateTimeFormatOptions"},CategoryFormatOptions:{type:"object",properties:{type:{type:"string",const:"category",description:"Represents a unique string identifier for the `CategoryFormatOptions` object. For the `CategoryFormatOptions` object, it is `category`. It can help to differentiate category axis from other types of axes such as date-time axis and numeric (value) axis."},characterLimit:{type:["number","null"],description:"Represents a positive integer which represents the limit on the number of characters to be displayed for all the category strings. The truncated string are appended with `...`. If property is not present or `null`, no truncation is done."}},required:["type"],description:"Defines how the category axis data (categories) should be formatted.",title:"CategoryFormatOptions"},WebChartGuide:{type:"object",properties:{type:{type:"string",const:"chartGuide",description:"Represents a unique string identifier for the `Guide` object. For the `Guide` class, it is `chartGuide`."},start:{anyOf:[{type:"string",format:"date-time"},{type:"number"},{type:"string"},{type:"null"}],description:"Determines the value where the guide should begin."},end:{anyOf:[{type:"string",format:"date-time"},{type:"number"},{type:"string"},{type:"null"}],description:"Determines the value where the guide should end. If it is not specified, a line guide is used, otherwise a fill/rectangular guide is used."},style:{anyOf:[{$ref:"#/definitions/ISimpleFillSymbol"},{$ref:"#/definitions/ISimpleLineSymbol"}],description:"Determines how the guide should be rendered."},name:{type:"string",description:"A unique string identifier which is used to refer to a particular guide. It is displayed in the charts config UI to differentiate between different guides."},label:{$ref:"#/definitions/WebChartTextSymbol",description:"Defines a text label for the given guide. It is displayed on the chart next to the concerned guide and is styled using **esriTS** format."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},above:{type:"boolean",description:"Determines whether the guide should be rendered on top of (overlapping) the series or under the series.",default:!1},tooltipReverseColor:{type:"boolean",description:"Indicates whether to apply the hovered element's color to the guide's tooltip background (false) or its outline (true).",default:!1}},required:["type","start","style","name"],description:"JSON representation of the chart's guide object. Can be used to represent both line and fill guides.",title:"WebChartGuide"},WebChartAxis:{type:"object",properties:{type:{type:"string",const:"chartAxis",description:"Represents a unique string identifier for the `WebChartAxis` object. For `ChartAxis` object, it is `chartAxis`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},isLogarithmic:{type:"boolean",description:"Specifies whether the axis has a logarithmic scale or not.",default:!1},title:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the title of the axis should be rendered"},valueFormat:{anyOf:[{$ref:"#/definitions/CategoryFormatOptions"},{$ref:"#/definitions/DateTimeFormatOptions"},{$ref:"#/definitions/NumberFormatOptions"}],description:"Specifies how numerical/categorical/date-time values should be formatted."},minimum:{type:["number","null"],description:"The minimum value which the axis should represent, when it is not defined or null, then the minimum value for the corresponding axis is automatically calculated."},maximum:{type:["number","null"],description:"The maximum value which the axis should represent, when it is not defined or null, then the maximum value for the corresponding axis is automatically calculated."},grid:{$ref:"#/definitions/ISimpleLineSymbol",description:"Dictates how the grid lines associated with a particular axis should be rendered."},guides:{type:"array",items:{$ref:"#/definitions/WebChartGuide"},description:"Represent an array of guides that should be rendered onto the axis."},lineSymbol:{$ref:"#/definitions/ISimpleLineSymbol",description:"Contains styling information on how the axis line should be rendered. If not provided a default style is applied."},labels:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the axis labels should be rendered."},scrollbar:{$ref:"#/definitions/WebChartAxisScrollBar",description:"Represents the axis scrollbar style and visibility."},displayZeroLine:{type:"boolean",description:"Represents an option to hide/un-hide the zero line on value axis.",default:!1},integerOnlyValues:{type:"boolean",description:"Represents an option to show `integer-only` values for a value axis",default:!1},displayCursorTooltip:{type:"boolean",description:"Specifies whether cursor tooltip should be displayed.",default:!1},buffer:{type:"boolean",description:"Allows setting a buffer to a **value axis** to provide some space around the series.",default:!1},tickSpacing:{type:"number",description:`The desired minimum distance between two adjacent axis ticks. The actual distance may fluctuate depending on the chart's size. When not provided a default value is assigned according to the axis type and axis labels behavior.
4
5
 
5
6
  **Note**: This property is not applicable to gauge charts.`,minimum:1},dateBaseInterval:{$ref:"#/definitions/TimeIntervalInfo",description:"Specifies the base interval on a date axis. Will be ignored on the other axis types. It will be overridden by the properties from the series `binTemporalData` when provided."}},required:["type","valueFormat","labels"],description:"JSON representation of the chart's axis object",title:"WebChartAxis"},TimeIntervalInfo:{type:"object",properties:{unit:{$ref:"#/definitions/WebChartTemporalBinningUnits"},size:{type:"number"}},title:"TimeIntervalInfo"},WebChartTemporalBinningUnits:{type:"string",enum:["seconds","minutes","hours","days","weeks","months","quarters","years"],description:"The temporal binning units",title:"WebChartTemporalBinningUnits"},WebChartGaugeAxisTick:{type:"object",properties:{type:{type:"string",const:"gaugeAxisTick",description:"Represents a unique string identifier for the `GaugeAxisTick` object. For `WebChartGaugeAxisTick` object, it is `gaugeAxisTick`."},visible:{type:"boolean",description:"Determines the visibility of the axis ticks.",default:!0}},required:["type"],description:"JSON representation of the gauge axis ticks. Currently only used by `WebChartGaugeAxis`.",title:"WebChartGaugeAxisTick"},WebChartNeedle:{type:"object",properties:{type:{type:"string",const:"gaugeNeedle",description:"Represents a unique string identifier for the `ChartNeedle` object. For `WebChartNeedle` object, it is `gaugeNeedle`."},visible:{type:"boolean",description:"Hides or shows the needle.",default:!0},symbol:{$ref:"#/definitions/ISimpleFillSymbol",description:"Contains styling information on how the needle should be rendered."},startWidth:{type:["number","null"],description:"Represents the needle's thickness at the bottom (chart's center) in pixels.",minimum:1,default:10},endWidth:{type:["number","null"],description:"Represents the needle's thickness at the top in pixels.",minimum:1,default:1},innerRadius:{type:["number","null"],description:"Represents the size of the hole in the middle of the chart. Can be visualized when guides are displayed.",minimum:0,maximum:100,default:25},displayPin:{type:"boolean",description:"Hides or shows the needle's pin (centroid circle).",default:!1}},required:["type"],description:"JSON representation of a gauge needle.",title:"WebChartNeedle"},WebChartGaugeAxis:{type:"object",properties:{type:{type:"string",const:"chartAxis",description:"Represents a unique string identifier for the `WebChartAxis` object. For `ChartAxis` object, it is `chartAxis`."},visible:{type:"boolean",description:"Determines the visibility of the content.",default:!0},isLogarithmic:{type:"boolean",description:"Specifies whether the axis has a logarithmic scale or not.",default:!1},title:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the title of the axis should be rendered"},valueFormat:{anyOf:[{$ref:"#/definitions/CategoryFormatOptions"},{$ref:"#/definitions/DateTimeFormatOptions"},{$ref:"#/definitions/NumberFormatOptions"}],description:"Specifies how numerical/categorical/date-time values should be formatted."},minimum:{type:["number","null"],description:"The minimum value which the axis should represent, when it is not defined or null, then the minimum value for the corresponding axis is automatically calculated."},maximum:{type:["number","null"],description:"The maximum value which the axis should represent, when it is not defined or null, then the maximum value for the corresponding axis is automatically calculated."},grid:{$ref:"#/definitions/ISimpleLineSymbol",description:"Dictates how the grid lines associated with a particular axis should be rendered."},guides:{type:"array",items:{$ref:"#/definitions/WebChartGuide"},description:"Represent an array of guides that should be rendered onto the axis."},lineSymbol:{$ref:"#/definitions/ISimpleLineSymbol",description:"Contains styling information on how the axis line should be rendered. If not provided a default style is applied."},labels:{$ref:"#/definitions/WebChartText",description:"Contains styling information on how the axis labels should be rendered."},scrollbar:{$ref:"#/definitions/WebChartAxisScrollBar",description:"Represents the axis scrollbar style and visibility."},displayZeroLine:{type:"boolean",description:"Represents an option to hide/un-hide the zero line on value axis.",default:!1},integerOnlyValues:{type:"boolean",description:"Represents an option to show `integer-only` values for a value axis",default:!1},displayCursorTooltip:{type:"boolean",description:"Specifies whether cursor tooltip should be displayed.",default:!1},buffer:{type:"boolean",description:"Allows setting a buffer to a **value axis** to provide some space around the series.",default:!1},tickSpacing:{type:"number",description:`The desired minimum distance between two adjacent axis ticks. The actual distance may fluctuate depending on the chart's size. When not provided a default value is assigned according to the axis type and axis labels behavior.
6
7
 
@@ -96,4 +97,4 @@ If not provided the series will be displayed as they are ordered in the config.`
96
97
 
97
98
  If not provided the series will be displayed as they are ordered in the config.`}},additionalProperties:!1,title:'Pick<(structure-1066060463-57591-59334-1066060463-57516-59335-1066060463-53621-59337-1066060463-0-62390|undefined)937098756,Exclude<("series"|"data"|"orderByFields"),("data"|"orderByFields")>>'},WebChartHeatChartViewTypes:{type:"string",enum:["SingleCalendarView","SequentialCalendarViews"],description:"Represents the different types of views that can be applied to a heat chart.",title:"WebChartHeatChartViewTypes"},RGBObject:{type:"object",properties:{r:{type:"number",description:"Red component of the color, in the range [0, 255]."},g:{type:"number",description:"Green component of the color, in the range [0, 255]."},b:{type:"number",description:"Blue component of the color, in the range [0, 255]."},a:{type:"number",description:"Alpha component of the color.",default:1}},required:["r","g","b"],description:"JSON representation of the color object.",title:"RGBObject"},IRendererSymbol:{type:"object",properties:{style:{type:"string"},color:{$ref:"#/definitions/Color"},outline:{$ref:"#/definitions/ISimpleLineSymbol"},label:{type:"string"},uniqueValue:{type:"string"},type:{$ref:"#/definitions/SymbolType"}},required:["color","type"],title:"IRendererSymbol"},WebChartDataItemColor:{anyOf:[{$ref:"#/definitions/Color"},{$ref:"#/definitions/RGBArray"},{$ref:"#/definitions/RGBObject"},{type:"string"}],title:"WebChartDataItemColor"},RGBArray:{type:"array",items:{type:"number"},minItems:3,maxItems:3,title:"RGBArray"},WebChartDataItemValue:{anyOf:[{type:"string",format:"date-time"},{$ref:"#/definitions/IExtent"},{$ref:"#/definitions/IRendererSymbol"},{type:"array",items:{type:"number"}},{type:"array",items:{type:"string"}},{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}},{$ref:"#/definitions/WebChartDataItemColor"},{type:"boolean"},{type:"number"},{type:"string"},{type:"null"},{not:{}}],title:"WebChartDataItemValue"},WebChartDataItem:{$ref:"#/definitions/Record%3Cstring%2CWebChartDataItemValue%3E",description:"JSON representation of a typical data item.",title:"WebChartDataItem"},"Record<string,WebChartDataItemValue>":{type:"object",additionalProperties:{$ref:"#/definitions/WebChartDataItemValue"},title:"Record<string,WebChartDataItemValue>"},WebChartBoxPlotDataItem:{type:"object",properties:{dataItems:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}},outliers:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}},meanLines:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}}},required:["dataItems"],description:"JSON representation of the processed data for a box plot.",title:"WebChartBoxPlotDataItem"},WebChartHeatChartDataItem:{type:"object",properties:{dataItems:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}},heatChartAxesData:{$ref:"#/definitions/WebHeatChartAxesData",description:"Precomputed category data for heat chart axes."}},required:["dataItems"],description:"JSON representation of the processed data for a heat chart.",title:"WebChartHeatChartDataItem"},WebHeatChartAxesData:{type:"object",properties:{xAxisData:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}},yAxisData:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}}},required:["xAxisData","yAxisData"],description:"JSON representation of the pre-computed category data for heat chart axes.",title:"WebHeatChartAxesData"},ScatterplotTrendLineData:{type:"object",properties:{r2:{type:"number"},trendLinePoints:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"},minItems:2,maxItems:2}},description:"JSON representation of the processed data for a scatterplot trend line.",title:"ScatterplotTrendLineData"},WebChartScatterplotDataItem:{type:"object",properties:{r2:{type:"number"},trendLinePoints:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"},minItems:2,maxItems:2},dataItems:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}},aggregated:{type:"boolean"}},required:["dataItems"],description:"JSON representation of the processed data for a scatterplot.",title:"WebChartScatterplotDataItem"},WebChartGenericDataItem:{type:"object",properties:{dataItems:{type:"array",items:{$ref:"#/definitions/WebChartDataItem"}},timeIntervalInfo:{$ref:"#/definitions/TimeIntervalInfo",description:`Time interval information.
98
99
 
99
- Only applicable to bar chart, line chart.`},serverLimitReached:{type:"boolean",description:"Indicates whether the server limit has been reached when fetching data."}},required:["dataItems"],description:"JSON representation of the generic data structure for bar chart, line chart, combo bar line chart, gauge, heat chart, pie chart and radar chart.",title:"WebChartGenericDataItem"},WebChartBin:{type:"object",properties:{count:{type:"number"},minValue:{type:"number",description:"Minimum value in the bin."},maxValue:{type:"number",description:"Maximum value in the bin."},symbol:{$ref:"#/definitions/WebChartDataItem",description:"Symbol associated with the bin."},isLastBin:{type:"boolean",description:"Whether this is the last bin."}},required:["count","minValue","maxValue"],description:"JSON representation of a histogram bin.",title:"WebChartBin"},WebChartHistogramDataItem:{type:"object",properties:{mean:{type:"number"},median:{type:"number"},stddev:{type:"number"},max:{type:"number"},min:{type:"number"},sum:{type:"number",description:"Sum of the values of all the points."},count:{type:"number",description:"Number of all the points/features in un-binned data (including only non-null entries)."},nulls:{type:"number",description:"Number of null entries in the pool of points."},bins:{type:"array",items:{$ref:"#/definitions/WebChartBin"}}},required:["mean","median","stddev","max","min","bins"],description:"JSON representation of the processed data for a histogram.",title:"WebChartHistogramDataItem"},WebChartDataTypes:{anyOf:[{$ref:"#/definitions/WebChartBoxPlotDataItem"},{$ref:"#/definitions/WebChartGenericDataItem"},{$ref:"#/definitions/WebChartHeatChartDataItem"},{$ref:"#/definitions/WebChartHistogramDataItem"},{$ref:"#/definitions/WebChartScatterplotDataItem"}],title:"WebChartDataTypes"},WebChartTypes:{type:"string",enum:["chart","chartText","chartOverlay","chartOverlays","chartLegend","cursorCrosshair","chartAxis","gaugeAxisTick","gaugeNeedle","category","number","date","chartGuide","scatterSeries","pieSeries","pieTick","gaugeSeries","lineSeries","barSeries","histogramSeries","boxPlotSeries","radarSeries","comboLineAndBarSeries","heatSeries","buffer","sizeScale","calendarDateParts"],title:"WebChartTypes"},WebChartStatisticType:{type:"string",enum:["count","sum","min","max","avg","stddev","var","percentile-continuous","percentile-discrete","envelope-aggregate","centroid-aggregate","convex-hull-aggregate","no_aggregation"],title:"WebChartStatisticType"},WebChartColoringPatterns:{type:"string",enum:["singleColor","colorMatch"],title:"WebChartColoringPatterns"},WebChartBoxPlotMultipleSeriesKinds:{type:"string",enum:["sideBySide","meanLines"],title:"WebChartBoxPlotMultipleSeriesKinds"},WebChartLineSmoothedKinds:{type:"string",enum:["bezier","monotoneX","monotoneY"],description:"Represents the different types of smoothing that can be applied to a line chart when the `lineSmoothed` property is set to `true`.",title:"WebChartLineSmoothedKinds"},WebChartCalendarBinningOffsetUnits:{type:"string",enum:["seconds","minutes","hours","days"],description:"The temporal binning units for the calendar based binning offset",title:"WebChartCalendarBinningOffsetUnits"},WebChartVersionStatus:{type:"string",enum:["same","newer","older","unrecognized"],title:"WebChartVersionStatus"},WebChartAxisTypes:{type:"string",enum:["value","date","category"],description:"Represents the different types of axes that can be used in a chart.",title:"WebChartAxisTypes"},WebChartOrderDataByTypes:{type:"string",enum:["arcgis-charts-y-value","arcgis-charts-mean","arcgis-charts-median","arcgis-charts-category","arcgis-charts-multi-axes"],description:"The types of order assocated with chart data.",title:"WebChartOrderDataByTypes"},RESTFieldType:{type:"string",enum:["esriFieldTypeBlob","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset","esriFieldTypeDouble","esriFieldTypeGeometry","esriFieldTypeGlobalID","esriFieldTypeGUID","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeOID","esriFieldTypeRaster","esriFieldTypeSingle","esriFieldTypeString","esriFieldTypeXML"],title:"RESTFieldType"},RESTSimpleLineSymbolStyle:{type:"string",enum:["esriSLSDash","esriSLSDashDot","esriSLSDashDotDot","esriSLSDot","esriSLSNull","esriSLSSolid"],title:"RESTSimpleLineSymbolStyle"},RESTSimpleMarkerSymbolStyle:{type:"string",enum:["esriSMSCircle","esriSMSCross","esriSMSDiamond","esriSMSSquare","esriSMSX","esriSMSTriangle"],title:"RESTSimpleMarkerSymbolStyle"},RESTSimpleFillSymbolStyle:{type:"string",enum:["esriSFSBackwardDiagonal","esriSFSCross","esriSFSDiagonalCross","esriSFSForwardDiagonal","esriSFSHorizontal","esriSFSNull","esriSFSSolid","esriSFSVertical"],title:"RESTSimpleFillSymbolStyle"},RESTHorizontalAlignment:{type:"string",enum:["left","right","center","justify"],deprecated:"since 5.1. Won't be replaced.",title:"RESTHorizontalAlignment"},RESTVerticalAlignment:{type:"string",enum:["baseline","top","middle","bottom"],deprecated:"since 5.1. Won't be replaced.",title:"RESTVerticalAlignment"},RESTFontStyle:{type:"string",enum:["italic","normal","oblique"],deprecated:"since 5.1. Won't be replaced.",title:"RESTFontStyle"},RESTFontWeight:{type:"string",enum:["bold","bolder","lighter","normal"],deprecated:"since 5.1. Won't be replaced.",title:"RESTFontWeight"},RESTFontDecoration:{type:"string",enum:["line-through","underline","none"],deprecated:"since 5.1. Won't be replaced.",title:"RESTFontDecoration"},RESTRendererType:{type:"string",enum:["unique-value","simple","class-breaks","heatmap","dot-density","dictionary","pie-chart"],title:"RESTRendererType"},RESTSymbolType:{type:"string",enum:["esriSLS","esriSMS","esriSFS","esriPMS","esriPFS","esriTS"],title:"RESTSymbolType"},OverlayTerms:{type:"string",enum:["Mean","Median","Standard Deviation","Normal Distribution","Trendline"],title:"OverlayTerms"},CalculatedMinMaxBoundsPayload:{type:"object",properties:{isXAxis:{type:"boolean"},isSecondValueAxis:{type:"boolean"},minimum:{type:["number","null"],description:"The minimum value which the axis should represent, when it is not defined or null, then the minimum value for the corresponding axis is automatically calculated."},maximum:{type:["number","null"],description:"The maximum value which the axis should represent, when it is not defined or null, then the maximum value for the corresponding axis is automatically calculated."}},required:["isXAxis"],description:"Represents a subset of the event payload carrying the chart's axes bounds.",title:"CalculatedMinMaxBoundsPayload"},ChartDeletePayload:{type:"object",properties:{chartId:{type:"string"}},required:["chartId"],description:"Represents the payload of the event sent when a chart is removed from the chart list.",title:"ChartDeletePayload"},LegendItemVisibility:{type:"object",properties:{visible:{type:"boolean"},seriesId:{type:"string"},overlayType:{$ref:"#/definitions/OverlayTerms"},sliceId:{type:"string"},sliceData:{$ref:"#/definitions/WebChartDataItem"}},required:["visible"],description:"Represents the payload of the event sent when an item is toggled in the chart's legend (slice or series).",title:"LegendItemVisibility"},IFeatureSet:{type:"object",properties:{hasZ:{type:"boolean"},hasM:{type:"boolean"},objectIdFieldName:{type:"string"},globalIdFieldName:{type:"string"},displayFieldName:{type:"string"},geometryType:{$ref:"#/definitions/GeometryType",description:"For feature layers only."},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"For feature layers only."},fields:{type:"array",items:{$ref:"#/definitions/IField"}},features:{type:"array",items:{$ref:"#/definitions/IFeature"}},fieldAliases:{$ref:"#/definitions/Record%3Cstring%2Cstring%3E"}},required:["features"],description:'`IFeatureSet` can also be imported from the following packages:\n\n```js import { IFeatureSet } from "@esri/arcgis-rest-feature-layer"; ```',title:"IFeatureSet"},"Record<string,string>":{type:"object",additionalProperties:{type:"string"},title:"Record<string,string>"},ILocation:{type:"object",properties:{latitude:{type:"number"},longitude:{type:"number"},lat:{type:"number"},long:{type:"number"},z:{type:"number"}},deprecated:"since 5.1. Won't be replaced.",title:"ILocation"},IPolylineWithCurves:{type:"object",properties:{spatialReference:{$ref:"#/definitions/ISpatialReference"},hasZ:{type:"boolean"},hasM:{type:"boolean"},curvePaths:{type:"array",items:{type:"array",items:{anyOf:[{$ref:"#/definitions/JsonCurve"},{$ref:"#/definitions/Position"}]}}}},required:["curvePaths"],deprecated:"since 5.1. Won't be replaced.",title:"IPolylineWithCurves"},ElipticArc:{$ref:"#/definitions/IArc",deprecated:"since 5.1. Won't be replaced.",title:"ElipticArc"},SpatialRelationship:{type:"string",enum:["esriSpatialRelContains","esriSpatialRelCrosses","esriSpatialRelEnvelopeIntersects","esriSpatialRelIndexIntersects","esriSpatialRelIntersects","esriSpatialRelOverlaps","esriSpatialRelTouches","esriSpatialRelWithin"],description:'The spatial relationship used to compare input geometries\n\n`SpatialRelationship` can also be imported from the following packages:\n\n```js import { SpatialRelationship } from "@esri/arcgis-rest-feature-layer"; ```',deprecated:"since 5.1. Won't be replaced.",title:"SpatialRelationship"},IMultipoint:{type:"object",properties:{spatialReference:{$ref:"#/definitions/ISpatialReference"},hasZ:{type:"boolean"},hasM:{type:"boolean"},points:{type:"array",items:{$ref:"#/definitions/Position"}}},required:["points"],deprecated:"since 5.1. Won't be replaced.",title:"IMultipoint"},Units:{type:"string",enum:["esriSRUnit_Foot","esriSRUnit_Kilometer","esriSRUnit_Meter","esriSRUnit_NauticalMile","esriSRUnit_StatuteMile","esriSRUnit_USNauticalMile"],description:'`Units` can also be imported from the following packages:\n\n```js import { Units } from "@esri/arcgis-rest-feature-layer"; ```',deprecated:"since 5.1. Won't be replaced.",title:"Units"},GroupMembership:{type:"string",enum:["admin","member","none","owner"],description:'`GroupMembership` can also be imported from the following packages:\n\n```js import { GroupMembership } from "@esri/arcgis-rest-portal"; ```',deprecated:"since 5.1. Won't be replaced.",title:"GroupMembership"},IGroupAdd:{type:"object",properties:{title:{type:"string"},access:{type:"string",enum:["org","private","public"]},owner:{type:"string"},tags:{type:"array",items:{type:"string"}},description:{type:"string"},phone:{type:"string"},sortField:{type:"string",enum:["avgrating","created","modified","numviews","owner","title"]},sortOrder:{type:"string",enum:["asc","desc"]},isViewOnly:{type:"boolean"},isInvitationOnly:{type:"boolean"},thumbnail:{type:"string"},autoJoin:{type:"boolean"},snippet:{type:"string"}},required:["title","access"],deprecated:"since 5.1. Won't be replaced.",title:"IGroupAdd"},IGroup:{type:"object",properties:{title:{type:"string"},access:{type:"string",enum:["org","private","public"]},owner:{type:"string"},tags:{type:"array",items:{type:"string"}},description:{type:"string"},phone:{type:"string"},sortField:{type:"string",enum:["avgrating","created","modified","numviews","owner","title"]},sortOrder:{type:"string",enum:["asc","desc"]},isViewOnly:{type:"boolean"},isInvitationOnly:{type:"boolean"},thumbnail:{type:"string"},autoJoin:{type:"boolean"},snippet:{type:"string"},id:{type:"string"},created:{type:"number"},modified:{type:"number"},protected:{type:"boolean"},isOpenData:{type:"boolean"},isFav:{type:"boolean"},userMembership:{type:"object",properties:{username:{type:"string"},memberType:{$ref:"#/definitions/GroupMembership"},applications:{type:"number"}}},hasCategorySchema:{type:"boolean"}},required:["access","autoJoin","created","id","isFav","isInvitationOnly","isViewOnly","modified","owner","protected","tags","title"],deprecated:"since 5.1. Won't be replaced.",title:"IGroup"},IItemAdd:{type:"object",properties:{title:{type:"string"},type:{type:"string"},owner:{type:"string"},typeKeywords:{type:"array",items:{type:"string"}},description:{type:"string"},snippet:{type:"string"},documentation:{type:"string"},extent:{type:"array",items:{type:"array",items:{type:"number"}}},categories:{type:"array",items:{type:"string"}},spatialReference:{$ref:"#/definitions/ISpatialReference"},culture:{type:"string"},properties:{},url:{type:"string"},tags:{type:"array",items:{type:"string"}}},required:["title","type"],deprecated:"since 5.1. Won't be replaced.",title:"IItemAdd"},IItemUpdate:{type:"object",properties:{id:{type:"string"}},required:["id"],deprecated:"since 5.1. Won't be replaced.",title:"IItemUpdate"},IItem:{type:"object",properties:{title:{type:"string"},type:{type:"string"},owner:{type:"string"},typeKeywords:{type:"array",items:{type:"string"}},description:{type:"string"},snippet:{type:"string"},documentation:{type:"string"},extent:{type:"array",items:{type:"array",items:{type:"number"}}},categories:{type:"array",items:{type:"string"}},spatialReference:{$ref:"#/definitions/ISpatialReference"},culture:{type:"string"},properties:{},url:{type:"string"},tags:{type:"array",items:{type:"string"}},id:{type:"string"},created:{type:"number"},modified:{type:"number"},numViews:{type:"number"},size:{type:"number"},protected:{type:"boolean"}},required:["created","id","modified","numViews","owner","size","tags","title","type"],deprecated:"since 5.1. Won't be replaced.",title:"IItem"},IFolder:{type:"object",properties:{username:{type:"string"},id:{type:"string"},title:{type:"string"},created:{type:"number"}},required:["username","id","title"],deprecated:"since 5.1. Won't be replaced.",title:"IFolder"},IFeatureServiceDefinition:{type:"object",properties:{currentVersion:{type:"number"},serviceDescription:{type:"string"},hasVersionedData:{type:"boolean"},supportsDisconnectedEditing:{type:"boolean"},supportsReturnDeleteResults:{type:"boolean"},hasStaticData:{type:"boolean",description:"Boolean value indicating whether data changes. True if it does not."},maxRecordCount:{type:"number",description:"Numeric value indicating tbe maximum number of records that will be returned at once for a query."},supportedQueryFormats:{type:"string",description:"String value indicating the output formats that are supported in a query."},supportsRelationshipsResource:{type:"boolean"},capabilities:{type:"string",description:"A comma separated list of supported capabilities, e.g. Query,Editing."},description:{type:"string",description:"String value of the layer as defined in the map service."},copyrightText:{type:"string",description:"String value for the copyright text information for the layer."},advancedEditingCapabilities:{$ref:"#/definitions/Record%3Cstring%2Cboolean%3E"},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"An object containing the WKID or WKT identifying the spatial reference of the layer's geometry."},initialExtent:{$ref:"#/definitions/IExtent"},fullExtent:{$ref:"#/definitions/IExtent"},allowGeometryUpdates:{type:"boolean",description:"Boolean value indicating whether the geometry of the features in the layer can be edited."},units:{type:"string"},syncEnabled:{type:"boolean"},returnServiceEditsHaveSR:{type:"boolean"},validationSystemLayers:{type:"object",properties:{validationPointErrorlayerId:{type:"number"},validationLineErrorlayerId:{type:"number"},validationPolygonErrorlayerId:{type:"number"},validationObjectErrortableId:{type:"number"}},required:["validationPointErrorlayerId","validationLineErrorlayerId","validationPolygonErrorlayerId","validationObjectErrortableId"]},extractChangesCapabilities:{type:"object",properties:{supportsReturnIdsOnly:{type:"boolean"},supportsReturnExtentOnly:{type:"boolean"},supportsReturnAttachments:{type:"boolean"},supportsLayerQueries:{type:"boolean"},supportsSpatialFilter:{type:"boolean"},supportsReturnFeature:{type:"boolean"}},required:["supportsReturnIdsOnly","supportsReturnExtentOnly","supportsReturnAttachments","supportsLayerQueries","supportsSpatialFilter","supportsReturnFeature"]},syncCapabilities:{type:"object",properties:{supportsASync:{type:"boolean"},supportsRegisteringExistingData:{type:"boolean"},supportsSyncDirectionControl:{type:"boolean"},supportsPerLayerSync:{type:"boolean"},supportsPerReplicaSync:{type:"boolean"},supportsRollbackOnFailure:{type:"boolean"},supportedSyncDataOptions:{type:"number"}},required:["supportsASync","supportsRegisteringExistingData","supportsSyncDirectionControl","supportsPerLayerSync","supportsPerReplicaSync","supportsRollbackOnFailure","supportedSyncDataOptions"]},editorTrackingInfo:{type:"object",properties:{enableEditorTracking:{type:"boolean"},enableOwnershipAccessControl:{type:"boolean"},allowOthersToUpdate:{type:"boolean"},allowOthersToDelete:{type:"boolean"}},required:["enableEditorTracking","enableOwnershipAccessControl","allowOthersToUpdate","allowOthersToDelete"]},documentInfo:{$ref:"#/definitions/Record%3Cstring%2Cstring%3E"},layers:{type:"array",items:{$ref:"#/definitions/ILayerDefinition"}},tables:{type:"array",items:{$ref:"#/definitions/ITable"}},relationships:{type:"array",items:{type:"object",properties:{id:{type:"number"},name:{type:"string"},backwardPathLabel:{type:"string"},originLayerId:{type:"number"},originPrimaryKey:{type:"string"},forwardPathLabel:{type:"string"},destinationLayerId:{type:"number"},originForeignKey:{type:"string"},relationshipTableId:{type:"number"},destinationPrimaryKey:{type:"string"},destinationForeignKey:{type:"string"},rules:{type:"array",items:{type:"object",properties:{ruleID:{type:"number"},originSubtypeCode:{type:"number"},originMinimumCardinality:{type:"number"},originMaximumCardinality:{type:"number"},destinationSubtypeCode:{type:"number"},destinationMinimumCardinality:{type:"number"},destinationMaximumCardinality:{type:"number"}},required:["ruleID","originSubtypeCode","originMinimumCardinality","originMaximumCardinality","destinationSubtypeCode","destinationMinimumCardinality","destinationMaximumCardinality"]},minItems:1,maxItems:1},cardinality:{type:"string",enum:["esriRelCardinalityManyToMany","esriRelCardinalityOneToMany","esriRelCardinalityOneToOne"]},attributed:{type:"boolean"},composite:{type:"boolean"}},required:["id","name","backwardPathLabel","originLayerId","originPrimaryKey","forwardPathLabel","destinationLayerId","originForeignKey","relationshipTableId","destinationPrimaryKey","destinationForeignKey","rules","cardinality","attributed","composite"]},minItems:1,maxItems:1},enableZDefaults:{type:"boolean"},isLocationTrackingService:{type:"boolean"},isLocationTrackingView:{type:"boolean"},zDefault:{type:"number"}},required:["serviceDescription","hasVersionedData","supportsDisconnectedEditing","supportsReturnDeleteResults","maxRecordCount","supportedQueryFormats","supportsRelationshipsResource","capabilities","description","copyrightText","advancedEditingCapabilities","spatialReference","initialExtent","fullExtent","allowGeometryUpdates","units","syncEnabled","validationSystemLayers","extractChangesCapabilities","syncCapabilities","editorTrackingInfo","layers","tables","relationships","isLocationTrackingService","isLocationTrackingView"],deprecated:"since 5.1. Won't be replaced.",title:"IFeatureServiceDefinition"},"Record<string,boolean>":{type:"object",additionalProperties:{type:"boolean"},title:"Record<string,boolean>"},ITable:{type:"object",properties:{name:{type:"string",description:"Table name"},capabilities:{type:"string",description:"A comma-separated string listing which editing operations are allowed on an editable feature service. Available operations include: 'Create', 'Delete', 'Query', 'Update', and 'Editing'."},definitionEditor:{$ref:"#/definitions/IDefinitionEditor",description:"Object indicating the definitionEditor used as a layer's interactive filter."},id:{type:"number",description:"Unique identifier for the table."},itemId:{type:"string",description:"Unique string value indicating an item registered in ArcGIS Online or your organization's portal."},layerDefinition:{$ref:"#/definitions/ILayerDefinition",description:"A layerDefinition object defining a definition expression for the table."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"An object defining the content of popup windows when you query a record and the sort option for child related records."},title:{type:"string",description:"String value for the title of the table."},url:{type:"string",description:"String value indicating the URL reference of the hosted table."}},deprecated:"since 5.1. Won't be replaced.",title:"ITable"},IServiceInfo:{type:"object",properties:{adminServiceInfo:{type:"object",properties:{name:{type:"string"},type:{type:"string"},status:{type:"string"},database:{type:"object",properties:{datasource:{type:"object",properties:{name:{type:"string"}},required:["name"]}},required:["datasource"]}},required:["name","type","status","database"]},layers:{type:"array",items:{$ref:"#/definitions/Record%3Cstring%2Cunknown%3E"}}},required:["adminServiceInfo","layers"],deprecated:"since 5.1. Won't be replaced.",title:"IServiceInfo"},"Record<string,unknown>":{type:"object",additionalProperties:{},title:"Record<string,unknown>"},IViewServiceSource:{type:"object",properties:{name:{type:"string"},type:{type:"string"},url:{type:"string"},serviceItemId:{type:"string"}},required:["name","type","url","serviceItemId"],deprecated:"since 5.1. Won't be replaced.",title:"IViewServiceSource"},IViewServiceSources:{type:"object",properties:{currentVersion:{type:"number"},services:{type:"array",items:{$ref:"#/definitions/IViewServiceSource"}}},required:["currentVersion","services"],deprecated:"since 5.1. Won't be replaced.",title:"IViewServiceSources"},IServiceNameAvailable:{type:"object",properties:{available:{type:"boolean"}},required:["available"],deprecated:"since 5.1. Won't be replaced.",title:"IServiceNameAvailable"},IPictureSourced:{type:"object",properties:{url:{type:"string"},imageData:{type:"string"},contentType:{type:"string"},width:{type:"number"},height:{type:"number"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"}},deprecated:"since 5.1. Won't be replaced.",title:"IPictureSourced"},IPictureFillSymbol:{type:"object",properties:{url:{type:"string"},imageData:{type:"string"},contentType:{type:"string"},width:{type:"number"},height:{type:"number"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"},type:{type:"string",const:"esriPFS"},style:{type:"string"},outline:{$ref:"#/definitions/ISimpleLineSymbol"},xscale:{type:"number"},yscale:{type:"number"}},required:["type"],deprecated:"since 5.1. Won't be replaced.",title:"IPictureFillSymbol"},IPictureMarkerSymbol:{type:"object",properties:{url:{type:"string"},imageData:{type:"string"},contentType:{type:"string"},width:{type:"number"},height:{type:"number"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"},type:{type:"string",const:"esriPMS"},style:{type:"string"}},required:["type"],deprecated:"since 5.1. Won't be replaced.",title:"IPictureMarkerSymbol"},ITextSymbol:{type:"object",properties:{type:{type:"string",const:"esriTS"},style:{type:"string"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"},color:{$ref:"#/definitions/Color"},backgroundColor:{$ref:"#/definitions/Color"},borderLineSize:{type:"number"},borderLineColor:{$ref:"#/definitions/Color"},haloSize:{type:"number"},haloColor:{$ref:"#/definitions/Color"},verticalAlignment:{type:"string",enum:["baseline","bottom","middle","top"]},horizontalAlignment:{type:"string",enum:["center","justify","left","right"]},rightToLeft:{type:"boolean"},kerning:{type:"boolean"},font:{$ref:"#/definitions/IFont"},text:{type:"string",description:"Only applicable when specified as a client-side graphic."}},required:["type"],title:"ITextSymbol"},IUser:{type:"object",properties:{username:{type:"string"},fullName:{type:"string"},availableCredits:{type:"number"},assignedCredits:{type:"number"},firstName:{type:"string"},lastName:{type:"string"},preferredView:{},description:{type:"string"},email:{type:"string"},idpUsername:{type:"string"},favGroupId:{type:"string"},lastLogin:{type:"number"},mfaEnabled:{type:"boolean"},access:{type:"string"},storageUsage:{type:"number"},storageQuota:{type:"number"},orgId:{type:"string"},cOrgId:{type:"string"},role:{type:"string",enum:["org_admin","org_publisher","org_user"]},privileges:{type:"array",items:{type:"string"}},roleId:{type:"string"},level:{type:"string"},disabled:{type:"boolean"},units:{type:"string"},tags:{type:"array",items:{type:"string"}},culture:{type:"string"},region:{type:"string"},thumbnail:{type:"string"},created:{type:"number"},modified:{type:"number"},groups:{type:"array",items:{$ref:"#/definitions/IGroup"}},provider:{type:"string",enum:["arcgis","enterprise","facebook","google"]}},deprecated:"since 5.1. Won't be replaced.",title:"IUser"},IPagingParams:{type:"object",properties:{start:{type:"number"},num:{type:"number"}},deprecated:"since 5.1. Won't be replaced.",title:"IPagingParams"},IPagedResponse:{type:"object",properties:{start:{type:"number"},num:{type:"number"},total:{type:"number",description:"total number of object across all pages"},nextStart:{type:"number",description:"next entry index or -1 for the last page"}},required:["total","nextStart"],deprecated:"since 5.1. Won't be replaced.",title:"IPagedResponse"},IWebMapBackground:{type:"object",properties:{color:{$ref:"#/definitions/Color",description:"To define the color of the background of the map (which is shown when no data is shown)."}},required:["color"],deprecated:"since 5.1. Won't be replaced.",title:"IWebMapBackground"},IBookmark:{type:"object",properties:{extent:{$ref:"#/definitions/IExtent",description:"An extent object containing a spatial reference, a lower left coordinate, and an upper right coordinate defining the rectangular area of the bookmark. The spatial reference must be the same as the map spatial reference. Documentation for the envelope is in the Geometry Objects topic of the ArcGIS REST API help."},name:{type:"string",description:"A string name for the bookmark."}},required:["extent","name"],deprecated:"since 5.1. Won't be replaced.",title:"IBookmark"},IMapRangeInfo:{type:"object",properties:{activeRangeName:{type:"string",description:"Active range ID that slider/picker acts upon."},currentRangeExtent:{type:"array",items:{type:"number"},description:"Current range for the active range."},fullRangeExtent:{type:"array",items:{type:"number"},description:"Full range extent for the active range to be presented in the UI."}},deprecated:"since 5.1. Won't be replaced.",title:"IMapRangeInfo"},IMapLocation:{type:"object",properties:{centerPoint:{$ref:"#/definitions/IPoint",description:"The center of the map specified using X/Y coordinates."},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"Well-known ID (WKID) or well-known text (WKT)."}},required:["centerPoint","spatialReference"],deprecated:"since 5.1. Won't be replaced.",title:"IMapLocation"},IVisibleLayer:{type:"object",properties:{featureVisibility:{type:"array",items:{type:"array",items:{}},description:"An array of arrays."},id:{type:"number",description:"The id of the layer as listed on the operational layer."},subLayerIds:{type:"array",items:{type:"number"},description:"An array of integers."}},deprecated:"since 5.1. Won't be replaced.",title:"IVisibleLayer"},IVisiblePopup:{type:"object",properties:{anchorPoint:{$ref:"#/definitions/IPoint",description:"Object with spatialReference, x, and y."},featureId:{type:"number",description:"An integer specifying the feature's id."},layerId:{type:"string",description:"A string specifying the layer id."},subLayerId:{type:"number",description:"An integer specifying the sublayer id."}},deprecated:"since 5.1. Won't be replaced.",title:"IVisiblePopup"},ISlide:{type:"object",properties:{baseMap:{$ref:"#/definitions/IBaseMap",description:"Basemaps give the web map a geographic context."},extent:{$ref:"#/definitions/IExtent",description:"The standard Esri extent object with spatialReference, xmax, xmin, ymax and ymin."},hidden:{type:"boolean",description:"Indicates whether the slide should be hidden within the presentation."},mapLocation:{$ref:"#/definitions/IMapLocation",description:"An object with a centerPoint object and sometimes a resolution."},timeExtent:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"An array of two numbers. The first one indicates start time and the second one indicates end time."},title:{type:"string",description:"Title including text and formatting for each slide."},visibleLayers:{$ref:"#/definitions/IVisibleLayer",description:"An array of objects used to indicate layer visibility."},visiblePopup:{$ref:"#/definitions/IVisiblePopup",description:"A presentation slide's visiblePopup which contains anchorPoint, featureId, layerId, and subLayerId."}},deprecated:"since 5.1. Won't be replaced.",title:"ISlide"},IBaseMap:{type:"object",properties:{baseMapLayers:{type:"array",items:{$ref:"#/definitions/ILayer"},description:"An array of baseMapLayer objects defining the basemaps used in the web map."},title:{type:"string",description:"Required string title for the basemap that can be used in a table of contents. It takes the title of the first baseMapLayer in the array."}},required:["baseMapLayers","title"],deprecated:"since 5.1. Won't be replaced.",title:"IBaseMap"},IPresentation:{type:"object",properties:{displayTimeSlider:{type:"boolean",description:"Indicates whether to display the time slider (if accessible)."},showLegend:{type:"boolean",description:"Indicates whether to display a legend on all slides."},slideAdvancementInterval:{type:"number",description:"Number of seconds to show slide before proceeding to the next slide."},slides:{type:"array",items:{$ref:"#/definitions/ISlide"},description:"Array of slide objects."},useTimeExtentOfSlide:{type:"boolean",description:"Indicates whether to use the time extent (if applicable) of a slide."}},deprecated:"since 5.1. Won't be replaced.",title:"IPresentation"},IWebmap:{type:"object",properties:{applicationProperties:{$ref:"#/definitions/IApplicationProperties",description:"Viewing and editing properties of the webmap"},authoringApp:{type:"string",description:"String value indicating the application which authored the webmap"},authoringAppVersion:{type:"string",description:"String value indicating the authoring App's version number"},background:{$ref:"#/definitions/IWebMapBackground",description:"Defines the appearance for the background of the map."},baseMap:{$ref:"#/definitions/IBaseMap",description:"[Required] Basemaps give the web map a geographic context"},bookmarks:{type:"array",items:{$ref:"#/definitions/IBookmark"},description:"A bookmark is a saved geographic extent that allows end users to quickly navigate to a particular area of interest"},mapRangeInfo:{$ref:"#/definitions/IMapRangeInfo",description:"Map Range Information"},operationalLayers:{type:"array",items:{$ref:"#/definitions/ILayer"},description:"Operational layers contain business data which are used to make thematic maps"},presentation:{description:"A presentation consists of multiple slides. Each slide has a different title, extent, basemap, layers etc"},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"[Required] An object used to specify the spatial reference of the given geometry."},tables:{type:"array",items:{$ref:"#/definitions/ITable"},description:"Root element in the web map specifying an array of table objects. (optional)"},version:{type:"string",description:"[Required] Root element in the web map specifying a string value indicating the web map version."},widgets:{description:"The widgets object contains widgets that should be exposed to the user"}},required:["baseMap","spatialReference","version"],deprecated:"since 5.1. Won't be replaced.",title:"IWebmap"},IApplicationProperties:{type:"object",properties:{editing:{anyOf:[{$ref:"#/definitions/IEditingProperties"},{type:"null"}],description:"If locationTracking is set and enabled, the Collector application will update the feature service at the defined interval with the current location of the user logged into the Collector app."},offline:{anyOf:[{$ref:"#/definitions/IOfflineInfo"},{type:"null"}],description:"Use if working with offline maps."},viewing:{anyOf:[{$ref:"#/definitions/IViewingInfo"},{type:"null"}],description:"An object containing all the viewing properties of the web map. If this is null or not defined, the client should assume a logical default."}},deprecated:"since 5.1. Won't be replaced.",title:"IApplicationProperties"},IEditingProperties:{type:"object",properties:{locationTracking:{$ref:"#/definitions/ILocationTracking",description:"If locationTracking is set and enabled, the collector app will update the feature service at the defined interval with the current location of the user logged into the collector application."}},required:["locationTracking"],deprecated:"since 5.1. Won't be replaced.",title:"IEditingProperties"},ILocationTracking:{type:"object",properties:{enabled:{type:"boolean",description:"A boolean value indicating whether or not location tracking is enabled on the webmap."},info:{$ref:"#/definitions/ILocationTrackingInfo",description:"An object of additional information specifying layer and update interval time."}},required:["enabled","info"],deprecated:"since 5.1. Won't be replaced.",title:"ILocationTracking"},ILocationTrackingInfo:{type:"object",properties:{layerId:{description:"A string value indicating the given layer id specified in the web map."},updateInterval:{description:"A numeric value indicating the time interval used to update the feature service. Default value is 300 seconds."}},required:["layerId"],deprecated:"since 5.1. Won't be replaced.",title:"ILocationTrackingInfo"},IOfflineInfo:{type:"object",properties:{editableLayers:{$ref:"#/definitions/IEditableLayers",description:"Object detailing the available offline editing options."},readonlyLayers:{$ref:"#/definitions/IReadOnlyLayers",description:"Object indicating what to do with attachments in read-only layers."}},required:["editableLayers","readonlyLayers"],deprecated:"since 5.1. Won't be replaced.",title:"IOfflineInfo"},IEditableLayers:{type:"object",properties:{download:{type:"string",enum:["featuers","featuresAndAttachments","none"],description:"When editing layers, the edits are always sent to the server. This string value indicates which data is retrieved. For example, none indicates that only the schema is written since neither the features nor attachments are retrieved. For a full sync without downloading attachments, indicate features. Lastly, the default behavior is to have a full sync using featuresAndAttachments where both features and attachments are retrieved."},sync:{type:"string",enum:["syncFeaturesAndAttachments","syncFeaturesUploadAttachments","uploadFeaturesAndAttachments"],description:"This string value indicates how the data is synced."}},required:["download","sync"],deprecated:"since 5.1. Won't be replaced.",title:"IEditableLayers"},IReadOnlyLayers:{type:"object",properties:{downloadAttachments:{type:"boolean",description:"Indicates whether to include attachments with the read-only data."}},required:["downloadAttachments"],deprecated:"since 5.1. Won't be replaced.",title:"IReadOnlyLayers"},IViewingInfo:{type:"object",properties:{basemapGallery:{$ref:"#/definitions/IEnableable",description:"The basemap tool which will use the basemap group defined in the Portal."},measure:{$ref:"#/definitions/IEnableable",description:"Measure tool."},routing:{$ref:"#/definitions/IEnableable",description:"The route tool which will leverage the Portals defined route service."},search:{$ref:"#/definitions/ISearch",description:"An object specifying search parameters within the webmap."}},deprecated:"since 5.1. Won't be replaced.",title:"IViewingInfo"},IEnableable:{type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],deprecated:"since 5.1. Won't be replaced.",title:"IEnableable"},ISearch:{type:"object",properties:{enabled:{type:"boolean"},disablePlaceFinder:{description:"A boolean value indicating whether or not to disable the place finder."},hintText:{description:"A string value used to indicate the hint provided with the search dialog."},layers:{description:"An array of layer objects defining the styling, geometry, and attribute information for the features."}},required:["enabled"],deprecated:"since 5.1. Won't be replaced.",title:"ISearch"},IRange:{type:"object",properties:{interactionMode:{type:"string",enum:["picker","slider"],description:"Indicates the mode in which the active range should be presented to the user. Must be one of the following values: slider, picker"},numberOfStops:{description:"This is used to generate the activeRangeValues if activeRangeValues are not specified."},stopInterval:{type:"number",description:"Interval in which stops should be generated."}},deprecated:"since 5.1. Won't be replaced.",title:"IRange"},IWidget:{type:"object",properties:{range:{$ref:"#/definitions/IRange",description:"Active range."},timeSlider:{$ref:"#/definitions/ITimeSliderProperties",description:"Time animation is controlled by a configurable time slider. The time slider widget will act upon all the time aware layers in the map."}},deprecated:"since 5.1. Won't be replaced.",title:"IWidget"},ITimeSliderProperties:{type:"object",properties:{currentTimeExtent:{type:"array",items:{type:"number"},description:"An optional array of numbers indicating the slider's start to end time extent."},endTime:{type:"number",description:"The optional end of the time slider. If not specified, the slider defaults to the full time extent of all time-enabled layers."},numberOfStops:{type:"number",description:"Number of stops within the timeSlider widget."},startTime:{type:"number",description:"The optional start of the time slider. If not specified, the slider defaults to the full time extent of all time-enabled layers."},thumbCount:{type:"number",description:"The default value for the thumbCount is 1."},thumbMovingRate:{type:"number",description:"Rate at which the time animation plays. Units are in milliseconds. Default is 1000."},timeStopInterval:{type:"number",description:"The interval which has been defined for the time slider."}},deprecated:"since 5.1. Won't be replaced.",title:"ITimeSliderProperties"},ITimeSlider:{type:"object",properties:{properties:{$ref:"#/definitions/ITimeSliderProperties",description:"Configurable properties used within the TimeSlider widget."}},required:["properties"],deprecated:"since 5.1. Won't be replaced.",title:"ITimeSlider"},IBingLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",enum:["BingMapsAerial","BingMapsHybrid","BingMapsRoad"],description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},bingKey:{type:"string",description:"String value that unlocks the use of Bing layers in a web map."},canShareBingPublic:{type:"boolean",description:"Boolean value indicating whether the Bing key can be shared to the public."},portalUrl:{type:"string",description:"A string value representing the URL to the Portal/organization Self resource. Calls should be made to this property to retrieve the Bing key. If the key is not made accessible to the public or if canShareBingPublic is false, any web maps using Bing layers will not work."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IBingLayer"},IImageVectorLayer:{type:"object",properties:{timeAnimation:{type:"boolean",description:"This property is applicable to layers that support time. If 'true', timeAnimation is enabled."},id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISImageServiceVectorLayer",description:"String indicating the layer type. Value of this property must be ArcGISImageServiceVectorLayer"},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},definitionEditor:{description:"Stores interactive filters."},disablePopup:{description:"Boolean property indicating whether to ignore popups defined by the service item."},isReference:{type:"boolean",description:"This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},layerDefinition:{description:"A layerDefinition object defining the attribute schema and drawing information for the layer."},mosaicRule:{description:"Specifies the mosaic rule when defining how individual images should be mosaicked."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the content of popup windows when you click or query a feature."},symbolTileSize:{description:"Number describing the size of the tile."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IImageVectorLayer"},IChildLayer:{type:"object",properties:{defaultVisibility:{description:"Default visibility of the layers in the map service."},definitionEditor:{$ref:"#/definitions/IDefinitionEditor",description:"An object that provides interactive filters."},featureSet:{$ref:"#/definitions/IFeatureSet",description:"A featureSet object containing the geometry and attributes of the features in the layer. Used with feature collections only."},field:{type:"array",items:{$ref:"#/definitions/IField"},description:"Information about each field in a layer. Used with feature collections."},id:{type:"string",description:"A string indicating the index position of the layer in the map service or feature collection."},layerDefinition:{description:"The layerDefinition object defines the attribute schema and drawing information for the layer."},layerUrl:{description:"A string URL to a service that should be used for all queries against the layer. Used with hosted tiled map services on ArcGIS Online when there is an associated feature service that allows for queries."},maxScale:{description:"Represents the maximum scale at which the layer definition will be applied."},minScale:{description:"Represents the minimum scale at which the layer definition will be applied."},nextObjectId:{description:"Iterates within a featureset. Number objectId value is incremented +1 based on last Object ID defined for the feature in a featureset. Used with feature collections."},parentLayerId:{description:"If working with nested layers, this is the numeric value indicating the layer id of the next layer (parent) directly above the current referenced layer."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the popup window content for the layer."},showLegend:{description:"Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend."},subLayer:{description:"Array of numeric values indicating the layer index for layers nested directly under the parent layer."},subLayerIds:{description:"If the layer is a parent layer, it will have one or more sub layers included in an array."},title:{description:"A user-friendly string title for the layer that can be used in a table of contents."}},title:"IChildLayer"},IMapServiceLayer:{type:"object",properties:{timeAnimation:{type:"boolean",description:"This property is applicable to layers that support time. If 'true', timeAnimation is enabled."},id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISMapServiceLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},isReference:{description:"This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},layers:{type:"array",items:{$ref:"#/definitions/IChildLayer"},description:"An array of layer objects defining the styling, geometry, and attribute information for the features."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."},thematicGroup:{$ref:"#/definitions/IThematicGroup",description:"(Optional) A thematicGroup object used in ArcGISMapServiceLayer layers."},visibleLayers:{type:"array",items:{type:"number"},description:"An array of sublayer ids that should appear visible. Used with map service layers that are not tiled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IMapServiceLayer"},IThematicGroup:{type:"object",properties:{fieldNames:{type:"array",items:{type:"string"},description:"An array of string values indicating all the fields used within the webmap. All other fields can be disregarded and should not display in any field selection list."},layerIds:{type:"array",items:{type:"number"},description:"A zero-based array of integers indicating the layers to be used in the webmap. NOTE: All other layers should not be added to the TOC and may or may not be visible on the map as reference layers."},name:{type:"string",description:"String property indicating the name for the thematic grouping of layers."}},deprecated:"since 5.1. Won't be replaced.",title:"IThematicGroup"},IDrawingInfo:{type:"object",properties:{fixedSymbols:{description:"Only used for feature collections with a renderer. The feature's symbol is defined by the layer's renderer."},labelingInfo:{description:"An object defining the properties used for labeling the layer."},renderer:{description:"An object defined which provides the symbology for the layer."},scaleSymbols:{description:"Boolean property indicating whether symbols should stay the same size in screen units as you zoom in. A value of true means the symbols stay the same size in screen units regardless of the map scale."},showLabels:{type:"boolean",description:"Defines whether labels should be shown or not. This is only valid for sublayers."},transparency:{type:"number",description:"Number value ranging between `0` (no transparency) to `100` (completely transparent)."}},description:"Drawing info container for renderer, labeling etc.",title:"IDrawingInfo"},ITypeInfoDomain:{type:"object",properties:{type:{type:"string"}},required:["type"],deprecated:"since 5.1. Won't be replaced.",title:"ITypeInfoDomain"},ITypeInfo:{type:"object",properties:{domains:{$ref:"#/definitions/Record%3Cstring%2CITypeInfoDomain%3E",description:"A comma-delimited series of domain objects for each domain in the type."},id:{type:["number","string"],description:"A unique string or numerical ID for the type."},name:{type:"string",description:"A user-friendly name for the type."},templates:{type:"array",items:{$ref:"#/definitions/ITemplate"},description:"Defined as a property of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types."}},deprecated:"since 5.1. Won't be replaced.",title:"ITypeInfo"},"Record<string,ITypeInfoDomain>":{type:"object",additionalProperties:{$ref:"#/definitions/ITypeInfoDomain"},title:"Record<string,ITypeInfoDomain>"},IOpenStreetMapLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"OpenStreetMap",description:"String indicating the layer type. Value of this property must be OpenStreetMap"},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"OpenStreetMap",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IOpenStreetMapLayer"},IExclusionArea:{type:"object",properties:{geometry:{$ref:"#/definitions/IGeometry",description:"The geometry defining the area where no data will be fetched. Only extent is supported."},maxScale:{type:"number",description:"The zoom level where the exclusion ends."},maxZoom:{type:"number",description:"The zoom level where the exclusion ends."},minScale:{type:"number",description:"The zoom level where the exclusion starts."},minZoom:{type:"number",description:"The zoom level where the exclusion starts."}},deprecated:"since 5.1. Won't be replaced.",title:"IExclusionArea"},ITiledMapServiceLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISTiledMapServiceLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},displayLevels:{anyOf:[{type:"array",items:{type:"number"}},{type:"number"}],description:"NOTE: Applicable if used as a baseMapLayer. Integer value(s) indicating the display levels of the basemap layer. Only applicable for TiledMapService layers. All tiled map service layers should share the same tiling scheme. This property cannot be set via the Map Viewer UI."},exclusionAreas:{type:"array",items:{$ref:"#/definitions/IExclusionArea"},description:"NOTE: Applicable if used as a baseMapLayer. An array of exclusionArea objects defining the layer exclusions."},isReference:{description:"This property is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},layers:{type:"array",items:{$ref:"#/definitions/IChildLayer"},description:"An array of layer objects defining a URL for queries and the popup window content."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"ITiledMapServiceLayer"},IVectorTileLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"VectorTileLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"VectorTileLayer",description:"Deprecated. User layerType instead."},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},styleUrl:{type:"string",description:"A url to a JSON file containing the stylesheet information used to render the layer. You may also pass an object containing the stylesheet information identical to the JSON file."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IVectorTileLayer"},ILod:{type:"object",properties:{level:{type:"number",description:"ID for each level."},levelValue:{type:"string",description:"String to be used when constructing URL to access a tile from this LOD."},resolution:{type:"number",description:"Resolution in map units of each pixel in a tile for each level."},scale:{type:"number",description:"Scale for each level."}},deprecated:"since 5.1. Won't be replaced.",title:"ILod"},ITileInfo:{type:"object",properties:{cols:{description:"Requested tile's column."},compressionQuality:{description:"Compression quality of the tile."},dpi:{description:"The dpi of the tiling scheme."},format:{type:"string",enum:["bmp","emf","gif","jpg","lerc","mixed","pdf","png","png8","png24","png32","ps","svg","svgz"],description:"Image format of the cached tiles."},lods:{type:"array",items:{$ref:"#/definitions/ILod"},description:"An array of levels of detail that define the tiling scheme."},origin:{$ref:"#/definitions/IPoint",description:"The tiling scheme origin."},rows:{description:"Requested tile's row."},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"The spatial reference of the tiling schema."}},deprecated:"since 5.1. Won't be replaced.",title:"ITileInfo"},IWebMapTileServiceInfo:{type:"object",properties:{customLayerParameters:{description:"A sequence of parameters used to append different custom parameters to a WMTS tile request. These parameters are applied to GetTile. The customLayerParameters property takes precedence if customParameters is also present."},customParameters:{description:"A sequence of parameters used to append custom parameters to all WMTS requests. These parameters are applied to GetCapabilities and GetTile. If used with the customLayerParameters property, customParameters will not take precedence."},layerIdentifier:{type:"string",description:"Identifier for the specific layer used in the WMTS service. Required input by the user."},tileMatrixSet:{description:"Tiling schema, set by the WMTS service."},url:{type:"string",description:"URL to the WMTS web service. Required input by the user."}},required:["layerIdentifier","url"],deprecated:"since 5.1. Won't be replaced.",title:"IWebMapTileServiceInfo"},IWebTiledLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"WebTiledLayer",description:"String indicating the layer type. Value of this property must be WebTiledLayer"},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"WebTiledLayer",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},copyright:{description:"Attribution to the Web Tiled Layer provider. It is displayed in the attribution on the web map. Input required by the user when the layer is added to the web map."},fullExtent:{$ref:"#/definitions/IExtent",description:"An extent object representing the full extent envelope for the layer."},isReference:{description:"This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},refreshInterval:{description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."},subDomains:{description:"If subdomains are detected, they must be specified. The map viewer detects if the Web Tiled Layer has subdomains by parsing the templateURL value for {subDomain}."},templateUrl:{description:"URL to the Web Tiled Layer. Input required by the user when the layer is added to the web map. The template URL contains a parameterized URL. The URL can contain the following templated parameters: 'level', 'col', 'row', and 'subDomain'."},tileInfo:{$ref:"#/definitions/ITileInfo",description:"Contains the spatial reference and the tiling scheme of the layer. Typically retrieved from a WMTS OGC Web Service. If missing the layer must be in the WGS 1984 Web Mercator (Auxiliary Sphere) tiling scheme."},wmtsInfo:{$ref:"#/definitions/IWebMapTileServiceInfo",description:"Object containing information about the chosen WMTS service layer and tiling schema."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IWebTiledLayer"},ICsvLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"CSV",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"CSV",description:"Deprecated, use layerType instead."},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},columnDelimiter:{type:"string",enum:[" ",",",";"," ","|"],description:"A string defining the character used to separate columns in a CSV file."},layerDefinition:{$ref:"#/definitions/ILayerDefinition",description:"A layerDefinition object defining the attribute schema and drawing information for the layer."},locationInfo:{description:"A locationInfo object defining how location information will be retrieved from a CSV file."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the content of popup windows when you click or query a feature."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"ICsvLayer"},IGeoRssLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"GeoRSS",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"GeoRSS",description:"Deprecated, please use layerType.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},lineSymbol:{$ref:"#/definitions/ISimpleLineSymbol",description:"Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have lines, this property is not added to the layer JSON."},pointSymbol:{$ref:"#/definitions/IPictureMarkerSymbol",description:"Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have points, this property is not added to the layer JSON."},polygonSymbol:{$ref:"#/definitions/ISimpleFillSymbol",description:"Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have polygons, this property is not added to the layer JSON."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IGeoRssLayer"},IKmlLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"KML",description:"String indicating the layer type."},maxScale:{description:"A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator."},minScale:{description:"A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator."},opacity:{description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{description:"Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend."},title:{description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"KML",description:"Deprecated, use layerType instead.",deprecated:"Use layerType instead."},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},refreshInterval:{description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."},visibleFolders:{type:"array",items:{type:"number"},description:"Array of numeric IDs of folders that will be made visible."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IKmlLayer"},IArcGisStreamLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISStreamLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},definitionEditor:{$ref:"#/definitions/IDefinitionEditor",description:"Stores interactive filters."},disablePopup:{type:"boolean",description:"Indicates whether to ignore popups defined by the service item."},layerDefinition:{$ref:"#/definitions/ILayerDefinition",description:"A layerDefinition object defining the attribute schema and drawing information for the layer."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the content of pop-up windows when you click or query a feature."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IArcGisStreamLayer"}},$ref:"#/definitions/WebChart"};function Dx(t){let e=t.lastIndexOf("/");return e!==-1?t.slice(e+1):t}async function Nx(t,e){let r=e??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;return t.map(a=>{let i=a,n=a.dataPath.startsWith(".")?a.dataPath.substring(1):a.dataPath;switch(a.keyword){case Ir.Required:i={...a,message:qe(r.errors.requiredProperty,{dataPath:n,missingProperty:a.params.missingProperty})};break;case Ir.MinLength:i={...a,message:qe(r.errors.minLength,{dataPath:n,limit:a.params.limit.toString()})};break;case Ir.MinItems:i={...a,message:qe(r.errors.minItems,{dataPath:n,limit:a.params.limit.toString()})};break;case Ir.MaxItems:i={...a,message:qe(r.errors.maxItems,{dataPath:n,limit:a.params.limit.toString()})};break;case Ir.Pattern:a.params.pattern==="\\w+"&&(i={...a,message:qe(r.errors.whiteSpacePattern,{dataPath:n}),params:{}});break;case Ir.AdditionalProperties:i={...a,message:qe(r.errors.additionalProperty,{dataPath:n,additionalProperty:a.params.additionalProperty})};break;case Ir.Enum:i={...a,message:qe(r.errors.enumValues,{dataPath:n,allowedValues:a.params.allowedValues.join(", ")})};break;case Ir.AnyOf:{let s=[];a.schemaPath==="#/properties/legend/anyOf"&&(s=xi.definitions.WebChart.properties.legend.anyOf.map(o=>Dx(o.$ref))),i={...a,params:s,message:qe(r.errors.anyOfValues,{dataPath:n,schemaOptions:s.join(", ")})};break}}return i})}function dn(t,e){return{...t,$ref:`#/definitions/${e}`}}async function Bx(t,e){let r,a=e??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings,i=se(t);try{await i.load()}catch{let n=i?.url??"",s=ut(i)?.portalItem?.id??"";r={keyword:Ye.LayerLoadFailure,message:qe(a.errors.layerLoadFailure,{url:n,portalItemId:s}),params:{url:n,portalItemId:s}}}return r}function $x(){let t=new sp.default({allErrors:!0});return async(e,r)=>{let a=[],i=K(e?.series),n=xi;switch(i){case g.GaugeSeries:n=dn(xi,"WebGaugeChart");break;case g.BoxPlotSeries:n=dn(xi,"WebBoxPlot");break;case g.RadarSeries:n=dn(xi,"WebRadarChart");break;default:n=dn(xi,"WebChart");break}let s=t.compile(n);return s(e),s.errors!==null&&s.errors!==void 0&&(a=await Nx(s.errors,r)),a}}var Mx=$x();async function qx(t){let{seriesConfigs:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}=t,n=[],s=r?wt(r):void 0,o=i??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;for(let l=0;l<e.length;l+=1){let d=e[l].query?.outStatistics;if(d!==void 0)for(let c=0;c<d.length;c+=1){let u=d[c],f=Rp(u.onStatisticField,s);if(f&&!(f.type===ue.OID&&a||Pi(f))&&u.statisticType!==W.Count){let p=`series[${l}].query.outStatistics[${c}]`;n.push({keyword:Ep.NonNumericAggregation,message:qe(o.errors.nonNumericAggregation,{dataPath:p}),dataPath:p,params:{fieldName:u.onStatisticField,fieldType:f.type,aggregationRequested:u.statisticType}})}}}return n}async function Rx(t,e){let r=[],a=e??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;if(t!==void 0&&t.series.length>1){let i=new Set,n=0;t.series.forEach((s,o)=>{if(i.add(s.id),i.size===n){let l=`series[${o}].id`;r.push({keyword:Ep.DuplicateSeriesID,message:qe(a.errors.duplicateSeriesID,{dataPath:l,seriesID:s.id,seriesName:s.name}),dataPath:l,params:{seriesId:s.id,seriesName:s.name}})}else n+=1})}return r}function kx(t){let e=new Set,r=pr(t);if(r){let a=K(t.series),i=X(t.series);a===g.GaugeSeries&&!yo(t)||i===x.PieFromFields||i===x.BarAndLineFromFields||i===x.BoxPlotMonoField||i===x.BoxPlotMultiFields||i===x.BoxPlotMonoFieldAndSplitBy||i===x.BoxPlotMultiFieldsAndSplitBy||e.add(r.x);let n=a===g.ScatterSeries||a===g.BoxPlotSeries||a===g.HeatSeries||i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation||i===x.PieNoAggregation,s=[Di,lt,ub,Wt,pb,pe.outStatistics.outStatisticFieldName??""],o=[];rt(t)?o=In({showMean:t.showMean,seriesConfig:t.series}):o=t.series.map(d=>"y"in d?d.y:void 0).filter(d=>d!==void 0).flat(),n?o.forEach(d=>e.add(d)):s.push(...o),t.series.forEach(d=>{let{query:c}=d;c&&(or(c.where)||e.add(Ze(c.where)),c.groupByFieldsForStatistics&&c.groupByFieldsForStatistics.forEach(u=>e.add(u)),c.outStatistics&&c.outStatistics.forEach(u=>e.add(u.onStatisticField)))});let l=i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation||i===x.PieNoAggregation;if(t.orderOptions?.orderByFields&&l&&t.orderOptions.orderByFields.forEach(d=>{let c=jv(d).fieldToSort;e.add(c)}),a===g.GaugeSeries&&t.axes?.[0]!==void 0){let d=t.axes?.[0];d&&"minimumFromField"in d&&typeof d.minimumFromField=="string"&&e.add(d.minimumFromField),d&&"maximumFromField"in d&&typeof d.maximumFromField=="string"&&e.add(d.maximumFromField)}s.forEach(d=>{e.delete(d)})}return Array.from(e.values()).filter(a=>!_e(a))}async function Wx(t){let{chartConfig:e,queryObject:r,errorStrings:a}=t,i,n=a??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings,s=wt(r),o=kx(e).filter(l=>!Rp(l,s));if(o.length>0){let l=o.join(", ");i={keyword:Ye.LayerFieldsNotFound,message:qe(n.errors.layerFieldsNotFound,{fieldNames:l}),params:l}}return i}async function jx(t){let{input:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}=t,n=[];if(r!==void 0){let s=await qx({seriesConfigs:e.series,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i});n=n.concat(s)}return n=n.concat(await Rx(e,i)),n}async function Vx(t){let{queryObject:e,chartConfig:r,errorStrings:a}=t,i=[];if(e!==void 0){let n=await Bx(e,a);if(n!==void 0)i=i.concat(n);else if(r!==void 0){let s=await Wx({chartConfig:r,queryObject:e,errorStrings:a});s!==void 0&&(i=i.concat(s))}}return i}async function ZF(t){let{input:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}=t,n;if(dS(e?.version).versionStatus===mr.Newer)n={valid:!0,schemaErrors:[],customErrors:[],warnings:[]};else{let s=await Mx(e,i),o=[],l=[];e!==void 0&&s.length===0&&(l=await Vx({queryObject:r,chartConfig:e,errorStrings:i}),l.length===0&&(o=await jx({input:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}))),n={valid:s.length===0&&o.length===0&&l.length===0,schemaErrors:s,customErrors:l,warnings:o}}return n}function KF(t){let e=K(t?.series),r=!1;switch(e){case g.HistogramSeries:case g.GaugeSeries:{r=(t?.series?.[0]?.x?.trim()?.length??0)===0;break}case g.ScatterSeries:{let a=t?.series;r=(a?.[0]?.x?.length??0)===0||(a?.[0]?.y?.length??0)===0;break}case g.PieSeries:{let a=t?.series;X(a)===x.PieFromFields?r=(a?.[0]?.query?.outStatistics?.length??0)===0:r=(a?.[0]?.x?.length??0)===0||a?.[0]?.x===lt;break}case g.BoxPlotSeries:{let a=t?.series;r=[a?.[0]?.y].flat().length===0||a?.[0]?.y==="";break}case g.ComboLineAndBarSeries:case g.RadarSeries:case g.BarSeries:case g.LineSeries:{let a=t?.series;X(a)===x.BarAndLineFromFields?r=(a?.[0]?.query?.outStatistics?.length??0)===0:r=(a?.[0]?.x?.trim()?.length??0)===0;break}case g.HeatSeries:{let a=t?.series,i=_e(a?.[0]?.x)||_e(a?.[0]?.y),n=t!==void 0&&Up(t)?!1:a?.[0]?.xTemporalBinning===void 0;r=i||n;break}}return r}async function Gs(t){let{queryObject:e,queryConfig:r,category:a,splitByField:i,chartLimits:n,abortKey:s}=t,o=i!==void 0,l=a!==Di?[a]:[];o&&l.push(i);let d=se(e),{idField:c,isTraditionalTypeOID:u}=_t(d),f=u?c:"*",p={...r,groupByFieldsForStatistics:Array.from(new Set(l)),outStatistics:[{statisticType:W.Count,onStatisticField:f,outStatisticFieldName:`${W.Count}_OBJECTID`}],orderByFields:void 0,num:n?.maxBarThreePlusSeriesCountTotal},h=await Dt({queryObject:e,featureCount:1,queryConfig:p,abortKey:s});return Array.from(new Set(h.map(m=>m.attributes[o?i:a]))).sort((m,y)=>typeof m=="string"&&typeof y=="string"?m.localeCompare(y):Number(m)-Number(y))}var ip=[{unit:Q.Second,threshold:6e4,unitMs:1e3,preferredIntervalSize:[1,2,3,5,6,10,12,15,20,30,60]},{unit:Q.Minute,threshold:36e5,unitMs:1e3*60,preferredIntervalSize:[1,2,3,5,6,10,12,15,20,30,60]},{unit:Q.Hour,threshold:864e5,unitMs:1e3*60*60,preferredIntervalSize:[1,2,3,4,6,8,12,24]},{unit:Q.Day,threshold:6048e5,unitMs:1e3*60*60*24,preferredIntervalSize:[1,2,3,4,5,6,7]},{unit:Q.Week,threshold:24192e5,unitMs:1e3*60*60*24*7,preferredIntervalSize:[1,2,3,4]},{unit:Q.Month,threshold:290304e5,unitMs:1e3*60*60*24*7*4,preferredIntervalSize:[1,2,3,4,6,12]},{unit:Q.Year,threshold:Number.MAX_SAFE_INTEGER,unitMs:1e3*60*60*24*7*4*12,preferredIntervalSize:[1,2,4,5,10,25,50,100]}],_x="{ groupByFieldsForStatistics } WHEN { dateField }>='{ startDate }' AND { dateField }{ endDateOperand }'{ endDate }' THEN '{ y }|{ binIndex}'",zx=[...Ln,"ar-u-nu-latn","en-AU","en-GB","es-ES","es-MX","de-CH","de-DE","de-AT","fr-CA","it-CH","it-IT"];function JF(t){let{t9nLocale:e}=mt(t??document.documentElement),r=df(t??document.documentElement),a=Eo(t??document.documentElement)==="rtl";return{locale:e,formatLocale:r,rtl:a}}function YF(t){let e;return t==="unknown"?e="UTC":t!==void 0&&t!=="system"&&(e=t),e}function XF(t,e){let r={year:"numeric",month:"2-digit",day:"2-digit",timeZone:e};return new Intl.DateTimeFormat("en-CA",r).format(t)}function eI(t,e){let r={hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:e};return new Intl.DateTimeFormat("en-US",r).format(t)}function tI(t,e){let[,r,,,,a]=1111.1.toLocaleString(e),i=t.replace(r,"").replace(a,".");return Number.parseFloat(i)}function Ux(t){let e=Array.from(Ln);return zx.includes(t)&&!e.includes(t)}function df(t){let{lang:e,t9nLocale:r}=mt(t);return Ux(e)?e:r}return{a:ie,b:dr,c:lt,d:Wt,e:ub,f:pb,g:ar,h:Ru,i:fb,j:Vt,k:P1,l:et,m:E1,n:nr,o:Zr,p:L1,q:D1,r:xb,s:Cb,t:N1,u:ne,v:pe,w:B1,x:dt,y:Ib,z:$1,A:M1,B:hn,C:Di,D:te,E:q1,F:Ob,G:R1,H:k1,I:W1,J:j1,K:V1,L:_1,M:z1,N:Lt,O:up,P:U1,Q:Sn,R:ge,S:pp,T:de,U:sa,V:Pb,W:H1,X:Qs,Y:G1,Z:Q1,_:Nr,$:sn,aa:cr,ba:Z1,ca:Eb,da:Lb,ea:Db,fa:K1,ga:Nb,ha:Bb,ia:Yr,ja:Mb,ka:Rb,la:J1,ma:kb,na:Y1,oa:X1,pa:Wb,qa:jb,ra:eT,sa:tT,ta:ea,ua:rT,va:iT,wa:aT,xa:nT,ya:sT,za:oT,Aa:lT,Ba:dT,Ca:Vb,Da:_b,Ea:zb,Fa:cT,Ga:wn,Ha:uT,Ia:pT,Ja:Ub,Ka:fT,La:Hb,Ma:Gb,Na:Qb,Oa:hT,Pa:mT,Qa:A,Ra:yT,Sa:gT,Ta:bT,Ua:vT,Va:ST,Wa:wT,Xa:Kb,Ya:xT,Za:Fi,_a:ta,$a:Yb,ab:fp,bb:rv,cb:ku,db:CT,eb:sv,fb:TT,gb:FT,hb:ov,ib:IT,jb:OT,kb:AT,lb:PT,mb:ET,nb:uv,ob:bv,pb:LT,qb:DT,rb:Kr,sb:rt,tb:NT,ub:BT,vb:Ks,wb:Oi,xb:Tv,yb:$T,zb:H,Ab:oo,Bb:Qe,Cb:Ye,Db:x,Eb:MT,Fb:Sp,Gb:ju,Hb:qT,Ib:lo,Jb:wp,Kb:Ys,Lb:RT,Mb:kT,Nb:kv,Ob:_e,Pb:WT,Qb:jT,Rb:VT,Sb:_T,Tb:Wv,Ub:jv,Vb:zT,Wb:UT,Xb:HT,Yb:GT,Zb:Pr,_b:Uv,$b:Ke,ac:Hv,bc:ia,cc:QT,dc:Kt,ec:ut,fc:ZT,gc:Ai,hc:KT,ic:se,jc:JT,kc:Dt,lc:YT,mc:a0,nc:n0,oc:Ae,pc:Ep,qc:ae,rc:XT,sc:eF,tc:z0,uc:tF,vc:Bp,wc:la,xc:rF,yc:qp,zc:iF,Ac:aF,Bc:wt,Cc:Rp,Dc:_t,Ec:Pi,Fc:Y0,Gc:nF,Hc:sF,Ic:oF,Jc:X0,Kc:lF,Lc:zu,Mc:rS,Nc:iS,Oc:dF,Pc:Wp,Qc:cF,Rc:nS,Sc:sS,Tc:dS,Uc:pr,Vc:uF,Wc:Ze,Xc:ct,Yc:or,Zc:X,_c:fr,$c:jt,ad:hS,bd:Uu,cd:CS,dd:pF,ed:fF,fd:hF,gd:mF,hd:yF,id:gF,jd:bF,kd:vF,ld:SF,md:wF,nd:xF,od:CF,pd:TF,qd:FF,rd:IF,sd:OF,td:AF,ud:PF,vd:EF,wd:LF,xd:DF,yd:NF,zd:BF,Ad:$F,Bd:MF,Cd:VS,Dd:Up,Ed:qF,Fd:RF,Gd:vn,Hd:kF,Id:WF,Jd:jF,Kd:dw,Ld:VF,Md:_F,Nd:na,Od:af,Pd:yo,Qd:go,Rd:of,Sd:ze,Td:Hs,Ud:it,Vd:Sx,Wd:zF,Xd:xx,Yd:ep,Zd:Tx,_d:UF,$d:Ox,ae:Ax,be:rp,ce:HF,de:GF,ee:QF,fe:ZF,ge:KF,he:Gs,ie:JF,je:YF,ke:XF,le:eI,me:tI,ne:df}},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","geometry/support/jsonUtils","layers/FeatureLayer","layers/support/CodedValueDomain","layers/support/Field","layers/support/fieldUtils","portal/Portal","request","rest/support/FeatureSet","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","AttributeBinsGraphic","intl","core/sql","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils","applications/Components/imageryUtils","layers/ImageryLayer","layers/ImageryTileLayer","layers/WCSLayer","geometry/Point","geometry/Extent")
100
+ Only applicable to bar chart, line chart.`},serverLimitReached:{type:"boolean",description:"Indicates whether the server limit has been reached when fetching data."}},required:["dataItems"],description:"JSON representation of the generic data structure for bar chart, line chart, combo bar line chart, gauge, heat chart, pie chart and radar chart.",title:"WebChartGenericDataItem"},WebChartBin:{type:"object",properties:{count:{type:"number"},minValue:{type:"number",description:"Minimum value in the bin."},maxValue:{type:"number",description:"Maximum value in the bin."},symbol:{$ref:"#/definitions/WebChartDataItem",description:"Symbol associated with the bin."},isLastBin:{type:"boolean",description:"Whether this is the last bin."}},required:["count","minValue","maxValue"],description:"JSON representation of a histogram bin.",title:"WebChartBin"},WebChartHistogramDataItem:{type:"object",properties:{mean:{type:"number"},median:{type:"number"},stddev:{type:"number"},max:{type:"number"},min:{type:"number"},sum:{type:"number",description:"Sum of the values of all the points."},count:{type:"number",description:"Number of all the points/features in un-binned data (including only non-null entries)."},nulls:{type:"number",description:"Number of null entries in the pool of points."},bins:{type:"array",items:{$ref:"#/definitions/WebChartBin"}}},required:["mean","median","stddev","max","min","bins"],description:"JSON representation of the processed data for a histogram.",title:"WebChartHistogramDataItem"},WebChartDataTypes:{anyOf:[{$ref:"#/definitions/WebChartBoxPlotDataItem"},{$ref:"#/definitions/WebChartGenericDataItem"},{$ref:"#/definitions/WebChartHeatChartDataItem"},{$ref:"#/definitions/WebChartHistogramDataItem"},{$ref:"#/definitions/WebChartScatterplotDataItem"}],title:"WebChartDataTypes"},WebChartTypes:{type:"string",enum:["chart","chartText","chartOverlay","chartOverlays","chartLegend","cursorCrosshair","chartAxis","gaugeAxisTick","gaugeNeedle","category","number","date","chartGuide","scatterSeries","pieSeries","pieTick","gaugeSeries","lineSeries","barSeries","histogramSeries","boxPlotSeries","radarSeries","comboLineAndBarSeries","heatSeries","buffer","sizeScale","calendarDateParts"],title:"WebChartTypes"},WebChartStatisticType:{type:"string",enum:["count","sum","min","max","avg","stddev","var","percentile-continuous","percentile-discrete","envelope-aggregate","centroid-aggregate","convex-hull-aggregate","no_aggregation"],title:"WebChartStatisticType"},WebChartColoringPatterns:{type:"string",enum:["singleColor","colorMatch"],title:"WebChartColoringPatterns"},WebChartBoxPlotMultipleSeriesKinds:{type:"string",enum:["sideBySide","meanLines"],title:"WebChartBoxPlotMultipleSeriesKinds"},WebChartLineSmoothedKinds:{type:"string",enum:["bezier","monotoneX","monotoneY"],description:"Represents the different types of smoothing that can be applied to a line chart when the `lineSmoothed` property is set to `true`.",title:"WebChartLineSmoothedKinds"},WebChartCalendarBinningOffsetUnits:{type:"string",enum:["seconds","minutes","hours","days"],description:"The temporal binning units for the calendar based binning offset",title:"WebChartCalendarBinningOffsetUnits"},WebChartVersionStatus:{type:"string",enum:["same","newer","older","unrecognized"],title:"WebChartVersionStatus"},WebChartAxisTypes:{type:"string",enum:["value","date","category"],description:"Represents the different types of axes that can be used in a chart.",title:"WebChartAxisTypes"},WebChartOrderDataByTypes:{type:"string",enum:["arcgis-charts-y-value","arcgis-charts-mean","arcgis-charts-median","arcgis-charts-category","arcgis-charts-multi-axes"],description:"The types of order assocated with chart data.",title:"WebChartOrderDataByTypes"},RESTFieldType:{type:"string",enum:["esriFieldTypeBlob","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset","esriFieldTypeDouble","esriFieldTypeGeometry","esriFieldTypeGlobalID","esriFieldTypeGUID","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeOID","esriFieldTypeRaster","esriFieldTypeSingle","esriFieldTypeString","esriFieldTypeXML"],title:"RESTFieldType"},RESTSimpleLineSymbolStyle:{type:"string",enum:["esriSLSDash","esriSLSDashDot","esriSLSDashDotDot","esriSLSDot","esriSLSNull","esriSLSSolid"],title:"RESTSimpleLineSymbolStyle"},RESTSimpleMarkerSymbolStyle:{type:"string",enum:["esriSMSCircle","esriSMSCross","esriSMSDiamond","esriSMSSquare","esriSMSX","esriSMSTriangle"],title:"RESTSimpleMarkerSymbolStyle"},RESTSimpleFillSymbolStyle:{type:"string",enum:["esriSFSBackwardDiagonal","esriSFSCross","esriSFSDiagonalCross","esriSFSForwardDiagonal","esriSFSHorizontal","esriSFSNull","esriSFSSolid","esriSFSVertical"],title:"RESTSimpleFillSymbolStyle"},RESTHorizontalAlignment:{type:"string",enum:["left","right","center","justify"],deprecated:"since 5.1. Won't be replaced.",title:"RESTHorizontalAlignment"},RESTVerticalAlignment:{type:"string",enum:["baseline","top","middle","bottom"],deprecated:"since 5.1. Won't be replaced.",title:"RESTVerticalAlignment"},RESTFontStyle:{type:"string",enum:["italic","normal","oblique"],deprecated:"since 5.1. Won't be replaced.",title:"RESTFontStyle"},RESTFontWeight:{type:"string",enum:["bold","bolder","lighter","normal"],deprecated:"since 5.1. Won't be replaced.",title:"RESTFontWeight"},RESTFontDecoration:{type:"string",enum:["line-through","underline","none"],deprecated:"since 5.1. Won't be replaced.",title:"RESTFontDecoration"},RESTRendererType:{type:"string",enum:["unique-value","simple","class-breaks","heatmap","dot-density","dictionary","pie-chart"],title:"RESTRendererType"},RESTSymbolType:{type:"string",enum:["esriSLS","esriSMS","esriSFS","esriPMS","esriPFS","esriTS"],title:"RESTSymbolType"},OverlayTerms:{type:"string",enum:["Mean","Median","Standard Deviation","Normal Distribution","Trendline"],title:"OverlayTerms"},CalculatedMinMaxBoundsPayload:{type:"object",properties:{isXAxis:{type:"boolean"},isSecondValueAxis:{type:"boolean"},minimum:{type:["number","null"],description:"The minimum value which the axis should represent, when it is not defined or null, then the minimum value for the corresponding axis is automatically calculated."},maximum:{type:["number","null"],description:"The maximum value which the axis should represent, when it is not defined or null, then the maximum value for the corresponding axis is automatically calculated."}},required:["isXAxis"],description:"Represents a subset of the event payload carrying the chart's axes bounds.",title:"CalculatedMinMaxBoundsPayload"},ChartDeletePayload:{type:"object",properties:{chartId:{type:"string"}},required:["chartId"],description:"Represents the payload of the event sent when a chart is removed from the chart list.",title:"ChartDeletePayload"},LegendItemVisibility:{type:"object",properties:{visible:{type:"boolean"},seriesId:{type:"string"},overlayType:{$ref:"#/definitions/OverlayTerms"},sliceId:{type:"string"},sliceData:{$ref:"#/definitions/WebChartDataItem"}},required:["visible"],description:"Represents the payload of the event sent when an item is toggled in the chart's legend (slice or series).",title:"LegendItemVisibility"},IFeatureSet:{type:"object",properties:{hasZ:{type:"boolean"},hasM:{type:"boolean"},objectIdFieldName:{type:"string"},globalIdFieldName:{type:"string"},displayFieldName:{type:"string"},geometryType:{$ref:"#/definitions/GeometryType",description:"For feature layers only."},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"For feature layers only."},fields:{type:"array",items:{$ref:"#/definitions/IField"}},features:{type:"array",items:{$ref:"#/definitions/IFeature"}},fieldAliases:{$ref:"#/definitions/Record%3Cstring%2Cstring%3E"}},required:["features"],description:'`IFeatureSet` can also be imported from the following packages:\n\n```js import { IFeatureSet } from "@esri/arcgis-rest-feature-layer"; ```',title:"IFeatureSet"},"Record<string,string>":{type:"object",additionalProperties:{type:"string"},title:"Record<string,string>"},ILocation:{type:"object",properties:{latitude:{type:"number"},longitude:{type:"number"},lat:{type:"number"},long:{type:"number"},z:{type:"number"}},deprecated:"since 5.1. Won't be replaced.",title:"ILocation"},IPolylineWithCurves:{type:"object",properties:{spatialReference:{$ref:"#/definitions/ISpatialReference"},hasZ:{type:"boolean"},hasM:{type:"boolean"},curvePaths:{type:"array",items:{type:"array",items:{anyOf:[{$ref:"#/definitions/JsonCurve"},{$ref:"#/definitions/Position"}]}}}},required:["curvePaths"],deprecated:"since 5.1. Won't be replaced.",title:"IPolylineWithCurves"},ElipticArc:{$ref:"#/definitions/IArc",deprecated:"since 5.1. Won't be replaced.",title:"ElipticArc"},SpatialRelationship:{type:"string",enum:["esriSpatialRelContains","esriSpatialRelCrosses","esriSpatialRelEnvelopeIntersects","esriSpatialRelIndexIntersects","esriSpatialRelIntersects","esriSpatialRelOverlaps","esriSpatialRelTouches","esriSpatialRelWithin"],description:'The spatial relationship used to compare input geometries\n\n`SpatialRelationship` can also be imported from the following packages:\n\n```js import { SpatialRelationship } from "@esri/arcgis-rest-feature-layer"; ```',deprecated:"since 5.1. Won't be replaced.",title:"SpatialRelationship"},IMultipoint:{type:"object",properties:{spatialReference:{$ref:"#/definitions/ISpatialReference"},hasZ:{type:"boolean"},hasM:{type:"boolean"},points:{type:"array",items:{$ref:"#/definitions/Position"}}},required:["points"],deprecated:"since 5.1. Won't be replaced.",title:"IMultipoint"},Units:{type:"string",enum:["esriSRUnit_Foot","esriSRUnit_Kilometer","esriSRUnit_Meter","esriSRUnit_NauticalMile","esriSRUnit_StatuteMile","esriSRUnit_USNauticalMile"],description:'`Units` can also be imported from the following packages:\n\n```js import { Units } from "@esri/arcgis-rest-feature-layer"; ```',deprecated:"since 5.1. Won't be replaced.",title:"Units"},GroupMembership:{type:"string",enum:["admin","member","none","owner"],description:'`GroupMembership` can also be imported from the following packages:\n\n```js import { GroupMembership } from "@esri/arcgis-rest-portal"; ```',deprecated:"since 5.1. Won't be replaced.",title:"GroupMembership"},IGroupAdd:{type:"object",properties:{title:{type:"string"},access:{type:"string",enum:["org","private","public"]},owner:{type:"string"},tags:{type:"array",items:{type:"string"}},description:{type:"string"},phone:{type:"string"},sortField:{type:"string",enum:["avgrating","created","modified","numviews","owner","title"]},sortOrder:{type:"string",enum:["asc","desc"]},isViewOnly:{type:"boolean"},isInvitationOnly:{type:"boolean"},thumbnail:{type:"string"},autoJoin:{type:"boolean"},snippet:{type:"string"}},required:["title","access"],deprecated:"since 5.1. Won't be replaced.",title:"IGroupAdd"},IGroup:{type:"object",properties:{title:{type:"string"},access:{type:"string",enum:["org","private","public"]},owner:{type:"string"},tags:{type:"array",items:{type:"string"}},description:{type:"string"},phone:{type:"string"},sortField:{type:"string",enum:["avgrating","created","modified","numviews","owner","title"]},sortOrder:{type:"string",enum:["asc","desc"]},isViewOnly:{type:"boolean"},isInvitationOnly:{type:"boolean"},thumbnail:{type:"string"},autoJoin:{type:"boolean"},snippet:{type:"string"},id:{type:"string"},created:{type:"number"},modified:{type:"number"},protected:{type:"boolean"},isOpenData:{type:"boolean"},isFav:{type:"boolean"},userMembership:{type:"object",properties:{username:{type:"string"},memberType:{$ref:"#/definitions/GroupMembership"},applications:{type:"number"}}},hasCategorySchema:{type:"boolean"}},required:["access","autoJoin","created","id","isFav","isInvitationOnly","isViewOnly","modified","owner","protected","tags","title"],deprecated:"since 5.1. Won't be replaced.",title:"IGroup"},IItemAdd:{type:"object",properties:{title:{type:"string"},type:{type:"string"},owner:{type:"string"},typeKeywords:{type:"array",items:{type:"string"}},description:{type:"string"},snippet:{type:"string"},documentation:{type:"string"},extent:{type:"array",items:{type:"array",items:{type:"number"}}},categories:{type:"array",items:{type:"string"}},spatialReference:{$ref:"#/definitions/ISpatialReference"},culture:{type:"string"},properties:{},url:{type:"string"},tags:{type:"array",items:{type:"string"}}},required:["title","type"],deprecated:"since 5.1. Won't be replaced.",title:"IItemAdd"},IItemUpdate:{type:"object",properties:{id:{type:"string"}},required:["id"],deprecated:"since 5.1. Won't be replaced.",title:"IItemUpdate"},IItem:{type:"object",properties:{title:{type:"string"},type:{type:"string"},owner:{type:"string"},typeKeywords:{type:"array",items:{type:"string"}},description:{type:"string"},snippet:{type:"string"},documentation:{type:"string"},extent:{type:"array",items:{type:"array",items:{type:"number"}}},categories:{type:"array",items:{type:"string"}},spatialReference:{$ref:"#/definitions/ISpatialReference"},culture:{type:"string"},properties:{},url:{type:"string"},tags:{type:"array",items:{type:"string"}},id:{type:"string"},created:{type:"number"},modified:{type:"number"},numViews:{type:"number"},size:{type:"number"},protected:{type:"boolean"}},required:["created","id","modified","numViews","owner","size","tags","title","type"],deprecated:"since 5.1. Won't be replaced.",title:"IItem"},IFolder:{type:"object",properties:{username:{type:"string"},id:{type:"string"},title:{type:"string"},created:{type:"number"}},required:["username","id","title"],deprecated:"since 5.1. Won't be replaced.",title:"IFolder"},IFeatureServiceDefinition:{type:"object",properties:{currentVersion:{type:"number"},serviceDescription:{type:"string"},hasVersionedData:{type:"boolean"},supportsDisconnectedEditing:{type:"boolean"},supportsReturnDeleteResults:{type:"boolean"},hasStaticData:{type:"boolean",description:"Boolean value indicating whether data changes. True if it does not."},maxRecordCount:{type:"number",description:"Numeric value indicating tbe maximum number of records that will be returned at once for a query."},supportedQueryFormats:{type:"string",description:"String value indicating the output formats that are supported in a query."},supportsRelationshipsResource:{type:"boolean"},capabilities:{type:"string",description:"A comma separated list of supported capabilities, e.g. Query,Editing."},description:{type:"string",description:"String value of the layer as defined in the map service."},copyrightText:{type:"string",description:"String value for the copyright text information for the layer."},advancedEditingCapabilities:{$ref:"#/definitions/Record%3Cstring%2Cboolean%3E"},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"An object containing the WKID or WKT identifying the spatial reference of the layer's geometry."},initialExtent:{$ref:"#/definitions/IExtent"},fullExtent:{$ref:"#/definitions/IExtent"},allowGeometryUpdates:{type:"boolean",description:"Boolean value indicating whether the geometry of the features in the layer can be edited."},units:{type:"string"},syncEnabled:{type:"boolean"},returnServiceEditsHaveSR:{type:"boolean"},validationSystemLayers:{type:"object",properties:{validationPointErrorlayerId:{type:"number"},validationLineErrorlayerId:{type:"number"},validationPolygonErrorlayerId:{type:"number"},validationObjectErrortableId:{type:"number"}},required:["validationPointErrorlayerId","validationLineErrorlayerId","validationPolygonErrorlayerId","validationObjectErrortableId"]},extractChangesCapabilities:{type:"object",properties:{supportsReturnIdsOnly:{type:"boolean"},supportsReturnExtentOnly:{type:"boolean"},supportsReturnAttachments:{type:"boolean"},supportsLayerQueries:{type:"boolean"},supportsSpatialFilter:{type:"boolean"},supportsReturnFeature:{type:"boolean"}},required:["supportsReturnIdsOnly","supportsReturnExtentOnly","supportsReturnAttachments","supportsLayerQueries","supportsSpatialFilter","supportsReturnFeature"]},syncCapabilities:{type:"object",properties:{supportsASync:{type:"boolean"},supportsRegisteringExistingData:{type:"boolean"},supportsSyncDirectionControl:{type:"boolean"},supportsPerLayerSync:{type:"boolean"},supportsPerReplicaSync:{type:"boolean"},supportsRollbackOnFailure:{type:"boolean"},supportedSyncDataOptions:{type:"number"}},required:["supportsASync","supportsRegisteringExistingData","supportsSyncDirectionControl","supportsPerLayerSync","supportsPerReplicaSync","supportsRollbackOnFailure","supportedSyncDataOptions"]},editorTrackingInfo:{type:"object",properties:{enableEditorTracking:{type:"boolean"},enableOwnershipAccessControl:{type:"boolean"},allowOthersToUpdate:{type:"boolean"},allowOthersToDelete:{type:"boolean"}},required:["enableEditorTracking","enableOwnershipAccessControl","allowOthersToUpdate","allowOthersToDelete"]},documentInfo:{$ref:"#/definitions/Record%3Cstring%2Cstring%3E"},layers:{type:"array",items:{$ref:"#/definitions/ILayerDefinition"}},tables:{type:"array",items:{$ref:"#/definitions/ITable"}},relationships:{type:"array",items:{type:"object",properties:{id:{type:"number"},name:{type:"string"},backwardPathLabel:{type:"string"},originLayerId:{type:"number"},originPrimaryKey:{type:"string"},forwardPathLabel:{type:"string"},destinationLayerId:{type:"number"},originForeignKey:{type:"string"},relationshipTableId:{type:"number"},destinationPrimaryKey:{type:"string"},destinationForeignKey:{type:"string"},rules:{type:"array",items:{type:"object",properties:{ruleID:{type:"number"},originSubtypeCode:{type:"number"},originMinimumCardinality:{type:"number"},originMaximumCardinality:{type:"number"},destinationSubtypeCode:{type:"number"},destinationMinimumCardinality:{type:"number"},destinationMaximumCardinality:{type:"number"}},required:["ruleID","originSubtypeCode","originMinimumCardinality","originMaximumCardinality","destinationSubtypeCode","destinationMinimumCardinality","destinationMaximumCardinality"]},minItems:1,maxItems:1},cardinality:{type:"string",enum:["esriRelCardinalityManyToMany","esriRelCardinalityOneToMany","esriRelCardinalityOneToOne"]},attributed:{type:"boolean"},composite:{type:"boolean"}},required:["id","name","backwardPathLabel","originLayerId","originPrimaryKey","forwardPathLabel","destinationLayerId","originForeignKey","relationshipTableId","destinationPrimaryKey","destinationForeignKey","rules","cardinality","attributed","composite"]},minItems:1,maxItems:1},enableZDefaults:{type:"boolean"},isLocationTrackingService:{type:"boolean"},isLocationTrackingView:{type:"boolean"},zDefault:{type:"number"}},required:["serviceDescription","hasVersionedData","supportsDisconnectedEditing","supportsReturnDeleteResults","maxRecordCount","supportedQueryFormats","supportsRelationshipsResource","capabilities","description","copyrightText","advancedEditingCapabilities","spatialReference","initialExtent","fullExtent","allowGeometryUpdates","units","syncEnabled","validationSystemLayers","extractChangesCapabilities","syncCapabilities","editorTrackingInfo","layers","tables","relationships","isLocationTrackingService","isLocationTrackingView"],deprecated:"since 5.1. Won't be replaced.",title:"IFeatureServiceDefinition"},"Record<string,boolean>":{type:"object",additionalProperties:{type:"boolean"},title:"Record<string,boolean>"},ITable:{type:"object",properties:{name:{type:"string",description:"Table name"},capabilities:{type:"string",description:"A comma-separated string listing which editing operations are allowed on an editable feature service. Available operations include: 'Create', 'Delete', 'Query', 'Update', and 'Editing'."},definitionEditor:{$ref:"#/definitions/IDefinitionEditor",description:"Object indicating the definitionEditor used as a layer's interactive filter."},id:{type:"number",description:"Unique identifier for the table."},itemId:{type:"string",description:"Unique string value indicating an item registered in ArcGIS Online or your organization's portal."},layerDefinition:{$ref:"#/definitions/ILayerDefinition",description:"A layerDefinition object defining a definition expression for the table."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"An object defining the content of popup windows when you query a record and the sort option for child related records."},title:{type:"string",description:"String value for the title of the table."},url:{type:"string",description:"String value indicating the URL reference of the hosted table."}},deprecated:"since 5.1. Won't be replaced.",title:"ITable"},IServiceInfo:{type:"object",properties:{adminServiceInfo:{type:"object",properties:{name:{type:"string"},type:{type:"string"},status:{type:"string"},database:{type:"object",properties:{datasource:{type:"object",properties:{name:{type:"string"}},required:["name"]}},required:["datasource"]}},required:["name","type","status","database"]},layers:{type:"array",items:{$ref:"#/definitions/Record%3Cstring%2Cunknown%3E"}}},required:["adminServiceInfo","layers"],deprecated:"since 5.1. Won't be replaced.",title:"IServiceInfo"},"Record<string,unknown>":{type:"object",additionalProperties:{},title:"Record<string,unknown>"},IViewServiceSource:{type:"object",properties:{name:{type:"string"},type:{type:"string"},url:{type:"string"},serviceItemId:{type:"string"}},required:["name","type","url","serviceItemId"],deprecated:"since 5.1. Won't be replaced.",title:"IViewServiceSource"},IViewServiceSources:{type:"object",properties:{currentVersion:{type:"number"},services:{type:"array",items:{$ref:"#/definitions/IViewServiceSource"}}},required:["currentVersion","services"],deprecated:"since 5.1. Won't be replaced.",title:"IViewServiceSources"},IServiceNameAvailable:{type:"object",properties:{available:{type:"boolean"}},required:["available"],deprecated:"since 5.1. Won't be replaced.",title:"IServiceNameAvailable"},IPictureSourced:{type:"object",properties:{url:{type:"string"},imageData:{type:"string"},contentType:{type:"string"},width:{type:"number"},height:{type:"number"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"}},deprecated:"since 5.1. Won't be replaced.",title:"IPictureSourced"},IPictureFillSymbol:{type:"object",properties:{url:{type:"string"},imageData:{type:"string"},contentType:{type:"string"},width:{type:"number"},height:{type:"number"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"},type:{type:"string",const:"esriPFS"},style:{type:"string"},outline:{$ref:"#/definitions/ISimpleLineSymbol"},xscale:{type:"number"},yscale:{type:"number"}},required:["type"],deprecated:"since 5.1. Won't be replaced.",title:"IPictureFillSymbol"},IPictureMarkerSymbol:{type:"object",properties:{url:{type:"string"},imageData:{type:"string"},contentType:{type:"string"},width:{type:"number"},height:{type:"number"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"},type:{type:"string",const:"esriPMS"},style:{type:"string"}},required:["type"],deprecated:"since 5.1. Won't be replaced.",title:"IPictureMarkerSymbol"},ITextSymbol:{type:"object",properties:{type:{type:"string",const:"esriTS"},style:{type:"string"},angle:{type:"number"},xoffset:{type:"number"},yoffset:{type:"number"},color:{$ref:"#/definitions/Color"},backgroundColor:{$ref:"#/definitions/Color"},borderLineSize:{type:"number"},borderLineColor:{$ref:"#/definitions/Color"},haloSize:{type:"number"},haloColor:{$ref:"#/definitions/Color"},verticalAlignment:{type:"string",enum:["baseline","bottom","middle","top"]},horizontalAlignment:{type:"string",enum:["center","justify","left","right"]},rightToLeft:{type:"boolean"},kerning:{type:"boolean"},font:{$ref:"#/definitions/IFont"},text:{type:"string",description:"Only applicable when specified as a client-side graphic."}},required:["type"],title:"ITextSymbol"},IUser:{type:"object",properties:{username:{type:"string"},fullName:{type:"string"},availableCredits:{type:"number"},assignedCredits:{type:"number"},firstName:{type:"string"},lastName:{type:"string"},preferredView:{},description:{type:"string"},email:{type:"string"},idpUsername:{type:"string"},favGroupId:{type:"string"},lastLogin:{type:"number"},mfaEnabled:{type:"boolean"},access:{type:"string"},storageUsage:{type:"number"},storageQuota:{type:"number"},orgId:{type:"string"},cOrgId:{type:"string"},role:{type:"string",enum:["org_admin","org_publisher","org_user"]},privileges:{type:"array",items:{type:"string"}},roleId:{type:"string"},level:{type:"string"},disabled:{type:"boolean"},units:{type:"string"},tags:{type:"array",items:{type:"string"}},culture:{type:"string"},region:{type:"string"},thumbnail:{type:"string"},created:{type:"number"},modified:{type:"number"},groups:{type:"array",items:{$ref:"#/definitions/IGroup"}},provider:{type:"string",enum:["arcgis","enterprise","facebook","google"]}},deprecated:"since 5.1. Won't be replaced.",title:"IUser"},IPagingParams:{type:"object",properties:{start:{type:"number"},num:{type:"number"}},deprecated:"since 5.1. Won't be replaced.",title:"IPagingParams"},IPagedResponse:{type:"object",properties:{start:{type:"number"},num:{type:"number"},total:{type:"number",description:"total number of object across all pages"},nextStart:{type:"number",description:"next entry index or -1 for the last page"}},required:["total","nextStart"],deprecated:"since 5.1. Won't be replaced.",title:"IPagedResponse"},IWebMapBackground:{type:"object",properties:{color:{$ref:"#/definitions/Color",description:"To define the color of the background of the map (which is shown when no data is shown)."}},required:["color"],deprecated:"since 5.1. Won't be replaced.",title:"IWebMapBackground"},IBookmark:{type:"object",properties:{extent:{$ref:"#/definitions/IExtent",description:"An extent object containing a spatial reference, a lower left coordinate, and an upper right coordinate defining the rectangular area of the bookmark. The spatial reference must be the same as the map spatial reference. Documentation for the envelope is in the Geometry Objects topic of the ArcGIS REST API help."},name:{type:"string",description:"A string name for the bookmark."}},required:["extent","name"],deprecated:"since 5.1. Won't be replaced.",title:"IBookmark"},IMapRangeInfo:{type:"object",properties:{activeRangeName:{type:"string",description:"Active range ID that slider/picker acts upon."},currentRangeExtent:{type:"array",items:{type:"number"},description:"Current range for the active range."},fullRangeExtent:{type:"array",items:{type:"number"},description:"Full range extent for the active range to be presented in the UI."}},deprecated:"since 5.1. Won't be replaced.",title:"IMapRangeInfo"},IMapLocation:{type:"object",properties:{centerPoint:{$ref:"#/definitions/IPoint",description:"The center of the map specified using X/Y coordinates."},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"Well-known ID (WKID) or well-known text (WKT)."}},required:["centerPoint","spatialReference"],deprecated:"since 5.1. Won't be replaced.",title:"IMapLocation"},IVisibleLayer:{type:"object",properties:{featureVisibility:{type:"array",items:{type:"array",items:{}},description:"An array of arrays."},id:{type:"number",description:"The id of the layer as listed on the operational layer."},subLayerIds:{type:"array",items:{type:"number"},description:"An array of integers."}},deprecated:"since 5.1. Won't be replaced.",title:"IVisibleLayer"},IVisiblePopup:{type:"object",properties:{anchorPoint:{$ref:"#/definitions/IPoint",description:"Object with spatialReference, x, and y."},featureId:{type:"number",description:"An integer specifying the feature's id."},layerId:{type:"string",description:"A string specifying the layer id."},subLayerId:{type:"number",description:"An integer specifying the sublayer id."}},deprecated:"since 5.1. Won't be replaced.",title:"IVisiblePopup"},ISlide:{type:"object",properties:{baseMap:{$ref:"#/definitions/IBaseMap",description:"Basemaps give the web map a geographic context."},extent:{$ref:"#/definitions/IExtent",description:"The standard Esri extent object with spatialReference, xmax, xmin, ymax and ymin."},hidden:{type:"boolean",description:"Indicates whether the slide should be hidden within the presentation."},mapLocation:{$ref:"#/definitions/IMapLocation",description:"An object with a centerPoint object and sometimes a resolution."},timeExtent:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"An array of two numbers. The first one indicates start time and the second one indicates end time."},title:{type:"string",description:"Title including text and formatting for each slide."},visibleLayers:{$ref:"#/definitions/IVisibleLayer",description:"An array of objects used to indicate layer visibility."},visiblePopup:{$ref:"#/definitions/IVisiblePopup",description:"A presentation slide's visiblePopup which contains anchorPoint, featureId, layerId, and subLayerId."}},deprecated:"since 5.1. Won't be replaced.",title:"ISlide"},IBaseMap:{type:"object",properties:{baseMapLayers:{type:"array",items:{$ref:"#/definitions/ILayer"},description:"An array of baseMapLayer objects defining the basemaps used in the web map."},title:{type:"string",description:"Required string title for the basemap that can be used in a table of contents. It takes the title of the first baseMapLayer in the array."}},required:["baseMapLayers","title"],deprecated:"since 5.1. Won't be replaced.",title:"IBaseMap"},IPresentation:{type:"object",properties:{displayTimeSlider:{type:"boolean",description:"Indicates whether to display the time slider (if accessible)."},showLegend:{type:"boolean",description:"Indicates whether to display a legend on all slides."},slideAdvancementInterval:{type:"number",description:"Number of seconds to show slide before proceeding to the next slide."},slides:{type:"array",items:{$ref:"#/definitions/ISlide"},description:"Array of slide objects."},useTimeExtentOfSlide:{type:"boolean",description:"Indicates whether to use the time extent (if applicable) of a slide."}},deprecated:"since 5.1. Won't be replaced.",title:"IPresentation"},IWebmap:{type:"object",properties:{applicationProperties:{$ref:"#/definitions/IApplicationProperties",description:"Viewing and editing properties of the webmap"},authoringApp:{type:"string",description:"String value indicating the application which authored the webmap"},authoringAppVersion:{type:"string",description:"String value indicating the authoring App's version number"},background:{$ref:"#/definitions/IWebMapBackground",description:"Defines the appearance for the background of the map."},baseMap:{$ref:"#/definitions/IBaseMap",description:"[Required] Basemaps give the web map a geographic context"},bookmarks:{type:"array",items:{$ref:"#/definitions/IBookmark"},description:"A bookmark is a saved geographic extent that allows end users to quickly navigate to a particular area of interest"},mapRangeInfo:{$ref:"#/definitions/IMapRangeInfo",description:"Map Range Information"},operationalLayers:{type:"array",items:{$ref:"#/definitions/ILayer"},description:"Operational layers contain business data which are used to make thematic maps"},presentation:{description:"A presentation consists of multiple slides. Each slide has a different title, extent, basemap, layers etc"},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"[Required] An object used to specify the spatial reference of the given geometry."},tables:{type:"array",items:{$ref:"#/definitions/ITable"},description:"Root element in the web map specifying an array of table objects. (optional)"},version:{type:"string",description:"[Required] Root element in the web map specifying a string value indicating the web map version."},widgets:{description:"The widgets object contains widgets that should be exposed to the user"}},required:["baseMap","spatialReference","version"],deprecated:"since 5.1. Won't be replaced.",title:"IWebmap"},IApplicationProperties:{type:"object",properties:{editing:{anyOf:[{$ref:"#/definitions/IEditingProperties"},{type:"null"}],description:"If locationTracking is set and enabled, the Collector application will update the feature service at the defined interval with the current location of the user logged into the Collector app."},offline:{anyOf:[{$ref:"#/definitions/IOfflineInfo"},{type:"null"}],description:"Use if working with offline maps."},viewing:{anyOf:[{$ref:"#/definitions/IViewingInfo"},{type:"null"}],description:"An object containing all the viewing properties of the web map. If this is null or not defined, the client should assume a logical default."}},deprecated:"since 5.1. Won't be replaced.",title:"IApplicationProperties"},IEditingProperties:{type:"object",properties:{locationTracking:{$ref:"#/definitions/ILocationTracking",description:"If locationTracking is set and enabled, the collector app will update the feature service at the defined interval with the current location of the user logged into the collector application."}},required:["locationTracking"],deprecated:"since 5.1. Won't be replaced.",title:"IEditingProperties"},ILocationTracking:{type:"object",properties:{enabled:{type:"boolean",description:"A boolean value indicating whether or not location tracking is enabled on the webmap."},info:{$ref:"#/definitions/ILocationTrackingInfo",description:"An object of additional information specifying layer and update interval time."}},required:["enabled","info"],deprecated:"since 5.1. Won't be replaced.",title:"ILocationTracking"},ILocationTrackingInfo:{type:"object",properties:{layerId:{description:"A string value indicating the given layer id specified in the web map."},updateInterval:{description:"A numeric value indicating the time interval used to update the feature service. Default value is 300 seconds."}},required:["layerId"],deprecated:"since 5.1. Won't be replaced.",title:"ILocationTrackingInfo"},IOfflineInfo:{type:"object",properties:{editableLayers:{$ref:"#/definitions/IEditableLayers",description:"Object detailing the available offline editing options."},readonlyLayers:{$ref:"#/definitions/IReadOnlyLayers",description:"Object indicating what to do with attachments in read-only layers."}},required:["editableLayers","readonlyLayers"],deprecated:"since 5.1. Won't be replaced.",title:"IOfflineInfo"},IEditableLayers:{type:"object",properties:{download:{type:"string",enum:["featuers","featuresAndAttachments","none"],description:"When editing layers, the edits are always sent to the server. This string value indicates which data is retrieved. For example, none indicates that only the schema is written since neither the features nor attachments are retrieved. For a full sync without downloading attachments, indicate features. Lastly, the default behavior is to have a full sync using featuresAndAttachments where both features and attachments are retrieved."},sync:{type:"string",enum:["syncFeaturesAndAttachments","syncFeaturesUploadAttachments","uploadFeaturesAndAttachments"],description:"This string value indicates how the data is synced."}},required:["download","sync"],deprecated:"since 5.1. Won't be replaced.",title:"IEditableLayers"},IReadOnlyLayers:{type:"object",properties:{downloadAttachments:{type:"boolean",description:"Indicates whether to include attachments with the read-only data."}},required:["downloadAttachments"],deprecated:"since 5.1. Won't be replaced.",title:"IReadOnlyLayers"},IViewingInfo:{type:"object",properties:{basemapGallery:{$ref:"#/definitions/IEnableable",description:"The basemap tool which will use the basemap group defined in the Portal."},measure:{$ref:"#/definitions/IEnableable",description:"Measure tool."},routing:{$ref:"#/definitions/IEnableable",description:"The route tool which will leverage the Portals defined route service."},search:{$ref:"#/definitions/ISearch",description:"An object specifying search parameters within the webmap."}},deprecated:"since 5.1. Won't be replaced.",title:"IViewingInfo"},IEnableable:{type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],deprecated:"since 5.1. Won't be replaced.",title:"IEnableable"},ISearch:{type:"object",properties:{enabled:{type:"boolean"},disablePlaceFinder:{description:"A boolean value indicating whether or not to disable the place finder."},hintText:{description:"A string value used to indicate the hint provided with the search dialog."},layers:{description:"An array of layer objects defining the styling, geometry, and attribute information for the features."}},required:["enabled"],deprecated:"since 5.1. Won't be replaced.",title:"ISearch"},IRange:{type:"object",properties:{interactionMode:{type:"string",enum:["picker","slider"],description:"Indicates the mode in which the active range should be presented to the user. Must be one of the following values: slider, picker"},numberOfStops:{description:"This is used to generate the activeRangeValues if activeRangeValues are not specified."},stopInterval:{type:"number",description:"Interval in which stops should be generated."}},deprecated:"since 5.1. Won't be replaced.",title:"IRange"},IWidget:{type:"object",properties:{range:{$ref:"#/definitions/IRange",description:"Active range."},timeSlider:{$ref:"#/definitions/ITimeSliderProperties",description:"Time animation is controlled by a configurable time slider. The time slider widget will act upon all the time aware layers in the map."}},deprecated:"since 5.1. Won't be replaced.",title:"IWidget"},ITimeSliderProperties:{type:"object",properties:{currentTimeExtent:{type:"array",items:{type:"number"},description:"An optional array of numbers indicating the slider's start to end time extent."},endTime:{type:"number",description:"The optional end of the time slider. If not specified, the slider defaults to the full time extent of all time-enabled layers."},numberOfStops:{type:"number",description:"Number of stops within the timeSlider widget."},startTime:{type:"number",description:"The optional start of the time slider. If not specified, the slider defaults to the full time extent of all time-enabled layers."},thumbCount:{type:"number",description:"The default value for the thumbCount is 1."},thumbMovingRate:{type:"number",description:"Rate at which the time animation plays. Units are in milliseconds. Default is 1000."},timeStopInterval:{type:"number",description:"The interval which has been defined for the time slider."}},deprecated:"since 5.1. Won't be replaced.",title:"ITimeSliderProperties"},ITimeSlider:{type:"object",properties:{properties:{$ref:"#/definitions/ITimeSliderProperties",description:"Configurable properties used within the TimeSlider widget."}},required:["properties"],deprecated:"since 5.1. Won't be replaced.",title:"ITimeSlider"},IBingLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",enum:["BingMapsAerial","BingMapsHybrid","BingMapsRoad"],description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},bingKey:{type:"string",description:"String value that unlocks the use of Bing layers in a web map."},canShareBingPublic:{type:"boolean",description:"Boolean value indicating whether the Bing key can be shared to the public."},portalUrl:{type:"string",description:"A string value representing the URL to the Portal/organization Self resource. Calls should be made to this property to retrieve the Bing key. If the key is not made accessible to the public or if canShareBingPublic is false, any web maps using Bing layers will not work."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IBingLayer"},IImageVectorLayer:{type:"object",properties:{timeAnimation:{type:"boolean",description:"This property is applicable to layers that support time. If 'true', timeAnimation is enabled."},id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISImageServiceVectorLayer",description:"String indicating the layer type. Value of this property must be ArcGISImageServiceVectorLayer"},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},definitionEditor:{description:"Stores interactive filters."},disablePopup:{description:"Boolean property indicating whether to ignore popups defined by the service item."},isReference:{type:"boolean",description:"This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},layerDefinition:{description:"A layerDefinition object defining the attribute schema and drawing information for the layer."},mosaicRule:{description:"Specifies the mosaic rule when defining how individual images should be mosaicked."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the content of popup windows when you click or query a feature."},symbolTileSize:{description:"Number describing the size of the tile."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IImageVectorLayer"},IChildLayer:{type:"object",properties:{defaultVisibility:{description:"Default visibility of the layers in the map service."},definitionEditor:{$ref:"#/definitions/IDefinitionEditor",description:"An object that provides interactive filters."},featureSet:{$ref:"#/definitions/IFeatureSet",description:"A featureSet object containing the geometry and attributes of the features in the layer. Used with feature collections only."},field:{type:"array",items:{$ref:"#/definitions/IField"},description:"Information about each field in a layer. Used with feature collections."},id:{type:"string",description:"A string indicating the index position of the layer in the map service or feature collection."},layerDefinition:{description:"The layerDefinition object defines the attribute schema and drawing information for the layer."},layerUrl:{description:"A string URL to a service that should be used for all queries against the layer. Used with hosted tiled map services on ArcGIS Online when there is an associated feature service that allows for queries."},maxScale:{description:"Represents the maximum scale at which the layer definition will be applied."},minScale:{description:"Represents the minimum scale at which the layer definition will be applied."},nextObjectId:{description:"Iterates within a featureset. Number objectId value is incremented +1 based on last Object ID defined for the feature in a featureset. Used with feature collections."},parentLayerId:{description:"If working with nested layers, this is the numeric value indicating the layer id of the next layer (parent) directly above the current referenced layer."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the popup window content for the layer."},showLegend:{description:"Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend."},subLayer:{description:"Array of numeric values indicating the layer index for layers nested directly under the parent layer."},subLayerIds:{description:"If the layer is a parent layer, it will have one or more sub layers included in an array."},title:{description:"A user-friendly string title for the layer that can be used in a table of contents."}},title:"IChildLayer"},IMapServiceLayer:{type:"object",properties:{timeAnimation:{type:"boolean",description:"This property is applicable to layers that support time. If 'true', timeAnimation is enabled."},id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISMapServiceLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},isReference:{description:"This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},layers:{type:"array",items:{$ref:"#/definitions/IChildLayer"},description:"An array of layer objects defining the styling, geometry, and attribute information for the features."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."},thematicGroup:{$ref:"#/definitions/IThematicGroup",description:"(Optional) A thematicGroup object used in ArcGISMapServiceLayer layers."},visibleLayers:{type:"array",items:{type:"number"},description:"An array of sublayer ids that should appear visible. Used with map service layers that are not tiled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IMapServiceLayer"},IThematicGroup:{type:"object",properties:{fieldNames:{type:"array",items:{type:"string"},description:"An array of string values indicating all the fields used within the webmap. All other fields can be disregarded and should not display in any field selection list."},layerIds:{type:"array",items:{type:"number"},description:"A zero-based array of integers indicating the layers to be used in the webmap. NOTE: All other layers should not be added to the TOC and may or may not be visible on the map as reference layers."},name:{type:"string",description:"String property indicating the name for the thematic grouping of layers."}},deprecated:"since 5.1. Won't be replaced.",title:"IThematicGroup"},IDrawingInfo:{type:"object",properties:{fixedSymbols:{description:"Only used for feature collections with a renderer. The feature's symbol is defined by the layer's renderer."},labelingInfo:{description:"An object defining the properties used for labeling the layer."},renderer:{description:"An object defined which provides the symbology for the layer."},scaleSymbols:{description:"Boolean property indicating whether symbols should stay the same size in screen units as you zoom in. A value of true means the symbols stay the same size in screen units regardless of the map scale."},showLabels:{type:"boolean",description:"Defines whether labels should be shown or not. This is only valid for sublayers."},transparency:{type:"number",description:"Number value ranging between `0` (no transparency) to `100` (completely transparent)."}},description:"Drawing info container for renderer, labeling etc.",title:"IDrawingInfo"},ITypeInfoDomain:{type:"object",properties:{type:{type:"string"}},required:["type"],deprecated:"since 5.1. Won't be replaced.",title:"ITypeInfoDomain"},ITypeInfo:{type:"object",properties:{domains:{$ref:"#/definitions/Record%3Cstring%2CITypeInfoDomain%3E",description:"A comma-delimited series of domain objects for each domain in the type."},id:{type:["number","string"],description:"A unique string or numerical ID for the type."},name:{type:"string",description:"A user-friendly name for the type."},templates:{type:"array",items:{$ref:"#/definitions/ITemplate"},description:"Defined as a property of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types."}},deprecated:"since 5.1. Won't be replaced.",title:"ITypeInfo"},"Record<string,ITypeInfoDomain>":{type:"object",additionalProperties:{$ref:"#/definitions/ITypeInfoDomain"},title:"Record<string,ITypeInfoDomain>"},IOpenStreetMapLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"OpenStreetMap",description:"String indicating the layer type. Value of this property must be OpenStreetMap"},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"OpenStreetMap",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IOpenStreetMapLayer"},IExclusionArea:{type:"object",properties:{geometry:{$ref:"#/definitions/IGeometry",description:"The geometry defining the area where no data will be fetched. Only extent is supported."},maxScale:{type:"number",description:"The zoom level where the exclusion ends."},maxZoom:{type:"number",description:"The zoom level where the exclusion ends."},minScale:{type:"number",description:"The zoom level where the exclusion starts."},minZoom:{type:"number",description:"The zoom level where the exclusion starts."}},deprecated:"since 5.1. Won't be replaced.",title:"IExclusionArea"},ITiledMapServiceLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISTiledMapServiceLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},displayLevels:{anyOf:[{type:"array",items:{type:"number"}},{type:"number"}],description:"NOTE: Applicable if used as a baseMapLayer. Integer value(s) indicating the display levels of the basemap layer. Only applicable for TiledMapService layers. All tiled map service layers should share the same tiling scheme. This property cannot be set via the Map Viewer UI."},exclusionAreas:{type:"array",items:{$ref:"#/definitions/IExclusionArea"},description:"NOTE: Applicable if used as a baseMapLayer. An array of exclusionArea objects defining the layer exclusions."},isReference:{description:"This property is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},layers:{type:"array",items:{$ref:"#/definitions/IChildLayer"},description:"An array of layer objects defining a URL for queries and the popup window content."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"ITiledMapServiceLayer"},IVectorTileLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"VectorTileLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"VectorTileLayer",description:"Deprecated. User layerType instead."},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},styleUrl:{type:"string",description:"A url to a JSON file containing the stylesheet information used to render the layer. You may also pass an object containing the stylesheet information identical to the JSON file."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IVectorTileLayer"},ILod:{type:"object",properties:{level:{type:"number",description:"ID for each level."},levelValue:{type:"string",description:"String to be used when constructing URL to access a tile from this LOD."},resolution:{type:"number",description:"Resolution in map units of each pixel in a tile for each level."},scale:{type:"number",description:"Scale for each level."}},deprecated:"since 5.1. Won't be replaced.",title:"ILod"},ITileInfo:{type:"object",properties:{cols:{description:"Requested tile's column."},compressionQuality:{description:"Compression quality of the tile."},dpi:{description:"The dpi of the tiling scheme."},format:{type:"string",enum:["bmp","emf","gif","jpg","lerc","mixed","pdf","png","png8","png24","png32","ps","svg","svgz"],description:"Image format of the cached tiles."},lods:{type:"array",items:{$ref:"#/definitions/ILod"},description:"An array of levels of detail that define the tiling scheme."},origin:{$ref:"#/definitions/IPoint",description:"The tiling scheme origin."},rows:{description:"Requested tile's row."},spatialReference:{$ref:"#/definitions/ISpatialReference",description:"The spatial reference of the tiling schema."}},deprecated:"since 5.1. Won't be replaced.",title:"ITileInfo"},IWebMapTileServiceInfo:{type:"object",properties:{customLayerParameters:{description:"A sequence of parameters used to append different custom parameters to a WMTS tile request. These parameters are applied to GetTile. The customLayerParameters property takes precedence if customParameters is also present."},customParameters:{description:"A sequence of parameters used to append custom parameters to all WMTS requests. These parameters are applied to GetCapabilities and GetTile. If used with the customLayerParameters property, customParameters will not take precedence."},layerIdentifier:{type:"string",description:"Identifier for the specific layer used in the WMTS service. Required input by the user."},tileMatrixSet:{description:"Tiling schema, set by the WMTS service."},url:{type:"string",description:"URL to the WMTS web service. Required input by the user."}},required:["layerIdentifier","url"],deprecated:"since 5.1. Won't be replaced.",title:"IWebMapTileServiceInfo"},IWebTiledLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"WebTiledLayer",description:"String indicating the layer type. Value of this property must be WebTiledLayer"},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"WebTiledLayer",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},copyright:{description:"Attribution to the Web Tiled Layer provider. It is displayed in the attribution on the web map. Input required by the user when the layer is added to the web map."},fullExtent:{$ref:"#/definitions/IExtent",description:"An extent object representing the full extent envelope for the layer."},isReference:{description:"This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false)."},refreshInterval:{description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."},subDomains:{description:"If subdomains are detected, they must be specified. The map viewer detects if the Web Tiled Layer has subdomains by parsing the templateURL value for {subDomain}."},templateUrl:{description:"URL to the Web Tiled Layer. Input required by the user when the layer is added to the web map. The template URL contains a parameterized URL. The URL can contain the following templated parameters: 'level', 'col', 'row', and 'subDomain'."},tileInfo:{$ref:"#/definitions/ITileInfo",description:"Contains the spatial reference and the tiling scheme of the layer. Typically retrieved from a WMTS OGC Web Service. If missing the layer must be in the WGS 1984 Web Mercator (Auxiliary Sphere) tiling scheme."},wmtsInfo:{$ref:"#/definitions/IWebMapTileServiceInfo",description:"Object containing information about the chosen WMTS service layer and tiling schema."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IWebTiledLayer"},ICsvLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"CSV",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"CSV",description:"Deprecated, use layerType instead."},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},columnDelimiter:{type:"string",enum:[" ",",",";"," ","|"],description:"A string defining the character used to separate columns in a CSV file."},layerDefinition:{$ref:"#/definitions/ILayerDefinition",description:"A layerDefinition object defining the attribute schema and drawing information for the layer."},locationInfo:{description:"A locationInfo object defining how location information will be retrieved from a CSV file."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the content of popup windows when you click or query a feature."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"ICsvLayer"},IGeoRssLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"GeoRSS",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"GeoRSS",description:"Deprecated, please use layerType.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},lineSymbol:{$ref:"#/definitions/ISimpleLineSymbol",description:"Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have lines, this property is not added to the layer JSON."},pointSymbol:{$ref:"#/definitions/IPictureMarkerSymbol",description:"Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have points, this property is not added to the layer JSON."},polygonSymbol:{$ref:"#/definitions/ISimpleFillSymbol",description:"Defined by the GeoRSS to JSON request service. If the GeoRSS feed does not have polygons, this property is not added to the layer JSON."},refreshInterval:{type:"number",description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IGeoRssLayer"},IKmlLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"KML",description:"String indicating the layer type."},maxScale:{description:"A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator."},minScale:{description:"A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator."},opacity:{description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{description:"Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend."},title:{description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",const:"KML",description:"Deprecated, use layerType instead.",deprecated:"Use layerType instead."},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},refreshInterval:{description:"Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."},visibleFolders:{type:"array",items:{type:"number"},description:"Array of numeric IDs of folders that will be made visible."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IKmlLayer"},IArcGisStreamLayer:{type:"object",properties:{id:{description:"A unique identifying string for the layer."},name:{type:"string",description:"Layer name"},itemId:{type:"string",description:"Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."},layerType:{type:"string",const:"ArcGISStreamLayer",description:"String indicating the layer type."},maxScale:{type:"number",description:"Integer property used to determine the maximum scale at which the layer is displayed."},minScale:{type:"number",description:"Integer property used to determine the minimum scale at which the layer is displayed."},opacity:{type:"number",description:"The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."},showLegend:{type:"boolean",description:"Boolean property indicating whether to display in the legend."},title:{type:"string",description:"A user-friendly string title for the layer that can be used in a table of contents."},type:{type:"string",description:"Deprecated, use layerType instead.",deprecated:!0},visibility:{type:"boolean",description:"Boolean property determining whether the layer is initially visible in the web map."},url:{type:"string",description:"The URL to the layer. Not applicable to all layer types."},definitionEditor:{$ref:"#/definitions/IDefinitionEditor",description:"Stores interactive filters."},disablePopup:{type:"boolean",description:"Indicates whether to ignore popups defined by the service item."},layerDefinition:{$ref:"#/definitions/ILayerDefinition",description:"A layerDefinition object defining the attribute schema and drawing information for the layer."},popupInfo:{$ref:"#/definitions/IPopupInfo",description:"A popupInfo object defining the content of pop-up windows when you click or query a feature."}},required:["id","layerType"],deprecated:"since 5.1. Won't be replaced.",title:"IArcGisStreamLayer"}},$ref:"#/definitions/WebChart"};function Dx(t){let e=t.lastIndexOf("/");return e!==-1?t.slice(e+1):t}async function Nx(t,e){let r=e??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;return t.map(a=>{let i=a,n=a.dataPath.startsWith(".")?a.dataPath.substring(1):a.dataPath;switch(a.keyword){case Ir.Required:i={...a,message:qe(r.errors.requiredProperty,{dataPath:n,missingProperty:a.params.missingProperty})};break;case Ir.MinLength:i={...a,message:qe(r.errors.minLength,{dataPath:n,limit:a.params.limit.toString()})};break;case Ir.MinItems:i={...a,message:qe(r.errors.minItems,{dataPath:n,limit:a.params.limit.toString()})};break;case Ir.MaxItems:i={...a,message:qe(r.errors.maxItems,{dataPath:n,limit:a.params.limit.toString()})};break;case Ir.Pattern:a.params.pattern==="\\w+"&&(i={...a,message:qe(r.errors.whiteSpacePattern,{dataPath:n}),params:{}});break;case Ir.AdditionalProperties:i={...a,message:qe(r.errors.additionalProperty,{dataPath:n,additionalProperty:a.params.additionalProperty})};break;case Ir.Enum:i={...a,message:qe(r.errors.enumValues,{dataPath:n,allowedValues:a.params.allowedValues.join(", ")})};break;case Ir.AnyOf:{let s=[];a.schemaPath==="#/properties/legend/anyOf"&&(s=xi.definitions.WebChart.properties.legend.anyOf.map(o=>Dx(o.$ref))),i={...a,params:s,message:qe(r.errors.anyOfValues,{dataPath:n,schemaOptions:s.join(", ")})};break}}return i})}function dn(t,e){return{...t,$ref:`#/definitions/${e}`}}async function Bx(t,e){let r,a=e??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings,i=se(t);try{await i.load()}catch{let n=i?.url??"",s=ut(i)?.portalItem?.id??"";r={keyword:Ye.LayerLoadFailure,message:qe(a.errors.layerLoadFailure,{url:n,portalItemId:s}),params:{url:n,portalItemId:s}}}return r}function $x(){let t=new sp.default({allErrors:!0});return async(e,r)=>{let a=[],i=K(e?.series),n=xi;switch(i){case g.GaugeSeries:n=dn(xi,"WebGaugeChart");break;case g.BoxPlotSeries:n=dn(xi,"WebBoxPlot");break;case g.RadarSeries:n=dn(xi,"WebRadarChart");break;default:n=dn(xi,"WebChart");break}let s=t.compile(n);return s(e),s.errors!==null&&s.errors!==void 0&&(a=await Nx(s.errors,r)),a}}var Mx=$x();async function qx(t){let{seriesConfigs:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}=t,n=[],s=r?wt(r):void 0,o=i??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;for(let l=0;l<e.length;l+=1){let d=e[l].query?.outStatistics;if(d!==void 0)for(let c=0;c<d.length;c+=1){let u=d[c],f=kp(u.onStatisticField,s);if(f&&!(f.type===fe.OID&&a||Pi(f))&&u.statisticType!==W.Count){let p=`series[${l}].query.outStatistics[${c}]`;n.push({keyword:Lp.NonNumericAggregation,message:qe(o.errors.nonNumericAggregation,{dataPath:p}),dataPath:p,params:{fieldName:u.onStatisticField,fieldType:f.type,aggregationRequested:u.statisticType}})}}}return n}async function Rx(t,e){let r=[],a=e??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings;if(t!==void 0&&t.series.length>1){let i=new Set,n=0;t.series.forEach((s,o)=>{if(i.add(s.id),i.size===n){let l=`series[${o}].id`;r.push({keyword:Lp.DuplicateSeriesID,message:qe(a.errors.duplicateSeriesID,{dataPath:l,seriesID:s.id,seriesName:s.name}),dataPath:l,params:{seriesId:s.id,seriesName:s.name}})}else n+=1})}return r}function kx(t){let e=new Set,r=pr(t);if(r){let a=K(t.series),i=X(t.series);a===g.GaugeSeries&&!yo(t)||i===x.PieFromFields||i===x.BarAndLineFromFields||i===x.BoxPlotMonoField||i===x.BoxPlotMultiFields||i===x.BoxPlotMonoFieldAndSplitBy||i===x.BoxPlotMultiFieldsAndSplitBy||e.add(r.x);let n=a===g.ScatterSeries||a===g.BoxPlotSeries||a===g.HeatSeries||i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation||i===x.PieNoAggregation,s=[Di,lt,pb,Wt,fb,ue.outStatistics.outStatisticFieldName??""],o=[];rt(t)?o=In({showMean:t.showMean,seriesConfig:t.series}):o=t.series.map(d=>"y"in d?d.y:void 0).filter(d=>d!==void 0).flat(),n?o.forEach(d=>e.add(d)):s.push(...o),t.series.forEach(d=>{let{query:c}=d;c&&(or(c.where)||e.add(Ze(c.where)),c.groupByFieldsForStatistics&&c.groupByFieldsForStatistics.forEach(u=>e.add(u)),c.outStatistics&&c.outStatistics.forEach(u=>e.add(u.onStatisticField)))});let l=i===x.BarAndLineNoAggregation||i===x.BarAndLineSplitByNoAggregation||i===x.PieNoAggregation;if(t.orderOptions?.orderByFields&&l&&t.orderOptions.orderByFields.forEach(d=>{let c=jv(d).fieldToSort;e.add(c)}),a===g.GaugeSeries&&t.axes?.[0]!==void 0){let d=t.axes?.[0];d&&"minimumFromField"in d&&typeof d.minimumFromField=="string"&&e.add(d.minimumFromField),d&&"maximumFromField"in d&&typeof d.maximumFromField=="string"&&e.add(d.maximumFromField)}s.forEach(d=>{e.delete(d)})}return Array.from(e.values()).filter(a=>!_e(a))}async function Wx(t){let{chartConfig:e,queryObject:r,errorStrings:a}=t,i,n=a??(await $t(mt(document.documentElement).t9nLocale,Bt("./assets/common/t9n"),"messages.")).errorStrings,s=wt(r),o=kx(e).filter(l=>!kp(l,s));if(o.length>0){let l=o.join(", ");i={keyword:Ye.LayerFieldsNotFound,message:qe(n.errors.layerFieldsNotFound,{fieldNames:l}),params:l}}return i}async function jx(t){let{input:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}=t,n=[];if(r!==void 0){let s=await qx({seriesConfigs:e.series,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i});n=n.concat(s)}return n=n.concat(await Rx(e,i)),n}async function Vx(t){let{queryObject:e,chartConfig:r,errorStrings:a}=t,i=[];if(e!==void 0){let n=await Bx(e,a);if(n!==void 0)i=i.concat(n);else if(r!==void 0){let s=await Wx({chartConfig:r,queryObject:e,errorStrings:a});s!==void 0&&(i=i.concat(s))}}return i}async function KF(t){let{input:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}=t,n;if(dS(e?.version).versionStatus===mr.Newer)n={valid:!0,schemaErrors:[],customErrors:[],warnings:[]};else{let s=await Mx(e,i),o=[],l=[];e!==void 0&&s.length===0&&(l=await Vx({queryObject:r,chartConfig:e,errorStrings:i}),l.length===0&&(o=await jx({input:e,queryObject:r,allowUsingObjectIdStat:a,errorStrings:i}))),n={valid:s.length===0&&o.length===0&&l.length===0,schemaErrors:s,customErrors:l,warnings:o}}return n}function JF(t){let e=K(t?.series),r=!1;switch(e){case g.HistogramSeries:case g.GaugeSeries:{r=(t?.series?.[0]?.x?.trim()?.length??0)===0;break}case g.ScatterSeries:{let a=t?.series;r=(a?.[0]?.x?.length??0)===0||(a?.[0]?.y?.length??0)===0;break}case g.PieSeries:{let a=t?.series;X(a)===x.PieFromFields?r=(a?.[0]?.query?.outStatistics?.length??0)===0:r=(a?.[0]?.x?.length??0)===0||a?.[0]?.x===lt;break}case g.BoxPlotSeries:{let a=t?.series;r=[a?.[0]?.y].flat().length===0||a?.[0]?.y==="";break}case g.ComboLineAndBarSeries:case g.RadarSeries:case g.BarSeries:case g.LineSeries:{let a=t?.series;X(a)===x.BarAndLineFromFields?r=(a?.[0]?.query?.outStatistics?.length??0)===0:r=(a?.[0]?.x?.trim()?.length??0)===0;break}case g.HeatSeries:{let a=t?.series,i=_e(a?.[0]?.x)||_e(a?.[0]?.y),n=t!==void 0&&Hp(t)?!1:a?.[0]?.xTemporalBinning===void 0;r=i||n;break}}return r}async function Gs(t){let{queryObject:e,queryConfig:r,category:a,splitByField:i,chartLimits:n,abortKey:s}=t,o=i!==void 0,l=a!==Di?[a]:[];o&&l.push(i);let d=se(e),{idField:c,isTraditionalTypeOID:u}=_t(d),f=u?c:"*",p={...r,groupByFieldsForStatistics:Array.from(new Set(l)),outStatistics:[{statisticType:W.Count,onStatisticField:f,outStatisticFieldName:`${W.Count}_OBJECTID`}],orderByFields:void 0,num:n?.maxBarThreePlusSeriesCountTotal},h=await Dt({queryObject:e,featureCount:1,queryConfig:p,abortKey:s});return Array.from(new Set(h.map(y=>y.attributes[o?i:a]))).sort((y,m)=>typeof y=="string"&&typeof m=="string"?y.localeCompare(m):Number(y)-Number(m))}var ip=[{unit:Q.Second,threshold:6e4,unitMs:1e3,preferredIntervalSize:[1,2,3,5,6,10,12,15,20,30,60]},{unit:Q.Minute,threshold:36e5,unitMs:1e3*60,preferredIntervalSize:[1,2,3,5,6,10,12,15,20,30,60]},{unit:Q.Hour,threshold:864e5,unitMs:1e3*60*60,preferredIntervalSize:[1,2,3,4,6,8,12,24]},{unit:Q.Day,threshold:6048e5,unitMs:1e3*60*60*24,preferredIntervalSize:[1,2,3,4,5,6,7]},{unit:Q.Week,threshold:24192e5,unitMs:1e3*60*60*24*7,preferredIntervalSize:[1,2,3,4]},{unit:Q.Month,threshold:290304e5,unitMs:1e3*60*60*24*7*4,preferredIntervalSize:[1,2,3,4,6,12]},{unit:Q.Year,threshold:Number.MAX_SAFE_INTEGER,unitMs:1e3*60*60*24*7*4*12,preferredIntervalSize:[1,2,4,5,10,25,50,100]}],_x="{ groupByFieldsForStatistics } WHEN { dateField }>='{ startDate }' AND { dateField }{ endDateOperand }'{ endDate }' THEN '{ y }|{ binIndex}'",zx=[...Ln,"ar-u-nu-latn","en-AU","en-GB","es-ES","es-MX","de-CH","de-DE","de-AT","fr-CA","it-CH","it-IT"];function YF(t){let{t9nLocale:e}=mt(t??document.documentElement),r=cf(t??document.documentElement),a=Eo(t??document.documentElement)==="rtl";return{locale:e,formatLocale:r,rtl:a}}function XF(t){let e;return t==="unknown"?e="UTC":t!==void 0&&t!=="system"&&(e=t),e}function eI(t,e){let r={year:"numeric",month:"2-digit",day:"2-digit",timeZone:e};return new Intl.DateTimeFormat("en-CA",r).format(t)}function tI(t,e){let r={hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:e};return new Intl.DateTimeFormat("en-US",r).format(t)}function rI(t,e){let[,r,,,,a]=1111.1.toLocaleString(e),i=t.replace(r,"").replace(a,".");return Number.parseFloat(i)}function Ux(t){let e=Array.from(Ln);return zx.includes(t)&&!e.includes(t)}function cf(t){let{lang:e,t9nLocale:r}=mt(t);return Ux(e)?e:r}return{a:ie,b:dr,c:lt,d:Wt,e:pb,f:fb,g:ar,h:Ru,i:hb,j:Vt,k:P1,l:et,m:E1,n:nr,o:Zr,p:L1,q:D1,r:Cb,s:Tb,t:N1,u:ne,v:ue,w:B1,x:dt,y:Ob,z:$1,A:M1,B:hn,C:Di,D:te,E:q1,F:Ab,G:R1,H:k1,I:W1,J:j1,K:V1,L:_1,M:z1,N:Lt,O:up,P:U1,Q:Sn,R:ge,S:pp,T:de,U:sa,V:Eb,W:H1,X:Qs,Y:G1,Z:Q1,_:Nr,$:sn,aa:cr,ba:Z1,ca:Lb,da:Db,ea:Nb,fa:K1,ga:Bb,ha:$b,ia:Yr,ja:qb,ka:kb,la:J1,ma:Wb,na:Y1,oa:X1,pa:jb,qa:Vb,ra:eT,sa:tT,ta:ea,ua:rT,va:iT,wa:aT,xa:nT,ya:sT,za:oT,Aa:lT,Ba:dT,Ca:_b,Da:zb,Ea:Ub,Fa:cT,Ga:wn,Ha:uT,Ia:pT,Ja:Hb,Ka:fT,La:Gb,Ma:Qb,Na:Zb,Oa:hT,Pa:mT,Qa:A,Ra:yT,Sa:gT,Ta:bT,Ua:vT,Va:ST,Wa:wT,Xa:Jb,Ya:xT,Za:Fi,_a:ta,$a:Xb,ab:fp,bb:iv,cb:ku,db:CT,eb:mp,fb:TT,gb:FT,hb:IT,ib:ov,jb:OT,kb:AT,lb:PT,mb:ET,nb:LT,ob:uv,pb:bv,qb:DT,rb:NT,sb:Kr,tb:rt,ub:BT,vb:$T,wb:Ks,xb:Oi,yb:Tv,zb:MT,Ab:H,Bb:oo,Cb:Qe,Db:Ye,Eb:x,Fb:qT,Gb:wp,Hb:ju,Ib:RT,Jb:lo,Kb:xp,Lb:Ys,Mb:kT,Nb:WT,Ob:kv,Pb:_e,Qb:jT,Rb:VT,Sb:_T,Tb:zT,Ub:Wv,Vb:jv,Wb:UT,Xb:HT,Yb:GT,Zb:QT,_b:Pr,$b:Uv,ac:Ke,bc:Hv,cc:ia,dc:ZT,ec:Kt,fc:ut,gc:KT,hc:Ai,ic:JT,jc:se,kc:YT,lc:Dt,mc:XT,nc:a0,oc:n0,pc:Ae,qc:Lp,rc:ae,sc:eF,tc:tF,uc:z0,vc:rF,wc:$p,xc:la,yc:iF,zc:Rp,Ac:aF,Bc:nF,Cc:wt,Dc:kp,Ec:_t,Fc:Pi,Gc:Y0,Hc:sF,Ic:oF,Jc:lF,Kc:X0,Lc:dF,Mc:zu,Nc:rS,Oc:iS,Pc:cF,Qc:jp,Rc:uF,Sc:nS,Tc:sS,Uc:dS,Vc:pr,Wc:pF,Xc:Ze,Yc:ct,Zc:or,_c:X,$c:fr,ad:jt,bd:hS,cd:Uu,dd:CS,ed:fF,fd:hF,gd:mF,hd:yF,id:gF,jd:bF,kd:vF,ld:SF,md:wF,nd:xF,od:CF,pd:TF,qd:FF,rd:IF,sd:OF,td:AF,ud:PF,vd:EF,wd:LF,xd:DF,yd:NF,zd:BF,Ad:$F,Bd:MF,Cd:qF,Dd:VS,Ed:Hp,Fd:RF,Gd:kF,Hd:vn,Id:WF,Jd:jF,Kd:VF,Ld:dw,Md:_F,Nd:zF,Od:na,Pd:nf,Qd:yo,Rd:go,Sd:lf,Td:ze,Ud:Hs,Vd:it,Wd:Sx,Xd:UF,Yd:xx,Zd:ep,_d:Tx,$d:HF,ae:Ox,be:Ax,ce:rp,de:GF,ee:QF,fe:ZF,ge:KF,he:JF,ie:Gs,je:YF,ke:XF,le:eI,me:tI,ne:rI,oe:cf}},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","geometry/support/jsonUtils","layers/FeatureLayer","layers/support/CodedValueDomain","layers/support/Field","layers/support/fieldUtils","portal/Portal","request","rest/support/FeatureSet","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","AttributeBinsGraphic","intl","core/sql","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils","applications/Components/imageryUtils","layers/ImageryLayer","layers/ImageryTileLayer","layers/WCSLayer","geometry/Point","geometry/Extent")