apiuikit 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +1 -0
  2. package/dist/CodeSamples-CXtSA6EK.js +4298 -0
  3. package/dist/CodeSamples-D7dq1xEM.cjs +50 -0
  4. package/dist/apiuikit.cjs.js +1 -1
  5. package/dist/apiuikit.css +1 -1
  6. package/dist/apiuikit.es.js +31 -22
  7. package/dist/components/ErrorBoundary.d.ts +26 -0
  8. package/dist/config/config.d.ts +48 -0
  9. package/dist/containers/AsyncAPI/AsyncAPI.d.ts +6 -0
  10. package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +7 -1
  11. package/dist/containers/OpenAPI/OpenAPI.d.ts +6 -0
  12. package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +7 -1
  13. package/dist/contexts/useSpec.d.ts +3 -0
  14. package/dist/helpers/codeSamples.d.ts +6 -2
  15. package/dist/helpers/jsonPointer.d.ts +5 -0
  16. package/dist/helpers/llmsTxt.d.ts +51 -0
  17. package/dist/helpers/specAdapters.d.ts +32 -0
  18. package/dist/helpers/toMarkdown.d.ts +5 -6
  19. package/dist/hooks/useDocumentProviderValue.d.ts +3 -1
  20. package/dist/index-BJ0X8yP3.cjs +133 -0
  21. package/dist/{index-CFqT-0u9.js → index-BMRPdMaB.js} +1 -1
  22. package/dist/{index-QHokKPe8.cjs → index-BoAORjov.cjs} +1 -1
  23. package/dist/{index-CkQBQKmb.cjs → index-CZjVUeK4.cjs} +1 -1
  24. package/dist/index-DCDYBZcY.js +1461 -0
  25. package/dist/index-DwzxTmOd.js +13614 -0
  26. package/dist/index-d8kJa7YD.cjs +4 -0
  27. package/dist/{index-xz-kuNHf.js → index-ib-tk7y5.js} +1 -1
  28. package/dist/index.d.ts +6 -1
  29. package/dist/markdown-assets/protoToJsonSchema-CBPWaboT.js +6193 -0
  30. package/dist/markdown-assets/protoToJsonSchema-CgkcluFJ.js +83 -0
  31. package/dist/markdown.cjs +91 -0
  32. package/dist/markdown.d.ts +8 -0
  33. package/dist/markdown.es.js +2101 -0
  34. package/dist/{protoToJsonSchema-dSLrBGlF.js → protoToJsonSchema-Btyc_WLL.js} +112 -108
  35. package/dist/{protoToJsonSchema-ScIUJOSl.cjs → protoToJsonSchema-wxazjeYy.cjs} +10 -10
  36. package/dist/{protobufSchemaParser-DE3p5F51.js → protobufSchemaParser-9KjS7p8W.js} +2 -2
  37. package/dist/{protobufSchemaParser-Bd0cGKWk.cjs → protobufSchemaParser-G1NujZ28.cjs} +1 -1
  38. package/dist/shims/utilInspect.d.ts +2 -0
  39. package/package.json +9 -4
  40. package/dist/components/Navigation/tests/spineTicks.test.d.ts +0 -1
  41. package/dist/components/schema/tests/SchemaTab.test.d.ts +0 -1
  42. package/dist/components/schema/tests/schemaUtils.test.d.ts +0 -1
  43. package/dist/components/tests/Authorization.test.d.ts +0 -1
  44. package/dist/components/tests/Bindings.test.d.ts +0 -1
  45. package/dist/components/tests/ChannelAddress.test.d.ts +0 -1
  46. package/dist/components/tests/CodeBlock.test.d.ts +0 -1
  47. package/dist/components/tests/CodeSamples.test.d.ts +0 -1
  48. package/dist/components/tests/CopyMarkdownButton.test.d.ts +0 -1
  49. package/dist/components/tests/MarkdownExportMenu.test.d.ts +0 -1
  50. package/dist/components/tests/RenderExtensions.test.d.ts +0 -1
  51. package/dist/containers/AsyncAPI/tests/AsyncAPI.test.d.ts +0 -1
  52. package/dist/containers/AsyncAPI/tests/AsyncAPIRenderer.test.d.ts +0 -1
  53. package/dist/containers/AsyncAPI/tests/searchHighlight.test.d.ts +0 -1
  54. package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +0 -1
  55. package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +0 -1
  56. package/dist/containers/Path/tests/PathOperation.test.d.ts +0 -1
  57. package/dist/containers/Path/tests/Paths.test.d.ts +0 -1
  58. package/dist/helpers/avro/tests/avroToJsonSchema.test.d.ts +0 -1
  59. package/dist/helpers/protobuf/tests/protoToJsonSchema.test.d.ts +0 -1
  60. package/dist/helpers/protobuf/tests/protobufSchemaParser.test.d.ts +0 -1
  61. package/dist/helpers/tests/codeSamples.test.d.ts +0 -1
  62. package/dist/helpers/tests/exampleSchema.test.d.ts +0 -1
  63. package/dist/helpers/tests/openapiSearchIndex.test.d.ts +0 -1
  64. package/dist/helpers/tests/resolveDocument.test.d.ts +0 -1
  65. package/dist/helpers/tests/schemaFormat.test.d.ts +0 -1
  66. package/dist/helpers/tests/toMarkdown.test.d.ts +0 -1
  67. package/dist/index-C9Pyi0cN.cjs +0 -177
  68. package/dist/index-DSOufiFF.js +0 -18957
  69. package/dist/public/tests/sections.test.d.ts +0 -1
  70. package/dist/stories/AsyncAPI.stories.d.ts +0 -14
  71. package/dist/stories/AsyncAPIRenderer.stories.d.ts +0 -17
  72. package/dist/stories/Authorization.stories.d.ts +0 -13
  73. package/dist/stories/Bindings.stories.d.ts +0 -12
  74. package/dist/stories/ChannelAddress.stories.d.ts +0 -13
  75. package/dist/stories/CodeBlock.stories.d.ts +0 -11
  76. package/dist/stories/Examples.stories.d.ts +0 -11
  77. package/dist/stories/Information.stories.d.ts +0 -9
  78. package/dist/stories/Message.stories.d.ts +0 -11
  79. package/dist/stories/Messages.stories.d.ts +0 -11
  80. package/dist/stories/Operation.stories.d.ts +0 -10
  81. package/dist/stories/Operations.stories.d.ts +0 -16
  82. package/dist/stories/SchemaTab.stories.d.ts +0 -12
  83. package/dist/stories/SchemaTree.stories.d.ts +0 -24
  84. package/dist/stories/SearchPanel.stories.d.ts +0 -16
  85. package/dist/stories/Server.stories.d.ts +0 -12
  86. package/dist/stories/TabToggle.stories.d.ts +0 -10
  87. package/dist/stories/Tabs.stories.d.ts +0 -11
  88. package/dist/stories/documentContextDecorator.d.ts +0 -25
  89. package/dist/stories/noCanvasDocsPage.d.ts +0 -9
  90. package/dist/utils/tests/hasRef.test.d.ts +0 -1
  91. package/dist/utils/tests/theme.test.d.ts +0 -1
  92. package/dist/utils/tests/useElementRect.test.d.ts +0 -1
