mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
1 line
No EOL
11 KiB
JavaScript
1 line
No EOL
11 KiB
JavaScript
(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[592],{3905:function(e,t,n){"use strict";n.d(t,{Zo:function(){return u},kt:function(){return m}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=s(n),m=o,f=d["".concat(c,".").concat(m)]||d[m]||p[m]||a;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var s=2;s<a;s++)i[s]=n[s];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},5833:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(7462),o=n(7294),a=n(3746),i=n(2263),l=n(6010),c=n(5823),s=n.n(c),u="codeblock_Yfbc",p="wrapper_DZPG",d="buttonWrapper_BACP",m="button_HbCM";const f=()=>document.documentElement.dataset.theme||"light";var y=function(e){let{children:t,language:n="markup",enableCopy:c=!1,download:y}=e;const{siteConfig:v}=(0,i.Z)(),g=function(){const[e,t]=(0,o.useState)(f);return(0,o.useEffect)((()=>{const e=new MutationObserver((()=>{t(f())}));return e.observe(document.documentElement,{subtree:!1,attributeFilter:["data-theme"]}),()=>e.disconnect()})),e}(),h=v.themeConfig.prism.theme,b=v.themeConfig.prism.darkTheme,k="light"===g?h:b;return o.createElement("div",{className:p},o.createElement(a.ZP,(0,r.Z)({},a.lG,{code:t,language:n,theme:k}),(e=>{let{className:t,style:n,tokens:r,getLineProps:a,getTokenProps:i}=e;return o.createElement("pre",{className:(0,l.Z)(t,u),style:n},r.map(((e,t)=>o.createElement("div",a({line:e,key:t}),e.map(((e,t)=>o.createElement("span",i({token:e,key:t}))))))))})),(c||y)&&o.createElement("div",{className:d},c&&o.createElement("button",{className:m,type:"button","aria-label":"Copy content",title:"Copy content",onClick:async()=>{try{navigator.clipboard.writeText(t)}catch{}}},o.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},o.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"}))),y&&o.createElement("button",{className:m,type:"button","aria-label":"Download content as file",title:"Download content as file",onClick:()=>{y&&y.fileName&&y.mime&&s()(t,y.fileName,y.mime)}},o.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor"},o.createElement("path",{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"})))))}},7547:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7294),o="errorDisplay_QTmW",a="title_GCFt";var i=function(e){let{title:t,children:n}=e;return r.createElement("div",{role:"alert",className:o},r.createElement("strong",{className:a},t),n)}},8222:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7294),o=n(3285),a="headline_fEIe";var i=function(e){let{children:t,layoutDescription:n,description:i,title:l,headline:c}=e;return r.createElement(o.Z,{description:n,title:l},r.createElement("main",{className:"container padding-top--md padding-bottom--lg"},r.createElement("h1",{className:a},c),r.createElement("p",null,i),t))}},7506:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(7294),o=n(2263);let a;!function(e){e.Idle="idle",e.Loading="loading",e.Success="success",e.Failure="failure"}(a||(a={}));const i={status:a.Idle,data:null,error:null};t.Z=function(){var e;const[t,n]=(0,r.useState)(i),{siteConfig:l}=(0,o.Z)(),c=null==(e=l.customFields)?void 0:e.apiBase,s=(0,r.useRef)(!0);(0,r.useEffect)((()=>()=>{s.current=!1}),[]);const u=(0,r.useCallback)(((e,t)=>{n((e=>({...e,status:a.Loading}))),fetch(function(e,t){return`/${t.split("/").concat(e.split("/")).filter(Boolean).join("/")}`}(e,c),t).then((e=>e.text().then((t=>({data:t,ok:e.ok,code:e.status}))))).then((e=>{let{data:t,ok:r,code:o}=e;s.current&&n(r?{status:a.Success,data:t,error:null}:e=>({...e,status:a.Failure,error:{code:o,message:t}}))})).catch((e=>{s.current&&n((t=>({...t,status:a.Failure,error:{code:0,message:(null==e||null==e.toString?void 0:e.toString())||"An unknown error occurred"}})))}))}),[c]);return(0,r.useMemo)((()=>({...t,request:u})),[u,t])}},5823:function(e){e.exports=function(e,t,n,r){var o=new Blob(void 0!==r?[r,e]:[e],{type:n||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(o,t);else{var a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(o):window.webkitURL.createObjectURL(o),i=document.createElement("a");i.style.display="none",i.href=a,i.setAttribute("download",t),void 0===i.download&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),setTimeout((function(){document.body.removeChild(i),window.URL.revokeObjectURL(a)}),200)}}},3746:function(e,t,n){"use strict";n.d(t,{ZP:function(){return y},lG:function(){return i}});var r=n(7410),o={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},a=n(7294),i={Prism:r.Z,theme:o};function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}var s=/\r\n|\r|\n/,u=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},p=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},d=function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=c({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=c({},n,{backgroundColor:null}),o};function m(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var f=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),l(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?d(e.theme,e.language):void 0;return t.themeDict=n})),l(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,a=c({},m(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),i=t.getThemeDict(t.props);return void 0!==i&&(a.style=i.plain),void 0!==o&&(a.style=void 0!==a.style?c({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a})),l(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,a=t.getThemeDict(t.props);if(void 0!==a){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return a[n[0]];var i=r?{display:"inline-block"}:{},l=n.map((function(e){return a[e]}));return Object.assign.apply(Object,[i].concat(l))}})),l(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,a=e.token,i=c({},m(e,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:t.getStyleForToken(a),key:void 0});return void 0!==o&&(i.style=void 0!==i.style?c({},i.style,o):o),void 0!==n&&(i.key=n),r&&(i.className+=" "+r),i})),l(this,"tokenize",(function(e,t,n,r){var o={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",o);var a=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,a=this.getThemeDict(this.props),i=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],a=0,i=0,l=[],c=[l];i>-1;){for(;(a=r[i]++)<o[i];){var d=void 0,m=t[i],f=n[i][a];if("string"==typeof f?(m=i>0?m:["plain"],d=f):(m=p(m,f.type),f.alias&&(m=p(m,f.alias)),d=f.content),"string"==typeof d){var y=d.split(s),v=y.length;l.push({types:m,content:y[0]});for(var g=1;g<v;g++)u(l),c.push(l=[]),l.push({types:m,content:y[g]})}else i++,t.push(m),n.push(d),r.push(0),o.push(d.length)}i--,t.pop(),n.pop(),r.pop(),o.pop()}return u(l),c}(void 0!==i?this.tokenize(t,r,i,n):[r]),className:"prism-code language-"+n,style:void 0!==a?a.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(a.Component),y=f}}]); |