notebook 7.3.0a0__py3-none-any.whl → 7.3.0b0__py3-none-any.whl

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.

Potentially problematic release.


This version of notebook might be problematic. Click here for more details.

Files changed (233) hide show
  1. notebook/_version.py +1 -1
  2. notebook/app.py +10 -2
  3. notebook/static/113.bundle.js +1 -1
  4. notebook/static/1198.bundle.js +1 -1
  5. notebook/static/131.bundle.js +1 -1
  6. notebook/static/134.bundle.js +1 -1
  7. notebook/static/1408.bundle.js +1 -1
  8. notebook/static/1496.bundle.js +1 -1
  9. notebook/static/1584.bundle.js +1 -1
  10. notebook/static/1647.bundle.js +1 -1
  11. notebook/static/1650.bundle.js +1 -1
  12. notebook/static/1684.bundle.js +1 -1
  13. notebook/static/170.bundle.js +1 -1
  14. notebook/static/1809.bundle.js +1 -1
  15. notebook/static/1827.bundle.js +1 -1
  16. notebook/static/1828.bundle.js +1 -1
  17. notebook/static/1833.bundle.js +1 -1
  18. notebook/static/1958.bundle.js +1 -1
  19. notebook/static/1962.bundle.js +1 -1
  20. notebook/static/2007.bundle.js +1 -1
  21. notebook/static/2065.bundle.js +1 -1
  22. notebook/static/2088.bundle.js +1 -1
  23. notebook/static/2089.bundle.js +1 -1
  24. notebook/static/2122.bundle.js +1 -1
  25. notebook/static/2167.bundle.js +1 -1
  26. notebook/static/2184.bundle.js +1 -1
  27. notebook/static/2311.bundle.js +1 -1
  28. notebook/static/2401.bundle.js +1 -1
  29. notebook/static/2424.bundle.js +377 -0
  30. notebook/static/2479.bundle.js +1 -1
  31. notebook/static/2489.bundle.js +1 -1
  32. notebook/static/2607.bundle.js +1 -1
  33. notebook/static/2615.bundle.js +1 -1
  34. notebook/static/2636.bundle.js +1 -1
  35. notebook/static/2756.bundle.js +1 -1
  36. notebook/static/2813.bundle.js +1 -1
  37. notebook/static/2866.bundle.js +1 -1
  38. notebook/static/2924.bundle.js +1 -1
  39. notebook/static/2944.bundle.js +1 -1
  40. notebook/static/2955.bundle.js +1 -0
  41. notebook/static/3129.bundle.js +1 -1
  42. notebook/static/3146.bundle.js +1 -1
  43. notebook/static/3187.bundle.js +1 -1
  44. notebook/static/3213.bundle.js +1 -1
  45. notebook/static/3301.bundle.js +1 -1
  46. notebook/static/3325.bundle.js +1 -1
  47. notebook/static/3340.bundle.js +1 -1
  48. notebook/static/3360.bundle.js +1 -1
  49. notebook/static/{1261.bundle.js → 3463.bundle.js} +1 -1
  50. notebook/static/3466.bundle.js +1 -1
  51. notebook/static/35.bundle.js +1 -1
  52. notebook/static/3512.bundle.js +1 -1
  53. notebook/static/3676.bundle.js +1 -1
  54. notebook/static/3680.bundle.js +1 -1
  55. notebook/static/374.bundle.js +1 -1
  56. notebook/static/3768.bundle.js +1 -1
  57. notebook/static/377.bundle.js +1 -1
  58. notebook/static/3863.bundle.js +1 -1
  59. notebook/static/3881.bundle.js +1 -1
  60. notebook/static/4042.bundle.js +1 -1
  61. notebook/static/4058.bundle.js +1 -1
  62. notebook/static/409.bundle.js +1 -1
  63. notebook/static/4212.bundle.js +1 -1
  64. notebook/static/4242.bundle.js +79 -0
  65. notebook/static/4271.bundle.js +1 -1
  66. notebook/static/4291.bundle.js +1 -1
  67. notebook/static/4382.bundle.js +1 -1
  68. notebook/static/4526.bundle.js +1 -1
  69. notebook/static/4588.bundle.js +1 -1
  70. notebook/static/4630.bundle.js +1 -1
  71. notebook/static/4645.bundle.js +1 -1
  72. notebook/static/4811.bundle.js +1 -1
  73. notebook/static/4837.bundle.js +1 -1
  74. notebook/static/5099.bundle.js +1 -1
  75. notebook/static/5135.bundle.js +1 -1
  76. notebook/static/5166.bundle.js +1 -1
  77. notebook/static/5234.bundle.js +1 -1
  78. notebook/static/5254.bundle.js +1 -1
  79. notebook/static/5261.bundle.js +1 -1
  80. notebook/static/5263.bundle.js +1 -0
  81. notebook/static/5313.bundle.js +1 -1
  82. notebook/static/5325.bundle.js +1 -1
  83. notebook/static/5346.bundle.js +1 -1
  84. notebook/static/5426.bundle.js +1 -1
  85. notebook/static/5430.bundle.js +653 -0
  86. notebook/static/545.bundle.js +1 -1
  87. notebook/static/5451.bundle.js +1 -1
  88. notebook/static/5573.bundle.js +1 -1
  89. notebook/static/5601.bundle.js +1 -1
  90. notebook/static/5649.bundle.js +3 -3
  91. notebook/static/5733.bundle.js +1 -1
  92. notebook/static/5828.bundle.js +1 -1
  93. notebook/static/5850.bundle.js +1 -1
  94. notebook/static/5912.bundle.js +1 -1
  95. notebook/static/5921.bundle.js +1 -1
  96. notebook/static/6017.bundle.js +1 -1
  97. notebook/static/6061.bundle.js +1 -1
  98. notebook/static/6139.bundle.js +1 -1
  99. notebook/static/62.bundle.js +1 -1
  100. notebook/static/6271.bundle.js +1 -1
  101. notebook/static/6345.bundle.js +1 -1
  102. notebook/static/6604.bundle.js +1 -1
  103. notebook/static/6621.bundle.js +1 -1
  104. notebook/static/6627.bundle.js +1 -1
  105. notebook/static/6648.bundle.js +1 -0
  106. notebook/static/6731.bundle.js +1 -1
  107. notebook/static/6748.bundle.js +1 -1
  108. notebook/static/677.bundle.js +1 -1
  109. notebook/static/6815.bundle.js +1 -1
  110. notebook/static/6853.bundle.js +1 -1
  111. notebook/static/6893.bundle.js +1 -1
  112. notebook/static/690.bundle.js +1 -1
  113. notebook/static/6962.bundle.js +1 -1
  114. notebook/static/6999.bundle.js +1 -1
  115. notebook/static/7226.bundle.js +1 -1
  116. notebook/static/7252.bundle.js +1 -1
  117. notebook/static/7302.bundle.js +1 -1
  118. notebook/static/7386.bundle.js +1 -1
  119. notebook/static/7391.bundle.js +1 -1
  120. notebook/static/7450.bundle.js +1 -1
  121. notebook/static/7543.bundle.js +1 -1
  122. notebook/static/755.bundle.js +1 -1
  123. notebook/static/7603.bundle.js +1 -1
  124. notebook/static/7639.bundle.js +1 -1
  125. notebook/static/7655.bundle.js +1 -1
  126. notebook/static/{4427.bundle.js → 7674.bundle.js} +1 -1
  127. notebook/static/7684.bundle.js +1 -1
  128. notebook/static/7812.bundle.js +1 -1
  129. notebook/static/7819.bundle.js +1 -1
  130. notebook/static/7821.bundle.js +1 -1
  131. notebook/static/7854.bundle.js +1 -1
  132. notebook/static/7866.bundle.js +1 -0
  133. notebook/static/7900.bundle.js +1 -1
  134. notebook/static/7906.bundle.js +1 -1
  135. notebook/static/7995.bundle.js +1 -1
  136. notebook/static/8010.bundle.js +1 -1
  137. notebook/static/8032.bundle.js +1 -1
  138. notebook/static/8471.bundle.js +1 -1
  139. notebook/static/8579.bundle.js +1 -1
  140. notebook/static/8633.bundle.js +1 -1
  141. notebook/static/8635.bundle.js +41 -0
  142. notebook/static/8771.bundle.js +1 -1
  143. notebook/static/8781.bundle.js +1 -1
  144. notebook/static/8875.bundle.js +1 -1
  145. notebook/static/8907.bundle.js +1 -1
  146. notebook/static/8928.bundle.js +1 -1
  147. notebook/static/8929.bundle.js +1 -1
  148. notebook/static/893.bundle.js +1 -1
  149. notebook/static/901.bundle.js +1 -1
  150. notebook/static/9068.bundle.js +1 -1
  151. notebook/static/911.bundle.js +1 -1
  152. notebook/static/9136.bundle.js +1 -1
  153. notebook/static/9151.bundle.js +1 -1
  154. notebook/static/9161.bundle.js +1 -1
  155. notebook/static/9268.bundle.js +1 -1
  156. notebook/static/9335.bundle.js +1 -1
  157. notebook/static/9341.bundle.js +1 -1
  158. notebook/static/9380.bundle.js +1 -1
  159. notebook/static/9605.bundle.js +1 -1
  160. notebook/static/9638.bundle.js +1 -1
  161. notebook/static/9672.bundle.js +352 -0
  162. notebook/static/9680.bundle.js +1 -1
  163. notebook/static/9685.bundle.js +1 -1
  164. notebook/static/9752.bundle.js +1 -1
  165. notebook/static/9799.bundle.js +1 -0
  166. notebook/static/9821.bundle.js +1 -1
  167. notebook/static/9852.bundle.js +1 -1
  168. notebook/static/bundle.js +1 -1
  169. notebook/static/third-party-licenses.json +127 -133
  170. notebook/templates/consoles.html +1 -1
  171. notebook/templates/edit.html +1 -1
  172. notebook/templates/error.html +1 -1
  173. notebook/templates/notebooks.html +1 -1
  174. notebook/templates/terminals.html +1 -1
  175. notebook/templates/tree.html +1 -1
  176. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +17 -17
  177. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
  178. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  179. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +11 -11
  180. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +18 -18
  181. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -1
  182. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +13 -13
  183. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +12 -12
  184. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6d49b092e49dc147dc54.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.67f8b11d2af855286118.js +1 -1
  185. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/646.57a345a80ce9f0e64830.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/907.767373e59d0c0e33ef12.js +1 -1
  186. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.7bcc163b9139ecb2b25b.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.50419fa0a72e54064396.js +1 -1
  187. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.fd0956ebf15f666a19f8.js +1 -0
  188. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  189. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/METADATA +2 -2
  190. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/RECORD +213 -222
  191. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/WHEEL +1 -1
  192. notebook/static/1226.bundle.js +0 -1
  193. notebook/static/1750.bundle.js +0 -1
  194. notebook/static/1884.bundle.js +0 -386
  195. notebook/static/4045.bundle.js +0 -1
  196. notebook/static/4434.bundle.js +0 -1
  197. notebook/static/5018.bundle.js +0 -1
  198. notebook/static/5712.bundle.js +0 -1
  199. notebook/static/6164.bundle.js +0 -1
  200. notebook/static/6318.bundle.js +0 -1
  201. notebook/static/6619.bundle.js +0 -1
  202. notebook/static/6898.bundle.js +0 -1
  203. notebook/static/7506.bundle.js +0 -703
  204. notebook/static/7579.bundle.js +0 -1
  205. notebook/static/8054.bundle.js +0 -1
  206. notebook/static/8647.bundle.js +0 -1
  207. notebook/static/8723.bundle.js +0 -1
  208. notebook/static/9092.bundle.js +0 -1
  209. notebook/static/9734.bundle.js +0 -1
  210. notebook/static/9906.bundle.js +0 -1
  211. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.9381fdb35e72f41d8af1.js +0 -1
  212. /notebook/static/{7506.bundle.js.LICENSE.txt → 4242.bundle.js.LICENSE.txt} +0 -0
  213. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  214. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  215. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  216. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  217. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  218. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  219. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  220. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  221. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  222. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  223. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  224. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  225. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  226. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  227. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  228. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  229. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  230. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  231. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  232. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/entry_points.txt +0 -0
  233. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/licenses/LICENSE +0 -0
notebook/_version.py CHANGED
@@ -5,7 +5,7 @@ import re
5
5
  from collections import namedtuple
6
6
 
7
7
  # Use "hatch version xx.yy.zz" to handle version changes
8
- __version__ = "7.3.0a0"
8
+ __version__ = "7.3.0b0"
9
9
 
10
10
  # PEP440 version parser