@@ -0,0 +1,91 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=["get","put","post","delete","options","head","patch","trace"],At=(t,n)=>`${t} ${n}`;function it(t){return Object.keys(t).sort().flatMap(n=>{const r=t[n];return r?ut.filter(i=>r[i]).map(i=>({key:At(i,n),method:i,path:n})):[]})}const Z=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),V=t=>Z(t)?t:null,Ze="^[\0-ÿ]*$",bt=Math.pow(-2,31),Rt=Math.pow(2,31)-1,$t=Math.pow(-2,63),St=Math.pow(2,63)-1,Ot={null:"null",boolean:"boolean",int:"integer",long:"integer",float:"number",double:"number",bytes:"string",string:"string",fixed:"string",map:"object",array:"array",enum:"string",record:"object",uuid:"string"},Ne=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)?t:{};function ye(t){const n=Ne(t);if(typeof n.name=="string")return typeof n.namespace=="string"?`${n.namespace}.${n.name}`:n.name}function je(t,n,r){t.doc&&(n.description=t.doc),t.default!==void 0&&(n.default=t.default);const i=ye(t);i!==void 0&&r[i]&&(n["x-parser-schema-id"]=i)}function Je(t,n,r){!(Array.isArray(t.type)&&t.type.includes("null"))&&!r&&(n.required=n.required||[],n.required.push(t.name))}function kt(t,n){let r=t,i=n;if(Array.isArray(t)&&t.length>0){const u=t.length>1&&t[0]==="null";r=t[+u],i.oneOf!==void 0&&(i=i.oneOf[0])}return{type:r,jsonSchema:i}}function jt(t,n,r){if(!(n===void 0||r.examples||Array.isArray(t)))switch(t){case"boolean":r.examples=[typeof n=="boolean"?n:n==="true"];break;case"int":r.examples=[parseInt(n,10)];break;default:r.examples=[n]}}function Ce(t){return Object.keys(t).some(n=>n!=="type"&&n!=="name"&&n!=="namespace")}function Me(t,n,r){const{type:i,jsonSchema:u}=kt(t,r);jt(i,n.example,u);function a(...l){l.forEach(m=>{let y=!0;m==="minLength"||m==="maxLength"?y=n[m]>-1:m==="multipleOf"&&(y=n[m]>0),n[m]!==void 0&&y&&(u[m]=n[m])})}switch(i){case"int":case"long":case"float":case"double":a("minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf");break;case"string":n.logicalType&&(u.format=n.logicalType),a("pattern","minLength","maxLength");break;case"array":a("minItems","maxItems","uniqueItems");break}}function Le(t,n,r){n!==void 0&&(t[n]=r)}function he(t,n){let r={};if(Array.isArray(t))return Mt(r,t,n);const i=Ne(t),u=typeof t=="string"?t:i.type;switch(r.type=Ot[u],u){case"int":{r.minimum=bt,r.maximum=Rt;break}case"long":{r.minimum=$t,r.maximum=St;break}case"bytes":{r.pattern=Ze;break}case"fixed":{r.pattern=Ze,r.minLength=i.size,r.maxLength=i.size;break}case"map":{r.additionalProperties=he(i.values,n);break}case"array":{r.items=he(i.items,n);break}case"enum":{r.enum=i.symbols;break}case"float":case"double":{r.format=u;break}case"record":{const a=Ct(i,n,r);Le(n,ye(t),r),r.properties=Object.fromEntries(a.entries());break}default:{const a=n[ye(t)]??(typeof u=="string"?n[u]:void 0);a&&(r=Ce(i)?{...a}:a);break}}return je(i,r,n),Me(u,i,r),r}function Ct(t,n,r){const i=new Map;for(const u of t.fields??[]){const a=typeof u.type=="string"?n[u.type]:void 0;if(a){const l=Ce(u)?{...a}:a;Je(u,r,u.default!==void 0),Ce(u)&&(je(u,l,n),Me(u.type,u,l)),i.set(u.name,l)}else{const l=he(u.type,n);Je(u,r,u.default!==void 0),je(u,l,n),Me(u.type,u,l),i.set(u.name,l),Le(n,ye(u.type),l)}}return i}function Mt(t,n,r){const i=[];let u=null;for(const a of n){const l=he(a,r);(typeof a=="string"?a:Ne(a).type)==="null"?u=l:(i.push(l),Le(r,ye(a),l))}return u&&i.push(u),t.oneOf=i,t}function Pt(t){return he(t,{})}const et=new Set(["null","boolean","int","long","float","double","bytes","string","uuid"]),Nt=new Set(["record","enum","array","map","fixed"]),tt=/^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;function Lt(t){const n=[];return oe(t,"schema",n,new Set),n}function oe(t,n,r,i){if(typeof t=="string"){!et.has(t)&&!tt.test(t)&&r.push(`${n}: "${t}" is not a valid Avro type name`);return}if(Array.isArray(t)){t.length===0&&r.push(`${n}: union must have at least one alternative`),t.forEach((a,l)=>oe(a,`${n}[${l}]`,r,i));return}if(!Z(t)){r.push(`${n}: expected an Avro type string, object, or union`);return}if(i.has(t))return;i.add(t);const u=t.type;if(typeof u!="string"){Array.isArray(u)||Z(u)?oe(u,`${n}.type`,r,i):r.push(`${n}: missing "type"`);return}if(!et.has(u)&&!Nt.has(u)&&!tt.test(u)){r.push(`${n}: unknown Avro type "${u}"`);return}switch(u){case"record":{if(!Array.isArray(t.fields)){r.push(`${n}: record must have a "fields" array`);return}t.fields.forEach((a,l)=>{const m=`${n}.fields[${l}]`;if(!Z(a)||typeof a.name!="string"){r.push(`${m}: field must have a string "name"`);return}oe(a.type,`${m}.type`,r,i)});break}case"enum":{const a=t.symbols;(!Array.isArray(a)||a.some(l=>typeof l!="string"))&&r.push(`${n}: enum must have a "symbols" array of strings`);break}case"array":{t.items===void 0?r.push(`${n}: array must have "items"`):oe(t.items,`${n}.items`,r,i);break}case"map":{t.values===void 0?r.push(`${n}: map must have "values"`):oe(t.values,`${n}.values`,r,i);break}case"fixed":{typeof t.size!="number"&&r.push(`${n}: fixed must have a numeric "size"`);break}}}var Ae={exports:{}},E={};/**
2
+ * @license React
3
+ * react.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var nt;function Ut(){if(nt)return E;nt=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),A=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),w=Symbol.iterator;function N(o){return o===null||typeof o!="object"?null:(o=w&&o[w]||o["@@iterator"],typeof o=="function"?o:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,q={};function B(o,f,_){this.props=o,this.context=f,this.refs=q,this.updater=_||U}B.prototype.isReactComponent={},B.prototype.setState=function(o,f){if(typeof o!="object"&&typeof o!="function"&&o!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,o,f,"setState")},B.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function J(){}J.prototype=B.prototype;function ue(o,f,_){this.props=o,this.context=f,this.refs=q,this.updater=_||U}var ee=ue.prototype=new J;ee.constructor=ue,Y(ee,B.prototype),ee.isPureReactComponent=!0;var x=Array.isArray;function ie(){}var j={H:null,A:null,T:null,S:null},ge=Object.prototype.hasOwnProperty;function W(o,f,_){var v=_.ref;return{$$typeof:t,type:o,key:f,ref:v!==void 0?v:null,props:_}}function te(o,f){return W(o.type,f,o.props)}function ae(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function P(o){var f={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(_){return f[_]})}var ce=/\/+/g;function G(o,f){return typeof o=="object"&&o!==null&&o.key!=null?P(""+o.key):f.toString(36)}function Q(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(ie,ie):(o.status="pending",o.then(function(f){o.status==="pending"&&(o.status="fulfilled",o.value=f)},function(f){o.status==="pending"&&(o.status="rejected",o.reason=f)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function z(o,f,_,v,O){var k=typeof o;(k==="undefined"||k==="boolean")&&(o=null);var C=!1;if(o===null)C=!0;else switch(k){case"bigint":case"string":case"number":C=!0;break;case"object":switch(o.$$typeof){case t:case n:C=!0;break;case g:return C=o._init,z(C(o._payload),f,_,v,O)}}if(C)return O=O(o),C=v===""?"."+G(o,0):v,x(O)?(_="",C!=null&&(_=C.replace(ce,"$&/")+"/"),z(O,f,_,"",function(X){return X})):O!=null&&(ae(O)&&(O=te(O,_+(O.key==null||o&&o.key===O.key?"":(""+O.key).replace(ce,"$&/")+"/")+C)),f.push(O)),1;C=0;var H=v===""?".":v+":";if(x(o))for(var I=0;I<o.length;I++)v=o[I],k=H+G(v,I),C+=z(v,f,_,k,O);else if(I=N(o),typeof I=="function")for(o=I.call(o),I=0;!(v=o.next()).done;)v=v.value,k=H+G(v,I++),C+=z(v,f,_,k,O);else if(k==="object"){if(typeof o.then=="function")return z(Q(o),f,_,v,O);throw f=String(o),Error("Objects are not valid as a React child (found: "+(f==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":f)+"). If you meant to render a collection of children, use an array instead.")}return C}function F(o,f,_){if(o==null)return o;var v=[],O=0;return z(o,v,"","",function(k){return f.call(_,k,O++)}),v}function fe(o){if(o._status===-1){var f=o._result;f=f(),f.then(function(_){(o._status===0||o._status===-1)&&(o._status=1,o._result=_)},function(_){(o._status===0||o._status===-1)&&(o._status=2,o._result=_)}),o._status===-1&&(o._status=0,o._result=f)}if(o._status===1)return o._result.default;throw o._result}var ne=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var f=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(f))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},ve={map:F,forEach:function(o,f,_){F(o,function(){f.apply(this,arguments)},_)},count:function(o){var f=0;return F(o,function(){f++}),f},toArray:function(o){return F(o,function(f){return f})||[]},only:function(o){if(!ae(o))throw Error("React.Children.only expected to receive a single React element child.");return o}};return E.Activity=S,E.Children=ve,E.Component=B,E.Fragment=r,E.Profiler=u,E.PureComponent=ue,E.StrictMode=i,E.Suspense=y,E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,E.__COMPILER_RUNTIME={__proto__:null,c:function(o){return j.H.useMemoCache(o)}},E.cache=function(o){return function(){return o.apply(null,arguments)}},E.cacheSignal=function(){return null},E.cloneElement=function(o,f,_){if(o==null)throw Error("The argument must be a React element, but you passed "+o+".");var v=Y({},o.props),O=o.key;if(f!=null)for(k in f.key!==void 0&&(O=""+f.key),f)!ge.call(f,k)||k==="key"||k==="__self"||k==="__source"||k==="ref"&&f.ref===void 0||(v[k]=f[k]);var k=arguments.length-2;if(k===1)v.children=_;else if(1<k){for(var C=Array(k),H=0;H<k;H++)C[H]=arguments[H+2];v.children=C}return W(o.type,O,v)},E.createContext=function(o){return o={$$typeof:l,_currentValue:o,_currentValue2:o,_threadCount:0,Provider:null,Consumer:null},o.Provider=o,o.Consumer={$$typeof:a,_context:o},o},E.createElement=function(o,f,_){var v,O={},k=null;if(f!=null)for(v in f.key!==void 0&&(k=""+f.key),f)ge.call(f,v)&&v!=="key"&&v!=="__self"&&v!=="__source"&&(O[v]=f[v]);var C=arguments.length-2;if(C===1)O.children=_;else if(1<C){for(var H=Array(C),I=0;I<C;I++)H[I]=arguments[I+2];O.children=H}if(o&&o.defaultProps)for(v in C=o.defaultProps,C)O[v]===void 0&&(O[v]=C[v]);return W(o,k,O)},E.createRef=function(){return{current:null}},E.forwardRef=function(o){return{$$typeof:m,render:o}},E.isValidElement=ae,E.lazy=function(o){return{$$typeof:g,_payload:{_status:-1,_result:o},_init:fe}},E.memo=function(o,f){return{$$typeof:A,type:o,compare:f===void 0?null:f}},E.startTransition=function(o){var f=j.T,_={};j.T=_;try{var v=o(),O=j.S;O!==null&&O(_,v),typeof v=="object"&&v!==null&&typeof v.then=="function"&&v.then(ie,ne)}catch(k){ne(k)}finally{f!==null&&_.types!==null&&(f.types=_.types),j.T=f}},E.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},E.use=function(o){return j.H.use(o)},E.useActionState=function(o,f,_){return j.H.useActionState(o,f,_)},E.useCallback=function(o,f){return j.H.useCallback(o,f)},E.useContext=function(o){return j.H.useContext(o)},E.useDebugValue=function(){},E.useDeferredValue=function(o,f){return j.H.useDeferredValue(o,f)},E.useEffect=function(o,f){return j.H.useEffect(o,f)},E.useEffectEvent=function(o){return j.H.useEffectEvent(o)},E.useId=function(){return j.H.useId()},E.useImperativeHandle=function(o,f,_){return j.H.useImperativeHandle(o,f,_)},E.useInsertionEffect=function(o,f){return j.H.useInsertionEffect(o,f)},E.useLayoutEffect=function(o,f){return j.H.useLayoutEffect(o,f)},E.useMemo=function(o,f){return j.H.useMemo(o,f)},E.useOptimistic=function(o,f){return j.H.useOptimistic(o,f)},E.useReducer=function(o,f,_){return j.H.useReducer(o,f,_)},E.useRef=function(o){return j.H.useRef(o)},E.useState=function(o){return j.H.useState(o)},E.useSyncExternalStore=function(o,f,_){return j.H.useSyncExternalStore(o,f,_)},E.useTransition=function(){return j.H.useTransition()},E.version="19.2.7",E}var de={exports:{}};/**
10
+ * @license React
11
+ * react.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */de.exports;var rt;function It(){return rt||(rt=1,(function(t,n){process.env.NODE_ENV!=="production"&&(function(){function r(e,s){Object.defineProperty(a.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",s[0],s[1])}})}function i(e){return e===null||typeof e!="object"?null:(e=Ye&&e[Ye]||e["@@iterator"],typeof e=="function"?e:null)}function u(e,s){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var c=e+"."+s;He[c]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",s,e),He[c]=!0)}function a(e,s,c){this.props=e,this.context=s,this.refs=Se,this.updater=c||De}function l(){}function m(e,s,c){this.props=e,this.context=s,this.refs=Se,this.updater=c||De}function y(){}function A(e){return""+e}function g(e){try{A(e);var s=!1}catch{s=!0}if(s){s=console;var c=s.error,p=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return c.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",p),A(e)}}function S(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===vt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case _:return"Profiler";case f:return"StrictMode";case C:return"Suspense";case H:return"SuspenseList";case Ie:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ve:return"Portal";case O:return e.displayName||"Context";case v:return(e._context.displayName||"Context")+".Consumer";case k:var s=e.render;return e=e.displayName,e||(e=s.displayName||s.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return s=e.displayName||null,s!==null?s:S(e.type)||"Memo";case X:s=e._payload,e=e._init;try{return S(e(s))}catch{}}return null}function w(e){if(e===o)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===X)return"<...>";try{var s=S(e);return s?"<"+s+">":"<...>"}catch{return"<...>"}}function N(){var e=b.A;return e===null?null:e.getOwner()}function U(){return Error("react-stack-top-frame")}function Y(e){if(_e.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function q(e,s){function c(){We||(We=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s))}c.isReactWarning=!0,Object.defineProperty(e,"key",{get:c,configurable:!0})}function B(){var e=S(this.type);return Ge[e]||(Ge[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function J(e,s,c,p,h,R){var T=c.ref;return e={$$typeof:ne,type:e,key:s,props:c,_owner:p},(T!==void 0?T:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:B}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function ue(e,s){return s=J(e.type,s,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(s._store.validated=e._store.validated),s}function ee(e){x(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===X&&(e._payload.status==="fulfilled"?x(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function x(e){return typeof e=="object"&&e!==null&&e.$$typeof===ne}function ie(e){var s={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(c){return s[c]})}function j(e,s){return typeof e=="object"&&e!==null&&e.key!=null?(g(e.key),ie(""+e.key)):s.toString(36)}function ge(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(y,y):(e.status="pending",e.then(function(s){e.status==="pending"&&(e.status="fulfilled",e.value=s)},function(s){e.status==="pending"&&(e.status="rejected",e.reason=s)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function W(e,s,c,p,h){var R=typeof e;(R==="undefined"||R==="boolean")&&(e=null);var T=!1;if(e===null)T=!0;else switch(R){case"bigint":case"string":case"number":T=!0;break;case"object":switch(e.$$typeof){case ne:case ve:T=!0;break;case X:return T=e._init,W(T(e._payload),s,c,p,h)}}if(T){T=e,h=h(T);var M=p===""?"."+j(T,0):p;return ze(h)?(c="",M!=null&&(c=M.replace(Ke,"$&/")+"/"),W(h,s,c,"",function(K){return K})):h!=null&&(x(h)&&(h.key!=null&&(T&&T.key===h.key||g(h.key)),c=ue(h,c+(h.key==null||T&&T.key===h.key?"":(""+h.key).replace(Ke,"$&/")+"/")+M),p!==""&&T!=null&&x(T)&&T.key==null&&T._store&&!T._store.validated&&(c._store.validated=2),h=c),s.push(h)),1}if(T=0,M=p===""?".":p+":",ze(e))for(var $=0;$<e.length;$++)p=e[$],R=M+j(p,$),T+=W(p,s,c,R,h);else if($=i(e),typeof $=="function")for($===e.entries&&(Fe||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Fe=!0),e=$.call(e),$=0;!(p=e.next()).done;)p=p.value,R=M+j(p,$++),T+=W(p,s,c,R,h);else if(R==="object"){if(typeof e.then=="function")return W(ge(e),s,c,p,h);throw s=String(e),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return T}function te(e,s,c){if(e==null)return e;var p=[],h=0;return W(e,p,"","",function(R){return s.call(c,R,h++)}),p}function ae(e){if(e._status===-1){var s=e._ioInfo;s!=null&&(s.start=s.end=performance.now()),s=e._result;var c=s();if(c.then(function(h){if(e._status===0||e._status===-1){e._status=1,e._result=h;var R=e._ioInfo;R!=null&&(R.end=performance.now()),c.status===void 0&&(c.status="fulfilled",c.value=h)}},function(h){if(e._status===0||e._status===-1){e._status=2,e._result=h;var R=e._ioInfo;R!=null&&(R.end=performance.now()),c.status===void 0&&(c.status="rejected",c.reason=h)}}),s=e._ioInfo,s!=null){s.value=c;var p=c.displayName;typeof p=="string"&&(s.name=p)}e._status===-1&&(e._status=0,e._result=c)}if(e._status===1)return s=e._result,s===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
18
+
19
+ Your code should look like:
20
+ const MyComponent = lazy(() => import('./MyComponent'))
21
+
22
+ Did you accidentally put curly braces around the import?`,s),"default"in s||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
23
+
24
+ Your code should look like:
25
+ const MyComponent = lazy(() => import('./MyComponent'))`,s),s.default;throw e._result}function P(){var e=b.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
26
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
27
+ 2. You might be breaking the Rules of Hooks
28
+ 3. You might have more than one copy of React in the same app
29
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function ce(){b.asyncTransitions--}function G(e){if(Ee===null)try{var s=("require"+Math.random()).slice(0,7);Ee=(t&&t[s]).call(t,"timers").setImmediate}catch{Ee=function(p){Xe===!1&&(Xe=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var h=new MessageChannel;h.port1.onmessage=p,h.port2.postMessage(void 0)}}return Ee(e)}function Q(e){return 1<e.length&&typeof AggregateError=="function"?new AggregateError(e):e[0]}function z(e,s){s!==we-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),we=s}function F(e,s,c){var p=b.actQueue;if(p!==null)if(p.length!==0)try{fe(p),G(function(){return F(e,s,c)});return}catch(h){b.thrownErrors.push(h)}else b.actQueue=null;0<b.thrownErrors.length?(p=Q(b.thrownErrors),b.thrownErrors.length=0,c(p)):s(e)}function fe(e){if(!Oe){Oe=!0;var s=0;try{for(;s<e.length;s++){var c=e[s];do{b.didUsePromise=!1;var p=c(!1);if(p!==null){if(b.didUsePromise){e[s]=c,e.splice(0,s);return}c=p}else break}while(!0)}e.length=0}catch(h){e.splice(0,s+1),b.thrownErrors.push(h)}finally{Oe=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ne=Symbol.for("react.transitional.element"),ve=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),O=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),Ie=Symbol.for("react.activity"),Ye=Symbol.iterator,He={},De={isMounted:function(){return!1},enqueueForceUpdate:function(e){u(e,"forceUpdate")},enqueueReplaceState:function(e){u(e,"replaceState")},enqueueSetState:function(e){u(e,"setState")}},qe=Object.assign,Se={};Object.freeze(Se),a.prototype.isReactComponent={},a.prototype.setState=function(e,s){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,s,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var D={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(le in D)D.hasOwnProperty(le)&&r(le,D[le]);l.prototype=a.prototype,D=m.prototype=new l,D.constructor=m,qe(D,a.prototype),D.isPureReactComponent=!0;var ze=Array.isArray,vt=Symbol.for("react.client.reference"),b={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},_e=Object.prototype.hasOwnProperty,Be=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function(e){return e()}};var We,xe,Ge={},_t=D.react_stack_bottom_frame.bind(D,U)(),Et=Be(w(U)),Fe=!1,Ke=/\/+/g,Qe=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Xe=!1,Ee=null,we=0,Te=!1,Oe=!1,Ve=typeof queueMicrotask=="function"?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:G;D=Object.freeze({__proto__:null,c:function(e){return P().useMemoCache(e)}});var le={map:te,forEach:function(e,s,c){te(e,function(){s.apply(this,arguments)},c)},count:function(e){var s=0;return te(e,function(){s++}),s},toArray:function(e){return te(e,function(s){return s})||[]},only:function(e){if(!x(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};n.Activity=Ie,n.Children=le,n.Component=a,n.Fragment=o,n.Profiler=_,n.PureComponent=m,n.StrictMode=f,n.Suspense=C,n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b,n.__COMPILER_RUNTIME=D,n.act=function(e){var s=b.actQueue,c=we;we++;var p=b.actQueue=s!==null?s:[],h=!1;try{var R=e()}catch($){b.thrownErrors.push($)}if(0<b.thrownErrors.length)throw z(s,c),e=Q(b.thrownErrors),b.thrownErrors.length=0,e;if(R!==null&&typeof R=="object"&&typeof R.then=="function"){var T=R;return Ve(function(){h||Te||(Te=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function($,K){h=!0,T.then(function(re){if(z(s,c),c===0){try{fe(p),G(function(){return F(re,$,K)})}catch(Tt){b.thrownErrors.push(Tt)}if(0<b.thrownErrors.length){var wt=Q(b.thrownErrors);b.thrownErrors.length=0,K(wt)}}else $(re)},function(re){z(s,c),0<b.thrownErrors.length&&(re=Q(b.thrownErrors),b.thrownErrors.length=0),K(re)})}}}var M=R;if(z(s,c),c===0&&(fe(p),p.length!==0&&Ve(function(){h||Te||(Te=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),b.actQueue=null),0<b.thrownErrors.length)throw e=Q(b.thrownErrors),b.thrownErrors.length=0,e;return{then:function($,K){h=!0,c===0?(b.actQueue=p,G(function(){return F(M,$,K)})):$(M)}}},n.cache=function(e){return function(){return e.apply(null,arguments)}},n.cacheSignal=function(){return null},n.captureOwnerStack=function(){var e=b.getCurrentStack;return e===null?null:e()},n.cloneElement=function(e,s,c){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var p=qe({},e.props),h=e.key,R=e._owner;if(s!=null){var T;e:{if(_e.call(s,"ref")&&(T=Object.getOwnPropertyDescriptor(s,"ref").get)&&T.isReactWarning){T=!1;break e}T=s.ref!==void 0}T&&(R=N()),Y(s)&&(g(s.key),h=""+s.key);for(M in s)!_e.call(s,M)||M==="key"||M==="__self"||M==="__source"||M==="ref"&&s.ref===void 0||(p[M]=s[M])}var M=arguments.length-2;if(M===1)p.children=c;else if(1<M){T=Array(M);for(var $=0;$<M;$++)T[$]=arguments[$+2];p.children=T}for(p=J(e.type,h,p,R,e._debugStack,e._debugTask),h=2;h<arguments.length;h++)ee(arguments[h]);return p},n.createContext=function(e){return e={$$typeof:O,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:v,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},n.createElement=function(e,s,c){for(var p=2;p<arguments.length;p++)ee(arguments[p]);p={};var h=null;if(s!=null)for($ in xe||!("__self"in s)||"key"in s||(xe=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),Y(s)&&(g(s.key),h=""+s.key),s)_e.call(s,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(p[$]=s[$]);var R=arguments.length-2;if(R===1)p.children=c;else if(1<R){for(var T=Array(R),M=0;M<R;M++)T[M]=arguments[M+2];Object.freeze&&Object.freeze(T),p.children=T}if(e&&e.defaultProps)for($ in R=e.defaultProps,R)p[$]===void 0&&(p[$]=R[$]);h&&q(p,typeof e=="function"?e.displayName||e.name||"Unknown":e);var $=1e4>b.recentlyCreatedOwnerStacks++;return J(e,h,p,N(),$?Error("react-stack-top-frame"):_t,$?Be(w(e)):Et)},n.createRef=function(){var e={current:null};return Object.seal(e),e},n.forwardRef=function(e){e!=null&&e.$$typeof===I?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?console.error("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&e.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var s={$$typeof:k,render:e},c;return Object.defineProperty(s,"displayName",{enumerable:!1,configurable:!0,get:function(){return c},set:function(p){c=p,e.name||e.displayName||(Object.defineProperty(e,"name",{value:p}),e.displayName=p)}}),s},n.isValidElement=x,n.lazy=function(e){e={_status:-1,_result:e};var s={$$typeof:X,_payload:e,_init:ae},c={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return e._ioInfo=c,s._debugInfo=[{awaited:c}],s},n.memo=function(e,s){e==null&&console.error("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e),s={$$typeof:I,type:e,compare:s===void 0?null:s};var c;return Object.defineProperty(s,"displayName",{enumerable:!1,configurable:!0,get:function(){return c},set:function(p){c=p,e.name||e.displayName||(Object.defineProperty(e,"name",{value:p}),e.displayName=p)}}),s},n.startTransition=function(e){var s=b.T,c={};c._updatedFibers=new Set,b.T=c;try{var p=e(),h=b.S;h!==null&&h(c,p),typeof p=="object"&&p!==null&&typeof p.then=="function"&&(b.asyncTransitions++,p.then(ce,ce),p.then(y,Qe))}catch(R){Qe(R)}finally{s===null&&c._updatedFibers&&(e=c._updatedFibers.size,c._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),s!==null&&c.types!==null&&(s.types!==null&&s.types!==c.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),s.types=c.types),b.T=s}},n.unstable_useCacheRefresh=function(){return P().useCacheRefresh()},n.use=function(e){return P().use(e)},n.useActionState=function(e,s,c){return P().useActionState(e,s,c)},n.useCallback=function(e,s){return P().useCallback(e,s)},n.useContext=function(e){var s=P();return e.$$typeof===v&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),s.useContext(e)},n.useDebugValue=function(e,s){return P().useDebugValue(e,s)},n.useDeferredValue=function(e,s){return P().useDeferredValue(e,s)},n.useEffect=function(e,s){return e==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),P().useEffect(e,s)},n.useEffectEvent=function(e){return P().useEffectEvent(e)},n.useId=function(){return P().useId()},n.useImperativeHandle=function(e,s,c){return P().useImperativeHandle(e,s,c)},n.useInsertionEffect=function(e,s){return e==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),P().useInsertionEffect(e,s)},n.useLayoutEffect=function(e,s){return e==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),P().useLayoutEffect(e,s)},n.useMemo=function(e,s){return P().useMemo(e,s)},n.useOptimistic=function(e,s){return P().useOptimistic(e,s)},n.useReducer=function(e,s,c){return P().useReducer(e,s,c)},n.useRef=function(e){return P().useRef(e)},n.useState=function(e){return P().useState(e)},n.useSyncExternalStore=function(e,s,c){return P().useSyncExternalStore(e,s,c)},n.useTransition=function(){return P().useTransition()},n.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(de,de.exports)),de.exports}var ot;function Yt(){return ot||(ot=1,process.env.NODE_ENV==="production"?Ae.exports=Ut():Ae.exports=It()),Ae.exports}Yt();let Pe=null,ke=null;const Ht=new Set;function Dt(){return ke||(ke=Promise.resolve().then(()=>require("./markdown-assets/protoToJsonSchema-CgkcluFJ.js")).then(t=>{Pe=t.protoToJsonSchema,Ht.forEach(n=>n())})),ke}function qt(){return Pe||Dt(),Pe}const zt="x-parser-original-payload",Bt="x-lib-conversion-error",Wt=/^application\/vnd\.apache\.avro(\+(json|yaml))?(\s*;\s*version=.+)?$/i,xt=/^application\/vnd\.google\.protobuf(\s*;\s*version=.+)?$/i;function Gt(t){return typeof t=="string"&&Wt.test(t)}function Ft(t){return typeof t=="string"&&xt.test(t)}function at(t){return Z(t)&&typeof t.schemaFormat=="string"&&"schema"in t}const Kt=["properties","oneOf","anyOf","allOf","not","$ref","additionalProperties","patternProperties","x-parser-schema-id"],Qt=new Set(["record","enum","fixed","map","int","long","float","double","bytes","uuid"]);function Xt(t){return typeof t=="string"||Array.isArray(t)?!0:Z(t)?typeof t.type=="string"&&Qt.has(t.type)||Array.isArray(t.fields)||Array.isArray(t.symbols)?!0:!Kt.some(n=>n in t):!1}function Vt(t,n){let r=t;if(n&&Z(r)&&typeof r.$ref=="string"){const l=n(r.$ref);l!==void 0&&(r=l)}const i=Zt(r),u=i.schema.description;if(typeof u=="string")return{...i,description:u};const a=at(r)?r.description:void 0;return typeof a=="string"?{...i,description:a}:i}function Zt(t){var l;if(!at(t))return{schema:V(t)??t};const{schemaFormat:n}=t,r=t.schema,i=t[zt],u=(l=V(r))==null?void 0:l[Bt];if(typeof u=="string")return{schema:V(i)??{},schemaFormat:n,originalSchema:i,conversionError:u};if(i!==void 0)return{schema:V(r)??{},schemaFormat:n,originalSchema:i};if(Gt(n)&&Xt(r)){const m=Lt(r);if(m.length>0)return{schema:V(r)??{},schemaFormat:n,originalSchema:r,conversionError:m[0]};try{return{schema:Pt(r),schemaFormat:n,originalSchema:r}}catch(y){return{schema:V(r)??{},schemaFormat:n,originalSchema:r,conversionError:y instanceof Error?y.message:"Failed to convert Avro schema"}}}if(Ft(n)&&typeof r=="string"){const m=qt();if(!m)return{schema:{},schemaFormat:n,originalSchema:r,pendingConversion:!0};try{return{schema:m(r),schemaFormat:n,originalSchema:r}}catch(y){return{schema:{},schemaFormat:n,originalSchema:r,conversionError:y instanceof Error?y.message:"Failed to convert Protobuf schema"}}}const a=V(r);return a?{schema:a,schemaFormat:n}:{schema:{},schemaFormat:n,originalSchema:r}}const Jt=t=>typeof t=="object"&&t!==null;function en(t){try{return decodeURIComponent(t).replace(/~1/g,"/").replace(/~0/g,"~")}catch{return}}function tn(t,n){if(n==="#")return t;if(!n.startsWith("#/"))return;let r=t;for(const i of n.slice(2).split("/")){if(!Jt(r))return;const u=en(i);if(u===void 0||(r=r[u],r===void 0))return}return r}function $e(t){const n=new Map;return r=>{if(n.has(r))return n.get(r);const i=tn(t,r);return n.set(r,i),i}}const L=(t,n)=>`${"#".repeat(t)} ${n}`,d=t=>typeof t=="string"?t.replace(/`/g,"'"):String(t??""),pe=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),nn={objects:new Set,refs:new Set};function be(t,n,r=nn){if(t===null||typeof t!="object")return t;if(r.objects.has(t)||pe(t)&&typeof t.$ref=="string"&&r.refs.has(t.$ref)){const a=pe(t)?t["x-parser-schema-id"]:void 0;return typeof a=="string"?{$ref:`#/components/schemas/${a} (circular)`}:"[circular reference]"}const i={objects:new Set(r.objects).add(t),refs:pe(t)&&typeof t.$ref=="string"?new Set(r.refs).add(t.$ref):r.refs};if(Array.isArray(t))return t.map(a=>be(a,n,i));if(pe(t)&&typeof t.$ref=="string"){const a=n==null?void 0:n(t.$ref);return pe(a)||Array.isArray(a)?be(a,n,i):{$ref:t.$ref}}const u={};for(const[a,l]of Object.entries(t))u[a]=be(l,n,i);return u}function Re(t,n,r){if(!n)return"";const i=be(n,r);return`${L(4,`\`${d(t)}\``)}
30
+
31
+ \`\`\`json
32
+ ${JSON.stringify(i,null,2)}
33
+ \`\`\``}function me(t,n,r){if(!n||typeof n=="boolean")return"";const{schema:i,description:u,conversionError:a,pendingConversion:l}=Vt(n,r);if(l)return`${L(4,`\`${d(t)}\``)}
34
+
35
+ _(schema conversion still in progress)_`;if(a)return`${L(4,`\`${d(t)}\``)}
36
+
37
+ _(could not convert schema: ${d(a)})_`;const m=u&&!i.description?{...i,description:u}:i;return Re(t,m,r)}function ct(t){var n;switch(t.type){case"apiKey":case"httpApiKey":return`API Key (${d(t.in)}${t.name?`: \`${d(t.name)}\``:""})`;case"http":return((n=t.scheme)==null?void 0:n.toLowerCase())==="basic"?"HTTP Basic":`HTTP Bearer${t.bearerFormat?` (format: ${d(t.bearerFormat)})`:""}`;case"openIdConnect":return"OpenID Connect";case"oauth2":return"OAuth2";case"mutualTLS":return"Mutual TLS";case"X509":return"X.509 Certificate";case"userPassword":return"User / Password";case"plain":case"scramSha256":case"scramSha512":return"SASL";case"gssapi":return"SASL (GSSAPI)";case"symmetricEncryption":return"Symmetric Encryption";case"asymmetricEncryption":return"Asymmetric Encryption";default:return d(t.type)}}function rn(t){if(!(t!=null&&t.length))return"";const n=[];for(const r of t)if(r!=null&&r.type&&(n.push(`- **${ct(r)}**`),r.description&&n.push(` ${d(r.description)}`),r.type==="openIdConnect"&&r.openIdConnectUrl&&n.push(` - OpenID Connect URL: \`${d(r.openIdConnectUrl)}\``),r.type==="oauth2"))for(const[i,u]of Object.entries(r.flows??{})){n.push(` - Flow \`${d(i)}\`:`),u.authorizationUrl&&n.push(` - Authorization URL: \`${d(u.authorizationUrl)}\``),u.tokenUrl&&n.push(` - Token URL: \`${d(u.tokenUrl)}\``),u.refreshUrl&&n.push(` - Refresh URL: \`${d(u.refreshUrl)}\``);const a=Object.keys(u.availableScopes??u.scopes??{});a.length&&n.push(` - Available scopes: ${a.map(l=>`\`${d(l)}\``).join(", ")}`)}return n.length?["**Authorization:**",n.join(`
38
+ `)].join(`
39
+
40
+ `):""}function ft(t){const n=[],{info:r}=t;n.push(L(1,d(r.title)));const i=[`**Version:** ${d(r.version)}`];if(r.license&&i.push(`**License:** ${d(r.license.name)}${r.license.url?` (${d(r.license.url)})`:""}`),r.contact){const u=[r.contact.name,r.contact.email].filter(Boolean).map(d).join(" ");u&&i.push(`**Contact:** ${u}`)}if(n.push(i.join(`
41
+ `)),r.description&&n.push(d(r.description)),t.servers&&Object.keys(t.servers).length){const u=[L(2,"Servers")];for(const[a,l]of Object.entries(t.servers)){u.push(L(3,d(a)));const m=[`**Host:** \`${d(l.host)}${l.pathname?d(l.pathname):""}\``];m.push(`**Protocol:** ${d(l.protocol)}${l.protocolVersion?` ${d(l.protocolVersion)}`:""}`),l.description&&m.push(d(l.description)),u.push(m.join(`
42
+ `));const y=rn(l.security);y&&u.push(y)}n.push(u.join(`
43
+
44
+ `))}return n}function lt(t,n=$e(t)){var a,l,m;const r=ft(t);if(t.operations&&Object.keys(t.operations).length){const y=[L(2,"Operations")];for(const[A,g]of Object.entries(t.operations)){const S=g.channel;y.push(L(3,`${d((a=g.action)==null?void 0:a.toUpperCase())} \`${d(A)}\``));const w=[];S!=null&&S.address&&w.push(`**Channel:** \`${d(S.address)}\``),g.summary&&w.push(d(g.summary)),g.description&&w.push(d(g.description));const N=g.messages??[];N.length&&w.push(`**Messages:** ${N.map(U=>`\`${d(U.name??U.title??"message")}\``).join(", ")}`),y.push(w.join(`
45
+
46
+ `))}r.push(y.join(`
47
+
48
+ `))}const i=(l=t.components)==null?void 0:l.messages;if(i&&Object.keys(i).length){const y=[L(2,"Messages")];for(const[A,g]of Object.entries(i)){y.push(L(3,d(g.title??g.name??A)));const S=[];g.summary&&S.push(d(g.summary)),g.description&&S.push(d(g.description)),g.contentType&&S.push(`**Content-Type:** \`${d(g.contentType)}\``),y.push(S.join(`
49
+
50
+ `)),g.payload&&y.push(me("payload",g.payload,n)),g.headers&&y.push(me("headers",g.headers,n))}r.push(y.join(`
51
+
52
+ `))}const u=(m=t.components)==null?void 0:m.schemas;if(u&&Object.keys(u).length){const y=[L(2,"Schemas")];for(const[A,g]of Object.entries(u))y.push(me(A,g,n));r.push(y.join(`
53
+
54
+ `))}return r.filter(Boolean).join(`
55
+
56
+ `)}function on(t,n,r){var m;const i=n.channel,u=[L(3,`${d((m=n.action)==null?void 0:m.toUpperCase())} \`${d(t)}\``)],a=[];i!=null&&i.address&&a.push(`**Channel:** \`${d(i.address)}\``),n.summary&&a.push(d(n.summary)),n.description&&a.push(d(n.description)),u.push(a.join(`
57
+
58
+ `));const l=n.messages??[];for(const y of l){const A=[L(4,d(y.title??y.name??"Message"))],g=[];y.summary&&g.push(d(y.summary)),y.description&&g.push(d(y.description)),y.contentType&&g.push(`**Content-Type:** \`${d(y.contentType)}\``),g.length&&A.push(g.join(`
59
+
60
+ `)),u.push(A.join(`
61
+
62
+ `)),y.payload&&u.push(me("payload",y.payload,r)),y.headers&&u.push(me("headers",y.headers,r))}return u.filter(Boolean).join(`
63
+
64
+ `)}function pt(t,n,r=$e(t)){var a;const i=(a=t.operations)==null?void 0:a[n];if(!i)return"";const u=ft(t);return u.push(on(n,i,r)),u.filter(Boolean).join(`
65
+
66
+ `)}function sn(t,n){if(!t.length||!n)return"";const r=new Map;for(const a of t)for(const[l,m]of Object.entries(a)){if(!m.length)continue;const y=r.get(l)??[];r.set(l,Array.from(new Set([...y,...m])))}const i=Array.from(new Set(t.flatMap(a=>Object.keys(a)))),u=[];for(const a of i){const l=n[a];if(!l)continue;const m=r.get(a);if(u.push(`- **${ct(l)}** (\`${d(a)}\`)`),l.description&&u.push(` ${d(l.description)}`),l.type==="openIdConnect"&&l.openIdConnectUrl&&u.push(` - OpenID Connect URL: \`${d(l.openIdConnectUrl)}\``),l.type==="oauth2")for(const[y,A]of Object.entries(l.flows??{})){u.push(` - Flow \`${d(y)}\`:`),A.authorizationUrl&&u.push(` - Authorization URL: \`${d(A.authorizationUrl)}\``),A.tokenUrl&&u.push(` - Token URL: \`${d(A.tokenUrl)}\``),A.refreshUrl&&u.push(` - Refresh URL: \`${d(A.refreshUrl)}\``);const g=m!=null&&m.length?m:Object.keys(A.scopes??{});g.length&&u.push(` - ${m!=null&&m.length?"Required scopes":"Scopes"}: ${g.map(S=>`\`${d(S)}\``).join(", ")}`)}else m!=null&&m.length&&u.push(` - Required scopes: ${m.map(y=>`\`${d(y)}\``).join(", ")}`)}return u.length?["**Authorization:**",u.join(`
67
+ `)].join(`
68
+
69
+ `):""}function dt(t,n,r,i,u,a){var w;const l=[L(3,`${t.toUpperCase()} \`${d(n)}\``)],m=[];r.summary&&m.push(d(r.summary)),r.description&&m.push(d(r.description)),r.deprecated&&m.push("**Deprecated**");const y=r.security??a??[],A=sn(y,u);A&&m.push(A);for(const N of["path","query","header","cookie"]){const U=(r.parameters??[]).filter(Y=>Y.in===N);if(U.length){m.push(`**${N[0].toUpperCase()}${N.slice(1)} Parameters:**`);for(const Y of U){const q=Y.schema;m.push(`- \`${d(Y.name)}\`${Y.required?" (required)":""}${q!=null&&q.type?` — ${d(q.type)}`:""}${Y.description?`: ${d(Y.description)}`:""}`)}}}l.push(m.join(`
70
+
71
+ `));const g=((w=r.requestBody)==null?void 0:w.content)??{};for(const[N,U]of Object.entries(g))l.push([`**Request Body** (\`${d(N)}\`)`,Re("body",U.schema,i)].join(`
72
+
73
+ `));const S=r.responses??{};for(const[N,U]of Object.entries(S)){const Y=[L(4,`${N}${U.description?`: ${d(U.description)}`:""}`)];for(const[q,B]of Object.entries(U.content??{}))Y.push([`**Body** (\`${d(q)}\`)`,Re("body",B.schema,i)].join(`
74
+
75
+ `));l.push(Y.join(`
76
+
77
+ `))}return l.join(`
78
+
79
+ `)}function mt(t,n=$e(t)){var l,m,y,A,g;const r=[],{info:i}=t;if(r.push(L(1,d(i.title))),r.push(`**Version:** ${d(i.version)}`),i.description&&r.push(d(i.description)),(l=t.servers)!=null&&l.length){const S=[L(2,"Servers")];for(const w of t.servers)S.push(`- \`${d(w.url)}\`${w.description?` — ${d(w.description)}`:""}`);r.push(S.join(`
80
+ `))}const u=t.paths?it(t.paths):[];if(u.length){const S=[L(2,"Endpoints")];for(const{method:w,path:N}of u){const U=(y=(m=t.paths)==null?void 0:m[N])==null?void 0:y[w];U&&S.push(dt(w,N,U,n,(A=t.components)==null?void 0:A.securitySchemes,t.security))}r.push(S.join(`
81
+
82
+ `))}const a=(g=t.components)==null?void 0:g.schemas;if(a&&Object.keys(a).length){const S=[L(2,"Schemas")];for(const[w,N]of Object.entries(a))S.push(Re(w,N,n));r.push(S.join(`
83
+
84
+ `))}return r.filter(Boolean).join(`
85
+
86
+ `)}function yt(t,n,r,i=$e(t)){var m,y,A,g;const u=(y=(m=t.paths)==null?void 0:m[r])==null?void 0:y[n];if(!u)return"";const a=[],{info:l}=t;if(a.push(L(1,d(l.title))),a.push(`**Version:** ${d(l.version)}`),l.description&&a.push(d(l.description)),(A=t.servers)!=null&&A.length){const S=[L(2,"Servers")];for(const w of t.servers)S.push(`- \`${d(w.url)}\`${w.description?` — ${d(w.description)}`:""}`);a.push(S.join(`
87
+ `))}return a.push(dt(n,r,u,i,(g=t.components)==null?void 0:g.securitySchemes,t.security)),a.filter(Boolean).join(`
88
+
89
+ `)}function ht(t){return{...t,title:n=>t.title(n),summary:n=>t.summary(n),targets:n=>t.targets(n),toMarkdown:(n,r)=>t.toMarkdown(n,r)}}const se=t=>{var r;return typeof t!="string"?void 0:((r=t.trim().split(`
90
+ `)[0])==null?void 0:r.trim())||void 0},un=t=>ut.some(n=>n===t),an=ht({name:"OpenAPI",matches:t=>typeof t.openapi=="string"||typeof t.swagger=="string",sectionTitle:"Endpoints",title:t=>{var n;return((n=t.info)==null?void 0:n.title)??"API"},summary:t=>{var n;return se((n=t.info)==null?void 0:n.description)},targets:t=>it(t.paths??{}).map(({key:n,method:r,path:i})=>{var a,l;const u=(l=(a=t.paths)==null?void 0:a[i])==null?void 0:l[r];return{key:n,label:`${r.toUpperCase()} ${i}`,summary:se(u==null?void 0:u.summary)??se(u==null?void 0:u.description),target:{kind:"operation",document:t,method:r,path:i}}}),toMarkdown:(t,n)=>{if(!n||n.kind==="document")return mt(t);if(typeof n.path!="string"||!un(n.method))throw new Error("[apiuikit] An OpenAPI operation target requires a valid method and path.");return yt(t,n.method,n.path)}}),cn=ht({name:"AsyncAPI",matches:t=>typeof t.asyncapi=="string",sectionTitle:"Operations",title:t=>{var n;return((n=t.info)==null?void 0:n.title)??"API"},summary:t=>{var n;return se((n=t.info)==null?void 0:n.description)},targets:t=>Object.entries(t.operations??{}).map(([n,r])=>({key:n,label:r!=null&&r.action?`${r.action.toUpperCase()} ${n}`:n,summary:se(r==null?void 0:r.summary)??se(r==null?void 0:r.description),target:{kind:"operation",document:t,id:n}})),toMarkdown:(t,n)=>{if(!n||n.kind==="document")return lt(t);if(typeof n.id!="string"||!n.id)throw new Error("[apiuikit] An AsyncAPI operation target requires an operation id.");return pt(t,n.id)}}),st=[an,cn];function Ue(t){const n=typeof t=="object"&&t!==null?t:{},r=st.find(i=>i.matches(n));if(!r)throw new Error(`[apiuikit] Unrecognized document: expected a top-level "openapi", "swagger", or "asyncapi" version key. Supported specs: ${st.map(i=>i.name).join(", ")}.`);return r}function gt(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function fn(t){return Ue(t).targets(t)}function ln(t,n){const r=Ue(t);if(n&&n.document!==t)throw new Error("[apiuikit] Markdown target belongs to a different document.");return r.toMarkdown(t,n)}function pn(t,n={}){const r=Ue(t),{baseUrl:i,url:u,optional:a}=n,l=(i==null?void 0:i.replace(/\/+$/,""))??"",y=u??(w=>`${l}/${gt(w.key)}.md`),A=[`# ${n.title??r.title(t)}`],g=n.summary??r.summary(t);g&&A.push("",`> ${g}`);const S=r.targets(t).map(w=>({entry:w,href:y(w)})).filter(w=>!!w.href);if(S.length){A.push("",`## ${r.sectionTitle}`,"");for(const{entry:w,href:N}of S)A.push(`- [${w.label}](${N})${w.summary?`: ${w.summary}`:""}`)}if(a!=null&&a.length){A.push("","## Optional","");for(const w of a)A.push(`- [${w.label}](${w.url})${w.description?`: ${w.description}`:""}`)}return A.push(""),A.join(`
91
+ `)}exports.asyncApiOperationToMarkdown=pt;exports.asyncApiToMarkdown=lt;exports.documentToLlmsTxt=pn;exports.documentToMarkdown=ln;exports.listDocumentTargets=fn;exports.openApiEndpointToMarkdown=yt;exports.openApiToMarkdown=mt;exports.targetSlug=gt;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * DOM-free entry point for build scripts, server routes, and edge workers
3
+ * that publish Markdown alongside an apiuikit UI.
4
+ */
5
+ export { documentToLlmsTxt, documentToMarkdown, listDocumentTargets, targetSlug } from './helpers/llmsTxt';
6
+ export type { DocumentTarget, LlmsTxtLink, LlmsTxtOptions } from './helpers/llmsTxt';
7
+ export { asyncApiOperationToMarkdown, asyncApiToMarkdown, openApiEndpointToMarkdown, openApiToMarkdown, } from './helpers/toMarkdown';
8
+ export type { MarkdownTarget } from './config/config';