UNPKG

@jsjoeio/code-server

Version:

Run VS Code on a remote server.

39 lines (30 loc) 58.6 kB
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=7)}([function(e,n,t){"use strict";t.r(n),t.d(n,"render",(function(){return I})),t.d(n,"hydrate",(function(){return R})),t.d(n,"createElement",(function(){return _})),t.d(n,"h",(function(){return _})),t.d(n,"Fragment",(function(){return g})),t.d(n,"createRef",(function(){return v})),t.d(n,"isValidElement",(function(){return o})),t.d(n,"Component",(function(){return y})),t.d(n,"cloneElement",(function(){return B})),t.d(n,"createContext",(function(){return W})),t.d(n,"toChildArray",(function(){return C})),t.d(n,"__u",(function(){return H})),t.d(n,"options",(function(){return r}));var r,o,i,u,l,s,a,c={},f=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,n){for(var t in n)e[t]=n[t];return e}function h(e){var n=e.parentNode;n&&n.removeChild(e)}function _(e,n,t){var r,o,i,u=arguments,l={};for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:l[i]=n[i];if(arguments.length>3)for(t=[t],i=3;i<arguments.length;i++)t.push(u[i]);if(null!=t&&(l.children=t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return m(e,l,r,o,null)}function m(e,n,t,o,i){var u={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i};return null==i&&(u.__v=u),null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function g(e){return e.children}function y(e,n){this.props=e,this.context=n}function b(e,n){if(null==n)return e.__?b(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?b(e):null}function w(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return w(e)}}function k(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!x.__r++||l!==r.debounceRendering)&&((l=r.debounceRendering)||u)(x)}function x(){for(var e;x.__r=i.length;)e=i.sort((function(e,n){return e.__v.__b-n.__v.__b})),i=[],e.some((function(e){var n,t,r,o,i,u,l;e.__d&&(u=(i=(n=e).__v).__e,(l=n.__P)&&(t=[],(r=p({},i)).__v=r,o=A(l,i,r,n.__n,void 0!==l.ownerSVGElement,null!=i.__h?[u]:null,t,null==u?b(i):u,i.__h),M(t,i),o!=u&&w(i)))}))}function S(e,n,t,r,o,i,u,l,s,a){var d,p,_,v,y,w,k,x=r&&r.__k||f,S=x.length;for(s==c&&(s=null!=u?u[0]:S?b(r,0):null),t.__k=[],d=0;d<n.length;d++)if(null!=(v=t.__k[d]=null==(v=n[d])||"boolean"==typeof v?null:"string"==typeof v||"number"==typeof v?m(null,v,null,null,v):Array.isArray(v)?m(g,{children:v},null,null,null):null!=v.__e||null!=v.__c?m(v.type,v.props,v.key,null,v.__v):v)){if(v.__=t,v.__b=t.__b+1,null===(_=x[d])||_&&v.key==_.key&&v.type===_.type)x[d]=void 0;else for(p=0;p<S;p++){if((_=x[p])&&v.key==_.key&&v.type===_.type){x[p]=void 0;break}_=null}y=A(e,v,_=_||c,o,i,u,l,s,a),(p=v.ref)&&_.ref!=p&&(k||(k=[]),_.ref&&k.push(_.ref,null,v),k.push(p,v.__c||y,v)),null!=y?(null==w&&(w=y),s=P(e,v,_,x,u,y,s),a||"option"!=t.type?"function"==typeof t.type&&(t.__d=s):e.value=""):s&&_.__e==s&&s.parentNode!=e&&(s=b(_))}if(t.__e=w,null!=u&&"function"!=typeof t.type)for(d=u.length;d--;)null!=u[d]&&h(u[d]);for(d=S;d--;)null!=x[d]&&H(x[d],x[d]);if(k)for(d=0;d<k.length;d++)O(k[d],k[++d],k[++d])}function C(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){C(e,n)})):n.push(e)),n}function P(e,n,t,r,o,i,u){var l,s,a;if(void 0!==n.__d)l=n.__d,n.__d=void 0;else if(o==t||i!=u||null==i.parentNode)e:if(null==u||u.parentNode!==e)e.appendChild(i),l=null;else{for(s=u,a=0;(s=s.nextSibling)&&a<r.length;a+=2)if(s==i)break e;e.insertBefore(i,u),l=u}return void 0!==l?l:i.nextSibling}function N(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||d.test(n)?t:t+"px"}function L(e,n,t,r,o){var i,u,l;if(o&&"className"==n&&(n="class"),"style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||N(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||N(e.style,n,t[n])}else"o"===n[0]&&"n"===n[1]?(i=n!==(n=n.replace(/Capture$/,"")),(u=n.toLowerCase())in e&&(n=u),n=n.slice(2),e.l||(e.l={}),e.l[n+i]=t,l=i?T:j,t?r||e.addEventListener(n,l,i):e.removeEventListener(n,l,i)):"list"!==n&&"tagName"!==n&&"form"!==n&&"type"!==n&&"size"!==n&&"download"!==n&&"href"!==n&&!o&&n in e?e[n]=null==t?"":t:"function"!=typeof t&&"dangerouslySetInnerHTML"!==n&&(n!==(n=n.replace(/xlink:?/,""))?null==t||!1===t?e.removeAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),t):null==t||!1===t&&!/^ar/.test(n)?e.removeAttribute(n):e.setAttribute(n,t))}function j(e){this.l[e.type+!1](r.event?r.event(e):e)}function T(e){this.l[e.type+!0](r.event?r.event(e):e)}function F(e,n,t){var r,o;for(r=0;r<e.__k.length;r++)(o=e.__k[r])&&(o.__=e,o.__e&&("function"==typeof o.type&&o.__k.length>1&&F(o,n,t),n=P(t,o,o,e.__k,null,o.__e,n),"function"==typeof e.type&&(e.__d=n)))}function A(e,n,t,o,i,u,l,s,a){var c,f,d,h,_,m,v,b,w,k,x,C=n.type;if(void 0!==n.constructor)return null;null!=t.__h&&(a=t.__h,s=n.__e=t.__e,n.__h=null,u=[s]),(c=r.__b)&&c(n);try{e:if("function"==typeof C){if(b=n.props,w=(c=C.contextType)&&o[c.__c],k=c?w?w.props.value:c.__:o,t.__c?v=(f=n.__c=t.__c).__=f.__E:("prototype"in C&&C.prototype.render?n.__c=f=new C(b,k):(n.__c=f=new y(b,k),f.constructor=C,f.render=D),w&&w.sub(f),f.props=b,f.state||(f.state={}),f.context=k,f.__n=o,d=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=C.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,C.getDerivedStateFromProps(b,f.__s))),h=f.props,_=f.state,d)null==C.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==C.getDerivedStateFromProps&&b!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(b,k),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(b,f.__s,k)||n.__v===t.__v){f.props=b,f.state=f.__s,n.__v!==t.__v&&(f.__d=!1),f.__v=n,n.__e=t.__e,n.__k=t.__k,f.__h.length&&l.push(f),F(n,s,e);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(b,f.__s,k),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,_,m)}))}f.context=k,f.props=b,f.state=f.__s,(c=r.__r)&&c(n),f.__d=!1,f.__v=n,f.__P=e,c=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(o=p(p({},o),f.getChildContext())),d||null==f.getSnapshotBeforeUpdate||(m=f.getSnapshotBeforeUpdate(h,_)),x=null!=c&&c.type==g&&null==c.key?c.props.children:c,S(e,Array.isArray(x)?x:[x],n,t,o,i,u,l,s,a),f.base=n.__e,n.__h=null,f.__h.length&&l.push(f),v&&(f.__E=f.__=null),f.__e=!1}else null==u&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=E(t.__e,n,t,o,i,u,l,a);(c=r.diffed)&&c(n)}catch(e){n.__v=null,(a||null!=u)&&(n.__e=s,n.__h=!!a,u[u.indexOf(s)]=null),r.__e(e,n,t)}return n.__e}function M(e,n){r.__c&&r.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){r.__e(e,n.__v)}}))}function E(e,n,t,r,o,i,u,l){var s,a,d,p,h,_=t.props,m=n.props;if(o="svg"===n.type||o,null!=i)for(s=0;s<i.length;s++)if(null!=(a=i[s])&&((null===n.type?3===a.nodeType:a.localName===n.type)||e==a)){e=a,i[s]=null;break}if(null==e){if(null===n.type)return document.createTextNode(m);e=o?document.createElementNS("http://www.w3.org/2000/svg",n.type):document.createElement(n.type,m.is&&{is:m.is}),i=null,l=!1}if(null===n.type)_===m||l&&e.data===m||(e.data=m);else{if(null!=i&&(i=f.slice.call(e.childNodes)),d=(_=t.props||c).dangerouslySetInnerHTML,p=m.dangerouslySetInnerHTML,!l){if(null!=i)for(_={},h=0;h<e.attributes.length;h++)_[e.attributes[h].name]=e.attributes[h].value;(p||d)&&(p&&(d&&p.__html==d.__html||p.__html===e.innerHTML)||(e.innerHTML=p&&p.__html||""))}(function(e,n,t,r,o){var i;for(i in t)"children"===i||"key"===i||i in n||L(e,i,null,t[i],r);for(i in n)o&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||L(e,i,n[i],t[i],r)})(e,m,_,o,l),p?n.__k=[]:(s=n.props.children,S(e,Array.isArray(s)?s:[s],n,t,r,"foreignObject"!==n.type&&o,i,u,c,l)),l||("value"in m&&void 0!==(s=m.value)&&(s!==e.value||"progress"===n.type&&!s)&&L(e,"value",s,_.value,!1),"checked"in m&&void 0!==(s=m.checked)&&s!==e.checked&&L(e,"checked",s,_.checked,!1))}return e}function O(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){r.__e(e,t)}}function H(e,n,t){var o,i,u;if(r.unmount&&r.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||O(o,null,n)),t||"function"==typeof e.type||(t=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){r.__e(e,n)}o.base=o.__P=null}if(o=e.__k)for(u=0;u<o.length;u++)o[u]&&H(o[u],n,t);null!=i&&h(i)}function D(e,n,t){return this.constructor(e,t)}function I(e,n,t){var o,i,u;r.__&&r.__(e,n),i=(o=t===s)?null:t&&t.__k||n.__k,e=_(g,null,[e]),u=[],A(n,(o?n:t||n).__k=e,i||c,c,void 0!==n.ownerSVGElement,t&&!o?[t]:i?null:n.childNodes.length?f.slice.call(n.childNodes):null,u,t||c,o),M(u,e)}function R(e,n){I(e,n,s)}function B(e,n,t){var r,o,i,u=arguments,l=p({},e.props);for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:l[i]=n[i];if(arguments.length>3)for(t=[t],i=3;i<arguments.length;i++)t.push(u[i]);return null!=t&&(l.children=t),m(e.type,l,r||e.key,o||e.ref,null)}function W(e,n){var t={__c:n="__cC"+a++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e,t,r){return this.getChildContext||(t=[],(r={})[n]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(k)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}r={__e:function(e,n){for(var t,r,o,i=n.__h;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(e)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(e),o=t.__d),o)return n.__h=i,t.__E=t}catch(n){e=n}throw e}},o=function(e){return null!=e&&void 0===e.constructor},y.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(p({},t),this.props)),e&&p(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),k(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},y.prototype.render=g,i=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,x.__r=0,s=c,a=0},function(e,n,t){"use strict";t.r(n),t.d(n,"useState",(function(){return h})),t.d(n,"useReducer",(function(){return _})),t.d(n,"useEffect",(function(){return m})),t.d(n,"useLayoutEffect",(function(){return v})),t.d(n,"useRef",(function(){return g})),t.d(n,"useImperativeHandle",(function(){return y})),t.d(n,"useMemo",(function(){return b})),t.d(n,"useCallback",(function(){return w})),t.d(n,"useContext",(function(){return k})),t.d(n,"useDebugValue",(function(){return x})),t.d(n,"useErrorBoundary",(function(){return S}));var r,o,i,u=t(0),l=0,s=[],a=u.options.__r,c=u.options.diffed,f=u.options.__c,d=u.options.unmount;function p(e,n){u.options.__h&&u.options.__h(o,e,l||n),l=0;var t=o.__H||(o.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function h(e){return l=1,_(T,e)}function _(e,n,t){var i=p(r++,2);return i.t=e,i.__c||(i.__=[t?t(n):T(void 0,n),function(e){var n=i.t(i.__[0],e);i.__[0]!==n&&(i.__=[n,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function m(e,n){var t=p(r++,3);!u.options.__s&&j(t.__H,n)&&(t.__=e,t.__H=n,o.__H.__h.push(t))}function v(e,n){var t=p(r++,4);!u.options.__s&&j(t.__H,n)&&(t.__=e,t.__H=n,o.__h.push(t))}function g(e){return l=5,b((function(){return{current:e}}),[])}function y(e,n,t){l=6,v((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))}function b(e,n){var t=p(r++,7);return j(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function w(e,n){return l=8,b((function(){return e}),n)}function k(e){var n=o.context[e.__c],t=p(r++,9);return t.__c=e,n?(null==t.__&&(t.__=!0,n.sub(o)),n.props.value):e.__}function x(e,n){u.options.useDebugValue&&u.options.useDebugValue(n?n(e):e)}function S(e){var n=p(r++,10),t=h();return n.__=e,o.componentDidCatch||(o.componentDidCatch=function(e){n.__&&n.__(e),t[1](e)}),[t[0],function(){t[1](void 0)}]}function C(){s.some((function(e){if(e.__P)try{e.__H.__h.forEach(N),e.__H.__h.forEach(L),e.__H.__h=[]}catch(n){return e.__H.__h=[],u.options.__e(n,e.__v),!0}})),s=[]}u.options.__r=function(e){a&&a(e),r=0;var n=(o=e.__c).__H;n&&(n.__h.forEach(N),n.__h.forEach(L),n.__h=[])},u.options.diffed=function(e){c&&c(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==s.push(n)&&i===u.options.requestAnimationFrame||((i=u.options.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),P&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);P&&(n=requestAnimationFrame(t))})(C))},u.options.__c=function(e,n){n.some((function(e){try{e.__h.forEach(N),e.__h=e.__h.filter((function(e){return!e.__||L(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],u.options.__e(t,e.__v)}})),f&&f(e,n)},u.options.unmount=function(e){d&&d(e);var n=e.__c;if(n&&n.__H)try{n.__H.__.forEach(N)}catch(e){u.options.__e(e,n.__v)}};var P="function"==typeof requestAnimationFrame;function N(e){"function"==typeof e.u&&e.u()}function L(e){e.u=e.__()}function j(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function T(e,n){return"function"==typeof n?n(e):n}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useDump=n.DumpContext=void 0;const r=t(0),o=t(1);n.DumpContext=r.createContext(void 0),n.useDump=()=>o.useContext(n.DumpContext)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.usePersistedState=void 0;const r=t(1),o=acquireVsCodeApi();n.usePersistedState=(e,n)=>{const[t,i]=r.useState(()=>((e,n)=>{var t;const r=(null===(t=o.getState())||void 0===t?void 0:t.componentState)||{};return r.hasOwnProperty(e)?r[e]:n})(e,n));return[t,r.useCallback(n=>{((e,n)=>{const t=o.getState();o.setState(Object.assign(Object.assign({},t),{componentState:Object.assign(Object.assign({},null==t?void 0:t.componentState),{[e]:n})}))})(e,n),i(n)},[e,i])]}},function(e,n,t){"use strict";function r(e,n){const t={};for(const r of Object.keys(e)){const o=e[r];n(o,r)&&(t[r]=o)}return t}Object.defineProperty(n,"__esModule",{value:!0}),n.invertMap=n.upcastPartial=n.pick=n.flatten=n.bisectArray=n.trailingEdgeThrottle=n.debounce=n.memoizeWeak=n.memoize=n.once=n.getCaseInsensitiveProperty=n.caseInsensitiveMerge=n.walkObject=n.sortKeys=n.filterObject=n.mapKeys=n.mapValues=n.filterValues=n.assertNever=n.removeUndefined=n.removeNulls=n.truthy=void 0,n.truthy=e=>!!e,n.removeNulls=e=>r(e,e=>null!==e),n.removeUndefined=e=>r(e,e=>void 0!==e),n.assertNever=(e,n)=>{throw new Error(n.replace("{value}",JSON.stringify(e)))},n.filterValues=r,n.mapValues=function(e,n){const t={};for(const r of Object.keys(e)){const o=e[r];t[r]=n(o,r)}return t},n.mapKeys=function(e,n){const t={};for(const r of Object.keys(e)){const o=n(r,e[r]);void 0!==o&&(t[o]=e[r])}return t},n.filterObject=function(e,n){const t={};for(const r of Object.keys(e))n(r,e[r])&&(t[r]=e[r]);return t},n.sortKeys=function(e,n){if(!e||"object"!=typeof e||e instanceof Array)return e;const t={};for(const r of Object.keys(e).sort(n))t[r]=e[r];return t},n.walkObject=function e(n,t){if(n=t(n))if(n instanceof Array)n=n.map(n=>e(n,t));else if("object"==typeof n&&n)for(const r of Object.keys(n))n[r]=e(n[r],t);return n},n.caseInsensitiveMerge=function(...e){if(0===e.length)return{};const n={},t=Object.create(null);for(const r of e)if(r)for(const e of Object.keys(r)){const o=e.toLowerCase();t[o]?n[t[o]]=r[e]:(t[o]=e,n[e]=r[e])}return n},n.getCaseInsensitiveProperty=function(e,n){if(e.hasOwnProperty(n))return e[n];const t=n.toLowerCase();for(const n of Object.keys(e))if(n.toLowerCase()===t)return e[n]};const o=Symbol("unset");n.once=function(e){let n=o;const t=(...r)=>(n===o&&(t.value=n=e(...r)),n);return t.forget=()=>{n=o,t.value=void 0},t.value=void 0,t},n.memoize=function(e){const n=new Map,t=t=>{if(n.has(t))return n.get(t);const r=e(t);return n.set(t,r),r};return t.clear=()=>n.clear(),t},n.memoizeWeak=function(e){const n=new WeakMap;return t=>{if(n.has(t))return n.get(t);const r=e(t);return n.set(t,r),r}},n.debounce=function(e,n){let t;const r=()=>{void 0!==t&&clearTimeout(t),t=setTimeout(()=>{t=void 0,n()},e)};return r.clear=()=>{t&&(clearTimeout(t),t=void 0)},r},n.trailingEdgeThrottle=function(e,n){let t;const r=()=>{void 0===t&&(t=setTimeout(()=>{t=void 0,n()},e))};return r.queued=()=>!!t,r.clear=()=>{t&&(clearTimeout(t),t=void 0)},r},n.bisectArray=function(e,n){const t=[],r=[];for(const o of e)n(o)?t.push(o):r.push(o);return[t,r]},n.flatten=function(e){let n=[];for(const t of e)n=n.concat(t);return n},n.pick=function(e,n){const t={};for(const r of n)t[r]=e[r];return t},n.upcastPartial=e=>e,n.invertMap=function(e){const n=new Map;for(const[t,r]of e)n.set(r,t);return n}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fixDriveLetter=n.forceForwardSlashes=n.properRelative=n.isAbsoluteWin32=n.isAbsolutePosix=n.properAbsolute=n.basename=n.prettyName=n.sortScore=n.isBrowserType=n.isNodeType=void 0;const r=t(11);n.isNodeType=e=>"pwa-node"===e.config.type||"pwa-extensionHost"===e.config.type||"node-terminal"===e.config.type,n.isBrowserType=e=>"pwa-chrome"===e.config.type||"pwa-msedge"===e.config.type,n.sortScore=e=>e.absolutePath.startsWith("<node_internals>")?2:e.absolutePath.includes("node_moeules")?1:0,n.prettyName=(e,t)=>e.absolutePath.startsWith("<node_internals>")?e.absolutePath:n.properAbsolute(e.absolutePath)&&t.config.__workspaceFolder?n.properRelative(t.config.__workspaceFolder,e.absolutePath):e.absolutePath||e.url,n.basename=e=>{const n=(e.prettyName||e.url).split(/\\|\//g);return n[n.length-1]},n.properAbsolute=e=>n.isAbsolutePosix(e)||n.isAbsoluteWin32(e),n.isAbsolutePosix=e=>e.startsWith("/"),n.isAbsoluteWin32=e=>/^[a-z]:/i.test(e),n.properRelative=(e,t)=>n.isAbsolutePosix(e)?r.relative(e,t):r.relative(n.forceForwardSlashes(n.fixDriveLetter(e)),n.forceForwardSlashes(n.fixDriveLetter(t))),n.forceForwardSlashes=e=>e.replace(/\\\//g,"/").replace(/\\/g,"/"),n.fixDriveLetter=e=>e.slice(0,1).toUpperCase()+e.slice(1)},function(e,n,t){"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=(u=r,l=btoa(unescape(encodeURIComponent(JSON.stringify(u)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(s," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(i).concat([o]).join("\n")}var u,l,s;return[t].join("\n")}(n,e);return n[2]?"@media ".concat(n[2]," {").concat(t,"}"):t})).join("")},n.i=function(e,t,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var u=this[i][0];null!=u&&(o[u]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);r&&o[s[0]]||(t&&(s[2]?s[2]="".concat(t," and ").concat(s[2]):s[2]=t),n.push(s))}},n}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=t(0),o=t(8),i=t(13),u=t(14),l=t(2),s=t(3);t(15);const a=({dump:e})=>{const[n,t]=s.usePersistedState("experience",0);return r.h(l.DumpContext.Provider,{value:e},0===n?r.h(i.Intro,{onPick:t}):r.h(r.Fragment,null,r.h("a",{role:"button",onClick:()=>t(0),className:"back"},"← Back"),1===n?r.h(o.BreakpointHelper,null):r.h(u.SourceExplorer,null)))};"undefined"!=typeof DUMP?r.render(r.h(a,{dump:DUMP}),document.body):fetch(document.location.search.slice(1)).then(e=>e.json()).then(e=>r.render(r.h(a,{dump:e}),document.body))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BreakpointHelper=void 0;const r=t(9),o=t(0),i=t(1),u=t(4),l=t(10),s=t(5),a=t(2),c=t(3);n.BreakpointHelper=()=>{const e=a.useDump();return o.h(o.Fragment,null,e.breakpoints.map((e,n)=>o.h(p,{bp:e,key:n})))};const f=(e,n)=>{let t=0;const r=[o.h("li",{key:t++},o.h("p",null,"✅ This breakpoint was initially set in:"),o.h("p",null,o.h("code",null,e.source.path)," line ",e.params.line," column ",e.params.column||1))];if(!((e,n)=>e.cdp.some(e=>{if("location"in e.args)return!0;if(e.args.url){const t=e.args.url;return n.sources.some(e=>e.url===t)}if(e.args.urlRegex){const t=new RegExp(e.args.urlRegex);return n.sources.some(e=>t.test(e.url))}return!1}))(e,n))return r.push(o.h(h,{bp:e,key:t++})),r;r.push(o.h("li",{key:t++},o.h("p",null,"✅ In the runtime, the breakpoint was set in:"),o.h("p",null,o.h("ul",null,e.cdp.map((e,n)=>o.h(v,{cdp:e,index:n,key:n}))))));const i=e.cdp.filter(e=>1===e.state),l=u.flatten(i.map(e=>1===e.state?e.uiLocations:[]));return l.length?(r.push(o.h("li",{key:t++},o.h("p",null,"✅ The runtime acknowledged and adjusted the breakpoint, and it mapped back to the following locations:"),o.h("ul",null,l.map((e,n)=>o.h(m,{loc:e,key:n})))),o.h("li",{key:t++},o.h("p",null,"If this is not right, your compiled code might be out of date with your sources. If you don't think this is the case and something else is wrong, please"," ",o.h("a",{href:"https://github.com/microsoft/vscode-js-debug/issues/new/choose"},"open an issue"),"!"))),r):(r.push(o.h("li",{key:t++},o.h(d,null))),r)},d=()=>{const e=a.useDump();return o.h("p",null,"❓ We sent the breakpoint, but it didn't bind to any locations. If this is unexpected:",o.h("ul",null,o.h("li",null,"Make sure that your program is loading or running this script. You can add a"," ",o.h("code",null,"debugger;")," statement to check this: your program will pause when it hits it."),o.h("li",null,"If your breakpoint is set in certain places, such as on the last empty line of a file, the runtime might not be able to find anywhere to place it."),s.isNodeType(e)&&o.h("li",null,"Unless you"," ",o.h("a",{href:"https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_breakpoint-validation"},"run with --nolazy"),", Node.js might not resolve breakpoints for code it hasn't parsed yet."),o.h("li",null,"If necessary, make sure your compiled files are up-to-date with your source files.")))},p=({bp:e})=>{if(!e.source.path)return null;const n=a.useDump();return o.h("div",{className:"content source-container"},o.h("h2",null,s.prettyName({absolutePath:e.source.path,url:e.source.path},n),":",e.params.line,":",e.params.column||1),o.h("ul",{className:"bp-tracing"},f(e,n)))},h=({bp:e})=>{const n=a.useDump(),t=s.basename({url:e.source.path}),r=n.sources.filter(e=>s.basename(e)===t);return r.length?o.h("li",null,o.h("p",null,"❓ We couldn't find a corresponding source location, but found some other files with the same name:"),o.h("ul",null,r.map(n=>o.h("li",{key:n},o.h(_,{original:e.source.path,updated:n.absolutePath||n.url})))),s.isBrowserType(n)?o.h("p",null,"You may need to adjust the ",o.h("code",null,"webRoot")," in your ",o.h("code",null,"launch.json")," if you're building from a subfolder, or tweak your ",o.h("code",null,"sourceMapPathOverrides"),"."):o.h("p",null,"If this is the same file, you may need to adjust your build tool"," ",s.isBrowserType(n)&&o.h(o.Fragment,null,"or ",o.h("code",null,"webRoot")," in the launch.json")," ","to correct the paths.")):o.h("li",null,o.h("p",null,o.h(b,{basename:t})))},_=({original:e,updated:n})=>o.h("span",{className:"text-diff"},r.diffChars(e,n,{ignoreCase:!0}).map((e,n)=>o.h("span",{className:e.added?"add":e.removed?"rm":"",key:n},e.value))),m=({loc:e})=>{var n,t;const r=a.useDump().sources.find(n=>n.sourceReference===e.sourceReference);return o.h(o.Fragment,null,o.h("code",null,null!==(t=null!==(n=null==r?void 0:r.absolutePath)&&void 0!==n?n:null==r?void 0:r.url)&&void 0!==t?t:"unknown")," line ",e.lineNumber," column"," ",e.columnNumber)},v=({cdp:e,index:n})=>{var t;const r=a.useDump(),[i,u]=c.usePersistedState(`showCdpBp${n}`,!1),{url:l,line:s,col:f,regex:d}="location"in e.args?{url:null===(t=r.sources.find(n=>!n.compiledSourceRefToUrl&&n.scriptIds.includes(e.args.location.scriptId)))||void 0===t?void 0:t.url,regex:void 0,line:e.args.location.lineNumber+1,col:(e.args.location.columnNumber||0)+1}:{url:e.args.urlRegex?g(e.args.urlRegex):e.args.url,regex:e.args.urlRegex,line:e.args.lineNumber+1,col:(e.args.columnNumber||0)+1};return o.h("li",null,o.h("p",null,o.h("code",null,l)," line ",s," column ",f," ",d&&o.h("a",{onClick:()=>u(!i)},"via this regex")),i&&o.h("p",null,o.h("code",null,d)))},g=e=>e.replace(/\[([[a-z])[A-Z]\]/g,(e,n)=>n).replace(/\\\\/,"\\").replace(/\\\//g,"/").replace(/\|.+$/g,"").replace(/\\\./g,"."),y=l.DecisionButtons(["Loaded in directly","Be parsed from a sourcemap"]),b=({basename:e})=>{const n=a.useDump(),[t,r]=i.useState(e.endsWith(".js")?void 0:"Be parsed from a sourcemap");return o.h(o.Fragment,null,o.h("p",null,"❓ We couldn't find a corresponding source location, and didn't find any source with the name ",o.h("code",null,e),"."),o.h("p",null,"How did you expect this file to be loaded? (If you have a compilation step, you should pick 'sourcemap')",o.h(y,{onChange:r,value:t}),"Loaded in directly"===t&&(s.isBrowserType(n)?o.h("p",null,"It looks like your webpage didn't load this script; breakpoints won't be bound until the file they're set in is loaded. Make sure your script is imported from the right location using a ",o.h("code",null,"<script>")," tag."):o.h("p",null,"It looks like your program didn't load this script; breakpoints won't be bound until the file they're set in is loaded. Make sure your script is imported with a"," ",o.h("code",null,"require()")," or ",o.h("code",null,"import")," statement, such as"," ",o.h("code",null,"require('./",e,"')"),".")),"Be parsed from a sourcemap"===t&&o.h("p",null,"Here's some hints that might help you:",o.h("ul",null,/\.tsx?$/.test(e)?o.h("li",null,"Make sure you have ",o.h("code",null,'"sourceMap": true')," in your tsconfig to generate sourcemaps."):o.h("li",null,"Make sure your build tool is set up to create sourcemaps."),!n.config.outFiles.includes("!**/node_modules/**")&&o.h("li",null,"It looks like you narrowed the ",o.h("code",null,"outFiles")," in your launch.json. Try removing this: it now defaults to the whole workspace, and overspecifying it can unnecessarily narrow places where we'll resolve sourcemaps.")))))}},function(e,n,t){ /*! diff v4.0.1 Software License Agreement (BSD License) Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com> All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Kevin Decker nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @license */ !function(e){"use strict";function n(){}function t(e,n,t,r,o){for(var i=0,u=n.length,l=0,s=0;i<u;i++){var a=n[i];if(a.removed){if(a.value=e.join(r.slice(s,s+a.count)),s+=a.count,i&&n[i-1].added){var c=n[i-1];n[i-1]=n[i],n[i]=c}}else{if(!a.added&&o){var f=t.slice(l,l+a.count);f=f.map((function(e,n){var t=r[s+n];return t.length>e.length?t:e})),a.value=e.join(f)}else a.value=e.join(t.slice(l,l+a.count));l+=a.count,a.added||(s+=a.count)}}var d=n[u-1];return u>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(n[u-2].value+=d.value,n.pop()),n}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}n.prototype={diff:function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.callback;"function"==typeof o&&(i=o,o={}),this.options=o;var u=this;function l(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e));var s=(n=this.removeEmpty(this.tokenize(n))).length,a=e.length,c=1,f=s+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],n,e,0);if(d[0].newPos+1>=s&&p+1>=a)return l([{value:this.join(n),count:n.length}]);function h(){for(var o=-1*c;o<=c;o+=2){var i=void 0,f=d[o-1],p=d[o+1],h=(p?p.newPos:0)-o;f&&(d[o-1]=void 0);var _=f&&f.newPos+1<s,m=p&&0<=h&&h<a;if(_||m){if(!_||m&&f.newPos<p.newPos?(i=r(p),u.pushComponent(i.components,void 0,!0)):((i=f).newPos++,u.pushComponent(i.components,!0,void 0)),h=u.extractCommon(i,n,e,o),i.newPos+1>=s&&h+1>=a)return l(t(u,i.components,n,e,u.useLongestToken));d[o]=i}else d[o]=void 0}c++}if(i)!function e(){setTimeout((function(){if(c>f)return i();h()||e()}),0)}();else for(;c<=f;){var _=h();if(_)return _}},pushComponent:function(e,n,t){var r=e[e.length-1];r&&r.added===n&&r.removed===t?e[e.length-1]={count:r.count+1,added:n,removed:t}:e.push({count:1,added:n,removed:t})},extractCommon:function(e,n,t,r){for(var o=n.length,i=t.length,u=e.newPos,l=u-r,s=0;u+1<o&&l+1<i&&this.equals(n[u+1],t[l+1]);)u++,l++,s++;return s&&e.components.push({count:s}),e.newPos=u,l},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var o=new n;function i(e,n){if("function"==typeof e)n.callback=e;else if(e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}var u=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,l=/\S/,s=new n;s.equals=function(e,n){return this.options.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e===n||this.options.ignoreWhitespace&&!l.test(e)&&!l.test(n)},s.tokenize=function(e){for(var n=e.split(/(\s+|[()[\]{}'"]|\b)/),t=0;t<n.length-1;t++)!n[t+1]&&n[t+2]&&u.test(n[t])&&u.test(n[t+2])&&(n[t]+=n[t+2],n.splice(t+1,2),t--);return n};var a=new n;function c(e,n,t){return a.diff(e,n,t)}a.tokenize=function(e){var n=[],t=e.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var r=0;r<t.length;r++){var o=t[r];r%2&&!this.options.newlineIsToken?n[n.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),n.push(o))}return n};var f=new n;f.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var d=new n;function p(e){return(p="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})(e)}function h(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}d.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var _=Object.prototype.toString,m=new n;function v(e,n,t,r,o){var i,u;for(n=n||[],t=t||[],r&&(e=r(o,e)),i=0;i<n.length;i+=1)if(n[i]===e)return t[i];if("[object Array]"===_.call(e)){for(n.push(e),u=new Array(e.length),t.push(u),i=0;i<e.length;i+=1)u[i]=v(e[i],n,t,r,o);return n.pop(),t.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),"object"===p(e)&&null!==e){n.push(e),u={},t.push(u);var l,s=[];for(l in e)e.hasOwnProperty(l)&&s.push(l);for(s.sort(),i=0;i<s.length;i+=1)u[l=s[i]]=v(e[l],n,t,r,l);n.pop(),t.pop()}else u=e;return u}m.useLongestToken=!0,m.tokenize=a.tokenize,m.castInput=function(e){var n=this.options,t=n.undefinedReplacement,r=n.stringifyReplacer,o=void 0===r?function(e,n){return void 0===n?t:n}:r;return"string"==typeof e?e:JSON.stringify(v(e,null,null,o),o," ")},m.equals=function(e,t){return n.prototype.equals.call(m,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var g=new n;function y(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=[],i=0;function u(){var e={};for(o.push(e);i<t.length;){var r=t[i];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var u=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);u&&(e.index=u[1]),i++}for(l(e),l(e),e.hunks=[];i<t.length;){var a=t[i];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(a))break;if(/^@@/.test(a))e.hunks.push(s());else{if(a&&n.strict)throw new Error("Unknown line "+(i+1)+" "+JSON.stringify(a));i++}}}function l(e){var n=/^(---|\+\+\+)\s+(.*)$/.exec(t[i]);if(n){var r="---"===n[1]?"old":"new",o=n[2].split("\t",2),u=o[0].replace(/\\\\/g,"\\");/^".*"$/.test(u)&&(u=u.substr(1,u.length-2)),e[r+"FileName"]=u,e[r+"Header"]=(o[1]||"").trim(),i++}}function s(){for(var e=i,o=t[i++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),u={oldStart:+o[1],oldLines:+o[2]||1,newStart:+o[3],newLines:+o[4]||1,lines:[],linedelimiters:[]},l=0,s=0;i<t.length&&!(0===t[i].indexOf("--- ")&&i+2<t.length&&0===t[i+1].indexOf("+++ ")&&0===t[i+2].indexOf("@@"));i++){var a=0==t[i].length&&i!=t.length-1?" ":t[i][0];if("+"!==a&&"-"!==a&&" "!==a&&"\\"!==a)break;u.lines.push(t[i]),u.linedelimiters.push(r[i]||"\n"),"+"===a?l++:"-"===a?s++:" "===a&&(l++,s++)}if(l||1!==u.newLines||(u.newLines=0),s||1!==u.oldLines||(u.oldLines=0),n.strict){if(l!==u.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(s!==u.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return u}for(;i<t.length;)u();return o}function b(e,n,t){var r=!0,o=!1,i=!1,u=1;return function l(){if(r&&!i){if(o?u++:r=!1,e+u<=t)return u;i=!0}if(!o)return i||(r=!0),n<=e-u?-u++:(o=!0,l())}}function w(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n&&(n=y(n)),Array.isArray(n)){if(n.length>1)throw new Error("applyPatch only works with a single input.");n=n[0]}var r,o,i=e.split(/\r\n|[\n\v\f\r\x85]/),u=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],l=n.hunks,s=t.compareLine||function(e,n,t,r){return n===r},a=0,c=t.fuzzFactor||0,f=0,d=0;function p(e,n){for(var t=0;t<e.lines.length;t++){var r=e.lines[t],o=r.length>0?r[0]:" ",u=r.length>0?r.substr(1):r;if(" "===o||"-"===o){if(!s(n+1,i[n],o,u)&&++a>c)return!1;n++}}return!0}for(var h=0;h<l.length;h++){for(var _=l[h],m=i.length-_.oldLines,v=0,g=d+_.oldStart-1,w=b(g,f,m);void 0!==v;v=w())if(p(_,g+v)){_.offset=d+=v;break}if(void 0===v)return!1;f=_.offset+_.oldStart+_.oldLines}for(var k=0,x=0;x<l.length;x++){var S=l[x],C=S.oldStart+S.offset+k-1;k+=S.newLines-S.oldLines,C<0&&(C=0);for(var P=0;P<S.lines.length;P++){var N=S.lines[P],L=N.length>0?N[0]:" ",j=N.length>0?N.substr(1):N,T=S.linedelimiters[P];if(" "===L)C++;else if("-"===L)i.splice(C,1),u.splice(C,1);else if("+"===L)i.splice(C,0,j),u.splice(C,0,T),C++;else if("\\"===L){var F=S.lines[P-1]?S.lines[P-1][0]:null;"+"===F?r=!0:"-"===F&&(o=!0)}}}if(r)for(;!i[i.length-1];)i.pop(),u.pop();else o&&(i.push(""),u.push("\n"));for(var A=0;A<i.length-1;A++)i[A]=i[A]+u[A];return i.join("")}function k(e,n,t,r,o,i,u){u||(u={}),void 0===u.context&&(u.context=4);var l=c(t,r,u);function s(e){return e.map((function(e){return" "+e}))}l.push({value:"",lines:[]});for(var a=[],f=0,d=0,p=[],_=1,m=1,v=function(e){var n=l[e],o=n.lines||n.value.replace(/\n$/,"").split("\n");if(n.lines=o,n.added||n.removed){var i;if(!f){var c=l[e-1];f=_,d=m,c&&(p=u.context>0?s(c.lines.slice(-u.context)):[],f-=p.length,d-=p.length)}(i=p).push.apply(i,h(o.map((function(e){return(n.added?"+":"-")+e})))),n.added?m+=o.length:_+=o.length}else{if(f)if(o.length<=2*u.context&&e<l.length-2){var v;(v=p).push.apply(v,h(s(o)))}else{var g,y=Math.min(o.length,u.context);(g=p).push.apply(g,h(s(o.slice(0,y))));var b={oldStart:f,oldLines:_-f+y,newStart:d,newLines:m-d+y,lines:p};if(e>=l.length-2&&o.length<=u.context){var w=/\n$/.test(t),k=/\n$/.test(r),x=0==o.length&&p.length>b.oldLines;!w&&x&&p.splice(b.oldLines,0,"\\ No newline at end of file"),(w||x)&&k||p.push("\\ No newline at end of file")}a.push(b),f=0,d=0,p=[]}_+=o.length,m+=o.length}},g=0;g<l.length;g++)v(g);return{oldFileName:e,newFileName:n,oldHeader:o,newHeader:i,hunks:a}}function x(e,n,t,r,o,i,u){var l=k(e,n,t,r,o,i,u),s=[];e==n&&s.push("Index: "+e),s.push("==================================================================="),s.push("--- "+l.oldFileName+(void 0===l.oldHeader?"":"\t"+l.oldHeader)),s.push("+++ "+l.newFileName+(void 0===l.newHeader?"":"\t"+l.newHeader));for(var a=0;a<l.hunks.length;a++){var c=l.hunks[a];s.push("@@ -"+c.oldStart+","+c.oldLines+" +"+c.newStart+","+c.newLines+" @@"),s.push.apply(s,c.lines)}return s.join("\n")+"\n"}function S(e,n){if(n.length>e.length)return!1;for(var t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function C(e){var n=function e(n){var t=0,r=0;return n.forEach((function(n){if("string"!=typeof n){var o=e(n.mine),i=e(n.theirs);void 0!==t&&(o.oldLines===i.oldLines?t+=o.oldLines:t=void 0),void 0!==r&&(o.newLines===i.newLines?r+=o.newLines:r=void 0)}else void 0===r||"+"!==n[0]&&" "!==n[0]||r++,void 0===t||"-"!==n[0]&&" "!==n[0]||t++})),{oldLines:t,newLines:r}}(e.lines),t=n.oldLines,r=n.newLines;void 0!==t?e.oldLines=t:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function P(e,n){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return y(e)[0];if(!n)throw new Error("Must provide a base reference or pass in a patch");return k(void 0,void 0,n,e)}return e}function N(e){return e.newFileName&&e.newFileName!==e.oldFileName}function L(e,n,t){return n===t?n:(e.conflict=!0,{mine:n,theirs:t})}function j(e,n){return e.oldStart<n.oldStart&&e.oldStart+e.oldLines<n.oldStart}function T(e,n){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+n,newLines:e.newLines,lines:e.lines}}function F(e,n,t,r,o){var i={offset:n,lines:t,index:0},u={offset:r,lines:o,index:0};for(O(e,i,u),O(e,u,i);i.index<i.lines.length&&u.index<u.lines.length;){var l=i.lines[i.index],s=u.lines[u.index];if("-"!==l[0]&&"+"!==l[0]||"-"!==s[0]&&"+"!==s[0])if("+"===l[0]&&" "===s[0]){var a;(a=e.lines).push.apply(a,h(D(i)))}else if("+"===s[0]&&" "===l[0]){var c;(c=e.lines).push.apply(c,h(D(u)))}else"-"===l[0]&&" "===s[0]?M(e,i,u):"-"===s[0]&&" "===l[0]?M(e,u,i,!0):l===s?(e.lines.push(l),i.index++,u.index++):E(e,D(i),D(u));else A(e,i,u)}H(e,i),H(e,u),C(e)}function A(e,n,t){var r,o,i=D(n),u=D(t);if(I(i)&&I(u)){var l,s;if(S(i,u)&&R(t,i,i.length-u.length))return void(l=e.lines).push.apply(l,h(i));if(S(u,i)&&R(n,u,u.length-i.length))return void(s=e.lines).push.apply(s,h(u))}else if(o=u,(r=i).length===o.length&&S(r,o)){var a;return void(a=e.lines).push.apply(a,h(i))}E(e,i,u)}function M(e,n,t,r){var o,i=D(n),u=function(e,n){for(var t=[],r=[],o=0,i=!1,u=!1;o<n.length&&e.index<e.lines.length;){var l=e.lines[e.index],s=n[o];if("+"===s[0])break;if(i=i||" "!==l[0],r.push(s),o++,"+"===l[0])for(u=!0;"+"===l[0];)t.push(l),l=e.lines[++e.index];s.substr(1)===l.substr(1)?(t.push(l),e.index++):u=!0}if("+"===(n[o]||"")[0]&&i&&(u=!0),u)return t;for(;o<n.length;)r.push(n[o++]);return{merged:r,changes:t}}(t,i);u.merged?(o=e.lines).push.apply(o,h(u.merged)):E(e,r?u:i,r?i:u)}function E(e,n,t){e.conflict=!0,e.lines.push({conflict:!0,mine:n,theirs:t})}function O(e,n,t){for(;n.offset<t.offset&&n.index<n.lines.length;){var r=n.lines[n.index++];e.lines.push(r),n.offset++}}function H(e,n){for(;n.index<n.lines.length;){var t=n.lines[n.index++];e.lines.push(t)}}function D(e){for(var n=[],t=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===t&&"+"===r[0]&&(t="+"),t!==r[0])break;n.push(r),e.index++}return n}function I(e){return e.reduce((function(e,n){return e&&"-"===n[0]}),!0)}function R(e,n,t){for(var r=0;r<t;r++){var o=n[n.length-t+r].substr(1);if(e.lines[e.index+r]!==" "+o)return!1}return e.index+=t,!0}g.tokenize=function(e){return e.slice()},g.join=g.removeEmpty=function(e){return e},e.Diff=n,e.diffChars=function(e,n,t){return o.diff(e,n,t)},e.diffWords=function(e,n,t){return t=i(t,{ignoreWhitespace:!0}),s.diff(e,n,t)},e.diffWordsWithSpace=function(e,n,t){return s.diff(e,n,t)},e.diffLines=c,e.diffTrimmedLines=function(e,n,t){var r=i(t,{ignoreWhitespace:!0});return a.diff(e,n,r)},e.diffSentences=function(e,n,t){return f.diff(e,n,t)},e.diffCss=function(e,n,t){return d.diff(e,n,t)},e.diffJson=function(e,n,t){return m.diff(e,n,t)},e.diffArrays=function(e,n,t){return g.diff(e,n,t)},e.structuredPatch=k,e.createTwoFilesPatch=x,e.createPatch=function(e,n,t,r,o,i){return x(e,e,n,t,r,o,i)},e.applyPatch=w,e.applyPatches=function(e,n){"string"==typeof e&&(e=y(e));var t=0;!function r(){var o=e[t++];if(!o)return n.complete();n.loadFile(o,(function(e,t){if(e)return n.complete(e);var i=w(t,o,n);n.patched(o,i,(function(e){if(e)return n.complete(e);r()}))}))}()},e.parsePatch=y,e.merge=function(e,n,t){e=P(e,t),n=P(n,t);var r={};(e.index||n.index)&&(r.index=e.index||n.index),(e.newFileName||n.newFileName)&&(N(e)?N(n)?(r.oldFileName=L(r,e.oldFileName,n.oldFileName),r.newFileName=L(r,e.newFileName,n.newFileName),r.oldHeader=L(r,e.oldHeader,n.oldHeader),r.newHeader=L(r,e.newHeader,n.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=n.oldFileName||e.oldFileName,r.newFileName=n.newFileName||e.newFileName,r.oldHeader=n.oldHeader||e.oldHeader,r.newHeader=n.newHeader||e.newHeader)),r.hunks=[];for(var o=0,i=0,u=0,l=0;o<e.hunks.length||i<n.hunks.length;){var s=e.hunks[o]||{oldStart:1/0},a=n.hunks[i]||{oldStart:1/0};if(j(s,a))r.hunks.push(T(s,u)),o++,l+=s.newLines-s.oldLines;else if(j(a,s))r.hunks.push(T(a,l)),i++,u+=a.newLines-a.oldLines;else{var c={oldStart:Math.min(s.oldStart,a.oldStart),oldLines:0,newStart:Math.min(s.newStart+u,a.oldStart+l),newLines:0,lines:[]};F(c,s.oldStart,s.lines,a.oldStart,a.lines),i++,o++,r.hunks.push(c)}}return r},e.convertChangesToDMP=function(e){for(var n,t,r=[],o=0;o<e.length;o++)t=(n=e[o]).added?1:n.removed?-1:0,r.push([t,n.value]);return r},e.convertChangesToXML=function(e){for(var n=[],t=0;t<e.length;t++){var r=e[t];r.added?n.push("<ins>"):r.removed&&n.push("<del>"),n.push((o=r.value,void 0,o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"))),r.added?n.push("</ins>"):r.removed&&n.push("</del>")}var o;return n.join("")},e.canonicalize=v,Object.defineProperty(e,"__esModule",{value:!0})}(n)},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DecisionButtons=void 0;const r=t(0);n.DecisionButtons=e=>function({value:n,onChange:t}){return r.h("div",{className:"decision-buttons"},e.map(e=>r.h("button",{key:e,onClick:()=>t(e),className:n===e?"active":""},e)))}},function(e,n,t){(function(e){function t(e,n){for(var t=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),t++):t&&(e.splice(r,1),t--)}if(n)for(;t--;t)e.unshift("..");return e}function r(e,n){if(e.filter)return e.filter(n);for(var t=[],r=0;r<e.length;r++)n(e[r],r,e)&&t.push(e[r]);return t}n.resolve=function(){for(var n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var u=i>=0?arguments[i]:e.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(n=u+"/"+n,o="/"===u.charAt(0))}return(o?"/":"")+(n=t(r(n.split("/"),(function(e){return!!e})),!o).join("/"))||"."},n.normalize=function(e){var i=n.isAbsolute(e),u="/"===o(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&u&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,n){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var n=0;n<e.length&&""===e[n];n++);for(var t=e.length-1;t>=0&&""===e[t];t--);return n>t?[]:e.slice(n,t-n+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var o=r(e.split("/")),i=r(t.split("/")),u=Math.min(o.length,i.length),l=u,s=0;s<u;s++)if(o[s]!==i[s]){l=s;break}var a=[];for(s=l;s<o.length;s++)a.push("..");return(a=a.concat(i.slice(l))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var n=e.charCodeAt(0),t=47===n,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(n=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?t?"/":".":t&&1===r?"/":e.slice(0,r)},n.basename=function(e,n){var t=function(e){"string"!=typeof e&&(e+="");var n,t=0,r=-1,o=!0;for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){t=n+1;break}}else-1===r&&(o=!1,r=n+1);return-1===r?"":e.slice(t,r)}(e);return n&&t.substr(-1*n.length)===n&&(t=t.substr(0,t.length-n.length)),t},n.extname=function(e){"string"!=typeof e&&(e+="");for(var n=-1,t=0,r=-1,o=!0,i=0,u=e.length-1;u>=0;--u){var l=e.charCodeAt(u);if(47!==l)-1===r&&(o=!1,r=u+1),46===l?-1===n?n=u:1!==i&&(i=1):-1!==n&&(i=-1);else if(!o){t=u+1;break}}return-1===n||-1===r||0===i||1===i&&n===r-1&&n===t+1?"":e.slice(n,r)};var o="b"==="ab".substr(-1)?function(e,n,t){return e.substr(n,t)}:function(e,n,t){return n<0&&(n=e.length+n),e.substr(n,t)}}).call(this,t(12))},function(e,n){var t,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function l(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,a=[],c=!1,f=-1;function d(){c&&s&&(c=!1,s.length?a=s.concat(a):f=-1,a.length&&p())}function p(){if(!c){var e=l(d);c=!0;for(var n=a.length;n;){for(s=a,a=[];++f<n;)s&&s[f].run();f=-1,n=a.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function _(){}o.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];a.push(new h(e,n)),1!==a.length||c||l(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=_,o.addListener=_,o.once=_,o.off=_,o.removeListener=_,o.removeAllListeners=_,o.emit=_,o.prependListener=_,o.prependOnceListener=_,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Intro=void 0;const r=t(0);n.Intro=({onPick:e})=>r.h("div",{className:"intro"},r.h("div",null,r.h("header",null,"Debug Doctor"),r.h("div",{className:"intro-content"},r.h("p",null,"What are you trying to find out?"),r.h("ul",null,r.h("li",null,r.h("a",{role:"button",onClick:()=>e(1)},"Why my breakpoints don't bind")),r.h("li",null,r.h("a",{role:"button",onClick:()=>e(2)},"What scripts and sourcemaps are loaded")),r.h("li",null,r.h("a",{href:"https://github.com/microsoft/vscode-js-debug/issues/new/choose"},"Something else..."))))))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Source=n.SourceExplorer=void 0;const r=t(0),o=t(1),i=t(4),u=t(5),l=t(2),s=t(3);n.SourceExplorer=()=>{const e=l.useDump(),t=o.useMemo(()=>{const n=new Map;for(const t of e.sources)n.set(t.uniqueId,t);return n},[e.sources]),i=o.useMemo(()=>e.sources.map(e=>[[e.url,e.absolutePath,e.prettyName].join(" ").toLowerCase(),e]).sort((e,n)=>u.sortScore(e[1])-u.sortScore(n[1])),[e.sources]),[a,c]=s.usePersistedState("filter",""),f=o.useMemo(()=>a?i.filter(([e])=>e.includes(a.toLowerCase())).map(([,e])=>e):i.map(e=>e[1]),[i,a]),d=o.useCallback(e=>c(e.target.value),[]);return r.h(r.Fragment,null,r.h("input",{placeholder:"Filter sources.