@diplodoc/cli 5.35.0 → 5.35.2

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.
@@ -0,0 +1,2 @@
1
+ (()=>{var e,t,r,n={66008(){var e,t;"u">typeof Element&&((t=(e=Element.prototype).matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector)?e.matches=e.matchesSelector=t:e.matches=e.matchesSelector=function(e){var t=this;return Array.prototype.some.call(document.querySelectorAll(e),function(e){return e===t})})},55349(e,t,r){"use strict";var n,o=r(71893),a=r(74848),i=r(96540),c=r(5338),u=r(33324),l=r(78184),s=r(81836),d=r(12905),h=(0,i.createContext)({pathname:"/",depth:0});h.displayName="RouterContext";var f=h.Provider;function v(){return(0,i.useContext)(h)}var p=(0,i.createContext)(l.JA.En);p.displayName="Lang";var g=p.Provider,m=r(63323),y=r(60478),w={theme:l.Sx.Light,textSize:l.ov.M,showMiniToc:!0,wideFormat:!0,fullScreen:!1},_=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz_AF","yi"],b=((n={}).RTL="rtl",n.LTR="ltr",n);function S(){return"u">typeof document}function x(e){var t=e.theme;"u">typeof document&&document.querySelectorAll(".g-root").forEach(function(e){e.classList.toggle("g-root_theme_light","light"===t),e.classList.toggle("g-root_theme_dark","dark"===t)})}function C(e){if(S()){document.body.classList.add("g-root");var t=function(e,t){return document.body.classList.toggle(e,!!t)};Object.keys(e).forEach(function(r){switch(r){case"wideFormat":t("dc-root_wide-format",e[r]);break;case"focusSearch":t("dc-root_focused-search",e[r]);break;case"fullScreen":t("dc-root_full-screen",e[r]);break;case"landingPage":t("dc-root_document-page",!e[r]),t("dc-root_landing-page",e[r]);break;case"mobileView":t("mobile",e[r]),t("desktop",!e[r])}})}}function k(e){return _.includes(e)?b.RTL:b.LTR}(0,y._)(new Set((0,y._)(["href"]).concat((0,y._)(["src","url","href","icon","image","desktop","mobile","tablet","previewImg","image","avatar","logo","light","dark"]))));var j=function(e){return"boolean"==typeof e?e:!!e&&"true"===e};function L(){return!!S()&&document.body.clientWidth<769}function M(e){if(!S())return w[e];try{return sessionStorage.getItem(e)||w[e]}catch(t){return w[e]}}var E=r(50467),O=r(53014);function T(){var e,t,r,n,a,c=(e=M("theme"),t=M("textSize"),r=M("showMiniToc"),n=M("wideFormat"),a=M("fullScreen"),{theme:e,textSize:t,showMiniToc:j(r),wideFormat:j(n),fullScreen:j(a)}),u=P("theme",c),l=P("textSize",c),s=P("wideFormat",c),d=P("fullScreen",c),h=P("showMiniToc",c);return(0,i.useMemo)(function(){return(0,o._)({},u,l,s,h,d)},[u,l,s,h,d])}function P(e,t){var r=(0,O._)((0,i.useState)(t[e]),2),n=r[0],o=r[1],a=(0,i.useMemo)(function(){var t,r;return t=e,r=o,function(e){if(S())try{sessionStorage.setItem(t,String(e))}catch(e){}r(e)}},[e,o]);return(0,i.useMemo)(function(){var t;return t={},(0,E._)(t,e,n),(0,E._)(t,"onChange"+e.replace(/^./,function(e){return e.toUpperCase()}),a),t},[e,n,a])}function N(){var e=(0,O._)((0,i.useState)(L()),2),t=e[0],r=e[1],n=(0,i.useCallback)(function(){r(L())},[]);return(0,i.useEffect)(n,[n]),(0,i.useEffect)(function(){return window.addEventListener("resize",n),function(){return window.removeEventListener("resize",n)}},[n]),t}var R=r(51937),A=r(23614),q=r(55456),F=r(6790),z=r(86639),U=r(22139),I=r(37321);r(20553);var W=(0,i.createContext)(null);W.displayName="NeuroExpertContext";W.Provider;r(66008),r(31105),r(56701);var V=r(26141),B=r(25346),H=(0,i.memo)(function(e){var t=e.mobileView,r=e.theme,n=e.onChangeTheme,o=e.textSize,i=e.onChangeTextSize,c=e.wideFormat,u=e.onChangeWideFormat,s=e.showMiniToc,d=e.onChangeShowMiniToc,h=e.lang,f=e.langs,v=e.onChangeLang,p=e.availableLangs;return(0,a.jsx)(V.n,{controlClassName:"Control",controlSize:l.Uv.L,isWideView:t,isMobileView:t,children:(0,a.jsx)(B.A,{className:"Controls",theme:r,onChangeTheme:n,wideFormat:c,onChangeWideFormat:u,showMiniToc:s,onChangeShowMiniToc:d,textSize:o,onChangeTextSize:i,lang:h,langs:f,onChangeLang:v,availableLangs:void 0===p?[]:p})})});H.displayName="HeaderControls";var J=(0,i.createContext)(null),$=J.Provider,D=r(92045),K=r(40258),G=r(89911),Q=r(78564),X=r(36847),Y=r(94650),Z=r(84941),ee=(0,A.default)("Suggest");r(15395),r(29794),r(41790);var et=(0,i.createContext)(null),er=et.Provider,en=(0,A.default)("Layout");function eo(){return null}function ea(){return null}function ei(){return null}var ec={doc:!1},eu=function(e){var t,r,n,c=(0,o._)({},ec,e),u=c.children,l=c.doc,s=c.headerHeight;return i.Children.forEach(u,function(e){switch(e.type){case eo:t=e.props.children;break;case ea:r=e.props.children;break;case ei:n=e.props.children}}),(0,a.jsxs)("div",{className:en({"full-header":(void 0===s?0:s)>0}),children:[t&&(0,a.jsx)("div",{className:en("header"),children:t}),(0,a.jsxs)("div",{className:en("body"),children:[r&&(0,a.jsx)("div",{className:en("content"),children:r}),n&&(0,a.jsx)("div",{className:en("footer",{doc:l}),children:n})]})]})};eu.displayName="Layout",eu.Header=eo,eu.Content=ea,eu.Footer=ei;(0,A.default)("pc-page-constructor"),(0,A.default)("pc-constructor-row");r(58498),r(89457),r(13700),r(29714),r(81397),r(59071);r(34236);var el=r(41374),es=r(30494),ed=r(99407),eh=r(53750),ef=r(51735),ev=function(){function e(t){var n=this,a=this;(0,es._)(this,e),(0,E._)(this,"worker",void 0),(0,E._)(this,"config",void 0),(0,E._)(this,"init",function(){var e;e=(0,q._)((0,o._)({},n.config),{base:n.base,mark:"Suggest__Item__Marker"}),n.worker=(0,el._)(function(){var t;return(0,ef._)(this,function(n){switch(n.label){case 0:return[4,(0,el._)(function(){var e,t,n;return(0,ef._)(this,function(o){try{return[2,new Worker(new URL(r.p+r.u("976"),r.b))]}catch(r){if((0,eh._)(r,DOMException)&&(e=ep.exec(r.message)))return t=e[1],n=new Blob(["importScripts('".concat(t,"');")],{type:"text/javascript"}),[2,new Worker(URL.createObjectURL(n))];throw r}})})()];case 1:return[4,eg(t=n.sent(),(0,q._)((0,o._)({},e),{type:"init"}))];case 2:return n.sent(),[2,t]}})})()}),(0,E._)(this,"link",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=new URLSearchParams;r&&o.set("query",r),n>1&&o.set("page",n.toString());var a=o.toString()?"?".concat(o.toString()):"";return"".concat(e,"/").concat(t.link).concat(a)}(a.base,a.config,e,t)}),this.config=t}return(0,ed._)(e,[{key:"suggest",value:function(e){return(0,el._)(function(){return(0,ef._)(this,function(t){return[2,this.request({type:"suggest",query:e})]})}).call(this)}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return(0,el._)(function(){return(0,ef._)(this,function(n){return[2,this.request({type:"search",query:e,page:t,count:r})]})}).call(this)}},{key:"base",get:function(){return window.location.href.split("/").slice(0,-this.config.depth).join("/")}},{key:"request",value:function(e){return(0,el._)(function(){return(0,ef._)(this,function(t){switch(t.label){case 0:return[4,this.worker];case 1:return[2,eg.apply(void 0,[t.sent(),e])]}})}).call(this)}}]),e}(),ep=/Script at '(.*?)' cannot be accessed from origin/;function eg(e,t){var r=new MessageChannel;return new Promise(function(n,o){r.port1.onmessage=function(e){e.data.error?o(e.data.error):n(e.data.result)},r.port1.onmessageerror=function(e){o(e.data.error)},e.postMessage(t,[r.port2])})}function em(){var e=(0,i.useContext)(p),t=(0,i.useContext)(h).depth,r=void 0===t?0:t,n=(0,i.useContext)(eb),a=(0,O._)((0,i.useState)(null),2),c=a[0],u=a[1],l=(0,i.useMemo)(function(){return n?(0,q._)((0,o._)({},n),{depth:r,lang:e}):null},[e,r,n]);return(0,i.useEffect)(function(){l&&u(l?new ev(l):null)},[l]),c}var ey=(0,A.default)("Search");function ew(e,t){var r=new URLSearchParams;e&&r.set("query",e),t>1&&r.set("page",String(t)),window.history.pushState({},"","?".concat(r.toString()))}var e_=function(){var e=em(),t=v(),r=(0,O._)((0,i.useState)(""),2),n=r[0],o=r[1],c=(0,O._)((0,i.useState)(1),2),u=c[0],l=c[1],s=(0,O._)((0,i.useState)([]),2),d=s[0],h=s[1],f=(0,O._)((0,i.useState)(0),2),p=f[0],g=f[1],m=(0,O._)((0,i.useState)(!1),2),y=m[0],w=m[1],_=(0,i.useRef)(null);(0,i.useEffect)(function(){var t;_.current=e,null==e||null==(t=e.init)||t.call(e)},[e]),(0,i.useEffect)(function(){var e,t={query:(e=new URLSearchParams(window.location.search)).get("query")||"",page:Number(e.get("page"))||1},r=t.query,n=t.page;o(r),l(n)},[t]),(0,i.useEffect)(function(){n&&_.current?(w(!0),_.current.search(n,u,10).then(function(e){var t,r=e.items,n=e.total;h(Array.isArray(t=null!=r?r:[])?t.map(function(e){var t,r,n;return{title:(null==e?void 0:e.title)||(null==e||null==(t=e.hierarchy)?void 0:t.lvl0)||(null==e||null==(r=e.hierarchy)?void 0:r.lvl1)||"",url:(null==e?void 0:e.url)||(null==e?void 0:e.link)||"#",description:(null==e?void 0:e.description)||(null==e?void 0:e.content)||(null==e?void 0:e.text)||"",section:(null==e?void 0:e.section)||(null==e||null==(n=e.hierarchy)?void 0:n.lvl1)||""}}):[]),g(n)}).catch(function(){h([]),g(0)}).finally(function(){return w(!1)})):(h([]),g(0))},[n,u,e]);var b=(0,i.useCallback)(function(e){ew(n,e),l(e)},[n]),S=(0,i.useCallback)(function(e){ew(e,1),o(e),l(1)},[]);return(0,a.jsx)("div",{className:ey(),children:(0,a.jsx)(R.A,{query:n,items:d,page:u,totalItems:p,onPageChange:b,onSubmit:S,loading:y})})},eb=(0,i.createContext)(null);eb.displayName="SearchContext";var eS=eb.Provider,ex=document.getElementById("root");if(!ex)throw Error("Root element not found!");var eC=window.__DATA__,ek=eC||{};ek.depth=ek.depth||3;var ej=new URL(window.location.href);(0,c.createRoot)(ex).render((0,a.jsx)(function(e){var t=e.data,r=e.url,n=t.search,o=(null==n?void 0:n.lang)||l.JA.En,c=T(),h=N(),v=s.Lq.includes(o)?o:l.JA.En,p=k(v);(0,d.jK)({lang:v,localeCode:v});var m={pathname:r.pathname,depth:3},y=c.theme,w=c.wideFormat;return(0,i.useEffect)(function(){C({mobileView:h,wideFormat:w}),x({theme:y})},[y,h,w]),(0,a.jsx)(u.N,{theme:y,direction:p,children:(0,a.jsx)(g,{value:v,children:(0,a.jsx)(f,{value:m,children:(0,a.jsx)(eS,{value:n,children:(0,a.jsx)(e_,{})})})})})},(0,o._)({},{data:eC,url:ej})))},98010(e,t,r){"use strict";function n(){}r.d(t,{A:()=>n})},14892(){},4320(){},80657(){},91190(){},7155(){},54318(){}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=n,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);a.r(r);var n={};i=i||[null,c({}),c([]),c(c)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~i.indexOf(o);o=c(o))Object.getOwnPropertyNames(o).forEach(t=>{n[t]=()=>e[t]});return n.default=()=>e,a.d(r,n),r},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.u=e=>""+e+"-40cbc1d2518eb8ea.js",a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),u=[],a.O=(e,t,r,n)=>{if(t){n=n||0;for(var o=u.length;o>0&&u[o-1][2]>n;o--)u[o]=u[o-1];u[o]=[t,r,n];return}for(var i=1/0,o=0;o<u.length;o++){for(var[t,r,n]=u[o],c=!0,l=0;l<t.length;l++)(!1&n||i>=n)&&Object.keys(a.O).every(e=>a.O[e](t[l]))?t.splice(l--,1):(c=!1,n<i&&(i=n));if(c){u.splice(o--,1);var s=r();void 0!==s&&(e=s)}}return e},a.rv=()=>"1.7.4",a.j="328",a.g.importScripts&&(l=a.g.location+"");var i,c,u,l,s=a.g.document;if(!l&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(l=s.currentScript.src),!l)){var d=s.getElementsByTagName("script");if(d.length)for(var h=d.length-1;h>-1&&(!l||!/^http(s?):/.test(l));)l=d[h--].src}if(!l)throw Error("Automatic publicPath is not supported in this browser");a.p=l=l.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.b=document.baseURI||self.location.href,e={328:0},a.O.j=t=>0===e[t],t=(t,r)=>{var n,o,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(n in c)a.o(c,n)&&(a.m[n]=c[n]);if(u)var s=u(a)}for(t&&t(r);l<i.length;l++)o=i[l],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(s)},(r=self.webpackChunk_diplodoc_client=self.webpackChunk_diplodoc_client||[]).forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r)),a.ruid="bundler=rspack@1.7.4";var f=a.O(void 0,["85","474"],()=>a(55349));f=a.O(f)})();
2
+ //# sourceMappingURL=search-136c6c533ebeaf71.js.map