11
11
  _version_regex = re.compile(
notebook/app.py CHANGED
@@ -203,8 +203,16 @@ class NotebookHandler(NotebookBaseHandler):
203
203
  """A notebook page handler."""
204
204
 
205
205
  @web.authenticated
206
- def get(self, path: str | None = None) -> t.Any: # noqa: ARG002
207
- """Get the notebook page."""
206
+ async def get(self, path: str = "") -> t.Any:
207
+ """Get the notebook page. Redirect if it's a directory."""
208
+ path = path.strip("/")
209
+ cm = self.contents_manager
210
+
211
+ if await ensure_async(cm.dir_exists(path=path)):
212
+ url = ujoin(self.base_url, "tree", url_escape(path))
213
+ self.log.debug("Redirecting %s to %s since path is a directory", self.request.path, url)
214
+ self.redirect(url)
215
+ return None
208
216
  tpl = self.render_template("notebooks.html", page_config=self.get_page_config())
209
217
  return self.write(tpl)
210
218
 
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[113],{113:(t,e,s)=>{s.r(e),s.d(e,{default:()=>K});var i,n=s(89150),r=s(70858),o=s(95291),l=s(16934),a=s(20998),c=s(2549),h=s(18395);!function(t){t.editBinding="shortcuts:edit-keybinding",t.addBinding="shortcuts:add-keybinding",t.deleteBinding="shortcuts:delete-keybinding",t.toggleSelectors="shortcuts:toggle-selectors",t.resetAll="shortcuts:reset-all"}(i||(i={}));var d=s(78156),u=s.n(d),p=s(33625),m=s(80554);class g extends d.Component{constructor(t){super(t),this.handleSubmit=async()=>{this._isReplacingExistingKeybinding?this.state.selected?(this.props.toggleInput(),this.setState({value:"",userInput:""})):await this._updateShortcut():(await this._updateShortcut(),this.setState({value:"",keys:[],currentChain:""}),this.props.toggleInput()),this._updateConflictDisplay()},this._updateShortcut=async()=>{const t=[...this.state.keys,this.state.currentChain];this.setState({keys:t}),this.props.keybinding?await this.props.replaceKeybinding(this.props.shortcut,this.props.keybinding,t):await this.props.addKeybinding(this.props.shortcut,t)},this.handleOverwrite=async()=>{const t=[...this.state.keys,this.state.currentChain];for(const e of this.state.conflicts){const s=e.keybindings.filter((e=>a.JSONExt.deepEqual(e.keys,t)||t.some((t=>a.JSONExt.deepEqual(e.keys,[t])))))[0];s?await this.props.deleteKeybinding(e,s):console.error(`Conflicting binding could not be found for ${e} using keys ${t}`)}this.setState({conflicts:[]}),await this._updateShortcut(),this._updateConflictDisplay()},this.parseChaining=(t,e,s,i,n)=>{let r=m.EN_US.keyForKeydownEvent(t.nativeEvent);const o=["Shift","Control","Alt","Meta","Ctrl","Accel"];if("Backspace"===t.key)s="",i=[],n="",this.setState({value:"",userInput:s,keys:i,currentChain:n});else if("CapsLock"!==t.key){const e=s.substr(s.lastIndexOf(" ")+1,s.length).trim();-1===o.lastIndexOf(e)&&""!=e?(s+=",",i.push(n),n="",t.ctrlKey&&"Control"!=t.key&&(s=(s+" Ctrl").trim(),n=(n+" Ctrl").trim()),t.metaKey&&"Meta"!=t.key&&(s=(s+" Accel").trim(),n=(n+" Accel").trim()),t.altKey&&"Alt"!=t.key&&(s=(s+" Alt").trim(),n=(n+" Alt").trim()),t.shiftKey&&"Shift"!=t.key&&(s=(s+" Shift").trim(),n=(n+" Shift").trim()),-1===o.lastIndexOf(t.key)?(s=(s+" "+r).trim(),n=(n+" "+r).trim()):"Meta"===t.key?(s=(s+" Accel").trim(),n=(n+" Accel").trim()):"Control"===t.key?(s=(s+" Ctrl").trim(),n=(n+" Ctrl").trim()):"Shift"===t.key?(s=(s+" Shift").trim(),n=(n+" Shift").trim()):"Alt"===t.key?(s=(s+" Alt").trim(),n=(n+" Alt").trim()):(s=(s+" "+t.key).trim(),n=(n+" "+t.key).trim())):"Control"===t.key?(s=(s+" Ctrl").trim(),n=(n+" Ctrl").trim()):"Meta"===t.key?(s=(s+" Accel").trim(),n=(n+" Accel").trim()):"Shift"===t.key?(s=(s+" Shift").trim(),n=(n+" Shift").trim()):"Alt"===t.key?(s=(s+" Alt").trim(),n=(n+" Alt").trim()):(s=(s+" "+r).trim(),n=(n+" "+r).trim())}return this.setState({keys:i,currentChain:n}),[s,i,n]},this.checkNonFunctional=()=>{const t=["Ctrl","Alt","Accel","Shift"],e=this.state.currentChain.split(" "),s=e[e.length-1];return this.setState({isFunctional:!(-1!==t.indexOf(s))}),-1!==t.indexOf(s)},this.checkShortcutAvailability=(t,e,s)=>{const i=this.props.findConflictsFor([...e,s],this.props.shortcut.selector),n=""===t||0===i.length;return!n&&1===i.length&&i[0].id===this.props.shortcut.id&&this._isReplacingExistingKeybinding?(this.setState({isAvailable:!0}),[]):(this.setState({isAvailable:n}),i)},this.handleInput=t=>{t.preventDefault(),this.setState({selected:!1});const e=this.parseChaining(t,this.state.value,this.state.userInput,this.state.keys,this.state.currentChain),s=e[0],i=e[1],n=e[2],r=this.props.toSymbols(s);let o=this.checkShortcutAvailability(s,i,n);this.setState({value:r,userInput:s,conflicts:o,keys:i,currentChain:n},(()=>{this.checkNonFunctional(),this._updateConflictDisplay()}))},this.handleBlur=t=>{null!==t.relatedTarget&&"no-blur"===t.relatedTarget.id||(this.props.toggleInput(),this.setState({value:"",userInput:"",conflicts:[]},(()=>{this._updateConflictDisplay()})))},this.state={value:this.props.placeholder,userInput:"",isAvailable:!0,isFunctional:this._isReplacingExistingKeybinding,conflicts:[],keys:[],currentChain:"",selected:!0}}get _isReplacingExistingKeybinding(){return!!this.props.keybinding}_updateConflictDisplay(){this.props.displayConflicts({conflictsWith:this.state.conflicts,keys:this.state.keys,overwrite:this.handleOverwrite})}render(){const t=this.props.translator.load("jupyterlab");let e="jp-Shortcuts-Input";return this.state.isAvailable||(e+=" jp-mod-unavailable-Input"),d.createElement("div",{className:this.props.displayInput?this._isReplacingExistingKeybinding?"jp-Shortcuts-InputBox":"jp-Shortcuts-InputBox jp-Shortcuts-InputBoxNew":"jp-mod-hidden",onBlur:t=>this.handleBlur(t)},d.createElement("div",{tabIndex:0,id:"no-blur",className:e,onKeyDown:this.handleInput,ref:t=>t&&t.focus(),"data-lm-suppress-shortcuts":"true"},d.createElement("p",{className:this.state.selected&&this._isReplacingExistingKeybinding?"jp-Shortcuts-InputText jp-mod-selected-InputText":""===this.state.value?"jp-Shortcuts-InputText jp-mod-waiting-InputText":"jp-Shortcuts-InputText"},""===this.state.value?t.__("press keys"):this.state.value)),d.createElement("button",{className:this.state.isFunctional?this.state.isAvailable?"jp-Shortcuts-Submit":"jp-Shortcuts-Submit jp-mod-conflict-Submit":"jp-Shortcuts-Submit jp-mod-defunc-Submit",id:"no-blur",disabled:!this.state.isAvailable||!this.state.isFunctional,onClick:this.handleSubmit},this.state.isAvailable?d.createElement(o.checkIcon.react,null):d.createElement(o.errorIcon.react,null)))}}class y extends d.Component{constructor(t){super(t),this.toggleInputNew=()=>{this.setState({displayNewInput:!this.state.displayNewInput})},this.toSymbols=t=>t.split(" ").reduce(((t,e)=>"Ctrl"===e?(t+" ⌃").trim():"Alt"===e?(t+" ⌥").trim():"Shift"===e?(t+" ⇧").trim():"Accel"===e&&h.Platform.IS_MAC?(t+" ⌘").trim():"Accel"===e?(t+" ⌃").trim():(t+" "+e).trim()),""),this._trans=this.props.external.translator.load("jupyterlab"),this.state={displayNewInput:!1,displayReplaceInput:Object.freeze({}),conflicts:new Map}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this)}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(t,e){if(!("shortcutId"in e)||e.shortcutId===this.props.shortcut.id){if("add-keybinding"===e.request)return this.toggleInputNew();if("edit-keybinding"===e.request&&this.toggleInputReplaceMethod(e.keybinding),"delete-keybinding"===e.request){const t=this.props.shortcut,s=t.keybindings[e.keybinding];this.props.deleteKeybinding(t,s).catch(console.error)}}}getCategoryCell(){return d.createElement("div",{className:"jp-Shortcuts-Cell"},this.props.shortcut.category)}getLabelCell(){var t;return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"jp-label"},null!==(t=this.props.shortcut.label)&&void 0!==t?t:this._trans.__("(Command label missing)")))}getResetShortCutLink(){return d.createElement("a",{className:"jp-Shortcuts-Reset",onClick:()=>this.props.resetKeybindings(this.props.shortcut)},this._trans.__("Reset"))}getSourceCell(){const t=this.props.shortcut.keybindings.every((t=>t.isDefault));return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"jp-Shortcuts-SourceCell"},t?this._trans.__("Default"):this._trans.__("Custom")),t?"":this.getResetShortCutLink())}getOptionalSelectorCell(){return this.props.showSelectors?d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"jp-selector"},this.props.shortcut.selector)):null}getClassNameForShortCuts(t){const e=["jp-Shortcuts-ShortcutCell"];switch(t.length){case 1:e.push("jp-Shortcuts-SingleCell");break;case 0:e.push("jp-Shortcuts-EmptyCell")}return e.join(" ")}toggleInputReplaceMethod(t){const e=this.state.displayReplaceInput[t];this.setState({displayReplaceInput:{...this.state.displayReplaceInput,[t]:!e}})}getDisplayReplaceInput(t){return this.state.displayReplaceInput[t]}getOrDiplayIfNeeded(t){const e=["jp-Shortcuts-Or"];return(t||this.state.displayNewInput)&&e.push("jp-Shortcuts-Or-Forced"),d.createElement("div",{className:e.join(" ")},this._trans.__("or"))}getShortCutAsInput(t,e){return d.createElement(g,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:()=>this.toggleInputReplaceMethod(e),shortcut:this.props.shortcut,keybinding:t,displayConflicts:e=>{const s=new Map(this.state.conflicts);s.set(t,e),this.setState({conflicts:s})},toSymbols:this.toSymbols,displayInput:this.getDisplayReplaceInput(e),placeholder:this.toSymbols(t.keys.join(", ")),translator:this.props.external.translator})}getShortCutForDisplayOnly(t){return t.keys.map(((e,s)=>d.createElement("div",{className:"jp-Shortcuts-ShortcutKeysContainer",key:s},d.createElement("div",{className:"jp-Shortcuts-ShortcutKeys"},this.toSymbols(e)),s+1<t.keys.length?d.createElement("div",{className:"jp-Shortcuts-Comma"},","):null)))}isLocationBeingEdited(t){return this.state.displayReplaceInput[t]}getDivForKey(t,e,s){return d.createElement("div",{className:"jp-Shortcuts-ShortcutContainer",key:this.props.shortcut.id+"_"+t,"data-keybinding":t,"data-shortcut":this.props.shortcut.id,onClick:()=>this.toggleInputReplaceMethod(t)},this.isLocationBeingEdited(t)?this.getShortCutAsInput(e,t):this.getShortCutForDisplayOnly(e),this.getOrDiplayIfNeeded(t<s.length-1))}getAddLink(){return d.createElement("a",{className:this.state.displayNewInput?"":"jp-Shortcuts-Plus",onClick:()=>{this.toggleInputNew()}},this._trans.__("Add"))}getInputBoxWhenToggled(){return this.state.displayNewInput?d.createElement(g,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:this.toggleInputNew,shortcut:this.props.shortcut,displayConflicts:t=>{const e=new Map(this.state.conflicts);e.set(null,t),this.setState({conflicts:e})},toSymbols:this.toSymbols,displayInput:this.state.displayNewInput,placeholder:"",translator:this.props.external.translator}):d.createElement("div",null)}getShortCutsCell(t){return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:this.getClassNameForShortCuts(t)},t.map(((e,s)=>this.getDivForKey(s,e,t))),t.length>=1&&!this.state.displayNewInput&&!this.state.displayReplaceInput[0]&&this.getAddLink(),0===t.length&&!this.state.displayNewInput&&this.getAddLink(),this.getInputBoxWhenToggled()))}getConflicts(){const t=[...this.state.conflicts.values()].filter((t=>0!==t.conflictsWith.length));return 0===t.length?d.createElement(d.Fragment,null):d.createElement("div",{className:"jp-Shortcuts-Row"},d.createElement("div",{className:"jp-Shortcuts-ConflictContainer"},t.map((t=>{const e=t.keys.join(" ")+"_"+t.conflictsWith.map((t=>t.id)).join("");return d.createElement("div",{className:"jp-Shortcuts-Conflict",key:e},d.createElement("div",{className:"jp-Shortcuts-ErrorMessage"},this._trans.__("Shortcut already in use by %1. Overwrite it?",t.conflictsWith.map((t=>{var e;return null!==(e=t.label)&&void 0!==e?e:t.command})).join(", "))),d.createElement("div",{className:"jp-Shortcuts-ErrorButton"},d.createElement("button",null,this._trans.__("Cancel")),d.createElement("button",{id:"no-blur",onClick:()=>{t.overwrite()}},this._trans.__("Overwrite"))))}))))}get _nonEmptyBindings(){return this.props.shortcut.keybindings.filter((t=>0!==t.keys.filter((t=>""!=t)).length))}render(){return d.createElement(d.Fragment,null,d.createElement("div",{className:"jp-Shortcuts-Row","data-shortcut":this.props.shortcut.id},this.getCategoryCell(),this.getLabelCell(),this.getShortCutsCell(this._nonEmptyBindings),this.getSourceCell(),this.getOptionalSelectorCell()),this.getConflicts())}}class S extends d.Component{render(){return d.createElement("div",{className:"jp-Shortcuts-ShortcutListContainer",style:{height:this.props.height-115+"px"},id:"shortcutListContainer"},d.createElement("div",{className:"jp-Shortcuts-ShortcutList"},this.props.shortcuts.map((t=>d.createElement(y,{key:t.id,addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,resetKeybindings:this.props.resetKeybindings,findConflictsFor:this.props.findConflictsFor,shortcut:t,showSelectors:this.props.showSelectors,external:this.props.external})))))}}class b extends d.Component{render(){return d.createElement("div",{className:this.props.title.toLowerCase()===this.props.active?"jp-Shortcuts-Header jp-Shortcuts-CurrentHeader":"jp-Shortcuts-Header",onClick:()=>this.props.updateSort(this.props.columnId)},this.props.title,d.createElement(o.caretDownEmptyThinIcon.react,{className:"jp-Shortcuts-SortButton jp-ShortcutTitleItem-sortButton"}))}}function f(t){return d.createElement("div",{className:"jp-Shortcuts-Symbols"},d.createElement("table",null,d.createElement("tbody",null,d.createElement("tr",null,d.createElement("td",null,d.createElement("kbd",null,"Cmd")),d.createElement("td",null,"⌘"),d.createElement("td",null,d.createElement("kbd",null,"Ctrl")),d.createElement("td",null,"⌃")),d.createElement("tr",null,d.createElement("td",null,d.createElement("kbd",null,"Alt")),d.createElement("td",null,"⌥"),d.createElement("td",null,d.createElement("kbd",null,"Shift")),d.createElement("td",null,"⇧")))))}function C(t){const e=t.translator.load("jupyterlab");return d.createElement("div",{className:"jp-Shortcuts-AdvancedOptions"},d.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>t.toggleSelectors()},t.showSelectors?e.__("Hide Selectors"):e.__("Show Selectors")),d.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>t.resetShortcuts()},e.__("Reset All")))}class k extends d.Component{constructor(t){super(t)}getShortCutTitleItem(t,e){return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement(b,{title:t,updateSort:this.props.updateSort,active:this.props.currentSort,columnId:e}))}render(){const t=this.props.translator.load("jupyterlab");return d.createElement("div",{className:"jp-Shortcuts-Top"},d.createElement("div",{className:"jp-Shortcuts-TopNav"},d.createElement(f,null),d.createElement(o.FilterBox,{"aria-label":t.__("Search shortcuts"),updateFilter:(t,e)=>this.props.updateSearchQuery(null!=e?e:""),placeholder:t.__("Search…"),useFuzzyFilter:!1}),d.createElement(C,{toggleSelectors:this.props.toggleSelectors,showSelectors:this.props.showSelectors,resetShortcuts:this.props.resetShortcuts,translator:this.props.translator})),d.createElement("div",{className:"jp-Shortcuts-HeaderRowContainer"},d.createElement("div",{className:"jp-Shortcuts-HeaderRow"},this.getShortCutTitleItem(t.__("Category"),"category"),this.getShortCutTitleItem(t.__("Command"),"command"),d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"title-div"},t.__("Shortcut"))),this.getShortCutTitleItem(t.__("Source"),"source"),this.props.showSelectors&&this.getShortCutTitleItem(t.__("Selectors"),"selector"))))}}class v extends Map{constructor(t){var e,s,i;super();const{settings:n,commandRegistry:r}=t,o=null!==(e=n.user.shortcuts)&&void 0!==e?e:[],l=new Set(o.map(this._computeKeybindingId.bind(this))),a=null!==(s=n.composite.shortcuts)&&void 0!==s?s:[];for(const t of a){const e=this._computeTargetId(t),s=this._computeKeybindingId(t),n={keys:t.keys,isDefault:!l.has(s)},o=this.get(e);if(o)o.keybindings.push(n);else{const s=t.command.split(":"),o=null!==(i=r.label(t.command,t.args))&&void 0!==i?i:s.length>1?s[1]:void 0,l=s[0];this.set(e,{id:e,selector:t.selector,command:t.command,category:l,label:o,args:t.args,keybindings:[n]})}}}findConflictsFor(t,e){const s=new _({registry:this});let i=s.findConflicts(t,e);if(0!==i.length)return i;for(const n of t)if(i=s.findConflicts([n],e),0!==i.length)return i;return[]}_computeTargetId(t){var e;return t.command+"_"+t.selector+"_"+JSON.stringify(null!==(e=t.args)&&void 0!==e?e:{})}_computeKeybindingId(t){var e;return[t.command,t.selector,JSON.stringify(null!==(e=t.args)&&void 0!==e?e:{}),t.keys.join(" ")].join("_")}}class _{constructor(t){var e;const s=new Map;for(const i of t.registry.values())for(const t of i.keybindings){const n=this._keybindingHash(t.keys,i.selector),r=null!==(e=s.get(n))&&void 0!==e?e:[];r.push(i),s.set(n,r)}this._keybindingsMap=s}findConflicts(t,e){var s;const i=this._keybindingHash(t,e);return null!==(s=this._keybindingsMap.get(i))&&void 0!==s?s:[]}_keybindingHash(t,e){return t.join(" ")+"_"+e}}function E(t,e){var s;const i=t.category.toLowerCase(),n=`${i} ${(null!==(s=t.label)&&void 0!==s?s:"").toLowerCase()}`;let r=1/0,o=null;const l=/\b\w/g;for(;;){const t=l.exec(n);if(!t)break;const s=p.StringExt.matchSumOfDeltas(n,e,t.index);if(!s)break;s&&s.score<=r&&(r=s.score,o=s.indices)}if(!o||r===1/0)return null;const a=i.length+1,c=p.ArrayExt.lowerBound(o,a,((t,e)=>t-e)),h=o.slice(0,c),d=o.slice(c);for(let t=0,e=d.length;t<e;++t)d[t]-=a;return 0===h.length?{matchType:0,categoryIndices:null,labelIndices:d,score:r,item:t}:0===d.length?{matchType:1,categoryIndices:h,labelIndices:null,score:r,item:t}:{matchType:2,categoryIndices:h,labelIndices:d,score:r,item:t}}class I extends d.Component{constructor(t){super(t),this.updateSearchQuery=t=>{this.setState({searchQuery:t},(()=>{const t=this.state.shortcutRegistry;this.setState({filteredShortcutList:this._searchFilterShortcuts(t)},(()=>{this.sortShortcuts()}))}))},this.resetShortcuts=async()=>{const t=await this.props.external.getSettings();await t.set("shortcuts",[]),await this._refreshShortcutList()},this.resetKeybindings=async t=>{for(const e of t.keybindings)await this._setKeybinding(t,e.isDefault?e.keys:[],e)},this.replaceKeybinding=async(t,e,s)=>this._setKeybinding(t,s,e),this.deleteKeybinding=async(t,e)=>{await this._setKeybinding(t,[],e)},this.addKeybinding=async(t,e)=>{await this._setKeybinding(t,e)},this.toggleSelectors=()=>{this.setState({showSelectors:!this.state.showSelectors})},this.updateSort=t=>{t!==this.state.currentSort&&this.setState({currentSort:t},this.sortShortcuts)},this.state={shortcutRegistry:null,filteredShortcutList:new Array,shortcutsFetched:!1,searchQuery:"",showSelectors:!1,currentSort:"category"}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this),this._refreshShortcutList()}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(t,e){if("toggle-selectors"===e.request)return this.toggleSelectors();"reset-all"===e.request&&await this.resetShortcuts()}async _refreshShortcutList(){const t=await this.props.external.getSettings(),e=new v({commandRegistry:this.props.external.commandRegistry,settings:t});this.setState({shortcutRegistry:e,filteredShortcutList:this._searchFilterShortcuts(e),shortcutsFetched:!0},(()=>{this.sortShortcuts()}))}_searchFilterShortcuts(t){return t?function(t,e){e=e.replace(/\s+/g,"").toLowerCase();let s=[];for(const i of t.values()){if(!e){s.push({matchType:3,categoryIndices:null,labelIndices:null,score:0,item:i});continue}let t=E(i,e);t&&s.push(t)}return s}(t,this.state.searchQuery).map((t=>t.item)):[]}async _setKeybinding(t,e,s){var i,n,r;1===e.length&&""==e[0]&&(e=[]);const o=await this.props.external.getSettings(),l=null!==(i=o.user.shortcuts)&&void 0!==i?i:[],c=[];let h=!1;for(let i of l)if(i.command===t.command&&i.selector===t.selector&&a.JSONExt.deepEqual(null!==(n=i.args)&&void 0!==n?n:{},null!==(r=t.args)&&void 0!==r?r:{})&&s&&a.JSONExt.deepEqual(s.keys,i.keys)){const t=s&&s.isDefault&&a.JSONExt.deepEqual(s.keys,e);0===e.length||t||c.push({command:i.command,selector:i.selector,keys:e}),h=!0}else{if(s&&!a.JSONExt.deepEqual(s.keys,i.keys)&&0===e.length)continue;c.push(i)}if(!h){const i=!s||!a.JSONExt.deepEqual(s.keys,e);s&&s.isDefault&&i&&c.push({command:t.command,selector:t.selector,disabled:!0,keys:s.keys}),0!==e.length&&c.push({command:t.command,selector:t.selector,keys:e})}await o.set("shortcuts",c),await this._refreshShortcutList()}sortShortcuts(){const t=this.state.filteredShortcutList;let e=this.state.currentSort;"command"===e&&(e="label");const s=t=>{var s;return"source"===e?t.keybindings.every((t=>t.isDefault))?"default":"other":null!==(s=t[e])&&void 0!==s?s:""};t.sort(((t,e)=>{var i,n;const r=s(t),o=s(e),l=r.localeCompare(o);if(l)return l;{const s=null!==(i=t.label)&&void 0!==i?i:"",r=null!==(n=e.label)&&void 0!==n?n:"";return s.localeCompare(r)}})),this.setState({filteredShortcutList:t})}render(){return this.state.shortcutsFetched?d.createElement("div",{className:"jp-Shortcuts-ShortcutUI",id:"jp-shortcutui"},d.createElement(k,{updateSearchQuery:this.updateSearchQuery,resetShortcuts:this.resetShortcuts,toggleSelectors:this.toggleSelectors,showSelectors:this.state.showSelectors,updateSort:this.updateSort,currentSort:this.state.currentSort,width:this.props.width,translator:this.props.external.translator}),d.createElement(S,{shortcuts:this.state.filteredShortcutList,resetKeybindings:this.resetKeybindings,addKeybinding:this.addKeybinding,replaceKeybinding:this.replaceKeybinding,deleteKeybinding:this.deleteKeybinding,showSelectors:this.state.showSelectors,findConflictsFor:(t,e)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(t,e):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),height:this.props.height,external:this.props.external})):null}}var w=s(81997);const j="@jupyterlab/shortcuts-extension:shortcuts";function x(t,e,s,i){return{translator:s,getSettings:()=>t.load(j,!0),commandRegistry:e.commands,actionRequested:i}}const N={id:j,description:"Adds the keyboard shortcuts editor.",requires:[n.ISettingRegistry],optional:[r.ITranslator,o.IFormRendererRegistry],activate:async(t,e,s,o)=>{const c=null!=s?s:r.nullTranslator,d=c.load("jupyterlab"),{commands:p}=t;let m,g,y={};if(o){const s=new w.Signal({}),n=t=>void 0!==t.dataset.shortcut;t.commands.addCommand(i.editBinding,{label:d.__("Edit Keybinding"),caption:d.__("Edit existing keybinding"),execute:()=>{const e=t.contextMenuHitTest(n),i=null==e?void 0:e.dataset.keybinding,r=null==e?void 0:e.dataset.shortcut;if(!r||!i)return console.log("Missing shortcut id/keybinding information");s.emit({request:"edit-keybinding",keybinding:parseInt(i,10),shortcutId:r})}}),t.commands.addCommand(i.deleteBinding,{label:d.__("Delete Keybinding"),caption:d.__("Delete chosen keybinding"),execute:()=>{const e=t.contextMenuHitTest(n),i=null==e?void 0:e.dataset.keybinding,r=null==e?void 0:e.dataset.shortcut;if(!r||!i)return console.log("Missing shortcut id/keybinding information");s.emit({request:"delete-keybinding",keybinding:parseInt(i,10),shortcutId:r})}}),t.commands.addCommand(i.addBinding,{label:d.__("Add Keybinding"),caption:d.__("Add new keybinding for existing shortcut target"),execute:()=>{const e=t.contextMenuHitTest(n),i=null==e?void 0:e.dataset.shortcut;if(!i)return console.log("Missing shortcut id to add keybinding to");s.emit({request:"add-keybinding",shortcutId:i})}}),p.addCommand(i.toggleSelectors,{label:d.__("Toggle Selectors"),caption:d.__("Toggle command selectors"),execute:()=>{s.emit({request:"toggle-selectors"})}}),p.addCommand(i.resetAll,{label:d.__("Reset All"),caption:d.__("Reset all shortcuts"),execute:()=>{s.emit({request:"reset-all"})}});const r={fieldRenderer:i=>(t=>u().createElement(I,{external:t.external,height:1e3,width:1e3}))({external:x(e,t,c,s),...i})};o.addRenderer(`${N.id}.shortcuts`,r)}function S(s){const i=t.commands.listCommands().join("\n");g||(g=a.JSONExt.deepCopy(s.properties.shortcuts.default)),y={},s.properties.shortcuts.default=Object.keys(e.plugins).map((t=>{const s=e.plugins[t].schema["jupyter.lab.shortcuts"]||[];return y[t]=s,s})).concat([g]).reduce(((t,e)=>h.Platform.IS_MAC?t.concat(e):t.concat(e.filter((t=>!t.keys.some((t=>{const{cmd:e}=l.CommandRegistry.parseKeystroke(t);return e})))))),[]).sort(((t,e)=>t.command.localeCompare(e.command))),s.properties.shortcuts.description=d.__('Note: To disable a system default shortcut,\ncopy it to User Preferences and add the\n"disabled" key, for example:\n{\n "command": "application:activate-next-tab",\n "keys": [\n "Ctrl Shift ]"\n ],\n "selector": "body",\n "disabled": true\n}\n\nList of commands followed by keyboard shortcuts:\n%1\n\nList of keyboard shortcuts:',i)}e.pluginChanged.connect((async(t,s)=>{if(s!==N.id){const t=y[s],i=e.plugins[s].schema["jupyter.lab.shortcuts"]||[];void 0!==t&&a.JSONExt.deepEqual(t,i)||(m=null,e.plugins[N.id].schema.properties.shortcuts.default=g,await e.load(N.id,!0))}})),e.transform(N.id,{compose:t=>{var e,s,i,r;m||(m=a.JSONExt.deepCopy(t.schema),S(m));const o=null!==(i=null===(s=null===(e=m.properties)||void 0===e?void 0:e.shortcuts)||void 0===s?void 0:s.default)&&void 0!==i?i:[],l={shortcuts:null!==(r=t.data.user.shortcuts)&&void 0!==r?r:[]},c={shortcuts:n.SettingRegistry.reconcileShortcuts(o,l.shortcuts)};return t.data={composite:c,user:l},t},fetch:t=>(m||(m=a.JSONExt.deepCopy(t.schema),S(m)),{data:t.data,id:t.id,raw:t.raw,schema:m,version:t.version})});try{m=null;const t=await e.load(N.id);A.loadShortcuts(p,t.composite),t.changed.connect((()=>{A.loadShortcuts(p,t.composite)}))}catch(t){console.error(`Loading ${N.id} failed.`,t)}},autoStart:!0},K=N;var A;!function(t){let e;t.loadShortcuts=function(t,s){var i;const n=null!==(i=null==s?void 0:s.shortcuts)&&void 0!==i?i:[];e&&e.dispose(),e=n.reduce(((e,s)=>{const i=function(t){if(!t||"object"!=typeof t)return;const{isArray:e}=Array;return"command"in t&&"keys"in t&&"selector"in t&&e(t.keys)?t:void 0}(s);return i&&e.add(t.addKeyBinding(i)),e}),new c.DisposableSet)}}(A||(A={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[113],{113:(t,e,s)=>{s.r(e),s.d(e,{default:()=>A});var i,n=s(3012),r=s(93050),o=s(76878),l=s(86072),a=s(21961),c=s(49901),h=s(47392);!function(t){t.editBinding="shortcuts:edit-keybinding",t.addBinding="shortcuts:add-keybinding",t.deleteBinding="shortcuts:delete-keybinding",t.toggleSelectors="shortcuts:toggle-selectors",t.resetAll="shortcuts:reset-all"}(i||(i={}));var d=s(78156),u=s.n(d),p=s(14931),m=s(70013);const g="jp-Shortcuts-ConflictContainer";class y extends d.Component{constructor(t){super(t),this.handleSubmit=async()=>{this._isReplacingExistingKeybinding?this.state.selected?this.props.toggleInput():await this._updateShortcut():(await this._updateShortcut(),this.props.toggleInput())},this._updateShortcut=async()=>{const t=[...this.state.keys,this.state.currentChain];this.setState({keys:t}),this.props.keybinding?await this.props.replaceKeybinding(this.props.shortcut,this.props.keybinding,t):await this.props.addKeybinding(this.props.shortcut,t)},this._handleOverwrite=async(t,e)=>{for(const s of t){const t=s.keybindings.filter((t=>a.JSONExt.deepEqual(t.keys,e)||e.some((e=>a.JSONExt.deepEqual(t.keys,[e])))))[0];t?await this.props.deleteKeybinding(s,t):console.error(`Conflicting binding could not be found for ${s} using keys ${e}`)}await this._updateShortcut()},this.parseChaining=(t,e,s,i,n)=>{let r=m.EN_US.keyForKeydownEvent(t.nativeEvent);const o=["Shift","Control","Alt","Meta","Ctrl","Accel"];if("Backspace"===t.key)s="",i=[],n="",this.setState({value:"",userInput:s,keys:i,currentChain:n});else if("CapsLock"!==t.key){const e=s.substr(s.lastIndexOf(" ")+1,s.length).trim();-1===o.lastIndexOf(e)&&""!=e?(s+=",",i.push(n),n="",t.ctrlKey&&"Control"!=t.key&&(s=(s+" Ctrl").trim(),n=(n+" Ctrl").trim()),t.metaKey&&"Meta"!=t.key&&(s=(s+" Accel").trim(),n=(n+" Accel").trim()),t.altKey&&"Alt"!=t.key&&(s=(s+" Alt").trim(),n=(n+" Alt").trim()),t.shiftKey&&"Shift"!=t.key&&(s=(s+" Shift").trim(),n=(n+" Shift").trim()),-1===o.lastIndexOf(t.key)?(s=(s+" "+r).trim(),n=(n+" "+r).trim()):"Meta"===t.key?(s=(s+" Accel").trim(),n=(n+" Accel").trim()):"Control"===t.key?(s=(s+" Ctrl").trim(),n=(n+" Ctrl").trim()):"Shift"===t.key?(s=(s+" Shift").trim(),n=(n+" Shift").trim()):"Alt"===t.key?(s=(s+" Alt").trim(),n=(n+" Alt").trim()):(s=(s+" "+t.key).trim(),n=(n+" "+t.key).trim())):"Control"===t.key?(s=(s+" Ctrl").trim(),n=(n+" Ctrl").trim()):"Meta"===t.key?(s=(s+" Accel").trim(),n=(n+" Accel").trim()):"Shift"===t.key?(s=(s+" Shift").trim(),n=(n+" Shift").trim()):"Alt"===t.key?(s=(s+" Alt").trim(),n=(n+" Alt").trim()):(s=(s+" "+r).trim(),n=(n+" "+r).trim())}return this.setState({keys:i,currentChain:n}),[s,i,n]},this.checkNonFunctional=()=>{const t=["Ctrl","Alt","Accel","Shift"],e=this.state.currentChain.split(" "),s=e[e.length-1];return this.setState({isFunctional:!(-1!==t.indexOf(s))}),-1!==t.indexOf(s)},this.checkShortcutAvailability=(t,e,s)=>{const i=this.props.findConflictsFor([...e,s],this.props.shortcut.selector),n=""===t||0===i.length;return!n&&1===i.length&&i[0].id===this.props.shortcut.id&&this._isReplacingExistingKeybinding?(this.setState({isAvailable:!0}),[]):(this.setState({isAvailable:n}),i)},this.handleInput=t=>{t.preventDefault(),this.setState({selected:!1});const e=this.parseChaining(t,this.state.value,this.state.userInput,this.state.keys,this.state.currentChain),s=e[0],i=e[1],n=e[2],r=this.props.toSymbols(s);let o=this.checkShortcutAvailability(s,i,n);this.setState({value:r,userInput:s,keys:i,currentChain:n},(()=>{this.checkNonFunctional(),this._emitConflicts(o)}))},this._handleBlur=t=>{var e,s;(null===(e=this._ref.current)||void 0===e?void 0:e.contains(t.relatedTarget))||(null===(s=t.relatedTarget)||void 0===s?void 0:s.closest(`.${g}`))||this.props.toggleInput()},this._ref=d.createRef(),this.state={value:this.props.placeholder,userInput:"",isAvailable:!0,isFunctional:this._isReplacingExistingKeybinding,keys:[],currentChain:"",selected:!0}}get _isReplacingExistingKeybinding(){return!!this.props.keybinding}_emitConflicts(t){const e=[...this.state.keys,this.state.currentChain];this.props.displayConflicts({conflictsWith:t,keys:this.state.keys,overwrite:async()=>{this.setState({isAvailable:!0}),await this._handleOverwrite(t,e),this.props.toggleInput()},cancel:()=>{this.props.toggleInput()}})}render(){const t=this.props.translator.load("jupyterlab");let e="jp-Shortcuts-Input";return this.state.isAvailable||(e+=" jp-mod-unavailable-Input"),d.createElement("div",{className:this.props.displayInput?this._isReplacingExistingKeybinding?"jp-Shortcuts-InputBox":"jp-Shortcuts-InputBox jp-Shortcuts-InputBoxNew":"jp-mod-hidden",ref:this._ref,onBlur:this._handleBlur},d.createElement("div",{tabIndex:0,className:e,onKeyDown:this.handleInput,ref:t=>t&&t.focus(),"data-lm-suppress-shortcuts":"true"},d.createElement("p",{className:this.state.selected&&this._isReplacingExistingKeybinding?"jp-Shortcuts-InputText jp-mod-selected-InputText":""===this.state.value?"jp-Shortcuts-InputText jp-mod-waiting-InputText":"jp-Shortcuts-InputText"},""===this.state.value?t.__("press keys"):this.state.value)),d.createElement("button",{className:this.state.isFunctional?this.state.isAvailable?"jp-Shortcuts-Submit":"jp-Shortcuts-Submit jp-mod-conflict-Submit":"jp-Shortcuts-Submit jp-mod-defunc-Submit",disabled:!this.state.isAvailable||!this.state.isFunctional,onClick:this.handleSubmit},this.state.isAvailable?d.createElement(o.checkIcon.react,null):d.createElement(o.errorIcon.react,null)))}}class S extends d.Component{constructor(t){super(t),this.toggleInputNew=()=>{this.setState({displayNewInput:!this.state.displayNewInput,conflicts:new Map})},this.toSymbols=t=>t.split(" ").reduce(((t,e)=>"Ctrl"===e?(t+" ⌃").trim():"Alt"===e?(t+" ⌥").trim():"Shift"===e?(t+" ⇧").trim():"Accel"===e&&h.Platform.IS_MAC?(t+" ⌘").trim():"Accel"===e?(t+" ⌃").trim():(t+" "+e).trim()),""),this._trans=this.props.external.translator.load("jupyterlab"),this.state={displayNewInput:!1,displayReplaceInput:Object.freeze({}),conflicts:new Map}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this)}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(t,e){if(!("shortcutId"in e)||e.shortcutId===this.props.shortcut.id){if("add-keybinding"===e.request)return this.toggleInputNew();if("edit-keybinding"===e.request&&this.toggleInputReplaceMethod(e.keybinding),"delete-keybinding"===e.request){const t=this.props.shortcut,s=t.keybindings[e.keybinding];this.props.deleteKeybinding(t,s).catch(console.error)}}}getCategoryCell(){return d.createElement("div",{className:"jp-Shortcuts-Cell"},this.props.shortcut.category)}getLabelCell(){var t;return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"jp-label"},null!==(t=this.props.shortcut.label)&&void 0!==t?t:this._trans.__("(Command label missing)")))}getResetShortCutLink(){return d.createElement("a",{className:"jp-Shortcuts-Reset",onClick:()=>this.props.resetKeybindings(this.props.shortcut)},this._trans.__("Reset"))}getSourceCell(){const t=this.props.shortcut.keybindings.every((t=>t.isDefault));return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"jp-Shortcuts-SourceCell"},t?this._trans.__("Default"):this._trans.__("Custom")),t?"":this.getResetShortCutLink())}getOptionalSelectorCell(){return this.props.showSelectors?d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"jp-selector"},this.props.shortcut.selector)):null}getClassNameForShortCuts(t){const e=["jp-Shortcuts-ShortcutCell"];switch(t.length){case 1:e.push("jp-Shortcuts-SingleCell");break;case 0:e.push("jp-Shortcuts-EmptyCell")}return e.join(" ")}toggleInputReplaceMethod(t){const e=this.state.displayReplaceInput[t];this.setState({displayReplaceInput:{...this.state.displayReplaceInput,[t]:!e},conflicts:new Map})}getDisplayReplaceInput(t){return this.state.displayReplaceInput[t]}getOrDiplayIfNeeded(t){const e=["jp-Shortcuts-Or"];return(t||this.state.displayNewInput)&&e.push("jp-Shortcuts-Or-Forced"),d.createElement("div",{className:e.join(" ")},this._trans.__("or"))}getShortCutAsInput(t,e){return d.createElement(y,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:()=>this.toggleInputReplaceMethod(e),shortcut:this.props.shortcut,keybinding:t,displayConflicts:e=>{const s=new Map(this.state.conflicts);s.set(t,e),this.setState({conflicts:s})},toSymbols:this.toSymbols,displayInput:this.getDisplayReplaceInput(e),placeholder:this.toSymbols(t.keys.join(", ")),translator:this.props.external.translator})}getShortCutForDisplayOnly(t){return t.keys.map(((e,s)=>d.createElement("div",{className:"jp-Shortcuts-ShortcutKeysContainer",key:s},d.createElement("div",{className:"jp-Shortcuts-ShortcutKeys"},this.toSymbols(e)),s+1<t.keys.length?d.createElement("div",{className:"jp-Shortcuts-Comma"},","):null)))}isLocationBeingEdited(t){return this.state.displayReplaceInput[t]}getDivForKey(t,e,s){return d.createElement("div",{className:"jp-Shortcuts-ShortcutContainer",key:this.props.shortcut.id+"_"+t,"data-keybinding":t,"data-shortcut":this.props.shortcut.id,onClick:()=>this.toggleInputReplaceMethod(t)},this.isLocationBeingEdited(t)?this.getShortCutAsInput(e,t):this.getShortCutForDisplayOnly(e),this.getOrDiplayIfNeeded(t<s.length-1))}getAddLink(){return d.createElement("a",{className:this.state.displayNewInput?"":"jp-Shortcuts-Plus",onClick:()=>{this.toggleInputNew()}},this._trans.__("Add"))}getInputBoxWhenToggled(){return this.state.displayNewInput?d.createElement(y,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:this.toggleInputNew,shortcut:this.props.shortcut,displayConflicts:t=>{const e=new Map(this.state.conflicts);e.set(null,t),this.setState({conflicts:e})},toSymbols:this.toSymbols,displayInput:this.state.displayNewInput,placeholder:"",translator:this.props.external.translator}):d.createElement("div",null)}getShortCutsCell(t){return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:this.getClassNameForShortCuts(t)},t.map(((e,s)=>this.getDivForKey(s,e,t))),t.length>=1&&!this.state.displayNewInput&&!this.state.displayReplaceInput[0]&&this.getAddLink(),0===t.length&&!this.state.displayNewInput&&this.getAddLink(),this.getInputBoxWhenToggled()))}getConflicts(){const t=[...this.state.conflicts.values()].filter((t=>0!==t.conflictsWith.length));return 0===t.length?d.createElement(d.Fragment,null):d.createElement("div",{className:"jp-Shortcuts-Row jp-Shortcuts-RowWithConflict"},d.createElement("div",{className:g},t.map((t=>{const e=t.keys.join(" ")+"_"+t.conflictsWith.map((t=>t.id)).join("");return d.createElement("div",{className:"jp-Shortcuts-Conflict",key:e},d.createElement("div",{className:"jp-Shortcuts-ErrorMessage"},this._trans.__("Shortcut already in use by %1. Overwrite it?",t.conflictsWith.map((t=>{var e;return null!==(e=t.label)&&void 0!==e?e:t.command})).join(", "))),d.createElement("div",{className:"jp-Shortcuts-ErrorButton"},d.createElement("button",{className:"jp-Button jp-mod-reject jp-mod-styled",onClick:()=>{this._clearConflict(t),t.cancel()}},this._trans.__("Cancel")),d.createElement("button",{className:"jp-Button jp-mod-warn jp-mod-styled",onClick:()=>{this._clearConflict(t),t.overwrite()}},this._trans.__("Overwrite"))))}))))}_clearConflict(t){const e=new Map,s=this._conflictId(t);for(const[t,i]of this.state.conflicts.entries())this._conflictId(i)!==s&&e.set(t,i);this.setState({conflicts:e})}_conflictId(t){return t.keys.join(" ")+"_"+t.conflictsWith.map((t=>t.id)).join("")}get _nonEmptyBindings(){return this.props.shortcut.keybindings.filter((t=>0!==t.keys.filter((t=>""!=t)).length))}render(){return d.createElement(d.Fragment,null,d.createElement("div",{className:"jp-Shortcuts-Row","data-shortcut":this.props.shortcut.id},this.getCategoryCell(),this.getLabelCell(),this.getShortCutsCell(this._nonEmptyBindings),this.getSourceCell(),this.getOptionalSelectorCell()),this.getConflicts())}}class f extends d.Component{render(){return d.createElement("div",{className:"jp-Shortcuts-ShortcutListContainer",style:{height:this.props.height-115+"px"},id:"shortcutListContainer"},d.createElement("div",{className:"jp-Shortcuts-ShortcutList"},this.props.shortcuts.map((t=>d.createElement(S,{key:t.id,addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,resetKeybindings:this.props.resetKeybindings,findConflictsFor:this.props.findConflictsFor,shortcut:t,showSelectors:this.props.showSelectors,external:this.props.external})))))}}class b extends d.Component{render(){return d.createElement("div",{className:this.props.title.toLowerCase()===this.props.active?"jp-Shortcuts-Header jp-Shortcuts-CurrentHeader":"jp-Shortcuts-Header",onClick:()=>this.props.updateSort(this.props.columnId)},this.props.title,d.createElement(o.caretDownEmptyThinIcon.react,{className:"jp-Shortcuts-SortButton jp-ShortcutTitleItem-sortButton"}))}}function C(t){return d.createElement("div",{className:"jp-Shortcuts-Symbols"},d.createElement("table",null,d.createElement("tbody",null,d.createElement("tr",null,d.createElement("td",null,d.createElement("kbd",null,"Cmd")),d.createElement("td",null,"⌘"),d.createElement("td",null,d.createElement("kbd",null,"Ctrl")),d.createElement("td",null,"⌃")),d.createElement("tr",null,d.createElement("td",null,d.createElement("kbd",null,"Alt")),d.createElement("td",null,"⌥"),d.createElement("td",null,d.createElement("kbd",null,"Shift")),d.createElement("td",null,"⇧")))))}function _(t){const e=t.translator.load("jupyterlab");return d.createElement("div",{className:"jp-Shortcuts-AdvancedOptions"},d.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>t.toggleSelectors()},t.showSelectors?e.__("Hide Selectors"):e.__("Show Selectors")),d.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>t.resetShortcuts()},e.__("Reset All")))}class v extends d.Component{constructor(t){super(t)}getShortCutTitleItem(t,e){return d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement(b,{title:t,updateSort:this.props.updateSort,active:this.props.currentSort,columnId:e}))}render(){const t=this.props.translator.load("jupyterlab");return d.createElement("div",{className:"jp-Shortcuts-Top"},d.createElement("div",{className:"jp-Shortcuts-TopNav"},d.createElement(C,null),d.createElement(o.FilterBox,{"aria-label":t.__("Search shortcuts"),updateFilter:(t,e)=>this.props.updateSearchQuery(null!=e?e:""),placeholder:t.__("Search…"),useFuzzyFilter:!1}),d.createElement(_,{toggleSelectors:this.props.toggleSelectors,showSelectors:this.props.showSelectors,resetShortcuts:this.props.resetShortcuts,translator:this.props.translator})),d.createElement("div",{className:"jp-Shortcuts-HeaderRowContainer"},d.createElement("div",{className:"jp-Shortcuts-HeaderRow"},this.getShortCutTitleItem(t.__("Category"),"category"),this.getShortCutTitleItem(t.__("Command"),"command"),d.createElement("div",{className:"jp-Shortcuts-Cell"},d.createElement("div",{className:"title-div"},t.__("Shortcut"))),this.getShortCutTitleItem(t.__("Source"),"source"),this.props.showSelectors&&this.getShortCutTitleItem(t.__("Selectors"),"selector"))))}}class k extends Map{constructor(t){var e,s,i;super();const{settings:n,commandRegistry:r}=t,o=null!==(e=n.user.shortcuts)&&void 0!==e?e:[],l=new Set(o.map(this._computeKeybindingId.bind(this))),a=null!==(s=n.composite.shortcuts)&&void 0!==s?s:[];for(const t of a){const e=this._computeTargetId(t),s=this._computeKeybindingId(t),n={keys:t.keys,isDefault:!l.has(s)},o=this.get(e);if(o)o.keybindings.push(n);else{const s=t.command.split(":"),o=null!==(i=r.label(t.command,t.args))&&void 0!==i?i:s.length>1?s[1]:void 0,l=s[0];this.set(e,{id:e,selector:t.selector,command:t.command,category:l,label:o,args:t.args,keybindings:[n]})}}}findConflictsFor(t,e){const s=new E({registry:this});let i=s.findConflicts(t,e);if(0!==i.length)return i;for(const n of t)if(i=s.findConflicts([n],e),0!==i.length)return i;return[]}_computeTargetId(t){var e;return t.command+"_"+t.selector+"_"+JSON.stringify(null!==(e=t.args)&&void 0!==e?e:{})}_computeKeybindingId(t){var e;return[t.command,t.selector,JSON.stringify(null!==(e=t.args)&&void 0!==e?e:{}),t.keys.join(" ")].join("_")}}class E{constructor(t){var e;const s=new Map;for(const i of t.registry.values())for(const t of i.keybindings){const n=this._keybindingHash(t.keys,i.selector),r=null!==(e=s.get(n))&&void 0!==e?e:[];r.push(i),s.set(n,r)}this._keybindingsMap=s}findConflicts(t,e){var s;const i=this._keybindingHash(t,e);return null!==(s=this._keybindingsMap.get(i))&&void 0!==s?s:[]}_keybindingHash(t,e){return t.join(" ")+"_"+e}}function I(t,e){var s;const i=t.category.toLowerCase(),n=`${i} ${(null!==(s=t.label)&&void 0!==s?s:"").toLowerCase()}`;let r=1/0,o=null;const l=/\b\w/g;for(;;){const t=l.exec(n);if(!t)break;const s=p.StringExt.matchSumOfDeltas(n,e,t.index);if(!s)break;s&&s.score<=r&&(r=s.score,o=s.indices)}if(!o||r===1/0)return null;const a=i.length+1,c=p.ArrayExt.lowerBound(o,a,((t,e)=>t-e)),h=o.slice(0,c),d=o.slice(c);for(let t=0,e=d.length;t<e;++t)d[t]-=a;return 0===h.length?{matchType:0,categoryIndices:null,labelIndices:d,score:r,item:t}:0===d.length?{matchType:1,categoryIndices:h,labelIndices:null,score:r,item:t}:{matchType:2,categoryIndices:h,labelIndices:d,score:r,item:t}}class w extends d.Component{constructor(t){super(t),this.updateSearchQuery=t=>{this.setState({searchQuery:t},(()=>{const t=this.state.shortcutRegistry;this.setState({filteredShortcutList:this._searchFilterShortcuts(t)},(()=>{this.sortShortcuts()}))}))},this.resetShortcuts=async()=>{const t=await this.props.external.getSettings();await t.set("shortcuts",[]),await this._refreshShortcutList()},this.resetKeybindings=async t=>{await this._setKeybinding(t,[])},this.replaceKeybinding=async(t,e,s)=>this._setKeybinding(t,s,e),this.deleteKeybinding=async(t,e)=>{await this._setKeybinding(t,[],e)},this.addKeybinding=async(t,e)=>{await this._setKeybinding(t,e)},this.toggleSelectors=()=>{this.setState({showSelectors:!this.state.showSelectors})},this.updateSort=t=>{t!==this.state.currentSort&&this.setState({currentSort:t},this.sortShortcuts)},this.state={shortcutRegistry:null,filteredShortcutList:new Array,shortcutsFetched:!1,searchQuery:"",showSelectors:!1,currentSort:"category"}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this),this._refreshShortcutList()}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(t,e){if("toggle-selectors"===e.request)return this.toggleSelectors();"reset-all"===e.request&&await this.resetShortcuts()}async _refreshShortcutList(){const t=await this.props.external.getSettings(),e=new k({commandRegistry:this.props.external.commandRegistry,settings:t});this.setState({shortcutRegistry:e,filteredShortcutList:this._searchFilterShortcuts(e),shortcutsFetched:!0},(()=>{this.sortShortcuts()}))}_searchFilterShortcuts(t){return t?function(t,e){e=e.replace(/\s+/g,"").toLowerCase();let s=[];for(const i of t.values()){if(!e){s.push({matchType:3,categoryIndices:null,labelIndices:null,score:0,item:i});continue}let t=I(i,e);t&&s.push(t)}return s}(t,this.state.searchQuery).map((t=>t.item)):[]}async _setKeybinding(t,e,s){var i,n,r,o,l;1===e.length&&""==e[0]&&(e=[]);const c=await this.props.external.getSettings(),h=null!==(i=c.user.shortcuts)&&void 0!==i?i:[],d=[];let u=!1;for(let i of h)if(i.command===t.command&&i.selector===t.selector&&a.JSONExt.deepEqual(null!==(n=i.args)&&void 0!==n?n:{},null!==(r=t.args)&&void 0!==r?r:{})&&s&&a.JSONExt.deepEqual(s.keys,i.keys)){const t=s&&s.isDefault&&a.JSONExt.deepEqual(s.keys,e);0===e.length||t||d.push({command:i.command,selector:i.selector,keys:e}),u=!0}else{if(i.command===t.command&&i.selector===t.selector&&a.JSONExt.deepEqual(null!==(o=i.args)&&void 0!==o?o:{},null!==(l=t.args)&&void 0!==l?l:{})&&!s&&0===e.length)continue;d.push(i)}if(!u){const i=!s||!a.JSONExt.deepEqual(s.keys,e);s&&s.isDefault&&i&&d.push({command:t.command,selector:t.selector,disabled:!0,keys:s.keys}),0!==e.length&&d.push({command:t.command,selector:t.selector,keys:e})}await c.set("shortcuts",d),await this._refreshShortcutList()}sortShortcuts(){const t=this.state.filteredShortcutList;let e=this.state.currentSort;"command"===e&&(e="label");const s=t=>{var s;return"source"===e?t.keybindings.every((t=>t.isDefault))?"default":"other":null!==(s=t[e])&&void 0!==s?s:""};t.sort(((t,e)=>{var i,n;const r=s(t),o=s(e),l=r.localeCompare(o);if(l)return l;{const s=null!==(i=t.label)&&void 0!==i?i:"",r=null!==(n=e.label)&&void 0!==n?n:"";return s.localeCompare(r)}})),this.setState({filteredShortcutList:t})}render(){return this.state.shortcutsFetched?d.createElement("div",{className:"jp-Shortcuts-ShortcutUI",id:"jp-shortcutui"},d.createElement(v,{updateSearchQuery:this.updateSearchQuery,resetShortcuts:this.resetShortcuts,toggleSelectors:this.toggleSelectors,showSelectors:this.state.showSelectors,updateSort:this.updateSort,currentSort:this.state.currentSort,width:this.props.width,translator:this.props.external.translator}),d.createElement(f,{shortcuts:this.state.filteredShortcutList,resetKeybindings:this.resetKeybindings,addKeybinding:this.addKeybinding,replaceKeybinding:this.replaceKeybinding,deleteKeybinding:this.deleteKeybinding,showSelectors:this.state.showSelectors,findConflictsFor:(t,e)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(t,e):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),height:this.props.height,external:this.props.external})):null}}var j=s(2159);const N="@jupyterlab/shortcuts-extension:shortcuts";function x(t,e,s,i){return{translator:s,getSettings:()=>t.load(N,!0),commandRegistry:e.commands,actionRequested:i}}const K={id:N,description:"Adds the keyboard shortcuts editor.",requires:[n.ISettingRegistry],optional:[r.ITranslator,o.IFormRendererRegistry],activate:async(t,e,s,o)=>{const c=null!=s?s:r.nullTranslator,d=c.load("jupyterlab"),{commands:p}=t;let m,g,y={};if(o){const s=new j.Signal({}),n=t=>void 0!==t.dataset.shortcut;t.commands.addCommand(i.editBinding,{label:d.__("Edit Keybinding"),caption:d.__("Edit existing keybinding"),execute:()=>{const e=t.contextMenuHitTest(n),i=null==e?void 0:e.dataset.keybinding,r=null==e?void 0:e.dataset.shortcut;if(!r||!i)return console.log("Missing shortcut id/keybinding information");s.emit({request:"edit-keybinding",keybinding:parseInt(i,10),shortcutId:r})}}),t.commands.addCommand(i.deleteBinding,{label:d.__("Delete Keybinding"),caption:d.__("Delete chosen keybinding"),execute:()=>{const e=t.contextMenuHitTest(n),i=null==e?void 0:e.dataset.keybinding,r=null==e?void 0:e.dataset.shortcut;if(!r||!i)return console.log("Missing shortcut id/keybinding information");s.emit({request:"delete-keybinding",keybinding:parseInt(i,10),shortcutId:r})}}),t.commands.addCommand(i.addBinding,{label:d.__("Add Keybinding"),caption:d.__("Add new keybinding for existing shortcut target"),execute:()=>{const e=t.contextMenuHitTest(n),i=null==e?void 0:e.dataset.shortcut;if(!i)return console.log("Missing shortcut id to add keybinding to");s.emit({request:"add-keybinding",shortcutId:i})}}),p.addCommand(i.toggleSelectors,{label:d.__("Toggle Selectors"),caption:d.__("Toggle command selectors"),execute:()=>{s.emit({request:"toggle-selectors"})}}),p.addCommand(i.resetAll,{label:d.__("Reset All"),caption:d.__("Reset all shortcuts"),execute:()=>{s.emit({request:"reset-all"})}});const r={fieldRenderer:i=>(t=>u().createElement(w,{external:t.external,height:1e3,width:1e3}))({external:x(e,t,c,s),...i})};o.addRenderer(`${K.id}.shortcuts`,r)}function S(s){const i=t.commands.listCommands().join("\n");g||(g=a.JSONExt.deepCopy(s.properties.shortcuts.default)),y={},s.properties.shortcuts.default=Object.keys(e.plugins).map((t=>{const s=e.plugins[t].schema["jupyter.lab.shortcuts"]||[];return y[t]=s,s})).concat([g]).reduce(((t,e)=>h.Platform.IS_MAC?t.concat(e):t.concat(e.filter((t=>!t.keys.some((t=>{const{cmd:e}=l.CommandRegistry.parseKeystroke(t);return e})))))),[]).sort(((t,e)=>t.command.localeCompare(e.command))),s.properties.shortcuts.description=d.__('Note: To disable a system default shortcut,\ncopy it to User Preferences and add the\n"disabled" key, for example:\n{\n "command": "application:activate-next-tab",\n "keys": [\n "Ctrl Shift ]"\n ],\n "selector": "body",\n "disabled": true\n}\n\nList of commands followed by keyboard shortcuts:\n%1\n\nList of keyboard shortcuts:',i)}e.pluginChanged.connect((async(t,s)=>{if(s!==K.id){const t=y[s],i=e.plugins[s].schema["jupyter.lab.shortcuts"]||[];void 0!==t&&a.JSONExt.deepEqual(t,i)||(m=null,e.plugins[K.id].schema.properties.shortcuts.default=g,await e.load(K.id,!0))}})),e.transform(K.id,{compose:t=>{var e,s,i,r;m||(m=a.JSONExt.deepCopy(t.schema),S(m));const o=null!==(i=null===(s=null===(e=m.properties)||void 0===e?void 0:e.shortcuts)||void 0===s?void 0:s.default)&&void 0!==i?i:[],l={shortcuts:null!==(r=t.data.user.shortcuts)&&void 0!==r?r:[]},c={shortcuts:n.SettingRegistry.reconcileShortcuts(o,l.shortcuts)};return t.data={composite:c,user:l},t},fetch:t=>(m||(m=a.JSONExt.deepCopy(t.schema),S(m)),{data:t.data,id:t.id,raw:t.raw,schema:m,version:t.version})});try{m=null;const t=await e.load(K.id);R.loadShortcuts(p,t.composite),t.changed.connect((()=>{R.loadShortcuts(p,t.composite)}))}catch(t){console.error(`Loading ${K.id} failed.`,t)}},autoStart:!0},A=K;var R;!function(t){let e;t.loadShortcuts=function(t,s){var i;const n=null!==(i=null==s?void 0:s.shortcuts)&&void 0!==i?i:[];e&&e.dispose(),e=n.reduce(((e,s)=>{const i=function(t){if(!t||"object"!=typeof t)return;const{isArray:e}=Array;return"command"in t&&"keys"in t&&"selector"in t&&e(t.keys)?t:void 0}(s);return i&&e.add(t.addKeyBinding(i)),e}),new c.DisposableSet)}}(R||(R={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1198,8907],{41198:(t,e,s)=>{s.r(e),s.d(e,{IPropertyInspectorProvider:()=>c,SideBarPropertyInspectorProvider:()=>a});var n=s(70858),r=s(95291),o=s(81997),i=s(63485);const c=new(s(20998).Token)("@jupyterlab/property-inspector:IPropertyInspectorProvider","A service to registry new widget in the property inspector side panel.");class h extends i.Widget{constructor(){super(),this._tracker=new i.FocusTracker,this._inspectors=new Map,this.addClass("jp-PropertyInspector"),this._tracker=new i.FocusTracker,this._tracker.currentChanged.connect(this._onCurrentChanged,this)}register(t){if(this._inspectors.has(t))throw new Error("Widget is already registered");const e=new l.PropertyInspector(t);return t.disposed.connect(this._onWidgetDisposed,this),this._inspectors.set(t,e),e.onAction.connect(this._onInspectorAction,this),this._tracker.add(t),e}get currentWidget(){return this._tracker.currentWidget}refresh(){const t=this._tracker.currentWidget;if(!t)return void this.setContent(null);const e=this._inspectors.get(t);e&&this.setContent(e.content)}_onWidgetDisposed(t){const e=this._inspectors.get(t);e&&(e.dispose(),this._inspectors.delete(t))}_onInspectorAction(t,e){const s=t.owner,n=this._tracker.currentWidget;switch(e){case"content":n===s&&this.setContent(t.content);break;case"dispose":s&&(this._tracker.remove(s),this._inspectors.delete(s));break;case"show-panel":n===s&&this.showPanel();break;default:throw new Error("Unsupported inspector action")}}_onCurrentChanged(){const t=this._tracker.currentWidget;if(t){const e=this._inspectors.get(t).content;this.setContent(e)}else this.setContent(null)}}class a extends h{constructor({shell:t,placeholder:e,translator:s}){super(),this._labshell=t,this.translator=s||n.nullTranslator,this._trans=this.translator.load("jupyterlab");const r=this.layout=new i.SingletonLayout;if(e)this._placeholder=e;else{const t=document.createElement("div"),e=document.createElement("div");e.textContent=this._trans.__("No properties to inspect."),e.className="jp-PropertyInspector-placeholderContent",t.appendChild(e),this._placeholder=new i.Widget({node:t}),this._placeholder.addClass("jp-PropertyInspector-placeholder")}r.widget=this._placeholder,this._labshell.currentChanged.connect(this._onShellCurrentChanged,this),this._onShellCurrentChanged()}setContent(t){const e=this.layout;e.widget&&(e.widget.removeClass("jp-PropertyInspector-content"),e.removeWidget(e.widget)),t||(t=this._placeholder),t.addClass("jp-PropertyInspector-content"),e.widget=t}showPanel(){this._labshell.activateById(this.id)}_onShellCurrentChanged(){const t=this.currentWidget;if(!t)return void this.setContent(null);const e=this._labshell.currentWidget;(null==e?void 0:e.node.contains(t.node))?this.refresh():this.setContent(null)}}var l;!function(t){t.PropertyInspector=class{constructor(t){this._isDisposed=!1,this._content=null,this._owner=null,this._onAction=new o.Signal(this),this._owner=t}get owner(){return this._owner}get content(){return this._content}get isDisposed(){return this._isDisposed}get onAction(){return this._onAction}showPanel(){this._isDisposed||this._onAction.emit("show-panel")}render(t){this._isDisposed||(t instanceof i.Widget?this._content=t:this._content=r.ReactWidget.create(t),this._onAction.emit("content"))}dispose(){this._isDisposed||(this._isDisposed=!0,this._content=null,this._owner=null,o.Signal.clearData(this))}}}(l||(l={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1198,8907],{41198:(t,e,s)=>{s.r(e),s.d(e,{IPropertyInspectorProvider:()=>c,SideBarPropertyInspectorProvider:()=>a});var n=s(93050),r=s(76878),o=s(2159),i=s(2260);const c=new(s(21961).Token)("@jupyterlab/property-inspector:IPropertyInspectorProvider","A service to register new widgets in the property inspector side panel.");class h extends i.Widget{constructor(){super(),this._tracker=new i.FocusTracker,this._inspectors=new Map,this.addClass("jp-PropertyInspector"),this._tracker=new i.FocusTracker,this._tracker.currentChanged.connect(this._onCurrentChanged,this)}register(t){if(this._inspectors.has(t))throw new Error("Widget is already registered");const e=new l.PropertyInspector(t);return t.disposed.connect(this._onWidgetDisposed,this),this._inspectors.set(t,e),e.onAction.connect(this._onInspectorAction,this),this._tracker.add(t),e}get currentWidget(){return this._tracker.currentWidget}refresh(){const t=this._tracker.currentWidget;if(!t)return void this.setContent(null);const e=this._inspectors.get(t);e&&this.setContent(e.content)}_onWidgetDisposed(t){const e=this._inspectors.get(t);e&&(e.dispose(),this._inspectors.delete(t))}_onInspectorAction(t,e){const s=t.owner,n=this._tracker.currentWidget;switch(e){case"content":n===s&&this.setContent(t.content);break;case"dispose":s&&(this._tracker.remove(s),this._inspectors.delete(s));break;case"show-panel":n===s&&this.showPanel();break;default:throw new Error("Unsupported inspector action")}}_onCurrentChanged(){const t=this._tracker.currentWidget;if(t){const e=this._inspectors.get(t).content;this.setContent(e)}else this.setContent(null)}}class a extends h{constructor({shell:t,placeholder:e,translator:s}){super(),this._labshell=t,this.translator=s||n.nullTranslator,this._trans=this.translator.load("jupyterlab");const r=this.layout=new i.SingletonLayout;if(e)this._placeholder=e;else{const t=document.createElement("div"),e=document.createElement("div"),s=document.createElement("h3"),n=document.createElement("p");s.textContent=this._trans.__("No Properties"),n.textContent=this._trans.__("The property inspector allows to view and edit properties of a selected notebook."),e.className="jp-PropertyInspector-placeholderContent",e.appendChild(s),e.appendChild(n),t.appendChild(e),this._placeholder=new i.Widget({node:t}),this._placeholder.addClass("jp-PropertyInspector-placeholder")}r.widget=this._placeholder,this._labshell.currentChanged.connect(this._onShellCurrentChanged,this),this._onShellCurrentChanged()}setContent(t){const e=this.layout;e.widget&&(e.widget.removeClass("jp-PropertyInspector-content"),e.removeWidget(e.widget)),t||(t=this._placeholder),t.addClass("jp-PropertyInspector-content"),e.widget=t}showPanel(){this._labshell.activateById(this.id)}_onShellCurrentChanged(){const t=this.currentWidget;if(!t)return void this.setContent(null);const e=this._labshell.currentWidget;(null==e?void 0:e.node.contains(t.node))?this.refresh():this.setContent(null)}}var l;!function(t){t.PropertyInspector=class{constructor(t){this._isDisposed=!1,this._content=null,this._owner=null,this._onAction=new o.Signal(this),this._owner=t}get owner(){return this._owner}get content(){return this._content}get isDisposed(){return this._isDisposed}get onAction(){return this._onAction}showPanel(){this._isDisposed||this._onAction.emit("show-panel")}render(t){this._isDisposed||(t instanceof i.Widget?this._content=t:this._content=r.ReactWidget.create(t),this._onAction.emit("content"))}dispose(){this._isDisposed||(this._isDisposed=!0,this._content=null,this._owner=null,o.Signal.clearData(this))}}}(l||(l={}))}}]);
@@ -4,4 +4,4 @@
4
4
  || ${i} === "boolean" || ${s} === null`).assign(c,n._`[${s}]`)}}a.else(),m(e),a.endIf(),a.if(n._`${c} !== undefined`,(()=>{a.assign(s,c),function({gen:e,parentData:t,parentDataProperty:r},a){e.if(n._`${t} !== undefined`,(()=>e.assign(n._`${t}[${r}]`,a)))}(e,c)}))}(e,t,i):m(e)}))}return d};const l=new Set(["string","number","integer","boolean","null"]);function u(e,t,r,a=c.Correct){const s=a===c.Correct?n.operators.EQ:n.operators.NEQ;let o;switch(e){case"null":return n._`${t} ${s} null`;case"array":o=n._`Array.isArray(${t})`;break;case"object":o=n._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=i(n._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=i();break;default:return n._`typeof ${t} ${s} ${e}`}return a===c.Correct?o:(0,n.not)(o);function i(e=n.nil){return(0,n.and)(n._`typeof ${t} == "number"`,e,r?n._`isFinite(${t})`:n.nil)}}function f(e,t,r,a){if(1===e.length)return u(e[0],t,r,a);let s;const o=(0,i.toHash)(e);if(o.array&&o.object){const e=n._`typeof ${t} != "object"`;s=o.null?e:n._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else s=n.nil;o.number&&delete o.integer;for(const e in o)s=(0,n.and)(s,u(e,t,r,a));return s}t.checkDataType=u,t.checkDataTypes=f;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?n._`{type: ${e}}`:n._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:r,schema:a}=e,s=(0,i.schemaRefOrVal)(e,a,"type");return{gen:t,keyword:"type",data:r,schema:a.type,schemaCode:s,schemaValue:s,parentSchema:a,params:{},it:e}}(e);(0,o.reportError)(t,h)}t.reportTypeError=m},3862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const a=r(17231),s=r(20679);function o(e,t,r){const{gen:o,compositeRule:n,data:i,opts:c}=e;if(void 0===r)return;const d=a._`${i}${(0,a.getProperty)(t)}`;if(n)return void(0,s.checkStrictMode)(e,`default is ignored for: ${d}`);let l=a._`${d} === undefined`;"empty"===c.useDefaults&&(l=a._`${l} || ${d} === null || ${d} === ""`),o.if(l,a._`${d} = ${(0,a.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:a}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(a)&&a.forEach(((t,r)=>o(e,r,t.default)))}},40764:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const a=r(64168),s=r(85077),o=r(54782),n=r(85077),i=r(3862),c=r(62591),d=r(87218),l=r(17231),u=r(3948),f=r(33761),h=r(20679),m=r(82263);function p({gen:e,validateName:t,schema:r,schemaEnv:a,opts:s},o){s.code.es5?e.func(t,l._`${u.default.data}, ${u.default.valCxt}`,a.$async,(()=>{e.code(l._`"use strict"; ${y(r,s)}`),function(e,t){e.if(u.default.valCxt,(()=>{e.var(u.default.instancePath,l._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,l._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,l._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,l._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,l._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{e.var(u.default.instancePath,l._`""`),e.var(u.default.parentData,l._`undefined`),e.var(u.default.parentDataProperty,l._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,l._`{}`)}))}(e,s),e.code(o)})):e.func(t,l._`${u.default.data}, ${function(e){return l._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?l._`, ${u.default.dynamicAnchors}={}`:l.nil}}={}`}(s)}`,a.$async,(()=>e.code(y(r,s)).code(o)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function $({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function g(e){(0,h.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:a,self:s}=e;t.$ref&&a.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);const r=(0,s.getSchemaTypes)(e.schema);b(e,r,!(0,s.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:a,opts:s}){const o=r.$comment;if(!0===s.$comment)e.code(l._`${u.default.self}.logger.log(${o})`);else if("function"==typeof s.$comment){const r=l.str`${a}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(l._`${u.default.self}.opts.$comment(${o}, ${r}, ${s}.schema)`)}}function b(e,t,r,a){const{gen:s,schema:i,data:c,allErrors:d,opts:f,self:m}=e,{RULES:p}=m;function y(h){(0,o.shouldUseGroup)(i,h)&&(h.type?(s.if((0,n.checkDataType)(h.type,c,f.strictNumbers)),P(e,h),1===t.length&&t[0]===h.type&&r&&(s.else(),(0,n.reportTypeError)(e)),s.endIf()):P(e,h),d||s.if(l._`${u.default.errors} === ${a||0}`))}!i.$ref||!f.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(i,p)?(f.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{E(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const a of e.dataTypes)E(t,a)?r.push(a):t.includes("integer")&&"number"===a&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const a in r){const s=r[a];if("object"==typeof s&&(0,o.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>{return a=e,(r=t).includes(a)||"number"===a&&r.includes("integer");var r,a}))&&S(e,`missing type "${r.join(",")}" for keyword "${a}"`)}}}(e,e.dataTypes))}(e,t),s.block((()=>{for(const e of p.rules)y(e);y(p.post)}))):s.block((()=>j(e,"$ref",p.all.$ref.definition)))}function P(e,t){const{gen:r,schema:a,opts:{useDefaults:s}}=e;s&&(0,i.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(a,r)&&j(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,h.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(g(e),$(e))?function(e){const{schema:t,opts:r,gen:a}=e;p(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,h.checkStrictMode)(e,"default is ignored in the schema root")}(e),a.let(u.default.vErrors,null),a.let(u.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),_(e),function(e){const{gen:t,schemaEnv:r,validateName:a,ValidationError:s,opts:o}=e;r.$async?t.if(l._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(l._`new ${s}(${u.default.vErrors})`))):(t.assign(l._`${a}.errors`,u.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:a}){r instanceof l.Name&&e.assign(l._`${t}.props`,r),a instanceof l.Name&&e.assign(l._`${t}.items`,a)}(e),t.return(l._`${u.default.errors} === 0`))}(e)}))}(e):p(e,(()=>(0,a.topBoolOrEmptySchema)(e)))};class k{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:a,schemaType:s,def:o}=this;r.if((0,l.or)(l._`${a} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(s.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:a,it:s}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,n.checkDataTypes)(e,t,s.opts.strictNumbers,n.DataType.Wrong)}`}return l.nil}(),function(){if(a.validateSchema){const r=e.scopeValue("validate$data",{ref:a.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,d.getSubschema)(this.it,e);(0,d.extendSubschemaData)(r,this.it,e),(0,d.extendSubschemaMode)(r,e);const s={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(g(e),$(e))?function(e,t){const{schema:r,gen:a,opts:s}=e;s.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,f.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=a.const("_errs",u.default.errors);_(e,o),a.var(t,l._`${o} === ${u.default.errors}`)}(e,t):(0,a.boolOrEmptySchema)(e,t)}(s,t),s}mergeEvaluated(e,t){const{it:r,gen:a}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=h.mergeEvaluated.props(a,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=h.mergeEvaluated.items(a,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:a}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return a.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function j(e,t,r,a){const s=new k(e,r,t);"code"in r?r.code(s,a):s.$data&&r.validate?(0,c.funcKeywordCode)(s,r):"macro"in r?(0,c.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(s,r)}t.KeywordCxt=k;const N=/^\/(?:[^~]|~0|~1)*$/,O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:r,dataPathArr:a}){let s,o;if(""===e)return u.default.rootData;if("/"===e[0]){if(!N.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,o=u.default.rootData}else{const n=O.exec(e);if(!n)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+n[1];if(s=n[2],"#"===s){if(i>=t)throw new Error(c("property/index",i));return a[t-i]}if(i>t)throw new Error(c("data",i));if(o=r[t-i],!s)return o}let n=o;const i=s.split("/");for(const e of i)e&&(o=l._`${o}${(0,l.getProperty)((0,h.unescapeJsonPointer)(e))}`,n=l._`${n} && ${o}`);return n;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=T},62591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const a=r(17231),s=r(3948),o=r(36704),n=r(82263);function i(e){const{gen:t,data:r,it:s}=e;t.if(s.parentData,(()=>t.assign(r,a._`${s.parentData}[${s.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,a.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:s,schema:o,parentSchema:n,it:i}=e,d=t.macro.call(i.self,o,n,i),l=c(r,s,d);!1!==i.opts.validateSchema&&i.self.validateSchema(d,!0);const u=r.name("valid");e.subschema({schema:d,schemaPath:a.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:d,keyword:l,schema:u,parentSchema:f,$data:h,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const p=!h&&t.compile?t.compile.call(m.self,u,f,m):t.validate,y=c(d,l,p),$=d.let("valid");function v(r=(t.async?a._`await `:a.nil)){const n=m.opts.passContext?s.default.this:s.default.self,i=!("compile"in t&&!h||!1===t.schema);d.assign($,a._`${r}${(0,o.callValidateCode)(e,y,n,i)}`,t.modifying)}function g(e){var r;d.if((0,a.not)(null!==(r=t.valid)&&void 0!==r?r:$),e)}e.block$data($,(function(){if(!1===t.errors)v(),t.modifying&&i(e),g((()=>e.error()));else{const r=t.async?function(){const e=d.let("ruleErrs",null);return d.try((()=>v(a._`await `)),(t=>d.assign($,!1).if(a._`${t} instanceof ${m.ValidationError}`,(()=>d.assign(e,a._`${t}.errors`)),(()=>d.throw(t))))),e}():function(){const e=a._`${y}.errors`;return d.assign(e,null),v(a.nil),e}();t.modifying&&i(e),g((()=>function(e,t){const{gen:r}=e;r.if(a._`Array.isArray(${t})`,(()=>{r.assign(s.default.vErrors,a._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`).assign(s.default.errors,a._`${s.default.vErrors}.length`),(0,n.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:$)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:a},s,o){if(Array.isArray(s.keyword)?!s.keyword.includes(o):s.keyword!==o)throw new Error("ajv implementation error");const n=s.dependencies;if(null==n?void 0:n.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${n.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${a}": `+r.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},87218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const a=r(17231),s=r(20679);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:a._`${e.schemaPath}${(0,a.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:a._`${e.schemaPath}${(0,a.getProperty)(t)}${(0,a.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,s.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===n||void 0===i||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:c}){if(void 0!==n&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=t;if(void 0!==r){const{errorPath:n,dataPathArr:i,opts:c}=t;l(d.let("data",a._`${t.data}${(0,a.getProperty)(r)}`,!0)),e.errorPath=a.str`${n}${(0,s.getErrorPath)(r,o,c.jsPropertySyntax)}`,e.parentDataProperty=a._`${r}`,e.dataPathArr=[...i,e.parentDataProperty]}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==n&&(l(n instanceof a.Name?n:d.let("data",n,!0)),void 0!==c&&(e.propertyName=c)),i&&(e.dataTypes=i)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:a,createErrors:s,allErrors:o}){void 0!==a&&(e.compositeRule=a),void 0!==s&&(e.createErrors=s),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},98955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var a=r(40764);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return a.KeywordCxt}});var s=r(17231);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return s.CodeGen}});const o=r(17766),n=r(26317),i=r(24623),c=r(50052),d=r(17231),l=r(33761),u=r(85077),f=r(20679),h=r(94801),m=r(42658),p=(e,t)=>new RegExp(e,t);p.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,a,s,o,n,i,c,d,l,u,f,h,y,$,v,g,_,w,b,P,E,S,k,j;const N=e.strict,O=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===O||void 0===O?1:O||0,x=null!==(a=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==a?a:p,R=null!==(s=e.uriResolver)&&void 0!==s?s:m.default;return{strictSchema:null===(n=null!==(o=e.strictSchema)&&void 0!==o?o:N)||void 0===n||n,strictNumbers:null===(c=null!==(i=e.strictNumbers)&&void 0!==i?i:N)||void 0===c||c,strictTypes:null!==(l=null!==(d=e.strictTypes)&&void 0!==d?d:N)&&void 0!==l?l:"log",strictTuples:null!==(f=null!==(u=e.strictTuples)&&void 0!==u?u:N)&&void 0!==f?f:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:N)&&void 0!==y&&y,code:e.code?{...e.code,optimize:T,regExp:x}:{optimize:T,regExp:x},loopRequired:null!==($=e.loopRequired)&&void 0!==$?$:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(b=e.schemaId)&&void 0!==b?b:"$id",addUsedSchema:null===(P=e.addUsedSchema)||void 0===P||P,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(S=e.validateFormats)||void 0===S||S,unicodeRegExp:null===(k=e.unicodeRegExp)||void 0===k||k,int32range:null===(j=e.int32range)||void 0===j||j,uriResolver:R}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:$,es5:t,lines:r}),this.logger=function(e){if(!1===e)return N;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),b.call(this,v,e,"NOT SUPPORTED"),b.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=j.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let a=h;"id"===r&&(a={...h},a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const a=r(t);return"$async"in r||(this.errors=r.errors),a}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return a.call(this,e,t);async function a(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await a.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof n.default))throw t;return i.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function i({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await d.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function d(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,a=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,a);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,a,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const a=this.validate(r,e);if(!a&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return a}getSchema(e){let t;for(;"string"==typeof(t=P.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,a=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,a,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=P.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(T.call(this,r,t),!t)return(0,f.eachItem)(r,(e=>x.call(this,e))),this;C.call(this,t);const a={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(r,0===a.type.length?e=>x.call(this,e,a):e=>a.type.forEach((t=>x.call(this,e,a,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const a of t){const t=a.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:a}=t.definition,o=s[e];a&&o&&(s[e]=M(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const a=e[r];t&&!t.test(r)||("string"==typeof a?delete e[r]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[r]))}}_addSchema(e,t,r,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let o;const{schemaId:n}=this.opts;if("object"==typeof e)o=e[n];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(void 0!==i)return i;r=(0,l.normalizeId)(o||r);const d=l.getSchemaRefs.call(this,e,r);return i=new c.SchemaEnv({schema:e,schemaId:n,meta:t,baseId:r,localRefs:d}),this._cache.set(i.schema,i),s&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=i),a&&this.validateSchema(e,!0),i}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function b(e,t,r,a="error"){for(const s in e){const o=s;o in t&&this.logger[a](`${r}: option ${s}. ${e[o]}`)}}function P(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function S(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function j(){const e={...this.opts};for(const t of y)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=n.default;const N={log(){},warn(){},error(){}},O=/^[a-z_$][a-z0-9_$:-]*$/i;function T(e,t){const{RULES:r}=this;if((0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!O.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function x(e,t,r){var a;const s=null==t?void 0:t.post;if(r&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let n=s?o.post:o.rules.find((({type:e})=>e===r));if(n||(n={type:r,rules:[]},o.rules.push(n)),o.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?R.call(this,n,i,t.before):n.rules.push(i),o.all[e]=i,null===(a=t.implements)||void 0===a||a.forEach((e=>this.addKeyword(e)))}function R(e,t,r){const a=e.rules.findIndex((e=>e.keyword===r));a>=0?e.rules.splice(a,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function C(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=M(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function M(e){return{anyOf:[e,I]}}},59586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(66471);a.code='require("ajv/dist/runtime/equal").default',t.default=a},20680:(e,t)=>{"use strict";function r(e){const t=e.length;let r,a=0,s=0;for(;s<t;)a++,r=e.charCodeAt(s++),r>=55296&&r<=56319&&s<t&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},42658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(22371);a.code='require("ajv/dist/runtime/uri").default',t.default=a},17766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},28145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const a=r(17231),s=r(20679),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>a.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>a._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:a}=t;Array.isArray(a)?n(e,a):(0,s.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(e,t){const{gen:r,schema:o,data:n,keyword:i,it:c}=e;c.items=!0;const d=r.const("len",a._`${n}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(a._`${d} <= ${t.length}`);else if("object"==typeof o&&!(0,s.alwaysValidSchema)(c,o)){const o=r.var("valid",a._`${d} <= ${t.length}`);r.if((0,a.not)(o),(()=>function(o){r.forRange("i",t.length,d,(t=>{e.subschema({keyword:i,dataProp:t,dataPropType:s.Type.Num},o),c.allErrors||r.if((0,a.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=n,t.default=o},2888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(36704),s=r(17231),o=r(3948),n=r(20679),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>s._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:c,errsCount:d,it:l}=e;if(!d)throw new Error("ajv implementation error");const{allErrors:u,opts:f}=l;if(l.props=!0,"all"!==f.removeAdditional&&(0,n.alwaysValidSchema)(l,r))return;const h=(0,a.allSchemaProperties)(i.properties),m=(0,a.allSchemaProperties)(i.patternProperties);function p(e){t.code(s._`delete ${c}[${e}]`)}function y(a){if("all"===f.removeAdditional||f.removeAdditional&&!1===r)p(a);else{if(!1===r)return e.setParams({additionalProperty:a}),e.error(),void(u||t.break());if("object"==typeof r&&!(0,n.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===f.removeAdditional?($(a,r,!1),t.if((0,s.not)(r),(()=>{e.reset(),p(a)}))):($(a,r),u||t.if((0,s.not)(r),(()=>t.break())))}}}function $(t,r,a){const s={keyword:"additionalProperties",dataProp:t,dataPropType:n.Type.Str};!1===a&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,r)}t.forIn("key",c,(r=>{h.length||m.length?t.if(function(r){let o;if(h.length>8){const e=(0,n.schemaRefOrVal)(l,i.properties,"properties");o=(0,a.isOwnProperty)(t,e,r)}else o=h.length?(0,s.or)(...h.map((e=>s._`${r} === ${e}`))):s.nil;return m.length&&(o=(0,s.or)(o,...m.map((t=>s._`${(0,a.usePattern)(e,t)}.test(${r})`)))),(0,s.not)(o)}(r),(()=>y(r))):y(r)})),e.ok(s._`${d} === ${o.default.errors}`)}};t.default=i},48402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(20679),s={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,a.alwaysValidSchema)(s,t))return;const n=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(n)}))}};t.default=s},82709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(36704).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=a},54175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?a.str`must contain at least ${e} valid item(s)`:a.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?a._`{minContains: ${e}}`:a._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;let c,d;const{minContains:l,maxContains:u}=o;i.opts.next?(c=void 0===l?1:l,d=u):c=1;const f=t.const("len",a._`${n}.length`);if(e.setParams({min:c,max:d}),void 0===d&&0===c)return void(0,s.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==d&&c>d)return(0,s.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,s.alwaysValidSchema)(i,r)){let t=a._`${f} >= ${c}`;return void 0!==d&&(t=a._`${t} && ${f} <= ${d}`),void e.pass(t)}i.items=!0;const h=t.name("valid");function m(){const e=t.name("_valid"),r=t.let("count",0);p(e,(()=>t.if(e,(()=>function(e){t.code(a._`${e}++`),void 0===d?t.if(a._`${e} >= ${c}`,(()=>t.assign(h,!0).break())):(t.if(a._`${e} > ${d}`,(()=>t.assign(h,!1).break())),1===c?t.assign(h,!0):t.if(a._`${e} >= ${c}`,(()=>t.assign(h,!0))))}(r)))))}function p(r,a){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:s.Type.Num,compositeRule:!0},r),a()}))}void 0===d&&1===c?p(h,(()=>t.if(h,(()=>t.break())))):0===c?(t.let(h,!0),void 0!==d&&t.if(a._`${n}.length > 0`,m)):(t.let(h,!1),m()),e.result(h,(()=>e.reset()))}};t.default=o},87747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const a=r(17231),s=r(20679),o=r(36704);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const s=1===t?"property":"properties";return a.str`must have ${s} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>a._`{property: ${e},
5
5
  missingProperty: ${s},
6
6
  depsCount: ${t},
7
- deps: ${r}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const a in e)"__proto__"!==a&&((Array.isArray(e[a])?t:r)[a]=e[a]);return[t,r]}(e);i(e,t),c(e,r)}};function i(e,t=e.schema){const{gen:r,data:s,it:n}=e;if(0===Object.keys(t).length)return;const i=r.let("missing");for(const c in t){const d=t[c];if(0===d.length)continue;const l=(0,o.propertyInData)(r,s,c,n.opts.ownProperties);e.setParams({property:c,depsCount:d.length,deps:d.join(", ")}),n.allErrors?r.if(l,(()=>{for(const t of d)(0,o.checkReportMissingProp)(e,t)})):(r.if(a._`${l} && (${(0,o.checkMissingProp)(e,d,i)})`),(0,o.reportMissingProp)(e,i),r.else())}}function c(e,t=e.schema){const{gen:r,data:a,keyword:n,it:i}=e,c=r.name("valid");for(const d in t)(0,s.alwaysValidSchema)(i,t[d])||(r.if((0,o.propertyInData)(r,a,d,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:n,schemaProp:d},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=i,t.validateSchemaDeps=c,t.default=n},76441:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>a.str`must match "${e.ifClause}" schema`,params:({params:e})=>a._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,s.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const i=n(o,"then"),c=n(o,"else");if(!i&&!c)return;const d=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),i&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,u("then",r),u("else",r))}else i?t.if(l,u("then")):t.if((0,a.not)(l),u("else"));function u(r,s){return()=>{const o=e.subschema({keyword:r},l);t.assign(d,l),e.mergeValidEvaluated(o,d),s?t.assign(s,a._`${r}`):e.setParams({ifClause:r})}}e.pass(d,(()=>e.error(!0)))}};function n(e,t){const r=e.schema[t];return void 0!==r&&!(0,s.alwaysValidSchema)(e,r)}t.default=o},75448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(28145),s=r(97903),o=r(96499),n=r(53493),i=r(54175),c=r(87747),d=r(28548),l=r(2888),u=r(5245),f=r(76797),h=r(19136),m=r(82709),p=r(18730),y=r(48402),$=r(76441),v=r(95671);t.default=function(e=!1){const t=[h.default,m.default,p.default,y.default,$.default,v.default,d.default,l.default,c.default,u.default,f.default];return e?t.push(s.default,n.default):t.push(a.default,o.default),t.push(i.default),t}},96499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const a=r(17231),s=r(20679),o=r(36704),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return i(e,"additionalItems",t);r.items=!0,(0,s.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function i(e,t,r=e.schema){const{gen:o,parentSchema:n,data:i,keyword:c,it:d}=e;!function(e){const{opts:a,errSchemaPath:o}=d,n=r.length,i=n===e.minItems&&(n===e.maxItems||!1===e[t]);if(a.strictTuples&&!i){const e=`"${c}" is ${n}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,s.checkStrictMode)(d,e,a.strictTuples)}}(n),d.opts.unevaluated&&r.length&&!0!==d.items&&(d.items=s.mergeEvaluated.items(o,r.length,d.items));const l=o.name("valid"),u=o.const("len",a._`${i}.length`);r.forEach(((t,r)=>{(0,s.alwaysValidSchema)(d,t)||(o.if(a._`${u} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=i,t.default=n},53493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(36704),n=r(28145),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>a.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>a._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:a}=e,{prefixItems:i}=r;a.items=!0,(0,s.alwaysValidSchema)(a,t)||(i?(0,n.validateAdditionalItems)(e,i):e.ok((0,o.validateArray)(e)))}};t.default=i},19136:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(20679),s={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:s}=e;if((0,a.alwaysValidSchema)(s,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=s},18730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>a._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;const i=r,c=t.let("valid",!1),d=t.let("passing",null),l=t.name("_valid");e.setParams({passing:d}),t.block((function(){i.forEach(((r,o)=>{let i;(0,s.alwaysValidSchema)(n,r)?t.var(l,!0):i=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(a._`${l} && ${c}`).assign(c,!1).assign(d,a._`[${d}, ${o}]`).else(),t.if(l,(()=>{t.assign(c,!0),t.assign(d,o),i&&e.mergeEvaluated(i,a.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},76797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(36704),s=r(17231),o=r(20679),n=r(20679),i={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:c,it:d}=e,{opts:l}=d,u=(0,a.allSchemaProperties)(r),f=u.filter((e=>(0,o.alwaysValidSchema)(d,r[e])));if(0===u.length||f.length===u.length&&(!d.opts.unevaluated||!0===d.props))return;const h=l.strictSchema&&!l.allowMatchingProperties&&c.properties,m=t.name("valid");!0===d.props||d.props instanceof s.Name||(d.props=(0,n.evaluatedPropsToName)(t,d.props));const{props:p}=d;function y(e){for(const t in h)new RegExp(e).test(t)&&(0,o.checkStrictMode)(d,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function $(r){t.forIn("key",i,(o=>{t.if(s._`${(0,a.usePattern)(e,r)}.test(${o})`,(()=>{const a=f.includes(r);a||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:n.Type.Str},m),d.opts.unevaluated&&!0!==p?t.assign(s._`${p}[${o}]`,!0):a||d.allErrors||t.if((0,s.not)(m),(()=>t.break()))}))}))}!function(){for(const e of u)h&&y(e),d.allErrors?$(e):(t.var(m,!0),$(e),t.if(m))}()}};t.default=i},97903:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(96499),s={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,a.validateTuple)(e,"items")};t.default=s},5245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(40764),s=r(36704),o=r(20679),n=r(2888),i={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:c,it:d}=e;"all"===d.opts.removeAdditional&&void 0===i.additionalProperties&&n.default.code(new a.KeywordCxt(d,n.default,"additionalProperties"));const l=(0,s.allSchemaProperties)(r);for(const e of l)d.definedProperties.add(e);d.opts.unevaluated&&l.length&&!0!==d.props&&(d.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),d.props));const u=l.filter((e=>!(0,o.alwaysValidSchema)(d,r[e])));if(0===u.length)return;const f=t.name("valid");for(const r of u)h(r)?m(r):(t.if((0,s.propertyInData)(t,c,r,d.opts.ownProperties)),m(r),d.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function h(e){return d.opts.useDefaults&&!d.compositeRule&&void 0!==r[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=i},28548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>a._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:n}=e;if((0,s.alwaysValidSchema)(n,r))return;const i=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},i),t.if((0,a.not)(i),(()=>{e.error(!0),n.allErrors||t.break()}))})),e.ok(i)}};t.default=o},95671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(20679),s={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,a.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=s},36704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const a=r(17231),s=r(20679),o=r(3948),n=r(20679);function i(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:a._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return a._`${i(e)}.call(${t}, ${r})`}function d(e,t,r,s){const o=a._`${t}${(0,a.getProperty)(r)} === undefined`;return s?(0,a.or)(o,(0,a.not)(c(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:s,it:o}=e;r.if(d(r,s,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:a._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},s,o){return(0,a.or)(...s.map((s=>(0,a.and)(d(e,t,s,r.ownProperties),a._`${o} = ${s}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=i,t.isOwnProperty=c,t.propertyInData=function(e,t,r,s){const o=a._`${t}${(0,a.getProperty)(r)} !== undefined`;return s?a._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=d,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,s.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:i},it:c},d,l,u){const f=u?a._`${e}, ${t}, ${s}${n}`:t,h=[[o.default.instancePath,(0,a.strConcat)(o.default.instancePath,i)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&h.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const m=a._`${f}, ${r.object(...h)}`;return l!==a.nil?a._`${d}.call(${l}, ${m})`:a._`${d}(${m})`};const u=a._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const s=t.unicodeRegExp?"u":"",{regExp:o}=t.code,i=o(r,s);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:a._`${"new RegExp"===o.code?u:(0,n.useFunc)(e,o)}(${r}, ${s})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(i,!0),c((()=>t.break())),i;function c(n){const c=t.const("len",a._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:s.Type.Num},i),t.if((0,a.not)(i),n)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,s.alwaysValidSchema)(n,e)))&&!n.opts.unevaluated)return;const i=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const n=e.subschema({keyword:o,schemaProp:s,compositeRule:!0},c);t.assign(i,a._`${i} || ${c}`),e.mergeValidEvaluated(n,c)||t.if((0,a.not)(i))})))),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}},40960:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},18243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(40960),s=r(15534),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",a.default,s.default];t.default=o},15534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const a=r(26317),s=r(36704),o=r(17231),n=r(3948),i=r(50052),c=r(20679),d={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:s}=e,{baseId:n,schemaEnv:c,validateName:d,opts:f,self:h}=s,{root:m}=c;if(("#"===r||"#/"===r)&&n===m.baseId)return function(){if(c===m)return u(e,d,c,c.$async);const r=t.scopeValue("root",{ref:m});return u(e,o._`${r}.validate`,m,m.$async)}();const p=i.resolveRef.call(h,m,n,r);if(void 0===p)throw new a.default(s.opts.uriResolver,n,r);return p instanceof i.SchemaEnv?function(t){const r=l(e,t);u(e,r,t,t.$async)}(p):function(a){const s=t.scopeValue("schema",!0===f.code.source?{ref:a,code:(0,o.stringify)(a)}:{ref:a}),n=t.name("valid"),i=e.subschema({schema:a,dataTypes:[],schemaPath:o.nil,topSchemaRef:s,errSchemaPath:r},n);e.mergeEvaluated(i),e.ok(n)}(p)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function u(e,t,r,a){const{gen:i,it:d}=e,{allErrors:l,schemaEnv:u,opts:f}=d,h=f.passContext?n.default.this:o.nil;function m(e){const t=o._`${e}.errors`;i.assign(n.default.vErrors,o._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),i.assign(n.default.errors,o._`${n.default.vErrors}.length`)}function p(e){var t;if(!d.opts.unevaluated)return;const a=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==d.props)if(a&&!a.dynamicProps)void 0!==a.props&&(d.props=c.mergeEvaluated.props(i,a.props,d.props));else{const t=i.var("props",o._`${e}.evaluated.props`);d.props=c.mergeEvaluated.props(i,t,d.props,o.Name)}if(!0!==d.items)if(a&&!a.dynamicItems)void 0!==a.items&&(d.items=c.mergeEvaluated.items(i,a.items,d.items));else{const t=i.var("items",o._`${e}.evaluated.items`);d.items=c.mergeEvaluated.items(i,t,d.items,o.Name)}}a?function(){if(!u.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code(o._`await ${(0,s.callValidateCode)(e,t,h)}`),p(t),l||i.assign(r,!0)}),(e=>{i.if(o._`!(${e} instanceof ${d.ValidationError})`,(()=>i.throw(e))),m(e),l||i.assign(r,!1)})),e.ok(r)}():e.result((0,s.callValidateCode)(e,t,h),(()=>p(t)),(()=>m(t)))}t.getValidate=l,t.callRef=u,t.default=d},30648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(2185),o=r(50052),n=r(20679),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===s.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>a._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:i,parentSchema:c,it:d}=e,{oneOf:l}=c;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=i.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),h=t.const("tag",a._`${r}${(0,a.getProperty)(u)}`);function m(r){const s=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},s);return e.mergeEvaluated(o,a.Name),s}t.if(a._`typeof ${h} == "string"`,(()=>function(){const r=function(){var e;const t={},r=s(c);let a=!0;for(let t=0;t<l.length;t++){let c=l[t];(null==c?void 0:c.$ref)&&!(0,n.schemaHasRulesButRef)(c,d.self.RULES)&&(c=o.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,null==c?void 0:c.$ref),c instanceof o.SchemaEnv&&(c=c.schema));const f=null===(e=null==c?void 0:c.properties)||void 0===e?void 0:e[u];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);a=a&&(r||s(c)),i(f,t)}if(!a)throw new Error(`discriminator: "${u}" must be required`);return t;function s({required:e}){return Array.isArray(e)&&e.includes(u)}function i(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${u}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(a._`${h} === ${e}`),t.assign(f,m(r[e]));t.else(),e.error(!1,{discrError:s.DiscrError.Mapping,tag:h,tagName:u}),t.endIf()}()),(()=>e.error(!1,{discrError:s.DiscrError.Tag,tag:h,tagName:u}))),e.ok(f)}};t.default=i},2185:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},87213:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(18243),s=r(19591),o=r(75448),n=r(4505),i=r(51935),c=[a.default,s.default,(0,o.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];t.default=c},78803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>a.str`must match format "${e}"`,params:({schemaCode:e})=>a._`{format: ${e}}`},code(e,t){const{gen:r,data:s,$data:o,schema:n,schemaCode:i,it:c}=e,{opts:d,errSchemaPath:l,schemaEnv:u,self:f}=c;d.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:f.formats,code:d.code.formats}),n=r.const("fDef",a._`${o}[${i}]`),c=r.let("fType"),l=r.let("format");r.if(a._`typeof ${n} == "object" && !(${n} instanceof RegExp)`,(()=>r.assign(c,a._`${n}.type || "string"`).assign(l,a._`${n}.validate`)),(()=>r.assign(c,a._`"string"`).assign(l,n))),e.fail$data((0,a.or)(!1===d.strictSchema?a.nil:a._`${i} && !${l}`,function(){const e=u.$async?a._`(${n}.async ? await ${l}(${s}) : ${l}(${s}))`:a._`${l}(${s})`,r=a._`(typeof ${l} == "function" ? ${e} : ${l}.test(${s}))`;return a._`${l} && ${l} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=f.formats[n];if(!o)return void function(){if(!1!==d.strictSchema)throw new Error(e());function e(){return`unknown format "${n}" ignored in schema at path "${l}"`}f.logger.warn(e())}();if(!0===o)return;const[i,c,h]=function(e){const t=e instanceof RegExp?(0,a.regexpCode)(e):d.code.formats?a._`${d.code.formats}${(0,a.getProperty)(n)}`:void 0,s=r.scopeValue("formats",{key:n,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,s]:[e.type||"string",e.validate,a._`${s}.validate`]}(o);i===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!u.$async)throw new Error("async format in sync schema");return a._`await ${h}(${s})`}return"function"==typeof c?a._`${h}(${s})`:a._`${h}.test(${s})`}())}())}};t.default=s},4505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=[r(78803).default];t.default=a},51935:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},15603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(59586),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>a._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:c}=e;n||c&&"object"==typeof c?e.fail$data(a._`!${(0,s.useFunc)(t,o.default)}(${r}, ${i})`):e.fail(a._`${c} !== ${r}`)}};t.default=n},4649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(59586),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>a._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:c,it:d}=e;if(!n&&0===i.length)throw new Error("enum must have non-empty array");const l=i.length>=d.opts.loopEnum;let u;const f=()=>null!=u?u:u=(0,s.useFunc)(t,o.default);let h;if(l||n)h=t.let("valid"),e.block$data(h,(function(){t.assign(h,!1),t.forOf("v",c,(e=>t.if(a._`${f()}(${r}, ${e})`,(()=>t.assign(h,!0).break()))))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",c);h=(0,a.or)(...i.map(((t,s)=>function(e,t){const s=i[t];return"object"==typeof s&&null!==s?a._`${f()}(${r}, ${e}[${t}])`:a._`${r} === ${s}`}(e,s))))}e.pass(h)}};t.default=n},19591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(22734),s=r(98334),o=r(65030),n=r(74287),i=r(73485),c=r(53758),d=r(39633),l=r(49150),u=r(15603),f=r(4649),h=[a.default,s.default,o.default,n.default,i.default,c.default,d.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,f.default];t.default=h},39633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return a.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>a._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,o="maxItems"===t?a.operators.GT:a.operators.LT;e.fail$data(a._`${r}.length ${o} ${s}`)}};t.default=s},65030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(20680),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return a.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>a._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,c="maxLength"===t?a.operators.GT:a.operators.LT,d=!1===i.opts.unicode?a._`${r}.length`:a._`${(0,s.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(a._`${d} ${c} ${n}`)}};t.default=n},22734:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=a.operators,o={maximum:{okStr:"<=",ok:s.LTE,fail:s.GT},minimum:{okStr:">=",ok:s.GTE,fail:s.LT},exclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},exclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},n={message:({keyword:e,schemaCode:t})=>a.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>a._`{comparison: ${o[e].okStr}, limit: ${t}}`},i={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:n,code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(a._`${r} ${o[t].fail} ${s} || isNaN(${r})`)}};t.default=i},73485:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return a.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>a._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,o="maxProperties"===t?a.operators.GT:a.operators.LT;e.fail$data(a._`Object.keys(${r}).length ${o} ${s}`)}};t.default=s},98334:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>a.str`must be multiple of ${e}`,params:({schemaCode:e})=>a._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:s,it:o}=e,n=o.opts.multipleOfPrecision,i=t.let("res"),c=n?a._`Math.abs(Math.round(${i}) - ${i}) > 1e-${n}`:a._`${i} !== parseInt(${i})`;e.fail$data(a._`(${s} === 0 || (${i} = ${r}/${s}, ${c}))`)}};t.default=s},74287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(36704),s=r(17231),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match pattern "${e}"`,params:({schemaCode:e})=>s._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:n,it:i}=e,c=i.opts.unicodeRegExp?"u":"",d=r?s._`(new RegExp(${n}, ${c}))`:(0,a.usePattern)(e,o);e.fail$data(s._`!${d}.test(${t})`)}};t.default=o},53758:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(36704),s=r(17231),o=r(20679),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>s.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>s._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:c,it:d}=e,{opts:l}=d;if(!c&&0===r.length)return;const u=r.length>=l.loopRequired;if(d.allErrors?function(){if(u||c)e.block$data(s.nil,f);else for(const t of r)(0,a.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(u||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(o,(0,a.propertyInData)(t,i,r,l.ownProperties)),t.if((0,s.not)(o),(()=>{e.error(),t.break()}))}),s.nil)}(o,r))),e.ok(r)}else t.if((0,a.checkMissingProp)(e,r,o)),(0,a.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:a}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!a.has(e)){const t=`required property "${e}" is not defined at "${d.schemaEnv.baseId+d.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(d,t,d.opts.strictRequired)}}function f(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,a.noPropertyInData)(t,i,r,l.ownProperties),(()=>e.error()))}))}}};t.default=n},49150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(85077),s=r(17231),o=r(20679),n=r(59586),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>s.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>s._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:i,schema:c,parentSchema:d,schemaCode:l,it:u}=e;if(!i&&!c)return;const f=t.let("valid"),h=d.items?(0,a.getSchemaTypes)(d.items):[];function m(o,n){const i=t.name("item"),c=(0,a.checkDataTypes)(h,i,u.opts.strictNumbers,a.DataType.Wrong),d=t.const("indices",s._`{}`);t.for(s._`;${o}--;`,(()=>{t.let(i,s._`${r}[${o}]`),t.if(c,s._`continue`),h.length>1&&t.if(s._`typeof ${i} == "string"`,s._`${i} += "_"`),t.if(s._`typeof ${d}[${i}] == "number"`,(()=>{t.assign(n,s._`${d}[${i}]`),e.error(),t.assign(f,!1).break()})).code(s._`${d}[${i}] = ${o}`)}))}function p(a,i){const c=(0,o.useFunc)(t,n.default),d=t.name("outer");t.label(d).for(s._`;${a}--;`,(()=>t.for(s._`${i} = ${a}; ${i}--;`,(()=>t.if(s._`${c}(${r}[${a}], ${r}[${i}])`,(()=>{e.error(),t.assign(f,!1).break(d)}))))))}e.block$data(f,(function(){const a=t.let("i",s._`${r}.length`),o=t.let("j");e.setParams({i:a,j:o}),t.assign(f,!0),t.if(s._`${a} > 1`,(()=>(h.length>0&&!h.some((e=>"object"===e||"array"===e))?m:p)(a,o)))}),s._`${l} === false`),e.ok(f)}};t.default=i},52485:(e,t,r)=>{var a=r(74554),s=r(38639),o=r(88379);function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new a;++t<r;)this.add(e[t])}n.prototype.add=n.prototype.push=s,n.prototype.has=o,e.exports=n},90756:e=>{e.exports=function(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}},32866:(e,t,r)=>{var a=r(12772),s=r(92360);e.exports=function e(t,r,o,n,i){return t===r||(null==t||null==r||!s(t)&&!s(r)?t!=t&&r!=r:a(t,r,o,n,e,i))}},12772:(e,t,r)=>{var a=r(23694),s=r(27042),o=r(370),n=r(41514),i=r(3533),c=r(19785),d=r(43854),l=r(48519),u="[object Arguments]",f="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,p,y,$){var v=c(e),g=c(t),_=v?f:i(e),w=g?f:i(t),b=(_=_==u?h:_)==h,P=(w=w==u?h:w)==h,E=_==w;if(E&&d(e)){if(!d(t))return!1;v=!0,b=!1}if(E&&!b)return $||($=new a),v||l(e)?s(e,t,r,p,y,$):o(e,t,_,r,p,y,$);if(!(1&r)){var S=b&&m.call(e,"__wrapped__"),k=P&&m.call(t,"__wrapped__");if(S||k){var j=S?e.value():e,N=k?t.value():t;return $||($=new a),y(j,N,r,p,$)}}return!!E&&($||($=new a),n(e,t,r,p,y,$))}},65581:e=>{e.exports=function(e,t){return e.has(t)}},27042:(e,t,r)=>{var a=r(52485),s=r(90756),o=r(65581);e.exports=function(e,t,r,n,i,c){var d=1&r,l=e.length,u=t.length;if(l!=u&&!(d&&u>l))return!1;var f=c.get(e),h=c.get(t);if(f&&h)return f==t&&h==e;var m=-1,p=!0,y=2&r?new a:void 0;for(c.set(e,t),c.set(t,e);++m<l;){var $=e[m],v=t[m];if(n)var g=d?n(v,$,m,t,e,c):n($,v,m,e,t,c);if(void 0!==g){if(g)continue;p=!1;break}if(y){if(!s(t,(function(e,t){if(!o(y,t)&&($===e||i($,e,r,n,c)))return y.push(t)}))){p=!1;break}}else if($!==v&&!i($,v,r,n,c)){p=!1;break}}return c.delete(e),c.delete(t),p}},370:(e,t,r)=>{var a=r(96539),s=r(59942),o=r(85638),n=r(27042),i=r(19383),c=r(43735),d=a?a.prototype:void 0,l=d?d.valueOf:void 0;e.exports=function(e,t,r,a,d,u,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!u(new s(e),new s(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=i;case"[object Set]":var m=1&a;if(h||(h=c),e.size!=t.size&&!m)return!1;var p=f.get(e);if(p)return p==t;a|=2,f.set(e,t);var y=n(h(e),h(t),a,d,u,f);return f.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},41514:(e,t,r)=>{var a=r(51385),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,n,i){var c=1&r,d=a(e),l=d.length;if(l!=a(t).length&&!c)return!1;for(var u=l;u--;){var f=d[u];if(!(c?f in t:s.call(t,f)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var p=!0;i.set(e,t),i.set(t,e);for(var y=c;++u<l;){var $=e[f=d[u]],v=t[f];if(o)var g=c?o(v,$,f,t,e,i):o($,v,f,e,t,i);if(!(void 0===g?$===v||n($,v,r,o,i):g)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return i.delete(e),i.delete(t),p}},19383:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,a){r[++t]=[a,e]})),r}},38639:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},88379:e=>{e.exports=function(e){return this.__data__.has(e)}},43735:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},56141:(e,t,r)=>{var a=r(32866);e.exports=function(e,t){return a(e,t)}},94801:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},60172:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}}]);
7
+ deps: ${r}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const a in e)"__proto__"!==a&&((Array.isArray(e[a])?t:r)[a]=e[a]);return[t,r]}(e);i(e,t),c(e,r)}};function i(e,t=e.schema){const{gen:r,data:s,it:n}=e;if(0===Object.keys(t).length)return;const i=r.let("missing");for(const c in t){const d=t[c];if(0===d.length)continue;const l=(0,o.propertyInData)(r,s,c,n.opts.ownProperties);e.setParams({property:c,depsCount:d.length,deps:d.join(", ")}),n.allErrors?r.if(l,(()=>{for(const t of d)(0,o.checkReportMissingProp)(e,t)})):(r.if(a._`${l} && (${(0,o.checkMissingProp)(e,d,i)})`),(0,o.reportMissingProp)(e,i),r.else())}}function c(e,t=e.schema){const{gen:r,data:a,keyword:n,it:i}=e,c=r.name("valid");for(const d in t)(0,s.alwaysValidSchema)(i,t[d])||(r.if((0,o.propertyInData)(r,a,d,i.opts.ownProperties),(()=>{const t=e.subschema({keyword:n,schemaProp:d},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=i,t.validateSchemaDeps=c,t.default=n},76441:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>a.str`must match "${e.ifClause}" schema`,params:({params:e})=>a._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,s.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const i=n(o,"then"),c=n(o,"else");if(!i&&!c)return;const d=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),i&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,u("then",r),u("else",r))}else i?t.if(l,u("then")):t.if((0,a.not)(l),u("else"));function u(r,s){return()=>{const o=e.subschema({keyword:r},l);t.assign(d,l),e.mergeValidEvaluated(o,d),s?t.assign(s,a._`${r}`):e.setParams({ifClause:r})}}e.pass(d,(()=>e.error(!0)))}};function n(e,t){const r=e.schema[t];return void 0!==r&&!(0,s.alwaysValidSchema)(e,r)}t.default=o},75448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(28145),s=r(97903),o=r(96499),n=r(53493),i=r(54175),c=r(87747),d=r(28548),l=r(2888),u=r(5245),f=r(76797),h=r(19136),m=r(82709),p=r(18730),y=r(48402),$=r(76441),v=r(95671);t.default=function(e=!1){const t=[h.default,m.default,p.default,y.default,$.default,v.default,d.default,l.default,c.default,u.default,f.default];return e?t.push(s.default,n.default):t.push(a.default,o.default),t.push(i.default),t}},96499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const a=r(17231),s=r(20679),o=r(36704),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return i(e,"additionalItems",t);r.items=!0,(0,s.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function i(e,t,r=e.schema){const{gen:o,parentSchema:n,data:i,keyword:c,it:d}=e;!function(e){const{opts:a,errSchemaPath:o}=d,n=r.length,i=n===e.minItems&&(n===e.maxItems||!1===e[t]);if(a.strictTuples&&!i){const e=`"${c}" is ${n}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,s.checkStrictMode)(d,e,a.strictTuples)}}(n),d.opts.unevaluated&&r.length&&!0!==d.items&&(d.items=s.mergeEvaluated.items(o,r.length,d.items));const l=o.name("valid"),u=o.const("len",a._`${i}.length`);r.forEach(((t,r)=>{(0,s.alwaysValidSchema)(d,t)||(o.if(a._`${u} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=i,t.default=n},53493:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(36704),n=r(28145),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>a.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>a._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:a}=e,{prefixItems:i}=r;a.items=!0,(0,s.alwaysValidSchema)(a,t)||(i?(0,n.validateAdditionalItems)(e,i):e.ok((0,o.validateArray)(e)))}};t.default=i},19136:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(20679),s={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:s}=e;if((0,a.alwaysValidSchema)(s,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=s},18730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>a._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;const i=r,c=t.let("valid",!1),d=t.let("passing",null),l=t.name("_valid");e.setParams({passing:d}),t.block((function(){i.forEach(((r,o)=>{let i;(0,s.alwaysValidSchema)(n,r)?t.var(l,!0):i=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(a._`${l} && ${c}`).assign(c,!1).assign(d,a._`[${d}, ${o}]`).else(),t.if(l,(()=>{t.assign(c,!0),t.assign(d,o),i&&e.mergeEvaluated(i,a.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},76797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(36704),s=r(17231),o=r(20679),n=r(20679),i={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:c,it:d}=e,{opts:l}=d,u=(0,a.allSchemaProperties)(r),f=u.filter((e=>(0,o.alwaysValidSchema)(d,r[e])));if(0===u.length||f.length===u.length&&(!d.opts.unevaluated||!0===d.props))return;const h=l.strictSchema&&!l.allowMatchingProperties&&c.properties,m=t.name("valid");!0===d.props||d.props instanceof s.Name||(d.props=(0,n.evaluatedPropsToName)(t,d.props));const{props:p}=d;function y(e){for(const t in h)new RegExp(e).test(t)&&(0,o.checkStrictMode)(d,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function $(r){t.forIn("key",i,(o=>{t.if(s._`${(0,a.usePattern)(e,r)}.test(${o})`,(()=>{const a=f.includes(r);a||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:n.Type.Str},m),d.opts.unevaluated&&!0!==p?t.assign(s._`${p}[${o}]`,!0):a||d.allErrors||t.if((0,s.not)(m),(()=>t.break()))}))}))}!function(){for(const e of u)h&&y(e),d.allErrors?$(e):(t.var(m,!0),$(e),t.if(m))}()}};t.default=i},97903:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(96499),s={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,a.validateTuple)(e,"items")};t.default=s},5245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(40764),s=r(36704),o=r(20679),n=r(2888),i={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:c,it:d}=e;"all"===d.opts.removeAdditional&&void 0===i.additionalProperties&&n.default.code(new a.KeywordCxt(d,n.default,"additionalProperties"));const l=(0,s.allSchemaProperties)(r);for(const e of l)d.definedProperties.add(e);d.opts.unevaluated&&l.length&&!0!==d.props&&(d.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),d.props));const u=l.filter((e=>!(0,o.alwaysValidSchema)(d,r[e])));if(0===u.length)return;const f=t.name("valid");for(const r of u)h(r)?m(r):(t.if((0,s.propertyInData)(t,c,r,d.opts.ownProperties)),m(r),d.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function h(e){return d.opts.useDefaults&&!d.compositeRule&&void 0!==r[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=i},28548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>a._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:n}=e;if((0,s.alwaysValidSchema)(n,r))return;const i=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},i),t.if((0,a.not)(i),(()=>{e.error(!0),n.allErrors||t.break()}))})),e.ok(i)}};t.default=o},95671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(20679),s={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,a.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=s},36704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const a=r(17231),s=r(20679),o=r(3948),n=r(20679);function i(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:a._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return a._`${i(e)}.call(${t}, ${r})`}function d(e,t,r,s){const o=a._`${t}${(0,a.getProperty)(r)} === undefined`;return s?(0,a.or)(o,(0,a.not)(c(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:s,it:o}=e;r.if(d(r,s,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:a._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},s,o){return(0,a.or)(...s.map((s=>(0,a.and)(d(e,t,s,r.ownProperties),a._`${o} = ${s}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=i,t.isOwnProperty=c,t.propertyInData=function(e,t,r,s){const o=a._`${t}${(0,a.getProperty)(r)} !== undefined`;return s?a._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=d,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,s.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:i},it:c},d,l,u){const f=u?a._`${e}, ${t}, ${s}${n}`:t,h=[[o.default.instancePath,(0,a.strConcat)(o.default.instancePath,i)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&h.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const m=a._`${f}, ${r.object(...h)}`;return l!==a.nil?a._`${d}.call(${l}, ${m})`:a._`${d}(${m})`};const u=a._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const s=t.unicodeRegExp?"u":"",{regExp:o}=t.code,i=o(r,s);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:a._`${"new RegExp"===o.code?u:(0,n.useFunc)(e,o)}(${r}, ${s})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(i,!0),c((()=>t.break())),i;function c(n){const c=t.const("len",a._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:s.Type.Num},i),t.if((0,a.not)(i),n)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,s.alwaysValidSchema)(n,e)))&&!n.opts.unevaluated)return;const i=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const n=e.subschema({keyword:o,schemaProp:s,compositeRule:!0},c);t.assign(i,a._`${i} || ${c}`),e.mergeValidEvaluated(n,c)||t.if((0,a.not)(i))})))),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}},40960:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},18243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(40960),s=r(15534),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",a.default,s.default];t.default=o},15534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const a=r(26317),s=r(36704),o=r(17231),n=r(3948),i=r(50052),c=r(20679),d={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:s}=e,{baseId:n,schemaEnv:c,validateName:d,opts:f,self:h}=s,{root:m}=c;if(("#"===r||"#/"===r)&&n===m.baseId)return function(){if(c===m)return u(e,d,c,c.$async);const r=t.scopeValue("root",{ref:m});return u(e,o._`${r}.validate`,m,m.$async)}();const p=i.resolveRef.call(h,m,n,r);if(void 0===p)throw new a.default(s.opts.uriResolver,n,r);return p instanceof i.SchemaEnv?function(t){const r=l(e,t);u(e,r,t,t.$async)}(p):function(a){const s=t.scopeValue("schema",!0===f.code.source?{ref:a,code:(0,o.stringify)(a)}:{ref:a}),n=t.name("valid"),i=e.subschema({schema:a,dataTypes:[],schemaPath:o.nil,topSchemaRef:s,errSchemaPath:r},n);e.mergeEvaluated(i),e.ok(n)}(p)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function u(e,t,r,a){const{gen:i,it:d}=e,{allErrors:l,schemaEnv:u,opts:f}=d,h=f.passContext?n.default.this:o.nil;function m(e){const t=o._`${e}.errors`;i.assign(n.default.vErrors,o._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),i.assign(n.default.errors,o._`${n.default.vErrors}.length`)}function p(e){var t;if(!d.opts.unevaluated)return;const a=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==d.props)if(a&&!a.dynamicProps)void 0!==a.props&&(d.props=c.mergeEvaluated.props(i,a.props,d.props));else{const t=i.var("props",o._`${e}.evaluated.props`);d.props=c.mergeEvaluated.props(i,t,d.props,o.Name)}if(!0!==d.items)if(a&&!a.dynamicItems)void 0!==a.items&&(d.items=c.mergeEvaluated.items(i,a.items,d.items));else{const t=i.var("items",o._`${e}.evaluated.items`);d.items=c.mergeEvaluated.items(i,t,d.items,o.Name)}}a?function(){if(!u.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code(o._`await ${(0,s.callValidateCode)(e,t,h)}`),p(t),l||i.assign(r,!0)}),(e=>{i.if(o._`!(${e} instanceof ${d.ValidationError})`,(()=>i.throw(e))),m(e),l||i.assign(r,!1)})),e.ok(r)}():e.result((0,s.callValidateCode)(e,t,h),(()=>p(t)),(()=>m(t)))}t.getValidate=l,t.callRef=u,t.default=d},30648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(2185),o=r(50052),n=r(20679),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===s.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>a._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:i,parentSchema:c,it:d}=e,{oneOf:l}=c;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=i.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),h=t.const("tag",a._`${r}${(0,a.getProperty)(u)}`);function m(r){const s=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},s);return e.mergeEvaluated(o,a.Name),s}t.if(a._`typeof ${h} == "string"`,(()=>function(){const r=function(){var e;const t={},r=s(c);let a=!0;for(let t=0;t<l.length;t++){let c=l[t];(null==c?void 0:c.$ref)&&!(0,n.schemaHasRulesButRef)(c,d.self.RULES)&&(c=o.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,null==c?void 0:c.$ref),c instanceof o.SchemaEnv&&(c=c.schema));const f=null===(e=null==c?void 0:c.properties)||void 0===e?void 0:e[u];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);a=a&&(r||s(c)),i(f,t)}if(!a)throw new Error(`discriminator: "${u}" must be required`);return t;function s({required:e}){return Array.isArray(e)&&e.includes(u)}function i(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${u}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(a._`${h} === ${e}`),t.assign(f,m(r[e]));t.else(),e.error(!1,{discrError:s.DiscrError.Mapping,tag:h,tagName:u}),t.endIf()}()),(()=>e.error(!1,{discrError:s.DiscrError.Tag,tag:h,tagName:u}))),e.ok(f)}};t.default=i},2185:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},87213:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(18243),s=r(19591),o=r(75448),n=r(4505),i=r(51935),c=[a.default,s.default,(0,o.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];t.default=c},78803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>a.str`must match format "${e}"`,params:({schemaCode:e})=>a._`{format: ${e}}`},code(e,t){const{gen:r,data:s,$data:o,schema:n,schemaCode:i,it:c}=e,{opts:d,errSchemaPath:l,schemaEnv:u,self:f}=c;d.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:f.formats,code:d.code.formats}),n=r.const("fDef",a._`${o}[${i}]`),c=r.let("fType"),l=r.let("format");r.if(a._`typeof ${n} == "object" && !(${n} instanceof RegExp)`,(()=>r.assign(c,a._`${n}.type || "string"`).assign(l,a._`${n}.validate`)),(()=>r.assign(c,a._`"string"`).assign(l,n))),e.fail$data((0,a.or)(!1===d.strictSchema?a.nil:a._`${i} && !${l}`,function(){const e=u.$async?a._`(${n}.async ? await ${l}(${s}) : ${l}(${s}))`:a._`${l}(${s})`,r=a._`(typeof ${l} == "function" ? ${e} : ${l}.test(${s}))`;return a._`${l} && ${l} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=f.formats[n];if(!o)return void function(){if(!1!==d.strictSchema)throw new Error(e());function e(){return`unknown format "${n}" ignored in schema at path "${l}"`}f.logger.warn(e())}();if(!0===o)return;const[i,c,h]=function(e){const t=e instanceof RegExp?(0,a.regexpCode)(e):d.code.formats?a._`${d.code.formats}${(0,a.getProperty)(n)}`:void 0,s=r.scopeValue("formats",{key:n,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,s]:[e.type||"string",e.validate,a._`${s}.validate`]}(o);i===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!u.$async)throw new Error("async format in sync schema");return a._`await ${h}(${s})`}return"function"==typeof c?a._`${h}(${s})`:a._`${h}.test(${s})`}())}())}};t.default=s},4505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=[r(78803).default];t.default=a},51935:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},15603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(59586),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>a._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:c}=e;n||c&&"object"==typeof c?e.fail$data(a._`!${(0,s.useFunc)(t,o.default)}(${r}, ${i})`):e.fail(a._`${c} !== ${r}`)}};t.default=n},4649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(59586),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>a._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:c,it:d}=e;if(!n&&0===i.length)throw new Error("enum must have non-empty array");const l=i.length>=d.opts.loopEnum;let u;const f=()=>null!=u?u:u=(0,s.useFunc)(t,o.default);let h;if(l||n)h=t.let("valid"),e.block$data(h,(function(){t.assign(h,!1),t.forOf("v",c,(e=>t.if(a._`${f()}(${r}, ${e})`,(()=>t.assign(h,!0).break()))))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",c);h=(0,a.or)(...i.map(((t,s)=>function(e,t){const s=i[t];return"object"==typeof s&&null!==s?a._`${f()}(${r}, ${e}[${t}])`:a._`${r} === ${s}`}(e,s))))}e.pass(h)}};t.default=n},19591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(22734),s=r(98334),o=r(65030),n=r(74287),i=r(73485),c=r(53758),d=r(39633),l=r(49150),u=r(15603),f=r(4649),h=[a.default,s.default,o.default,n.default,i.default,c.default,d.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,f.default];t.default=h},39633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return a.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>a._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,o="maxItems"===t?a.operators.GT:a.operators.LT;e.fail$data(a._`${r}.length ${o} ${s}`)}};t.default=s},65030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=r(20679),o=r(20680),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return a.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>a._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,c="maxLength"===t?a.operators.GT:a.operators.LT,d=!1===i.opts.unicode?a._`${r}.length`:a._`${(0,s.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(a._`${d} ${c} ${n}`)}};t.default=n},22734:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s=a.operators,o={maximum:{okStr:"<=",ok:s.LTE,fail:s.GT},minimum:{okStr:">=",ok:s.GTE,fail:s.LT},exclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},exclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},n={message:({keyword:e,schemaCode:t})=>a.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>a._`{comparison: ${o[e].okStr}, limit: ${t}}`},i={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:n,code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(a._`${r} ${o[t].fail} ${s} || isNaN(${r})`)}};t.default=i},73485:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return a.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>a._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,o="maxProperties"===t?a.operators.GT:a.operators.LT;e.fail$data(a._`Object.keys(${r}).length ${o} ${s}`)}};t.default=s},98334:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(17231),s={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>a.str`must be multiple of ${e}`,params:({schemaCode:e})=>a._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:s,it:o}=e,n=o.opts.multipleOfPrecision,i=t.let("res"),c=n?a._`Math.abs(Math.round(${i}) - ${i}) > 1e-${n}`:a._`${i} !== parseInt(${i})`;e.fail$data(a._`(${s} === 0 || (${i} = ${r}/${s}, ${c}))`)}};t.default=s},74287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(36704),s=r(17231),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match pattern "${e}"`,params:({schemaCode:e})=>s._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:n,it:i}=e,c=i.opts.unicodeRegExp?"u":"",d=r?s._`(new RegExp(${n}, ${c}))`:(0,a.usePattern)(e,o);e.fail$data(s._`!${d}.test(${t})`)}};t.default=o},53758:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(36704),s=r(17231),o=r(20679),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>s.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>s._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:c,it:d}=e,{opts:l}=d;if(!c&&0===r.length)return;const u=r.length>=l.loopRequired;if(d.allErrors?function(){if(u||c)e.block$data(s.nil,f);else for(const t of r)(0,a.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(u||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(o,(0,a.propertyInData)(t,i,r,l.ownProperties)),t.if((0,s.not)(o),(()=>{e.error(),t.break()}))}),s.nil)}(o,r))),e.ok(r)}else t.if((0,a.checkMissingProp)(e,r,o)),(0,a.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:a}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!a.has(e)){const t=`required property "${e}" is not defined at "${d.schemaEnv.baseId+d.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(d,t,d.opts.strictRequired)}}function f(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,a.noPropertyInData)(t,i,r,l.ownProperties),(()=>e.error()))}))}}};t.default=n},49150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(85077),s=r(17231),o=r(20679),n=r(59586),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>s.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>s._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:i,schema:c,parentSchema:d,schemaCode:l,it:u}=e;if(!i&&!c)return;const f=t.let("valid"),h=d.items?(0,a.getSchemaTypes)(d.items):[];function m(o,n){const i=t.name("item"),c=(0,a.checkDataTypes)(h,i,u.opts.strictNumbers,a.DataType.Wrong),d=t.const("indices",s._`{}`);t.for(s._`;${o}--;`,(()=>{t.let(i,s._`${r}[${o}]`),t.if(c,s._`continue`),h.length>1&&t.if(s._`typeof ${i} == "string"`,s._`${i} += "_"`),t.if(s._`typeof ${d}[${i}] == "number"`,(()=>{t.assign(n,s._`${d}[${i}]`),e.error(),t.assign(f,!1).break()})).code(s._`${d}[${i}] = ${o}`)}))}function p(a,i){const c=(0,o.useFunc)(t,n.default),d=t.name("outer");t.label(d).for(s._`;${a}--;`,(()=>t.for(s._`${i} = ${a}; ${i}--;`,(()=>t.if(s._`${c}(${r}[${a}], ${r}[${i}])`,(()=>{e.error(),t.assign(f,!1).break(d)}))))))}e.block$data(f,(function(){const a=t.let("i",s._`${r}.length`),o=t.let("j");e.setParams({i:a,j:o}),t.assign(f,!0),t.if(s._`${a} > 1`,(()=>(h.length>0&&!h.some((e=>"object"===e||"array"===e))?m:p)(a,o)))}),s._`${l} === false`),e.ok(f)}};t.default=i},52485:(e,t,r)=>{var a=r(74554),s=r(38639),o=r(88379);function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new a;++t<r;)this.add(e[t])}n.prototype.add=n.prototype.push=s,n.prototype.has=o,e.exports=n},90756:e=>{e.exports=function(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}},32866:(e,t,r)=>{var a=r(12772),s=r(92360);e.exports=function e(t,r,o,n,i){return t===r||(null==t||null==r||!s(t)&&!s(r)?t!=t&&r!=r:a(t,r,o,n,e,i))}},12772:(e,t,r)=>{var a=r(23694),s=r(27042),o=r(370),n=r(39584),i=r(3533),c=r(19785),d=r(43854),l=r(48519),u="[object Arguments]",f="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,p,y,$){var v=c(e),g=c(t),_=v?f:i(e),w=g?f:i(t),b=(_=_==u?h:_)==h,P=(w=w==u?h:w)==h,E=_==w;if(E&&d(e)){if(!d(t))return!1;v=!0,b=!1}if(E&&!b)return $||($=new a),v||l(e)?s(e,t,r,p,y,$):o(e,t,_,r,p,y,$);if(!(1&r)){var S=b&&m.call(e,"__wrapped__"),k=P&&m.call(t,"__wrapped__");if(S||k){var j=S?e.value():e,N=k?t.value():t;return $||($=new a),y(j,N,r,p,$)}}return!!E&&($||($=new a),n(e,t,r,p,y,$))}},65581:e=>{e.exports=function(e,t){return e.has(t)}},27042:(e,t,r)=>{var a=r(52485),s=r(90756),o=r(65581);e.exports=function(e,t,r,n,i,c){var d=1&r,l=e.length,u=t.length;if(l!=u&&!(d&&u>l))return!1;var f=c.get(e),h=c.get(t);if(f&&h)return f==t&&h==e;var m=-1,p=!0,y=2&r?new a:void 0;for(c.set(e,t),c.set(t,e);++m<l;){var $=e[m],v=t[m];if(n)var g=d?n(v,$,m,t,e,c):n($,v,m,e,t,c);if(void 0!==g){if(g)continue;p=!1;break}if(y){if(!s(t,(function(e,t){if(!o(y,t)&&($===e||i($,e,r,n,c)))return y.push(t)}))){p=!1;break}}else if($!==v&&!i($,v,r,n,c)){p=!1;break}}return c.delete(e),c.delete(t),p}},370:(e,t,r)=>{var a=r(96539),s=r(59942),o=r(85638),n=r(27042),i=r(19383),c=r(43735),d=a?a.prototype:void 0,l=d?d.valueOf:void 0;e.exports=function(e,t,r,a,d,u,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!u(new s(e),new s(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=i;case"[object Set]":var m=1&a;if(h||(h=c),e.size!=t.size&&!m)return!1;var p=f.get(e);if(p)return p==t;a|=2,f.set(e,t);var y=n(h(e),h(t),a,d,u,f);return f.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},39584:(e,t,r)=>{var a=r(51385),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,n,i){var c=1&r,d=a(e),l=d.length;if(l!=a(t).length&&!c)return!1;for(var u=l;u--;){var f=d[u];if(!(c?f in t:s.call(t,f)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var p=!0;i.set(e,t),i.set(t,e);for(var y=c;++u<l;){var $=e[f=d[u]],v=t[f];if(o)var g=c?o(v,$,f,t,e,i):o($,v,f,e,t,i);if(!(void 0===g?$===v||n($,v,r,o,i):g)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return i.delete(e),i.delete(t),p}},19383:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,a){r[++t]=[a,e]})),r}},38639:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},88379:e=>{e.exports=function(e){return this.__data__.has(e)}},43735:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},56141:(e,t,r)=>{var a=r(32866);e.exports=function(e,t){return a(e,t)}},94801:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},60172:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[134,4042],{44042:(t,e,s)=>{s.r(e),s.d(e,{AttachmentsModel:()=>r,AttachmentsResolver:()=>h});var a=s(83978),n=s(62514),i=s(81997);class r{constructor(t){var e;if(this._map=new a.ObservableMap,this._isDisposed=!1,this._stateChanged=new i.Signal(this),this._changed=new i.Signal(this),this._serialized=null,this._changeGuard=!1,this.contentFactory=null!==(e=t.contentFactory)&&void 0!==e?e:r.defaultContentFactory,t.values)for(const e of Object.keys(t.values))void 0!==t.values[e]&&this.set(e,t.values[e]);this._map.changed.connect(this._onMapChanged,this)}get stateChanged(){return this._stateChanged}get changed(){return this._changed}get keys(){return this._map.keys()}get length(){return this._map.keys().length}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._map.dispose(),i.Signal.clearData(this))}has(t){return this._map.has(t)}get(t){return this._map.get(t)}set(t,e){const s=this._createItem({value:e});this._map.set(t,s)}remove(t){this._map.delete(t)}clear(){this._map.values().forEach((t=>{t.dispose()})),this._map.clear()}fromJSON(t){this.clear(),Object.keys(t).forEach((e=>{void 0!==t[e]&&this.set(e,t[e])}))}toJSON(){const t={};for(const e of this._map.keys())t[e]=this._map.get(e).toJSON();return t}_createItem(t){const e=this.contentFactory.createAttachmentModel(t);return e.changed.connect(this._onGenericChange,this),e}_onMapChanged(t,e){this._serialized&&!this._changeGuard&&(this._changeGuard=!0,this._serialized.set(this.toJSON()),this._changeGuard=!1),this._changed.emit(e),this._stateChanged.emit(void 0)}_onGenericChange(){this._stateChanged.emit(void 0)}}!function(t){class e{createAttachmentModel(t){return new n.AttachmentModel(t)}}t.ContentFactory=e,t.defaultContentFactory=new e}(r||(r={}));class h{constructor(t){this._parent=t.parent||null,this._model=t.model}async resolveUrl(t){return this._parent&&!t.startsWith("attachment:")?this._parent.resolveUrl(t):t}async getDownloadUrl(t){if(this._parent&&!t.startsWith("attachment:"))return this._parent.getDownloadUrl(t);const e=t.slice(11),s=this._model.get(e);if(void 0===s)return t;const{data:a}=s,i=Object.keys(a)[0];if(void 0===i||-1===n.imageRendererFactory.mimeTypes.indexOf(i))throw new Error(`Cannot render unknown image mime type "${i}".`);return`data:${i};base64,${a[i]}`}isLocal(t){var e,s,a;return!(this._parent&&!t.startsWith("attachment:"))||null===(a=null===(s=(e=this._parent).isLocal)||void 0===s?void 0:s.call(e,t))||void 0===a||a}}}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[134,4042],{44042:(t,e,s)=>{s.r(e),s.d(e,{AttachmentsModel:()=>r,AttachmentsResolver:()=>h});var a=s(71370),n=s(58194),i=s(2159);class r{constructor(t){var e;if(this._map=new a.ObservableMap,this._isDisposed=!1,this._stateChanged=new i.Signal(this),this._changed=new i.Signal(this),this._serialized=null,this._changeGuard=!1,this.contentFactory=null!==(e=t.contentFactory)&&void 0!==e?e:r.defaultContentFactory,t.values)for(const e of Object.keys(t.values))void 0!==t.values[e]&&this.set(e,t.values[e]);this._map.changed.connect(this._onMapChanged,this)}get stateChanged(){return this._stateChanged}get changed(){return this._changed}get keys(){return this._map.keys()}get length(){return this._map.keys().length}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._map.dispose(),i.Signal.clearData(this))}has(t){return this._map.has(t)}get(t){return this._map.get(t)}set(t,e){const s=this._createItem({value:e});this._map.set(t,s)}remove(t){this._map.delete(t)}clear(){this._map.values().forEach((t=>{t.dispose()})),this._map.clear()}fromJSON(t){this.clear(),Object.keys(t).forEach((e=>{void 0!==t[e]&&this.set(e,t[e])}))}toJSON(){const t={};for(const e of this._map.keys())t[e]=this._map.get(e).toJSON();return t}_createItem(t){const e=this.contentFactory.createAttachmentModel(t);return e.changed.connect(this._onGenericChange,this),e}_onMapChanged(t,e){this._serialized&&!this._changeGuard&&(this._changeGuard=!0,this._serialized.set(this.toJSON()),this._changeGuard=!1),this._changed.emit(e),this._stateChanged.emit(void 0)}_onGenericChange(){this._stateChanged.emit(void 0)}}!function(t){class e{createAttachmentModel(t){return new n.AttachmentModel(t)}}t.ContentFactory=e,t.defaultContentFactory=new e}(r||(r={}));class h{constructor(t){this._parent=t.parent||null,this._model=t.model}async resolveUrl(t){return this._parent&&!t.startsWith("attachment:")?this._parent.resolveUrl(t):t}async getDownloadUrl(t){if(this._parent&&!t.startsWith("attachment:"))return this._parent.getDownloadUrl(t);const e=t.slice(11),s=this._model.get(e);if(void 0===s)return t;const{data:a}=s,i=Object.keys(a)[0];if(void 0===i||-1===n.imageRendererFactory.mimeTypes.indexOf(i))throw new Error(`Cannot render unknown image mime type "${i}".`);return`data:${i};base64,${a[i]}`}isLocal(t){var e,s,a;return!(this._parent&&!t.startsWith("attachment:"))||null===(a=null===(s=(e=this._parent).isLocal)||void 0===s?void 0:s.call(e,t))||void 0===a||a}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1408],{11408:(e,t,a)=>{a.r(t),a.d(t,{MathJaxTypesetter:()=>o,default:()=>r});var n,i=a(20998),s=a(62514);!function(e){e.copy="mathjax:clipboard",e.scale="mathjax:scale"}(n||(n={}));class o{constructor(){this._initialized=!1}async _ensureInitialized(){this._initialized||(this._mathDocument=await c.ensureMathDocument(),this._initialized=!0)}async mathDocument(){return await this._ensureInitialized(),this._mathDocument}async typeset(e){try{await this._ensureInitialized()}catch(e){return void console.error(e)}this._mathDocument.options.elements=[e],this._mathDocument.clear().render(),delete this._mathDocument.options.elements}}const r={id:"@jupyterlab/mathjax-extension:plugin",description:"Provides the LaTeX mathematical expression interpreter.",provides:s.ILatexTypesetter,activate:e=>{const t=new o;return e.commands.addCommand(n.copy,{execute:async()=>{const e=(await t.mathDocument()).outputJax;await navigator.clipboard.writeText(e.math.math)},label:"MathJax Copy Latex"}),e.commands.addCommand(n.scale,{execute:async e=>{const a=await t.mathDocument(),n=e.scale||1;a.outputJax.options.scale=n,a.rerender()},label:e=>"Mathjax Scale "+(e.scale?`x${e.scale}`:"Reset")}),t},autoStart:!0};var c;!function(e){let t=null;e.ensureMathDocument=async function(){if(!t){t=new i.PromiseDelegate,Promise.all([a.e(7969),a.e(5115),a.e(792)]).then(a.t.bind(a,20792,23));const[{mathjax:e},{CHTML:n},{TeX:s},{TeXFont:o},{AllPackages:r},{SafeHandler:c},{HTMLHandler:l},{browserAdaptor:m},{AssistiveMmlHandler:h}]=await Promise.all([a.e(4971).then(a.bind(a,44971)),Promise.all([a.e(7969),a.e(28),a.e(2065),a.e(7369)]).then(a.t.bind(a,57369,23)),Promise.all([a.e(7969),a.e(5115),a.e(7154),a.e(7582)]).then(a.t.bind(a,27582,23)),Promise.all([a.e(2065),a.e(4498)]).then(a.t.bind(a,42065,23)),Promise.all([a.e(7969),a.e(5115),a.e(7154),a.e(8845)]).then(a.bind(a,78845)),a.e(8285).then(a.t.bind(a,78285,23)),Promise.all([a.e(7969),a.e(28),a.e(2666),a.e(7471)]).then(a.t.bind(a,97471,23)),a.e(270).then(a.bind(a,90270)),Promise.all([a.e(7969),a.e(28),a.e(2666),a.e(4105)]).then(a.t.bind(a,74105,23))]);e.handlers.register(h(c(new l(m()))));class d extends o{}d.defaultFonts={};const u=new n({font:new d}),p=new s({packages:r.concat("require"),inlineMath:[["$","$"],["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0}),x=e.document(window.document,{InputJax:p,OutputJax:u});t.resolve(x)}return t.promise}}(c||(c={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1408],{11408:(e,t,a)=>{a.r(t),a.d(t,{MathJaxTypesetter:()=>o,default:()=>r});var n,i=a(21961),s=a(58194);!function(e){e.copy="mathjax:clipboard",e.scale="mathjax:scale"}(n||(n={}));class o{constructor(){this._initialized=!1}async _ensureInitialized(){this._initialized||(this._mathDocument=await c.ensureMathDocument(),this._initialized=!0)}async mathDocument(){return await this._ensureInitialized(),this._mathDocument}async typeset(e){try{await this._ensureInitialized()}catch(e){return void console.error(e)}this._mathDocument.options.elements=[e],this._mathDocument.clear().render(),delete this._mathDocument.options.elements}}const r={id:"@jupyterlab/mathjax-extension:plugin",description:"Provides the LaTeX mathematical expression interpreter.",provides:s.ILatexTypesetter,activate:e=>{const t=new o;return e.commands.addCommand(n.copy,{execute:async()=>{const e=(await t.mathDocument()).outputJax;await navigator.clipboard.writeText(e.math.math)},label:"MathJax Copy Latex"}),e.commands.addCommand(n.scale,{execute:async e=>{const a=await t.mathDocument(),n=e.scale||1;a.outputJax.options.scale=n,a.rerender()},label:e=>"Mathjax Scale "+(e.scale?`x${e.scale}`:"Reset")}),t},autoStart:!0};var c;!function(e){let t=null;e.ensureMathDocument=async function(){if(!t){t=new i.PromiseDelegate,Promise.all([a.e(7969),a.e(5115),a.e(792)]).then(a.t.bind(a,20792,23));const[{mathjax:e},{CHTML:n},{TeX:s},{TeXFont:o},{AllPackages:r},{SafeHandler:c},{HTMLHandler:l},{browserAdaptor:m},{AssistiveMmlHandler:h}]=await Promise.all([a.e(4971).then(a.bind(a,44971)),Promise.all([a.e(7969),a.e(28),a.e(2065),a.e(7369)]).then(a.t.bind(a,57369,23)),Promise.all([a.e(7969),a.e(5115),a.e(7154),a.e(7582)]).then(a.t.bind(a,27582,23)),Promise.all([a.e(2065),a.e(4498)]).then(a.t.bind(a,42065,23)),Promise.all([a.e(7969),a.e(5115),a.e(7154),a.e(8845)]).then(a.bind(a,78845)),a.e(8285).then(a.t.bind(a,78285,23)),Promise.all([a.e(7969),a.e(28),a.e(2666),a.e(7471)]).then(a.t.bind(a,97471,23)),a.e(270).then(a.bind(a,90270)),Promise.all([a.e(7969),a.e(28),a.e(2666),a.e(4105)]).then(a.t.bind(a,74105,23))]);e.handlers.register(h(c(new l(m()))));class d extends o{}d.defaultFonts={};const u=new n({font:new d}),p=new s({packages:r.concat("require"),inlineMath:[["$","$"],["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0}),x=e.document(window.document,{InputJax:p,OutputJax:u});t.resolve(x)}return t.promise}}(c||(c={}))}}]);