aldehyde 0.2.100 → 0.2.102

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 (128) hide show
  1. package/lib/controls/action/index.d.ts.map +1 -1
  2. package/lib/controls/action/index.js +6 -5
  3. package/lib/controls/action/index.js.map +1 -1
  4. package/lib/controls/file-view/index.d.ts.map +1 -1
  5. package/lib/controls/file-view/index.js +2 -1
  6. package/lib/controls/file-view/index.js.map +1 -1
  7. package/lib/controls/rfield/index.d.ts +1 -0
  8. package/lib/controls/rfield/index.d.ts.map +1 -1
  9. package/lib/controls/rfield/index.js +16 -2
  10. package/lib/controls/rfield/index.js.map +1 -1
  11. package/{src/aldehyde/layout/menu/block.less → lib/layout/menu/block.css} +1 -1
  12. package/lib/layout/menu/block.d.ts +1 -1
  13. package/lib/layout/menu/block.d.ts.map +1 -1
  14. package/lib/layout/menu/block.js +1 -1
  15. package/lib/layout/menu/block.js.map +1 -1
  16. package/lib/tree/tmpl-tree.d.ts.map +1 -1
  17. package/lib/tree/tmpl-tree.js +23 -8
  18. package/lib/tree/tmpl-tree.js.map +1 -1
  19. package/package.json +1 -1
  20. package/src/aldehyde/controls/file-view/index.tsx +3 -1
  21. package/src/aldehyde/controls/rfield/index.tsx +19 -3
  22. package/src/aldehyde/layout/menu/block.css +11 -0
  23. package/src/aldehyde/layout/menu/block.tsx +1 -1
  24. package/dist/bundle.021f784b1c84781461d2.js +0 -1
  25. package/dist/bundle.03c542ca824e205fe307.js +0 -2
  26. package/dist/bundle.03c542ca824e205fe307.js.LICENSE.txt +0 -27
  27. package/dist/bundle.03c542ca824e205fe307.js.gz +0 -0
  28. package/dist/bundle.15cb660c34802f6cccf5.js +0 -1
  29. package/dist/bundle.15cb660c34802f6cccf5.js.gz +0 -0
  30. package/dist/bundle.2f9c2d692fe0277a37aa.js +0 -2
  31. package/dist/bundle.2f9c2d692fe0277a37aa.js.LICENSE.txt +0 -1
  32. package/dist/bundle.2f9c2d692fe0277a37aa.js.gz +0 -0
  33. package/dist/bundle.320c02187dd135005102.js +0 -2
  34. package/dist/bundle.320c02187dd135005102.js.LICENSE.txt +0 -6
  35. package/dist/bundle.320c02187dd135005102.js.gz +0 -0
  36. package/dist/bundle.35a4af7e2d0da1942d79.js +0 -10
  37. package/dist/bundle.35a4af7e2d0da1942d79.js.gz +0 -0
  38. package/dist/bundle.3f9072b1629cdb384b46.js +0 -2
  39. package/dist/bundle.3f9072b1629cdb384b46.js.LICENSE.txt +0 -5
  40. package/dist/bundle.3f9072b1629cdb384b46.js.gz +0 -0
  41. package/dist/bundle.46e2295b5360a725bcd5.js +0 -1
  42. package/dist/bundle.46e2295b5360a725bcd5.js.gz +0 -0
  43. package/dist/bundle.4c3c988531c3cf360b87.js +0 -1
  44. package/dist/bundle.4c3c988531c3cf360b87.js.gz +0 -0
  45. package/dist/bundle.4df89546fd2e9d665dfb.js +0 -2
  46. package/dist/bundle.4df89546fd2e9d665dfb.js.LICENSE.txt +0 -5
  47. package/dist/bundle.4df89546fd2e9d665dfb.js.gz +0 -0
  48. package/dist/bundle.5a9afb9ee6cceca506fa.js +0 -5
  49. package/dist/bundle.5a9afb9ee6cceca506fa.js.LICENSE.txt +0 -10
  50. package/dist/bundle.5a9afb9ee6cceca506fa.js.gz +0 -0
  51. package/dist/bundle.5e6cccd06b34a0e3a2ff.js +0 -1
  52. package/dist/bundle.5e6cccd06b34a0e3a2ff.js.gz +0 -0
  53. package/dist/bundle.62c62e6aaa7f3c20761e.js +0 -2
  54. package/dist/bundle.62c62e6aaa7f3c20761e.js.LICENSE.txt +0 -17
  55. package/dist/bundle.62c62e6aaa7f3c20761e.js.gz +0 -0
  56. package/dist/bundle.6fd2dadd29083268c5a6.js +0 -2
  57. package/dist/bundle.6fd2dadd29083268c5a6.js.LICENSE.txt +0 -17
  58. package/dist/bundle.6fd2dadd29083268c5a6.js.gz +0 -0
  59. package/dist/bundle.8241d8d05e35988dd480.js +0 -1
  60. package/dist/bundle.8241d8d05e35988dd480.js.gz +0 -0
  61. package/dist/bundle.829683dfa6a98c78c58e.js +0 -2
  62. package/dist/bundle.829683dfa6a98c78c58e.js.LICENSE.txt +0 -14
  63. package/dist/bundle.829683dfa6a98c78c58e.js.gz +0 -0
  64. package/dist/bundle.840e28984e710e12f467.js +0 -75
  65. package/dist/bundle.840e28984e710e12f467.js.LICENSE.txt +0 -8
  66. package/dist/bundle.840e28984e710e12f467.js.gz +0 -0
  67. package/dist/bundle.85ce5221fe6ab1d91f7d.js +0 -2
  68. package/dist/bundle.85ce5221fe6ab1d91f7d.js.LICENSE.txt +0 -1
  69. package/dist/bundle.85ce5221fe6ab1d91f7d.js.gz +0 -0
  70. package/dist/bundle.9cfd99a04bde7f781c30.js +0 -1
  71. package/dist/bundle.9cfd99a04bde7f781c30.js.gz +0 -0
  72. package/dist/bundle.a049dc8814bbbf59160f.js +0 -1
  73. package/dist/bundle.a049dc8814bbbf59160f.js.gz +0 -0
  74. package/dist/bundle.a94f7811fac19aa9d6a3.js +0 -2
  75. package/dist/bundle.a94f7811fac19aa9d6a3.js.LICENSE.txt +0 -1
  76. package/dist/bundle.a94f7811fac19aa9d6a3.js.gz +0 -0
  77. package/dist/bundle.abdde6e82ee9f60d1bf3.js +0 -2
  78. package/dist/bundle.abdde6e82ee9f60d1bf3.js.LICENSE.txt +0 -30
  79. package/dist/bundle.abdde6e82ee9f60d1bf3.js.gz +0 -0
  80. package/dist/bundle.b207a66d5902f39d0c5a.js +0 -1
  81. package/dist/bundle.b207a66d5902f39d0c5a.js.gz +0 -0
  82. package/dist/bundle.b7b86a025aa95dea0e19.js +0 -2
  83. package/dist/bundle.b7b86a025aa95dea0e19.js.LICENSE.txt +0 -8
  84. package/dist/bundle.b7b86a025aa95dea0e19.js.gz +0 -0
  85. package/dist/bundle.b7e3eb480b649b3de67b.js +0 -2
  86. package/dist/bundle.b7e3eb480b649b3de67b.js.LICENSE.txt +0 -5
  87. package/dist/bundle.b7e3eb480b649b3de67b.js.gz +0 -0
  88. package/dist/bundle.c1c6028fd703ebf78c2e.js +0 -2
  89. package/dist/bundle.c1c6028fd703ebf78c2e.js.LICENSE.txt +0 -5
  90. package/dist/bundle.c1c6028fd703ebf78c2e.js.gz +0 -0
  91. package/dist/bundle.cd10ae07e0e0c36d0dee.js +0 -2
  92. package/dist/bundle.cd10ae07e0e0c36d0dee.js.LICENSE.txt +0 -22
  93. package/dist/bundle.cd10ae07e0e0c36d0dee.js.gz +0 -0
  94. package/dist/bundle.cf6a1933769c2aee4e6e.js +0 -1
  95. package/dist/bundle.cf6a1933769c2aee4e6e.js.gz +0 -0
  96. package/dist/bundle.d158d417d1d7a8acb2a1.js +0 -1
  97. package/dist/bundle.d158d417d1d7a8acb2a1.js.gz +0 -0
  98. package/dist/bundle.db40aa107272f4303ece.js +0 -1
  99. package/dist/bundle.db40aa107272f4303ece.js.gz +0 -0
  100. package/dist/bundle.ddefe6d8f235ef95d470.js +0 -1
  101. package/dist/bundle.ddefe6d8f235ef95d470.js.gz +0 -0
  102. package/dist/bundle.e02a7a16b4a6b3bb412f.js +0 -2
  103. package/dist/bundle.e02a7a16b4a6b3bb412f.js.LICENSE.txt +0 -16
  104. package/dist/bundle.e02a7a16b4a6b3bb412f.js.gz +0 -0
  105. package/dist/bundle.e760a70171cf0ae4567b.js +0 -1
  106. package/dist/bundle.e760a70171cf0ae4567b.js.gz +0 -0
  107. package/dist/bundle.f3ce062a620fe456c152.js +0 -1
  108. package/dist/bundle.f6e1c4fda58154810fe2.js +0 -2
  109. package/dist/bundle.f6e1c4fda58154810fe2.js.LICENSE.txt +0 -41
  110. package/dist/bundle.f6e1c4fda58154810fe2.js.gz +0 -0
  111. package/dist/bundle.fe9c09b8ace9c3117b0a.js +0 -1
  112. package/dist/bundle.fe9c09b8ace9c3117b0a.js.gz +0 -0
  113. package/dist/bundle.feaa17bec2057a4ee54f.js +0 -1
  114. package/dist/bundle.feaa17bec2057a4ee54f.js.gz +0 -0
  115. package/dist/css/chemstruc-graph-6437e59640f8b99b774f.css +0 -12
  116. package/dist/css/chemstruc-graph-6437e59640f8b99b774f.css.gz +0 -0
  117. package/dist/css/common-901df6b21f13391f2a53.css +0 -56
  118. package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css +0 -886
  119. package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css.gz +0 -0
  120. package/dist/css/main-f3c8fdebab315e61e7be.css +0 -865
  121. package/dist/css/main-f3c8fdebab315e61e7be.css.gz +0 -0
  122. package/dist/images/development-30de07a0.png +0 -0
  123. package/dist/images/logo-54b328b7.png +0 -0
  124. package/dist/images/pain-point-8f02421e.png +0 -0
  125. package/dist/images/target-13a5b4b9.png +0 -0
  126. package/dist/images/time-cost-cb40d2c2.png +0 -0
  127. package/dist/images/time-prograss-44b86b36.png +0 -0
  128. package/dist/index.html +0 -4
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[112],{47404:function(e,t,n){n.d(t,{Ar:function(){return c},Bc:function(){return ne},OO:function(){return he},et:function(){return a},wm:function(){return J},yU:function(){return ue}});var o=n(6585),r=n(1371),i=n(15874);class s{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=(0,i.mv)(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),o=t.text.slice(n-t.from,this.pos-t.from),r=o.search(f(e,!1));return r<0?null:{from:n+r,to:this.pos,text:o.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function l(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function a(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,o]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:o}of e){t[o[0]]=!0;for(let e=1;e<o.length;e++)n[o[e]]=!0}let o=l(t)+l(n)+"*$";return[new RegExp("^"+o),new RegExp(o)]}(t);return e=>{let r=e.matchBefore(o);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:n}:null}}function c(e,t){return n=>{for(let t=(0,i.mv)(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class u{constructor(e,t,n,o){this.completion=e,this.source=t,this.match=n,this.score=o}}function h(e){return e.selection.main.from}function f(e,t){var n;let{source:o}=e,r=t&&"^"!=o[0],i="$"!=o[o.length-1];return r||i?new RegExp(`${r?"^":""}(?:${o})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const d=o.YH.define(),p=new WeakMap;function m(e){if(!Array.isArray(e))return e;let t=p.get(e);return t||p.set(e,t=a(e)),t}const g=o.Pe.define(),v=o.Pe.define();class y{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=(0,o.vS)(e,t),r=(0,o.Fh)(n);this.chars.push(n);let i=e.slice(t,t+r),s=i.toUpperCase();this.folded.push((0,o.vS)(s==i?i.toLowerCase():s,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:s}=this;if(1==t.length){let r=(0,o.vS)(e,0),i=(0,o.Fh)(r),s=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;s+=-200}return this.ret(s,[0,i])}let l=e.indexOf(this.pattern);if(0==l)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,c=0;if(l<0){for(let i=0,s=Math.min(e.length,200);i<s&&c<a;){let s=(0,o.vS)(e,i);s!=t[c]&&s!=n[c]||(r[c++]=i),i+=(0,o.Fh)(s)}if(c<a)return null}let u=0,h=0,f=!1,d=0,p=-1,m=-1,g=/[a-z]/.test(e),v=!0;for(let r=0,c=Math.min(e.length,200),y=0;r<c&&h<a;){let c=(0,o.vS)(e,r);l<0&&(u<a&&c==t[u]&&(i[u++]=r),d<a&&(c==t[d]||c==n[d]?(0==d&&(p=r),m=r+1,d++):d=0));let k,b=c<255?c>=48&&c<=57||c>=97&&c<=122?2:c>=65&&c<=90?1:0:(k=(0,o.MK)(c))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!r||1==b&&g||0==y&&0!=b)&&(t[h]==c||n[h]==c&&(f=!0)?s[h++]=r:s.length&&(v=!1)),y=b,r+=(0,o.Fh)(c)}return h==a&&0==s[0]&&v?this.result((f?-200:0)-100,s,e):d==a&&0==p?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[p,m]):h==a?this.result((f?-200:0)-100-700+(v?0:-1100),s,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?(0,o.Fh)((0,o.vS)(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}}class k{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const b=o.sj.define({combine(e){return(0,o.QR)(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:O,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>w(e(n),t(n)),optionClass:(e,t)=>n=>w(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function w(e,t){return e?t?e+" "+t:e:t}function O(e,t,n,o,i,s){let l,a,c=e.textDirection==r.OP.RTL,u=c,h=!1,f="top",d=t.left-i.left,p=i.right-t.right,m=o.right-o.left,g=o.bottom-o.top;if(u&&d<Math.min(m,p)?u=!1:!u&&p<Math.min(m,d)&&(u=!0),m<=(u?d:p))l=Math.max(i.top,Math.min(n.top,i.bottom-g))-t.top,a=Math.min(400,u?d:p);else{h=!0,a=Math.min(400,(c?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=g||e>t.top?l=n.bottom-t.top:(f="bottom",l=t.bottom-n.top)}return{style:`${f}: ${l/((t.bottom-t.top)/s.offsetHeight)}px; max-width: ${a/((t.right-t.left)/s.offsetWidth)}px`,class:"cm-completionInfo-"+(h?c?"left-narrow":"right-narrow":u?"left":"right")}}function x(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let o=Math.floor((e-t)/n);return{from:e-(o+1)*n,to:e-o*n}}class A{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let o=e.state.field(t),{options:r,selected:i}=o.open,s=e.state.facet(b);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,o){let r=document.createElement("span");r.className="cm-completionLabel";let i=e.displayLabel||e.label,s=0;for(let e=0;e<o.length;){let t=o[e++],n=o[e++];t>s&&r.appendChild(document.createTextNode(i.slice(s,t)));let l=r.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(i.slice(t,n))),l.className="cm-completionMatchedText",s=n}return s<i.length&&r.appendChild(document.createTextNode(i.slice(s))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.position-t.position)).map((e=>e.render))}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=x(r.length,i,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(n=>{let{options:o}=e.state.field(t).open;for(let t,r=n.target;r&&r!=this.dom;r=r.parentNode)if("LI"==r.nodeName&&(t=/-(\d+)$/.exec(r.id))&&+t[1]<o.length)return this.applyCompletion(e,o[+t[1]]),void n.preventDefault()})),this.dom.addEventListener("focusout",(t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(b).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:v.of(null)})})),this.showOptions(r,o.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let n=e.state.field(this.stateField),o=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=o){let{options:r,selected:i,disabled:s}=n.open;o.open&&o.open.options==r||(this.range=x(r.length,i,e.state.facet(b).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),s!=(null===(t=o.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=x(t.options.length,t.selected,this.view.state.facet(b).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:o}=n;if(!o)return;let i="string"==typeof o?document.createTextNode(o):o(n);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)})).catch((e=>(0,r.c_)(this.view.state,e,"completion info"))):this.addInfoPane(i,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:o}=e;n.appendChild(t),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,o=this.range.from;n;n=n.nextSibling,o++)"LI"==n.nodeName&&n.id?o==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):o--;return t&&function(e,t){let n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=n.height/e.offsetHeight;o.top<n.top?e.scrollTop-=(n.top-o.top)/r:o.bottom>n.bottom&&(e.scrollTop+=(o.bottom-n.bottom)/r)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),r=this.space;if(!r){let e=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return o.top>Math.min(r.bottom,t.bottom)-10||o.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(b).positionInfo(this.view,t,o,n,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const o=document.createElement("ul");o.id=t,o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.setAttribute("aria-label",this.view.state.phrase("Completions"));let r=null;for(let i=n.from;i<n.to;i++){let{completion:s,match:l}=e[i],{section:a}=s;if(a){let e="string"==typeof a?a:a.name;e!=r&&(i>n.from||0==n.from)&&(r=e,"string"!=typeof a&&a.header?o.appendChild(a.header(a)):o.appendChild(document.createElement("completion-section")).textContent=e)}const c=o.appendChild(document.createElement("li"));c.id=t+"-"+i,c.setAttribute("role","option");let u=this.optionClass(s);u&&(c.className=u);for(let e of this.optionContent){let t=e(s,this.view.state,this.view,l);t&&c.appendChild(t)}}return n.from&&o.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&o.classList.add("cm-completionListIncompleteBottom"),o}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function C(e,t){return n=>new A(n,e,t)}function S(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class P{constructor(e,t,n,o,r,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=o,this.selected=r,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new P(this.options,B(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,o,r){let i=function(e,t){let n=[],o=null,r=e=>{n.push(e);let{section:t}=e.completion;if(t){o||(o=[]);let e="string"==typeof t?t:t.name;o.some((t=>t.name==e))||o.push("string"==typeof t?{name:e}:t)}},i=t.facet(b);for(let o of e)if(o.hasResult()){let e=o.result.getMatch;if(!1===o.result.filter)for(let t of o.result.options)r(new u(t,o.source,e?e(t):[],1e9-n.length));else{let n,s=t.sliceDoc(o.from,o.to),l=i.filterStrict?new k(s):new y(s);for(let t of o.result.options)if(n=l.match(t.label)){let i=t.displayLabel?e?e(t,n.matched):[]:n.matched;r(new u(t,o.source,i,n.score+(t.boost||0)))}}}if(o){let e=Object.create(null),t=0,r=(e,t)=>{var n,o;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(o=t.rank)&&void 0!==o?o:1e9)||(e.name<t.name?-1:1)};for(let n of o.sort(r))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let s=[],l=null,a=i.compareCompletions;for(let e of n.sort(((e,t)=>t.score-e.score||a(e.completion,t.completion)))){let t=e.completion;!l||l.label!=t.label||l.detail!=t.detail||null!=l.type&&null!=t.type&&l.type!=t.type||l.apply!=t.apply||l.boost!=t.boost?s.push(e):S(e.completion)>S(l)&&(s[s.length-1]=e),l=e.completion}return s}(e,t);if(!i.length)return o&&e.some((e=>1==e.state))?new P(o.options,o.attrs,o.tooltip,o.timestamp,o.selected,!0):null;let s=t.facet(b).selectOnOpen?0:-1;if(o&&o.selected!=s&&-1!=o.selected){let e=o.options[o.selected].completion;for(let t=0;t<i.length;t++)if(i[t].completion==e){s=t;break}}return new P(i,B(n,s),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:E,above:r.aboveCursor},o?o.timestamp:Date.now(),s,!1)}map(e){return new P(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class T{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new T(I,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(b),o=(n.override||t.languageDataAt("autocomplete",h(t)).map(m)).map((t=>(this.active.find((e=>e.source==t))||new Q(t,this.active.some((e=>0!=e.state))?1:0)).update(e,n)));o.length==this.active.length&&o.every(((e,t)=>e==this.active[t]))&&(o=this.active);let r=this.open;r&&e.docChanged&&(r=r.map(e.changes)),e.selection||o.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,o=0;;){for(;n<e.length&&!e[n].hasResult;)n++;for(;o<t.length&&!t[o].hasResult;)o++;let r=n==e.length,i=o==t.length;if(r||i)return r==i;if(e[n++].result!=t[o++].result)return!1}}(o,this.active)?r=P.build(o,t,this.id,r,n):r&&r.disabled&&!o.some((e=>1==e.state))&&(r=null),!r&&o.every((e=>1!=e.state))&&o.some((e=>e.hasResult()))&&(o=o.map((e=>e.hasResult()?new Q(e.source,0):e)));for(let t of e.effects)t.is(_)&&(r=r&&r.setSelected(t.value,this.id));return o==this.active&&r==this.open?this:new T(o,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:D}}const D={"aria-autocomplete":"list"};function B(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const I=[];function M(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(d);if(n&&t.activateOnCompletion(n))return"input"}return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class Q{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=M(e,t),o=this;n?o=o.handleUserEvent(e,n,t):e.docChanged?o=o.handleChange(e):e.selection&&0!=o.state&&(o=new Q(o.source,0));for(let t of e.effects)if(t.is(g))o=new Q(o.source,1,t.value?h(e.state):-1);else if(t.is(v))o=new Q(o.source,0);else if(t.is(L))for(let e of t.value)e.source==o.source&&(o=e);return o}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new Q(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(h(e.startState))?new Q(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Q(this.source,this.state,e.mapPos(this.explicitPos))}}class R extends Q{constructor(e,t,n,o,r){super(e,2,t),this.result=n,this.from=o,this.to=r}hasResult(){return!0}handleUserEvent(e,t,n){var o;let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let i=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),a=h(e.state);if((this.explicitPos<0?a<=i:a<this.from)||a>l||!r||"delete"==t&&h(e.startState)==this.from)return new Q(this.source,"input"==t&&n.activateOnTyping?1:0);let c=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,o){if(!e)return!1;let r=t.sliceDoc(n,o);return"function"==typeof e?e(r,n,o,t):f(e,!0).test(r)}(r.validFor,e.state,i,l)?new R(this.source,c,r,i,l):r.update&&(r=r.update(r,i,l,new s(e.state,a,c>=0)))?new R(this.source,c,r,r.from,null!==(o=r.to)&&void 0!==o?o:h(e.state)):new Q(this.source,1,c)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Q(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new R(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Q(this.source,0)}}const L=o.Pe.define({map(e,t){return e.map((e=>e.map(t)))}}),_=o.Pe.define(),N=o.sU.define({create(){return T.start()},update(e,t){return e.update(t)},provide:e=>[r.DK.from(e,(e=>e.tooltip)),r.Lz.contentAttributes.from(e,(e=>e.attrs))]});function U(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(N).active.find((e=>e.source==t.source));return r instanceof R&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:i}=e.selection,s=n-i.from,l=r-i.from;return Object.assign(Object.assign({},e.changeByRange((a=>a!=i&&n!=r&&e.sliceDoc(a.from+s,a.from+l)!=e.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+s,to:r==i.from?a.to:a.from+l,insert:t},range:o.OF.cursor(a.from+s+t.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:d.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}const E=C(N,U);function F(e,t="option"){return n=>{let o=n.state.field(N,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp<n.state.facet(b).interactionDelay)return!1;let i,s=1;"page"==t&&(i=(0,r.Eg)(n,o.open.tooltip))&&(s=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:l}=o.open.options,a=o.open.selected>-1?o.open.selected+s*(e?1:-1):e?0:l-1;return a<0?a="page"==t?0:l-1:a>=l&&(a="page"==t?l-1:0),n.dispatch({effects:_.of(a)}),!0}}class j{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const z=r.Z9.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(N).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(N),n=e.state.facet(b);if(!e.selectionSet&&!e.docChanged&&e.startState.field(N)==t)return;let o=e.transactions.some((e=>(e.selection||e.docChanged)&&!M(e,n)));for(let t=0;t<this.running.length;t++){let n=this.running[t];if(o||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){(0,r.c_)(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((e=>e.effects.some((e=>e.is(g)))))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),i):-1,0!=this.composing)for(let t of e.transactions)"input"==M(t,n)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(N);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,n=h(t),o=new s(t,n,e.explicitPos==n),i=new j(e,o);this.running.push(i),Promise.resolve(e.source(o)).then((e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:v.of(null)}),(0,r.c_)(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(b).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(b);for(let o=0;o<this.running.length;o++){let r=this.running[o];if(void 0===r.done)continue;if(this.running.splice(o--,1),r.done){let o=new R(r.active.source,r.active.explicitPos,r.done,r.done.from,null!==(e=r.done.to)&&void 0!==e?e:h(r.updates.length?r.updates[0].startState:this.view.state));for(let e of r.updates)o=o.update(e,n);if(o.hasResult()){t.push(o);continue}}let i=this.view.state.field(N).active.find((e=>e.source==r.active.source));if(i&&1==i.state)if(null==r.done){let e=new Q(r.active.source,0);for(let t of r.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(i)}t.length&&this.view.dispatch({effects:L.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(N,!1);if(t&&t.tooltip&&this.view.state.facet(b).closeOnBlur){let n=t.open&&(0,r.Eg)(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:v.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:g.of(!1)})),20),this.composing=0}}}),$="object"==typeof navigator&&/Win/.test(navigator.platform),Z=o.Nb.highest(r.Lz.domEventHandlers({keydown(e,t){let n=t.state.field(N,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!$||!e.altKey)||e.metaKey)return!1;let o=n.open.options[n.open.selected],r=n.active.find((e=>e.source==o.source)),i=o.completion.commitCharacters||r.result.commitCharacters;return i&&i.indexOf(e.key)>-1&&U(t,o),!1}})),V=r.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),q={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},H=o.Pe.define({map(e,t){let n=t.mapPos(e,-1,o.iR.TrackAfter);return null==n?void 0:n}}),W=new class extends o.FB{};W.startSide=1,W.endSide=-1;const X=o.sU.define({create(){return o.om.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(H)&&(e=e.update({add:[W.range(n.value,n.value+1)]}));return e}});function J(){return[te,X]}const Y="()[]{}<>";function K(e){for(let t=0;t<8;t+=2)if(Y.charCodeAt(t)==e)return Y.charAt(t+1);return(0,o.MK)(e<128?e:e+1)}function G(e,t){return e.languageDataAt("closeBrackets",t)[0]||q}const ee="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),te=r.Lz.inputHandler.of(((e,t,n,r)=>{if((ee?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==(0,o.Fh)((0,o.vS)(r,0))||t!=i.from||n!=i.to)return!1;let s=function(e,t){let n=G(e,e.selection.main.head),r=n.brackets||q.brackets;for(let i of r){let s=K((0,o.vS)(i,0));if(t==i)return s==i?le(e,i,r.indexOf(i+i+i)>-1,n):ie(e,i,s,n.before||q.before);if(t==s&&oe(e,e.selection.main.from))return se(e,0,s)}return null}(e.state,r);return!!s&&(e.dispatch(s),!0)})),ne=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=G(e,e.selection.main.head).brackets||q.brackets,r=null,i=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return(0,o.Fh)((0,o.vS)(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&re(e.doc,t.head)==K((0,o.vS)(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:o.OF.cursor(t.head-i.length)}}return{range:r=t}}));return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function oe(e,t){let n=!1;return e.field(X).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function re(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,o.Fh)((0,o.vS)(n,0)))}function ie(e,t,n,r){let i=null,s=e.changeByRange((s=>{if(!s.empty)return{changes:[{insert:t,from:s.from},{insert:n,from:s.to}],effects:H.of(s.to+t.length),range:o.OF.range(s.anchor+t.length,s.head+t.length)};let l=re(e.doc,s.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:t+n,from:s.head},effects:H.of(s.head+t.length),range:o.OF.cursor(s.head+t.length)}:{range:i=s}}));return i?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function se(e,t,n){let r=null,i=e.changeByRange((t=>t.empty&&re(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:o.OF.cursor(t.head+n.length)}:r={range:t}));return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function le(e,t,n,r){let s=r.stringPrefixes||q.stringPrefixes,l=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:H.of(r.to+t.length),range:o.OF.range(r.anchor+t.length,r.head+t.length)};let a,c=r.head,u=re(e.doc,c);if(u==t){if(ae(e,c))return{changes:{insert:t+t,from:c},effects:H.of(c+t.length),range:o.OF.cursor(c+t.length)};if(oe(e,c)){let r=n&&e.sliceDoc(c,c+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:c,to:c+r.length,insert:r},range:o.OF.cursor(c+r.length)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(a=ce(e,c-2*t.length,s))>-1&&ae(e,a))return{changes:{insert:t+t+t+t,from:c},effects:H.of(c+t.length),range:o.OF.cursor(c+t.length)};if(e.charCategorizer(c)(u)!=o.Je.Word&&ce(e,c,s)>-1&&!function(e,t,n,o){let r=(0,i.mv)(e).resolveInner(t,-1),s=o.reduce(((e,t)=>Math.max(e,t.length)),0);for(let i=0;i<5;i++){let i=e.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=i.indexOf(n);if(!l||l>-1&&o.indexOf(i.slice(0,l))>-1){let t=r.firstChild;for(;t&&t.from==r.from&&t.to-t.from>n.length+l;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let a=r.to==t&&r.parent;if(!a)break;r=a}return!1}(e,c,t,s))return{changes:{insert:t+t,from:c},effects:H.of(c+t.length),range:o.OF.cursor(c+t.length)}}return{range:l=r}}));return l?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function ae(e,t){let n=(0,i.mv)(e).resolveInner(t+1);return n.parent&&n.from==t}function ce(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=o.Je.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=o.Je.Word)return n}return-1}function ue(e={}){return[Z,N,b.of(e),z,fe,V]}const he=[{key:"Ctrl-Space",run:e=>!!e.state.field(N,!1)&&(e.dispatch({effects:g.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(N,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:v.of(null)}),0))}},{key:"ArrowDown",run:F(!0)},{key:"ArrowUp",run:F(!1)},{key:"PageDown",run:F(!0,"page")},{key:"PageUp",run:F(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(N,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(b).interactionDelay)&&U(e,t.open.options[t.open.selected])}}],fe=o.Nb.highest(r.w4.computeN([b],(e=>e.facet(b).defaultKeymap?[he]:[])))},49075:function(e,t,n){n.d(t,{ll:function(){return E}});var o=n(15874),r=n(43720),i=n(48820),s=n(47404);const l=20,a=21;function c(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function u(e,t,n){for(let o=!1;;){if(e.next<0)return;if(e.next==t&&!o)return void e.advance();o=n&&!o&&92==e.next,e.advance()}}function h(e,t){for(;95==e.next||c(e.next);)null!=t&&(t+=String.fromCharCode(e.next)),e.advance();return t}function f(e,t){for(;48==e.next||49==e.next;)e.advance();t&&e.next==t&&e.advance()}function d(e,t){for(;;){if(46==e.next){if(t)break;t=!0}else if(e.next<48||e.next>57)break;e.advance()}if(69==e.next||101==e.next)for(e.advance(),43!=e.next&&45!=e.next||e.advance();e.next>=48&&e.next<=57;)e.advance()}function p(e){for(;!(e.next<0||10==e.next);)e.advance()}function m(e,t){for(let n=0;n<t.length;n++)if(t.charCodeAt(n)==e)return!0;return!1}const g=" \t\r\n";function v(e,t,n){let o=Object.create(null);o.true=o.false=5,o.null=o.unknown=6;for(let t of e.split(" "))t&&(o[t]=l);for(let e of t.split(" "))e&&(o[e]=a);for(let e of(n||"").split(" "))e&&(o[e]=24);return o}const y={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',words:v("absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ","array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ")};function k(e){return new i.Lu((t=>{var n;let{next:o}=t;if(t.advance(),m(o,g)){for(;m(t.next,g);)t.advance();t.acceptToken(36)}else if(36==o&&e.doubleDollarQuotedStrings){let e=h(t,"");36==t.next&&(t.advance(),function(e,t){e:for(;;){if(e.next<0)return console.log("exit at end",e.pos);if(36==e.next){e.advance();for(let n=0;n<t.length;n++){if(e.next!=t.charCodeAt(n))continue e;e.advance()}if(36==e.next)return void e.advance()}else e.advance()}}(t,e),t.acceptToken(3))}else if(39==o||34==o&&e.doubleQuotedStrings)u(t,o,e.backslashEscapes),t.acceptToken(3);else if(35==o&&e.hashComments||47==o&&47==t.next&&e.slashComments)p(t),t.acceptToken(1);else if(45!=o||45!=t.next||e.spaceAfterDashes&&32!=t.peek(1))if(47==o&&42==t.next){t.advance();for(let e=1;;){let n=t.next;if(t.next<0)break;if(t.advance(),42==n&&47==t.next){if(e--,t.advance(),!e)break}else 47==n&&42==t.next&&(e++,t.advance())}t.acceptToken(2)}else if(101!=o&&69!=o||39!=t.next)if(110!=o&&78!=o||39!=t.next||!e.charSetCasts)if(95==o&&e.charSetCasts)for(let n=0;;n++){if(39==t.next&&n>1){t.advance(),u(t,39,e.backslashEscapes),t.acceptToken(3);break}if(!c(t.next))break;t.advance()}else if(e.plsqlQuotingMechanism&&(113==o||81==o)&&39==t.next&&t.peek(1)>0&&!m(t.peek(1),g)){let e=t.peek(1);t.advance(2),function(e,t){let n="[{<(".indexOf(String.fromCharCode(t)),o=n<0?t:"]}>)".charCodeAt(n);for(;;){if(e.next<0)return;if(e.next==o&&39==e.peek(1))return void e.advance(2);e.advance()}}(t,e),t.acceptToken(3)}else if(40==o)t.acceptToken(7);else if(41==o)t.acceptToken(8);else if(123==o)t.acceptToken(9);else if(125==o)t.acceptToken(10);else if(91==o)t.acceptToken(11);else if(93==o)t.acceptToken(12);else if(59==o)t.acceptToken(13);else if(e.unquotedBitLiterals&&48==o&&98==t.next)t.advance(),f(t),t.acceptToken(22);else if(98!=o&&66!=o||39!=t.next&&34!=t.next){if(48==o&&(120==t.next||88==t.next)||(120==o||88==o)&&39==t.next){let e=39==t.next;for(t.advance();(r=t.next)>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70;)t.advance();e&&39==t.next&&t.advance(),t.acceptToken(4)}else if(46==o&&t.next>=48&&t.next<=57)d(t,!0),t.acceptToken(4);else if(46==o)t.acceptToken(14);else if(o>=48&&o<=57)d(t,!1),t.acceptToken(4);else if(m(o,e.operatorChars)){for(;m(t.next,e.operatorChars);)t.advance();t.acceptToken(15)}else if(m(o,e.specialVar))t.next==o&&t.advance(),function(e){if(39==e.next||34==e.next||96==e.next){let t=e.next;e.advance(),u(e,t,!1)}else h(e)}(t),t.acceptToken(17);else if(m(o,e.identifierQuotes))u(t,o,!1),t.acceptToken(19);else if(58==o||44==o)t.acceptToken(16);else if(c(o)){let r=h(t,String.fromCharCode(o));t.acceptToken(46==t.next||46==t.peek(-r.length-1)?18:null!==(n=e.words[r.toLowerCase()])&&void 0!==n?n:18)}}else{const n=t.next;t.advance(),e.treatBitsAsBytes?(u(t,n,e.backslashEscapes),t.acceptToken(23)):(f(t,n),t.acceptToken(22))}else t.advance(),u(t,39,e.backslashEscapes),t.acceptToken(3);else t.advance(),u(t,39,!0);else p(t),t.acceptToken(1);var r}))}const b=k(y),w=i.U1.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,b],topRules:{Script:[0,25]},tokenPrec:0});function O(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function x(e,t){let n=e.sliceString(t.from,t.to),o=/^([`'"])(.*)\1$/.exec(n);return o?o[2]:n}function A(e){return e&&("Identifier"==e.name||"QuotedIdentifier"==e.name)}function C(e,t){if("CompositeIdentifier"==t.name){let n=[];for(let o=t.firstChild;o;o=o.nextSibling)A(o)&&n.push(x(e,o));return n}return[x(e,t)]}function S(e,t){for(let n=[];;){if(!t||"."!=t.name)return n;let o=O(t);if(!A(o))return n;n.unshift(x(e,o)),t=O(o)}}const P=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" ")),T=/^\w*$/,D=/^[`'"]?\w*[`'"]?$/;function B(e){return e.self&&"string"==typeof e.self.label}class I{constructor(e){this.idQuote=e,this.list=[],this.children=void 0}child(e){let t=this.children||(this.children=Object.create(null));return t[e]||(e&&!this.list.some((t=>t.label==e))&&this.list.push(M(e,"type",this.idQuote)),t[e]=new I(this.idQuote))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex((t=>t.label==e.label));t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion("string"==typeof t?M(t,"property",this.idQuote):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):B(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],o=null,r=t.replace(/\\?\./g,(e=>"."==e?"\0":e)).split("\0"),i=this;B(n)&&(o=n.self,n=n.children);for(let e=0;e<r.length;e++)o&&e==r.length-1&&i.addCompletion(o),i=i.child(r[e].replace(/\\\./g,"."));i.addNamespace(n)}}}function M(e,t,n){return/^[a-z_][a-z_\d]*$/.test(e)?{label:e,type:t}:{label:e,type:t,apply:n+e+n}}let Q=w.configure({props:[o.Oh.add({Statement:(0,o.mz)()}),o.b_.add({Statement(e,t){return{from:Math.min(e.from+100,t.doc.lineAt(e.from).to),to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}}),(0,r.pn)({Keyword:r._A.keyword,Type:r._A.typeName,Builtin:r._A.standard(r._A.name),Bits:r._A.number,Bytes:r._A.string,Bool:r._A.bool,Null:r._A.null,Number:r._A.number,String:r._A.string,Identifier:r._A.name,QuotedIdentifier:r._A.special(r._A.string),SpecialVar:r._A.special(r._A.name),LineComment:r._A.lineComment,BlockComment:r._A.blockComment,Operator:r._A.operator,"Semi Punctuation":r._A.punctuation,"( )":r._A.paren,"{ }":r._A.brace,"[ ]":r._A.squareBracket})]});class R{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}static define(e){let t=function(e,t,n,o){let r={};for(let t in y)r[t]=(e.hasOwnProperty(t)?e:y)[t];return t&&(r.words=v(t,n||"",o)),r}(e,e.keywords,e.types,e.builtin),n=o.bj.define({name:"sql",parser:Q.configure({tokenizers:[{from:b,to:k(t)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new R(t,n,e)}}function L(e,t=!1){return function(e,t){let n=Object.keys(e).map((n=>({label:t?n.toUpperCase():n,type:e[n]==a?"type":e[n]==l?"keyword":"variable",boost:-1})));return(0,s.Ar)(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],(0,s.et)(n))}(e.dialect.words,t)}function _(e,t=!1){return e.language.data.of({autocomplete:L(e,t)})}function N(e){return e.schema?function(e,t,n,r,i,s){var l;let a=(null===(l=null==s?void 0:s.spec.identifierQuotes)||void 0===l?void 0:l[0])||'"',c=new I(a),u=i?c.child(i):null;return c.addNamespace(e),t&&(u||c).addCompletions(t),n&&c.addCompletions(n),u&&c.addCompletions(u.list),r&&c.addCompletions((u||c).child(r).list),e=>{let{parents:t,from:n,quoted:i,empty:s,aliases:l}=function(e,t){let n=(0,o.mv)(e).resolveInner(t,-1),r=function(e,t){let n;for(let e=t;!n;e=e.parent){if(!e)return null;"Statement"==e.name&&(n=e)}let o=null;for(let t=n.firstChild,r=!1,i=null;t;t=t.nextSibling){let n="Keyword"==t.name?e.sliceString(t.from,t.to).toLowerCase():null,s=null;if(r)if("as"==n&&i&&A(t.nextSibling))s=x(e,t.nextSibling);else{if(n&&P.has(n))break;i&&A(t)&&(s=x(e,t))}else r="from"==n;s&&(o||(o=Object.create(null)),o[s]=C(e,i)),i=/Identifier$/.test(t.name)?t:null}return o}(e.doc,n);return"Identifier"==n.name||"QuotedIdentifier"==n.name||"Keyword"==n.name?{from:n.from,quoted:"QuotedIdentifier"==n.name?e.doc.sliceString(n.from,n.from+1):null,parents:S(e.doc,O(n)),aliases:r}:"."==n.name?{from:t,quoted:null,parents:S(e.doc,n),aliases:r}:{from:t,quoted:null,parents:[],empty:!0,aliases:r}}(e.state,e.pos);if(s&&!e.explicit)return null;l&&1==t.length&&(t=l[t[0]]||t);let a=c;for(let e of t){for(;!a.children||!a.children[e];)if(a==c&&u)a=u;else{if(a!=u||!r)return null;a=a.child(r)}let t=a.maybeChild(e);if(!t)return null;a=t}let h=i&&e.state.sliceDoc(e.pos,e.pos+1)==i,f=a.list;return a==c&&l&&(f=f.concat(Object.keys(l).map((e=>({label:e,type:"constant"}))))),{from:n,to:h?e.pos+1:void 0,options:(d=i,p=f,d?p.map((e=>Object.assign(Object.assign({},e),{label:e.label[0]==d?e.label:d+e.label+d,apply:void 0}))):p),validFor:i?D:T};var d,p}}(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema,e.dialect||F):()=>null}function U(e){return e.schema?(e.dialect||F).language.data.of({autocomplete:N(e)}):[]}function E(e={}){let t=e.dialect||F;return new o.Yy(t.language,[U(e),_(t,!!e.upperCaseKeywords)])}const F=R.define({})},15874:function(e,t,n){n.d(t,{EI:function(){return T},KB:function(){return B},Lv:function(){return ae},Oh:function(){return I},SG:function(){return Se},WD:function(){return E},Xt:function(){return S},Yy:function(){return A},Zt:function(){return ve},_v:function(){return D},b_:function(){return j},bj:function(){return d},f7:function(){return G},jU:function(){return Be},mv:function(){return p},mz:function(){return N},tp:function(){return P},y9:function(){return pe}});var o,r=n(90365),i=n(6585),s=n(1371),l=n(43720),a=n(97417);const c=new r.uY;const u=new r.uY;class h{constructor(e,t,n=[],o=""){this.data=e,this.name=o,i.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(i.$t.prototype,"tree",{get(){return p(this)}}),this.parser=t,this.extension=[x.of(this),i.$t.languageData.of(((e,t,n)=>{let o=f(e,t,n),r=o.type.prop(c);if(!r)return[];let i=e.facet(r),s=o.type.prop(u);if(s){let r=o.resolve(t-o.from,n);for(let t of s)if(t.test(r,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(e,t,n=-1){return f(e,t,n).type.prop(c)==this.data}findRegions(e){let t=e.facet(x);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],o=(e,t)=>{if(e.prop(c)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(r.uY.mounted);if(i){if(i.tree.prop(c)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(o(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof r.PH&&o(i,e.positions[n]+t)}};return o(p(e),0),n}get allowsNesting(){return!0}}function f(e,t,n){let o=e.facet(x),i=p(e).topNode;if(!o||o.allowsNesting)for(let e=i;e;e=e.enter(t,n,r.Qj.ExcludeBuffers))e.type.isTop&&(i=e);return i}h.setState=i.Pe.define();class d extends h{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=(n=e.languageData,i.sj.define({combine:n?e=>e.concat(n):void 0}));var n;return new d(t,e.parser.configure({props:[c.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new d(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function p(e){let t=e.field(h.state,!1);return t?t.tree:r.PH.empty}class m{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let g=null;class v{constructor(e,t,n=[],o,r,i,s,l){this.parser=e,this.state=t,this.fragments=n,this.tree=o,this.treeLen=r,this.viewport=i,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new v(e,t,[],r.PH.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=r.PH.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let o=this.parse.advance();if(o){if(this.fragments=this.withoutTempSkipped(r.rr.addTree(o,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=o,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(r.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=g;g=this;try{return e()}finally{g=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=y(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:o,treeLen:i,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,o,r)=>t.push({fromA:e,toA:n,fromB:o,toB:r}))),n=r.rr.applyChanges(n,t),o=r.PH.empty,i=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),o=e.mapPos(t.to,-1);n<o&&l.push({from:n,to:o})}}}return new v(this.parser,t,n,o,i,s,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:o}=this.skipped[t];n<e.to&&o>e.from&&(this.fragments=y(this.fragments,n,o),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends r.iX{createParse(t,n,o){let i=o[0].from,s=o[o.length-1].to;return{parsedPos:i,advance(){let t=g;if(t){for(let e of o)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new r.PH(r.Z6.none,[],[],s-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return g}}function y(e,t,n){return r.rr.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class k{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new k(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=v.create(e.facet(x).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new k(n)}}h.state=i.sU.define({create:k.init,update(e,t){for(let e of t.effects)if(e.is(h.setState))return e.value;return t.startState.facet(x)!=t.state.facet(x)?k.init(t.state):e.apply(t)}});let b=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(b=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const w="undefined"!=typeof navigator&&(null===(o=navigator.scheduling)||void 0===o?void 0:o.isInputPending)?()=>navigator.scheduling.isInputPending():null,O=s.Z9.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(h.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(h.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=b(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:o}}=this.view,r=n.field(h.state);if(r.tree==r.context.tree&&r.context.isDone(o+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!w?Math.max(25,e.timeRemaining()-5):1e9),s=r.context.treeLen<o&&n.doc.length>o+1e3,l=r.context.work((()=>w&&w()||Date.now()>i),o+(s?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:h.setState.of(new k(r.context))})),this.chunkBudget>0&&(!l||s)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>(0,s.c_)(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),x=i.sj.define({combine(e){return e.length?e[0]:null},enables:e=>[h.state,O,s.Lz.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class A{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const C=i.sj.define(),S=i.sj.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function P(e){let t=e.facet(S);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function T(e,t){let n="",o=e.tabSize,r=e.facet(S)[0];if("\t"==r){for(;t>=o;)n+="\t",t-=o;r=" "}for(let e=0;e<t;e++)n+=r;return n}function D(e,t){e instanceof i.$t&&(e=new B(e));for(let n of e.state.facet(C)){let o=n(e,t);if(void 0!==o)return o}let n=p(e.state);return n.length>=t?function(e,t,n){let o=t.resolveStack(n),r=o.node.enterUnfinishedNodesBefore(n);if(r!=o.node){let e=[];for(let t=r;t!=o.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)o={node:e[t],next:o}}return M(o,e,n)}(e,n,t):null}class B{constructor(e,t={}){this.state=e,this.options=t,this.unit=P(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:r}=this.options;return null!=o&&o>=n.from&&o<=n.to?r&&o==e?{text:"",from:e}:(t<0?o<e:o<=e)?{text:n.text.slice(o-n.from),from:o}:{text:n.text.slice(0,o-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:o}=this.lineAt(e,t);return n.slice(e-o,Math.min(n.length,e+100-o))}column(e,t=1){let{text:n,from:o}=this.lineAt(e,t),r=this.countColumn(n,e-o),i=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return i>-1&&(r+=i-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return(0,i.y$)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(o);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const I=new r.uY;function M(e,t,n){for(let o=e;o;o=o.next){let e=Q(o.node);if(e)return e(L.create(t,n,o))}return 0}function Q(e){let t=e.type.prop(I);if(t)return t;let n,o=e.firstChild;if(o&&(n=o.type.prop(r.uY.closedBy))){let t=e.lastChild,o=t&&n.indexOf(t.name)>-1;return e=>function(e,t,n,o,r){let i=e.textAfter,s=i.match(/^\s*/)[0].length,l=o&&i.slice(s,s+o.length)==o||r==e.pos+s,a=t?function(e){let t=e.node,n=t.childAfter(t.from),o=t.lastChild;if(!n)return null;let r=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),s=null==r||r<=i.from?i.to:Math.min(i.to,r);for(let e=n.to;;){let r=t.childAfter(e);if(!r||r==o)return null;if(!r.type.isSkipped)return r.from<s?n:null;e=r.to}}(e):null;return a?l?e.column(a.from):e.column(a.to):e.baseIndent+(l?0:e.unit*n)}(e,!0,1,void 0,o&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?R:null}function R(){return 0}class L extends B{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new L(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(_(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return M(this.context.next,this.base,this.pos)}}function _(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function N({except:e,units:t=1}={}){return n=>{let o=e&&e.test(n.textAfter);return n.baseIndent+(o?0:t*n.unit)}}const U=200;function E(){return i.$t.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:o}=e.newSelection.main,r=n.lineAt(o);if(o>r.from+U)return e;let i=n.sliceString(r.from,o);if(!t.some((e=>e.test(i))))return e;let{state:s}=e,l=-1,a=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==l)continue;l=t.from;let n=D(s,t.from);if(null==n)continue;let o=/^\s*/.exec(t.text)[0],r=T(s,n);o!=r&&a.push({from:t.from,to:t.from+o.length,insert:r})}return a.length?[e,{changes:a,sequential:!0}]:e}))}const F=i.sj.define(),j=new r.uY;function z(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function $(e,t,n){for(let o of e.facet(F)){let r=o(e,t,n);if(r)return r}return function(e,t,n){let o=p(e);if(o.length<n)return null;let r=null;for(let i=o.resolveStack(n,1);i;i=i.next){let s=i.node;if(s.to<=n||s.from>n)continue;if(r&&s.from<t)break;let l=s.type.prop(j);if(l&&(s.to<o.length-50||o.length==e.doc.length||!z(s))){let o=l(s,e);o&&o.from<=n&&o.from>=t&&o.to>n&&(r=o)}}return r}(e,t,n)}function Z(e,t){let n=t.mapPos(e.from,1),o=t.mapPos(e.to,-1);return n>=o?void 0:{from:n,to:o}}const V=i.Pe.define({map:Z}),q=i.Pe.define({map:Z});function H(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some((e=>e.from<=n&&e.to>=n))||t.push(e.lineBlockAt(n));return t}const W=i.sU.define({create(){return s.NZ.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(V)&&!J(e,n.value.from,n.value.to)){let{preparePlaceholder:o}=t.state.facet(te),r=o?s.NZ.replace({widget:new ie(o(t.state,n.value))}):re;e=e.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(q)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:o}=t.selection.main;e.between(o,o,((e,t)=>{e<o&&t>o&&(n=!0)})),n&&(e=e.update({filterFrom:o,filterTo:o,filter:(e,t)=>t<=o||e>=o}))}return e},provide:e=>s.Lz.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,((e,t)=>{n.push(e,t)})),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let o=e[n++],r=e[n++];if("number"!=typeof o||"number"!=typeof r)throw new RangeError("Invalid JSON for fold state");t.push(re.range(o,r))}return s.NZ.set(t,!0)}});function X(e,t,n){var o;let r=null;return null===(o=e.field(W,!1))||void 0===o||o.between(t,n,((e,t)=>{(!r||r.from>e)&&(r={from:e,to:t})})),r}function J(e,t,n){let o=!1;return e.between(t,t,((e,r)=>{e==t&&r==n&&(o=!0)})),o}function Y(e,t){return e.field(W,!1)?t:t.concat(i.Pe.appendConfig.of(ne()))}function K(e,t,n=!0){let o=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return s.Lz.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${o} ${e.state.phrase("to")} ${r}.`)}const G=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of H(e)){let n=$(e.state,t.from,t.to);if(n)return e.dispatch({effects:Y(e.state,[V.of(n),K(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(W,!1))return!1;let t=[];for(let n of H(e)){let o=X(e.state,n.from,n.to);o&&t.push(q.of(o),K(e,o,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let o=0;o<t.doc.length;){let r=e.lineBlockAt(o),i=$(t,r.from,r.to);i&&n.push(V.of(i)),o=(i?e.lineBlockAt(i.to):r).to+1}return n.length&&e.dispatch({effects:Y(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(W,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(q.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],ee={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},te=i.sj.define({combine(e){return(0,i.QR)(e,ee)}});function ne(e){let t=[W,ce];return e&&t.push(te.of(e)),t}function oe(e,t){let{state:n}=e,o=n.facet(te),r=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),o=X(e.state,n.from,n.to);o&&e.dispatch({effects:q.of(o)}),t.preventDefault()};if(o.placeholderDOM)return o.placeholderDOM(e,r,t);let i=document.createElement("span");return i.textContent=o.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}const re=s.NZ.replace({widget:new class extends s.xO{toDOM(e){return oe(e,null)}}});class ie extends s.xO{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return oe(e,this.value)}}const se={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class le extends s.wJ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function ae(e={}){let t=Object.assign(Object.assign({},se),e),n=new le(t,!0),o=new le(t,!1),r=s.Z9.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(x)!=e.state.facet(x)||e.startState.field(W,!1)!=e.state.field(W,!1)||p(e.startState)!=p(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new i.vB;for(let r of e.viewportLineBlocks){let i=X(e.state,r.from,r.to)?o:$(e.state,r.from,r.to)?n:null;i&&t.add(r.from,r.from,i)}return t.finish()}}),{domEventHandlers:l}=t;return[r,(0,s.cU)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.markers)||i.om.empty},initialSpacer(){return new le(t,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(e,t,n)=>{if(l.click&&l.click(e,t,n))return!0;let o=X(e.state,t.from,t.to);if(o)return e.dispatch({effects:q.of(o)}),!0;let r=$(e.state,t.from,t.to);return!!r&&(e.dispatch({effects:V.of(r)}),!0)}})}),ne()]}const ce=s.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ue{constructor(e,t){let n;function o(e){let t=a.G.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const r="string"==typeof t.all?t.all:t.all?o(t.all):void 0,i=t.scope;this.scope=i instanceof h?e=>e.prop(c)==i.data:i?e=>e==i:void 0,this.style=(0,l.az)(e.map((e=>({tag:e.tag,class:e.class||o(Object.assign({},e,{tag:null}))}))),{all:r}).style,this.module=n?new a.G(n):null,this.themeType=t.themeType}static define(e,t){return new ue(e,t||{})}}const he=i.sj.define(),fe=i.sj.define({combine(e){return e.length?[e[0]]:null}});function de(e){let t=e.facet(he);return t.length?t:e.facet(fe)}function pe(e,t){let n,o=[ge];return e instanceof ue&&(e.module&&o.push(s.Lz.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?o.push(fe.of(e)):n?o.push(he.computeN([s.Lz.darkTheme],(t=>t.facet(s.Lz.darkTheme)==("dark"==n)?[e]:[]))):o.push(he.of(e)),o}class me{constructor(e){this.markCache=Object.create(null),this.tree=p(e.state),this.decorations=this.buildDeco(e,de(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=p(e.state),n=de(e.state),o=n!=de(e.startState),{viewport:r}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!o&&t.type==this.tree.type&&i>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return s.NZ.none;let n=new i.vB;for(let{from:o,to:r}of e.visibleRanges)(0,l.DM)(this.tree,t,((e,t,o)=>{n.add(e,t,this.markCache[o]||(this.markCache[o]=s.NZ.mark({class:o})))}),o,r);return n.finish()}}const ge=i.Nb.high(s.Z9.fromClass(me,{decorations:e=>e.decorations})),ve=ue.define([{tag:l._A.meta,color:"#404740"},{tag:l._A.link,textDecoration:"underline"},{tag:l._A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:l._A.emphasis,fontStyle:"italic"},{tag:l._A.strong,fontWeight:"bold"},{tag:l._A.strikethrough,textDecoration:"line-through"},{tag:l._A.keyword,color:"#708"},{tag:[l._A.atom,l._A.bool,l._A.url,l._A.contentSeparator,l._A.labelName],color:"#219"},{tag:[l._A.literal,l._A.inserted],color:"#164"},{tag:[l._A.string,l._A.deleted],color:"#a11"},{tag:[l._A.regexp,l._A.escape,l._A.special(l._A.string)],color:"#e40"},{tag:l._A.definition(l._A.variableName),color:"#00f"},{tag:l._A.local(l._A.variableName),color:"#30a"},{tag:[l._A.typeName,l._A.namespace],color:"#085"},{tag:l._A.className,color:"#167"},{tag:[l._A.special(l._A.variableName),l._A.macroName],color:"#256"},{tag:l._A.definition(l._A.propertyName),color:"#00c"},{tag:l._A.comment,color:"#940"},{tag:l._A.invalid,color:"#f00"}]),ye=s.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ke=1e4,be="()[]{}",we=i.sj.define({combine(e){return(0,i.QR)(e,{afterCursor:!0,brackets:be,maxScanDistance:ke,renderMatch:Ae})}}),Oe=s.NZ.mark({class:"cm-matchingBracket"}),xe=s.NZ.mark({class:"cm-nonmatchingBracket"});function Ae(e){let t=[],n=e.matched?Oe:xe;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const Ce=[i.sU.define({create(){return s.NZ.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],o=t.state.facet(we);for(let e of t.state.selection.ranges){if(!e.empty)continue;let r=Be(t.state,e.head,-1,o)||e.head>0&&Be(t.state,e.head-1,1,o)||o.afterCursor&&(Be(t.state,e.head,1,o)||e.head<t.state.doc.length&&Be(t.state,e.head+1,-1,o));r&&(n=n.concat(o.renderMatch(r,t.state)))}return s.NZ.set(n,!0)},provide:e=>s.Lz.decorations.from(e)}),ye];function Se(e={}){return[we.of(e),Ce]}const Pe=new r.uY;function Te(e,t,n){let o=e.prop(t<0?r.uY.openedBy:r.uY.closedBy);if(o)return o;if(1==e.name.length){let o=n.indexOf(e.name);if(o>-1&&o%2==(t<0?1:0))return[n[o+t]]}return null}function De(e){let t=e.type.prop(Pe);return t?t(e.node):e}function Be(e,t,n,o={}){let r=o.maxScanDistance||ke,i=o.brackets||be,s=p(e),l=s.resolveInner(t,n);for(let e=l;e;e=e.parent){let o=Te(e.type,n,i);if(o&&e.from<e.to){let r=De(e);if(r&&(n>0?t>=r.from&&t<r.to:t>r.from&&t<=r.to))return Ie(0,0,n,e,r,o,i)}}return function(e,t,n,o,r,i,s){let l=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),a=s.indexOf(l);if(a<0||a%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),h=0;for(let e=0;!u.next().done&&e<=i;){let i=u.value;n<0&&(e+=i.length);let l=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=s.indexOf(i[e]);if(!(t<0||o.resolveInner(l+e,1).type!=r))if(t%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:l+e,to:l+e+1},matched:t>>1==a>>1};h--}}n>0&&(e+=i.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,l.type,r,i)}function Ie(e,t,n,o,r,i,s){let l=o.parent,a={from:r.from,to:r.to},c=0,u=null==l?void 0:l.cursor();if(u&&(n<0?u.childBefore(o.from):u.childAfter(o.to)))do{if(n<0?u.to<=o.from:u.from>=o.to){if(0==c&&i.indexOf(u.type.name)>-1&&u.from<u.to){let e=De(u);return{start:a,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(Te(u.type,n,s))c++;else if(Te(u.type,-n,s)){if(0==c){let e=De(u);return{start:a,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:a,matched:!1}}const Me=Object.create(null),Qe=[r.Z6.none],Re=[],Le=Object.create(null),_e=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])_e[e]=Ue(Me,t);function Ne(e,t){Re.indexOf(e)>-1||(Re.push(e),console.warn(t))}function Ue(e,t){let n=[];for(let o of t.split(" ")){let t=[];for(let n of o.split(".")){let o=e[n]||l._A[n];o?"function"==typeof o?t.length?t=t.map(o):Ne(n,`Modifier ${n} used at start of tag`):t.length?Ne(n,`Tag ${n} used as modifier`):t=Array.isArray(o)?o:[o]:Ne(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let o=t.replace(/ /g,"_"),i=o+" "+n.map((e=>e.id)),s=Le[i];if(s)return s.id;let a=Le[i]=r.Z6.define({id:Qe.length,name:o,props:[(0,l.pn)({[o]:n})]});return Qe.push(a),a.id}s.OP.RTL,s.OP.LTR},54136:function(e,t,n){n.d(t,{oQ:function(){return nt}});var o=n(1371),r=n(6585),i=n(15874),s=n(90365);function l(e,t){return({state:n,dispatch:o})=>{if(n.readOnly)return!1;let r=e(t,n);return!!r&&(o(n.update(r)),!0)}}const a=l(p,0),c=l(d,0),u=l(((e,t)=>d(e,t,function(e){let t=[];for(let n of e.selection.ranges){let o=e.doc.lineAt(n.from),r=n.to<=o.to?o:e.doc.lineAt(n.to),i=t.length-1;i>=0&&t[i].to>o.from?t[i].to=r.to:t.push({from:o.from+/^\s*/.exec(o.text)[0].length,to:r.to})}return t}(t))),0);function h(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const f=50;function d(e,t,n=t.selection.ranges){let o=n.map((e=>h(t,e.from).block));if(!o.every((e=>e)))return null;let r=n.map(((e,n)=>function(e,{open:t,close:n},o,r){let i,s,l=e.sliceDoc(o-f,o),a=e.sliceDoc(r,r+f),c=/\s*$/.exec(l)[0].length,u=/^\s*/.exec(a)[0].length,h=l.length-c;if(l.slice(h-t.length,h)==t&&a.slice(u,u+n.length)==n)return{open:{pos:o-c,margin:c&&1},close:{pos:r+u,margin:u&&1}};r-o<=2*f?i=s=e.sliceDoc(o,r):(i=e.sliceDoc(o,o+f),s=e.sliceDoc(r-f,r));let d=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(s)[0].length,m=s.length-p-n.length;return i.slice(d,d+t.length)==t&&s.slice(m,m+n.length)==n?{open:{pos:o+d+t.length,margin:/\s/.test(i.charAt(d+t.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(s.charAt(m-1))?1:0}}:null}(t,o[n],e.from,e.to)));if(2!=e&&!r.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>r[t]?[]:[{from:e.from,insert:o[t].open+" "},{from:e.to,insert:" "+o[t].close}])))};if(1!=e&&r.some((e=>e))){let e=[];for(let t,n=0;n<r.length;n++)if(t=r[n]){let r=o[n],{open:i,close:s}=t;e.push({from:i.pos-r.open.length,to:i.pos+i.margin},{from:s.pos-s.margin,to:s.pos+r.close.length})}return{changes:e}}return null}function p(e,t,n=t.selection.ranges){let o=[],r=-1;for(let{from:e,to:i}of n){let n=o.length,s=1e9,l=h(t,e).line;if(l){for(let n=e;n<=i;){let a=t.doc.lineAt(n);if(a.from>r&&(e==i||i>a.from)){r=a.from;let e=/^\s*/.exec(a.text)[0].length,t=e==a.length,n=a.text.slice(e,e+l.length)==l?e:-1;e<a.text.length&&e<s&&(s=e),o.push({line:a,comment:n,token:l,indent:e,empty:t,single:!1})}n=a.to+1}if(s<1e9)for(let e=n;e<o.length;e++)o[e].indent<o[e].line.text.length&&(o[e].indent=s);o.length==n+1&&(o[n].single=!0)}}if(2!=e&&o.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:r,empty:i,single:s}of o)!s&&i||e.push({from:t.from+r,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&o.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:r}of o)if(n>=0){let o=t.from+n,i=o+r.length;" "==t.text[i-t.from]&&i++,e.push({from:o,to:i})}return{changes:e}}return null}const m=r.YH.define(),g=r.YH.define(),v=r.sj.define(),y=r.sj.define({combine(e){return(0,r.QR)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,o)=>e(n,o)||t(n,o)})}}),k=r.sU.define({create(){return _.empty},update(e,t){let n=t.state.facet(y),o=t.annotation(m);if(o){let r=S.fromTransaction(t,o.selection),i=o.side,s=0==i?e.undone:e.done;return s=r?P(s,s.length,n.minDepth,r):I(s,t.startState.selection),new _(0==i?o.rest:s,0==i?s:o.rest)}let i=t.annotation(g);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(r.ZX.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let s=S.fromTransaction(t),l=t.annotation(r.ZX.time),a=t.annotation(r.ZX.userEvent);return s?e=e.addChanges(s,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON(e){return{done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}},fromJSON(e){return new _(e.done.map(S.fromJSON),e.undone.map(S.fromJSON))}});function b(e={}){return[k,y.of(e),o.Lz.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?O:"historyRedo"==e.inputType?x:null;return!!n&&(e.preventDefault(),n(t))}})]}function w(e,t){return function({state:n,dispatch:o}){if(!t&&n.readOnly)return!1;let r=n.field(k,!1);if(!r)return!1;let i=r.pop(e,n,t);return!!i&&(o(i),!0)}}const O=w(0,!1),x=w(1,!1),A=w(0,!0),C=w(1,!0);class S{constructor(e,t,n,o,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=o,this.selectionsAfter=r}setSelAfter(e){return new S(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new S(e.changes&&r.VR.fromJSON(e.changes),[],e.mapped&&r.Gu.fromJSON(e.mapped),e.startSelection&&r.OF.fromJSON(e.startSelection),e.selectionsAfter.map(r.OF.fromJSON))}static fromTransaction(e,t){let n=D;for(let t of e.startState.facet(v)){let o=t(e);o.length&&(n=n.concat(o))}return!n.length&&e.changes.empty?null:new S(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,D)}static selection(e){return new S(void 0,D,void 0,void 0,e)}}function P(e,t,n,o){let r=t+1>n+20?t-n-1:0,i=e.slice(r,t);return i.push(o),i}function T(e,t){return e.length?t.length?e.concat(t):e:t}const D=[],B=200;function I(e,t){if(e.length){let n=e[e.length-1],o=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-B));return o.length&&o[o.length-1].eq(t)?e:(o.push(t),P(e,e.length-1,1e9,n.setSelAfter(o)))}return[S.selection([t])]}function M(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Q(e,t){if(!e.length)return e;let n=e.length,o=D;for(;n;){let r=R(e[n-1],t,o);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,n);return t[n-1]=r,t}t=r.mapped,n--,o=r.selectionsAfter}return o.length?[S.selection(o)]:D}function R(e,t,n){let o=T(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):D,n);if(!e.changes)return S.selection(o);let i=e.changes.map(t),s=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(s):s;return new S(i,r.Pe.mapEffects(e.effects,t),l,e.startSelection.map(s),o)}const L=/^(input\.type|delete)($|\.)/;class _{constructor(e,t,n=0,o=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=o}isolate(){return this.prevTime?new _(this.done,this.undone):this}addChanges(e,t,n,o,r){let i=this.done,s=i[i.length-1];return i=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||L.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<o.newGroupDelay&&o.joinToEvent(r,function(e,t){let n=[],o=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,r,i)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];i>=t&&r<=s&&(o=!0)}})),o}(s.changes,e.changes))||"input.type.compose"==n)?P(i,i.length-1,o.minDepth,new S(e.changes.compose(s.changes),T(e.effects,s.effects),s.mapped,s.startSelection,D)):P(i,i.length,o.minDepth,e),new _(i,D,t,n)}addSelection(e,t,n,o){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:D;return r.length>0&&t-this.prevTime<o&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=r[r.length-1],s=e,i.ranges.length==s.ranges.length&&0===i.ranges.filter(((e,t)=>e.empty!=s.ranges[t].empty)).length)?this:new _(I(this.done,e),this.undone,t,n);var i,s}addMapping(e){return new _(Q(this.done,e),Q(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let o=0==e?this.done:this.undone;if(0==o.length)return null;let r=o[o.length-1],i=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:m.of({side:e,rest:M(o),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let n=1==o.length?D:o.slice(0,o.length-1);return r.mapped&&(n=Q(n,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:m.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}_.empty=new _(D,D);const N=[{key:"Mod-z",run:O,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:x,preventDefault:!0},{linux:"Ctrl-Shift-z",run:x,preventDefault:!0},{key:"Mod-u",run:A,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:C,preventDefault:!0}];function U(e,t){return r.OF.create(e.ranges.map(t),e.mainIndex)}function E(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function F({state:e,dispatch:t},n){let o=U(e.selection,n);return!o.eq(e.selection,!0)&&(t(E(e,o)),!0)}function j(e,t){return r.OF.cursor(t?e.to:e.from)}function z(e,t){return F(e,(n=>n.empty?e.moveByChar(n,t):j(n,t)))}function $(e){return e.textDirectionAt(e.state.selection.main.head)==o.OP.LTR}const Z=e=>z(e,!$(e)),V=e=>z(e,$(e));function q(e,t){return F(e,(n=>n.empty?e.moveByGroup(n,t):j(n,t)))}function H(e,t,n){if(t.type.prop(n))return!0;let o=t.to-t.from;return o&&(o>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function W(e,t,n){let o,l,a=(0,i.mv)(e).resolveInner(t.head),c=n?s.uY.closedBy:s.uY.openedBy;for(let o=t.head;;){let t=n?a.childAfter(o):a.childBefore(o);if(!t)break;H(e,t,c)?a=t:o=n?t.to:t.from}return l=a.type.prop(c)&&(o=n?(0,i.jU)(e,a.from,1):(0,i.jU)(e,a.to,-1))&&o.matched?n?o.end.to:o.end.from:n?a.to:a.from,r.OF.cursor(l,n?-1:1)}function X(e,t){return F(e,(n=>{if(!n.empty)return j(n,t);let o=e.moveVertically(n,t);return o.head!=n.head?o:e.moveToLineBoundary(n,t)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const J=e=>X(e,!1),Y=e=>X(e,!0);function K(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(o.Lz.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function G(e,t){let n,r=K(e),{state:i}=e,s=U(i.selection,(n=>n.empty?e.moveVertically(n,t,r.height):j(n,t)));if(s.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),a=l.top+r.marginTop,c=l.bottom-r.marginBottom;t&&t.top>a&&t.bottom<c&&(n=o.Lz.scrollIntoView(s.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(E(i,s),{effects:n}),!0}const ee=e=>G(e,!1),te=e=>G(e,!0);function ne(e,t,n){let o=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?o.to:o.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==o.from&&o.length){let n=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;n&&t.head!=o.from+n&&(i=r.OF.cursor(o.from+n))}return i}function oe(e,t){let n=U(e.state.selection,(e=>{let n=t(e);return r.OF.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(E(e.state,n)),!0)}function re(e,t){return oe(e,(n=>e.moveByChar(n,t)))}const ie=e=>re(e,!$(e)),se=e=>re(e,$(e));function le(e,t){return oe(e,(n=>e.moveByGroup(n,t)))}function ae(e,t){return oe(e,(n=>e.moveVertically(n,t)))}const ce=e=>ae(e,!1),ue=e=>ae(e,!0);function he(e,t){return oe(e,(n=>e.moveVertically(n,t,K(e).height)))}const fe=e=>he(e,!1),de=e=>he(e,!0),pe=({state:e,dispatch:t})=>(t(E(e,{anchor:0})),!0),me=({state:e,dispatch:t})=>(t(E(e,{anchor:e.doc.length})),!0),ge=({state:e,dispatch:t})=>(t(E(e,{anchor:e.selection.main.anchor,head:0})),!0),ve=({state:e,dispatch:t})=>(t(E(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function ye(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,s=i.changeByRange((o=>{let{from:i,to:s}=o;if(i==s){let r=t(o);r<i?(n="delete.backward",r=ke(e,r,!1)):r>i&&(n="delete.forward",r=ke(e,r,!0)),i=Math.min(i,r),s=Math.max(s,r)}else i=ke(e,i,!1),s=ke(e,s,!0);return i==s?{range:o}:{changes:{from:i,to:s},range:r.OF.cursor(i,i<o.head?-1:1)}}));return!s.changes.empty&&(e.dispatch(i.update(s,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?o.Lz.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function ke(e,t,n){if(e instanceof o.Lz)for(let r of e.state.facet(o.Lz.atomicRanges).map((t=>t(e))))r.between(t,t,((e,o)=>{e<t&&o>t&&(t=n?o:e)}));return t}const be=(e,t,n)=>ye(e,(o=>{let s,l,a=o.from,{state:c}=e,u=c.doc.lineAt(a);if(n&&!t&&a>u.from&&a<u.from+200&&!/[^ \t]/.test(s=u.text.slice(0,a-u.from))){if("\t"==s[s.length-1])return a-1;let e=(0,r.y$)(s,c.tabSize)%(0,i.tp)(c)||(0,i.tp)(c);for(let t=0;t<e&&" "==s[s.length-1-t];t++)a--;l=a}else l=(0,r.zK)(u.text,a-u.from,t,t)+u.from,l==a&&u.number!=(t?c.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(u.text.slice(l-u.from,a-u.from))&&(l=(0,r.zK)(u.text,l-u.from,!1,!1)+u.from);return l})),we=e=>be(e,!1,!0),Oe=e=>be(e,!0,!1),xe=(e,t)=>ye(e,(n=>{let o=n.head,{state:i}=e,s=i.doc.lineAt(o),l=i.charCategorizer(o);for(let e=null;;){if(o==(t?s.to:s.from)){o==n.head&&s.number!=(t?i.doc.lines:1)&&(o+=t?1:-1);break}let a=(0,r.zK)(s.text,o-s.from,t)+s.from,c=s.text.slice(Math.min(o,a)-s.from,Math.max(o,a)-s.from),u=l(c);if(null!=e&&u!=e)break;" "==c&&o==n.head||(e=u),o=a}return o})),Ae=e=>xe(e,!1);function Ce(e){let t=[],n=-1;for(let o of e.selection.ranges){let r=e.doc.lineAt(o.from),i=e.doc.lineAt(o.to);if(o.empty||o.to!=i.from||(i=e.doc.lineAt(o.to-1)),n>=r.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(o)}else t.push({from:r.from,to:i.to,ranges:[o]});n=i.number+1}return t}function Se(e,t,n){if(e.readOnly)return!1;let o=[],i=[];for(let t of Ce(e)){if(n?t.to==e.doc.length:0==t.from)continue;let s=e.doc.lineAt(n?t.to+1:t.from-1),l=s.length+1;if(n){o.push({from:t.to,to:s.to},{from:t.from,insert:s.text+e.lineBreak});for(let n of t.ranges)i.push(r.OF.range(Math.min(e.doc.length,n.anchor+l),Math.min(e.doc.length,n.head+l)))}else{o.push({from:s.from,to:t.from},{from:t.to,insert:e.lineBreak+s.text});for(let e of t.ranges)i.push(r.OF.range(e.anchor-l,e.head-l))}}return!!o.length&&(t(e.update({changes:o,scrollIntoView:!0,selection:r.OF.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Pe(e,t,n){if(e.readOnly)return!1;let o=[];for(let t of Ce(e))n?o.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):o.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Te=De(!1);function De(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let o=t.changeByRange((n=>{let{from:o,to:l}=n,a=t.doc.lineAt(o),c=!e&&o==l&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,o=(0,i.mv)(e).resolveInner(t),r=o.childBefore(t),l=o.childAfter(t);return r&&l&&r.to<=t&&l.from>=t&&(n=r.type.prop(s.uY.closedBy))&&n.indexOf(l.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(l.from).from&&!/\S/.test(e.sliceDoc(r.to,l.from))?{from:r.to,to:l.from}:null}(t,o);e&&(o=l=(l<=a.to?a:t.doc.lineAt(l)).to);let u=new i.KB(t,{simulateBreak:o,simulateDoubleBreak:!!c}),h=(0,i._v)(u,o);for(null==h&&(h=(0,r.y$)(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));l<a.to&&/\s/.test(a.text[l-a.from]);)l++;c?({from:o,to:l}=c):o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let f=["",(0,i.EI)(t,h)];return c&&f.push((0,i.EI)(t,u.lineIndent(a.from,-1))),{changes:{from:o,to:l,insert:r.EY.of(f)},range:r.OF.cursor(o+1+f[1].length)}}));return n(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function Be(e,t){let n=-1;return e.changeByRange((o=>{let i=[];for(let r=o.from;r<=o.to;){let s=e.doc.lineAt(r);s.number>n&&(o.empty||o.to>s.from)&&(t(s,i,o),n=s.number),r=s.to+1}let s=e.changes(i);return{changes:i,range:r.OF.range(s.mapPos(o.anchor,1),s.mapPos(o.head,1))}}))}const Ie=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>F(e,(t=>W(e.state,t,!$(e)))),shift:e=>oe(e,(t=>W(e.state,t,!$(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>F(e,(t=>W(e.state,t,$(e)))),shift:e=>oe(e,(t=>W(e.state,t,$(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Se(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Pe(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Se(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>Pe(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,o=null;return n.ranges.length>1?o=r.OF.create([n.main]):n.main.empty||(o=r.OF.create([r.OF.cursor(n.main.head)])),!!o&&(t(E(e,o)),!0)}},{key:"Mod-Enter",run:De(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=Ce(e).map((({from:t,to:n})=>r.OF.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:r.OF.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=U(e.selection,(t=>{var n;for(let o=(0,i.mv)(e).resolveStack(t.from,1);o;o=o.next){let{node:e}=o;if((e.from<t.from&&e.to>=t.to||e.to>t.to&&e.from<=t.from)&&(null===(n=e.parent)||void 0===n?void 0:n.parent))return r.OF.range(e.to,e.from)}return t}));return t(E(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Be(e,((t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let s=(0,r.y$)(o,e.tabSize),l=0,a=(0,i.EI)(e,Math.max(0,s-(0,i.tp)(e)));for(;l<o.length&&l<a.length&&o.charCodeAt(l)==a.charCodeAt(l);)l++;n.push({from:t.from+l,to:t.from+o.length,insert:a.slice(l)})})),{userEvent:"delete.dedent"})),!0)},{key:"Mod-]",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Be(e,((t,n)=>{n.push({from:t.from,insert:e.facet(i.Xt)})})),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),o=new i.KB(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),r=Be(e,((t,r,s)=>{let l=(0,i._v)(o,t.from);if(null==l)return;/\S/.test(t.text)||(l=0);let a=/^\s*/.exec(t.text)[0],c=(0,i.EI)(e,l);(a!=c||s.from<t.from+a.length)&&(n[t.from]=l,r.push({from:t.from,to:t.from+a.length,insert:c}))}));return r.changes.empty||t(e.update(r,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Ce(t).map((({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n})))),o=U(t.selection,(t=>{let n;if(e.lineWrapping){let o=e.lineBlockAt(t.head),r=e.coordsAtPos(t.head,t.assoc||1);r&&(n=o.bottom+e.documentTop-r.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)})).map(n);return e.dispatch({changes:n,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,n){let o=!1,s=U(e.selection,(t=>{let s=(0,i.jU)(e,t.head,-1)||(0,i.jU)(e,t.head,1)||t.head>0&&(0,i.jU)(e,t.head-1,1)||t.head<e.doc.length&&(0,i.jU)(e,t.head+1,-1);if(!s||!s.end)return t;o=!0;let l=s.start.from==t.head?s.end.to:s.end.from;return n?r.OF.range(t.anchor,l):r.OF.cursor(l)}));return!!o&&(t(E(e,s)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),o=h(e.state,n.from);return o.line?a(e):!!o.block&&u(e)}},{key:"Alt-A",run:c}].concat([{key:"ArrowLeft",run:Z,shift:ie,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>q(e,!$(e)),shift:e=>le(e,!$(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>F(e,(t=>ne(e,t,!$(e)))),shift:e=>oe(e,(t=>ne(e,t,!$(e)))),preventDefault:!0},{key:"ArrowRight",run:V,shift:se,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>q(e,$(e)),shift:e=>le(e,$(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>F(e,(t=>ne(e,t,$(e)))),shift:e=>oe(e,(t=>ne(e,t,$(e)))),preventDefault:!0},{key:"ArrowUp",run:J,shift:ce,preventDefault:!0},{mac:"Cmd-ArrowUp",run:pe,shift:ge},{mac:"Ctrl-ArrowUp",run:ee,shift:fe},{key:"ArrowDown",run:Y,shift:ue,preventDefault:!0},{mac:"Cmd-ArrowDown",run:me,shift:ve},{mac:"Ctrl-ArrowDown",run:te,shift:de},{key:"PageUp",run:ee,shift:fe},{key:"PageDown",run:te,shift:de},{key:"Home",run:e=>F(e,(t=>ne(e,t,!1))),shift:e=>oe(e,(t=>ne(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:pe,shift:ge},{key:"End",run:e=>F(e,(t=>ne(e,t,!0))),shift:e=>oe(e,(t=>ne(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:me,shift:ve},{key:"Enter",run:Te},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:we,shift:we},{key:"Delete",run:Oe},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ae},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>xe(e,!0)},{mac:"Mod-Backspace",run:e=>ye(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>ye(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}))}].concat([{key:"Ctrl-b",run:Z,shift:ie,preventDefault:!0},{key:"Ctrl-f",run:V,shift:se},{key:"Ctrl-p",run:J,shift:ce},{key:"Ctrl-n",run:Y,shift:ue},{key:"Ctrl-a",run:e=>F(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>oe(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>F(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>oe(e,(t=>r.OF.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:Oe},{key:"Ctrl-h",run:we},{key:"Ctrl-k",run:e=>ye(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}))},{key:"Ctrl-Alt-h",run:Ae},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:r.EY.of(["",""])},range:r.OF.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,o=e.doc.lineAt(n),i=n==o.from?n-1:(0,r.zK)(o.text,n-o.from,!1)+o.from,s=n==o.to?n+1:(0,r.zK)(o.text,n-o.from,!0)+o.from;return{changes:{from:i,to:s,insert:e.doc.slice(n,s).append(e.doc.slice(i,n))},range:r.OF.cursor(s)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:te}].map((e=>({mac:e.key,run:e.run,shift:e.shift})))));var Me=n(54528),Qe=n(47404),Re=n(93748);class Le{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class _e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(He).markerFilter;i&&(r=i(r,n));let s=o.NZ.set(r.map((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?o.NZ.widget({widget:new Je(e),diagnostic:e}).range(e.from):o.NZ.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e,inclusive:!0}).range(e.from,e.to))),!0);return new _e(s,t,Ne(s))}}function Ne(e,t=null,n=0){let o=null;return e.between(n,1e9,((e,n,{spec:r})=>{if(!t||r.diagnostic==t)return o=new Le(e,n,r.diagnostic),!1})),o}const Ue=r.Pe.define(),Ee=r.Pe.define(),Fe=r.Pe.define(),je=r.sU.define({create(){return new _e(o.NZ.none,null,null)},update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),o=null;if(e.selected){let r=t.changes.mapPos(e.selected.from,1);o=Ne(n,e.selected.diagnostic,r)||Ne(n,null,r)}e=new _e(n,e.panel,o)}for(let n of t.effects)n.is(Ue)?e=_e.init(n.value,e.panel,t.state):n.is(Ee)?e=new _e(e.diagnostics,n.value?Ke.open:null,e.selected):n.is(Fe)&&(e=new _e(e.diagnostics,e.panel,n.value));return e},provide:e=>[o.S7.from(e,(e=>e.panel)),o.Lz.decorations.from(e,(e=>e.diagnostics))]}),ze=o.NZ.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function $e(e,t,n){let{diagnostics:o}=e.state.field(je),r=[],i=2e8,s=0;o.between(t-(n<0?1:0),t+(n>0?1:0),((e,o,{spec:l})=>{t>=e&&t<=o&&(e==o||(t>e||n>0)&&(t<o||n<0))&&(r.push(l.diagnostic),i=Math.min(e,i),s=Math.max(o,s))}));let l=e.state.facet(He).tooltipFilter;return l&&(r=l(r,e.state)),r.length?{pos:i,end:s,above:e.state.doc.lineAt(i).to<s,create(){return{dom:Ze(e,r)}}}:null}function Ze(e,t){return(0,Re.A)("ul",{class:"cm-tooltip-lint"},t.map((t=>Xe(e,t,!1))))}const Ve=e=>{let t=e.state.field(je,!1);return!(!t||!t.panel||(e.dispatch({effects:Ee.of(!1)}),0))},qe=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(je,!1);var n,i;t&&t.panel||e.dispatch({effects:(n=e.state,i=[Ee.of(!0)],n.field(je,!1)?i:i.concat(r.Pe.appendConfig.of(tt)))});let s=(0,o.ld)(e,Ke.open);return s&&s.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(je,!1);if(!t)return!1;let n=e.state.selection.main,o=t.diagnostics.iter(n.to+1);return!(!o.value&&(o=t.diagnostics.iter(0),!o.value||o.from==n.from&&o.to==n.to)||(e.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),0))}}],He=r.sj.define({combine(e){return Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},(0,r.QR)(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function We(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;e<n.length;e++){let o=n[e];if(/[a-zA-Z]/.test(o)&&!t.some((e=>e.toLowerCase()==o.toLowerCase()))){t.push(o);continue e}}t.push("")}return t}function Xe(e,t,n){var o;let r=n?We(t.actions):[];return(0,Re.A)("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},(0,Re.A)("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(o=t.actions)||void 0===o?void 0:o.map(((n,o)=>{let i=!1,s=o=>{if(o.preventDefault(),i)return;i=!0;let r=Ne(e.state.field(je).diagnostics,t);r&&n.apply(e,r.from,r.to)},{name:l}=n,a=r[o]?l.indexOf(r[o]):-1,c=a<0?l:[l.slice(0,a),(0,Re.A)("u",l.slice(a,a+1)),l.slice(a+1)];return(0,Re.A)("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${l}${a<0?"":` (access key "${r[o]})"`}.`},c)})),t.source&&(0,Re.A)("div",{class:"cm-diagnosticSource"},t.source))}class Je extends o.xO{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return(0,Re.A)("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Ye{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Xe(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ke{constructor(e){this.view=e,this.items=[],this.list=(0,Re.A)("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)Ve(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],o=We(n.actions);for(let r=0;r<o.length;r++)if(o[r].toUpperCase().charCodeAt(0)==t.keyCode){let t=Ne(this.view.state.field(je).diagnostics,n);t&&n.actions[r].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=(0,Re.A)("div",{class:"cm-panel-lint"},this.list,(0,Re.A)("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Ve(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(je).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(je),n=0,o=!1,r=null;for(e.between(0,this.view.state.doc.length,((e,i,{spec:s})=>{let l,a=-1;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==s.diagnostic){a=e;break}a<0?(l=new Ye(this.view,s.diagnostic),this.items.splice(n,0,l),o=!0):(l=this.items[a],a>n&&(this.items.splice(n,a-n),o=!0)),t&&l.diagnostic==t.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),r=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),n++}));n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)o=!0,this.items.pop();0==this.items.length&&(this.items.push(new Ye(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),o=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=Ne(this.view.state.field(je).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Fe.of(t)})}static open(e){return new Ke(e)}}function Ge(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const et=o.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ge("#d11")},".cm-lintRange-warning":{backgroundImage:Ge("orange")},".cm-lintRange-info":{backgroundImage:Ge("#999")},".cm-lintRange-hint":{backgroundImage:Ge("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});o.wJ;const tt=[je,o.Lz.decorations.compute([je],(e=>{let{selected:t,panel:n}=e.field(je);return t&&n&&t.from!=t.to?o.NZ.set([ze.range(t.from,t.to)]):o.NZ.none})),(0,o.Ux)($e,{hideOn:function(e,t){let n=t.pos,o=t.end||n,r=e.state.facet(He).hideOn(e,n,o);if(null!=r)return r;let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(Ue)))&&!e.changes.touchesRange(i.from,Math.max(i.to,o)))}}),et],nt=(()=>[(0,o.$K)(),(0,o.Wu)(),(0,o.N$)(),b(),(0,i.Lv)(),(0,o.VH)(),(0,o.A)(),r.$t.allowMultipleSelections.of(!0),(0,i.WD)(),(0,i.y9)(i.Zt,{fallback:!0}),(0,i.SG)(),(0,Qe.wm)(),(0,Qe.yU)(),(0,o.D4)(),(0,o.HJ)(),(0,o.dz)(),(0,Me.gN)(),o.w4.of([...Qe.Bc,...Ie,...Me.Eo,...N,...i.f7,...Qe.OO,...qe])])()}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see bundle.62c62e6aaa7f3c20761e.js.LICENSE.txt */
2
- (self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[999],{86319:function(t,e,n){"use strict";n.d(e,{A:function(){return g}});var r=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(t){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),i=n(40390),o=n(19735),s=n(24534),a=n(50483),u=n(49503),c=n(73716),l=function(t,e,n){for(var r=0,o=0;r=o,o=(0,i.se)(),38===r&&12===o&&(e[n]=1),!(0,i.Sh)(o);)(0,i.K2)();return(0,i.di)(t,i.G1)},h=new WeakMap,f=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,r=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||h.get(n))&&!r){h.set(t,!0);for(var s=[],a=function(t,e){return(0,i.VF)(function(t,e){var n=-1,r=44;do{switch((0,i.Sh)(r)){case 0:38===r&&12===(0,i.se)()&&(e[n]=1),t[n]+=l(i.G1-1,e,n);break;case 2:t[n]+=(0,i.Tb)(r);break;case 4:if(44===r){t[++n]=58===(0,i.se)()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=(0,o.HT)(r)}}while(r=(0,i.K2)());return t}((0,i.c4)(t),e))}(e,s),u=n.props,c=0,f=0;c<a.length;c++)for(var p=0;p<u.length;p++,f++)t.props[f]=s[c]?a[c].replace(/&\f/g,u[p]):u[p]+" "+a[c]}}},p=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function d(t,e){switch((0,o.tW)(t,e)){case 5103:return s.j+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return s.j+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return s.j+t+s.vd+t+s.MS+t+t;case 6828:case 4268:return s.j+t+s.MS+t+t;case 6165:return s.j+t+s.MS+"flex-"+t+t;case 5187:return s.j+t+(0,o.HC)(t,/(\w+).+(:[^]+)/,s.j+"box-$1$2"+s.MS+"flex-$1$2")+t;case 5443:return s.j+t+s.MS+"flex-item-"+(0,o.HC)(t,/flex-|-self/,"")+t;case 4675:return s.j+t+s.MS+"flex-line-pack"+(0,o.HC)(t,/align-content|flex-|-self/,"")+t;case 5548:return s.j+t+s.MS+(0,o.HC)(t,"shrink","negative")+t;case 5292:return s.j+t+s.MS+(0,o.HC)(t,"basis","preferred-size")+t;case 6060:return s.j+"box-"+(0,o.HC)(t,"-grow","")+s.j+t+s.MS+(0,o.HC)(t,"grow","positive")+t;case 4554:return s.j+(0,o.HC)(t,/([^-])(transform)/g,"$1"+s.j+"$2")+t;case 6187:return(0,o.HC)((0,o.HC)((0,o.HC)(t,/(zoom-|grab)/,s.j+"$1"),/(image-set)/,s.j+"$1"),t,"")+t;case 5495:case 3959:return(0,o.HC)(t,/(image-set\([^]*)/,s.j+"$1$`$1");case 4968:return(0,o.HC)((0,o.HC)(t,/(.+:)(flex-)?(.*)/,s.j+"box-pack:$3"+s.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+s.j+t+t;case 4095:case 3583:case 4068:case 2532:return(0,o.HC)(t,/(.+)-inline(.+)/,s.j+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,o.b2)(t)-1-e>6)switch((0,o.wN)(t,e+1)){case 109:if(45!==(0,o.wN)(t,e+4))break;case 102:return(0,o.HC)(t,/(.+:)(.+)-([^]+)/,"$1"+s.j+"$2-$3$1"+s.vd+(108==(0,o.wN)(t,e+3)?"$3":"$2-$3"))+t;case 115:return~(0,o.K5)(t,"stretch")?d((0,o.HC)(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==(0,o.wN)(t,e+1))break;case 6444:switch((0,o.wN)(t,(0,o.b2)(t)-3-(~(0,o.K5)(t,"!important")&&10))){case 107:return(0,o.HC)(t,":",":"+s.j)+t;case 101:return(0,o.HC)(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+s.j+(45===(0,o.wN)(t,14)?"inline-":"")+"box$3$1"+s.j+"$2$3$1"+s.MS+"$2box$3")+t}break;case 5936:switch((0,o.wN)(t,e+11)){case 114:return s.j+t+s.MS+(0,o.HC)(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return s.j+t+s.MS+(0,o.HC)(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return s.j+t+s.MS+(0,o.HC)(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return s.j+t+s.MS+t+t}return t}var v=[function(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case s.LU:t.return=d(t.value,t.length);break;case s.Sv:return(0,a.l)([(0,i.C)(t,{value:(0,o.HC)(t.value,"@","@"+s.j)})],r);case s.XZ:if(t.length)return(0,o.kg)(t.props,(function(e){switch((0,o.YW)(e,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,a.l)([(0,i.C)(t,{props:[(0,o.HC)(e,/:(read-\w+)/,":"+s.vd+"$1")]})],r);case"::placeholder":return(0,a.l)([(0,i.C)(t,{props:[(0,o.HC)(e,/:(plac\w+)/,":"+s.j+"input-$1")]}),(0,i.C)(t,{props:[(0,o.HC)(e,/:(plac\w+)/,":"+s.vd+"$1")]}),(0,i.C)(t,{props:[(0,o.HC)(e,/:(plac\w+)/,s.MS+"input-$1")]})],r)}return""}))}}],g=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var i,o,s=t.stylisPlugins||v,l={},h=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n<e.length;n++)l[e[n]]=!0;h.push(t)}));var d,g=[f,p],m=[a.A,(0,u.MY)((function(t){d.insert(t)}))],y=(0,u.r1)(g.concat(s,m));o=function(t,e,n,r){var i;d=n,i=t?t+"{"+e.styles+"}":e.styles,(0,a.l)((0,c.wE)(i),y),r&&(b.inserted[e.name]=!0)};var b={key:e,sheet:new r({key:e,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:l,registered:{},insert:o};return b.sheet.hydrate(h),b}},36289:function(t,e,n){"use strict";function r(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,{A:function(){return r}})},62977:function(t,e,n){"use strict";n.d(e,{C:function(){return p},E:function(){return w},T:function(){return v},a:function(){return m},c:function(){return b},h:function(){return h},i:function(){return l},w:function(){return d}});var r=n(96540),i=n(86319),o=n(58168),s=function(t){var e=new WeakMap;return function(n){if(e.has(n))return e.get(n);var r=t(n);return e.set(n,r),r}},a=n(30041),u=n(16899),c=n(71287),l=!0,h={}.hasOwnProperty,f=r.createContext("undefined"!=typeof HTMLElement?(0,i.A)({key:"css"}):null),p=f.Provider,d=function(t){return(0,r.forwardRef)((function(e,n){var i=(0,r.useContext)(f);return t(e,i,n)}))};l||(d=function(t){return function(e){var n=(0,r.useContext)(f);return null===n?(n=(0,i.A)({key:"css"}),r.createElement(f.Provider,{value:n},t(e,n))):t(e,n)}});var v=r.createContext({}),g=s((function(t){return s((function(e){return function(t,e){return"function"==typeof e?e(t):(0,o.A)({},t,e)}(t,e)}))})),m=function(t){var e=r.useContext(v);return t.theme!==e&&(e=g(e)(t.theme)),r.createElement(v.Provider,{value:e},t.children)},y="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",b=function(t,e){var n={};for(var r in e)h.call(e,r)&&(n[r]=e[r]);return n[y]=t,n},S=function(t){var e=t.cache,n=t.serialized,r=t.isStringTag;return(0,a.SF)(e,n,r),(0,c.s)((function(){return(0,a.sk)(e,n,r)})),null},w=d((function(t,e,n){var i=t.css;"string"==typeof i&&void 0!==e.registered[i]&&(i=e.registered[i]);var o=t[y],s=[i],c="";"string"==typeof t.className?c=(0,a.Rk)(e.registered,s,t.className):null!=t.className&&(c=t.className+" ");var l=(0,u.J)(s,void 0,r.useContext(v));c+=e.key+"-"+l.name;var f={};for(var p in t)h.call(t,p)&&"css"!==p&&p!==y&&(f[p]=t[p]);return f.ref=n,f.className=c,r.createElement(r.Fragment,null,r.createElement(S,{cache:e,serialized:l,isStringTag:"string"==typeof o}),r.createElement(o,f))}))},17437:function(t,e,n){"use strict";n.d(e,{AH:function(){return l},Y:function(){return u},i7:function(){return h},mL:function(){return c}});var r=n(62977),i=n(96540),o=n(30041),s=n(71287),a=n(16899),u=(n(86319),n(4146),function(t,e){var n=arguments;if(null==e||!r.h.call(e,"css"))return i.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=r.E,s[1]=(0,r.c)(t,e);for(var a=2;a<o;a++)s[a]=n[a];return i.createElement.apply(null,s)}),c=(0,r.w)((function(t,e){var n=t.styles,u=(0,a.J)([n],void 0,i.useContext(r.T));if(!r.i){for(var c,l=u.name,h=u.styles,f=u.next;void 0!==f;)l+=" "+f.name,h+=f.styles,f=f.next;var p=!0===e.compat,d=e.insert("",{name:l,styles:h},e.sheet,p);return p?null:i.createElement("style",((c={})["data-emotion"]=e.key+"-global "+l,c.dangerouslySetInnerHTML={__html:d},c.nonce=e.sheet.nonce,c))}var v=i.useRef();return(0,s.i)((function(){var t=e.key+"-global",n=new e.sheet.constructor({key:t,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+t+" "+u.name+'"]');return e.sheet.tags.length&&(n.before=e.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",t),n.hydrate([i])),v.current=[n,r],function(){n.flush()}}),[e]),(0,s.i)((function(){var t=v.current,n=t[0];if(t[1])t[1]=!1;else{if(void 0!==u.next&&(0,o.sk)(e,u.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}e.insert("",u,n,!1)}}),[e,u.name]),null}));function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,a.J)(e)}var h=function(){var t=l.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},16899:function(t,e,n){"use strict";n.d(e,{J:function(){return d}});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(36289),o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a=function(t){return 45===t.charCodeAt(1)},u=function(t){return null!=t&&"boolean"!=typeof t},c=(0,i.A)((function(t){return a(t)?t:t.replace(o,"-$&").toLowerCase()})),l=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(s,(function(t,e,n){return f={name:e,styles:n,next:f},e}))}return 1===r[t]||a(t)||"number"!=typeof e||0===e?e:e+"px"};function h(t,e,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return f={name:n.name,styles:n.styles,next:f},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)f={name:r.name,styles:r.styles,next:f},r=r.next;return n.styles+";"}return function(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=h(t,e,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s)null!=e&&void 0!==e[s]?r+=o+"{"+e[s]+"}":u(s)&&(r+=c(o)+":"+l(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var a=h(t,e,s);switch(o){case"animation":case"animationName":r+=c(o)+":"+a+";";break;default:r+=o+"{"+a+"}"}}else for(var f=0;f<s.length;f++)u(s[f])&&(r+=c(o)+":"+l(o,s[f])+";")}return r}(t,e,n);case"function":if(void 0!==t){var i=f,o=n(t);return f=i,h(t,e,o)}}if(null==e)return n;var s=e[n];return void 0!==s?s:n}var f,p=/label:\s*([^\s;\n{]+)\s*(;|$)/g,d=function(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var r=!0,i="";f=void 0;var o=t[0];null==o||void 0===o.raw?(r=!1,i+=h(n,e,o)):i+=o[0];for(var s=1;s<t.length;s++)i+=h(n,e,t[s]),r&&(i+=o[s]);p.lastIndex=0;for(var a,u="";null!==(a=p.exec(i));)u+="-"+a[1];var c=function(t){for(var e,n=0,r=0,i=t.length;i>=4;++r,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:f}}},17103:function(t,e){"use strict";e.A={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},71287:function(t,e,n){"use strict";var r;n.d(e,{i:function(){return a},s:function(){return s}});var i=n(96540),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,s=o||function(t){return t()},a=o||i.useLayoutEffect},30041:function(t,e,n){"use strict";function r(t,e,n){var r="";return n.split(" ").forEach((function(n){void 0!==t[n]?e.push(t[n]+";"):r+=n+" "})),r}n.d(e,{Rk:function(){return r},SF:function(){return i},sk:function(){return o}});var i=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},o=function(t,e,n){i(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var o=e;do{t.insert(e===o?"."+r:"",o,t.sheet,!0),o=o.next}while(void 0!==o)}}},64849:function(t,e,n){var r=n(62785),i=n(78978),o={float:"cssFloat"},s=n(79887);function a(t,e,n){var a=o[e];if(void 0===a&&(a=function(t){var e=i(t),n=r(e);return o[e]=o[t]=o[n]=n,n}(e)),a){if(void 0===n)return t.style[a];t.style[a]=s(a,n)}}function u(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:function(t,e){for(var n in e)e.hasOwnProperty(n)&&a(t,n,e[n])}(arguments[0],arguments[1]):a(arguments[0],arguments[1],arguments[2])}t.exports=u,t.exports.set=u,t.exports.get=function(t,e){return Array.isArray(e)?e.reduce((function(e,n){return e[n]=a(t,n||""),e}),{}):a(t,e||"")}},4146:function(t,e,n){"use strict";var r=n(73404),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(t){return r.isMemo(t)?s:a[t.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var s=l(n);h&&(s=s.concat(h(n)));for(var a=u(e),v=u(n),g=0;g<s.length;++g){var m=s[g];if(!(o[m]||r&&r[m]||v&&v[m]||a&&a[m])){var y=f(n,m);try{c(e,m,y)}catch(t){}}}}return e}},3072:function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,S=n?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case l:case h:case o:case a:case s:case p:return t;default:switch(t=t&&t.$$typeof){case c:case f:case g:case v:case u:return t;default:return e}}case i:return e}}}function E(t){return w(t)===h}e.AsyncMode=l,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=u,e.Element=r,e.ForwardRef=f,e.Fragment=o,e.Lazy=g,e.Memo=v,e.Portal=i,e.Profiler=a,e.StrictMode=s,e.Suspense=p,e.isAsyncMode=function(t){return E(t)||w(t)===l},e.isConcurrentMode=E,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return w(t)===f},e.isFragment=function(t){return w(t)===o},e.isLazy=function(t){return w(t)===g},e.isMemo=function(t){return w(t)===v},e.isPortal=function(t){return w(t)===i},e.isProfiler=function(t){return w(t)===a},e.isStrictMode=function(t){return w(t)===s},e.isSuspense=function(t){return w(t)===p},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===a||t===s||t===p||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===v||t.$$typeof===u||t.$$typeof===c||t.$$typeof===f||t.$$typeof===y||t.$$typeof===b||t.$$typeof===S||t.$$typeof===m)},e.typeOf=w},73404:function(t,e,n){"use strict";t.exports=n(3072)},20311:function(t){"use strict";t.exports=function(t,e,n,r,i,o,s,a){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],l=0;(u=new Error(e.replace(/%s/g,(function(){return c[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},34572:function(t,e,n){"use strict";n.d(e,{A:function(){return at}});var r="0123456789abcdefghijklmnopqrstuvwxyz";function i(t){return r.charAt(t)}function o(t,e){return t&e}function s(t,e){return t|e}function a(t,e){return t^e}function u(t,e){return t&~e}function c(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function l(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var h,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function p(t){var e,n,r="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),r+=f.charAt(n>>6)+f.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=f.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=f.charAt(n>>2)+f.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function d(t){var e,n="",r=0,o=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var s=f.indexOf(t.charAt(e));s<0||(0==r?(n+=i(s>>2),o=3&s,r=1):1==r?(n+=i(o<<2|s>>4),o=15&s,r=2):2==r?(n+=i(o),n+=i(s>>2),o=3&s,r=3):(n+=i(o<<2|s>>4),n+=i(15&s),r=0))}return 1==r&&(n+=i(o<<2)),n}var v,g={decode:function(t){var e;if(void 0===v){for(v=Object.create(null),e=0;e<64;++e)v["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(v["-"]=62,v._=63,e=0;e<9;++e)v["= \f\n\r\t \u2028\u2029".charAt(e)]=-1}var n=[],r=0,i=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=v[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);r|=o,++i>=4?(n[n.length]=r>>16,n[n.length]=r>>8&255,n[n.length]=255&r,r=0,i=0):r<<=6}}switch(i){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=r>>10;break;case 3:n[n.length]=r>>16,n[n.length]=r>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=g.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return g.decode(t)}},m=1e13,y=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)(r=i[n]*t+e)<m?e=0:r-=(e=0|r/m)*m,i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;e<i;++e)(n=r[e]-t)<0?(n+=m,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;r>=0;--r)n+=(m+e[r]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=e*m+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),b=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,S=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function w(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var E,x=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",o=t;o<e;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?b:S).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=r>127,o=i?255:0,s="";r==o&&++t<e;)r=this.get(t);if(0==(n=e-t))return i?-1:0;if(n>4){for(s=r,n<<=3;!(128&(+s^o));)s=+s<<1,--n;s="("+n+" bit)\n"}i&&(r-=256);for(var a=new y(r),u=t+1;u<e;++u)a.mulAdd(256,this.get(u));return s+a.toString()},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i="("+((e-t-1<<3)-r)+" bit)\n",o="",s=t+1;s<e;++s){for(var a=this.get(s),u=s==e-1?r:0,c=7;c>=u;--c)o+=a>>c&1?"1":"0";if(o.length>n)return i+w(o,n)}return i+o},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return w(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var o=t;o<e;++o)i+=this.hexByte(this.get(o));return r>n&&(i+="…"),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new y,o=0,s=t;s<e;++s){var a=this.get(s);if(i.mulAdd(128,127&a),o+=7,!(128&a)){if(""===r)if((i=i.simplify())instanceof y)i.sub(80),r="2."+i.toString();else{var u=i<80?i<40?0:1:2;r=u+"."+(i-40*u)}else r+="."+i.toString();if(r.length>n)return w(r,n);i=new y,o=0}}return o>0&&(r+=".incomplete"),r},t}(),T=function(){function t(t,e,n,r,i){if(!(r instanceof A))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return w(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return w(this.stream.parseStringISO(e,e+n),t);case 30:return w(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;r<n;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof x?e:new x(e,0);var r=new x(n),i=new A(n),o=t.decodeLength(n),s=n.pos,a=s-r.pos,u=null,c=function(){var e=[];if(null!==o){for(var r=s+o;n.pos<r;)e[e.length]=t.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}o=s-n.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)u=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var l=0;l<u.length;++l)if(u[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){u=null}if(null===u){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);n.pos=s+Math.abs(o)}return new t(r,a,o,i,u)},t}(),A=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=!!(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new y;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],D=(1<<26)/C[C.length-1],O=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,o=!1,s="",a=this.t,u=this.DB-a*this.DB%e;if(a-- >0)for(u<this.DB&&(n=this[a]>>u)>0&&(o=!0,s=i(n));a>=0;)u<e?(n=(this[a]&(1<<u)-1)<<e-u,n|=this[--a]>>(u+=this.DB-e)):(n=this[a]>>(u-=e)&r,u<=0&&(u+=this.DB,--a)),n>0&&(o=!0),o&&(s+=i(n));return o?s:"0"},t.prototype.negate=function(){var e=P();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+q(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var n=P();return this.abs().divRemTo(e,null,n),this.s<0&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new N(e):new k(e),this.exp(t,n)},t.prototype.clone=function(){var t=P();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=P();return this.bitwiseTo(t,o,e),e},t.prototype.or=function(t){var e=P();return this.bitwiseTo(t,s,e),e},t.prototype.xor=function(t){var e=P();return this.bitwiseTo(t,a,e),e},t.prototype.andNot=function(t){var e=P();return this.bitwiseTo(t,u,e),e},t.prototype.not=function(){for(var t=P(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=P();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=P();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+c(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=l(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,s)},t.prototype.clearBit=function(t){return this.changeBit(t,u)},t.prototype.flipBit=function(t){return this.changeBit(t,a)},t.prototype.add=function(t){var e=P();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=P();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=P();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=P();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=P();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=P(),n=P();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),o=L(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new N(e):e.isEven()?new I(e):new k(e);var s=[],a=3,u=n-1,c=(1<<n)-1;if(s[1]=r.convert(this),n>1){var l=P();for(r.sqrTo(s[1],l);a<=c;)s[a]=P(),r.mulTo(l,s[a-2],s[a]),a+=2}var h,f,p=t.t-1,d=!0,v=P();for(i=q(t[p])-1;p>=0;){for(i>=u?h=t[p]>>i-u&c:(h=(t[p]&(1<<i+1)-1)<<u-i,p>0&&(h|=t[p-1]>>this.DB+i-u)),a=n;!(1&h);)h>>=1,--a;if((i-=a)<0&&(i+=this.DB,--p),d)s[h].copyTo(o),d=!1;else{for(;a>1;)r.sqrTo(o,v),r.sqrTo(v,o),a-=2;a>0?r.sqrTo(o,v):(f=o,o=v,v=f),r.mulTo(v,s[h],o)}for(;p>=0&&!(t[p]&1<<i);)r.sqrTo(o,v),f=o,o=v,v=f,--i<0&&(i=this.DB-1,--p)}return r.revert(o)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),o=L(1),s=L(0),a=L(0),u=L(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(e,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),n?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(e,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),n&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),n&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(t.ONE)?t.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},t.prototype.pow=function(t){return this.exp(t,new R)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=C[C.length-1]){for(e=0;e<C.length;++e)if(n[0]==C[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<C.length;){for(var r=C[e],i=e+1;i<C.length&&r<D;)r*=C[i++];for(r=n.modInt(r);e<i;)if(r%C[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,o=!1,s=0;--i>=0;){var a=8==r?255&+e[i]:H(e,i);a<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&128&+e[0]&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(t/this.DB),s=this.s<<n&this.DM,a=this.t-1;a>=0;--a)e[a+o+1]=this[a]>>r|s,s=(this[a]&i)<<n;for(a=o-1;a>=0;--a)e[a]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;o<i.t;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var i=e.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=P());var s=P(),a=this.s,u=e.s,c=this.DB-q(i[i.t-1]);c>0?(i.lShiftTo(c,s),o.lShiftTo(c,r)):(i.copyTo(s),o.copyTo(r));var l=s.t,h=s[l-1];if(0!=h){var f=h*(1<<this.F1)+(l>1?s[l-2]>>this.F2:0),p=this.FV/f,d=(1<<this.F1)/f,v=1<<this.F2,g=r.t,m=g-l,y=null==n?P():n;for(s.dlShiftTo(m,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),t.ONE.dlShiftTo(l,y),y.subTo(s,s);s.t<l;)s[s.t++]=0;for(;--m>=0;){var b=r[--g]==h?this.DM:Math.floor(r[g]*p+(r[g-1]+v)*d);if((r[g]+=s.am(0,b,r,m,0,l))<b)for(s.dlShiftTo(m,y),r.subTo(y,r);r[g]<--b;)r.subTo(y,r)}null!=n&&(r.drShiftTo(l,n),a!=u&&t.ZERO.subTo(n,n)),r.t=l,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&t.ZERO.subTo(r,r)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||e<1)return t.ONE;var r=P(),i=P(),o=n.convert(this),s=q(e)-1;for(o.copyTo(r);--s>=0;)if(n.sqrTo(r,i),(e&1<<s)>0)n.mulTo(i,o,r);else{var a=r;r=i,i=a}return n.revert(r)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=L(n),i=P(),o=P(),s="";for(this.divRemTo(r,i,o);i.signum()>0;)s=(n+o.intValue()).toString(t).substr(1)+s,i.divRemTo(r,i,o);return o.intValue().toString(t)+s},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,s=0,a=0,u=0;u<e.length;++u){var c=H(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(o=!0):(a=n*a+c,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(n,s)),this.dAddOffset(a,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,r){if("number"==typeof n)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),s,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var i=[],o=7&e;i.length=1+(e>>3),n.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},t.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var r=t.ONE.shiftLeft(e);return this.bitwiseTo(r,n,r),r},t.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(e=e+1>>1)>C.length&&(e=C.length);for(var o=P(),s=0;s<e;++s){o.fromInt(C[Math.floor(Math.random()*C.length)]);var a=o.modPow(i,this);if(0!=a.compareTo(t.ONE)&&0!=a.compareTo(n)){for(var u=1;u++<r&&0!=a.compareTo(n);)if(0==(a=a.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=a.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=P();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var o=n.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)e(n);else{o<s&&(s=o),s>0&&(n.rShiftTo(s,n),r.rShiftTo(s,r));var a=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(a,0):(s>0&&r.lShiftTo(s,r),setTimeout((function(){e(r)}),0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,n,r,i){if("number"==typeof n)if(e<2)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),s,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(t.ONE.shiftLeft(e-1),o),o.isProbablePrime(n)?setTimeout((function(){i()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var u=[],c=7&e;u.length=1+(e>>3),n.nextBytes(u),c>0?u[0]&=(1<<c)-1:u[0]=0,this.fromString(u,256)}},t}(),R=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),N=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),k=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=P();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(O.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),I=function(){function t(t){this.m=t,this.r2=P(),this.q3=P(),O.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function P(){return new O(null)}function V(t,e){return new O(t,e)}var M="undefined"!=typeof navigator;M&&"Microsoft Internet Explorer"==navigator.appName?(O.prototype.am=function(t,e,n,r,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,l=a*u+c*s;i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i},E=30):M&&"Netscape"!=navigator.appName?(O.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},E=26):(O.prototype.am=function(t,e,n,r,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+a*c,n[r++]=268435455&u}return i},E=28),O.prototype.DB=E,O.prototype.DM=(1<<E)-1,O.prototype.DV=1<<E,O.prototype.FV=Math.pow(2,52),O.prototype.F1=52-E,O.prototype.F2=2*E-52;var B,j,_=[];for(B="0".charCodeAt(0),j=0;j<=9;++j)_[B++]=j;for(B="a".charCodeAt(0),j=10;j<36;++j)_[B++]=j;for(B="A".charCodeAt(0),j=10;j<36;++j)_[B++]=j;function H(t,e){var n=_[t.charCodeAt(e)];return null==n?-1:n}function L(t){var e=P();return e.fromInt(t),e}function q(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}O.ZERO=L(0),O.ONE=L(1);var K,$,F=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),U=null;if(null==U){U=[],$=0;var z=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var G=new Uint32Array(256);for(window.crypto.getRandomValues(G),z=0;z<G.length;++z)U[$++]=255&G[z]}var W=0,Z=function(t){if((W=W||0)>=256||$>=256)window.removeEventListener?window.removeEventListener("mousemove",Z,!1):window.detachEvent&&window.detachEvent("onmousemove",Z);else try{var e=t.x+t.y;U[$++]=255&e,W+=1}catch(t){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",Z,!1):window.attachEvent&&window.attachEvent("onmousemove",Z))}function Y(){if(null==K){for(K=new F;$<256;){var t=Math.floor(65536*Math.random());U[$++]=255&t}for(K.init(U),$=0;$<U.length;++$)U[$]=0;$=0}return K.next()}var J=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Y()},t}(),X=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=V(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,n=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);i<128?n[--e]=i:i>127&&i<2048?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new J,s=[];e>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);n[--e]=s[0]}return n[--e]=2,n[--e]=0,new O(n)}(t,e);if(null==n)return null;var r=this.doPublic(n);if(null==r)return null;for(var i=r.toString(16),o=i.length,s=0;s<2*e-o;s++)i="0"+i;return i},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=V(t,16),this.e=parseInt(e,16),this.d=V(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,o,s,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=V(t,16),this.e=parseInt(e,16),this.d=V(n,16),this.p=V(r,16),this.q=V(i,16),this.dmp1=V(o,16),this.dmq1=V(s,16),this.coeff=V(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new J,r=t>>1;this.e=parseInt(e,16);for(var i=new O(e,16);;){for(;this.p=new O(t-r,1,n),0!=this.p.subtract(O.ONE).gcd(i).compareTo(O.ONE)||!this.p.isProbablePrime(10););for(;this.q=new O(r,1,n),0!=this.q.subtract(O.ONE).gcd(i).compareTo(O.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(O.ONE),a=this.q.subtract(O.ONE),u=s.multiply(a);if(0==u.gcd(i).compareTo(O.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=V(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var r=new J,i=t>>1;this.e=parseInt(e,16);var o=new O(e,16),s=this,a=function(){var e=function(){if(s.p.compareTo(s.q)<=0){var t=s.p;s.p=s.q,s.q=t}var e=s.p.subtract(O.ONE),r=s.q.subtract(O.ONE),i=e.multiply(r);0==i.gcd(o).compareTo(O.ONE)?(s.n=s.p.multiply(s.q),s.d=o.modInverse(i),s.dmp1=s.d.mod(e),s.dmq1=s.d.mod(r),s.coeff=s.q.modInverse(s.p),setTimeout((function(){n()}),0)):setTimeout(a,0)},u=function(){s.q=P(),s.q.fromNumberAsync(i,1,r,(function(){s.q.subtract(O.ONE).gcda(o,(function(t){0==t.compareTo(O.ONE)&&s.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(u,0)}))}))},c=function(){s.p=P(),s.p.fromNumberAsync(t-i,1,r,(function(){s.p.subtract(O.ONE).gcda(o,(function(t){0==t.compareTo(O.ONE)&&s.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,n){var r=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;i<n;i+=2)r+="ff";return V("0001"+r+"00"+t,16)}((Q[n]||"")+e(t).toString(),this.n.bitLength()/4);if(null==r)return null;var i=this.doPrivate(r);if(null==i)return null;var o=i.toString(16);return 1&o.length?"0"+o:o},t.prototype.verify=function(t,e,n){var r=V(e,16),i=this.doPublic(r);return null==i?null:function(t){for(var e in Q)if(Q.hasOwnProperty(e)){var n=Q[e],r=n.length;if(t.substr(0,r)==n)return t.substr(r)}return t}(i.toString(16).replace(/^1f+00/,""))==n(t).toString()},t}(),Q={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},tt={};tt.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var i;for(i in n)t.prototype[i]=n[i];var o=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(i=0;i<s.length;i+=1){var n=s[i],r=e[n];"function"==typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(t){}o(t.prototype,n)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";e=new O(r,16).xor(t).add(O.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et.asn1,n=e.DERBoolean,r=e.DERInteger,i=e.DERBitString,o=e.DEROctetString,s=e.DERNull,a=e.DERObjectIdentifier,u=e.DEREnumerated,c=e.DERUTF8String,l=e.DERNumericString,h=e.DERPrintableString,f=e.DERTeletexString,p=e.DERIA5String,d=e.DERUTCTime,v=e.DERGeneralizedTime,g=e.DERSequence,m=e.DERSet,y=e.DERTaggedObject,b=e.ASN1Util.newObject,S=Object.keys(t);if(1!=S.length)throw"key of param shall be only one.";var w=S[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new n(t[w]);if("int"==w)return new r(t[w]);if("bitstr"==w)return new i(t[w]);if("octstr"==w)return new o(t[w]);if("null"==w)return new s(t[w]);if("oid"==w)return new a(t[w]);if("enum"==w)return new u(t[w]);if("utf8str"==w)return new c(t[w]);if("numstr"==w)return new l(t[w]);if("prnstr"==w)return new h(t[w]);if("telstr"==w)return new f(t[w]);if("ia5str"==w)return new p(t[w]);if("utctime"==w)return new d(t[w]);if("gentime"==w)return new v(t[w]);if("seq"==w){for(var E=t[w],x=[],T=0;T<E.length;T++){var A=b(E[T]);x.push(A)}return new g({array:x})}if("set"==w){for(E=t[w],x=[],T=0;T<E.length;T++)A=b(E[T]),x.push(A);return new m({array:x})}if("tag"==w){var C=t[w];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var D=b(C[2]);return new y({tag:C[0],explicit:C[1],obj:D})}var O={};if(void 0!==C.explicit&&(O.explicit=C.explicit),void 0!==C.tag&&(O.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return O.obj=b(C.obj),new y(O)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=(e=Math.floor(n/40)+"."+n%40,""),i=2;i<t.length;i+=2){var o=("00000000"+parseInt(t.substr(i,2),16).toString(2)).slice(-8);r+=o.substr(1,7),"0"==o.substr(0,1)&&(e=e+"."+new O(r,2).toString(10),r="")}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new O(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(r=o+r,s=0;s<r.length-1;s+=7){var a=r.substr(s,7);s!=r.length-7&&(a="1"+a),n+=e(parseInt(a,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);return r},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},et.asn1.DERAbstractString=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},tt.lang.extend(et.asn1.DERAbstractString,et.asn1.ASN1Object),et.asn1.DERAbstractTime=function(t){et.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),o=String(i.getFullYear());"utc"==e&&(o=o.substr(2,2));var s=o+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var a=i.getMilliseconds();if(0!=a){var u=r(String(a),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){var s=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new O(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";var r="";for(n=0;n<t.length-1;n+=8){var i=t.substr(n,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new O(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(r=o+r,s=0;s<r.length-1;s+=7){var a=r.substr(s,7);s!=r.length-7&&(a="1"+a),n+=e(parseInt(a,2))}return n};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new O(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++)t+=this.asn1Array[e].getEncodedHex();return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var nt,rt,it=(nt=function(t,e){return nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},nt(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}nt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),ot=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return it(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?function(t){var e;if(void 0===h){var n="0123456789ABCDEF";for(h={},e=0;e<16;++e)h[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)h[n.charAt(e)]=e;for(e=0;e<8;++e)h[" \f\n\r\t \u2028\u2029".charAt(e)]=-1}var r=[],i=0,o=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=h[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);i|=s,++o>=2?(r[r.length]=i,i=0,o=0):i<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return r}(t):g.unarmor(t),i=T.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=V(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=V(o,16);var s=i.sub[4].getHexStringValue();this.p=V(s,16);var a=i.sub[5].getHexStringValue();this.q=V(a,16);var u=i.sub[6].getHexStringValue();this.dmp1=V(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=V(c,16);var l=i.sub[8].getHexStringValue();this.coeff=V(l,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var f=i.sub[1].sub[0];e=f.sub[0].getHexStringValue(),this.n=V(e,16),n=f.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else e=i.sub[0].getHexStringValue(),this.n=V(e,16),n=i.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]};return new et.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return p(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),n=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new et.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return p(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var n="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return(t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n")+"-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return(t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n")+"-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(X),st=null===(rt={})||void 0===rt?void 0:rt.npm_package_version,at=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new ot(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(d(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return p(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return p(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,d(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new ot,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=st,t}()},51873:function(t,e,n){var r=n(9325).Symbol;t.exports=r},72552:function(t,e,n){var r=n(51873),i=n(659),o=n(59350),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},54128:function(t,e,n){var r=n(31800),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},34840:function(t,e,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},659:function(t,e,n){var r=n(51873),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},59350:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9325:function(t,e,n){var r=n(34840),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},31800:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},38221:function(t,e,n){var r=n(23805),i=n(10124),o=n(99374),s=Math.max,a=Math.min;t.exports=function(t,e,n){var u,c,l,h,f,p,d=0,v=!1,g=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var n=u,r=c;return u=c=void 0,d=e,h=t.apply(r,n)}function b(t){var n=t-p;return void 0===p||n>=e||n<0||g&&t-d>=l}function S(){var t=i();if(b(t))return w(t);f=setTimeout(S,function(t){var n=e-(t-p);return g?a(n,l-(t-d)):n}(t))}function w(t){return f=void 0,m&&u?y(t):(u=c=void 0,h)}function E(){var t=i(),n=b(t);if(u=arguments,c=this,p=t,n){if(void 0===f)return function(t){return d=t,f=setTimeout(S,e),v?y(t):h}(p);if(g)return clearTimeout(f),f=setTimeout(S,e),y(p)}return void 0===f&&(f=setTimeout(S,e)),h}return e=o(e)||0,r(n)&&(v=!!n.leading,l=(g="maxWait"in n)?s(o(n.maxWait)||0,e):l,m="trailing"in n?!!n.trailing:m),E.cancel=function(){void 0!==f&&clearTimeout(f),d=0,u=p=c=f=void 0},E.flush=function(){return void 0===f?h:w(i())},E}},23805:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},40346:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},44394:function(t,e,n){var r=n(72552),i=n(40346);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},10124:function(t,e,n){var r=n(9325);t.exports=function(){return r.Date.now()}},99374:function(t,e,n){var r=n(54128),i=n(23805),o=n(44394),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=a.test(t);return n||u.test(t)?c(t.slice(2),n?2:8):s.test(t)?NaN:+t}},13491:function(t){(function(){var e,n,r,i,o,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:{env:{}}.hrtime?(t.exports=function(){return(e()-o)/1e6},n={env:{}}.hrtime,i=(e=function(){var t;return 1e9*(t=n())[0]+t[1]})(),s=1e9*{env:{}}.uptime(),o=i-s):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},62785:function(t){var e=null,n=["Webkit","Moz","O","ms"];t.exports=function(t){e||(e=document.createElement("div"));var r=e.style;if(t in r)return t;for(var i=t.charAt(0).toUpperCase()+t.slice(1),o=n.length;o>=0;o--){var s=n[o]+i;if(s in r)return s}return!1}},2694:function(t,e,n){"use strict";var r=n(6925);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5556:function(t,e,n){t.exports=n(2694)()},6925:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},55901:function(t,e,n){"use strict";n.d(e,{Z:function(){return Y},A:function(){return Q}});var r=n(58168),i=n(89379),o=n(60436),s=n(5544),a=n(80045),u=n(1397),c=n(3979),l=n(26956),h=n(12533),f=n(96540),p=f.createContext({}),d=n(82284),v=n(64467),g="__rc_cascader_search_mark__",m=function(t,e,n){var r=n.label,i=void 0===r?"":r;return e.some((function(e){return String(e[i]).toLowerCase().includes(t.toLowerCase())}))},y=function(t,e,n,r){return e.map((function(t){return t[r.label]})).join(" / ")},b="__RC_CASCADER_SPLIT__",S="SHOW_PARENT",w="SHOW_CHILD";function E(t){return t.join(b)}function x(t){return t.map(E)}function T(t){var e=t||{},n=e.label,r=e.value||"value";return{label:n||"label",value:r,key:r,children:e.children||"children"}}function A(t,e){var n,r;return null!==(n=t.isLeaf)&&void 0!==n?n:!(null!==(r=t[e.children])&&void 0!==r&&r.length)}function C(t){var e=t.parentElement;if(e){var n=t.offsetTop-e.offsetTop;n-e.scrollTop<0?e.scrollTo({top:n}):n+t.offsetHeight-e.scrollTop>e.offsetHeight&&e.scrollTo({top:n+t.offsetHeight-e.offsetHeight})}}function D(t,e){return t.map((function(t){var n;return null===(n=t[g])||void 0===n?void 0:n.map((function(t){return t[e.value]}))}))}function O(t){return t?function(t){return Array.isArray(t)&&Array.isArray(t[0])}(t)?t:(0===t.length?[]:[t]).map((function(t){return Array.isArray(t)?t:[t]})):[]}function R(t,e,n){var r=new Set(t),i=e();return t.filter((function(t){var e=i[t],o=e?e.parent:null,s=e?e.children:null;return!((!e||!e.node.disabled)&&(n===w?s&&s.some((function(t){return t.key&&r.has(t.key)})):o&&!o.node.disabled&&r.has(o.key)))}))}function N(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e,o=[],s=function(){var e,s,u,c=t[a],l=null===(e=i)||void 0===e?void 0:e.findIndex((function(t){var e=t[n.value];return r?String(e)===String(c):e===c})),h=-1!==l?null===(s=i)||void 0===s?void 0:s[l]:null;o.push({value:null!==(u=null==h?void 0:h[n.value])&&void 0!==u?u:c,index:l,option:h}),i=null==h?void 0:h[n.children]},a=0;a<t.length;a+=1)s();return o}function k(t,e){return f.useCallback((function(n){var r=[],i=[];return n.forEach((function(n){N(n,t,e).every((function(t){return t.option}))?i.push(n):r.push(n)})),[i,r]}),[t,e])}var I=n(7974),P=function(t,e){var n=f.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return f.useCallback((function(){return n.current.options!==t&&(n.current.options=t,n.current.info=(0,I.cG)(t,{fieldNames:e,initWrapper:function(t){return(0,i.A)((0,i.A)({},t),{},{pathKeyEntities:{}})},processEntity:function(t,n){var r=t.nodes.map((function(t){return t[e.value]})).join(b);n.pathKeyEntities[r]=t,t.key=r}})),n.current.info.pathKeyEntities}),[e,t])};function V(t,e){var n=f.useMemo((function(){return e||[]}),[e]),r=P(n,t),i=f.useCallback((function(e){var n=r();return e.map((function(e){return n[e].nodes.map((function(e){return e[t.value]}))}))}),[r,t]);return[n,r,i]}n(68210);var M=n(38820);function B(t,e,n,r,i,s,a,u){return function(c){if(t){var l=E(c),h=x(n),f=x(r),p=h.includes(l),d=i.some((function(t){return E(t)===l})),v=n,g=i;if(d&&!p)g=i.filter((function(t){return E(t)!==l}));else{var m=p?h.filter((function(t){return t!==l})):[].concat((0,o.A)(h),[l]),y=s(),b=R(p?(0,M.p)(m,{checked:!1,halfCheckedKeys:f},y).checkedKeys:(0,M.p)(m,!0,y).checkedKeys,s,u);v=a(b)}e([].concat((0,o.A)(g),(0,o.A)(v)))}else e(c)}}function j(t,e,n,r,i){return f.useMemo((function(){var o=i(e),a=(0,s.A)(o,2),u=a[0],c=a[1];if(!t||!e.length)return[u,[],c];var l=x(u),h=n(),f=(0,M.p)(l,!0,h),p=f.checkedKeys,d=f.halfCheckedKeys;return[r(p),r(d),c]}),[t,e,n,r,i])}var _=n(46942),H=n.n(_),L=f.memo((function(t){return t.children}),(function(t,e){return!e.open}));function q(t){var e,n=t.prefixCls,r=t.checked,i=t.halfChecked,o=t.disabled,s=t.onClick,a=t.disableCheckbox,u=f.useContext(p).checkable,c="boolean"!=typeof u?u:null;return f.createElement("span",{className:H()("".concat(n),(e={},(0,v.A)(e,"".concat(n,"-checked"),r),(0,v.A)(e,"".concat(n,"-indeterminate"),!r&&i),(0,v.A)(e,"".concat(n,"-disabled"),o||a),e)),onClick:s},c)}var K="__cascader_fix_label__";function $(t){var e=t.prefixCls,n=t.multiple,r=t.options,i=t.activeValue,s=t.prevValuePath,a=t.onToggleOpen,u=t.onSelect,c=t.onActive,l=t.checkedSet,h=t.halfCheckedSet,d=t.loadingKeys,m=t.isSelectable,y=t.searchValue,b="".concat(e,"-menu"),S="".concat(e,"-menu-item"),w=f.useContext(p),x=w.fieldNames,T=w.changeOnSelect,C=w.expandTrigger,D=w.expandIcon,O=w.loadingIcon,R=w.dropdownMenuColumnStyle,N=w.optionRender,k="hover"===C,I=f.useMemo((function(){return r.map((function(t){var e,n=t.disabled,r=t.disableCheckbox,i=t[g],a=null!==(e=t[K])&&void 0!==e?e:t[x.label],u=t[x.value],c=A(t,x),f=i?i.map((function(t){return t[x.value]})):[].concat((0,o.A)(s),[u]),p=E(f);return{disabled:n,label:a,value:u,isLeaf:c,isLoading:d.includes(p),checked:l.has(p),halfChecked:h.has(p),option:t,disableCheckbox:r,fullPath:f,fullPathKey:p}}))}),[r,l,x,h,d,s]);return f.createElement("ul",{className:b,role:"menu"},I.map((function(t){var r,s,l=t.disabled,h=t.label,p=t.value,d=t.isLeaf,g=t.isLoading,b=t.checked,w=t.halfChecked,E=t.option,x=t.fullPath,A=t.fullPathKey,C=t.disableCheckbox,I=function(){if(!l&&!y){var t=(0,o.A)(x);k&&d&&t.pop(),c(t)}},P=function(){m(E)&&u(x,d)};return"string"==typeof E.title?s=E.title:"string"==typeof h&&(s=h),f.createElement("li",{key:A,className:H()(S,(r={},(0,v.A)(r,"".concat(S,"-expand"),!d),(0,v.A)(r,"".concat(S,"-active"),i===p||i===A),(0,v.A)(r,"".concat(S,"-disabled"),l),(0,v.A)(r,"".concat(S,"-loading"),g),r)),style:R,role:"menuitemcheckbox",title:s,"aria-checked":b,"data-path-key":A,onClick:function(){I(),C||n&&!d||P()},onDoubleClick:function(){T&&a(!1)},onMouseEnter:function(){k&&I()},onMouseDown:function(t){t.preventDefault()}},n&&f.createElement(q,{prefixCls:"".concat(e,"-checkbox"),checked:b,halfChecked:w,disabled:l||C,disableCheckbox:C,onClick:function(t){C||(t.stopPropagation(),P())}}),f.createElement("div",{className:"".concat(S,"-content")},N?N(E):h),!g&&D&&!d&&f.createElement("div",{className:"".concat(S,"-expand-icon")},D),g&&O&&f.createElement("div",{className:"".concat(S,"-loading-icon")},O))})))}var F=n(16928),U=f.forwardRef((function(t,e){var n,a,u,c=t.prefixCls,l=t.multiple,h=t.searchValue,d=t.toggleOpen,m=t.notFoundContent,y=t.direction,S=t.open,w=f.useRef(null),T="rtl"===y,O=f.useContext(p),R=O.options,k=O.values,I=O.halfValues,P=O.fieldNames,V=O.changeOnSelect,M=O.onSelect,B=O.searchOptions,j=O.dropdownPrefixCls,_=O.loadData,q=O.expandTrigger,U=j||c,z=f.useState([]),G=(0,s.A)(z,2),W=G[0],Z=G[1];f.useEffect((function(){W.length&&W.forEach((function(t){var e=N(t.split(b),R,P,!0).map((function(t){return t.option})),n=e[e.length-1];(!n||n[P.children]||A(n,P))&&Z((function(e){return e.filter((function(e){return e!==t}))}))}))}),[R,W,P]);var Y=f.useMemo((function(){return new Set(x(k))}),[k]),J=f.useMemo((function(){return new Set(x(I))}),[I]),X=function(t,e){var n=f.useContext(p).values[0],r=f.useState([]),i=(0,s.A)(r,2),o=i[0],a=i[1];return f.useEffect((function(){t||a(n||[])}),[e,n]),[o,a]}(l,S),Q=(0,s.A)(X,2),tt=Q[0],et=Q[1],nt=function(t){et(t),function(t){if(_&&!h){var e=N(t,R,P).map((function(t){return t.option})),n=e[e.length-1];if(n&&!A(n,P)){var r=E(t);Z((function(t){return[].concat((0,o.A)(t),[r])})),_(e)}}}(t)},rt=function(t){var e=t.disabled,n=A(t,P);return!e&&(n||V||l)},it=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];M(t),!l&&(e||V&&("hover"===q||n))&&d(!1)},ot=f.useMemo((function(){return h?B:R}),[h,B,R]),st=f.useMemo((function(){for(var t=[{options:ot}],e=ot,n=D(e,P),r=function(){var r=tt[i],o=e.find((function(t,e){return(n[e]?E(n[e]):t[P.value])===r})),s=null==o?void 0:o[P.children];if(null==s||!s.length)return 1;e=s,t.push({options:s})},i=0;i<tt.length&&!r();i+=1);return t}),[ot,tt,P]);(function(t,e,n,r,i,a,u){var c=u.direction,l=u.searchValue,h=u.toggleOpen,p=u.open,d="rtl"===c,v=f.useMemo((function(){for(var t=-1,i=e,o=[],s=[],a=r.length,u=D(e,n),c=function(e){var a=i.findIndex((function(t,i){return(u[i]?E(u[i]):t[n.value])===r[e]}));if(-1===a)return 1;t=a,o.push(t),s.push(r[e]),i=i[t][n.children]},l=0;l<a&&i&&!c(l);l+=1);for(var h=e,f=0;f<o.length-1;f+=1)h=h[o[f]][n.children];return[s,t,h,u]}),[r,n,e]),m=(0,s.A)(v,4),y=m[0],b=m[1],S=m[2],w=m[3],x=function(t){i(t)},T=function(){if(y.length>1){var t=y.slice(0,-1);x(t)}else h(!1)},A=function(){var t,e=((null===(t=S[b])||void 0===t?void 0:t[n.children])||[]).find((function(t){return!t.disabled}));if(e){var r=[].concat((0,o.A)(y),[e[n.value]]);x(r)}};f.useImperativeHandle(t,(function(){return{onKeyDown:function(t){var e=t.which;switch(e){case F.A.UP:case F.A.DOWN:var r=0;e===F.A.UP?r=-1:e===F.A.DOWN&&(r=1),0!==r&&function(t){var e=S.length,r=b;-1===r&&t<0&&(r=e);for(var i=0;i<e;i+=1){var o=S[r=(r+t+e)%e];if(o&&!o.disabled){var s=y.slice(0,-1).concat(w[r]?E(w[r]):o[n.value]);return void x(s)}}}(r);break;case F.A.LEFT:if(l)break;d?A():T();break;case F.A.RIGHT:if(l)break;d?T():A();break;case F.A.BACKSPACE:l||T();break;case F.A.ENTER:if(y.length){var i=S[b],o=(null==i?void 0:i[g])||[];o.length?a(o.map((function(t){return t[n.value]})),o[o.length-1]):a(y,S[b])}break;case F.A.ESC:h(!1),p&&t.stopPropagation()}},onKeyUp:function(){}}}))})(e,ot,P,tt,nt,(function(t,e){rt(e)&&it(t,A(e,P),!0)}),{direction:y,searchValue:h,toggleOpen:d,open:S}),f.useEffect((function(){for(var t=0;t<tt.length;t+=1){var e,n=E(tt.slice(0,t+1)),r=null===(e=w.current)||void 0===e?void 0:e.querySelector('li[data-path-key="'.concat(n.replace(/\\{0,2}"/g,'\\"'),'"]'));r&&C(r)}}),[tt]);var at=!(null!==(n=st[0])&&void 0!==n&&null!==(n=n.options)&&void 0!==n&&n.length),ut=[(a={},(0,v.A)(a,P.value,"__EMPTY__"),(0,v.A)(a,K,m),(0,v.A)(a,"disabled",!0),a)],ct=(0,i.A)((0,i.A)({},t),{},{multiple:!at&&l,onSelect:it,onActive:nt,onToggleOpen:d,checkedSet:Y,halfCheckedSet:J,loadingKeys:W,isSelectable:rt}),lt=(at?[{options:ut}]:st).map((function(t,e){var n=tt.slice(0,e),i=tt[e];return f.createElement($,(0,r.A)({key:e},ct,{searchValue:h,prefixCls:U,options:t.options,prevValuePath:n,activeValue:i}))}));return f.createElement(L,{open:S},f.createElement("div",{className:H()("".concat(U,"-menus"),(u={},(0,v.A)(u,"".concat(U,"-menu-empty"),at),(0,v.A)(u,"".concat(U,"-rtl"),T),u)),ref:w},lt))})),z=U,G=f.forwardRef((function(t,e){var n=(0,u.Vm)();return f.createElement(z,(0,r.A)({},t,n,{ref:e}))})),W=n(81470);function Z(){}function Y(t){var e,n=t,r=n.prefixCls,i=void 0===r?"rc-cascader":r,o=n.style,a=n.className,u=n.options,c=n.checkable,l=n.defaultValue,h=n.value,d=n.fieldNames,g=n.changeOnSelect,m=n.onChange,y=n.showCheckedStrategy,b=n.loadData,S=n.expandTrigger,w=n.expandIcon,E=void 0===w?">":w,x=n.loadingIcon,A=n.direction,C=n.notFoundContent,D=void 0===C?"Not Found":C,R=!!c,I=(0,W.vz)(l,{value:h,postState:O}),P=(0,s.A)(I,2),M=P[0],_=P[1],L=f.useMemo((function(){return T(d)}),[JSON.stringify(d)]),q=V(L,u),K=(0,s.A)(q,3),$=K[0],F=K[1],U=K[2],G=k($,L),Y=j(R,M,F,U,G),J=(0,s.A)(Y,3),X=J[0],Q=J[1],tt=J[2],et=(0,W._q)((function(t){if(_(t),m){var e=O(t),n=e.map((function(t){return N(t,$,L).map((function(t){return t.option}))})),r=R?e:e[0],i=R?n:n[0];m(r,i)}})),nt=B(R,et,X,Q,tt,F,U,y),rt=(0,W._q)((function(t){nt(t)})),it=f.useMemo((function(){return{options:$,fieldNames:L,values:X,halfValues:Q,changeOnSelect:g,onSelect:rt,checkable:c,searchOptions:[],dropdownPrefixCls:void 0,loadData:b,expandTrigger:S,expandIcon:E,loadingIcon:x,dropdownMenuColumnStyle:void 0}}),[$,L,X,Q,g,rt,c,b,S,E,x]),ot="".concat(i,"-panel"),st=!$.length;return f.createElement(p.Provider,{value:it},f.createElement("div",{className:H()(ot,(e={},(0,v.A)(e,"".concat(ot,"-rtl"),"rtl"===A),(0,v.A)(e,"".concat(ot,"-empty"),st),e),a),style:o},st?D:f.createElement(z,{prefixCls:i,searchValue:"",multiple:R,toggleOpen:Z,open:!0,direction:A})))}var J=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],X=f.forwardRef((function(t,e){var n=t.id,b=t.prefixCls,w=void 0===b?"rc-cascader":b,A=t.fieldNames,C=t.defaultValue,D=t.value,I=t.changeOnSelect,P=t.onChange,M=t.displayRender,_=t.checkable,H=t.autoClearSearchValue,L=void 0===H||H,q=t.searchValue,K=t.onSearch,$=t.showSearch,F=t.expandTrigger,U=t.options,z=t.dropdownPrefixCls,W=t.loadData,Z=t.popupVisible,Y=t.open,X=t.popupClassName,Q=t.dropdownClassName,tt=t.dropdownMenuColumnStyle,et=t.dropdownStyle,nt=t.popupPlacement,rt=t.placement,it=t.onDropdownVisibleChange,ot=t.onPopupVisibleChange,st=t.expandIcon,at=void 0===st?">":st,ut=t.loadingIcon,ct=t.children,lt=t.dropdownMatchSelectWidth,ht=void 0!==lt&&lt,ft=t.showCheckedStrategy,pt=void 0===ft?S:ft,dt=t.optionRender,vt=(0,a.A)(t,J),gt=(0,c.Ay)(n),mt=!!_,yt=(0,h.A)(C,{value:D,postState:O}),bt=(0,s.A)(yt,2),St=bt[0],wt=bt[1],Et=f.useMemo((function(){return T(A)}),[JSON.stringify(A)]),xt=V(Et,U),Tt=(0,s.A)(xt,3),At=Tt[0],Ct=Tt[1],Dt=Tt[2],Ot=(0,h.A)("",{value:q,postState:function(t){return t||""}}),Rt=(0,s.A)(Ot,2),Nt=Rt[0],kt=Rt[1],It=function(t){return f.useMemo((function(){if(!t)return[!1,{}];var e={matchInputWidth:!0,limit:50};return t&&"object"===(0,d.A)(t)&&(e=(0,i.A)((0,i.A)({},e),t)),e.limit<=0&&delete e.limit,[!0,e]}),[t])}($),Pt=(0,s.A)(It,2),Vt=Pt[0],Mt=Pt[1],Bt=function(t,e,n,r,s,a){var u=s.filter,c=void 0===u?m:u,l=s.render,h=void 0===l?y:l,p=s.limit,d=void 0===p?50:p,b=s.sort;return f.useMemo((function(){var s=[];return t?(function e(u,l){var f=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u.forEach((function(u){if(!(!b&&!1!==d&&d>0&&s.length>=d)){var p,m=[].concat((0,o.A)(l),[u]),y=u[n.children],S=f||u.disabled;y&&0!==y.length&&!a||c(t,m,{label:n.label})&&s.push((0,i.A)((0,i.A)({},u),{},(p={disabled:S},(0,v.A)(p,n.label,h(t,m,r,n)),(0,v.A)(p,g,m),(0,v.A)(p,n.children,void 0),p))),y&&e(u[n.children],m,S)}}))}(e,[]),b&&s.sort((function(e,r){return b(e[g],r[g],t,n)})),!1!==d&&d>0?s.slice(0,d):s):[]}),[t,e,n,r,h,a,c,b,d])}(Nt,At,Et,z||w,Mt,I),jt=k(At,Et),_t=j(mt,St,Ct,Dt,jt),Ht=(0,s.A)(_t,3),Lt=Ht[0],qt=Ht[1],Kt=Ht[2],$t=function(t,e,n,r,i){return f.useMemo((function(){var s=i||function(t){var e=r?t.slice(-1):t;return e.every((function(t){return["string","number"].includes((0,d.A)(t))}))?e.join(" / "):e.reduce((function(t,e,n){var r=f.isValidElement(e)?f.cloneElement(e,{key:n}):e;return 0===n?[r]:[].concat((0,o.A)(t),[" / ",r])}),[])};return t.map((function(t){var r,i=N(t,e,n),o=s(i.map((function(t){var e,r=t.option,i=t.value;return null!==(e=null==r?void 0:r[n.label])&&void 0!==e?e:i})),i.map((function(t){return t.option}))),a=E(t);return{label:o,value:a,key:a,valueCells:t,disabled:null===(r=i[i.length-1])||void 0===r||null===(r=r.option)||void 0===r?void 0:r.disabled}}))}),[t,e,n,i,r])}(f.useMemo((function(){var t=R(x(Lt),Ct,pt);return[].concat((0,o.A)(Kt),(0,o.A)(Dt(t)))}),[Lt,Ct,Dt,Kt,pt]),At,Et,mt,M),Ft=(0,l.A)((function(t){if(wt(t),P){var e=O(t),n=e.map((function(t){return N(t,At,Et).map((function(t){return t.option}))})),r=mt?e:e[0],i=mt?n:n[0];P(r,i)}})),Ut=B(mt,Ft,Lt,qt,Kt,Ct,Dt,pt),zt=(0,l.A)((function(t){mt&&!L||kt(""),Ut(t)})),Gt=void 0!==Y?Y:Z,Wt=Q||X,Zt=rt||nt,Yt=f.useMemo((function(){return{options:At,fieldNames:Et,values:Lt,halfValues:qt,changeOnSelect:I,onSelect:zt,checkable:_,searchOptions:Bt,dropdownPrefixCls:z,loadData:W,expandTrigger:F,expandIcon:at,loadingIcon:ut,dropdownMenuColumnStyle:tt,optionRender:dt}}),[At,Et,Lt,qt,I,zt,_,Bt,z,W,F,at,ut,tt,dt]),Jt=!(Nt?Bt:At).length,Xt=Nt&&Mt.matchInputWidth||Jt?{}:{minWidth:"auto"};return f.createElement(p.Provider,{value:Yt},f.createElement(u.g3,(0,r.A)({},vt,{ref:e,id:gt,prefixCls:w,autoClearSearchValue:L,dropdownMatchSelectWidth:ht,dropdownStyle:(0,i.A)((0,i.A)({},Xt),et),displayValues:$t,onDisplayValuesChange:function(t,e){if("clear"!==e.type){var n=e.values[0].valueCells;zt(n)}else Ft([])},mode:mt?"multiple":void 0,searchValue:Nt,onSearch:function(t,e){kt(t),"blur"!==e.source&&K&&K(t)},showSearch:Vt,OptionList:G,emptyOptions:Jt,open:Gt,dropdownClassName:Wt,placement:Zt,onDropdownVisibleChange:function(t){null==it||it(t),null==ot||ot(t)},getRawInputElement:function(){return ct}})))}));X.SHOW_PARENT=S,X.SHOW_CHILD=w,X.Panel=Y;var Q=X},38873:function(t,e,n){"use strict";var r=n(58168),i=n(89379),o=n(64467),s=n(5544),a=n(80045),u=n(46942),c=n.n(u),l=n(12533),h=n(96540),f=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],p=(0,h.forwardRef)((function(t,e){var n=t.prefixCls,u=void 0===n?"rc-checkbox":n,p=t.className,d=t.style,v=t.checked,g=t.disabled,m=t.defaultChecked,y=void 0!==m&&m,b=t.type,S=void 0===b?"checkbox":b,w=t.title,E=t.onChange,x=(0,a.A)(t,f),T=(0,h.useRef)(null),A=(0,l.A)(y,{value:v}),C=(0,s.A)(A,2),D=C[0],O=C[1];(0,h.useImperativeHandle)(e,(function(){return{focus:function(t){var e;null===(e=T.current)||void 0===e||e.focus(t)},blur:function(){var t;null===(t=T.current)||void 0===t||t.blur()},input:T.current}}));var R=c()(u,p,(0,o.A)((0,o.A)({},"".concat(u,"-checked"),D),"".concat(u,"-disabled"),g));return h.createElement("span",{className:R,title:w,style:d},h.createElement("input",(0,r.A)({},x,{className:"".concat(u,"-input"),ref:T,onChange:function(e){g||("checked"in t||O(e.target.checked),null==E||E({target:(0,i.A)((0,i.A)({},t),{},{type:S,checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e.nativeEvent}))},disabled:g,checked:!!D,type:S})),h.createElement("span",{className:"".concat(u,"-inner")}))}));e.A=p},15819:function(t,e,n){"use strict";n.d(e,{A:function(){return C}});var r=n(58168),i=n(60436),o=n(5544),s=n(82284),a=n(46942),u=n.n(a),c=n(12533),l=n(68210),h=n(96540),f=n(80045),p=n(82546),d=n(64467),v=n(57557),g=n(16928),m=h.forwardRef((function(t,e){var n=t.prefixCls,r=t.forceRender,i=t.className,s=t.style,a=t.children,c=t.isActive,l=t.role,f=h.useState(c||r),p=(0,o.A)(f,2),v=p[0],g=p[1];return h.useEffect((function(){(r||c)&&g(!0)}),[r,c]),v?h.createElement("div",{ref:e,className:u()("".concat(n,"-content"),(0,d.A)((0,d.A)({},"".concat(n,"-content-active"),c),"".concat(n,"-content-inactive"),!c),i),style:s,role:l},h.createElement("div",{className:"".concat(n,"-content-box")},a)):null}));m.displayName="PanelContent";var y=m,b=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],S=h.forwardRef((function(t,e){var n=t.showArrow,i=void 0===n||n,o=t.headerClass,s=t.isActive,a=t.onItemClick,c=t.forceRender,l=t.className,p=t.prefixCls,m=t.collapsible,S=t.accordion,w=t.panelKey,E=t.extra,x=t.header,T=t.expandIcon,A=t.openMotion,C=t.destroyInactivePanel,D=t.children,O=(0,f.A)(t,b),R="disabled"===m,N="header"===m,k="icon"===m,I=null!=E&&"boolean"!=typeof E,P=function(){null==a||a(w)},V="function"==typeof T?T(t):h.createElement("i",{className:"arrow"});V&&(V=h.createElement("div",{className:"".concat(p,"-expand-icon"),onClick:["header","icon"].includes(m)?P:void 0},V));var M=u()((0,d.A)((0,d.A)((0,d.A)({},"".concat(p,"-item"),!0),"".concat(p,"-item-active"),s),"".concat(p,"-item-disabled"),R),l),B={className:u()(o,(0,d.A)((0,d.A)((0,d.A)({},"".concat(p,"-header"),!0),"".concat(p,"-header-collapsible-only"),N),"".concat(p,"-icon-collapsible-only"),k)),"aria-expanded":s,"aria-disabled":R,onKeyDown:function(t){"Enter"!==t.key&&t.keyCode!==g.A.ENTER&&t.which!==g.A.ENTER||P()}};return N||k||(B.onClick=P,B.role=S?"tab":"button",B.tabIndex=R?-1:0),h.createElement("div",(0,r.A)({},O,{ref:e,className:M}),h.createElement("div",B,i&&V,h.createElement("span",{className:"".concat(p,"-header-text"),onClick:"header"===m?P:void 0},x),I&&h.createElement("div",{className:"".concat(p,"-extra")},E)),h.createElement(v.Ay,(0,r.A)({visible:s,leavedClassName:"".concat(p,"-content-hidden")},A,{forceRender:c,removeOnLeave:C}),(function(t,e){var n=t.className,r=t.style;return h.createElement(y,{ref:e,prefixCls:p,className:n,style:r,isActive:s,forceRender:c,role:S?"tabpanel":void 0},D)})))})),w=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],E=n(72065);function x(t){var e=t;if(!Array.isArray(e)){var n=(0,s.A)(e);e="number"===n||"string"===n?[e]:[]}return e.map((function(t){return String(t)}))}var T=h.forwardRef((function(t,e){var n=t.prefixCls,s=void 0===n?"rc-collapse":n,a=t.destroyInactivePanel,d=void 0!==a&&a,v=t.style,g=t.accordion,m=t.className,y=t.children,b=t.collapsible,T=t.openMotion,A=t.expandIcon,C=t.activeKey,D=t.defaultActiveKey,O=t.onChange,R=t.items,N=u()(s,m),k=(0,c.A)([],{value:C,onChange:function(t){return null==O?void 0:O(t)},defaultValue:D,postState:x}),I=(0,o.A)(k,2),P=I[0],V=I[1];(0,l.Ay)(!y,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var M=function(t,e,n){return Array.isArray(t)?function(t,e){var n=e.prefixCls,i=e.accordion,o=e.collapsible,s=e.destroyInactivePanel,a=e.onItemClick,u=e.activeKey,c=e.openMotion,l=e.expandIcon;return t.map((function(t,e){var p,d=t.children,v=t.label,g=t.key,m=t.collapsible,y=t.onItemClick,b=t.destroyInactivePanel,E=(0,f.A)(t,w),x=String(null!=g?g:e),T=null!=m?m:o,A=null!=b?b:s;return p=i?u[0]===x:u.indexOf(x)>-1,h.createElement(S,(0,r.A)({},E,{prefixCls:n,key:x,panelKey:x,isActive:p,accordion:i,openMotion:c,expandIcon:l,header:v,collapsible:T,onItemClick:function(t){"disabled"!==T&&(a(t),null==y||y(t))},destroyInactivePanel:A}),d)}))}(t,n):(0,p.A)(e).map((function(t,e){return function(t,e,n){if(!t)return null;var r,i=n.prefixCls,o=n.accordion,s=n.collapsible,a=n.destroyInactivePanel,u=n.onItemClick,c=n.activeKey,l=n.openMotion,f=n.expandIcon,p=t.key||String(e),d=t.props,v=d.header,g=d.headerClass,m=d.destroyInactivePanel,y=d.collapsible,b=d.onItemClick;r=o?c[0]===p:c.indexOf(p)>-1;var S=null!=y?y:s,w={key:p,panelKey:p,header:v,headerClass:g,isActive:r,prefixCls:i,destroyInactivePanel:null!=m?m:a,openMotion:l,accordion:o,children:t.props.children,onItemClick:function(t){"disabled"!==S&&(u(t),null==b||b(t))},expandIcon:f,collapsible:S};return"string"==typeof t.type?t:(Object.keys(w).forEach((function(t){void 0===w[t]&&delete w[t]})),h.cloneElement(t,w))}(t,e,n)}))}(R,y,{prefixCls:s,accordion:g,openMotion:T,expandIcon:A,collapsible:b,destroyInactivePanel:d,onItemClick:function(t){return V((function(){return g?P[0]===t?[]:[t]:P.indexOf(t)>-1?P.filter((function(e){return e!==t})):[].concat((0,i.A)(P),[t])}))},activeKey:P});return h.createElement("div",(0,r.A)({ref:e,className:N,style:v,role:g?"tablist":void 0},(0,E.A)(t,{aria:!0,data:!0})),M)})),A=Object.assign(T,{Panel:S}),C=A;A.Panel},80243:function(t,e,n){"use strict";n.d(e,{ai:function(){return T}});var r=n(96540),i=n(98587),o=n(58168),s=n(9417),a=n(77387),u=n(4146);function c(t){console.warn("loadable: "+t)}var l=r.createContext(),h="__LOADABLE_REQUIRED_CHUNKS__";var f={initialChunks:{}},p="PENDING",d="REJECTED",v=function(t){return t};function g(t){var e=t.defaultResolveComponent,n=void 0===e?v:e,c=t.render,h=t.onLoad;function g(t,e){void 0===e&&(e={});var v=function(t){return"function"==typeof t?{requireAsync:t,resolve:function(){},chunkName:function(){}}:t}(t),g={};function m(t){return e.cacheKey?e.cacheKey(t):v.resolve?v.resolve(t):"static"}function y(t,r,i){var o=e.resolveComponent?e.resolveComponent(t,r):n(t);return u(i,o,{preload:!0}),o}var b,S,w=function(t){var e=m(t),n=g[e];return n&&n.status!==d||((n=v.requireAsync(t)).status=p,g[e]=n,n.then((function(){n.status="RESOLVED"}),(function(e){console.error("loadable-components: failed to asynchronously load component",{fileName:v.resolve(t),chunkName:v.chunkName(t),error:e?e.message:e}),n.status=d}))),n},E=function(t){function n(n){var r;return(r=t.call(this,n)||this).state={result:null,error:null,loading:!0,cacheKey:m(n)},function(t,e){if(!t){var n=new Error("loadable: "+e);throw n.framesToPop=1,n.name="Invariant Violation",n}}(!n.__chunkExtractor||v.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),n.__chunkExtractor?(!1===e.ssr||(v.requireAsync(n).catch((function(){return null})),r.loadSync(),n.__chunkExtractor.addChunk(v.chunkName(n))),(0,s.A)(r)):(!1!==e.ssr&&(v.isReady&&v.isReady(n)||v.chunkName&&f.initialChunks[v.chunkName(n)])&&r.loadSync(),r)}(0,a.A)(n,t),n.getDerivedStateFromProps=function(t,e){var n=m(t);return(0,o.A)({},e,{cacheKey:n,loading:e.loading||e.cacheKey!==n})};var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0;var t=this.getCache();t&&t.status===d&&this.setCache(),this.state.loading&&this.loadAsync()},r.componentDidUpdate=function(t,e){e.cacheKey!==this.state.cacheKey&&this.loadAsync()},r.componentWillUnmount=function(){this.mounted=!1},r.safeSetState=function(t,e){this.mounted&&this.setState(t,e)},r.getCacheKey=function(){return m(this.props)},r.getCache=function(){return g[this.getCacheKey()]},r.setCache=function(t){void 0===t&&(t=void 0),g[this.getCacheKey()]=t},r.triggerOnLoad=function(){var t=this;h&&setTimeout((function(){h(t.state.result,t.props)}))},r.loadSync=function(){if(this.state.loading)try{var t=y(v.requireSync(this.props),this.props,T);this.state.result=t,this.state.loading=!1}catch(t){console.error("loadable-components: failed to synchronously load component, which expected to be available",{fileName:v.resolve(this.props),chunkName:v.chunkName(this.props),error:t?t.message:t}),this.state.error=t}},r.loadAsync=function(){var t=this,e=this.resolveAsync();return e.then((function(e){var n=y(e,t.props,T);t.safeSetState({result:n,loading:!1},(function(){return t.triggerOnLoad()}))})).catch((function(e){return t.safeSetState({error:e,loading:!1})})),e},r.resolveAsync=function(){var t=this.props,e=(t.__chunkExtractor,t.forwardedRef,(0,i.A)(t,["__chunkExtractor","forwardedRef"]));return w(e)},r.render=function(){var t=this.props,n=t.forwardedRef,r=t.fallback,s=(t.__chunkExtractor,(0,i.A)(t,["forwardedRef","fallback","__chunkExtractor"])),a=this.state,u=a.error,l=a.loading,h=a.result;if(e.suspense&&(this.getCache()||this.loadAsync()).status===p)throw this.loadAsync();if(u)throw u;var f=r||e.fallback||null;return l?f:c({fallback:f,result:h,options:e,props:(0,o.A)({},s,{ref:n})})},n}(r.Component),x=(S=function(t){return r.createElement(l.Consumer,null,(function(e){return r.createElement(b,Object.assign({__chunkExtractor:e},t))}))},(b=E).displayName&&(S.displayName=b.displayName+"WithChunkExtractor"),S),T=r.forwardRef((function(t,e){return r.createElement(x,Object.assign({forwardedRef:e},t))}));return T.displayName="Loadable",T.preload=function(t){T.load(t)},T.load=function(t){return w(t)},T}return{loadable:g,lazy:function(t,e){return g(t,(0,o.A)({},e,{suspense:!0}))}}}var m=g({defaultResolveComponent:function(t){return t.__esModule?t.default:t.default||t},render:function(t){var e=t.result,n=t.props;return r.createElement(e,n)}}),y=m.loadable,b=m.lazy,S=g({onLoad:function(t,e){t&&e.forwardedRef&&("function"==typeof e.forwardedRef?e.forwardedRef(t):e.forwardedRef.current=t)},render:function(t){var e=t.result,n=t.props;return n.children?n.children(e):null}}),w=S.loadable,E=S.lazy,x="undefined"!=typeof window;function T(t,e){void 0===t&&(t=function(){});var n=void 0===e?{}:e,r=n.namespace,i=void 0===r?"":r,o=n.chunkLoadingGlobal,s=void 0===o?"__LOADABLE_LOADED_CHUNKS__":o;if(!x)return c("`loadableReady()` must be called in browser only"),t(),Promise.resolve();var a=null;if(x){var u=function(t){return""+t+h}(i),l=document.getElementById(u);if(l){a=JSON.parse(l.textContent);var p=document.getElementById(u+"_ext");if(!p)throw new Error("loadable-component: @loadable/server does not match @loadable/component");JSON.parse(p.textContent).namedChunks.forEach((function(t){f.initialChunks[t]=!0}))}}if(!a)return c("`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side"),t(),Promise.resolve();var d=!1;return new Promise((function(t){window[s]=window[s]||[];var e=window[s],n=e.push.bind(e);function r(){a.every((function(t){return e.some((function(e){return e[0].indexOf(t)>-1}))}))&&(d||(d=!0,t()))}e.push=function(){n.apply(void 0,arguments),r()},r()})).then(t)}var A=y;A.lib=w,b.lib=E,e.Ay=A}}]);
@@ -1,17 +0,0 @@
1
- /**
2
- * @fileOverview
3
- * @name asn1-1.0.js
4
- * @author Kenji Urushima kenji.urushima@gmail.com
5
- * @version asn1 1.0.13 (2017-Jun-02)
6
- * @since jsrsasign 2.1
7
- * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
8
- */
9
-
10
- /** @license React v16.13.1
11
- * react-is.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */