PageSourceSearch

https://pixelpoint.io/80efaec8-b6e7ed9d664734e439d1.js

js pixelpoint.io collected 2026-10-03 22:10:46 UTC 64,949 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkpixelpoint_website=self.webpackChunkpixelpoint_website||[]).push([[2741],{4754:function(e,t,n){n.d(t,{Cy:function(){return kt},hk:function(){return Rt}});var r=n(6540),o=n(961);function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}const s=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),a=(e,t)=>e.match(new RegExp(`.{${t}}`,"g")),l=e=>parseInt(e.repeat(2/e.length),16);function c(e,t){return void 0!==e?e/255:"number"!=typeof t||t<0||t>1?1:t}function u(e,t){if(!e)return e;const{r:n,g:r,b:o,a:i}=function(e){if(!e)return;if(!s(e))throw new Error("Invalid color string, must be a valid hex color");const t=Math.floor((e.length-1)/3),n=a(e.slice(1),t),[r,o,i,u]=n.map(l);return{r:r,g:o,b:i,a:c(u,1)}}(e);return function(e){if(!e)return;const{r:t,g:n,b:r,a:o}=e,i=Math.round(255*o);return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}`}({r:n,g:r,b:o,a:i*t})}function h(e,t){return{prev:t(e.prev,"prev"),next:t(e.next,"next")}}function f(e,t){return{prev:void 0===(null==e?void 0:e.prev)?t:e.prev,next:void 0===(null==e?void 0:e.next)?t:e.next}}function d(e,t,n){return h(f(e,t),n)}function m(e,t){return t(e.prev)||t(e.next)}function p(e){return e.lines.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n")}function v(e){return e.split(/,(?![^\[]*\])/g)}function g(e){return e.reduce(((e,t)=>Object.assign(e,t)),{})}function b(e){const t=e.match(/(\d+)\[(.+)\]/);if(t){const[,e,n]=t,r=n.split(",").map(y),o=Number(e);return{[o]:r}}return g(E(e).map((e=>({[e]:!0}))))}function y(e){const[t,n]=e.split(":");if(!j(t))throw new O(t);const r=Number(t);if(r<1)throw new N;if(n){if(!j(n))throw new O(n);return{start:r,end:+n}}return{start:r,end:r}}function x(e){if(!e)throw new Error("Focus cannot be empty");try{return function(e){const t={};let n=-1,r=null==e?0:e.length;for(;++n<r;){var o=e[n];t[o[0]]=o[1]}return t}(e.split(/,(?![^\[]*\])/g).map(w).flat())}catch(t){throw t}}function w(e){const t=e.match(/(\d+)\[(.+)\]/);if(t){const[,e,n]=t,r=n.split(",").map(E);return[[Number(e)-1,r.flat().map((e=>e-1))]]}return E(e).map((e=>[e-1,!0]))}function E(e){const[t,n]=e.split(":");if(!j(t))throw new O(t);const r=Number(t);if(r<1)throw new N;if(n){if(!j(n))throw new O(n);const e=[];for(let t=r;t<=+n;t++)e.push(t);return e}return[r]}function j(e){e=e.toString();var t=Math.abs(e),n=parseInt(e,10);return!isNaN(t)&&n===t&&t.toString()===e}class N extends Error{constructor(){super("Invalid line or column number in focus string"),Object.setPrototypeOf(this,new.target.prototype)}}class O extends Error{constructor(e){super(`Invalid number "${e}" in focus string`),this.number=e,Object.setPrototypeOf(this,new.target.prototype)}}const C="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;const k=200;function _(e,t,n,o,i,s){const[a,l]=r.useState(null),[c,u]=r.useState(0),h=function(){const[e,t]=r.useState(void 0);return r.useEffect((()=>{function e(){t(window.innerWidth)}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}(),f=r.useRef(null),{prevLongestLine:d,nextLongestLine:m,element:p}=r.useMemo((()=>{const n=F(e.prev,t.prev),s=F(e.next,t.next),a=(e.prev||e.next).trimEnd().split(S),l=Math.max(a.length,10);if(i){const e="focus"===i?function(e,t){const[n,r]=function(e,t){if(e){const t=x(e),n=Object.keys(t).map((e=>parseInt(e,10)));return[Math.min(...n),Math.max(...n)]}return[0,t.length-1]}(e.prev,t);return r-n+1}(t,a):i;let r=a.length;for(;r<e;)a.push(""),r++;for(;r>e;)a.pop(),r--;n&&!a.includes(n)&&(a[a.length-1]=n)}let c=!1;const u=r.createElement("code",{className:"ch-code-scroll-parent"},r.createElement("br",null),a.map(((e,t)=>{const i=c||e!==n?void 0:f;return c=c||null!=i,r.createElement("div",{ref:i,key:t},o?r.createElement("span",{className:"ch-code-line-number"},"_",l):void 0,r.createElement("div",{style:{display:"inline-block",marginLeft:16}},r.createElement("span",null,e)))})),r.createElement("br",null));return{prevLongestLine:n,nextLongestLine:s,element:u}}),[e]),v=[...s,h,d,m,n,c];return C((()=>{var e;if(f.current){const t=f.current,r=null==t?void 0:t.parentElement,o=r.parentElement,{width:i}=o.getBoundingClientRect();if(!i&&0===c){const e=new ResizeObserver((([t])=>{const{width:n}=t.contentRect;n&&(e.disconnect(),u(1))}));return e.observe(o),()=>e.disconnect()}const s=null==t?void 0:t.querySelector(":scope > div"),a=null==t?void 0:t.querySelector(":scope > span"),h=a?function(e){const t=getComputedStyle(e);return parseFloat(t.width)}(a):0,p=P(s),g=p/d.length||1,b=m.length*g,y=null!==(e=H(s))&&void 0!==e?e:20,x={containerWidth:P(o.parentElement),containerHeight:H(o.parentElement),contentWidth:P(r.parentElement),contentHeight:H(r.parentElement),lineWidths:[p||b||k,b||p||k],lineWidth:[Math.max(p||b||k,g*n),Math.max(b||p||k,g*n)],lineHeight:y,colWidth:g,lineNumberWidth:h,deps:v};l(x)}return()=>{}}),v),!a||function(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(a.deps,v)?{element:p,dimensions:null}:{element:p,dimensions:a}}const S=/\r\n|\r|\n/;function F(e,t){const n=e?e.split(S):[""],r=function(e,t){if(e){const t=x(e);return Object.keys(t).map((e=>parseInt(e,10)))}return[...t.keys()]}(t,n);let o="";
1return n.forEach(((e,t)=>{r.includes(t)&&e.length>o.length&&(o=e)})),o}function P(e){const t=getComputedStyle(e);return parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function H(e){if(!e)return null;const t=getComputedStyle(e);return parseFloat(t.height)-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)}function M(){}function T(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var c=t[i];if(c.removed){if(c.value=e.join(r.slice(l,l+c.count)),l+=c.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!c.added&&o){var h=n.slice(a,a+c.count);h=h.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),c.value=e.join(h)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}var f=t[s-1];return s>1&&"string"==typeof f.value&&(f.added||f.removed)&&e.equals("",f.value)&&(t[s-2].value+=f.value,t.pop()),t}M.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var o=this;function i(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,l=1,c=s+a,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=s&&h+1>=a)return i([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*l;n<=l;n+=2){var r=void 0,c=u[n-1],h=u[n+1],f=(h?h.newPos:0)-n;c&&(u[n-1]=void 0);var d=c&&c.newPos+1<s,m=h&&0<=f&&f<a;if(d||m){if(!d||m&&c.newPos<h.newPos?(r={newPos:(p=h).newPos,components:p.components.slice(0)},o.pushComponent(r.components,void 0,!0)):((r=c).newPos++,o.pushComponent(r.components,!0,void 0)),f=o.extractCommon(r,t,e,n),r.newPos+1>=s&&f+1>=a)return i(T(o,r.components,t,e,o.useLongestToken));u[n]=r}else u[n]=void 0}var p;l++}if(r)!function e(){setTimeout((function(){if(l>c)return r();f()||e()}),0)}();else for(;l<=c;){var d=f();if(d)return d}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,s=e.newPos,a=s-r,l=0;s+1<o&&a+1<i&&this.equals(t[s+1],n[a+1]);)s++,a++,l++;return l&&e.components.push({count:l}),e.newPos=s,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var z=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,A=/\S/,L=new M;L.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!A.test(e)&&!A.test(t)},L.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&z.test(t[n])&&z.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var B=new M;function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}B.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t},(new M).tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},(new M).tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var I=Object.prototype.toString,$=new M;function R(e,t,n,r,o){var i,s;for(t=t||[],n=n||[],r&&(e=r(o,e)),i=0;i<t.length;i+=1)if(t[i]===e)return n[i];if("[object Array]"===I.call(e)){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=R(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),"object"===W(e)&&null!==e){t.push(e),s={},n.push(s);var a,l=[];for(a in e)e.hasOwnProperty(a)&&l.push(a);for(l.sort(),i=0;i<l.length;i+=1)s[a=l[i]]=R(e[a],t,n,r,a);t.pop(),n.pop()}else s=e;return s}$.useLongestToken=!0,$.tokenize=B.tokenize,$.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(R(e,null,null,o),o,"  ")},$.equals=function(e,t){return M.prototype.equals.call($,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var q=new M;function X(e,t){let n=0,r=0;const o=function(e){const t=(n=e.prev,r=e.next,B.diff(n,r,o));var n,r,o;let i=[],s=0,a=0;return t.forEach((e=>{if(e.added)for(let t=0;t<e.count;t++)i.push({next:a++});else if(e.removed)for(let t=0;t<e.count;t++)i.push({prev:s++});else for(let t=0;t<e.count;t++)i.push({prev:s++,next:a++})})),i}(e);return{lines:o.map((e=>void 0===e.next?Object.assign(Object.assign({},t.prev[e.prev]),{lineNumber:{prev:e.prev+1},move:"exit",enterIndex:null,exitIndex:r++}
1):void 0===e.prev?Object.assign(Object.assign({},t.next[e.next]),{lineNumber:{next:e.next+1},move:"enter",enterIndex:n++,exitIndex:null}):Object.assign(Object.assign({},t.prev[e.prev]),{lineNumber:{prev:e.prev+1,next:e.next+1},move:"stay",enterIndex:null,exitIndex:null}))),enterCount:n,exitCount:r}}function U(e,t,n){const{lines:r}=e,o=i(e,["lines"]),s=h(t,((e,t)=>function(e,t){return g(e?v(e).map(b):[...t.keys()].map((e=>({[e+1]:!0}))))}(e,"prev"===t?r.filter((e=>"enter"!==e.move)):r.filter((e=>"exit"!==e.move))))),a=r.map((e=>{const{tokens:t}=e,r=i(e,["tokens"]),o={prev:!!e.lineNumber.prev&&s.prev[e.lineNumber.prev],next:!!e.lineNumber.next&&s.next[e.lineNumber.next]},a={prev:e.lineNumber.prev&&n.prev[e.lineNumber.prev]||[],next:e.lineNumber.next&&n.next[e.lineNumber.next]||[]};return Object.assign({focused:h(o,(e=>!!e)),groups:Z(t,o,a)},r)})),l=h(s,(e=>Object.keys(e).map((e=>Number(e))))),c=h(l,(e=>Math.min(...e))),u=h(l,(e=>Math.max(...e)));return Object.assign({lines:a,firstFocusedLineNumber:c,lastFocusedLineNumber:u},o)}function Z(e,t,n){const r=h(t,(e=>Array.isArray(e)?e:[])),o=h(n,(e=>e.map((({columnNumbers:e})=>e)))),i=function(e,t){const n=[...t.map((e=>e.start-1)),...t.map((e=>e.end))];let r=e;return n.forEach((e=>{const t=[];let n=0;r.forEach((r=>{const o=n,i=n+r.content.length;if(o<e&&e<i){const n=e-o,i=r.content.slice(0,n),s=r.content.slice(n);t.push(Object.assign(Object.assign({},r),{content:i})),t.push(Object.assign(Object.assign({},r),{content:s}))}else t.push(r);n=i})),r=t})),r}(e,[...r.prev,...r.next,...o.prev,...o.next]);let s=0,a=null;const l=[];return i.forEach((e=>{const r=G(s,t.prev),o=G(s,t.next),i=Y(s,n.prev),c=Y(s,n.next);a&&a.focused.prev===r&&a.focused.next===o&&a.annotation.prev===i&&a.annotation.next===c||(a={focused:{prev:r,next:o},tokens:[],annotation:{prev:i,next:c}},l.push(a)),null==a||a.tokens.push(e),s+=e.content.length})),l.map((e=>({focused:e.focused,tokens:e.tokens,element:K(e)})))}function K(e){return r.createElement(r.Fragment,null,e.tokens.map((({content:e,props:t},n)=>r.createElement("span",Object.assign({},t,{key:n+1}),e))))}function G(e,t){return Array.isArray(t)?t.some((({start:t,end:n})=>t-1<=e&&e<n)):t}function Y(e,t){return t.find((({columnNumbers:t})=>t.start-1<=e&&e<t.end))}function V(e,t){if(!0===e.fixed)return e.value;{const[n,r]=e.interval,[o,i]=e.extremes;if(t<n)return o;if(t>r)return i;const s=(t-n)/(r-n);return o+(e.ease||J.linear)(s)*(i-o)}}function D([e,t],n,r){if(r<=1)return[e,t];const o=t-e,i=o/Math.pow(r,1/8),s=e+(o-i)/(r-1)*n;return[s,s+i]}q.tokenize=function(e){return e.slice()},q.join=q.removeEmpty=function(e){return e};const J={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}};function Q(e,t,n,r){const[o,i]=t;return e.map((e=>{const t=h(e.lineNumber,(e=>e&&e-1)),{enterIndex:s,exitIndex:a}=e,l="exit"===e.move?{fixed:!0,value:t.prev}:"enter"===e.move?{fixed:!0,value:t.next}:{fixed:!1,extremes:[t.prev,t.next],interval:[o,i],ease:J.easeInOutCubic},c="exit"===e.move?{fixed:!1,extremes:[0,-1],ease:J.easeInQuad,interval:D([0,o],a,r)}:"enter"===e.move?{fixed:!1,extremes:[1,0],ease:J.easeOutQuad,interval:D([i,1],s,n)}:{fixed:!0,value:0};return Object.assign(Object.assign({},e),{tweenX:c,tweenY:l})}))}function ee(e){const t=d(e,[],(e=>e.flatMap((e=>v(e.focus).map((t=>Object.assign(Object.assign({},e),{focus:t}))))))),n=d(t,[],(e=>e.filter(te))),r=d(t,[],(e=>e.filter((e=>!te(e)))));return{inlineAnnotations:h(n,(e=>function(e){const t={};return e.forEach((e=>{const n=b(e.focus),r=+Object.keys(n)[0],o=n[r],i=t[r]||[];i.push({columnNumbers:o[0],data:e.data,Component:e.Component}),t[r]=i})),t}(e))),multilineAnnotations:h(r,(e=>function(e){return e.map((e=>({lineNumbers:y(e.focus),data:e.data,Component:e.Component})))}(e)))}}function te(e){return!!e.focus.match(/(\d+)\[(.+)\]/)}function ne(e,t,n){const r=[...t];r.sort(((e,t)=>e.lineNumbers.start-t.lineNumbers.start));let o=0;const i=[];for(;o<e.length;){const t=r[0];let s=e[o];if(t&&n(s)>
1t.lineNumbers.start)throw"Code Hike can't handle two annotations for the same line";if(t&&n(s)===t.lineNumbers.start){const a={lines:[],annotation:t};for(;s&&(!n(s)||n(s)<=t.lineNumbers.end);)a.lines.push(s),s=e[++o];i.push(a),r.shift()}else if(t){const r={lines:[]};for(;s&&(!n(s)||n(s)<t.lineNumbers.start);)r.lines.push(s),s=e[++o];i.push(r)}else i.push({lines:e.slice(o)}),o=e.length}return i}function re(e,t){let n=[...e],r=[...e];const o=[...t.prev],i=[...t.next],s=[];let a=1,l=1;for(;n.length>0||r.length>0;){const e=o[0],t=i[0],c=e&&e.columnNumbers.start===a,u=t&&t.columnNumbers.start===l;if(a<l)if(c){const t=e.columnNumbers.end+1;s.push({prev:{annotation:e,groups:oe(n,a,t)}}),a=t,o.shift()}else{const t=Math.min(l,(null==e?void 0:e.columnNumbers.start)||l);s.push({prev:{groups:oe(n,a,t)}}),a=t}else if(a>l)if(u){const e=t.columnNumbers.end+1;s.push({next:{annotation:t,groups:oe(r,l,e)}}),l=e,i.shift()}else{const e=Math.min(a,(null==t?void 0:t.columnNumbers.start)||a);s.push({next:{groups:oe(r,l,e)}}),l=e}else if(a==l)if(c&&u&&e.columnNumbers.end===t.columnNumbers.end){const c=t.columnNumbers.end+1;s.push({prev:{annotation:e,groups:oe(n,a,c)},next:{annotation:t,groups:oe(r,l,c)}}),a=c,l=c,o.shift(),i.shift()}else if(c){const t=e.columnNumbers.end+1;s.push({prev:{annotation:e,groups:oe(n,a,t)}}),a=t,o.shift()}else if(u){const e=t.columnNumbers.end+1;s.push({next:{annotation:t,groups:oe(r,l,e)}}),l=e,i.shift()}else if(e||t){const o=Math.min((null==e?void 0:e.columnNumbers.start)||Number.MAX_VALUE,(null==t?void 0:t.columnNumbers.start)||Number.MAX_VALUE);s.push({prev:{groups:oe(n,a,o)},next:{groups:oe(r,l,o)}}),a=o,l=o}else s.push({prev:{groups:n},next:{groups:r}}),n=[],r=[]}return s}function oe(e,t,n){const r=[];let o=t;for(;o<n&&e.length>0;){const t=e.shift();r.push(t);o+=t.tokens.reduce(((e,t)=>e+t.content.length),0)}return r}function ie(e){const{highlightedLines:t,focus:n}=e;return r.useMemo((()=>function({focus:e,annotations:t,highlightedLines:n,lang:r}){const o=function(e){return h(e,(e=>e.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n").trimEnd().concat("\n")))}(n),s=function(e,t){return X(e,t)}(o,n),{inlineAnnotations:a,multilineAnnotations:l}=function(e){return ee(e)}(t),c=function(e,t,n){return U(e,t,n)}(s,f(e,null),a),u=function(e,t,n){var{lines:r}=e,o=i(e,["lines"]);const s=function(e,t){return e.map((e=>{var{groups:n}=e,r=i(e,["groups"]);const{lineNumber:o}=r,s={prev:o.prev&&t.prev[o.prev]||[],next:o.next&&t.next[o.next]||[]};return Object.assign(Object.assign({},r),{annotatedGroups:re(n,s)})}))}(r,t),a=function(e,t){return{prev:ne(e,t.prev,(e=>e.lineNumber.prev)),next:ne(e,t.next,(e=>e.lineNumber.next))}}(s,n);return Object.assign(Object.assign({},o),{lineGroups:a,lineCount:{prev:r.filter((e=>null!=e.lineNumber.prev)).length,next:r.filter((e=>null!=e.lineNumber.next)).length}})}(c,a,l);return function(e,t,n){const r=(i=e.enterCount,s=e.exitCount,i<=0&&s<=0?[0,1]:i<=0&&s>=1?[.33,1]:i>=1&&s<=0?[0,.67]:[.25,.75]),o=h(e.lineGroups,(t=>t.map((t=>Object.assign(Object.assign({},t),{lines:Q(t.lines,r,e.enterCount,e.exitCount)})))));var i,s;return Object.assign(Object.assign({},e),{groups:o,verticalInterval:r,code:t,lang:n})}(u,o,r)}(e)),[t.prev,t.next,n.prev,n.next])}function se({dimensions:e,codeStep:t,children:n,minZoom:o=0,maxZoom:s=1.2,center:a=!1,progress:l}){const{prev:c,next:u}=function(e){var{codeStep:t}=e,n=i(e,["codeStep"]);const{lineHeight:r,lineWidth:o}=n.dimensions,s={prev:{extremes:[t.firstFocusedLineNumber.prev-1,t.lastFocusedLineNumber.prev-1],originalContentHeight:t.lineCount.prev*r,lineWidth:o[0]},next:{extremes:[t.firstFocusedLineNumber.next-1,t.lastFocusedLineNumber.next-1],originalContentHeight:t.lineCount.next*r,lineWidth:o[1]}};return h(s,(({extremes:e,originalContentHeight:t,lineWidth:r})=>function({dimensions:e,lineWidth:t,minZoom:n,maxZoom:r,extremes:o,originalContentHeight:i,horizontalCenter:s}){const{lineHeight:a}=e,l=null==e?void 0:e.contentHeight,c=null==e?void 0:e.contentWidth,u=(o[1]-o[0]+3)*a,h=(null==e?void 0:e.lineNumberWidth)||16,f=16,d=Math.max(Math.min((c-h-f)/t,l/u,r),n),m=i*d,p=(o[0]-1)*a*d,v=(o[1]+2)*a*d,g=(v+p)/2,b=v-p,y=l>m?(l-m)/2:(w=l/2-g,E=Math.max(l-m,-p),j=0,w<=E?E:w>=j?j:w),x=s?Math.max(c/2-t*d/2,0):0;var w,E,j;return{zoom:d,dx:x,dy:y,focusHeight:b,focusWidth:t*d}}(Object.assign({extremes:e,originalContentHeight:t,lineWidth:r},n))))}({codeStep:t,dimensions:e,minZoom:o,maxZoom:s,horizontalCenter:a}),f=ce(c.zoom,u.zoom,l),d=ce(c.dx,u.dx,l),m=ce(c.dy,u.dy,l,t.verticalInterval),p=ce(c.focusHeight,u.focusHeight,l),v=ce(c.focusWidth,u.focusWidth,l),g=((null==e?void 0:e.lineNumberWidth)||0)*f||16,b=Math.max(v+g,e.contentWidth),y=g/f;return r.createElement(ae,{width:e.containerWidth,height:e.containerHeight,lang:t.lang},r.createElement(le,{dx:d,dy:m,scale:f,height:Math.max(p,e.contentHeight),width:b},n(v,y)))}function ae({width:e,height:t,children:n,lang:o}){return r.createElement("code",{style:{width:e,height:t,position:"relative",overflow:"auto"},className:"ch-code-scroll-parent",children:n,"data-ch-lang":o})}function le({dx:e,dy:t,scale:n,height:o,width:i,children:s}){return r.createElement("div",{style:{position:"absolute",top:0,left:0,transformOrigin:"top left",width:i,height:o,overflow:"hidden"},className:"ch-code-scroll-content"},r.createElement("div",{style:{position:"absolute",top:0,left:0,transform:`translateX(${e}px) translateY(${t}px) scale(${n})`,transformOrigin:"left top",width:i/n,height:(o-2*t)/n},children:s}))}function ce(e,t,n,r=[0,1]){return V({fixed:!1,interval:r,extremes:[e,t],ease:J.easeInOutCubic},n)}function ue(e){return r.createElement(se,Object.assign({},e),((t,n)=>r.createElement(he,{codeStep:e.codeStep,focusWidth:t,lineHeight:e.dimensions.lineHeight,progress:e.progress,startX:n,lineNumberWidth:e.dimensions.lineNumberWidth})))}function he({codeStep:e,progress:t,focusWidth:n,lineHeight:o,startX:i,lineNumberWidth:s}){const a=t<.5?e.groups.prev:e.groups.next;return r.createElement(r.Fragment,null,a.map(((e,a)=>{if(!e.annotation)return r.createElement(fe,{lines:e.lines,t:t,focusWidth:n,lineHeight:o,startX:i,key:a,lineNumberWidth:s});const l=V(e.lines[0].tweenY,t),c=e.annotation.lineNumbers.end-e.annotation.lineNumbers.start+1,u=e.annotation.Component;return r.createElement(u,{style:{position:"absolute",height:c*o,width:"100%",transform:`translateY(${l*o}px)`},key:a,data:e.annotation.data,isInline:!1,lines:e.lines},r.createElement(fe,{lines:e.lines,t:t,focusWidth:n,lineHeight:o,startY:l,startX:i,lineNumberWidth:s}))})))}function fe({lines:e,focusWidth:t,lineHeight:n,t:o,startX:i,startY:s=0,lineNumberWidth:a}){return r.createElement(r.Fragment,null,e.map(((e,l)=>{const{tweenX:c,tweenY:u,focused:h}=e,f=V(c,o),d=V(u,o),m=ge(h,o,f);return r.createElement(r.Fragment,{key:l},a?r.createElement("span",{className:"ch-code-line-number",style:{position:"absolute",top:0,left:0,transform:`translate(${f*t}px, ${(d-s)*n}px)`,width:a,opacity:m}},o<.5?e.lineNumber.prev:e.lineNumber.next):void 0,r.createElement(pe,{dx:i+f*t,dy:(d-s)*n,width:t,opacity:m},r.createElement(de,{line:e,progress:o,dx:f})))})))}function de({line:e,progress:t,dx:n}){return r.createElement("div",{style:{display:"inline-block",width:"100%"}},e.annotatedGroups.map(((e,o)=>r.createElement(me,{annotatedGroup:e,progress:t,dx:n,key:o}))),r.createElement("br",null))}function me({annotatedGroup:e,progress:t,dx:n}){var o,i;const s=t<.5?e.prev:e.next,a=(null==s?void 0:s.groups)||[],l=null===(o=null==s?void 0:s.annotation)||void 0===o?void 0:o.Component,c=a.map(((e,o)=>{const i=ge(e.focused,t,n);return r.createElement("span",{style:{opacity:i},key:o+1},e.element)}));return l?r.createElement(l,{children:c,data:null===(i=null==s?void 0:s.annotation)||void 0===i?void 0:i.data,isInline:!0}):r.createElement(r.Fragment,null,c)}function pe({children:e,dx:t,dy:n,opacity:o,width:i}){return r.createElement("div",{style:{position:"absolute",top:0,left:0,transform:`translate(${t}px, ${n}px)`,width:i,display:o<=0?"none":void 0}},e)}const ve=.33;function ge(e,t,n){return V({fixed:!1,extremes:[e.prev?.99:ve,e.next?.99:ve],interval:[
10,1]},t)-1*Math.abs(n)}function be({content:e,style:t,className:n}){const[o,i]=r.useState(!1);return r.createElement("button",{type:"button",title:"Copy code",className:n,style:t,onClick:()=>{!function(e){if(!navigator.clipboard)return void function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(n){}document.body.removeChild(t)}(e);navigator.clipboard.writeText(e)}(e),i(!0),setTimeout((()=>{i(!1)}),1200)}},r.createElement("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o?r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}):r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6px",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})))}const ye=10;function xe(e){var{tween:t,progress:n,config:o}=e,s=i(e,["tween","progress","config"]);const a=function({tween:e}){return ie({highlightedLines:h(e,(e=>e.code.lines)),focus:h(e,(e=>e.focus)),annotations:h(e,(e=>e.annotations)),lang:m(e,(e=>{var t;return null===(t=null==e?void 0:e.code)||void 0===t?void 0:t.lang}))})}({tween:t}),{element:l,dimensions:c}=_(a.code,h(t,(e=>e.focus)),o.minColumns||ye,o.lineNumbers||!1,o.rows,[o.parentHeight]);return!c||o.debug?r.createElement(we,{element:l,htmlProps:s,debug:o.debug}):r.createElement(Ee,{dimensions:c,stepInfo:a,config:o,progress:n,htmlProps:s})}function we({element:e,htmlProps:t,debug:n}){return r.createElement(je,{htmlProps:t,measured:!1},e)}function Ee({config:{minZoom:e=1,maxZoom:t=1,horizontalCenter:n=!1},dimensions:o,stepInfo:i,progress:s,htmlProps:a,config:l}){var c;return r.createElement(je,{htmlProps:a,measured:!0},r.createElement(ue,{codeStep:i,progress:s,dimensions:o,minZoom:e,maxZoom:t,center:n}),l.showCopyButton?r.createElement(be,{className:"ch-code-button",content:null===(c=null==i?void 0:i.code)||void 0===c?void 0:c.prev}):void 0)}function je({htmlProps:e,children:t,measured:n}){return r.createElement("div",Object.assign({},e,{className:`ch-code-wrapper ${(null==e?void 0:e.className)||""}`,"data-ch-measured":n,children:t}))}function Ne(){return"undefined"!=typeof window?performance.now():0}function Oe(e,t){var n=t.stiffness,r=t.damping,o=t.mass,i=t.decimals,s=t.teleport;return{X:e,k:null!=n?n:170,c:null!=r?r:26,m:null!=o?o:1,teleport:null!=s&&s,decimals:null!=i?i:2}}function Ce(e,t){var n=t.from,r=t.initialSpeed;return{x0:null!=n?n:e,v0:null!=r?r:0,t0:Ne(),raf:null}}var ke=Math.sqrt,_e=Math.exp,Se=Math.sin,Fe=Math.cos;function Pe(e){var t=e.x0,n=e.v0,r=e.t0,o=e.t,i=e.k,s=e.c,a=e.m,l=e.X,c=t-l,u=(o-r)/1e3,h=s*s-4*i*a;if(h>0){var f=(-s+ke(h))/(2*a),d=(-s-ke(h))/(2*a),m=(c*f-n)/(f-d),p=(n-c*d)/(f-d);return{x:l+m*_e(d*u)+p*_e(f*u),v:m*d*_e(d*u)+p*f*_e(f*u)}}if(h<0){var v=-s/(2*a),g=ke(-h)/(2*a),b=c,y=(n-v*c)/g;return{x:l+_e(v*u)*(b*Fe(g*u)+y*Se(g*u)),v:_e(v*u)*((y*g+b*v)*Fe(g*u)-(b*g-y*v)*Se(g*u))}}var x=-s/(2*a),w=c,E=n-x*c;return{x:l+(w+E*u)*_e(x*u),v:(E+w*x+E*x*u)*_e(x*u)}}var He=[],Me=null;function Te(e){var t=He.push(e);return 1===t&&(Me=requestAnimationFrame(Ae)),[Me,t-1]}function ze(e){var t=e[0],n=e[1];t===Me&&delete He[n]}function Ae(){var e=Ne(),t=He;He=[],(0,o.unstable_batchedUpdates)((function(){return t.forEach((function(t){return t&&t(e)}))}))}var Le="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function Be(e,t){void 0===t&&(t={});var n=r.useState()[1],o=Oe(e,t),i=function(e,t){var n=r.useRef(null);return null==n.current&&(n.current={config:Oe(e,t),state:Ce(e,t)}),n.current}(e,t),s=i.state,a=i.config,l=Ne(),c=s.x0,u=s.v0,h=s.t0,f=a.k,d=a.c,m=a.m,p=a.X,v=o.teleport?{x:p,v:0}:Pe({x0:c,v0:u,t0:h,t:l,k:f,c:d,m:m,X:p}),g=v.x,b=v.v,y=function(e,t,n,r){var o=r.decimals,i=r.X,s=r.k,a=r.c,l=r.m;if(We(e,o)!==We(i,o))return!0;var c=n+.016,u=Pe({x0:e,v0:t,t0:n,t:c,k:s,c:a,m:l,X:i});return We(u.x,o)!==We(i,o)}(g,b,l,o);return Le((function(){Object.assign(a,o)}
1),[o.X,o.k,o.c,o.m,o.teleport]),Le((function(){s.x0=g,s.v0=b,s.t0=l}),[g,b,l]),Le((function(){y&&null==s.raf?s.raf=Te((function e(t){var r=s.x0,o=s.v0,i=s.t0,l=a.k,c=a.c,u=a.m,h=a.X,f=a.decimals;We(Pe({x0:r,v0:o,t0:i,t:t,k:l,c:c,m:u,X:h}).x,f)!==We(r,f)?(s.raf=null,n(t)):s.raf=Te(e)})):y||null==s.raf||(ze(s.raf),s.raf=null)})),Le((function(){return function(){null!=s.raf&&ze(s.raf)}}),[]),[We(g,o.decimals),y]}function We(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}const Ie={stiffness:120,damping:24,mass:.2,decimals:3};function $e(e){var{step:t,config:n}=e,o=i(e,["step","config"]);const{tween:s,t:a}=function(e,t=Ie){const[{target:n,steps:o,index:i},s]=r.useState({target:2,steps:[e,e,e],index:0});r.useEffect((()=>{o[o.length-1]!=e&&s((t=>function(e,t,n){const{steps:r,target:o,index:i}=e,s=r.slice(),a=n-i;return a<1?(s[2]=t,Object.assign(Object.assign({},e),{steps:s})):(s[0]=r[1],s[1]=r[2],s[2]=t,Object.assign(Object.assign({},e),{steps:s,target:o+1,index:i+1}))}(t,e,a)))}),[e]);const[a]=Be(n,t),l=a-i;return l<=1?{tween:{prev:o[0],next:o[1]},t:l}:{tween:{prev:o[1],next:o[2]},t:l-1}}(t,n.spring);return r.createElement(xe,Object.assign({tween:s,progress:a,config:n},o))}const Re=r.forwardRef((function(e,t){var{title:n,children:o,titleBar:s,zoom:a=1,overflow:l}=e,c=i(e,["title","children","titleBar","zoom","overflow"]);const u=s||r.createElement(qe,{title:n}),h={"--ch-frame-zoom":a,overflow:l};return r.createElement("div",Object.assign({},c,{ref:t}),r.createElement("div",{className:"ch-frame"},r.createElement("div",{className:"ch-frame-title-bar"},u),r.createElement("div",{className:"ch-frame-content"},r.createElement("div",{className:"ch-frame-zoom",style:h},o))))}));function qe({title:e}){return r.createElement(r.Fragment,null,r.createElement("div",{className:"ch-frame-left-bar"},r.createElement(Xe,null)),r.createElement("div",{className:"ch-frame-middle-bar"},e),r.createElement("div",{className:"ch-frame-right-bar"}))}function Xe(){return r.createElement("div",{className:"ch-frame-buttons"},r.createElement("div",{className:"ch-frame-button ch-frame-button-left"}),r.createElement("div",{className:"ch-frame-button-space"}),r.createElement("div",{className:"ch-frame-button ch-frame-button-middle"}),r.createElement("div",{className:"ch-frame-button-space"}),r.createElement("div",{className:"ch-frame-button ch-frame-button-right"}))}r.forwardRef((function(e,t){var{title:n,children:o,titleBar:s,overflow:a}=e,l=i(e,["title","children","titleBar","overflow"]);const c=s||r.createElement(qe,{title:n});return r.createElement("div",Object.assign({},l,{ref:t}),r.createElement("div",{className:"ch-simple-frame"},r.createElement("div",{className:"ch-frame-title-bar"},c),o))}));const Ue=r.forwardRef((function(e,t){var n,{northPanel:o,southPanel:s,terminalPanel:a,style:l,height:c,northButton:u,southButton:h,className:f,onTabClick:d}=e,m=i(e,["northPanel","southPanel","terminalPanel","style","height","northButton","southButton","className","onTabClick"]);return r.createElement("div",Object.assign({ref:t},m,{className:"ch-editor-frame",style:l}),r.createElement("div",{className:"ch-frame-title-bar"},r.createElement(Ze,{tabs:o.tabs,showFrameButtons:!0,button:u,panel:"north",onTabClick:d})),r.createElement("div",{"data-ch-panel":"north",style:o.style,children:o.children}),s&&r.createElement(r.Fragment,null,r.createElement("div",{className:"ch-frame-title-bar",style:{transform:null===(n=s.style)||void 0===n?void 0:n.transform}},r.createElement(Ze,{tabs:s.tabs,showFrameButtons:!1,button:h,topBorder:!0,panel:"south",onTabClick:d})),r.createElement("div",{"data-ch-panel":"south",children:s.children,style:s.style})))}));function Ze({tabs:e,button:t,showFrameButtons:n,topBorder:o,panel:i,onTabClick:s}){return r.createElement(r.Fragment,null,o&&r.createElement("div",{className:"ch-editor-group-border"}),n?r.createElement(Xe,null):r.createElement("div",null),e.map((({title:e,active:t,style:n})=>r.createElement("div",{key:e,title:e,"data-ch-tab":i,"data-active":t,className:"ch-editor-tab",style:n,onClick:s&&(()=>s(e))},r.createElement(Ke,{title:e})))),r.createElement("div",{style:{flex:1,minWidth:"0.8em"}}),t)}function Ke({title:e}){if(!e)return r.createElement("div",null);const t=e.lastIndexOf("/")+1,n=e.substring(t),o=e.substring(0,t);return r.createElement("div",null,r.createElement("span",{style:{opacity:.5}},o),n)}const Ge=r.createElement("span",{className:"ch-terminal-prompt"},"$");function Ye({text:e,progress:t=1,style:n}){const o=function(e,t){if(!e)return[];const n=Math.round(e.length*t),{commands:r}=function(e){const[,...t]=e.split(/^\$\s*/gm),n=t.map((e=>{const[t,...n]=e.split(/\r?\n/);return{run:t,output:n.length>0?n.join("\n"):null}})),r=n[n.length-1],o=n.length>0&&null!=r.output;return{title:o?r.run.split(/(\s+)/)[0]:"bash",isRunning:o,commands:n}}(e.slice(0,n));return r}(e,t);return r.createElement("pre",{style:n,className:"ch-terminal-content"},o.map((({run:e,output:t},n)=>r.createElement(r.Fragment,{key:n},r.createElement("div",null,Ge," ",r.createElement("span",null,e)),t&&r.createElement("div",{className:"ch-terminal-output"},t)))))}function Ve({prev:e="",prevKey:t,next:n="",nextKey:o,progress:i}){return r.createElement("div",{className:"ch-terminal"},r.createElement("div",{style:{position:"relative",transform:`translateY(-${100*i}%)`}},r.createElement(Ye,{text:e,progress:1,key:t}),r.createElement(Ye,{style:{position:"absolute"},text:n,progress:i,key:o})))}function De({steps:e,progress:t}){const n=e.map((e=>e.text)),o=t%1,i=(s=Math.floor(t),a=0,l=e.length-1,Math.min(Math.max(s,a),l));var s,a,l;const c=i+1;return r.createElement(Ve,{prev:n[i],prevKey:i,next:n[c]||"",nextKey:c,progress:o})}function Je({prev:e,next:t,t:n,backward:o}){const i=function({prev:e,next:t,t:n,backward:r}){return e||t?!e&&t?Qe*Math.min(4*n,1):e&&!t?Qe*Math.max(1-4*n,0):Qe:0}({prev:e,next:t,t:n,backward:o});return i?r.createElement("div",{className:"ch-editor-terminal",style:{height:i}},r.createElement("div",{className:"ch-editor-terminal-tab"},r.createElement("span",null,"Terminal")),r.createElement("div",{className:"ch-editor-terminal-content"},r.createElement(De,{steps:[{text:e||""},{text:t||""}],progress:n}),")")):null}const Qe=150;function et(e){return Array.isArray(e.rows)?Object.assign(Object.assign({},e),{rows:e.rows[0]}):e}function tt(e){return Array.isArray(e.rows)?Object.assign(Object.assign({},e),{rows:e.rows[1]}):e}function nt(e,t,n,o,i,s){const{prevSnapshot:a,nextSnapshot:l}=function(e,t,n){const[{prevSnapshot:o,nextSnapshot:i},s]=r.useState({prevSnapshot:null,nextSnapshot:null});return ut((()=>{(o||i)&&s({prevSnapshot:null,nextSnapshot:null})}),[t,n]),ut((()=>
1{if(o){if(!i){const t=e.current;s((e=>Object.assign(Object.assign({},e),{nextSnapshot:Object.assign(Object.assign({},ht(t,n)),ft(t,n))})))}}else{const n=e.current;s((e=>Object.assign(Object.assign({},e),{prevSnapshot:Object.assign(Object.assign({},ht(n,t)),ft(n,t))})))}})),{prevSnapshot:o,nextSnapshot:i}}(e,t,n);if(!a)return function(e,t,n){const o=e.northPanel,i=e.southPanel,{prevNorthFile:s,prevSouthFile:a,nextNorthFile:l,nextSouthFile:c}=st(e,t,!0);return{northContent:it(s),northPanel:{tabs:o.tabs.map((e=>({title:e,active:e===o.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(ot,{codeConfig:et(n),prevFile:s,nextFile:s,t:0,parentHeight:"0"})},southContent:it(a),southPanel:i&&{tabs:i.tabs.map((e=>({title:e,active:e===i.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(ot,{codeConfig:tt(n),prevFile:a,nextFile:a,t:0,parentHeight:"0"})}}}(t,n,s);if(!l)return rt(t,n,s);if(1===o)return rt(t,n,s);const c=t.southPanel||n.southPanel,{prevNorthFile:u,prevSouthFile:h,nextNorthFile:f,nextSouthFile:d}=st(t,n,0==o||i),{northStyle:m,southStyle:p}=function(e,t,n){if(null===e.southHeight&&null===t.southHeight)return{northStyle:{minHeight:e.northHeight}};if(null!==e.southHeight&&null===t.southHeight&&t.northKey!==e.southKey)return{northStyle:{minHeight:at(e.northHeight,t.northHeight,n)},southStyle:{minHeight:e.southHeight}};if(null!==e.southHeight&&null===t.southHeight&&e.southKey===t.northKey)return{northStyle:{minHeight:e.northHeight},southStyle:{position:"relative",minHeight:at(e.southHeight,t.northHeight,n),transform:`translateY(${at(0,-(e.northHeight+e.titleBarHeight),n)}px)`}};if(null===e.southHeight&&null!==t.southHeight&&e.northKey!==t.southKey)return{northStyle:{minHeight:at(e.northHeight,t.northHeight,n)},southStyle:{position:"relative",minHeight:t.southHeight}};if(null===e.southHeight&&null!==t.southHeight&&e.northKey===t.southKey)return{northStyle:{minHeight:t.northHeight},southStyle:{position:"relative",minHeight:at(e.northHeight,t.southHeight,n),transform:`translateY(${at(-(t.northHeight+t.titleBarHeight),0,n)}px)`}};return{northStyle:{minHeight:at(e.northHeight,t.northHeight,n)},southStyle:{minHeight:at(e.southHeight,t.southHeight,n)}}}(a,l,o),{northTabs:v,southTabs:g}=function(e,t,n,r,o){if(!e.southTabs&&ct(r,e.northTabs))return{northTabs:lt(t.northTabs,t.southTabs,e.southTabs,e.northTabs,n,o),southTabs:lt(t.southTabs,t.northTabs,e.northTabs,e.southTabs,r,o)};if(!t.southTabs&&ct(r,t.northTabs))return{northTabs:lt(t.southTabs,t.northTabs,e.northTabs,e.southTabs,n,o),southTabs:lt(t.northTabs,t.southTabs,e.southTabs,e.northTabs,r,o)};return{northTabs:lt(t.northTabs,t.southTabs,e.northTabs,e.southTabs,n,o),southTabs:lt(t.southTabs,t.northTabs,e.southTabs,e.northTabs,r,o)}}(a,l,u.name,null==h?void 0:h.name,o);return{northContent:it(f),northPanel:{tabs:v,style:m,children:r.createElement(ot,{codeConfig:et(s),prevFile:u,nextFile:f,t:o,parentHeight:m.height||m.minHeight})},southContent:it(d),southPanel:c&&{tabs:g,style:p,children:r.createElement(ot,{codeConfig:tt(s),prevFile:h,nextFile:d,t:o,parentHeight:(null==p?void 0:p.height)||(null==p?void 0:p.minHeight)})}}}function rt(e,t,n){var o;const i=t.northPanel,s=t.southPanel;let{prevNorthFile:a,prevSouthFile:l,nextNorthFile:c,nextSouthFile:u}=st(e,t,!1);return!s&&i.active===(null===(o=null==e?void 0:e.southPanel)||void 0===o?void 0:o.active)&&(c=u),{northContent:it(c),northPanel:{tabs:i.tabs.map((e=>({title:e,active:e===i.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(ot,{codeConfig:et(n),prevFile:c,nextFile:c,t:1,parentHeight:"1"})},southContent:it(u),southPanel:s&&{tabs:s.tabs.map((e=>({title:e,active:e===s.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(ot,{codeConfig:tt(n),prevFile:u,nextFile:u,t:1,parentHeight:"1"})}}}function ot({prevFile:e,nextFile:t,t:n,codeConfig:o,parentHeight:i}){var s;const a=Object.assign(Object.assign({}
1,null==o?void 0:o.htmlProps),{style:Object.assign({height:"100%"},null===(s=null==o?void 0:o.htmlProps)||void 0===s?void 0:s.style)});return r.createElement(xe,Object.assign({progress:n,tween:{prev:e,next:t},config:Object.assign(Object.assign({},o),{parentHeight:i})},a))}function it(e){return e?p(e.code):""}function st(e,t,n){var r,o;const i=e.northPanel.active,s=t.northPanel.active,a=null===(r=e.southPanel)||void 0===r?void 0:r.active,l=null===(o=t.southPanel)||void 0===o?void 0:o.active,c=e.files.find((e=>e.name===i)),u=t.files.find((e=>e.name===s)),h=a?e.files.find((e=>e.name===a)):null,f=l?t.files.find((e=>e.name===l)):null;if(!a&&i===l)return{prevNorthFile:u,nextNorthFile:u,prevSouthFile:c,nextSouthFile:f};if(!l&&s===a)return{prevNorthFile:c,nextNorthFile:c,prevSouthFile:h,nextSouthFile:u};return{prevNorthFile:i===s||n?c:u,nextNorthFile:i===s?u:n?c:u,prevSouthFile:a===l?h:n?h||f:f||h,nextSouthFile:a===l?f:n?h||f:f||h}}function at(e,t,n){return e+(t-e)*n}function lt(e,t,n,r,o,i){const s=e?Object.keys(e).filter((e=>ct(e,n)||!n)).map((t=>{const r=n&&n[t],s=e[t],a=r?r.left+(s.left-r.left)*i:s.left,l=r?r.width+(s.width-r.width)*i:s.width;return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${a}px)`,width:l}}})):[],a=e?Object.keys(e).filter((e=>n&&!ct(e,n))).map((t=>{const n=e[t];return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${n.left}px)`,opacity:i,width:n.width}}})):[];!e||Object.keys(e).filter((e=>ct(e,r))).map((t=>{const n=r[t],i=e[t].left-n.left;return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${i}px)`}}}));return[...a,...s,...n?Object.keys(n).filter((t=>!ct(t,e))).map((e=>{const t=n[e];return{active:e===o,title:e,style:{position:"absolute",opacity:1-i,transform:`translateX(${t.left}px)`,width:t.width}}})):[]]}function ct(e,t){return t&&e&&e in t}const ut="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function ht(e,t){var n;const r=e.querySelector("[data-ch-panel='north']"),o=e.querySelector("[data-ch-panel='south']");return{titleBarHeight:e.querySelector(".ch-frame-title-bar").getBoundingClientRect().height,northHeight:r.getBoundingClientRect().height,northKey:t.northPanel.active,southHeight:(null==o?void 0:o.getBoundingClientRect().height)||null,southKey:null===(n=t.southPanel)||void 0===n?void 0:n.active}}function ft(e,t){var n;const r=Array.from(e.querySelectorAll("[data-ch-tab='north']")),o=Array.from(e.querySelectorAll("[data-ch-tab='south']"));return{northTabs:dt(r,t.northPanel.active),southTabs:dt(o,null===(n=t.southPanel)||void 0===n?void 0:n.active)}}function dt(e,t){if(!e[0])return null;const n=e[0].parentElement.getBoundingClientRect().left,r={};return e.forEach((e=>{const o=e.getAttribute("title"),i=e.getBoundingClientRect();r[o]={left:i.left-n,width:i.width,active:o===t}})),r}function mt({files:e,startingFileName:t}){const[n,o]=r.useState((()=>e.find((e=>e.name===t))));return r.createElement("div",{className:"ch-code-browser"},r.createElement(pt,{files:e,activeFile:n,setActiveFile:o}),r.createElement(bt,{file:n}))}function pt({files:e,activeFile:t,setActiveFile:n}){const o=r.useMemo((()=>function(e){let t=[];for(const n of e){const e=n.name.split("/");let r=t;for(let t=0;t<e.length;t++){const o=e[t],i=t===e.length-1,s=r.findIndex((e=>e.name===o));if(-1===s){const e={name:o,children:[],codeFile:void 0};i&&(e.codeFile=n),r.push(e),r=e.children}else r=r[s].children}}return t=yt(t),t}(e)),[e]);return r.createElement("div",{className:"ch-code-browser-sidebar"},r.createElement(vt,{tree:o,activeFile:t,setActiveFile:n}))}function vt({tree:e,activeFile:t,setActiveFile:n,level:o=0}){return r.createElement(r.Fragment,null,e.map((e=>r.createElement(gt,{key:e.name,node:e,activeFile:t,setActiveFile:n,level:o}))))}function gt({node:e,activeFile:t,setActiveFile:n,level:o}){const i=e.children&&e.children.length>0,s=e.codeFile===t;return i?r.createElement("div",null,r.createElement("div",{className:"ch-code-browser-sidebar-folder"},r.createElement("div",{style:{paddingLeft:1.5*o+"ch"}},e.name)),r.createElement(vt,{tree:e.children,activeFile:t,setActiveFile:n,level:o+1})):r.createElement("div",null,r.createElement("div",{className:"ch-code-browser-sidebar-file","data-selected":s,onClick:()=>n(e.codeFile)},r.createElement("div",{style:{paddingLeft:1.5*o+"ch"}},e.name)))}function bt({file:e}){return r.createElement("div",{className:"ch-code-browser-content"},r.createElement(be,{className:"ch-code-browser-button",content:p(e.code)}),e.code.lines.map(((e,t)=>r.createElement("div",{key:t},e.tokens.map(((e,t)=>r.createElement("span",Object.assign({key:t},e.props),e.content))),r.createElement("br",null)))))}function yt(e){for(const t of e)t.children=yt(t.children);return e.sort(((e,t)=>{const n=e.children&&e.children.length>0,r=t.children&&t.children.length>0;return n&&r||!n&&!r?e.name.localeCompare(t.name):n?-1:1}))}function xt({style:e,step:t,className:n}){const[o,i]=r.useState(!1),[s,a]=r.useState(!0),l=r.useRef(null),c=t.files;return r.useEffect((()=>{l.current&&!l.current.showModal&&a(!1)}),[]),s?r.createElement(r.Fragment,null,r.createElement(wt,{className:n,style:e,onClick:()=>{l.current.showModal(),document.body.classList.add("ch-no-scroll"),i(!0)}}),r.createElement("dialog",{ref:l,className:"ch-expand-dialog",onClose:()=>{i(!1)},onClick:e=>{e.currentTarget===e.target&&(l.current.close(),document.body.classList.remove("ch-no-scroll"))}},r.createElement(Et,{onClick:()=>{l.current.close(),document.body.classList.remove("ch-no-scroll")}}),o?r.createElement("div",{className:"ch-expand-dialog-content"},r.createElement(mt,{files:c,startingFileName:t.northPanel.active})):void 0)):null}function wt({onClick:e,style:t,className:n}){return r.createElement("button",{type:"button",title:"Expand",style:t,onClick:e,className:n},r.createElement("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})))}function Et({onClick:e}){return r.createElement("button",{onClick:e,className:"ch-expand-close",type:"button",title:"Close"},r.createElement("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})))}
1const jt={files:[{code:{lines:[],lang:"js"},focus:"",name:""}],northPanel:{active:"",tabs:[""],heightRatio:1}};function Nt(e){var{prev:t=jt,next:n,t:o,backward:s,codeConfig:a,frameProps:l={}}=e,c=i(e,["prev","next","t","backward","codeConfig","frameProps"]);const u=r.createRef(),{showCopyButton:h,showExpandButton:f}=a,d=i(a,["showCopyButton","showExpandButton"]),{northPanel:m,southPanel:p,northContent:v,southContent:g}=nt(u,t,n||t,o,s,d),[b,y]=r.useState(void 0);C((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect().height;y(t)}),[]);const x=Object.assign(Object.assign(Object.assign({},l),c),{style:Object.assign(Object.assign({},null==l?void 0:l.style),null==c?void 0:c.style)});b&&(x.style.height=b,x.style.maxHeight=b);const w=r.createElement(r.Fragment,null,h?r.createElement(be,{className:"ch-editor-button",content:v}):void 0,f?r.createElement(xt,{className:"ch-editor-button",step:n||t}):void 0),E=h?r.createElement(be,{className:"ch-editor-button",content:g}):void 0,j=r.createElement(Je,{prev:t.terminal,next:(n||t).terminal,t:o,backward:s});return r.createElement(Ue,Object.assign({ref:u},x,{northPanel:m,southPanel:p,terminalPanel:j,northButton:w,southButton:E}))}const Ot={stiffness:120,damping:24,mass:.2,decimals:3};function Ct(e){var{northPanel:t,southPanel:n,files:o,terminal:s,springConfig:a}=e,l=i(e,["northPanel","southPanel","files","terminal","springConfig"]);const c=r.useMemo((()=>({northPanel:t,southPanel:n,files:o,terminal:s})),[t,n,o,s]),{prev:u,next:h,t:f}=function(e,t=Ot){const[{target:n,steps:o,index:i},s]=r.useState({target:2,steps:[e,e,e],index:0});r.useEffect((()=>{o[o.length-1]!=e&&s((t=>function(e,t,n){const{steps:r,target:o,index:i}=e,s=r.slice(),a=n-i;return a<1?(s[2]=t,Object.assign(Object.assign({},e),{steps:s})):(s[0]=r[1],s[1]=r[2],s[2]=t,Object.assign(Object.assign({},e),{steps:s,target:o+1,index:i+1}))}(t,e,a)))}),[e]);const[a]=Be(n,t),l=a-i;return l<=1?{prev:o[0],next:o[1],t:l}:{prev:o[1],next:o[2],t:l-1}}(c,a);return r.createElement(Nt,Object.assign({t:f,backward:!1,prev:u,next:h},l))}function kt(e){const[t,n]=r.useState(e);return r.createElement(_t,Object.assign({},t,{onTabClick:function(e){const r=St(t,e,null);n(Object.assign(Object.assign({},t),r))}}))}function _t(e){var t,n,{onTabClick:o}=e,s=i(e,["onTabClick"]);const a=function(e){var t,n,r,o,s,a,l,c,u;const{lineNumbers:h,showCopyButton:f,showExpandButton:d,minZoom:m,maxZoom:p}=e,v=i(e,["lineNumbers","showCopyButton","showExpandButton","minZoom","maxZoom"]),g=Object.assign(Object.assign({},e.codeConfig),{maxZoom:null==p?null===(t=e.codeConfig)||void 0===t?void 0:t.maxZoom:p,minZoom:null==m?null===(n=e.codeConfig)||void 0===n?void 0:n.minZoom:m,horizontalCenter:null!==(o=null===(r=e.codeConfig)||void 0===r?void 0:r.horizontalCenter)&&void 0!==o?o:e.horizontalCenter,lineNumbers:null==h?null===(s=e.codeConfig)||void 0===s?void 0:s.lineNumbers:h,showCopyButton:null==f?null===(a=e.codeConfig)||void 0===a?void 0:a.showCopyButton:f,showExpandButton:null==d?null===(l=e.codeConfig)||void 0===l?void 0:l.showExpandButton:d,rows:e.rows,debug:null!==(c=e.debug)&&void 0!==c?c:null===(u=e.codeConfig)||void 0===u?void 0:u.debug});return Object.assign(Object.assign({},v),{codeConfig:g})}(s),{className:l,style:c,codeConfig:u}=a,h=i(a,["className","style","codeConfig"]);if(s.southPanel||1!==s.files.length||s.files[0].name){const e=Object.assign(Object.assign({},null==h?void 0:h.frameProps),{onTabClick:o});return r.createElement("div",{className:`ch-codegroup not-prose ${l||""}`,"data-ch-theme":null===(n=s.codeConfig)||void 0===n?void 0:n.themeName,style:c},r.createElement(Ct,Object.assign({},h,{frameProps:e,codeConfig:u})))}return r.createElement("div",{className:`ch-codeblock not-prose ${l||""}`,"data-ch-theme":null===(t=s.codeConfig)||void 0===t?void 0:t.themeName,style:c},r.createElement($e,{className:"ch-code",config:u,step:h.files[0]}))}function St(e,t,n){const r=t||e.northPanel.active,o=e.files.map((e=>e.name===r?Object.assign(Object.assign({},e),{focus:null===n?e.focus:n}):e));let i=Object.assign({},e.northPanel),s=e.southPanel&&Object.assign({},e.southPanel);return e.northPanel.tabs.includes(r)?i.active=r:s&&(s.active=r),{files:o,northPanel:i,southPanel:s}}r.createContext({props:null,setFocus:()=>{}});r.createContext({activatedId:void 0,activate:()=>{},reset:()=>{}});function Ft(){return r.createElement("svg",{fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:"1em",viewBox:"13 10 14 23",className:"ch-browser-button ch-browser-back-button"},r.createElement("g",null,r.createElement("path",{d:"m26.5 12.1q0 0.3-0.2 0.6l-8.8 8.7 8.8 8.8q0.2 0.2 0.2 0.5t-0.2 0.5l-1.1 1.1q-0.3 0.3-0.6 0.3t-0.5-0.3l-10.4-10.4q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.5-0.2t0.6 0.2l1.1 1.1q0.2 0.2 0.2 0.5z"})))}function Pt(){return r.createElement("svg",{fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:"1em",viewBox:"13 10 14 23",className:"ch-browser-button ch-browser-forward-button"},r.createElement("g",null,r.createElement("path",{d:"m26.3 21.4q0 0.3-0.2 0.5l-10.4 10.4q-0.3 0.3-0.6 0.3t-0.5-0.3l-1.1-1.1q-0.2-0.2-0.2-0.5t0.2-0.5l8.8-8.8-8.8-8.7q-0.2-0.3-0.2-0.6t0.2-0.5l1.1-1.1q0.3-0.2 0.5-0.2t0.6 0.2l10.4 10.4q0.2 0.2 0.2 0.5z"})))}function Ht({href:e}){return r.createElement("a",{className:"ch-browser-button ch-browser-open-button",title:"Open in new tab",href:e,target:"_blank",rel:"noopener noreferrer"}
1,r.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"3 3 18 18",height:"1em",width:"1em",className:"ch-browser-open-icon",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})))}function Mt({url:e,linkUrl:t}){return r.createElement(r.Fragment,null,r.createElement(Xe,null),r.createElement(Ft,null),r.createElement(Pt,null),r.createElement("input",{value:e||"",readOnly:!0}),r.createElement(Ht,{href:t}))}function Tt(e){return r.useMemo((()=>e?e.map((e=>{const{displayUrl:t,loadUrl:n}=function(e,t,n){const r="undefined"!=typeof window?window.origin:"",o=e&&!0===n?r+e:e;return{displayUrl:o,loadUrl:t||o}}(e.url,e.loadUrl,e.prependOrigin);return{zoom:e.zoom||1,displayUrl:t,loadUrl:n,children:e.children}})):[{zoom:1}]),[e])}r.forwardRef((function(e,t){var{progress:n=0,backward:o=!1,steps:s,transition:a="none"}=e,l=i(e,["progress","backward","steps","transition"]);const c=Tt(s),u=Math.round(n),{zoom:h,displayUrl:f,loadUrl:d,children:m}=c[u];return r.createElement(Re,Object.assign({},l,{zoom:h,className:`ch-mini-browser ${l.className||""}`,style:Object.assign(Object.assign({},zt({progress:n,transition:a})),l.style),titleBar:r.createElement(Mt,{url:f,linkUrl:d})}),m||r.createElement("iframe",{ref:t,src:d}))}));function zt({progress:e,transition:t}){if("slide"===t){const t=50,n=e-Math.floor(e),r=n<=.5?-t*n:t-t*n,o=2*Math.abs(n-.5);return{transform:`translateX(${r}px)`,opacity:o*o}}return{}}var At="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Lt={};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.getMainFile=function(e){return"vue-cli"===e?"src/main.js":"angular-cli"===e?"src/main.ts":"create-react-app-typescript"===e?"src/index.tsx":"parcel"===e?"index.html":"gatsby"===e?"src/pages/index.js":"nuxt"===e||"next"===e||"apollo"===e||"reason"===e||"sapper"===e?"package.json":"nest"===e?"src/main.ts":"static"===e?"index.html":"src/index.js"};var Bt="sandbox.config.json";Lt.getTemplate=function(e,t){var n=t[Bt]||t["/"+Bt];if(n)try{var r=JSON.parse(n.content);if(r.template)return r.template}catch(d){}var o=e.dependencies,i=void 0===o?{}:o,s=e.devDependencies,a=void 0===s?{}:s,l=Object.keys(i).concat(Object.keys(a)),c=["nuxt","nuxt-edge"];if(l.some((function(e){return c.indexOf(e)>-1})))return"nuxt";if(l.indexOf("next")>-1)return"next";var u=["apollo-server","apollo-server-express","apollo-server-hapi","apollo-server-koa","apollo-server-lambda","apollo-server-micro"];if(l.some((function(e){return u.indexOf(e)>-1})))return"apollo";if(l.indexOf("ember-cli")>-1)return"ember";if(l.indexOf("sapper")>-1)return"sapper";var h=Object.keys(t);if(h.some((function(e){return e.endsWith(".vue")})))return"vue-cli";if(h.some((function(e){return e.endsWith(".re")})))return"reason";if(l.indexOf("gatsby")>-1)return"gatsby";if(l.indexOf("parcel-bundler")>-1)return"parcel";if(l.indexOf("react-scripts")>-1)return"create-react-app";if(l.indexOf("react-scripts-ts")>-1)return"create-react-app-typescript";if(l.indexOf("@angular/core")>-1)return"angular-cli";if(l.indexOf("preact-cli")>-1)return"preact-cli";if(l.indexOf("svelte")>-1)return"svelte";if(l.indexOf("vue")>-1)return"vue-cli";var f=["@dojo/core","@dojo/framework"];return l.some((function(e){return f.indexOf(e)>-1}))?"@dojo/cli-create-app":l.indexOf("cx")>-1?"cxjs":l.indexOf("@nestjs/core")>-1||l.indexOf("@nestjs/common")>-1?"nest":void 0};var Wt={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,o=2,i=9007199254740991,s="[object Arguments]",a="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",h="[object Error]",f="[object Function]",d="[object GeneratorFunction]",m="[object Map]",p="[object Number]",v="[object Null]",g="[object Object]",b="[object Promise]",y="[object Proxy]",x="[object RegExp]",w="[object Set]",E="[object String]",j="[object Symbol]",N="[object Undefined]",O="[object WeakMap]",C="[object ArrayBuffer]",k="[object DataView]",_=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,F={};
vendor: 3,756 bytes, line 1
1F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F[s]=F[a]=F[C]=F[c]=F[k]=F[u]=F[h]=F[f]=F[m]=F[p]=F[g]=F[x]=F[w]=F[E]=F[O]=!1;var P="object"==typeof At&&At&&At.Object===Object&&At,H="object"==typeof self&&self&&self.Object===Object&&self,M=P||H||Function("return this")(),T=t&&!t.nodeType&&t,z=T&&e&&!e.nodeType&&e,A=z&&z.exports===T,L=A&&P.process,B=function(){try{return L&&L.binding&&L.binding("util")}catch(e){}}(),W=B&&B.isTypedArray;function I(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function $(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var q,X,U,Z=Array.prototype,K=Function.prototype,G=Object.prototype,Y=M["__core-js_shared__"],V=K.toString,D=G.hasOwnProperty,J=(q=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Q=G.toString,ee=RegExp("^"+V.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=A?M.Buffer:void 0,ne=M.Symbol,re=M.Uint8Array,oe=G.propertyIsEnumerable,ie=Z.splice,se=ne?ne.toStringTag:void 0,ae=Object.getOwnPropertySymbols,le=te?te.isBuffer:void 0,ce=(X=Object.keys,U=Object,function(e){return X(U(e))}),ue=Be(M,"DataView"),he=Be(M,"Map"),fe=Be(M,"Promise"),de=Be(M,"Set"),me=Be(M,"WeakMap"),pe=Be(Object,"create"),ve=Re(ue),ge=Re(he),be=Re(fe),ye=Re(de),xe=Re(me),we=ne?ne.prototype:void 0,Ee=we?we.valueOf:void 0;function je(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])}function ke(e){var t=this.__data__=new Ne(e);this.size=t.size}function _e(e,t){var n=Ue(e),r=!n&&Xe(e),o=!n&&!r&&Ze(e),i=!n&&!r&&!o&&De(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!D.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||$e(c,l))||a.push(c);return a}function Se(e,t){for(var n=e.length;n--;)if(qe(e[n][0],t))return n;return-1}function Fe(e){return null==e?void 0===e?N:v:se&&se in Object(e)?function(e){var t=D.call(e,se),n=e[se];try{e[se]=void 0;var r=!0}catch(i){}var o=Q.call(e);r&&(t?e[se]=n:delete e[se]);return o}(e):function(e){return Q.call(e)}(e)}function Pe(e){return Ve(e)&&Fe(e)==s}function He(e,t,n,i,l){return e===t||(null==e||null==t||!Ve(e)&&!Ve(t)?e!=e&&t!=t:function(e,t,n,i,l,f){var d=Ue(e),v=Ue(t),b=d?a:Ie(e),y=v?a:Ie(t),N=(b=b==s?g:b)==g,O=(y=y==s?g:y)==g,_=b==y;if(_&&Ze(e)){if(!Ze(t))return!1;d=!0,N=!1}if(_&&!N)return f||(f=new ke),d||De(e)?ze(e,t,n,i,l,f):function(e,t,n,i,s,a,l){switch(n){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!a(new re(e),new re(t)));case c:case u:case p:return qe(+e,+t);case h:return e.name==t.name&&e.message==t.message;case x:case E:return e==t+"";case m:var f=$;case w:var d=i&r;if(f||(f=R),e.size!=t.size&&!d)return!1;var v=l.get(e);if(v)return v==t;i|=o,l.set(e,t);var g=ze(f(e),f(t),i,s,a,l);return l.delete(e),g;case j:if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,b,n,i,l,f);if(!(n&r)){var S=N&&D.call(e,"__wrapped__"),F=O&&D.call(t,"__wrapped__");
1if(S||F){var P=S?e.value():e,H=F?t.value():t;return f||(f=new ke),l(P,H,n,i,f)}}if(!_)return!1;return f||(f=new ke),function(e,t,n,o,i,s){var a=n&r,l=Ae(e),c=l.length,u=Ae(t),h=u.length;if(c!=h&&!a)return!1;var f=c;for(;f--;){var d=l[f];if(!(a?d in t:D.call(t,d)))return!1}var m=s.get(e);if(m&&s.get(t))return m==t;var p=!0;s.set(e,t),s.set(t,e);var v=a;for(;++f<c;){var g=e[d=l[f]],b=t[d];if(o)var y=a?o(b,g,d,t,e,s):o(g,b,d,e,t,s);if(!(void 0===y?g===b||i(g,b,n,o,s):y)){p=!1;break}v||(v="constructor"==d)}if(p&&!v){var x=e.constructor,w=t.constructor;x==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,i,l,f)}(e,t,n,i,He,l))}function Me(e){return!(!Ye(e)||function(e){return!!J&&J in e}(e))&&(Ke(e)?ee:_).test(Re(e))}function Te(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||G,t!==r)return ce(e);var t,n,r,o=[];for(var i in Object(e))D.call(e,i)&&"constructor"!=i&&o.push(i);return o}function ze(e,t,n,i,s,a){var l=n&r,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var h=a.get(e);if(h&&a.get(t))return h==t;var f=-1,d=!0,m=n&o?new Ce:void 0;for(a.set(e,t),a.set(t,e);++f<c;){var p=e[f],v=t[f];if(i)var g=l?i(v,p,f,t,e,a):i(p,v,f,e,t,a);if(void 0!==g){if(g)continue;d=!1;break}if(m){if(!I(t,(function(e,t){if(r=t,!m.has(r)&&(p===e||s(p,e,n,i,a)))return m.push(t);var r}))){d=!1;break}}else if(p!==v&&!s(p,v,n,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Ae(e){return function(e,t,n){var r=t(e);return Ue(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Je,We)}function Le(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(n)?n:void 0}je.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},je.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},je.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===n?void 0:r}return D.call(t,e)?t[e]:void 0},je.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:D.call(t,e)},je.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?n:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return Se(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Oe.prototype.clear=function(){this.size=0,this.__data__={hash:new je,map:new(he||Ne),string:new je}},Oe.prototype.delete=function(e){var t=Le(this,e).delete(e);return this.size-=t?1:0,t},Oe.prototype.get=function(e){return Le(this,e).get(e)},Oe.prototype.has=function(e){return Le(this,e).has(e)},Oe.prototype.set=function(e,t){var n=Le(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,n),this},Ce.prototype.has=function(e){return this.__data__.has(e)},ke.prototype.clear=function(){this.__data__=new Ne,this.size=0},ke.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ke.prototype.get=function(e){return this.__data__.get(e)},ke.prototype.has=function(e){return this.__data__.has(e)},ke.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oe(r)}return n.set(e,t),this.size=n.size,this};var We=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(ae(e),(function(t){return oe.call(e,t)})))}:function(){return[]},Ie=Fe;function $e(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function Re(e){if(null!=e){try{return V.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function qe(e,t){return e===t||e!=e&&t!=t}(ue&&Ie(new ue(new ArrayBuffer(1)))!=k||he&&Ie(new he)!=m||fe&&Ie(fe.resolve())!=b||de&&Ie(new de)!=w||me&&Ie(new me)!=O)&&(Ie=function(e){var t=Fe(e),n=t==g?e.constructor:void 0,r=n?Re(n):"";if(r)switch(r){case ve:return k;case ge:return m;case be:return b;case ye:return w;case xe:return O}return t});var Xe=Pe(function(){return arguments}())?Pe:function(e){return Ve(e)&&D.call(e,"callee")&&!oe.call(e,"callee")},Ue=Array.isArray;var Ze=le||function(){return!1};function Ke(e){if(!Ye(e))return!1;var t=Fe(e);return t==f||t==d||t==l||t==y}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Ye(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ve(e){return null!=e&&"object"==typeof e}var De=W?function(e){return function(t){return e(t)}}(W):function(e){return Ve(e)&&Ge(e.length)&&!!F[Fe(e)]};function Je(e){return null!=(t=e)&&Ge(t.length)&&!Ke(t)?_e(e):Te(e);var t}e.exports=function(e,t){return He(e,t)}}(Wt,Wt.exports);var It,$t;"0.19.0".replace(/\./g,"-");($t=It||(It={}))[$t.None=0]="None",$t[$t.Error=10]="Error",$t[$t.Warning=20]="Warning",$t[$t.Info=30]="Info",$t[$t.Debug=40]="Debug";"undefined"!=typeof window?r.useLayoutEffect:r.useEffect;r.createContext(void 0),"undefined"!=typeof window?r.useLayoutEffect:r.useEffect;r.createContext(null);const Rt={box:function({children:e,data:t}){const n="string"==typeof t?t:void 0;return r.createElement("span",{className:"ch-code-box-annotation",style:{outlineColor:n}},e)},bg:qt,label:function({children:e,data:t,style:n}){return r.createElement("div",{className:"ch-code-label-annotation",style:n},e,r.createElement("div",{className:"ch-code-label-annotation-text"},(null==t?void 0:t.children)||t))},link:function({children:e,isInline:t,style:n,data:o}){const i=(null==o?void 0:o.url)||o,s=null==o?void 0:o.title;return r.createElement("a",{href:i,title:s,className:t?"ch-code-inline-link":"ch-code-link",style:n},e)},mark:function(e){return e.isInline?r.createElement(Xt,Object.assign({},e)):r.createElement(qt,Object.assign({},e))},withClass:function({children:e,data:t,style:n}){return r.createElement("span",{style:n,className:t},e)}};function qt({children:e,data:t,style:n,lines:o}){const i=function(e){return e.map((e=>e.annotatedGroups.flatMap((e=>{var t;return null===(t=e.prev)||void 0===t?void 0:t.groups.flatMap((e=>e.tokens.map((e=>e.content))))})).join(""))).join("\n")}(o),s="ch-code-multiline-mark "+(null!=t?t:"");return r.createElement("div",{style:n,className:s},r.createElement("span",{className:"ch-code-multiline-mark-border"}),e,r.createElement(be,{className:"ch-code-button",content:i}))}function Xt({children:e,data:t}){const n="ch-code-inline-mark "+(null!=t?t:"");return r.createElement("span",{className:n,style:{background:Ut(e)||void 0}},e)}function Ut(e){var t,n,o;try{const i=r.Children.toArray(e)[0],s=r.Children.toArray((null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.children)||[])[0],a=r.Children.toArray((null===(n=null==s?void 0:s.props)||void 0===n?void 0:n.children)||[])[0],{color:l}=(null===(o=null==a?void 0:a.props)||void 0===o?void 0:o.style)||{};return l?u(l,.2):void 0}catch(i){return}}}}]);
2//# sourceMappingURL=80efaec8-b6e7ed9d664734e439d1.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.