mirror of
https://github.com/leoherzog/TorrentParts.git
synced 2026-01-24 04:08:04 -08:00
87 lines
524 KiB
JavaScript
87 lines
524 KiB
JavaScript
!function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};t[s][0].call(p.exports,(function(e){return r(t[s][1][e]||e)}),p,p.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(e,t,n){(function(e){(function(){"use strict";function t(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function i(e){if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function r(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function o(e){return e instanceof i(e).Element||e instanceof Element}function s(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function c(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function l(e){return t(c(e)).left+r(e).scrollLeft}function p(e){return i(e).getComputedStyle(e)}function u(e){var t=p(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function d(e,n,o){void 0===o&&(o=!1);var p,d,f=c(n),h=t(e),m=s(n),g={scrollLeft:0,scrollTop:0},v={x:0,y:0};return(m||!m&&!o)&&(("body"!==a(n)||u(f))&&(g=(p=n)!==i(p)&&s(p)?{scrollLeft:(d=p).scrollLeft,scrollTop:d.scrollTop}:r(p)),s(n)?((v=t(n)).x+=n.clientLeft,v.y+=n.clientTop):f&&(v.x=l(f))),{x:h.left+g.scrollLeft-v.x,y:h.top+g.scrollTop-v.y,width:h.width,height:h.height}}function f(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function h(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||e.host||c(e)}function m(e){return["html","body","#document"].indexOf(a(e))>=0?e.ownerDocument.body:s(e)&&u(e)?e:m(h(e))}function g(e,t){void 0===t&&(t=[]);var n=m(e),r="body"===a(n),o=i(n),s=r?[o].concat(o.visualViewport||[],u(n)?n:[]):n,c=t.concat(s);return r?c:c.concat(g(h(s)))}function v(e){return["table","td","th"].indexOf(a(e))>=0}function b(e){if(!s(e)||"fixed"===p(e).position)return null;var t=e.offsetParent;if(t){var n=c(t);if("body"===a(t)&&"static"===p(t).position&&"static"!==p(n).position)return n}return t}function x(e){for(var t=i(e),n=b(e);n&&v(n)&&"static"===p(n).position;)n=b(n);return n&&"body"===a(n)&&"static"===p(n).position?t:n||function(e){for(var t=h(e);s(t)&&["html","body"].indexOf(a(t))<0;){var n=p(t);if("none"!==n.transform||"none"!==n.perspective||n.willChange&&"auto"!==n.willChange)return t;t=t.parentNode}return null}(e)||t}Object.defineProperty(n,"__esModule",{value:!0});var y="top",_="bottom",w="right",k="left",E="auto",S=[y,_,w,k],C="start",T="end",j="viewport",A="popper",L=S.reduce((function(e,t){return e.concat([t+"-"+C,t+"-"+T])}),[]),I=[].concat(S,[E]).reduce((function(e,t){return e.concat([t,t+"-"+C,t+"-"+T])}),[]),O=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),i}function B(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return[].concat(n).reduce((function(e,t){return e.replace(/%s/,t)}),e)}var U='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',M=["name","enabled","phase","fn","effect","requires","options"];function P(e){return e.split("-")[0]}function N(e,t){var n,r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&((n=r)instanceof i(n).ShadowRoot||n instanceof ShadowRoot)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function D(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function q(e,n){return n===j?D(function(e){var t=i(e),n=c(e),r=t.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,p=0;return r&&(o=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,p=r.offsetTop)),{width:o,height:s,x:a+l(e),y:p}}(e)):s(n)?function(e){var n=t(e);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(n):D(function(e){var t=c(e),n=r(e),i=e.ownerDocument.body,o=Math.max(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Math.max(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-n.scrollLeft+l(e),u=-n.scrollTop;return"rtl"===p(i||t).direction&&(a+=Math.max(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(c(e)))}function H(e,t,n){var i="clippingParents"===t?function(e){var t=g(h(e)),n=["absolute","fixed"].indexOf(p(e).position)>=0&&s(e)?x(e):e;return o(n)?t.filter((function(e){return o(e)&&N(e,n)&&"body"!==a(e)})):[]}(e):[].concat(t),r=[].concat(i,[n]),c=r[0],l=r.reduce((function(t,n){var i=q(e,n);return t.top=Math.max(i.top,t.top),t.right=Math.min(i.right,t.right),t.bottom=Math.min(i.bottom,t.bottom),t.left=Math.max(i.left,t.left),t}),q(e,c));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function F(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function W(e){var t,n=e.reference,i=e.element,r=e.placement,o=r?P(r):null,s=r?F(r):null,a=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(o){case y:t={x:a,y:n.y-i.height};break;case _:t={x:a,y:n.y+n.height};break;case w:t={x:n.x+n.width,y:c};break;case k:t={x:n.x-i.width,y:c};break;default:t={x:n.x,y:n.y}}var l=o?z(o):null;if(null!=l){var p="y"===l?"height":"width";switch(s){case C:t[l]=Math.floor(t[l])-Math.floor(n[p]/2-i[p]/2);break;case T:t[l]=Math.floor(t[l])+Math.ceil(n[p]/2-i[p]/2)}}return t}function V(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function $(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function G(e,n){void 0===n&&(n={});var i=n,r=i.placement,s=void 0===r?e.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,p=i.rootBoundary,u=void 0===p?j:p,d=i.elementContext,f=void 0===d?A:d,h=i.altBoundary,m=void 0!==h&&h,g=i.padding,v=void 0===g?0:g,b=V("number"!=typeof v?v:$(v,S)),x=f===A?"reference":A,k=e.elements.reference,E=e.rects.popper,C=e.elements[m?x:f],T=H(o(C)?C:C.contextElement||c(e.elements.popper),l,u),L=t(k),I=W({reference:L,element:E,strategy:"absolute",placement:s}),O=D(Object.assign(Object.assign({},E),I)),R=f===A?O:L,B={top:T.top-R.top+b.top,bottom:R.bottom-T.bottom+b.bottom,left:T.left-R.left+b.left,right:R.right-T.right+b.right},U=e.modifiersData.offset;if(f===A&&U){var M=U[s];Object.keys(B).forEach((function(e){var t=[w,_].indexOf(e)>=0?1:-1,n=[y,_].indexOf(e)>=0?"y":"x";B[e]+=M[n]*t}))}return B}var Y="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",K={placement:"bottom",modifiers:[],strategy:"absolute"};function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function J(t){void 0===t&&(t={});var n=t,i=n.defaultModifiers,r=void 0===i?[]:i,s=n.defaultOptions,a=void 0===s?K:s;return function(t,n,i){void 0===i&&(i=a);var s,c,l={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},K),a),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],h=!1,m={state:l,setOptions:function(i){v(),l.options=Object.assign(Object.assign(Object.assign({},a),l.options),i),l.scrollParents={reference:o(t)?g(t):t.contextElement?g(t.contextElement):[],popper:g(n)};var s,c,d,f=function(e){var t=R(e);return O.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,l.options.modifiers)));if(l.orderedModifiers=f.filter((function(e){return e.enabled})),"production"!==e.env.NODE_ENV){if(function(e){e.forEach((function(t){Object.keys(t).forEach((function(n){switch(n){case"name":"string"!=typeof t.name&&console.error(B(U,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":"boolean"!=typeof t.enabled&&console.error(B(U,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));case"phase":O.indexOf(t.phase)<0&&console.error(B(U,t.name,'"phase"',"either "+O.join(", "),'"'+String(t.phase)+'"'));break;case"fn":"function"!=typeof t.fn&&console.error(B(U,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":"function"!=typeof t.effect&&console.error(B(U,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":Array.isArray(t.requires)||console.error(B(U,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(B(U,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+M.map((function(e){return'"'+e+'"'})).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach((function(n){null==e.find((function(e){return e.name===n}))&&console.error(B('Popper: modifier "%s" requires "%s", but "%s" modifier is not available',String(t.name),n,n))}))}))}))}((s=[].concat(f,l.options.modifiers),c=function(e){return e.name},d=new Set,s.filter((function(e){var t=c(e);if(!d.has(t))return d.add(t),!0})))),P(l.options.placement)===E)l.orderedModifiers.find((function(e){return"flip"===e.name}))||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "));var h=p(n);[h.marginTop,h.marginRight,h.marginBottom,h.marginLeft].some((function(e){return parseFloat(e)}))&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var o=r({state:l,name:t,instance:m,options:i}),s=function(){};u.push(o||s)}})),m.update()},forceUpdate:function(){if(!h){var t=l.elements,n=t.reference,i=t.popper;if(X(n,i)){l.rects={reference:d(n,x(i),"fixed"===l.options.strategy),popper:f(i)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0,o=0;o<l.orderedModifiers.length;o++){if("production"!==e.env.NODE_ENV&&(r+=1)>100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==l.reset){var s=l.orderedModifiers[o],a=s.fn,c=s.options,p=void 0===c?{}:c,u=s.name;"function"==typeof a&&(l=a({state:l,options:p,name:u,instance:m})||l)}else l.reset=!1,o=-1}}else"production"!==e.env.NODE_ENV&&console.error(Y)}},update:(s=function(){return new Promise((function(e){m.forceUpdate(),e(l)}))},function(){return c||(c=new Promise((function(e){Promise.resolve().then((function(){c=void 0,e(s())}))}))),c}),destroy:function(){v(),h=!0}};if(!X(t,n))return"production"!==e.env.NODE_ENV&&console.error(Y),m;function v(){u.forEach((function(e){return e()})),u=[]}return m.setOptions(i).then((function(e){!h&&i.onFirstUpdate&&i.onFirstUpdate(e)})),m}}var Z={passive:!0};var Q={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=void 0===o||o,a=r.resize,c=void 0===a||a,l=i(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&p.forEach((function(e){e.addEventListener("scroll",n.update,Z)})),c&&l.addEventListener("resize",n.update,Z),function(){s&&p.forEach((function(e){e.removeEventListener("scroll",n.update,Z)})),c&&l.removeEventListener("resize",n.update,Z)}},data:{}};var ee={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=W({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.offsets,a=e.position,l=e.gpuAcceleration,p=e.adaptive,u=function(e){var t=e.x,n=e.y,i=window.devicePixelRatio||1;return{x:Math.round(t*i)/i||0,y:Math.round(n*i)/i||0}}(s),d=u.x,f=u.y,h=s.hasOwnProperty("x"),m=s.hasOwnProperty("y"),g=k,v=y,b=window;if(p){var E=x(n);E===i(n)&&(E=c(n)),o===y&&(v=_,f-=E.clientHeight-r.height,f*=l?1:-1),o===k&&(g=w,d-=E.clientWidth-r.width,d*=l?1:-1)}var S,C=Object.assign({position:a},p&&te);return l?Object.assign(Object.assign({},C),{},((S={})[v]=m?"0":"",S[g]=h?"0":"",S.transform=(b.devicePixelRatio||1)<2?"translate("+d+"px, "+f+"px)":"translate3d("+d+"px, "+f+"px, 0)",S)):Object.assign(Object.assign({},C),{},((t={})[v]=m?f+"px":"",t[g]=h?d+"px":"",t.transform="",t))}var ie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,i=t.options,r=i.gpuAcceleration,o=void 0===r||r,s=i.adaptive,a=void 0===s||s;if("production"!==e.env.NODE_ENV){var c=p(n.elements.popper).transitionProperty||"";a&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var l={placement:P(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign(Object.assign({},n.styles.popper),ne(Object.assign(Object.assign({},l),{},{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign(Object.assign({},n.styles.arrow),ne(Object.assign(Object.assign({},l),{},{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1})))),n.attributes.popper=Object.assign(Object.assign({},n.attributes.popper),{},{"data-popper-placement":n.placement})},data:{}};var re={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];s(r)&&a(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});s(i)&&a(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]};var oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,o=void 0===r?[0,0]:r,s=I.reduce((function(e,n){return e[n]=function(e,t,n){var i=P(e),r=[k,y].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign(Object.assign({},t),{},{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[k,w].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],c=a.x,l=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=s}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function pe(t,n){void 0===n&&(n={});var i=n,r=i.placement,o=i.boundary,s=i.rootBoundary,a=i.padding,c=i.flipVariations,l=i.allowedAutoPlacements,p=void 0===l?I:l,u=F(r),d=u?c?L:L.filter((function(e){return F(e)===u})):S,f=d.filter((function(e){return p.indexOf(e)>=0}));0===f.length&&(f=d,"production"!==e.env.NODE_ENV&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var h=f.reduce((function(e,n){return e[n]=G(t,{placement:n,boundary:o,rootBoundary:s,padding:a})[P(n)],e}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}var ue={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,l=n.padding,p=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=P(g),b=c||(v===g||!h?[ae(g)]:function(e){if(P(e)===E)return[];var t=ae(e);return[le(e),t,le(t)]}(g)),x=[g].concat(b).reduce((function(e,n){return e.concat(P(n)===E?pe(t,{placement:n,boundary:p,rootBoundary:u,padding:l,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),S=t.rects.reference,T=t.rects.popper,j=new Map,A=!0,L=x[0],I=0;I<x.length;I++){var O=x[I],R=P(O),B=F(O)===C,U=[y,_].indexOf(R)>=0,M=U?"width":"height",N=G(t,{placement:O,boundary:p,rootBoundary:u,altBoundary:d,padding:l}),D=U?B?w:k:B?_:y;S[M]>T[M]&&(D=ae(D));var q=ae(D),H=[];if(o&&H.push(N[R]<=0),a&&H.push(N[D]<=0,N[q]<=0),H.every((function(e){return e}))){L=O,A=!1;break}j.set(O,H)}if(A)for(var z=function(e){var t=x.find((function(t){var n=j.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},W=h?3:1;W>0;W--){if("break"===z(W))break}t.placement!==L&&(t.modifiersData[i]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return Math.max(e,Math.min(t,n))}var fe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0!==s&&s,c=n.boundary,l=n.rootBoundary,p=n.altBoundary,u=n.padding,d=n.tether,h=void 0===d||d,m=n.tetherOffset,g=void 0===m?0:m,v=G(t,{boundary:c,rootBoundary:l,padding:u,altBoundary:p}),b=P(t.placement),E=F(t.placement),S=!E,T=z(b),j="x"===T?"y":"x",A=t.modifiersData.popperOffsets,L=t.rects.reference,I=t.rects.popper,O="function"==typeof g?g(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):g,R={x:0,y:0};if(A){if(o){var B="y"===T?y:k,U="y"===T?_:w,M="y"===T?"height":"width",N=A[T],D=A[T]+v[B],q=A[T]-v[U],H=h?-I[M]/2:0,W=E===C?L[M]:I[M],V=E===C?-I[M]:-L[M],$=t.elements.arrow,Y=h&&$?f($):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=K[B],J=K[U],Z=de(0,L[M],Y[M]),Q=S?L[M]/2-H-Z-X-O:W-Z-X-O,ee=S?-L[M]/2+H+Z+J+O:V+Z+J+O,te=t.elements.arrow&&x(t.elements.arrow),ne=te?"y"===T?te.clientTop||0:te.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][T]:0,re=A[T]+Q-ie-ne,oe=A[T]+ee-ie,se=de(h?Math.min(D,re):D,N,h?Math.max(q,oe):q);A[T]=se,R[T]=se-N}if(a){var ae="x"===T?y:k,ce="x"===T?_:w,le=A[j],pe=de(le+v[ae],le,le-v[ce]);A[j]=pe,R[j]=pe-le}t.modifiersData[i]=R}},requiresIfExists:["offset"]};var he={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,r=n.elements.arrow,o=n.modifiersData.popperOffsets,s=P(n.placement),a=z(s),c=[k,w].indexOf(s)>=0?"height":"width";if(r&&o){var l=n.modifiersData[i+"#persistent"].padding,p=f(r),u="y"===a?y:k,d="y"===a?_:w,h=n.rects.reference[c]+n.rects.reference[a]-o[a]-n.rects.popper[c],m=o[a]-n.rects.reference[a],g=x(r),v=g?"y"===a?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,E=l[u],S=v-p[c]-l[d],C=v/2-p[c]/2+b,T=de(E,C,S),j=a;n.modifiersData[i]=((t={})[j]=T,t.centerOffset=T-C,t)}},effect:function(t){var n=t.state,i=t.options,r=t.name,o=i.element,a=void 0===o?"[data-popper-arrow]":o,c=i.padding,l=void 0===c?0:c;null!=a&&("string"!=typeof a||(a=n.elements.popper.querySelector(a)))&&("production"!==e.env.NODE_ENV&&(s(a)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),N(n.elements.popper,a)?(n.elements.arrow=a,n.modifiersData[r+"#persistent"]={padding:V("number"!=typeof l?l:$(l,S))}):"production"!==e.env.NODE_ENV&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ge(e){return[y,w,_,k].some((function(t){return e[t]>=0}))}var ve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=G(t,{elementContext:"reference"}),a=G(t,{altBoundary:!0}),c=me(s,i),l=me(a,r,o),p=ge(c),u=ge(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=J({defaultModifiers:[Q,ee,ie,re]}),xe=[Q,ee,ie,re,oe,ue,fe,he,ve],ye=J({defaultModifiers:xe});n.applyStyles=re,n.arrow=he,n.computeStyles=ie,n.createPopper=ye,n.createPopperLite=be,n.defaultModifiers=xe,n.detectOverflow=G,n.eventListeners=Q,n.flip=ue,n.hide=ve,n.offset=oe,n.popperGenerator=J,n.popperOffsets=ee,n.preventOverflow=fe}).call(this)}).call(this,e("_process"))},{_process:187}],2:[function(e,t,n){(function(e){(function(){void 0===e&&(e=void 0),function(){"use strict";void 0===e&&(e=Array),t.exports=e}()}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],3:[function(e,t,n){const i=/^\[?([^\]]+)\]?:(\d+)$/;let r={},o=0;t.exports=function(e){if(1e5===o&&t.exports.reset(),!r[e]){const t=i.exec(e);if(!t)throw new Error("invalid addr: "+e);r[e]=[t[1],Number(t[2])],o+=1}return r[e]},t.exports.reset=function(){r={},o=0}},{}],4:[function(e,t,n){"use strict";n.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},n.toByteArray=function(e){var t,n,i=l(e),s=i[0],a=i[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),p=0,u=a>0?s-4:s;for(n=0;n<u;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[p++]=t>>16&255,c[p++]=t>>8&255,c[p++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[p++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[p++]=t>>8&255,c[p++]=255&t);return c},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=16383,a=0,c=n-r;a<c;a+=s)o.push(p(e,a,a+s>c?c:a+s));1===r?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function p(e,t,n){for(var r,o,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},{}],5:[function(e,t,n){var i=e("safe-buffer").Buffer;function r(e,t,n){for(var i=0,r=1,o=t;o<n;o++){var s=e[o];if(s<58&&s>=48)i=10*i+(s-48);else if(o!==t||43!==s){if(o!==t||45!==s){if(46===s)break;throw new Error("not a number: buffer["+o+"] = "+s)}r=-1}}return i*r}function o(e,t,n,r){return null==e||0===e.length?null:("number"!=typeof t&&null==r&&(r=t,t=void 0),"number"!=typeof n&&null==r&&(r=n,n=void 0),o.position=0,o.encoding=r||null,o.data=i.isBuffer(e)?e.slice(t,n):i.from(e),o.bytes=o.data.length,o.next())}o.bytes=0,o.position=0,o.data=null,o.encoding=null,o.next=function(){switch(o.data[o.position]){case 100:return o.dictionary();case 108:return o.list();case 105:return o.integer();default:return o.buffer()}},o.find=function(e){for(var t=o.position,n=o.data.length,i=o.data;t<n;){if(i[t]===e)return t;t++}throw new Error('Invalid data: Missing delimiter "'+String.fromCharCode(e)+'" [0x'+e.toString(16)+"]")},o.dictionary=function(){o.position++;for(var e={};101!==o.data[o.position];)e[o.buffer()]=o.next();return o.position++,e},o.list=function(){o.position++;for(var e=[];101!==o.data[o.position];)e.push(o.next());return o.position++,e},o.integer=function(){var e=o.find(101),t=r(o.data,o.position+1,e);return o.position+=e+1-o.position,t},o.buffer=function(){var e=o.find(58),t=r(o.data,o.position,e),n=++e+t;return o.position=n,o.encoding?o.data.toString(o.encoding,e,n):o.data.slice(e,n)},t.exports=o},{"safe-buffer":220}],6:[function(e,t,n){var i=e("safe-buffer").Buffer;function r(e,t,n){var o=[],s=null;return r._encode(o,e),s=i.concat(o),r.bytes=s.length,i.isBuffer(t)?(s.copy(t,n),t):s}r.bytes=-1,r._floatConversionDetected=!1,r.getType=function(e){return i.isBuffer(e)?"buffer":Array.isArray(e)?"array":ArrayBuffer.isView(e)?"arraybufferview":e instanceof Number?"number":e instanceof Boolean?"boolean":e instanceof ArrayBuffer?"arraybuffer":typeof e},r._encode=function(e,t){if(null!=t)switch(r.getType(t)){case"buffer":r.buffer(e,t);break;case"object":r.dict(e,t);break;case"array":r.list(e,t);break;case"string":r.string(e,t);break;case"number":case"boolean":r.number(e,t);break;case"arraybufferview":r.buffer(e,i.from(t.buffer,t.byteOffset,t.byteLength));break;case"arraybuffer":r.buffer(e,i.from(t))}};var o=i.from("e"),s=i.from("d"),a=i.from("l");r.buffer=function(e,t){e.push(i.from(t.length+":"),t)},r.string=function(e,t){e.push(i.from(i.byteLength(t)+":"+t))},r.number=function(e,t){var n=2147483648,o=(t/n<<0)*n+(t%n<<0);e.push(i.from("i"+o+"e")),o===t||r._floatConversionDetected||(r._floatConversionDetected=!0,console.warn('WARNING: Possible data corruption detected with value "'+t+'":','Bencoding only defines support for integers, value was converted to "'+o+'"'),console.trace())},r.dict=function(e,t){e.push(s);for(var n,i=0,a=Object.keys(t).sort(),c=a.length;i<c;i++)null!=t[n=a[i]]&&(r.string(e,n),r._encode(e,t[n]));e.push(o)},r.list=function(e,t){var n=0,i=t.length;for(e.push(a);n<i;n++)null!=t[n]&&r._encode(e,t[n]);e.push(o)},t.exports=r},{"safe-buffer":220}],7:[function(e,t,n){var i=t.exports;i.encode=e("./encode"),i.decode=e("./decode"),i.byteLength=i.encodingLength=function(e){return i.encode(e).length}},{"./decode":5,"./encode":6}],8:[function(e,t,n){function i(e){return e.reduce(((e,t,n,i)=>{const r=t.split("-").map((e=>parseInt(e)));return e.concat(((e,t=e)=>Array.from({length:t-e+1},((t,n)=>n+e)))(...r))}),[])}t.exports=i,t.exports.parse=i,t.exports.compose=function(e){return e.reduce(((e,t,n,i)=>(0!==n&&t===i[n-1]+1||e.push([]),e[e.length-1].push(t),e)),[]).map((e=>e.length>1?`${e[0]}-${e[e.length-1]}`:""+e[0]))}},{}],9:[function(e,t,n){t.exports=function(e,t,n,i,r){var o,s;if(void 0===i)i=0;else if((i|=0)<0||i>=e.length)throw new RangeError("invalid lower bound");if(void 0===r)r=e.length-1;else if((r|=0)<i||r>=e.length)throw new RangeError("invalid upper bound");for(;i<=r;)if((s=+n(e[o=i+(r-i>>>1)],t,o,e))<0)i=o+1;else{if(!(s>0))return o;r=o-1}return~i}},{}],10:[function(e,t,n){function i(e){let t=e>>3;return e%8!=0&&t++,t}void 0!==t&&(t.exports=class{constructor(e=0,t){const n=null!=t&&t.grow;this.grow=n&&isFinite(n)&&i(n)||n||0,this.buffer="number"==typeof e?new Uint8Array(i(e)):e}get(e){const t=e>>3;return t<this.buffer.length&&!!(this.buffer[t]&128>>e%8)}set(e,t=!0){const n=e>>3;if(t){if(this.buffer.length<n+1){const e=Math.max(n+1,Math.min(2*this.buffer.length,this.grow));if(e<=this.grow){const t=new Uint8Array(e);t.set(this.buffer),this.buffer=t}}this.buffer[n]|=128>>e%8}else n<this.buffer.length&&(this.buffer[n]&=~(128>>e%8))}})},{}],11:[function(e,t,n){(function(n){(function(){
|
||
/*! bittorrent-protocol. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const i=e("unordered-array-remove"),r=e("bencode"),o=e("bitfield").default,s=e("debug")("bittorrent-protocol"),a=e("randombytes"),c=e("speedometer"),l=e("readable-stream"),p=n.from("BitTorrent protocol"),u=n.from([0,0,0,0]),d=n.from([0,0,0,1,0]),f=n.from([0,0,0,1,1]),h=n.from([0,0,0,1,2]),m=n.from([0,0,0,1,3]),g=[0,0,0,0,0,0,0,0],v=[0,0,0,3,9,0,0];class b{constructor(e,t,n,i){this.piece=e,this.offset=t,this.length=n,this.callback=i}}class x extends l.Duplex{constructor(){super(),this._debugId=a(4).toString("hex"),this._debug("new wire"),this.peerId=null,this.peerIdBuffer=null,this.type=null,this.amChoking=!0,this.amInterested=!1,this.peerChoking=!0,this.peerInterested=!1,this.peerPieces=new o(0,{grow:4e5}),this.peerExtensions={},this.requests=[],this.peerRequests=[],this.extendedMapping={},this.peerExtendedMapping={},this.extendedHandshake={},this.peerExtendedHandshake={},this._ext={},this._nextExt=1,this.uploaded=0,this.downloaded=0,this.uploadSpeed=c(),this.downloadSpeed=c(),this._keepAliveInterval=null,this._timeout=null,this._timeoutMs=0,this.destroyed=!1,this._finished=!1,this._parserSize=0,this._parser=null,this._buffer=[],this._bufferSize=0,this.once("finish",(()=>this._onFinish())),this._parseHandshake()}setKeepAlive(e){this._debug("setKeepAlive %s",e),clearInterval(this._keepAliveInterval),!1!==e&&(this._keepAliveInterval=setInterval((()=>{this.keepAlive()}),55e3))}setTimeout(e,t){this._debug("setTimeout ms=%d unref=%s",e,t),this._clearTimeout(),this._timeoutMs=e,this._timeoutUnref=!!t,this._updateTimeout()}destroy(){this.destroyed||(this.destroyed=!0,this._debug("destroy"),this.emit("close"),this.end())}end(...e){this._debug("end"),this._onUninterested(),this._onChoke(),super.end(...e)}use(e){const t=e.prototype.name;if(!t)throw new Error('Extension class requires a "name" property on the prototype');this._debug("use extension.name=%s",t);const n=this._nextExt,i=new e(this);function r(){}"function"!=typeof i.onHandshake&&(i.onHandshake=r),"function"!=typeof i.onExtendedHandshake&&(i.onExtendedHandshake=r),"function"!=typeof i.onMessage&&(i.onMessage=r),this.extendedMapping[n]=t,this._ext[t]=i,this[t]=i,this._nextExt+=1}keepAlive(){this._debug("keep-alive"),this._push(u)}handshake(e,t,i){let r,o;if("string"==typeof e?(e=e.toLowerCase(),r=n.from(e,"hex")):(r=e,e=r.toString("hex")),"string"==typeof t?o=n.from(t,"hex"):(o=t,t=o.toString("hex")),20!==r.length||20!==o.length)throw new Error("infoHash and peerId MUST have length 20");this._debug("handshake i=%s p=%s exts=%o",e,t,i);const s=n.from(g);s[5]|=16,i&&i.dht&&(s[7]|=1),this._push(n.concat([p,s,r,o])),this._handshakeSent=!0,this.peerExtensions.extended&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_sendExtendedHandshake(){const e=Object.assign({},this.extendedHandshake);e.m={};for(const t in this.extendedMapping){const n=this.extendedMapping[t];e.m[n]=Number(t)}this.extended(0,r.encode(e)),this._extendedHandshakeSent=!0}choke(){if(!this.amChoking){for(this.amChoking=!0,this._debug("choke");this.peerRequests.length;)this.peerRequests.pop();this._push(d)}}unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),this._push(f))}interested(){this.amInterested||(this.amInterested=!0,this._debug("interested"),this._push(h))}uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("uninterested"),this._push(m))}have(e){this._debug("have %d",e),this._message(4,[e],null)}bitfield(e){this._debug("bitfield"),n.isBuffer(e)||(e=e.buffer),this._message(5,[],e)}request(e,t,n,i){return i||(i=()=>{}),this._finished?i(new Error("wire is closed")):this.peerChoking?i(new Error("peer is choking")):(this._debug("request index=%d offset=%d length=%d",e,t,n),this.requests.push(new b(e,t,n,i)),this._updateTimeout(),void this._message(6,[e,t,n],null))}piece(e,t,n){this._debug("piece index=%d offset=%d",e,t),this.uploaded+=n.length,this.uploadSpeed(n.length),this.emit("upload",n.length),this._message(7,[e,t],n)}cancel(e,t,n){this._debug("cancel index=%d offset=%d length=%d",e,t,n),this._callback(this._pull(this.requests,e,t,n),new Error("request was cancelled"),null),this._message(8,[e,t,n],null)}port(e){this._debug("port %d",e);const t=n.from(v);t.writeUInt16BE(e,5),this._push(t)}extended(e,t){if(this._debug("extended ext=%s",e),"string"==typeof e&&this.peerExtendedMapping[e]&&(e=this.peerExtendedMapping[e]),"number"!=typeof e)throw new Error("Unrecognized extension: "+e);{const i=n.from([e]),o=n.isBuffer(t)?t:r.encode(t);this._message(20,[],n.concat([i,o]))}}_read(){}_message(e,t,i){const r=i?i.length:0,o=n.allocUnsafe(5+4*t.length);o.writeUInt32BE(o.length+r-4,0),o[4]=e;for(let e=0;e<t.length;e++)o.writeUInt32BE(t[e],5+4*e);this._push(o),i&&this._push(i)}_push(e){if(!this._finished)return this.push(e)}_onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")}_onHandshake(e,t,n){const i=e.toString("hex"),r=t.toString("hex");let o;for(o in this._debug("got handshake i=%s p=%s exts=%o",i,r,n),this.peerId=r,this.peerIdBuffer=t,this.peerExtensions=n,this.emit("handshake",i,r,n),this._ext)this._ext[o].onHandshake(i,r,n);n.extended&&this._handshakeSent&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_onChoke(){for(this.peerChoking=!0,this._debug("got choke"),this.emit("choke");this.requests.length;)this._callback(this.requests.pop(),new Error("peer is choking"),null)}_onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit("unchoke")}_onInterested(){this.peerInterested=!0,this._debug("got interested"),this.emit("interested")}_onUninterested(){this.peerInterested=!1,this._debug("got uninterested"),this.emit("uninterested")}_onHave(e){this.peerPieces.get(e)||(this._debug("got have %d",e),this.peerPieces.set(e,!0),this.emit("have",e))}_onBitField(e){this.peerPieces=new o(e),this._debug("got bitfield"),this.emit("bitfield",this.peerPieces)}_onRequest(e,t,n){if(this.amChoking)return;this._debug("got request index=%d offset=%d length=%d",e,t,n);const i=(i,o)=>{if(r===this._pull(this.peerRequests,e,t,n))return i?this._debug("error satisfying request index=%d offset=%d length=%d (%s)",e,t,n,i.message):void this.piece(e,t,o)},r=new b(e,t,n,i);this.peerRequests.push(r),this.emit("request",e,t,n,i)}_onPiece(e,t,n){this._debug("got piece index=%d offset=%d",e,t),this._callback(this._pull(this.requests,e,t,n.length),null,n),this.downloaded+=n.length,this.downloadSpeed(n.length),this.emit("download",n.length),this.emit("piece",e,t,n)}_onCancel(e,t,n){this._debug("got cancel index=%d offset=%d length=%d",e,t,n),this._pull(this.peerRequests,e,t,n),this.emit("cancel",e,t,n)}_onPort(e){this._debug("got port %d",e),this.emit("port",e)}_onExtended(e,t){if(0===e){let e,n;try{e=r.decode(t)}catch(e){this._debug("ignoring invalid extended handshake: %s",e.message||e)}if(!e)return;if(this.peerExtendedHandshake=e,"object"==typeof e.m)for(n in e.m)this.peerExtendedMapping[n]=Number(e.m[n].toString());for(n in this._ext)this.peerExtendedMapping[n]&&this._ext[n].onExtendedHandshake(this.peerExtendedHandshake);this._debug("got extended handshake"),this.emit("extended","handshake",this.peerExtendedHandshake)}else this.extendedMapping[e]&&(e=this.extendedMapping[e],this._ext[e]&&this._ext[e].onMessage(t)),this._debug("got extended message ext=%s",e),this.emit("extended",e,t)}_onTimeout(){this._debug("request timed out"),this._callback(this.requests.shift(),new Error("request has timed out"),null),this.emit("timeout")}_write(e,t,i){for(this._bufferSize+=e.length,this._buffer.push(e);this._bufferSize>=this._parserSize;){const e=1===this._buffer.length?this._buffer[0]:n.concat(this._buffer);this._bufferSize-=this._parserSize,this._buffer=this._bufferSize?[e.slice(this._parserSize)]:[],this._parser(e.slice(0,this._parserSize))}i(null)}_callback(e,t,n){e&&(this._clearTimeout(),this.peerChoking||this._finished||this._updateTimeout(),e.callback(t,n))}_clearTimeout(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}_updateTimeout(){this._timeoutMs&&this.requests.length&&!this._timeout&&(this._timeout=setTimeout((()=>this._onTimeout()),this._timeoutMs),this._timeoutUnref&&this._timeout.unref&&this._timeout.unref())}_parse(e,t){this._parserSize=e,this._parser=t}_onMessageLength(e){const t=e.readUInt32BE(0);t>0?this._parse(t,this._onMessage):(this._onKeepAlive(),this._parse(4,this._onMessageLength))}_onMessage(e){switch(this._parse(4,this._onMessageLength),e[0]){case 0:return this._onChoke();case 1:return this._onUnchoke();case 2:return this._onInterested();case 3:return this._onUninterested();case 4:return this._onHave(e.readUInt32BE(1));case 5:return this._onBitField(e.slice(1));case 6:return this._onRequest(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 7:return this._onPiece(e.readUInt32BE(1),e.readUInt32BE(5),e.slice(9));case 8:return this._onCancel(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 9:return this._onPort(e.readUInt16BE(1));case 20:return this._onExtended(e.readUInt8(1),e.slice(2));default:return this._debug("got unknown message"),this.emit("unknownmessage",e)}}_parseHandshake(){this._parse(1,(e=>{const t=e.readUInt8(0);this._parse(t+48,(e=>{const n=e.slice(0,t);if("BitTorrent protocol"!==n.toString())return this._debug("Error: wire not speaking BitTorrent protocol (%s)",n.toString()),void this.end();e=e.slice(t),this._onHandshake(e.slice(8,28),e.slice(28,48),{dht:!!(1&e[7]),extended:!!(16&e[5])}),this._parse(4,this._onMessageLength)}))}))}_onFinish(){for(this._finished=!0,this.push(null);this.read(););for(clearInterval(this._keepAliveInterval),this._parse(Number.MAX_VALUE,(()=>{}));this.peerRequests.length;)this.peerRequests.pop();for(;this.requests.length;)this._callback(this.requests.pop(),new Error("wire was closed"),null)}_debug(...e){e[0]=`[${this._debugId}] ${e[0]}`,s(...e)}_pull(e,t,n,r){for(let o=0;o<e.length;o++){const s=e[o];if(s.piece===t&&s.offset===n&&s.length===r)return i(e,o),s}return null}}t.exports=x}).call(this)}).call(this,e("buffer").Buffer)},{bencode:7,bitfield:12,buffer:60,debug:13,randombytes:195,"readable-stream":30,speedometer:263,"unordered-array-remove":298}],12:[function(e,t,n){"use strict";function i(e){var t=e>>3;return e%8!=0&&t++,t}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){void 0===e&&(e=0);var n=null==t?void 0:t.grow;this.grow=n&&isFinite(n)&&i(n)||n||0,this.buffer="number"==typeof e?new Uint8Array(i(e)):e}return e.prototype.get=function(e){var t=e>>3;return t<this.buffer.length&&!!(this.buffer[t]&128>>e%8)},e.prototype.set=function(e,t){void 0===t&&(t=!0);var n=e>>3;if(t){if(this.buffer.length<n+1){var i=Math.max(n+1,Math.min(2*this.buffer.length,this.grow));if(i<=this.grow){var r=new Uint8Array(i);r.set(this.buffer),this.buffer=r}}this.buffer[n]|=128>>e%8}else n<this.buffer.length&&(this.buffer[n]&=~(128>>e%8))},e.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=8*this.buffer.length);for(var i=t,r=i>>3,o=128>>i%8,s=this.buffer[r];i<n;i++)e(!!(s&o),i),o=1===o?(s=this.buffer[++r],128):o>>1},e}();n.default=r},{}],13:[function(e,t,n){(function(i){(function(){n.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let i=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),e.splice(r,0,n)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug")}catch(e){}!e&&void 0!==i&&"env"in i&&(e=i.env.DEBUG);return e},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(n);const{formatters:r}=t.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))},{"./common":14,_process:187}],14:[function(e,t,n){t.exports=function(t){function n(e){let t;function o(...e){if(!o.enabled)return;const i=o,r=Number(new Date),s=r-(t||r);i.diff=s,i.prev=t,i.curr=r,t=r,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,r)=>{if("%%"===t)return t;a++;const o=n.formatters[r];if("function"==typeof o){const n=e[a];t=o.call(i,n),e.splice(a,1),a--}return t})),n.formatArgs.call(i,e);(i.log||n.log).apply(i,e)}return o.namespace=e,o.enabled=n.enabled(e),o.useColors=n.useColors(),o.color=n.selectColor(e),o.destroy=i,o.extend=r,"function"==typeof n.init&&n.init(o),n.instances.push(o),o}function i(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function r(e,t){const i=n(this.namespace+(void 0===t?":":t)+e);return i.log=this.log,i}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},n.disable=function(){const e=[...n.names.map(o),...n.skips.map(o).map((e=>"-"+e))].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(t=0;t<r;t++)i[t]&&("-"===(e=i[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));for(t=0;t<n.instances.length;t++){const e=n.instances[t];e.enabled=n.enabled(e.namespace)}},n.enabled=function(e){if("*"===e[e.length-1])return!0;let t,i;for(t=0,i=n.skips.length;t<i;t++)if(n.skips[t].test(e))return!1;for(t=0,i=n.names.length;t<i;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),Object.keys(t).forEach((e=>{n[e]=t[e]})),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}},{ms:15}],15:[function(e,t,n){var i=1e3,r=60*i,o=60*r,s=24*o,a=7*s,c=365.25*s;function l(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*c;case"weeks":case"week":case"w":return n*a;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*r;case"seconds":case"second":case"secs":case"sec":case"s":return n*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=s)return l(e,t,s,"day");if(t>=o)return l(e,t,o,"hour");if(t>=r)return l(e,t,r,"minute");if(t>=i)return l(e,t,i,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=s)return Math.round(e/s)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=i)return Math.round(e/i)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],16:[function(e,t,n){"use strict";var i={};function r(e,t,n){n||(n=Error);var r=function(e){var n,i;function r(n,i,r){return e.call(this,function(e,n,i){return"string"==typeof t?t:t(e,n,i)}(n,i,r))||this}return i=e,(n=r).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,r}(n);r.prototype.name=n.name,r.prototype.code=e,i[e]=r}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,r,s,a;if("string"==typeof t&&(r="not ",t.substr(!s||s<0?0:+s,r.length)===r)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(o(t,"type"));else{var c=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},{}],17:[function(e,t,n){(function(n){(function(){"use strict";var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=l;var r=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(l,r);for(var s=i(o.prototype),a=0;a<s.length;a++){var c=s[a];l.prototype[c]||(l.prototype[c]=o.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);r.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",p)))}function p(){this._writableState.ended||n.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":19,"./_stream_writable":21,_process:187,inherits:119}],18:[function(e,t,n){"use strict";t.exports=r;var i=e("./_stream_transform");function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}e("inherits")(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":20,inherits:119}],19:[function(e,t,n){(function(n,i){(function(){"use strict";var r;t.exports=S,S.ReadableState=E;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=e("./internal/streams/stream"),a=e("buffer").Buffer,c=i.Uint8Array||function(){};var l,p=e("util");l=p&&p.debuglog?p.debuglog("stream"):function(){};var u,d,f,h=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),g=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,b=v.ERR_INVALID_ARG_TYPE,x=v.ERR_STREAM_PUSH_AFTER_EOF,y=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(S,s);var w=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function E(t,n,i){r=r||e("./_stream_duplex"),t=t||{},"boolean"!=typeof i&&(i=n instanceof r),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=e("string_decoder/").StringDecoder),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function S(t){if(r=r||e("./_stream_duplex"),!(this instanceof S))return new S(t);var n=this instanceof r;this._readableState=new E(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(e,t,n,i,r){l("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(l("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?L(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}(e,s);else if(r||(o=function(e,t){var n;i=t,a.isBuffer(i)||i instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t));var i;return n}(s,t)),o)w(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),i)s.endEmitted?w(e,new _):T(e,s,t,!0);else if(s.ended)w(e,new x);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):O(e,s)):T(e,s,t,!1)}else i||(s.reading=!1,O(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&L(e)),O(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=a.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},S.prototype.unshift=function(e){return C(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){u||(u=e("string_decoder/").StringDecoder);var n=new u(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,r="";null!==i;)r+=n.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var j=1073741824;function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,P(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(l("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function B(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){l("readable nexttick read 0"),e.read(0)}function M(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(q,t,e))}function q(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):L(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&D(this),null;var i,r=t.needReadable;return l("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&l("length less than watermark",r=!0),t.ended||t.reading?l("reading or ended",r=!1):r&&(l("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(n,t))),null===(i=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){w(this,new y("_read()"))},S.prototype.pipe=function(e,t){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,l("pipe count=%d opts=%j",r.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:g;function a(t,n){l("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),e.removeListener("close",h),e.removeListener("finish",m),e.removeListener("drain",p),e.removeListener("error",f),e.removeListener("unpipe",a),i.removeListener("end",c),i.removeListener("end",g),i.removeListener("data",d),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||p())}function c(){l("onend"),e.end()}r.endEmitted?n.nextTick(s):i.once("end",s),e.on("unpipe",a);var p=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,P(e))}}(i);e.on("drain",p);var u=!1;function d(t){l("ondata");var n=e.write(t);l("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!u&&(l("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function f(t){l("onerror",t),g(),e.removeListener("error",f),0===o(e,"error")&&w(e,t)}function h(){e.removeListener("finish",m),g()}function m(){l("onfinish"),e.removeListener("close",h),g()}function g(){l("unpipe"),i.unpipe(e)}return i.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",h),e.once("finish",m),e.emit("pipe",i),r.flowing||(l("pipe resume"),i.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=H(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,t){var i=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,l("on readable",r.length,r.reading),r.length?L(this):r.reading||n.nextTick(U,this))),i},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var i=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),i},S.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(M,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(r){(l("wrapped data"),n.decoder&&(r=n.decoder.write(r)),n.objectMode&&null==r)||(n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause()))})),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){l("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,n){return void 0===f&&(f=e("./internal/streams/from")),f(S,t,n)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":16,"./_stream_duplex":17,"./internal/streams/async_iterator":22,"./internal/streams/buffer_list":23,"./internal/streams/destroy":24,"./internal/streams/from":26,"./internal/streams/state":28,"./internal/streams/stream":29,_process:187,buffer:60,events:98,inherits:119,"string_decoder/":286,util:55}],20:[function(e,t,n){"use strict";t.exports=p;var i=e("../errors").codes,r=i.ERR_METHOD_NOT_IMPLEMENTED,o=i.ERR_MULTIPLE_CALLBACK,s=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=i.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function l(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function p(e){if(!(this instanceof p))return new p(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}e("inherits")(p,c),p.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},p.prototype._transform=function(e,t,n){n(new r("_transform()"))},p.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},p.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},p.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":16,"./_stream_duplex":17,inherits:119}],21:[function(e,t,n){(function(n,i){(function(){"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var r=i.callback;t.pendingcb--,r(n),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var o;t.exports=S,S.WritableState=E;var s={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),c=e("buffer").Buffer,l=i.Uint8Array||function(){};var p,u=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,f=e("../errors").codes,h=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,x=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,w=u.errorOrDestroy;function k(){}function E(t,i,s){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof s&&(s=i instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,o=i.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,o){--t.pendingcb,i?(n.nextTick(o,r),n.nextTick(I,e,t),e._writableState.errorEmitted=!0,w(e,r)):(o(r),e._writableState.errorEmitted=!0,w(e,r),I(e,t))}(e,i,r,t,o);else{var s=A(i)||e.destroyed;s||i.corked||i.bufferProcessing||!i.bufferedRequest||j(e,i),r?n.nextTick(T,e,i,s,o):T(e,i,s,o)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function S(t){var n=this instanceof(o=o||e("./_stream_duplex"));if(!n&&!p.call(S,this))return new S(t);this._writableState=new E(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function C(e,t,n,i,r,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function T(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),I(e,t)}function j(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,o=new Array(i),s=t.corkedRequestsFree;s.entry=n;for(var a=0,c=!0;n;)o[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;o.allBuffers=c,C(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,p=n.encoding,u=n.callback;if(C(e,t,!1,t.objectMode?1:l.length,l,p,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(e,t){e._final((function(n){t.pendingcb--,n&&w(e,n),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var i=A(t);if(i&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(L,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return i}e("inherits")(S,a),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===S&&(e&&e._writableState instanceof E)}})):p=function(e){return e instanceof this},S.prototype.pipe=function(){w(this,new v)},S.prototype.write=function(e,t,i){var r,o=this._writableState,s=!1,a=!o.objectMode&&(r=e,c.isBuffer(r)||r instanceof l);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(i=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof i&&(i=k),o.ending?function(e,t){var i=new y;w(e,i),n.nextTick(t,i)}(this,i):(a||function(e,t,i,r){var o;return null===i?o=new x:"string"==typeof i||t.objectMode||(o=new h("chunk",["string","Buffer"],i)),!o||(w(e,o),n.nextTick(r,o),!1)}(this,o,e,i))&&(o.pendingcb++,s=function(e,t,n,i,r,o){if(!n){var s=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,i,r);i!==s&&(n=!0,r="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var p=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:r,isBuf:n,callback:o,next:null},p?p.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,a,i,r,o);return l}(this,o,a,e,t,i)),s},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||j(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,i){var r=this._writableState;return"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,i){t.ending=!0,I(e,t),i&&(t.finished?n.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=u.destroy,S.prototype._undestroy=u.undestroy,S.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":16,"./_stream_duplex":17,"./internal/streams/destroy":24,"./internal/streams/state":28,"./internal/streams/stream":29,_process:187,buffer:60,inherits:119,"util-deprecate":306}],22:[function(e,t,n){(function(n){(function(){"use strict";var i;function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=e("./end-of-stream"),s=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),p=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function h(e){var t=e[s];if(null!==t){var n=e[d].read();null!==n&&(e[p]=null,e[s]=null,e[a]=null,t(f(n,!1)))}}function m(e){n.nextTick(h,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((r(i={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(t,i){n.nextTick((function(){e[c]?i(e[c]):t(f(void 0,!0))}))}));var i,r=this[p];if(r)i=new Promise(function(e,t){return function(n,i){e.then((function(){t[l]?n(f(void 0,!0)):t[u](n,i)}),i)}}(r,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));i=new Promise(this[u])}return this[p]=i,i}},Symbol.asyncIterator,(function(){return this})),r(i,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),i),g);t.exports=function(e){var t,n=Object.create(v,(r(t={},d,{value:e,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,a,{value:null,writable:!0}),r(t,c,{value:null,writable:!0}),r(t,l,{value:e._readableState.endEmitted,writable:!0}),r(t,u,{value:function(e,t){var i=n[d].read();i?(n[p]=null,n[s]=null,n[a]=null,e(f(i,!1))):(n[s]=e,n[a]=t)},writable:!0}),t));return n[p]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[p]=null,n[s]=null,n[a]=null,t(e)),void(n[c]=e)}var i=n[s];null!==i&&(n[p]=null,n[s]=null,n[a]=null,i(f(void 0,!0))),n[l]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":25,_process:187}],23:[function(e,t,n){"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=e("buffer").Buffer,a=e("util").inspect,c=a&&a.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,l;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,n,i,r=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=r,i=a,s.prototype.copy.call(t,n,i),a+=o.data.length,o=o.next;return r}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var r=t.data,o=e>r.length?r.length:e;if(o===r.length?i+=r:i+=r.slice(0,e),0==(e-=o)){o===r.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(o));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var r=n.data,o=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,o),0==(e-=o)){o===r.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=r.slice(o));break}++i}return this.length-=i,t}},{key:c,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,n),l&&o(t,l),e}()},{buffer:60,util:55}],24:[function(e,t,n){(function(e){(function(){"use strict";function n(e,t){r(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(r,this,t)):e.nextTick(r,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(i,s):(s._writableState.errorEmitted=!0,e.nextTick(n,s,t)):e.nextTick(n,s,t):o?(e.nextTick(i,s),o(t)):e.nextTick(i,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:187}],25:[function(e,t,n){"use strict";var i=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}t.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(this,i)}}}(o||r);var s=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||p()},l=t._writableState&&t._writableState.finished,p=function(){a=!1,l=!0,s||o.call(t)},u=t._readableState&&t._readableState.endEmitted,d=function(){s=!1,u=!0,a||o.call(t)},f=function(e){o.call(t,e)},h=function(){var e;return s&&!u?(t._readableState&&t._readableState.ended||(e=new i),o.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new i),o.call(t,e)):void 0},m=function(){t.req.on("finish",p)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",p),t.on("abort",h),t.req?m():t.on("request",m)),t.on("end",d),t.on("finish",p),!1!==n.error&&t.on("error",f),t.on("close",h),function(){t.removeListener("complete",p),t.removeListener("abort",h),t.removeListener("request",m),t.req&&t.req.removeListener("finish",p),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("end",d),t.removeListener("error",f),t.removeListener("close",h)}}},{"../../../errors":16}],26:[function(e,t,n){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],27:[function(e,t,n){"use strict";var i;var r=e("../../../errors").codes,o=r.ERR_MISSING_ARGS,s=r.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(t,n,r,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===i&&(i=e("./end-of-stream")),i(t,{readable:n,writable:r},(function(e){if(e)return o(e);a=!0,o()}));var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function l(e){e()}function p(e,t){return e.pipe(t)}function u(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}t.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i,r=u(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var s=t.map((function(e,n){var o=n<t.length-1;return c(e,o,n>0,(function(e){i||(i=e),e&&s.forEach(l),o||(s.forEach(l),r(i))}))}));return t.reduce(p)}},{"../../../errors":16,"./end-of-stream":25}],28:[function(e,t,n){"use strict";var i=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,r){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,r,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new i(r?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},{"../../../errors":16}],29:[function(e,t,n){t.exports=e("events").EventEmitter},{events:98}],30:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),n.finished=e("./lib/internal/streams/end-of-stream.js"),n.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":17,"./lib/_stream_passthrough.js":18,"./lib/_stream_readable.js":19,"./lib/_stream_transform.js":20,"./lib/_stream_writable.js":21,"./lib/internal/streams/end-of-stream.js":25,"./lib/internal/streams/pipeline.js":27}],31:[function(e,t,n){(function(n,i){(function(){const r=e("debug")("bittorrent-tracker:client"),o=e("events"),s=e("once"),a=e("run-parallel"),c=e("simple-peer"),l=e("./lib/common"),p=e("./lib/client/http-tracker"),u=e("./lib/client/udp-tracker"),d=e("./lib/client/websocket-tracker");class f extends o{constructor(e={}){if(super(),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");if(!n.browser&&!e.port)throw new Error("Option `port` is required");this.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),this._peerIdBuffer=i.from(this.peerId,"hex"),this._peerIdBinary=this._peerIdBuffer.toString("binary"),this.infoHash="string"==typeof e.infoHash?e.infoHash.toLowerCase():e.infoHash.toString("hex"),this._infoHashBuffer=i.from(this.infoHash,"hex"),this._infoHashBinary=this._infoHashBuffer.toString("binary"),r("new client %s",this.infoHash),this.destroyed=!1,this._port=e.port,this._getAnnounceOpts=e.getAnnounceOpts,this._rtcConfig=e.rtcConfig,this._userAgent=e.userAgent,this._wrtc="function"==typeof e.wrtc?e.wrtc():e.wrtc;let t="string"==typeof e.announce?[e.announce]:null==e.announce?[]:e.announce;t=t.map((e=>("/"===(e=e.toString())[e.length-1]&&(e=e.substring(0,e.length-1)),e))),t=Array.from(new Set(t));const o=!1!==this._wrtc&&(!!this._wrtc||c.WEBRTC_SUPPORT),s=e=>{n.nextTick((()=>{this.emit("warning",e)}))};this._trackers=t.map((e=>{let t;try{t=new URL(e)}catch(t){return s(new Error("Invalid tracker URL: "+e)),null}const n=t.port;if(n<0||n>65535)return s(new Error("Invalid tracker port: "+e)),null;const i=t.protocol;return"http:"!==i&&"https:"!==i||"function"!=typeof p?"udp:"===i&&"function"==typeof u?new u(this,e):"ws:"!==i&&"wss:"!==i||!o||"ws:"===i&&"undefined"!=typeof window&&"https:"===window.location.protocol?(s(new Error("Unsupported tracker protocol: "+e)),null):new d(this,e):new p(this,e)})).filter(Boolean)}start(e){(e=this._defaultAnnounceOpts(e)).event="started",r("send `start` %o",e),this._announce(e),this._trackers.forEach((e=>{e.setInterval()}))}stop(e){(e=this._defaultAnnounceOpts(e)).event="stopped",r("send `stop` %o",e),this._announce(e)}complete(e){e||(e={}),(e=this._defaultAnnounceOpts(e)).event="completed",r("send `complete` %o",e),this._announce(e)}update(e){(e=this._defaultAnnounceOpts(e)).event&&delete e.event,r("send `update` %o",e),this._announce(e)}_announce(e){this._trackers.forEach((t=>{t.announce(e)}))}scrape(e){r("send `scrape`"),e||(e={}),this._trackers.forEach((t=>{t.scrape(e)}))}setInterval(e){r("setInterval %d",e),this._trackers.forEach((t=>{t.setInterval(e)}))}destroy(e){if(this.destroyed)return;this.destroyed=!0,r("destroy");const t=this._trackers.map((e=>t=>{e.destroy(t)}));a(t,e),this._trackers=[],this._getAnnounceOpts=null}_defaultAnnounceOpts(e={}){return null==e.numwant&&(e.numwant=l.DEFAULT_ANNOUNCE_PEERS),null==e.uploaded&&(e.uploaded=0),null==e.downloaded&&(e.downloaded=0),this._getAnnounceOpts&&(e=Object.assign({},e,this._getAnnounceOpts())),e}}f.scrape=(e,t)=>{if(t=s(t),!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");const n=Object.assign({},e,{infoHash:Array.isArray(e.infoHash)?e.infoHash[0]:e.infoHash,peerId:i.from("01234567890123456789"),port:6881}),r=new f(n);r.once("error",t),r.once("warning",t);let o=Array.isArray(e.infoHash)?e.infoHash.length:1;const a={};return r.on("scrape",(e=>{if(o-=1,a[e.infoHash]=e,0===o){r.destroy();const e=Object.keys(a);1===e.length?t(null,a[e[0]]):t(null,a)}})),e.infoHash=Array.isArray(e.infoHash)?e.infoHash.map((e=>i.from(e,"hex"))):i.from(e.infoHash,"hex"),r.scrape({infoHash:e.infoHash}),r},t.exports=f}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./lib/client/http-tracker":55,"./lib/client/udp-tracker":55,"./lib/client/websocket-tracker":33,"./lib/common":34,_process:187,buffer:60,debug:35,events:98,once:183,"run-parallel":218,"simple-peer":223}],32:[function(e,t,n){const i=e("events");t.exports=class extends i{constructor(e,t){super(),this.client=e,this.announceUrl=t,this.interval=null,this.destroyed=!1}setInterval(e){null==e&&(e=this.DEFAULT_ANNOUNCE_INTERVAL),clearInterval(this.interval),e&&(this.interval=setInterval((()=>{this.announce(this.client._defaultAnnounceOpts())}),e),this.interval.unref&&this.interval.unref())}}},{events:98}],33:[function(e,t,n){const i=e("debug")("bittorrent-tracker:websocket-tracker"),r=e("simple-peer"),o=e("randombytes"),s=e("simple-websocket"),a=e("../common"),c=e("./tracker"),l={};class p extends c{constructor(e,t,n){super(e,t),i("new websocket tracker %s",t),this.peers={},this.socket=null,this.reconnecting=!1,this.retries=0,this.reconnectTimer=null,this.expectingResponse=!1,this._openSocket()}announce(e){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",(()=>{this.announce(e)}));const t=Object.assign({},e,{action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary});if(this._trackerId&&(t.trackerid=this._trackerId),"stopped"===e.event||"completed"===e.event)this._send(t);else{const n=Math.min(e.numwant,10);this._generateOffers(n,(e=>{t.numwant=n,t.offers=e,this._send(t)}))}}scrape(e){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",(()=>{this.scrape(e)}));const t={action:"scrape",info_hash:Array.isArray(e.infoHash)&&e.infoHash.length>0?e.infoHash.map((e=>e.toString("binary"))):e.infoHash&&e.infoHash.toString("binary")||this.client._infoHashBinary};this._send(t)}destroy(e=u){if(this.destroyed)return e(null);this.destroyed=!0,clearInterval(this.interval),clearTimeout(this.reconnectTimer);for(const e in this.peers){const t=this.peers[e];clearTimeout(t.trackerTimeout),t.destroy()}if(this.peers=null,this.socket&&(this.socket.removeListener("connect",this._onSocketConnectBound),this.socket.removeListener("data",this._onSocketDataBound),this.socket.removeListener("close",this._onSocketCloseBound),this.socket.removeListener("error",this._onSocketErrorBound),this.socket=null),this._onSocketConnectBound=null,this._onSocketErrorBound=null,this._onSocketDataBound=null,this._onSocketCloseBound=null,l[this.announceUrl]&&(l[this.announceUrl].consumers-=1),l[this.announceUrl].consumers>0)return e();let t=l[this.announceUrl];if(delete l[this.announceUrl],t.on("error",u),t.once("close",e),!this.expectingResponse)return i();var n=setTimeout(i,a.DESTROY_TIMEOUT);function i(){n&&(clearTimeout(n),n=null),t.removeListener("data",i),t.destroy(),t=null}t.once("data",i)}_openSocket(){this.destroyed=!1,this.peers||(this.peers={}),this._onSocketConnectBound=()=>{this._onSocketConnect()},this._onSocketErrorBound=e=>{this._onSocketError(e)},this._onSocketDataBound=e=>{this._onSocketData(e)},this._onSocketCloseBound=()=>{this._onSocketClose()},this.socket=l[this.announceUrl],this.socket?(l[this.announceUrl].consumers+=1,this.socket.connected&&this._onSocketConnectBound()):(this.socket=l[this.announceUrl]=new s(this.announceUrl),this.socket.consumers=1,this.socket.once("connect",this._onSocketConnectBound)),this.socket.on("data",this._onSocketDataBound),this.socket.once("close",this._onSocketCloseBound),this.socket.once("error",this._onSocketErrorBound)}_onSocketConnect(){this.destroyed||this.reconnecting&&(this.reconnecting=!1,this.retries=0,this.announce(this.client._defaultAnnounceOpts()))}_onSocketData(e){if(!this.destroyed){this.expectingResponse=!1;try{e=JSON.parse(e)}catch(e){return void this.client.emit("warning",new Error("Invalid tracker response"))}"announce"===e.action?this._onAnnounceResponse(e):"scrape"===e.action?this._onScrapeResponse(e):this._onSocketError(new Error("invalid action in WS response: "+e.action))}}_onAnnounceResponse(e){if(e.info_hash!==this.client._infoHashBinary)return void i("ignoring websocket data from %s for %s (looking for %s: reused socket)",this.announceUrl,a.binaryToHex(e.info_hash),this.client.infoHash);if(e.peer_id&&e.peer_id===this.client._peerIdBinary)return;i("received %s from %s for %s",JSON.stringify(e),this.announceUrl,this.client.infoHash);const t=e["failure reason"];if(t)return this.client.emit("warning",new Error(t));const n=e["warning message"];n&&this.client.emit("warning",new Error(n));const r=e.interval||e["min interval"];r&&this.setInterval(1e3*r);const o=e["tracker id"];if(o&&(this._trackerId=o),null!=e.complete){const t=Object.assign({},e,{announce:this.announceUrl,infoHash:a.binaryToHex(e.info_hash)});this.client.emit("update",t)}let s;if(e.offer&&e.peer_id&&(i("creating peer (from remote offer)"),s=this._createPeer(),s.id=a.binaryToHex(e.peer_id),s.once("signal",(t=>{const n={action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary,to_peer_id:e.peer_id,answer:t,offer_id:e.offer_id};this._trackerId&&(n.trackerid=this._trackerId),this._send(n)})),s.signal(e.offer),this.client.emit("peer",s)),e.answer&&e.peer_id){const t=a.binaryToHex(e.offer_id);s=this.peers[t],s?(s.id=a.binaryToHex(e.peer_id),s.signal(e.answer),this.client.emit("peer",s),clearTimeout(s.trackerTimeout),s.trackerTimeout=null,delete this.peers[t]):i("got unexpected answer: "+JSON.stringify(e.answer))}}_onScrapeResponse(e){e=e.files||{};const t=Object.keys(e);0!==t.length?t.forEach((t=>{const n=Object.assign(e[t],{announce:this.announceUrl,infoHash:a.binaryToHex(t)});this.client.emit("scrape",n)})):this.client.emit("warning",new Error("invalid scrape response"))}_onSocketClose(){this.destroyed||(this.destroy(),this._startReconnectTimer())}_onSocketError(e){this.destroyed||(this.destroy(),this.client.emit("warning",e),this._startReconnectTimer())}_startReconnectTimer(){const e=Math.floor(3e5*Math.random())+Math.min(1e4*Math.pow(2,this.retries),36e5);this.reconnecting=!0,clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout((()=>{this.retries++,this._openSocket()}),e),this.reconnectTimer.unref&&this.reconnectTimer.unref(),i("reconnecting socket in %s ms",e)}_send(e){if(this.destroyed)return;this.expectingResponse=!0;const t=JSON.stringify(e);i("send %s",t),this.socket.send(t)}_generateOffers(e,t){const n=this,r=[];i("generating %s offers",e);for(let t=0;t<e;++t)s();function s(){const e=o(20).toString("hex");i("creating peer (from _generateOffers)");const t=n.peers[e]=n._createPeer({initiator:!0});t.once("signal",(t=>{r.push({offer:t,offer_id:a.hexToBinary(e)}),c()})),t.trackerTimeout=setTimeout((()=>{i("tracker timeout: destroying peer"),t.trackerTimeout=null,delete n.peers[e],t.destroy()}),5e4),t.trackerTimeout.unref&&t.trackerTimeout.unref()}function c(){r.length===e&&(i("generated %s offers",e),t(r))}c()}_createPeer(e){const t=this;e=Object.assign({trickle:!1,config:t.client._rtcConfig,wrtc:t.client._wrtc},e);const n=new r(e);return n.once("error",i),n.once("connect",(function e(){n.removeListener("error",i),n.removeListener("connect",e)})),n;function i(e){t.client.emit("warning",new Error("Connection error: "+e.message)),n.destroy()}}}function u(){}p.prototype.DEFAULT_ANNOUNCE_INTERVAL=3e4,p._socketPool=l,t.exports=p},{"../common":34,"./tracker":32,debug:35,randombytes:195,"simple-peer":223,"simple-websocket":244}],34:[function(e,t,n){(function(t){(function(){n.DEFAULT_ANNOUNCE_PEERS=50,n.MAX_ANNOUNCE_PEERS=82,n.binaryToHex=function(e){return"string"!=typeof e&&(e=String(e)),t.from(e,"binary").toString("hex")},n.hexToBinary=function(e){return"string"!=typeof e&&(e=String(e)),t.from(e,"hex").toString("binary")};var i=e("./common-node");Object.assign(n,i)}).call(this)}).call(this,e("buffer").Buffer)},{"./common-node":55,buffer:60}],35:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./common":36,_process:187,dup:13}],36:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14,ms:37}],37:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],38:[function(e,t,n){(function(e){(function(){
|
||
/*! blob-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n){if("undefined"==typeof Blob||!(t instanceof Blob))throw new Error("first argument must be a Blob");if("function"!=typeof n)throw new Error("second argument must be a function");const i=new FileReader;i.addEventListener("loadend",(function t(r){i.removeEventListener("loadend",t,!1),r.error?n(r.error):n(null,e.from(i.result))}),!1),i.readAsArrayBuffer(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],39:[function(e,t,n){(function(n){(function(){const{Transform:i}=e("readable-stream");t.exports=class extends i{constructor(e,t={}){super(t),"object"==typeof e&&(e=(t=e).size),this.size=e||512;const{nopad:n,zeroPadding:i=!0}=t;this._zeroPadding=!n&&!!i,this._buffered=[],this._bufferedBytes=0}_transform(e,t,i){for(this._bufferedBytes+=e.length,this._buffered.push(e);this._bufferedBytes>=this.size;){const e=n.concat(this._buffered);this._bufferedBytes-=this.size,this.push(e.slice(0,this.size)),this._buffered=[e.slice(this.size,e.length)]}i()}_flush(){if(this._bufferedBytes&&this._zeroPadding){const e=n.alloc(this.size-this._bufferedBytes);this._buffered.push(e),this.push(n.concat(this._buffered)),this._buffered=null}else this._bufferedBytes&&(this.push(n.concat(this._buffered)),this._buffered=null);this.push(null)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60,"readable-stream":54}],40:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],41:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":43,"./_stream_writable":45,_process:187,dup:17,inherits:119}],42:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":44,dup:18,inherits:119}],43:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":40,"./_stream_duplex":41,"./internal/streams/async_iterator":46,"./internal/streams/buffer_list":47,"./internal/streams/destroy":48,"./internal/streams/from":50,"./internal/streams/state":52,"./internal/streams/stream":53,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],44:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":40,"./_stream_duplex":41,dup:20,inherits:119}],45:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":40,"./_stream_duplex":41,"./internal/streams/destroy":48,"./internal/streams/state":52,"./internal/streams/stream":53,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],46:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":49,_process:187,dup:22}],47:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],48:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],49:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":40,dup:25}],50:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],51:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":40,"./end-of-stream":49,dup:27}],52:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":40,dup:28}],53:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],54:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":41,"./lib/_stream_passthrough.js":42,"./lib/_stream_readable.js":43,"./lib/_stream_transform.js":44,"./lib/_stream_writable.js":45,"./lib/internal/streams/end-of-stream.js":49,"./lib/internal/streams/pipeline.js":51,dup:30}],55:[function(e,t,n){},{}],56:[function(e,t,n){arguments[4][55][0].apply(n,arguments)},{dup:55}],57:[function(e,t,n){(function(e){(function(){t.exports=function(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative');return e.allocUnsafe?e.allocUnsafe(t):new e(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],58:[function(e,t,n){(function(n){(function(){var i=e("buffer-fill"),r=e("buffer-alloc-unsafe");t.exports=function(e,t,o){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');if(n.alloc)return n.alloc(e,t,o);var s=r(e);return 0===e?s:void 0===t?i(s,0):("string"!=typeof o&&(o=void 0),i(s,t,o))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60,"buffer-alloc-unsafe":57,"buffer-fill":59}],59:[function(e,t,n){(function(e){(function(){var n=function(){try{if(!e.isEncoding("latin1"))return!1;var t=e.alloc?e.alloc(4):new e(4);return t.fill("ab","ucs2"),"61006200"===t.toString("hex")}catch(e){return!1}}();function i(e,t,n,i){if(n<0||i>e.length)throw new RangeError("Out of range index");return n>>>=0,(i=void 0===i?e.length:i>>>0)>n&&e.fill(t,n,i),e}t.exports=function(t,r,o,s,a){if(n)return t.fill(r,o,s,a);if("number"==typeof r)return i(t,r,o,s);if("string"==typeof r){if("string"==typeof o?(a=o,o=0,s=t.length):"string"==typeof s&&(a=s,s=t.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("latin1"===a&&(a="binary"),"string"==typeof a&&!e.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(""===r)return i(t,0,o,s);if(function(e){return 1===e.length&&e.charCodeAt(0)<256}(r))return i(t,r.charCodeAt(0),o,s);r=new e(r,a)}return e.isBuffer(r)?function(e,t,n,i){if(n<0||i>e.length)throw new RangeError("Out of range index");if(i<=n)return e;n>>>=0,i=void 0===i?e.length:i>>>0;for(var r=n,o=t.length;r<=i-o;)t.copy(e,r),r+=o;return r!==i&&t.copy(e,r,0,i-r),e}(t,r,o,s):i(t,0,o,s)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],60:[function(e,t,n){(function(t){(function(){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/
|
||
"use strict";var t=e("base64-js"),i=e("ieee754");n.Buffer=s,n.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},n.INSPECT_MAX_BYTES=50;var r=2147483647;function o(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return a(e,t,n)}function a(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),i=o(n),r=i.write(e,t);r!==n&&(i=i.slice(0,r));return i}(e,t);if(ArrayBuffer.isView(e))return p(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var i;i=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return i.__proto__=s.prototype,i}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return s.from(i,t,n);var r=function(e){if(s.isBuffer(e)){var t=0|u(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||H(e.length)?o(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),o(e<0?0:0|u(e))}function p(e){for(var t=e.length<0?0:0|u(e.length),n=o(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function u(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(r)return i?-1:P(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function h(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),H(n=+n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,i,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,i,r){var o,s=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var p=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===p?0:o-p)){if(-1===p&&(p=o),o-p+1===c)return p*s}else-1!==p&&(o-=o-p),p=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var u=!0,d=0;d<c;d++)if(l(e,o+d)!==l(t,d)){u=!1;break}if(u)return o}return-1}function v(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=t.length;i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(H(a))return s;e[n+s]=a}return s}function b(e,t,n,i){return D(P(t,e.length-n),e,n,i)}function x(e,t,n,i){return D(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function y(e,t,n,i){return x(e,t,n,i)}function _(e,t,n,i){return D(N(t),e,n,i)}function w(e,t,n,i){return D(function(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)i=(n=e.charCodeAt(s))>>8,r=n%256,o.push(r),o.push(i);return o}(t,e.length-n),e,n,i)}function k(e,n,i){return 0===n&&i===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,i))}function E(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o,s,a,c,l=e[r],p=null,u=l>239?4:l>223?3:l>191?2:1;if(r+u<=n)switch(u){case 1:l<128&&(p=l);break;case 2:128==(192&(o=e[r+1]))&&(c=(31&l)<<6|63&o)>127&&(p=c);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(c=(15&l)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(p=c);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(p=c)}null===p?(p=65533,u=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|1023&p),i.push(p),r+=u}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=S));return n}(i)}n.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,n){return a(e,t,n)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},s.allocUnsafe=function(e){return l(e)},s.allocUnsafeSlow=function(e){return l(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=s.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var o=e[n];if(q(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,r),r+=o.length}return i},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):f.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,i,r){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),a=(n>>>=0)-(t>>>=0),c=Math.min(o,a),l=this.slice(i,r),p=e.slice(t,n),u=0;u<c;++u)if(l[u]!==p[u]){o=l[u],a=p[u];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},s.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return y(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function C(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function T(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function j(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=M(e[o]);return r}function A(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,i,r,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function O(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,o){return t=+t,n>>>=0,o||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,o){return t=+t,n>>>=0,o||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var i=this.subarray(e,t);return i.__proto__=s.prototype,i},s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t>>>=0,n>>>=0,i)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o<n&&(r*=256);)this[t+o]=e/r&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t>>>=0,n>>>=0,i)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,i){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r=i-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,i);else if(this===e&&n<t&&t<i)for(var o=r-1;o>=0;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,i),t);return r},s.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var r=e.charCodeAt(0);("utf8"===i&&r<128||"latin1"===i)&&(e=r)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=s.isBuffer(e)?e:s.from(e,i),c=a.length;if(0===c)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%c]}return this};var U=/[^+/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function P(e,t){var n;t=t||1/0;for(var i=e.length,r=null,o=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function N(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":4,buffer:60,ieee754:117}],61:[function(e,t,n){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],62:[function(e,t,n){
|
||
/*!
|
||
* bytes
|
||
* Copyright(c) 2012-2014 TJ Holowaychuk
|
||
* Copyright(c) 2015 Jed Watson
|
||
* MIT Licensed
|
||
*/
|
||
"use strict";t.exports=function(e,t){if("string"==typeof e)return c(e);if("number"==typeof e)return a(e,t);return null},t.exports.format=a,t.exports.parse=c;var i=/\B(?=(\d{3})+(?!\d))/g,r=/(?:\.0*|(\.[^0]+)0+)$/,o={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},s=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function a(e,t){if(!Number.isFinite(e))return null;var n=Math.abs(e),s=t&&t.thousandsSeparator||"",a=t&&t.unitSeparator||"",c=t&&void 0!==t.decimalPlaces?t.decimalPlaces:2,l=Boolean(t&&t.fixedDecimals),p=t&&t.unit||"";p&&o[p.toLowerCase()]||(p=n>=o.pb?"PB":n>=o.tb?"TB":n>=o.gb?"GB":n>=o.mb?"MB":n>=o.kb?"KB":"B");var u=(e/o[p.toLowerCase()]).toFixed(c);return l||(u=u.replace(r,"$1")),s&&(u=u.replace(i,s)),u+a+p}function c(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,n=s.exec(e),i="b";return n?(t=parseFloat(n[1]),i=n[4].toLowerCase()):(t=parseInt(e,10),i="b"),Math.floor(o[i]*t)}},{}],63:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],64:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":66,"./_stream_writable":68,_process:187,dup:17,inherits:119}],65:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":67,dup:18,inherits:119}],66:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":63,"./_stream_duplex":64,"./internal/streams/async_iterator":69,"./internal/streams/buffer_list":70,"./internal/streams/destroy":71,"./internal/streams/from":73,"./internal/streams/state":75,"./internal/streams/stream":76,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],67:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":63,"./_stream_duplex":64,dup:20,inherits:119}],68:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":63,"./_stream_duplex":64,"./internal/streams/destroy":71,"./internal/streams/state":75,"./internal/streams/stream":76,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],69:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":72,_process:187,dup:22}],70:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],71:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],72:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":63,dup:25}],73:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],74:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":63,"./end-of-stream":72,dup:27}],75:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":63,dup:28}],76:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],77:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":64,"./lib/_stream_passthrough.js":65,"./lib/_stream_readable.js":66,"./lib/_stream_transform.js":67,"./lib/_stream_writable.js":68,"./lib/internal/streams/end-of-stream.js":72,"./lib/internal/streams/pipeline.js":74,dup:30}],78:[function(e,t,n){const i=e("block-stream2"),r=e("readable-stream");class o extends r.Writable{constructor(e,t,n={}){if(super(n),!e||!e.put||!e.get)throw new Error("First argument must be an abstract-chunk-store compliant store");if(!(t=Number(t)))throw new Error("Second argument must be a chunk length");this._blockstream=new i(t,{zeroPadding:!1}),this._outstandingPuts=0;let r=0;this._blockstream.on("data",(t=>{this.destroyed||(this._outstandingPuts+=1,e.put(r,t,(()=>{this._outstandingPuts-=1,0===this._outstandingPuts&&"function"==typeof this._finalCb&&(this._finalCb(null),this._finalCb=null)})),r+=1)})).on("error",(e=>{this.destroy(e)}))}_write(e,t,n){this._blockstream.write(e,t,n)}_final(e){this._blockstream.end(),this._blockstream.once("end",(()=>{0===this._outstandingPuts?e(null):this._finalCb=e}))}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))}}t.exports=o},{"block-stream2":39,"readable-stream":77}],79:[function(e,t,n){
|
||
/*!
|
||
* clipboard.js v2.0.6
|
||
* https://clipboardjs.com/
|
||
*
|
||
* Licensed MIT © Zeno Rocha
|
||
*/
|
||
var i,r;i=this,r=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),r=document.createRange();r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r),t=i.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function r(){i.off(e,r),t.apply(n,arguments)}return r._=t,this.on(e,r,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,r=n.length;i<r;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],r=[];if(i&&t)for(var o=0,s=i.length;o<s;o++)i[o].fn!==t&&i[o].fn._!==t&&r.push(i[o]);return r.length?n[e]=r:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var i=n(3),r=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return r(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var i=n(5);function r(e,t,n,i,r){var s=o.apply(this,arguments);return e.addEventListener(n,s,r),{destroy:function(){e.removeEventListener(n,s,r)}}}function o(e,t,n,r){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&r.call(e,n)}}e.exports=function(e,t,n,i,o){return"function"==typeof e.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return r(e,t,n,i,o)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n.n(i),o="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},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return s(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=r()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=r()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":o(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=n(1),l=n.n(c),p=n(2),u=n.n(p),d="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},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.resolveOptions(n),i.listenClick(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),f(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=u()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return m("action",e)}},{key:"defaultTarget",value:function(e){var t=m("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return m("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(l.a);function m(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=h}]).default},"object"==typeof n&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof n?n.ClipboardJS=r():i.ClipboardJS=r()},{}],80:[function(e,t,n){(function(n,i,r){(function(){
|
||
/*! create-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const o=e("bencode"),s=e("block-stream2"),a=e("piece-length"),c=e("path"),l=e("filestream/read"),p=e("is-file"),u=e("junk"),d=e("multistream"),f=e("once"),h=e("run-parallel"),m=e("simple-sha1"),g=e("readable-stream"),v=e("./get-files");function b(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(b(t)):e.concat(t)),[])}function x(e,t,i){var o;if(o=e,"undefined"!=typeof FileList&&o instanceof FileList&&(e=Array.from(e)),Array.isArray(e)||(e=[e]),0===e.length)throw new Error("invalid input type");e.forEach((e=>{if(null==e)throw new Error("invalid input type: "+e)})),1!==(e=e.map((e=>_(e)&&"string"==typeof e.path&&"function"==typeof v?e.path:e))).length||"string"==typeof e[0]||e[0].name||(e[0].name=t.name);let s=null;e.forEach(((t,n)=>{if("string"==typeof t)return;let i=t.fullPath||t.name;i||(i="Unknown File "+(n+1),t.unknownName=!0),t.path=i.split("/"),t.path[0]||t.path.shift(),t.path.length<2?s=null:0===n&&e.length>1?s=t.path[0]:t.path[0]!==s&&(s=null)})),e=e.filter((e=>{if("string"==typeof e)return!0;const t=e.path[e.path.length-1];return"."!==t[0]&&u.not(t)})),s&&e.forEach((e=>{const t=(r.isBuffer(e)||w(e))&&!e.path;"string"==typeof e||t||e.path.shift()})),!t.name&&s&&(t.name=s),t.name||e.some((e=>"string"==typeof e?(t.name=c.basename(e),!0):e.unknownName?void 0:(t.name=e.path[e.path.length-1],!0))),t.name||(t.name="Unnamed Torrent "+Date.now());const a=e.reduce(((e,t)=>e+Number("string"==typeof t)),0);let d=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof v)throw new Error("filesystem paths do not work in the browser");p(e[0],((e,t)=>{if(e)return i(e);d=t,f()}))}else n.nextTick((()=>{f()}));function f(){h(e.map((e=>t=>{const n={};if(_(e))n.getStream=function(e){return()=>new l(e)}(e),n.length=e.size;else if(r.isBuffer(e))n.getStream=(i=e,()=>{const e=new g.PassThrough;return e.end(i),e}),n.length=e.length;else{if(!w(e)){if("string"==typeof e){if("function"!=typeof v)throw new Error("filesystem paths do not work in the browser");return void v(e,a>1||d,t)}throw new Error("invalid input type")}n.getStream=function(e,t){return()=>{const n=new g.Transform;return n._transform=function(e,n,i){t.length+=e.length,this.push(e),i()},e.pipe(n),n}}(e,n),n.length=0}var i;n.path=e.path,t(null,n)})),((e,t)=>{if(e)return i(e);t=b(t),i(null,t,d)}))}}function y(e,t){return e+t.length}function _(e){return"undefined"!=typeof Blob&&e instanceof Blob}function w(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}t.exports=function(e,n,c){"function"==typeof n&&([n,c]=[c,n]),x(e,n=n?Object.assign({},n):{},((e,l,p)=>{if(e)return c(e);n.singleFileTorrent=p,function(e,n,c){let l=n.announceList;l||("string"==typeof n.announce?l=[[n.announce]]:Array.isArray(n.announce)&&(l=n.announce.map((e=>[e]))));l||(l=[]);i.WEBTORRENT_ANNOUNCE&&("string"==typeof i.WEBTORRENT_ANNOUNCE?l.push([[i.WEBTORRENT_ANNOUNCE]]):Array.isArray(i.WEBTORRENT_ANNOUNCE)&&(l=l.concat(i.WEBTORRENT_ANNOUNCE.map((e=>[e])))));void 0===n.announce&&void 0===n.announceList&&(l=l.concat(t.exports.announceList));"string"==typeof n.urlList&&(n.urlList=[n.urlList]);const p={info:{name:n.name},"creation date":Math.ceil((Number(n.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==l.length&&(p.announce=l[0][0],p["announce-list"]=l);void 0!==n.comment&&(p.comment=n.comment);void 0!==n.createdBy&&(p["created by"]=n.createdBy);void 0!==n.private&&(p.info.private=Number(n.private));void 0!==n.info&&Object.assign(p.info,n.info);void 0!==n.sslCert&&(p.info["ssl-cert"]=n.sslCert);void 0!==n.urlList&&(p["url-list"]=n.urlList);const u=n.pieceLength||a(e.reduce(y,0));p.info["piece length"]=u,function(e,t,n){n=f(n);const i=[];let o=0;const a=e.map((e=>e.getStream));let c=0,l=0,p=!1;const u=new d(a),h=new s(t,{zeroPadding:!1});function g(e){o+=e.length;const t=l;m(e,(e=>{i[t]=e,c-=1,y()})),c+=1,l+=1}function v(){p=!0,y()}function b(e){x(),n(e)}function x(){u.removeListener("error",b),h.removeListener("data",g),h.removeListener("end",v),h.removeListener("error",b)}function y(){p&&0===c&&(x(),n(null,r.from(i.join(""),"hex"),o))}u.on("error",b),u.pipe(h).on("data",g).on("end",v).on("error",b)}(e,u,((t,i,r)=>{if(t)return c(t);p.info.pieces=i,e.forEach((e=>{delete e.getStream})),n.singleFileTorrent?p.info.length=r:p.info.files=e,c(null,o.encode(p))}))}(l,n,c)}))},t.exports.parseInput=function(e,t,n){"function"==typeof t&&([t,n]=[n,t]),x(e,t=t?Object.assign({},t):{},n)},t.exports.announceList=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"]]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./get-files":55,_process:187,bencode:7,"block-stream2":39,buffer:60,"filestream/read":114,"is-file":121,junk:123,multistream:166,once:183,path:185,"piece-length":186,"readable-stream":95,"run-parallel":218,"simple-sha1":242}],81:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],82:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":84,"./_stream_writable":86,_process:187,dup:17,inherits:119}],83:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":85,dup:18,inherits:119}],84:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":81,"./_stream_duplex":82,"./internal/streams/async_iterator":87,"./internal/streams/buffer_list":88,"./internal/streams/destroy":89,"./internal/streams/from":91,"./internal/streams/state":93,"./internal/streams/stream":94,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],85:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":81,"./_stream_duplex":82,dup:20,inherits:119}],86:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":81,"./_stream_duplex":82,"./internal/streams/destroy":89,"./internal/streams/state":93,"./internal/streams/stream":94,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],87:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":90,_process:187,dup:22}],88:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],89:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],90:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":81,dup:25}],91:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],92:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":81,"./end-of-stream":90,dup:27}],93:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":81,dup:28}],94:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],95:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":82,"./lib/_stream_passthrough.js":83,"./lib/_stream_readable.js":84,"./lib/_stream_transform.js":85,"./lib/_stream_writable.js":86,"./lib/internal/streams/end-of-stream.js":90,"./lib/internal/streams/pipeline.js":92,dup:30}],96:[function(e,t,n){var i=e("once"),r=function(){},o=function(e,t,n){if("function"==typeof t)return o(e,null,t);t||(t={}),n=i(n||r);var s=e._writableState,a=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,p=function(){e.writable||u()},u=function(){l=!1,c||n.call(e)},d=function(){c=!1,l||n.call(e)},f=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},h=function(t){n.call(e,t)},m=function(){return(!c||a&&a.ended)&&(!l||s&&s.ended)?void 0:n.call(e,new Error("premature close"))},g=function(){e.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!s&&(e.on("end",p),e.on("close",p)):(e.on("complete",u),e.on("abort",m),e.req?g():e.on("request",g)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",f),e.on("end",d),e.on("finish",u),!1!==t.error&&e.on("error",h),e.on("close",m),function(){e.removeListener("complete",u),e.removeListener("abort",m),e.removeListener("request",g),e.req&&e.req.removeListener("finish",u),e.removeListener("end",p),e.removeListener("close",p),e.removeListener("finish",u),e.removeListener("exit",f),e.removeListener("end",d),e.removeListener("error",h),e.removeListener("close",m)}};t.exports=o},{once:183}],97:[function(e,t,n){"use strict";function i(e,t){for(const n in t)Object.defineProperty(e,n,{value:t[n],enumerable:!0,configurable:!0});return e}t.exports=function(e,t,n){if(!e||"string"==typeof e)throw new TypeError("Please pass an Error to err-code");n||(n={}),"object"==typeof t&&(n=t,t=void 0),null!=t&&(n.code=t);try{return i(e,n)}catch(t){n.message=e.message,n.stack=e.stack;const r=function(){};return r.prototype=Object.create(Object.getPrototypeOf(e)),i(new r,n)}}},{}],98:[function(e,t,n){"use strict";var i,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise((function(n,i){function r(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,r),i(n)},e.once("error",o)),e.once(t,r)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function p(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s,a;if(l(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=p(e))>0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=d.bind(i);return r.listener=n,i.wrapFn=r,r}function h(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):g(r,r.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return p(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,r=this._events;if(void 0!==r)i=i&&void 0===r.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,p=g(c,l);for(n=0;n<l;++n)o(p[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,i,r,o,s;if(l(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},{}],99:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],100:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":102,"./_stream_writable":104,_process:187,dup:17,inherits:119}],101:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":103,dup:18,inherits:119}],102:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":99,"./_stream_duplex":100,"./internal/streams/async_iterator":105,"./internal/streams/buffer_list":106,"./internal/streams/destroy":107,"./internal/streams/from":109,"./internal/streams/state":111,"./internal/streams/stream":112,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],103:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":99,"./_stream_duplex":100,dup:20,inherits:119}],104:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":99,"./_stream_duplex":100,"./internal/streams/destroy":107,"./internal/streams/state":111,"./internal/streams/stream":112,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],105:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":108,_process:187,dup:22}],106:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],107:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],108:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":99,dup:25}],109:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],110:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":99,"./end-of-stream":108,dup:27}],111:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":99,dup:28}],112:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],113:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":100,"./lib/_stream_passthrough.js":101,"./lib/_stream_readable.js":102,"./lib/_stream_transform.js":103,"./lib/_stream_writable.js":104,"./lib/internal/streams/end-of-stream.js":108,"./lib/internal/streams/pipeline.js":110,dup:30}],114:[function(e,t,n){const{Readable:i}=e("readable-stream"),r=e("typedarray-to-buffer");t.exports=class extends i{constructor(e,t={}){super(t),this._offset=0,this._ready=!1,this._file=e,this._size=e.size,this._chunkSize=t.chunkSize||Math.max(this._size/1e3,204800);const n=new FileReader;n.onload=()=>{this.push(r(n.result))},n.onerror=()=>{this.emit("error",n.error)},this.reader=n,this._generateHeaderBlocks(e,t,((e,t)=>{if(e)return this.emit("error",e);Array.isArray(t)&&t.forEach((e=>this.push(e))),this._ready=!0,this.emit("_ready")}))}_generateHeaderBlocks(e,t,n){n(null,[])}_read(){if(!this._ready)return void this.once("_ready",this._read.bind(this));const e=this._offset;let t=this._offset+this._chunkSize;if(t>this._size&&(t=this._size),e===this._size)return this.destroy(),void this.push(null);this.reader.readAsArrayBuffer(this._file.slice(e,t)),this._offset=t}destroy(){if(this._file=null,this.reader){this.reader.onload=null,this.reader.onerror=null;try{this.reader.abort()}catch(e){}}this.reader=null}}},{"readable-stream":113,"typedarray-to-buffer":296}],115:[function(e,t,n){t.exports=function(){if("undefined"==typeof window)return null;var e={RTCPeerConnection:window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,RTCSessionDescription:window.RTCSessionDescription||window.mozRTCSessionDescription||window.webkitRTCSessionDescription,RTCIceCandidate:window.RTCIceCandidate||window.mozRTCIceCandidate||window.webkitRTCIceCandidate};return e.RTCPeerConnection?e:null}},{}],116:[function(e,t,n){var i=e("http"),r=e("url"),o=t.exports;for(var s in i)i.hasOwnProperty(s)&&(o[s]=i[s]);function a(e){if("string"==typeof e&&(e=r.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=a(e),i.request.call(this,e,t)},o.get=function(e,t){return e=a(e),i.get.call(this,e,t)}},{http:264,url:299}],117:[function(e,t,n){
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
n.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,c=(1<<a)-1,l=c>>1,p=-7,u=n?r-1:0,d=n?-1:1,f=e[t+u];for(u+=d,o=f&(1<<-p)-1,f>>=-p,p+=a;p>0;o=256*o+e[t+u],u+=d,p-=8);for(s=o&(1<<-p)-1,o>>=-p,p+=i;p>0;s=256*s+e[t+u],u+=d,p-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=l}return(f?-1:1)*s*Math.pow(2,o-i)},n.write=function(e,t,n,i,r,o){var s,a,c,l=8*o-r-1,p=(1<<l)-1,u=p>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,h=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=p):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+u>=1?d/c:d*Math.pow(2,1-u))*c>=2&&(s++,c/=2),s+u>=p?(a=0,s=p):s+u>=1?(a=(t*c-1)*Math.pow(2,r),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=h,a/=256,r-=8);for(s=s<<r|a,l+=r;l>0;e[n+f]=255&s,f+=h,s/=256,l-=8);e[n+f-h]|=128*m}},{}],118:[function(e,t,n){
|
||
/*! immediate-chunk-store. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
const i=e("queue-microtask");t.exports=class{constructor(e){if(this.store=e,this.chunkLength=e.chunkLength,!this.store||!this.store.get||!this.store.put)throw new Error("First argument must be abstract-chunk-store compliant");this.mem=[]}put(e,t,n){this.mem[e]=t,this.store.put(e,t,(t=>{this.mem[e]=null,n&&n(t)}))}get(e,t,n){if("function"==typeof t)return this.get(e,null,t);let r=this.mem[e];if(!r)return this.store.get(e,t,n);if(t){const e=t.offset||0,n=t.length?e+t.length:r.length;r=r.slice(e,n)}i((()=>{n&&n(null,r)}))}close(e){this.store.close(e)}destroy(e){this.store.destroy(e)}}},{"queue-microtask":193}],119:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],120:[function(e,t,n){t.exports=function(e){for(var t=0,n=e.length;t<n;++t)if(e.charCodeAt(t)>127)return!1;return!0}},{}],121:[function(e,t,n){"use strict";var i=e("fs");function r(e){return i.existsSync(e)&&i.statSync(e).isFile()}t.exports=function(e,t){if(!t)return r(e);i.stat(e,(function(e,n){return e?t(e):t(null,n.isFile())}))},t.exports.sync=r},{fs:56}],122:[function(e,t,n){t.exports=o,o.strict=s,o.loose=a;var i=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function o(e){return s(e)||a(e)}function s(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function a(e){return r[i.call(e)]}},{}],123:[function(e,t,n){"use strict";n.re=()=>{throw new Error("`junk.re` was renamed to `junk.regex`")},n.regex=new RegExp(["^npm-debug\\.log$","^\\..*\\.swp$","^\\.DS_Store$","^\\.AppleDouble$","^\\.LSOverride$","^Icon\\r$","^\\._.*","^\\.Spotlight-V100(?:$|\\/)","\\.Trashes","^__MACOSX$","~$","^Thumbs\\.db$","^ehthumbs\\.db$","^Desktop\\.ini$","@eaDir$"].join("|")),n.is=e=>n.regex.test(e),n.not=e=>!n.is(e),n.default=t.exports},{}],124:[function(e,t,n){(function(n){(function(){
|
||
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
t.exports=o,t.exports.decode=o,t.exports.encode=function(e){(e=Object.assign({},e)).infoHashBuffer&&(e.xt="urn:btih:"+e.infoHashBuffer.toString("hex"));e.infoHash&&(e.xt="urn:btih:"+e.infoHash);e.name&&(e.dn=e.name);e.keywords&&(e.kt=e.keywords);e.announce&&(e.tr=e.announce);e.urlList&&(e.ws=e.urlList,delete e.as);e.peerAddresses&&(e["x.pe"]=e.peerAddresses);let t="magnet:?";return Object.keys(e).filter((e=>2===e.length||"x.pe"===e)).forEach(((n,i)=>{const o=Array.isArray(e[n])?e[n]:[e[n]];o.forEach(((e,r)=>{(i>0||r>0)&&("kt"!==n&&"so"!==n||0===r)&&(t+="&"),"dn"===n&&(e=encodeURIComponent(e).replace(/%20/g,"+")),"tr"!==n&&"xs"!==n&&"as"!==n&&"ws"!==n||(e=encodeURIComponent(e)),"kt"===n&&(e=encodeURIComponent(e)),"so"!==n&&(t+="kt"===n&&r>0?"+"+e:`${n}=${e}`)})),"so"===n&&(t+=`${n}=${r.compose(o)}`)})),t};const i=e("thirty-two"),r=e("bep53-range");function o(e){const t={},o=e.split("magnet:?")[1];let s;if((o&&o.length>=0?o.split("&"):[]).forEach((e=>{const n=e.split("=");if(2!==n.length)return;const i=n[0];let o=n[1];"dn"===i&&(o=decodeURIComponent(o).replace(/\+/g," ")),"tr"!==i&&"xs"!==i&&"as"!==i&&"ws"!==i||(o=decodeURIComponent(o)),"kt"===i&&(o=decodeURIComponent(o).split("+")),"ix"===i&&(o=Number(o)),"so"===i&&(o=r.parse(decodeURIComponent(o).split(","))),t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(o)):t[i]=o})),t.xt){(Array.isArray(t.xt)?t.xt:[t.xt]).forEach((e=>{if(s=e.match(/^urn:btih:(.{40})/))t.infoHash=s[1].toLowerCase();else if(s=e.match(/^urn:btih:(.{32})/)){const e=i.decode(s[1]);t.infoHash=n.from(e,"binary").toString("hex")}}))}return t.infoHash&&(t.infoHashBuffer=n.from(t.infoHash,"hex")),t.dn&&(t.name=t.dn),t.kt&&(t.keywords=t.kt),t.announce=[],("string"==typeof t.tr||Array.isArray(t.tr))&&(t.announce=t.announce.concat(t.tr)),t.urlList=[],("string"==typeof t.as||Array.isArray(t.as))&&(t.urlList=t.urlList.concat(t.as)),("string"==typeof t.ws||Array.isArray(t.ws))&&(t.urlList=t.urlList.concat(t.ws)),t.peerAddresses=[],("string"==typeof t["x.pe"]||Array.isArray(t["x.pe"]))&&(t.peerAddresses=t.peerAddresses.concat(t["x.pe"])),t.announce=Array.from(new Set(t.announce)),t.urlList=Array.from(new Set(t.urlList)),t.peerAddresses=Array.from(new Set(t.peerAddresses)),t}}).call(this)}).call(this,e("buffer").Buffer)},{"bep53-range":8,buffer:60,"thirty-two":287}],125:[function(e,t,n){
|
||
/*! mediasource. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=a;var i=e("inherits"),r=e("readable-stream"),o=e("to-arraybuffer"),s="undefined"!=typeof window&&window.MediaSource;function a(e,t){var n=this;if(!(n instanceof a))return new a(e,t);if(!s)throw new Error("web browser lacks MediaSource support");t||(t={}),n._debug=t.debug,n._bufferDuration=t.bufferDuration||60,n._elem=e,n._mediaSource=new s,n._streams=[],n.detailedError=null,n._errorHandler=function(){n._elem.removeEventListener("error",n._errorHandler),n._streams.slice().forEach((function(e){e.destroy(n._elem.error)}))},n._elem.addEventListener("error",n._errorHandler),n._elem.src=window.URL.createObjectURL(n._mediaSource)}function c(e,t){var n=this;if(r.Writable.call(n),n._wrapper=e,n._elem=e._elem,n._mediaSource=e._mediaSource,n._allStreams=e._streams,n._allStreams.push(n),n._bufferDuration=e._bufferDuration,n._sourceBuffer=null,n._debugBuffers=[],n._openHandler=function(){n._onSourceOpen()},n._flowHandler=function(){n._flow()},n._errorHandler=function(e){n.destroyed||n.emit("error",e)},"string"==typeof t)n._type=t,"open"===n._mediaSource.readyState?n._createSourceBuffer():n._mediaSource.addEventListener("sourceopen",n._openHandler);else if(null===t._sourceBuffer)t.destroy(),n._type=t._type,n._mediaSource.addEventListener("sourceopen",n._openHandler);else{if(!t._sourceBuffer)throw new Error("The argument to MediaElementWrapper.createWriteStream must be a string or a previous stream returned from that function");t.destroy(),n._type=t._type,n._sourceBuffer=t._sourceBuffer,n._debugBuffers=t._debugBuffers,n._sourceBuffer.addEventListener("updateend",n._flowHandler),n._sourceBuffer.addEventListener("error",n._errorHandler)}n._elem.addEventListener("timeupdate",n._flowHandler),n.on("error",(function(e){n._wrapper.error(e)})),n.on("finish",(function(){if(!n.destroyed&&(n._finished=!0,n._allStreams.every((function(e){return e._finished})))){n._wrapper._dumpDebugData();try{n._mediaSource.endOfStream()}catch(e){}}}))}a.prototype.createWriteStream=function(e){return new c(this,e)},a.prototype.error=function(e){var t=this;t.detailedError||(t.detailedError=e),t._dumpDebugData();try{t._mediaSource.endOfStream("decode")}catch(e){}try{window.URL.revokeObjectURL(t._elem.src)}catch(e){}},a.prototype._dumpDebugData=function(){var e=this;e._debug&&(e._debug=!1,e._streams.forEach((function(e,t){var n,i,r;n=e._debugBuffers,i="mediasource-stream-"+t,(r=document.createElement("a")).href=window.URL.createObjectURL(new window.Blob(n)),r.download=i,r.click()})))},i(c,r.Writable),c.prototype._onSourceOpen=function(){var e=this;e.destroyed||(e._mediaSource.removeEventListener("sourceopen",e._openHandler),e._createSourceBuffer())},c.prototype.destroy=function(e){var t=this;t.destroyed||(t.destroyed=!0,t._allStreams.splice(t._allStreams.indexOf(t),1),t._mediaSource.removeEventListener("sourceopen",t._openHandler),t._elem.removeEventListener("timeupdate",t._flowHandler),t._sourceBuffer&&(t._sourceBuffer.removeEventListener("updateend",t._flowHandler),t._sourceBuffer.removeEventListener("error",t._errorHandler),"open"===t._mediaSource.readyState&&t._sourceBuffer.abort()),e&&t.emit("error",e),t.emit("close"))},c.prototype._createSourceBuffer=function(){var e=this;if(!e.destroyed)if(s.isTypeSupported(e._type)){if(e._sourceBuffer=e._mediaSource.addSourceBuffer(e._type),e._sourceBuffer.addEventListener("updateend",e._flowHandler),e._sourceBuffer.addEventListener("error",e._errorHandler),e._cb){var t=e._cb;e._cb=null,t()}}else e.destroy(new Error("The provided type is not supported"))},c.prototype._write=function(e,t,n){var i=this;if(!i.destroyed)if(i._sourceBuffer){if(i._sourceBuffer.updating)return n(new Error("Cannot append buffer while source buffer updating"));var r=o(e);i._wrapper._debug&&i._debugBuffers.push(r);try{i._sourceBuffer.appendBuffer(r)}catch(e){return void i.destroy(e)}i._cb=n}else i._cb=function(r){if(r)return n(r);i._write(e,t,n)}},c.prototype._flow=function(){var e=this;if(!e.destroyed&&e._sourceBuffer&&!e._sourceBuffer.updating&&!("open"===e._mediaSource.readyState&&e._getBufferDuration()>e._bufferDuration)&&e._cb){var t=e._cb;e._cb=null,t()}};c.prototype._getBufferDuration=function(){for(var e=this._sourceBuffer.buffered,t=this._elem.currentTime,n=-1,i=0;i<e.length;i++){var r=e.start(i),o=e.end(i)+0;if(r>t)break;(n>=0||t<=o)&&(n=o)}var s=n-t;return s<0&&(s=0),s}},{inherits:119,"readable-stream":140,"to-arraybuffer":290}],126:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],127:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":129,"./_stream_writable":131,_process:187,dup:17,inherits:119}],128:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":130,dup:18,inherits:119}],129:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":126,"./_stream_duplex":127,"./internal/streams/async_iterator":132,"./internal/streams/buffer_list":133,"./internal/streams/destroy":134,"./internal/streams/from":136,"./internal/streams/state":138,"./internal/streams/stream":139,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],130:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":126,"./_stream_duplex":127,dup:20,inherits:119}],131:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":126,"./_stream_duplex":127,"./internal/streams/destroy":134,"./internal/streams/state":138,"./internal/streams/stream":139,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],132:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":135,_process:187,dup:22}],133:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],134:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],135:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":126,dup:25}],136:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],137:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":126,"./end-of-stream":135,dup:27}],138:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":126,dup:28}],139:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],140:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":127,"./lib/_stream_passthrough.js":128,"./lib/_stream_readable.js":129,"./lib/_stream_transform.js":130,"./lib/_stream_writable.js":131,"./lib/internal/streams/end-of-stream.js":135,"./lib/internal/streams/pipeline.js":137,dup:30}],141:[function(e,t,n){(function(e){(function(){function n(e,t){if(!(this instanceof n))return new n(e,t);if(t||(t={}),this.chunkLength=Number(e),!this.chunkLength)throw new Error("First argument must be a chunk length");this.chunks=[],this.closed=!1,this.length=Number(t.length)||1/0,this.length!==1/0&&(this.lastChunkLength=this.length%this.chunkLength||this.chunkLength,this.lastChunkIndex=Math.ceil(this.length/this.chunkLength)-1)}function i(t,n,i){e.nextTick((function(){t&&t(n,i)}))}t.exports=n,n.prototype.put=function(e,t,n){if(this.closed)return i(n,new Error("Storage is closed"));var r=e===this.lastChunkIndex;return r&&t.length!==this.lastChunkLength?i(n,new Error("Last chunk length must be "+this.lastChunkLength)):r||t.length===this.chunkLength?(this.chunks[e]=t,void i(n,null)):i(n,new Error("Chunk length must be "+this.chunkLength))},n.prototype.get=function(e,t,n){if("function"==typeof t)return this.get(e,null,t);if(this.closed)return i(n,new Error("Storage is closed"));var r=this.chunks[e];if(!r){var o=new Error("Chunk not found");return o.notFound=!0,i(n,o)}if(!t)return i(n,null,r);var s=t.offset||0,a=t.length||r.length-s;i(n,null,r.slice(s,a+s))},n.prototype.close=n.prototype.destroy=function(e){if(this.closed)return i(e,new Error("Storage is closed"));this.closed=!0,this.chunks=null,i(e,null)}}).call(this)}).call(this,e("_process"))},{_process:187}],142:[function(e,t,n){t.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma","es"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/mrb-publish+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["keynote"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana"},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana"},"image/avcs":{source:"iana"},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}},{}],143:[function(e,t,n){
|
||
/*!
|
||
* mime-db
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* MIT Licensed
|
||
*/
|
||
t.exports=e("./db.json")},{"./db.json":142}],144:[function(e,t,n){
|
||
/*!
|
||
* mime-types
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/
|
||
"use strict";var i,r,o,s=e("mime-db"),a=e("path").extname,c=/^\s*([^;\s]*)(?:;|\s|$)/,l=/^text\//i;function p(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),n=t&&s[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!l.test(t[1]))&&"UTF-8"}n.charset=p,n.charsets={lookup:p},n.contentType=function(e){if(!e||"string"!=typeof e)return!1;var t=-1===e.indexOf("/")?n.lookup(e):e;if(!t)return!1;if(-1===t.indexOf("charset")){var i=n.charset(t);i&&(t+="; charset="+i.toLowerCase())}return t},n.extension=function(e){if(!e||"string"!=typeof e)return!1;var t=c.exec(e),i=t&&n.extensions[t[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},n.extensions=Object.create(null),n.lookup=function(e){if(!e||"string"!=typeof e)return!1;var t=a("x."+e).toLowerCase().substr(1);if(!t)return!1;return n.types[t]||!1},n.types=Object.create(null),i=n.extensions,r=n.types,o=["nginx","apache",void 0,"iana"],Object.keys(s).forEach((function(e){var t=s[e],n=t.extensions;if(n&&n.length){i[e]=n;for(var a=0;a<n.length;a++){var c=n[a];if(r[c]){var l=o.indexOf(s[r[c]].source),p=o.indexOf(t.source);if("application/octet-stream"!==r[c]&&(l>p||l===p&&"application/"===r[c].substr(0,12)))continue}r[c]=e}}}))},{"mime-db":143,path:185}],145:[function(e,t,n){(function(t){(function(){var i=e("./index"),r=e("./descriptor"),o=e("uint64be"),s=20828448e5;n.fullBoxes={};function a(e,t,n){for(var i=t;i<n;i++)e[i]=0}function c(e,t,n){t.writeUInt32BE(Math.floor((e.getTime()+s)/1e3),n)}function l(e,t,n){t.writeUIntBE(Math.floor((e.getTime()+s)/1e3),n,6)}function p(e,t,n){t.writeUInt16BE(Math.floor(e)%65536,n),t.writeUInt16BE(Math.floor(256*e*256)%65536,n+2)}function u(e,t,n){e||(e=[0,0,0,0,0,0,0,0,0]);for(var i=0;i<e.length;i++)p(e[i],t,n+4*i)}function d(e){for(var t=new Array(e.length/4),n=0;n<t.length;n++)t[n]=m(e,4*n);return t}function f(e,t){return new Date(1e3*e.readUIntBE(t,6)-s)}function h(e,t){return new Date(1e3*e.readUInt32BE(t)-s)}function m(e,t){return e.readUInt16BE(t)+e.readUInt16BE(t+2)/65536}function g(e,t){return e[t]+e[t+1]/256}function v(e,t,n){var i;for(i=0;i<n&&0!==e[t+i];i++);return e.toString("utf8",t,t+i)}["mvhd","tkhd","mdhd","vmhd","smhd","stsd","esds","stsz","stco","co64","stss","stts","ctts","stsc","dref","elst","hdlr","mehd","trex","mfhd","tfhd","tfdt","trun"].forEach((function(e){n.fullBoxes[e]=!0})),n.ftyp={},n.ftyp.encode=function(e,i,r){i=i?i.slice(r):t.alloc(n.ftyp.encodingLength(e));var o=e.compatibleBrands||[];i.write(e.brand,0,4,"ascii"),i.writeUInt32BE(e.brandVersion,4);for(var s=0;s<o.length;s++)i.write(o[s],8+4*s,4,"ascii");return n.ftyp.encode.bytes=8+4*o.length,i},n.ftyp.decode=function(e,t){for(var n=(e=e.slice(t)).toString("ascii",0,4),i=e.readUInt32BE(4),r=[],o=8;o<e.length;o+=4)r.push(e.toString("ascii",o,o+4));return{brand:n,brandVersion:i,compatibleBrands:r}},n.ftyp.encodingLength=function(e){return 8+4*(e.compatibleBrands||[]).length},n.mvhd={},n.mvhd.encode=function(e,i,r){return i=i?i.slice(r):t.alloc(96),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.timeScale||0,8),i.writeUInt32BE(e.duration||0,12),p(e.preferredRate||0,i,16),function(e,t,n){t[n]=Math.floor(e)%256,t[n+1]=Math.floor(256*e)%256}(e.preferredVolume||0,i,20),a(i,22,32),u(e.matrix,i,32),i.writeUInt32BE(e.previewTime||0,68),i.writeUInt32BE(e.previewDuration||0,72),i.writeUInt32BE(e.posterTime||0,76),i.writeUInt32BE(e.selectionTime||0,80),i.writeUInt32BE(e.selectionDuration||0,84),i.writeUInt32BE(e.currentTime||0,88),i.writeUInt32BE(e.nextTrackId||0,92),n.mvhd.encode.bytes=96,i},n.mvhd.decode=function(e,t){return{ctime:h(e=e.slice(t),0),mtime:h(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),preferredRate:m(e,16),preferredVolume:g(e,20),matrix:d(e.slice(32,68)),previewTime:e.readUInt32BE(68),previewDuration:e.readUInt32BE(72),posterTime:e.readUInt32BE(76),selectionTime:e.readUInt32BE(80),selectionDuration:e.readUInt32BE(84),currentTime:e.readUInt32BE(88),nextTrackId:e.readUInt32BE(92)}},n.mvhd.encodingLength=function(e){return 96},n.tkhd={},n.tkhd.encode=function(e,i,r){return i=i?i.slice(r):t.alloc(80),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.trackId||0,8),a(i,12,16),i.writeUInt32BE(e.duration||0,16),a(i,20,28),i.writeUInt16BE(e.layer||0,28),i.writeUInt16BE(e.alternateGroup||0,30),i.writeUInt16BE(e.volume||0,32),u(e.matrix,i,36),i.writeUInt32BE(e.trackWidth||0,72),i.writeUInt32BE(e.trackHeight||0,76),n.tkhd.encode.bytes=80,i},n.tkhd.decode=function(e,t){return{ctime:h(e=e.slice(t),0),mtime:h(e,4),trackId:e.readUInt32BE(8),duration:e.readUInt32BE(16),layer:e.readUInt16BE(28),alternateGroup:e.readUInt16BE(30),volume:e.readUInt16BE(32),matrix:d(e.slice(36,72)),trackWidth:e.readUInt32BE(72),trackHeight:e.readUInt32BE(76)}},n.tkhd.encodingLength=function(e){return 80},n.mdhd={},n.mdhd.encode=function(e,i,r){return 1===e.version?(i=i?i.slice(r):t.alloc(32),l(e.ctime||new Date,i,0),l(e.mtime||new Date,i,8),i.writeUInt32BE(e.timeScale||0,16),i.writeUIntBE(e.duration||0,20,6),i.writeUInt16BE(e.language||0,28),i.writeUInt16BE(e.quality||0,30),n.mdhd.encode.bytes=32,i):(i=i?i.slice(r):t.alloc(20),c(e.ctime||new Date,i,0),c(e.mtime||new Date,i,4),i.writeUInt32BE(e.timeScale||0,8),i.writeUInt32BE(e.duration||0,12),i.writeUInt16BE(e.language||0,16),i.writeUInt16BE(e.quality||0,18),n.mdhd.encode.bytes=20,i)},n.mdhd.decode=function(e,t,n){return e=e.slice(t),n-t!=20?{ctime:f(e,0),mtime:f(e,8),timeScale:e.readUInt32BE(16),duration:e.readUIntBE(20,6),language:e.readUInt16BE(28),quality:e.readUInt16BE(30)}:{ctime:h(e,0),mtime:h(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),language:e.readUInt16BE(16),quality:e.readUInt16BE(18)}},n.mdhd.encodingLength=function(e){return 1===e.version?32:20},n.vmhd={},n.vmhd.encode=function(e,i,r){(i=i?i.slice(r):t.alloc(8)).writeUInt16BE(e.graphicsMode||0,0);var o=e.opcolor||[0,0,0];return i.writeUInt16BE(o[0],2),i.writeUInt16BE(o[1],4),i.writeUInt16BE(o[2],6),n.vmhd.encode.bytes=8,i},n.vmhd.decode=function(e,t){return{graphicsMode:(e=e.slice(t)).readUInt16BE(0),opcolor:[e.readUInt16BE(2),e.readUInt16BE(4),e.readUInt16BE(6)]}},n.vmhd.encodingLength=function(e){return 8},n.smhd={},n.smhd.encode=function(e,i,r){return(i=i?i.slice(r):t.alloc(4)).writeUInt16BE(e.balance||0,0),a(i,2,4),n.smhd.encode.bytes=4,i},n.smhd.decode=function(e,t){return{balance:(e=e.slice(t)).readUInt16BE(0)}},n.smhd.encodingLength=function(e){return 4},n.stsd={},n.stsd.encode=function(e,r,o){r=r?r.slice(o):t.alloc(n.stsd.encodingLength(e));var s=e.entries||[];r.writeUInt32BE(s.length,0);for(var a=4,c=0;c<s.length;c++){var l=s[c];i.encode(l,r,a),a+=i.encode.bytes}return n.stsd.encode.bytes=a,r},n.stsd.decode=function(e,t,n){for(var r=(e=e.slice(t)).readUInt32BE(0),o=new Array(r),s=4,a=0;a<r;a++){var c=i.decode(e,s,n);o[a]=c,s+=c.length}return{entries:o}},n.stsd.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++)t+=i.encodingLength(e.entries[n]);return t},n.avc1=n.VisualSampleEntry={},n.VisualSampleEntry.encode=function(e,r,o){a(r=r?r.slice(o):t.alloc(n.VisualSampleEntry.encodingLength(e)),0,6),r.writeUInt16BE(e.dataReferenceIndex||0,6),a(r,8,24),r.writeUInt16BE(e.width||0,24),r.writeUInt16BE(e.height||0,26),r.writeUInt32BE(e.hResolution||4718592,28),r.writeUInt32BE(e.vResolution||4718592,32),a(r,36,40),r.writeUInt16BE(e.frameCount||1,40);var s=e.compressorName||"",c=Math.min(s.length,31);r.writeUInt8(c,42),r.write(s,43,c,"utf8"),r.writeUInt16BE(e.depth||24,74),r.writeInt16BE(-1,76);var l=78;(e.children||[]).forEach((function(e){i.encode(e,r,l),l+=i.encode.bytes})),n.VisualSampleEntry.encode.bytes=l},n.VisualSampleEntry.decode=function(e,t,n){e=e.slice(t);for(var r=n-t,o=Math.min(e.readUInt8(42),31),s={dataReferenceIndex:e.readUInt16BE(6),width:e.readUInt16BE(24),height:e.readUInt16BE(26),hResolution:e.readUInt32BE(28),vResolution:e.readUInt32BE(32),frameCount:e.readUInt16BE(40),compressorName:e.toString("utf8",43,43+o),depth:e.readUInt16BE(74),children:[]},a=78;r-a>=8;){var c=i.decode(e,a,r);s.children.push(c),s[c.type]=c,a+=c.length}return s},n.VisualSampleEntry.encodingLength=function(e){var t=78;return(e.children||[]).forEach((function(e){t+=i.encodingLength(e)})),t},n.avcC={},n.avcC.encode=function(e,i,r){i=i?i.slice(r):t.alloc(e.buffer.length),e.buffer.copy(i),n.avcC.encode.bytes=e.buffer.length},n.avcC.decode=function(e,n,i){return{mimeCodec:(e=e.slice(n,i)).toString("hex",1,4),buffer:t.from(e)}},n.avcC.encodingLength=function(e){return e.buffer.length},n.mp4a=n.AudioSampleEntry={},n.AudioSampleEntry.encode=function(e,r,o){a(r=r?r.slice(o):t.alloc(n.AudioSampleEntry.encodingLength(e)),0,6),r.writeUInt16BE(e.dataReferenceIndex||0,6),a(r,8,16),r.writeUInt16BE(e.channelCount||2,16),r.writeUInt16BE(e.sampleSize||16,18),a(r,20,24),r.writeUInt32BE(e.sampleRate||0,24);var s=28;(e.children||[]).forEach((function(e){i.encode(e,r,s),s+=i.encode.bytes})),n.AudioSampleEntry.encode.bytes=s},n.AudioSampleEntry.decode=function(e,t,n){for(var r=n-t,o={dataReferenceIndex:(e=e.slice(t,n)).readUInt16BE(6),channelCount:e.readUInt16BE(16),sampleSize:e.readUInt16BE(18),sampleRate:e.readUInt32BE(24),children:[]},s=28;r-s>=8;){var a=i.decode(e,s,r);o.children.push(a),o[a.type]=a,s+=a.length}return o},n.AudioSampleEntry.encodingLength=function(e){var t=28;return(e.children||[]).forEach((function(e){t+=i.encodingLength(e)})),t},n.esds={},n.esds.encode=function(e,i,r){i=i?i.slice(r):t.alloc(e.buffer.length),e.buffer.copy(i,0),n.esds.encode.bytes=e.buffer.length},n.esds.decode=function(e,n,i){e=e.slice(n,i);var o=r.Descriptor.decode(e,0,e.length),s=("ESDescriptor"===o.tagName?o:{}).DecoderConfigDescriptor||{},a=s.oti||0,c=s.DecoderSpecificInfo,l=c?(248&c.buffer.readUInt8(0))>>3:0,p=null;return a&&(p=a.toString(16),l&&(p+="."+l)),{mimeCodec:p,buffer:t.from(e.slice(0))}},n.esds.encodingLength=function(e){return e.buffer.length},n.stsz={},n.stsz.encode=function(e,i,r){var o=e.entries||[];(i=i?i.slice(r):t.alloc(n.stsz.encodingLength(e))).writeUInt32BE(0,0),i.writeUInt32BE(o.length,4);for(var s=0;s<o.length;s++)i.writeUInt32BE(o[s],4*s+8);return n.stsz.encode.bytes=8+4*o.length,i},n.stsz.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=e.readUInt32BE(4),r=new Array(i),o=0;o<i;o++)r[o]=0===n?e.readUInt32BE(4*o+8):n;return{entries:r}},n.stsz.encodingLength=function(e){return 8+4*e.entries.length},n.stss=n.stco={},n.stco.encode=function(e,i,r){var o=e.entries||[];(i=i?i.slice(r):t.alloc(n.stco.encodingLength(e))).writeUInt32BE(o.length,0);for(var s=0;s<o.length;s++)i.writeUInt32BE(o[s],4*s+4);return n.stco.encode.bytes=4+4*o.length,i},n.stco.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),r=0;r<n;r++)i[r]=e.readUInt32BE(4*r+4);return{entries:i}},n.stco.encodingLength=function(e){return 4+4*e.entries.length},n.co64={},n.co64.encode=function(e,i,r){var s=e.entries||[];(i=i?i.slice(r):t.alloc(n.co64.encodingLength(e))).writeUInt32BE(s.length,0);for(var a=0;a<s.length;a++)o.encode(s[a],i,8*a+4);return n.co64.encode.bytes=4+8*s.length,i},n.co64.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),r=0;r<n;r++)i[r]=o.decode(e,8*r+4);return{entries:i}},n.co64.encodingLength=function(e){return 4+8*e.entries.length},n.stts={},n.stts.encode=function(e,i,r){var o=e.entries||[];(i=i?i.slice(r):t.alloc(n.stts.encodingLength(e))).writeUInt32BE(o.length,0);for(var s=0;s<o.length;s++){var a=8*s+4;i.writeUInt32BE(o[s].count||0,a),i.writeUInt32BE(o[s].duration||0,a+4)}return n.stts.encode.bytes=4+8*e.entries.length,i},n.stts.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),r=0;r<n;r++){var o=8*r+4;i[r]={count:e.readUInt32BE(o),duration:e.readUInt32BE(o+4)}}return{entries:i}},n.stts.encodingLength=function(e){return 4+8*e.entries.length},n.ctts={},n.ctts.encode=function(e,i,r){var o=e.entries||[];(i=i?i.slice(r):t.alloc(n.ctts.encodingLength(e))).writeUInt32BE(o.length,0);for(var s=0;s<o.length;s++){var a=8*s+4;i.writeUInt32BE(o[s].count||0,a),i.writeUInt32BE(o[s].compositionOffset||0,a+4)}return n.ctts.encode.bytes=4+8*o.length,i},n.ctts.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),r=0;r<n;r++){var o=8*r+4;i[r]={count:e.readUInt32BE(o),compositionOffset:e.readInt32BE(o+4)}}return{entries:i}},n.ctts.encodingLength=function(e){return 4+8*e.entries.length},n.stsc={},n.stsc.encode=function(e,i,r){var o=e.entries||[];(i=i?i.slice(r):t.alloc(n.stsc.encodingLength(e))).writeUInt32BE(o.length,0);for(var s=0;s<o.length;s++){var a=12*s+4;i.writeUInt32BE(o[s].firstChunk||0,a),i.writeUInt32BE(o[s].samplesPerChunk||0,a+4),i.writeUInt32BE(o[s].sampleDescriptionId||0,a+8)}return n.stsc.encode.bytes=4+12*o.length,i},n.stsc.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),r=0;r<n;r++){var o=12*r+4;i[r]={firstChunk:e.readUInt32BE(o),samplesPerChunk:e.readUInt32BE(o+4),sampleDescriptionId:e.readUInt32BE(o+8)}}return{entries:i}},n.stsc.encodingLength=function(e){return 4+12*e.entries.length},n.dref={},n.dref.encode=function(e,i,r){i=i?i.slice(r):t.alloc(n.dref.encodingLength(e));var o=e.entries||[];i.writeUInt32BE(o.length,0);for(var s=4,a=0;a<o.length;a++){var c=o[a],l=(c.buf?c.buf.length:0)+4+4;i.writeUInt32BE(l,s),s+=4,i.write(c.type,s,4,"ascii"),s+=4,c.buf&&(c.buf.copy(i,s),s+=c.buf.length)}return n.dref.encode.bytes=s,i},n.dref.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),r=4,o=0;o<n;o++){var s=e.readUInt32BE(r),a=e.toString("ascii",r+4,r+8),c=e.slice(r+8,r+s);r+=s,i[o]={type:a,buf:c}}return{entries:i}},n.dref.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++){var i=e.entries[n].buf;t+=(i?i.length:0)+4+4}return t},n.elst={},n.elst.encode=function(e,i,r){var o=e.entries||[];(i=i?i.slice(r):t.alloc(n.elst.encodingLength(e))).writeUInt32BE(o.length,0);for(var s=0;s<o.length;s++){var a=12*s+4;i.writeUInt32BE(o[s].trackDuration||0,a),i.writeUInt32BE(o[s].mediaTime||0,a+4),p(o[s].mediaRate||0,i,a+8)}return n.elst.encode.bytes=4+12*o.length,i},n.elst.decode=function(e,t){for(var n=(e=e.slice(t)).readUInt32BE(0),i=new Array(n),r=0;r<n;r++){var o=12*r+4;i[r]={trackDuration:e.readUInt32BE(o),mediaTime:e.readInt32BE(o+4),mediaRate:m(e,o+8)}}return{entries:i}},n.elst.encodingLength=function(e){return 4+12*e.entries.length},n.hdlr={},n.hdlr.encode=function(e,i,r){i=i?i.slice(r):t.alloc(n.hdlr.encodingLength(e));var o=21+(e.name||"").length;return i.fill(0,0,o),i.write(e.handlerType||"",4,4,"ascii"),function(e,n,i){var r=t.from(e,"utf8");r.copy(n,i),n[i+r.length]=0}(e.name||"",i,20),n.hdlr.encode.bytes=o,i},n.hdlr.decode=function(e,t,n){return{handlerType:(e=e.slice(t)).toString("ascii",4,8),name:v(e,20,n)}},n.hdlr.encodingLength=function(e){return 21+(e.name||"").length},n.mehd={},n.mehd.encode=function(e,i,r){return(i=i?i.slice(r):t.alloc(4)).writeUInt32BE(e.fragmentDuration||0,0),n.mehd.encode.bytes=4,i},n.mehd.decode=function(e,t){return{fragmentDuration:(e=e.slice(t)).readUInt32BE(0)}},n.mehd.encodingLength=function(e){return 4},n.trex={},n.trex.encode=function(e,i,r){return(i=i?i.slice(r):t.alloc(20)).writeUInt32BE(e.trackId||0,0),i.writeUInt32BE(e.defaultSampleDescriptionIndex||0,4),i.writeUInt32BE(e.defaultSampleDuration||0,8),i.writeUInt32BE(e.defaultSampleSize||0,12),i.writeUInt32BE(e.defaultSampleFlags||0,16),n.trex.encode.bytes=20,i},n.trex.decode=function(e,t){return{trackId:(e=e.slice(t)).readUInt32BE(0),defaultSampleDescriptionIndex:e.readUInt32BE(4),defaultSampleDuration:e.readUInt32BE(8),defaultSampleSize:e.readUInt32BE(12),defaultSampleFlags:e.readUInt32BE(16)}},n.trex.encodingLength=function(e){return 20},n.mfhd={},n.mfhd.encode=function(e,i,r){return(i=i?i.slice(r):t.alloc(4)).writeUInt32BE(e.sequenceNumber||0,0),n.mfhd.encode.bytes=4,i},n.mfhd.decode=function(e,t){return{sequenceNumber:e.readUInt32BE(0)}},n.mfhd.encodingLength=function(e){return 4},n.tfhd={},n.tfhd.encode=function(e,i,r){return(i=i?i.slice(r):t.alloc(4)).writeUInt32BE(e.trackId,0),n.tfhd.encode.bytes=4,i},n.tfhd.decode=function(e,t){},n.tfhd.encodingLength=function(e){return 4},n.tfdt={},n.tfdt.encode=function(e,i,r){return(i=i?i.slice(r):t.alloc(4)).writeUInt32BE(e.baseMediaDecodeTime||0,0),n.tfdt.encode.bytes=4,i},n.tfdt.decode=function(e,t){},n.tfdt.encodingLength=function(e){return 4},n.trun={},n.trun.encode=function(e,i,r){(i=i?i.slice(r):t.alloc(8+16*e.entries.length)).writeUInt32BE(e.entries.length,0),i.writeInt32BE(e.dataOffset,4);for(var o=8,s=0;s<e.entries.length;s++){var a=e.entries[s];i.writeUInt32BE(a.sampleDuration,o),o+=4,i.writeUInt32BE(a.sampleSize,o),o+=4,i.writeUInt32BE(a.sampleFlags,o),o+=4,0===(e.version||0)?i.writeUInt32BE(a.sampleCompositionTimeOffset,o):i.writeInt32BE(a.sampleCompositionTimeOffset,o),o+=4}n.trun.encode.bytes=o},n.trun.decode=function(e,t){},n.trun.encodingLength=function(e){return 8+16*e.entries.length},n.mdat={},n.mdat.encode=function(e,t,i){e.buffer?(e.buffer.copy(t,i),n.mdat.encode.bytes=e.buffer.length):n.mdat.encode.bytes=n.mdat.encodingLength(e)},n.mdat.decode=function(e,n,i){return{buffer:t.from(e.slice(n,i))}},n.mdat.encodingLength=function(e){return e.buffer?e.buffer.length:e.contentLength}}).call(this)}).call(this,e("buffer").Buffer)},{"./descriptor":146,"./index":147,buffer:60,uint64be:297}],146:[function(e,t,n){(function(e){(function(){var t={3:"ESDescriptor",4:"DecoderConfigDescriptor",5:"DecoderSpecificInfo",6:"SLConfigDescriptor"};n.Descriptor={},n.Descriptor.decode=function(i,r,o){var s,a,c=i.readUInt8(r),l=r+1,p=0;do{p=p<<7|127&(s=i.readUInt8(l++))}while(128&s);var u=t[c];return(a=n[u]?n[u].decode(i,l,o):{buffer:e.from(i.slice(l,l+p))}).tag=c,a.tagName=u,a.length=l-r+p,a.contentsLen=p,a},n.DescriptorArray={},n.DescriptorArray.decode=function(e,i,r){for(var o=i,s={};o+2<=r;){var a=n.Descriptor.decode(e,o,r);o+=a.length,s[t[a.tag]||"Descriptor"+a.tag]=a}return s},n.ESDescriptor={},n.ESDescriptor.decode=function(e,t,i){var r=e.readUInt8(t+2),o=t+3;(128&r&&(o+=2),64&r)&&(o+=e.readUInt8(o)+1);return 32&r&&(o+=2),n.DescriptorArray.decode(e,o,i)},n.DecoderConfigDescriptor={},n.DecoderConfigDescriptor.decode=function(e,t,i){var r=e.readUInt8(t),o=n.DescriptorArray.decode(e,t+13,i);return o.oti=r,o}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],147:[function(e,t,n){(function(t){(function(){var i=e("uint64be"),r=e("./boxes"),o=4294967295,s=n,a=n.containers={moov:["mvhd","meta","traks","mvex"],trak:["tkhd","tref","trgr","edts","meta","mdia","udta"],edts:["elst"],mdia:["mdhd","hdlr","elng","minf"],minf:["vmhd","smhd","hmhd","sthd","nmhd","dinf","stbl"],dinf:["dref"],stbl:["stsd","stts","ctts","cslg","stsc","stsz","stz2","stco","co64","stss","stsh","padb","stdp","sdtp","sbgps","sgpds","subss","saizs","saios"],mvex:["mehd","trexs","leva"],moof:["mfhd","meta","trafs"],traf:["tfhd","tfdt","trun","sbgps","sgpds","subss","saizs","saios","meta"]};s.encode=function(e,n,i){return s.encodingLength(e),i=i||0,n=n||t.alloc(e.length),s._encode(e,n,i)},s._encode=function(e,t,n){var c=e.type,l=e.length;l>o&&(l=1),t.writeUInt32BE(l,n),t.write(e.type,n+4,4,"ascii");var p=n+8;if(1===l&&(i.encode(e.length,t,p),p+=8),r.fullBoxes[c]&&(t.writeUInt32BE(e.flags||0,p),t.writeUInt8(e.version||0,p),p+=4),a[c])a[c].forEach((function(n){if(5===n.length){var i=e[n]||[];n=n.substr(0,4),i.forEach((function(e){s._encode(e,t,p),p+=s.encode.bytes}))}else e[n]&&(s._encode(e[n],t,p),p+=s.encode.bytes)})),e.otherBoxes&&e.otherBoxes.forEach((function(e){s._encode(e,t,p),p+=s.encode.bytes}));else if(r[c]){var u=r[c].encode;u(e,t,p),p+=u.bytes}else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+c+"') or `buffer` must be set");e.buffer.copy(t,p),p+=e.buffer.length}return s.encode.bytes=p-n,t},s.readHeaders=function(e,t,n){if(t=t||0,(n=n||e.length)-t<8)return 8;var o,s,a=e.readUInt32BE(t),c=e.toString("ascii",t+4,t+8),l=t+8;if(1===a){if(n-t<16)return 16;a=i.decode(e,l),l+=8}return r.fullBoxes[c]&&(o=e.readUInt8(l),s=16777215&e.readUInt32BE(l),l+=4),{length:a,headersLen:l-t,contentLen:a-(l-t),type:c,version:o,flags:s}},s.decode=function(e,t,n){t=t||0,n=n||e.length;var i=s.readHeaders(e,t,n);if(!i||i.length>n-t)throw new Error("Data too short");return s.decodeWithoutHeaders(i,e,t+i.headersLen,t+i.length)},s.decodeWithoutHeaders=function(e,n,i,o){i=i||0,o=o||n.length;var c=e.type,l={};if(a[c]){l.otherBoxes=[];for(var p=a[c],u=i;o-u>=8;){var d=s.decode(n,u,o);if(u+=d.length,p.indexOf(d.type)>=0)l[d.type]=d;else if(p.indexOf(d.type+"s")>=0){var f=d.type+"s";(l[f]=l[f]||[]).push(d)}else l.otherBoxes.push(d)}}else if(r[c]){l=(0,r[c].decode)(n,i,o)}else l.buffer=t.from(n.slice(i,o));return l.length=e.length,l.contentLen=e.contentLen,l.type=e.type,l.version=e.version,l.flags=e.flags,l},s.encodingLength=function(e){var t=e.type,n=8;if(r.fullBoxes[t]&&(n+=4),a[t])a[t].forEach((function(t){if(5===t.length){var i=e[t]||[];t=t.substr(0,4),i.forEach((function(e){e.type=t,n+=s.encodingLength(e)}))}else if(e[t]){var r=e[t];r.type=t,n+=s.encodingLength(r)}})),e.otherBoxes&&e.otherBoxes.forEach((function(e){n+=s.encodingLength(e)}));else if(r[t])n+=r[t].encodingLength(e);else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+t+"') or `buffer` must be set");n+=e.buffer.length}return n>o&&(n+=8),e.length=n,n}}).call(this)}).call(this,e("buffer").Buffer)},{"./boxes":145,buffer:60,uint64be:297}],148:[function(e,t,n){(function(n){(function(){var i=e("readable-stream"),r=e("next-event"),o=e("mp4-box-encoding"),s=n.alloc(0);class a extends i.Writable{constructor(e){super(e),this.destroyed=!1,this._pending=0,this._missing=0,this._ignoreEmpty=!1,this._buf=null,this._str=null,this._cb=null,this._ondrain=null,this._writeBuffer=null,this._writeCb=null,this._ondrain=null,this._kick()}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))}_write(e,t,n){if(!this.destroyed){for(var i=!this._str||!this._str._writableState.needDrain;e.length&&!this.destroyed;){if(!this._missing&&!this._ignoreEmpty)return this._writeBuffer=e,void(this._writeCb=n);var r=e.length<this._missing?e.length:this._missing;if(this._buf?e.copy(this._buf,this._buf.length-this._missing):this._str&&(i=this._str.write(r===e.length?e:e.slice(0,r))),this._missing-=r,!this._missing){var o=this._buf,a=this._cb,c=this._str;this._buf=this._cb=this._str=this._ondrain=null,i=!0,this._ignoreEmpty=!1,c&&c.end(),a&&a(o)}e=r===e.length?s:e.slice(r)}if(this._pending&&!this._missing)return this._writeBuffer=e,void(this._writeCb=n);i?n():this._ondrain(n)}}_buffer(e,t){this._missing=e,this._buf=n.alloc(e),this._cb=t}_stream(e,t){return this._missing=e,this._str=new c(this),this._ondrain=r(this._str,"drain"),this._pending++,this._str.on("end",(()=>{this._pending--,this._kick()})),this._cb=t,this._str}_readBox(){const e=(t,i)=>{this._buffer(t,(t=>{i=i?n.concat([i,t]):t;var r=o.readHeaders(i);"number"==typeof r?e(r-i.length,i):(this._pending++,this._headers=r,this.emit("box",r))}))};e(8)}stream(){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var e=this._headers;return this._headers=null,this._stream(e.contentLen,null)}decode(e){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var t=this._headers;this._headers=null,this._buffer(t.contentLen,(n=>{var i=o.decodeWithoutHeaders(t,n);e(i),this._pending--,this._kick()}))}ignore(){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var e=this._headers;this._headers=null,this._missing=e.contentLen,0===this._missing&&(this._ignoreEmpty=!0),this._cb=()=>{this._pending--,this._kick()}}_kick(){if(!this._pending&&(this._buf||this._str||this._readBox(),this._writeBuffer)){var e=this._writeCb,t=this._writeBuffer;this._writeBuffer=null,this._writeCb=null,this._write(t,null,e)}}}class c extends i.PassThrough{constructor(e){super(),this._parent=e,this.destroyed=!1}destroy(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}t.exports=a}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60,"mp4-box-encoding":147,"next-event":182,"readable-stream":165}],149:[function(e,t,n){(function(n,i){(function(){var r=e("readable-stream"),o=e("mp4-box-encoding");function s(){}class a extends r.Readable{constructor(e){super(e),this.destroyed=!1,this._finalized=!1,this._reading=!1,this._stream=null,this._drain=null,this._want=!1,this._onreadable=()=>{this._want&&(this._want=!1,this._read())},this._onend=()=>{this._stream=null}}mdat(e,t){this.mediaData(e,t)}mediaData(e,t){var n=new c(this);return this.box({type:"mdat",contentLength:e,encodeBufferLen:8,stream:n},t),n}box(e,t){if(t||(t=s),this.destroyed)return t(new Error("Encoder is destroyed"));var r;if(e.encodeBufferLen&&(r=i.alloc(e.encodeBufferLen)),e.stream)e.buffer=null,r=o.encode(e,r),this.push(r),this._stream=e.stream,this._stream.on("readable",this._onreadable),this._stream.on("end",this._onend),this._stream.on("end",t),this._forward();else{if(r=o.encode(e,r),this.push(r))return n.nextTick(t);this._drain=t}}destroy(e){if(!this.destroyed){if(this.destroyed=!0,this._stream&&this._stream.destroy&&this._stream.destroy(),this._stream=null,this._drain){var t=this._drain;this._drain=null,t(e)}e&&this.emit("error",e),this.emit("close")}}finalize(){this._finalized=!0,this._stream||this._drain||this.push(null)}_forward(){if(this._stream)for(;!this.destroyed;){var e=this._stream.read();if(!e)return void(this._want=!!this._stream);if(!this.push(e))return}}_read(){if(!this._reading&&!this.destroyed){if(this._reading=!0,this._stream&&this._forward(),this._drain){var e=this._drain;this._drain=null,e()}this._reading=!1,this._finalized&&this.push(null)}}}class c extends r.PassThrough{constructor(e){super(),this._parent=e,this.destroyed=!1}destroy(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}t.exports=a}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:187,buffer:60,"mp4-box-encoding":147,"readable-stream":165}],150:[function(e,t,n){const i=e("./decode"),r=e("./encode");n.decode=e=>new i(e),n.encode=e=>new r(e)},{"./decode":148,"./encode":149}],151:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],152:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":154,"./_stream_writable":156,_process:187,dup:17,inherits:119}],153:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":155,dup:18,inherits:119}],154:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":151,"./_stream_duplex":152,"./internal/streams/async_iterator":157,"./internal/streams/buffer_list":158,"./internal/streams/destroy":159,"./internal/streams/from":161,"./internal/streams/state":163,"./internal/streams/stream":164,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],155:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":151,"./_stream_duplex":152,dup:20,inherits:119}],156:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":151,"./_stream_duplex":152,"./internal/streams/destroy":159,"./internal/streams/state":163,"./internal/streams/stream":164,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],157:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":160,_process:187,dup:22}],158:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],159:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],160:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":151,dup:25}],161:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],162:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":151,"./end-of-stream":160,dup:27}],163:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":151,dup:28}],164:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],165:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":152,"./lib/_stream_passthrough.js":153,"./lib/_stream_readable.js":154,"./lib/_stream_transform.js":155,"./lib/_stream_writable.js":156,"./lib/internal/streams/end-of-stream.js":160,"./lib/internal/streams/pipeline.js":162,dup:30}],166:[function(e,t,n){
|
||
/*! multistream. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=e("readable-stream");function r(e){return s(e,{objectMode:!0,highWaterMark:16})}function o(e){return s(e)}function s(e,t){if(!e||"function"==typeof e||e._readableState)return e;var n=new i.Readable(t).wrap(e);return e.destroy&&(n.destroy=e.destroy.bind(e)),n}class a extends i.Readable{constructor(e,t){super(t),this.destroyed=!1,this._drained=!1,this._forwarding=!1,this._current=null,this._toStreams2=t&&t.objectMode?r:o,"function"==typeof e?this._queue=e:(this._queue=e.map(this._toStreams2),this._queue.forEach((e=>{"function"!=typeof e&&this._attachErrorListener(e)}))),this._next()}_read(){this._drained=!0,this._forward()}_forward(){if(!this._forwarding&&this._drained&&this._current){var e;for(this._forwarding=!0;this._drained&&null!==(e=this._current.read());)this._drained=this.push(e);this._forwarding=!1}}destroy(e){this.destroyed||(this.destroyed=!0,this._current&&this._current.destroy&&this._current.destroy(),"function"!=typeof this._queue&&this._queue.forEach((e=>{e.destroy&&e.destroy()})),e&&this.emit("error",e),this.emit("close"))}_next(){if(this._current=null,"function"==typeof this._queue)this._queue(((e,t)=>{if(e)return this.destroy(e);t=this._toStreams2(t),this._attachErrorListener(t),this._gotNextStream(t)}));else{var e=this._queue.shift();"function"==typeof e&&(e=this._toStreams2(e()),this._attachErrorListener(e)),this._gotNextStream(e)}}_gotNextStream(e){if(!e)return this.push(null),void this.destroy();this._current=e,this._forward();const t=()=>{this._forward()},n=()=>{e._readableState.ended||this.destroy()},i=()=>{this._current=null,e.removeListener("readable",t),e.removeListener("end",i),e.removeListener("close",n),this._next()};e.on("readable",t),e.once("end",i),e.once("close",n)}_attachErrorListener(e){if(!e)return;const t=n=>{e.removeListener("error",t),this.destroy(n)};e.once("error",t)}}a.obj=e=>new a(e,{objectMode:!0,highWaterMark:16}),t.exports=a},{"readable-stream":181}],167:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],168:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":170,"./_stream_writable":172,_process:187,dup:17,inherits:119}],169:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":171,dup:18,inherits:119}],170:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":167,"./_stream_duplex":168,"./internal/streams/async_iterator":173,"./internal/streams/buffer_list":174,"./internal/streams/destroy":175,"./internal/streams/from":177,"./internal/streams/state":179,"./internal/streams/stream":180,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],171:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":167,"./_stream_duplex":168,dup:20,inherits:119}],172:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":167,"./_stream_duplex":168,"./internal/streams/destroy":175,"./internal/streams/state":179,"./internal/streams/stream":180,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],173:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":176,_process:187,dup:22}],174:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],175:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],176:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":167,dup:25}],177:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],178:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":167,"./end-of-stream":176,dup:27}],179:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":167,dup:28}],180:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],181:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":168,"./lib/_stream_passthrough.js":169,"./lib/_stream_readable.js":170,"./lib/_stream_transform.js":171,"./lib/_stream_writable.js":172,"./lib/internal/streams/end-of-stream.js":176,"./lib/internal/streams/pipeline.js":178,dup:30}],182:[function(e,t,n){t.exports=function(e,t){var n=null;return e.on(t,(function(e){if(n){var t=n;n=null,t(e)}})),function(e){n=e}}},{}],183:[function(e,t,n){var i=e("wrappy");function r(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}t.exports=i(r),t.exports.strict=i(o),r.proto=r((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},{wrappy:335}],184:[function(e,t,n){(function(n,i){(function(){
|
||
/*! parse-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const r=e("bencode"),o=e("blob-to-buffer"),s=e("fs"),a=e("simple-get"),c=e("magnet-uri"),l=e("path"),p=e("simple-sha1");function u(e){if("string"==typeof e&&/^(stream-)?magnet:/.test(e)){const t=c(e);if(!t.infoHash)throw new Error("Invalid torrent identifier");return t}if("string"==typeof e&&(/^[a-f0-9]{40}$/i.test(e)||/^[a-z2-7]{32}$/i.test(e)))return c("magnet:?xt=urn:btih:"+e);if(i.isBuffer(e)&&20===e.length)return c("magnet:?xt=urn:btih:"+e.toString("hex"));if(i.isBuffer(e))return function(e){i.isBuffer(e)&&(e=r.decode(e));f(e.info,"info"),f(e.info["name.utf-8"]||e.info.name,"info.name"),f(e.info["piece length"],"info['piece length']"),f(e.info.pieces,"info.pieces"),e.info.files?e.info.files.forEach((e=>{f("number"==typeof e.length,"info.files[0].length"),f(e["path.utf-8"]||e.path,"info.files[0].path")})):f("number"==typeof e.info.length,"info.length");const t={info:e.info,infoBuffer:r.encode(e.info),name:(e.info["name.utf-8"]||e.info.name).toString(),announce:[]};t.infoHash=p.sync(t.infoBuffer),t.infoHashBuffer=i.from(t.infoHash,"hex"),void 0!==e.info.private&&(t.private=!!e.info.private);e["creation date"]&&(t.created=new Date(1e3*e["creation date"]));e["created by"]&&(t.createdBy=e["created by"].toString());i.isBuffer(e.comment)&&(t.comment=e.comment.toString());Array.isArray(e["announce-list"])&&e["announce-list"].length>0?e["announce-list"].forEach((e=>{e.forEach((e=>{t.announce.push(e.toString())}))})):e.announce&&t.announce.push(e.announce.toString());i.isBuffer(e["url-list"])&&(e["url-list"]=e["url-list"].length>0?[e["url-list"]]:[]);t.urlList=(e["url-list"]||[]).map((e=>e.toString())),t.announce=Array.from(new Set(t.announce)),t.urlList=Array.from(new Set(t.urlList));const n=e.info.files||[e.info];t.files=n.map(((e,i)=>{const r=[].concat(t.name,e["path.utf-8"]||e.path||[]).map((e=>e.toString()));return{path:l.join.apply(null,[l.sep].concat(r)).slice(1),name:r[r.length-1],length:e.length,offset:n.slice(0,i).reduce(d,0)}})),t.length=n.reduce(d,0);const o=t.files[t.files.length-1];return t.pieceLength=e.info["piece length"],t.lastPieceLength=(o.offset+o.length)%t.pieceLength||t.pieceLength,t.pieces=function(e){const t=[];for(let n=0;n<e.length;n+=20)t.push(e.slice(n,n+20).toString("hex"));return t}(e.info.pieces),t}(e);if(e&&e.infoHash)return e.infoHash=e.infoHash.toLowerCase(),e.announce||(e.announce=[]),"string"==typeof e.announce&&(e.announce=[e.announce]),e.urlList||(e.urlList=[]),e;throw new Error("Invalid torrent identifier")}function d(e,t){return e+t.length}function f(e,t){if(!e)throw new Error("Torrent is missing required field: "+t)}t.exports=u,t.exports.remote=function e(t,i,r){if("function"==typeof i)return e(t,{},i);if("function"!=typeof r)throw new Error("second argument must be a Function");let c;try{c=u(t)}catch(e){}c&&c.infoHash?n.nextTick((()=>{r(null,c)})):(l=t,"undefined"!=typeof Blob&&l instanceof Blob?o(t,((e,t)=>{if(e)return r(new Error("Error converting Blob: "+e.message));p(t)})):"function"==typeof a&&/^https?:/.test(t)?(i=Object.assign({url:t,timeout:3e4,headers:{"user-agent":"WebTorrent (https://webtorrent.io)"}},i),a.concat(i,((e,t,n)=>{if(e)return r(new Error("Error downloading torrent: "+e.message));p(n)}))):"function"==typeof s.readFile&&"string"==typeof t?s.readFile(t,((e,t)=>{if(e)return r(new Error("Invalid torrent identifier"));p(t)})):n.nextTick((()=>{r(new Error("Invalid torrent identifier"))})));var l;function p(e){try{c=u(e)}catch(e){return r(e)}c&&c.infoHash?r(null,c):r(new Error("Invalid torrent identifier"))}},t.exports.toMagnetURI=c.encode,t.exports.toTorrentFile=function(e){const t={info:e.info};t["announce-list"]=(e.announce||[]).map((e=>(t.announce||(t.announce=e),[e=i.from(e,"utf8")]))),t["url-list"]=e.urlList||[],void 0!==e.private&&(t.private=Number(e.private));e.created&&(t["creation date"]=e.created.getTime()/1e3|0);e.createdBy&&(t["created by"]=e.createdBy);e.comment&&(t.comment=e.comment);return r.encode(t)},i.alloc(0)}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:187,bencode:7,"blob-to-buffer":38,buffer:60,fs:56,"magnet-uri":124,path:185,"simple-get":222,"simple-sha1":242}],185:[function(e,t,n){(function(e){(function(){"use strict";function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var n,i="",r=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",r=0):r=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),o=a,s=0;continue}}else if(2===i.length||1===i.length){i="",r=0,o=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(o+1,a):i=e.slice(o+1,a),r=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var r={resolve:function(){for(var t,r="",o=!1,s=arguments.length-1;s>=-1&&!o;s--){var a;s>=0?a=arguments[s]:(void 0===t&&(t=e.cwd()),a=t),n(a),0!==a.length&&(r=a+"/"+r,o=47===a.charCodeAt(0))}return r=i(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];n(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=r.resolve(e))===(t=r.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var o=e.length,s=o-i,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var c=t.length-a,l=s<c?s:c,p=-1,u=0;u<=l;++u){if(u===l){if(c>l){if(47===t.charCodeAt(a+u))return t.slice(a+u+1);if(0===u)return t.slice(a+u)}else s>l&&(47===e.charCodeAt(i+u)?p=u:0===u&&(p=0));break}var d=e.charCodeAt(i+u);if(d!==t.charCodeAt(a+u))break;47===d&&(p=u)}var f="";for(u=i+p+1;u<=o;++u)u!==o&&47!==e.charCodeAt(u)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(a+p):(a+=p,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,r=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!o){r=s;break}}else o=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var i,r=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,c=-1;for(i=e.length-1;i>=0;--i){var l=e.charCodeAt(i);if(47===l){if(!s){r=i+1;break}}else-1===c&&(s=!1,c=i+1),a>=0&&(l===t.charCodeAt(a)?-1==--a&&(o=i):(a=-1,o=c))}return r===o?o=c:-1===o&&(o=e.length),e.slice(r,o)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){r=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(r,o)},extname:function(e){n(e);for(var t=-1,i=0,r=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===r&&(o=!1,r=a+1),46===c?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=a+1;break}}return-1===t||-1===r||0===s||1===s&&t===r-1&&t===i+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var i,r=e.charCodeAt(0),o=47===r;o?(t.root="/",i=1):i=0;for(var s=-1,a=0,c=-1,l=!0,p=e.length-1,u=0;p>=i;--p)if(47!==(r=e.charCodeAt(p)))-1===c&&(l=!1,c=p+1),46===r?-1===s?s=p:1!==u&&(u=1):-1!==s&&(u=-1);else if(!l){a=p+1;break}return-1===s||-1===c||0===u||1===u&&s===c-1&&s===a+1?-1!==c&&(t.base=t.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(t.name=e.slice(1,s),t.base=e.slice(1,c)):(t.name=e.slice(a,s),t.base=e.slice(a,c)),t.ext=e.slice(s,c)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r}).call(this)}).call(this,e("_process"))},{_process:187}],186:[function(e,t,n){t.exports=function(e){return Math.max(16384,1<<Math.log2(e<1024?1:e/1024)+.5|0)}},{}],187:[function(e,t,n){var i,r,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(i===setTimeout)return setTimeout(e,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(e){i=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,p=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?p=l.concat(p):d=-1,p.length&&h())}function h(){if(!u){var e=c(f);u=!0;for(var t=p.length;t;){for(l=p,p=[];++d<t;)l&&l[d].run();d=-1,t=p.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new m(e,t)),1!==p.length||u||c(h)},m.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=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,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}},{}],188:[function(e,t,n){(function(n){(function(){var i=e("once"),r=e("end-of-stream"),o=e("fs"),s=function(){},a=/^v?\.0/.test(n.version),c=function(e){return"function"==typeof e},l=function(e,t,n,l){l=i(l);var p=!1;e.on("close",(function(){p=!0})),r(e,{readable:t,writable:n},(function(e){if(e)return l(e);p=!0,l()}));var u=!1;return function(t){if(!p&&!u)return u=!0,function(e){return!!a&&!!o&&(e instanceof(o.ReadStream||s)||e instanceof(o.WriteStream||s))&&c(e.close)}(e)?e.close(s):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void l(t||new Error("stream was destroyed"))}},p=function(e){e()},u=function(e,t){return e.pipe(t)};t.exports=function(){var e,t=Array.prototype.slice.call(arguments),n=c(t[t.length-1]||s)&&t.pop()||s;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var i=t.map((function(r,o){var s=o<t.length-1;return l(r,s,o>0,(function(t){e||(e=t),t&&i.forEach(p),s||(i.forEach(p),n(e))}))}));return t.reduce(u)}}).call(this)}).call(this,e("_process"))},{_process:187,"end-of-stream":96,fs:55,once:183}],189:[function(e,t,n){(function(e){(function(){!function(i){var r="object"==typeof n&&n&&!n.nodeType&&n,o="object"==typeof t&&t&&!t.nodeType&&t,s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self!==s||(i=s);var a,c,l=2147483647,p=36,u=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function v(e){throw new RangeError(h[e])}function b(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function x(e,t){var n=e.split("@"),i="";return n.length>1&&(i=n[0]+"@",e=n[1]),i+b((e=e.replace(f,".")).split("."),t).join(".")}function y(e){for(var t,n,i=[],r=0,o=e.length;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?56320==(64512&(n=e.charCodeAt(r++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),r--):i.push(t);return i}function _(e){return b(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var i=0;for(e=n?m(e/700):e>>1,e+=m(e/t);e>455;i+=p)e=m(e/35);return m(i+36*e/(e+38))}function E(e){var t,n,i,r,o,s,a,c,u,d,f,h=[],g=e.length,b=0,x=128,y=72;for((n=e.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)e.charCodeAt(i)>=128&&v("not-basic"),h.push(e.charCodeAt(i));for(r=n>0?n+1:0;r<g;){for(o=b,s=1,a=p;r>=g&&v("invalid-input"),((c=(f=e.charCodeAt(r++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:p)>=p||c>m((l-b)/s))&&v("overflow"),b+=c*s,!(c<(u=a<=y?1:a>=y+26?26:a-y));a+=p)s>m(l/(d=p-u))&&v("overflow"),s*=d;y=k(b-o,t=h.length+1,0==o),m(b/t)>l-x&&v("overflow"),x+=m(b/t),b%=t,h.splice(b++,0,x)}return _(h)}function S(e){var t,n,i,r,o,s,a,c,u,d,f,h,b,x,_,E=[];for(h=(e=y(e)).length,t=128,n=0,o=72,s=0;s<h;++s)(f=e[s])<128&&E.push(g(f));for(i=r=E.length,r&&E.push("-");i<h;){for(a=l,s=0;s<h;++s)(f=e[s])>=t&&f<a&&(a=f);for(a-t>m((l-n)/(b=i+1))&&v("overflow"),n+=(a-t)*b,t=a,s=0;s<h;++s)if((f=e[s])<t&&++n>l&&v("overflow"),f==t){for(c=n,u=p;!(c<(d=u<=o?1:u>=o+26?26:u-o));u+=p)_=c-d,x=p-d,E.push(g(w(d+_%x,0))),c=m(_/x);E.push(g(w(c,0))),o=k(n,b,i==r),n=0,++i}++n,++t}return E.join("")}if(a={version:"1.4.1",ucs2:{decode:y,encode:_},decode:E,encode:S,toASCII:function(e){return x(e,(function(e){return d.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return x(e,(function(e){return u.test(e)?E(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return a}));else if(r&&o)if(t.exports==r)o.exports=a;else for(c in a)a.hasOwnProperty(c)&&(r[c]=a[c]);else i.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],190:[function(e,t,n){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var p=0;p<l;++p){var u,d,f,h,m=e[p].replace(a,"%20"),g=m.indexOf(n);g>=0?(u=m.substr(0,g),d=m.substr(g+1)):(u=m,d=""),f=decodeURIComponent(u),h=decodeURIComponent(d),i(s,f)?r(s[f])?s[f].push(h):s[f]=[s[f],h]:s[f]=h}return s};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],191:[function(e,t,n){"use strict";var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),(function(s){var a=encodeURIComponent(i(s))+n;return r(e[s])?o(e[s],(function(e){return a+encodeURIComponent(i(e))})).join(t):a+encodeURIComponent(i(e[s]))})).join(t):a?encodeURIComponent(i(a))+n+encodeURIComponent(i(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],i=0;i<e.length;i++)n.push(t(e[i],i));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],192:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":190,"./encode":191}],193:[function(e,t,n){
|
||
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
let i;t.exports="function"==typeof queueMicrotask?queueMicrotask.bind(globalThis):e=>(i||(i=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},{}],194:[function(e,t,n){t.exports=function(e){var t=0;return function(){if(t===e.length)return null;var n=e.length-t,i=Math.random()*n|0,r=e[t+i],o=e[t];return e[t]=r,e[t+i]=o,t++,r}}},{}],195:[function(e,t,n){(function(n,i){(function(){"use strict";var r=65536,o=4294967295;var s=e("safe-buffer").Buffer,a=i.crypto||i.msCrypto;a&&a.getRandomValues?t.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var i=s.allocUnsafe(e);if(e>0)if(e>r)for(var c=0;c<e;c+=r)a.getRandomValues(i.slice(c,c+r));else a.getRandomValues(i);if("function"==typeof t)return n.nextTick((function(){t(null,i)}));return i}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:187,"safe-buffer":220}],196:[function(e,t,n){const{Writable:i,PassThrough:r}=e("readable-stream");t.exports=class extends i{constructor(e,t={}){super(t),this.destroyed=!1,this._queue=[],this._position=e||0,this._cb=null,this._buffer=null,this._out=null}_write(e,t,n){let i=!0;for(;;){if(this.destroyed)return;if(0===this._queue.length)return this._buffer=e,void(this._cb=n);this._buffer=null;var r=this._queue[0];const t=Math.max(r.start-this._position,0),o=r.end-this._position;if(t>=e.length)return this._position+=e.length,n(null);let s;if(o>e.length){this._position+=e.length,s=0===t?e:e.slice(t),i=r.stream.write(s)&&i;break}this._position+=o,s=0===t&&o===e.length?e:e.slice(t,o),i=r.stream.write(s)&&i,r.last&&r.stream.end(),e=e.slice(o),this._queue.shift()}i?n(null):r.stream.once("drain",n.bind(null,null))}slice(e){if(this.destroyed)return null;Array.isArray(e)||(e=[e]);const t=new r;return e.forEach(((n,i)=>{this._queue.push({start:n.start,end:n.end,stream:t,last:i===e.length-1})})),this._buffer&&this._write(this._buffer,null,this._cb),t}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e))}}},{"readable-stream":211}],197:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],198:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":200,"./_stream_writable":202,_process:187,dup:17,inherits:119}],199:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":201,dup:18,inherits:119}],200:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":197,"./_stream_duplex":198,"./internal/streams/async_iterator":203,"./internal/streams/buffer_list":204,"./internal/streams/destroy":205,"./internal/streams/from":207,"./internal/streams/state":209,"./internal/streams/stream":210,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],201:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":197,"./_stream_duplex":198,dup:20,inherits:119}],202:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":197,"./_stream_duplex":198,"./internal/streams/destroy":205,"./internal/streams/state":209,"./internal/streams/stream":210,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],203:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":206,_process:187,dup:22}],204:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],205:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],206:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":197,dup:25}],207:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],208:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":197,"./end-of-stream":206,dup:27}],209:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":197,dup:28}],210:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],211:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":198,"./lib/_stream_passthrough.js":199,"./lib/_stream_readable.js":200,"./lib/_stream_transform.js":201,"./lib/_stream_writable.js":202,"./lib/internal/streams/end-of-stream.js":206,"./lib/internal/streams/pipeline.js":208,dup:30}],212:[function(e,t,n){
|
||
/*! render-media. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
n.render=function(e,t,n,i){"function"==typeof n&&(i=n,n={});n||(n={});i||(i=function(){});x(e),y(n),"string"==typeof t&&(t=document.querySelector(t));v(e,(function(i){if(t.nodeName!==i.toUpperCase()){var r=s.extname(e.name).toLowerCase();throw new Error('Cannot render "'+r+'" inside a "'+t.nodeName.toLowerCase()+'" element, expected "'+i+'"')}return"video"!==i&&"audio"!==i||_(t,n),t}),n,i)},n.append=function(e,t,n,i){"function"==typeof n&&(i=n,n={});n||(n={});i||(i=function(){});x(e),y(n),"string"==typeof t&&(t=document.querySelector(t));if(t&&("VIDEO"===t.nodeName||"AUDIO"===t.nodeName))throw new Error("Invalid video/audio node argument. Argument must be root element that video/audio tag will be appended to.");function r(e){var n=document.createElement(e);return t.appendChild(n),n}v(e,(function(e){return"video"===e||"audio"===e?function(e){var i=r(e);return _(i,n),t.appendChild(i),i}(e):r(e)}),n,(function(e,t){e&&t&&t.remove(),i(e,t)}))},n.mime=e("./lib/mime.json");var i=e("debug")("render-media"),r=e("is-ascii"),o=e("mediasource"),s=e("path"),a=e("stream-to-blob-url"),c=e("videostream"),l=[".m4a",".m4b",".m4p",".m4v",".mp4"],p=[".m4v",".mkv",".mp4",".webm"],u=[].concat(p,[".m4a",".m4b",".m4p",".mp3"]),d=[".mov",".ogv"],f=[".aac",".oga",".ogg",".wav",".flac"],h=[".bmp",".gif",".jpeg",".jpg",".png",".svg"],m=[".css",".html",".js",".md",".pdf",".srt",".txt"],g="undefined"!=typeof window&&window.MediaSource;function v(e,t,n,a){var v,x=s.extname(e.name).toLowerCase(),y=0;function _(){return!("number"==typeof e.length&&e.length>n.maxBlobLength)||(i("File length too large for Blob URL approach: %d (max: %d)",e.length,n.maxBlobLength),C(new Error("File length too large for Blob URL approach: "+e.length+" (max: "+n.maxBlobLength+")")),!1)}function w(n){_()&&(v=t(n),b(e,(function(e,t){if(e)return C(e);v.addEventListener("error",C),v.addEventListener("loadstart",k),v.addEventListener("canplay",E),v.src=t})))}function k(){v.removeEventListener("loadstart",k),n.autoplay&&v.play()}function E(){v.removeEventListener("canplay",E),a(null,v)}function S(){b(e,(function(e,n){if(e)return C(e);".pdf"!==x?((v=t("iframe")).sandbox="allow-forms allow-scripts",v.src=n):((v=t("object")).setAttribute("typemustmatch",!0),v.setAttribute("type","application/pdf"),v.setAttribute("data",n)),a(null,v)}))}function C(t){t.message='Error rendering file "'+e.name+'": '+t.message,i(t.message),a(t)}u.indexOf(x)>=0?function(){var n=p.indexOf(x)>=0?"video":"audio";g?l.indexOf(x)>=0?r():a():u();function r(){i("Use `videostream` package for "+e.name),h(),v.addEventListener("error",d),v.addEventListener("loadstart",k),v.addEventListener("canplay",E),new c(e,v)}function a(){i("Use MediaSource API for "+e.name),h(),v.addEventListener("error",f),v.addEventListener("loadstart",k),v.addEventListener("canplay",E);var t,n=new o(v).createWriteStream((t=e.name,{".m4a":'audio/mp4; codecs="mp4a.40.5"',".m4b":'audio/mp4; codecs="mp4a.40.5"',".m4p":'audio/mp4; codecs="mp4a.40.5"',".m4v":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".mkv":'video/webm; codecs="avc1.640029, mp4a.40.5"',".mp3":"audio/mpeg",".mp4":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".webm":'video/webm; codecs="vorbis, vp8"'}[s.extname(t).toLowerCase()]));e.createReadStream().pipe(n),y&&(v.currentTime=y)}function u(){i("Use Blob URL for "+e.name),h(),v.addEventListener("error",C),v.addEventListener("loadstart",k),v.addEventListener("canplay",E),b(e,(function(e,t){if(e)return C(e);v.src=t,y&&(v.currentTime=y)}))}function d(e){i("videostream error: fallback to MediaSource API: %o",e.message||e),v.removeEventListener("error",d),v.removeEventListener("canplay",E),a()}function f(e){i("MediaSource API error: fallback to Blob URL: %o",e.message||e),_()&&(v.removeEventListener("error",f),v.removeEventListener("canplay",E),u())}function h(){v||(v=t(n)).addEventListener("progress",(function(){y=v.currentTime}))}}():d.indexOf(x)>=0?w("video"):f.indexOf(x)>=0?w("audio"):h.indexOf(x)>=0?(v=t("img"),b(e,(function(t,n){if(t)return C(t);v.src=n,v.alt=e.name,a(null,v)}))):m.indexOf(x)>=0?S():function(){i('Unknown file extension "%s" - will attempt to render into iframe',x);var t="";function n(){r(t)?(i('File extension "%s" appears ascii, so will render.',x),S()):(i('File extension "%s" appears non-ascii, will not render.',x),a(new Error('Unsupported file type "'+x+'": Cannot append to DOM')))}e.createReadStream({start:0,end:1e3}).setEncoding("utf8").on("data",(function(e){t+=e})).on("end",n).on("error",a)}()}function b(e,t){var i=s.extname(e.name).toLowerCase();a(e.createReadStream(),n.mime[i]).then((e=>t(null,e)),(e=>t(e)))}function x(e){if(null==e)throw new Error("file cannot be null or undefined");if("string"!=typeof e.name)throw new Error("missing or invalid file.name property");if("function"!=typeof e.createReadStream)throw new Error("missing or invalid file.createReadStream property")}function y(e){null==e.autoplay&&(e.autoplay=!1),null==e.muted&&(e.muted=!1),null==e.controls&&(e.controls=!0),null==e.maxBlobLength&&(e.maxBlobLength=2e8)}function _(e,t){e.autoplay=!!t.autoplay,e.muted=!!t.muted,e.controls=!!t.controls}},{"./lib/mime.json":213,debug:214,"is-ascii":120,mediasource:125,path:185,"stream-to-blob-url":283,videostream:308}],213:[function(e,t,n){t.exports={".3gp":"video/3gpp",".aac":"audio/aac",".aif":"audio/x-aiff",".aiff":"audio/x-aiff",".atom":"application/atom+xml",".avi":"video/x-msvideo",".bmp":"image/bmp",".bz2":"application/x-bzip2",".conf":"text/plain",".css":"text/css",".csv":"text/plain",".diff":"text/x-diff",".doc":"application/msword",".flv":"video/x-flv",".gif":"image/gif",".gz":"application/x-gzip",".htm":"text/html",".html":"text/html",".ico":"image/vnd.microsoft.icon",".ics":"text/calendar",".iso":"application/octet-stream",".jar":"application/java-archive",".jpeg":"image/jpeg",".jpg":"image/jpeg",".js":"application/javascript",".json":"application/json",".less":"text/css",".log":"text/plain",".m3u":"audio/x-mpegurl",".m4a":"audio/x-m4a",".m4b":"audio/mp4",".m4p":"audio/mp4",".m4v":"video/x-m4v",".manifest":"text/cache-manifest",".markdown":"text/x-markdown",".mathml":"application/mathml+xml",".md":"text/x-markdown",".mid":"audio/midi",".midi":"audio/midi",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4v":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".odp":"application/vnd.oasis.opendocument.presentation",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odt":"application/vnd.oasis.opendocument.text",".oga":"audio/ogg",".ogg":"application/ogg",".pdf":"application/pdf",".png":"image/png",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".ps":"application/postscript",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".rar":"application/x-rar-compressed",".rdf":"application/rdf+xml",".rss":"application/rss+xml",".rtf":"application/rtf",".svg":"image/svg+xml",".svgz":"image/svg+xml",".swf":"application/x-shockwave-flash",".tar":"application/x-tar",".tbz":"application/x-bzip-compressed-tar",".text":"text/plain",".tif":"image/tiff",".tiff":"image/tiff",".torrent":"application/x-bittorrent",".ttf":"application/x-font-ttf",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".xls":"application/vnd.ms-excel",".xml":"application/xml",".yaml":"text/yaml",".yml":"text/yaml",".zip":"application/zip"}},{}],214:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./common":215,_process:187,dup:13}],215:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14,ms:216}],216:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],217:[function(e,t,n){(function(e){(function(){
|
||
/*! run-parallel-limit. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n,i){if("number"!=typeof n)throw new Error("second argument must be a Number");var r,o,s,a,c,l=!0;Array.isArray(t)?(r=[],s=o=t.length):(a=Object.keys(t),r={},s=o=a.length);function p(t){function n(){i&&i(t,r),i=null}l?e.nextTick(n):n()}function u(e,n,i){if(r[e]=i,n&&(c=!0),0==--s||n)p(n);else if(!c&&d<o){var l;a?(l=a[d],d+=1,t[l]((function(e,t){u(l,e,t)}))):(l=d,d+=1,t[l]((function(e,t){u(l,e,t)})))}}var d=n;s?a?a.some((function(e,i){if(t[e]((function(t,n){u(e,t,n)})),i===n-1)return!0})):t.some((function(e,t){if(e((function(e,n){u(t,e,n)})),t===n-1)return!0})):p(null);l=!1}}).call(this)}).call(this,e("_process"))},{_process:187}],218:[function(e,t,n){(function(e){(function(){
|
||
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n){var i,r,o,s=!0;Array.isArray(t)?(i=[],r=t.length):(o=Object.keys(t),i={},r=o.length);function a(t){function r(){n&&n(t,i),n=null}s?e.nextTick(r):r()}function c(e,t,n){i[e]=n,(0==--r||t)&&a(t)}r?o?o.forEach((function(e){t[e]((function(t,n){c(e,t,n)}))})):t.forEach((function(e,t){e((function(e,n){c(t,e,n)}))})):a(null);s=!1}}).call(this)}).call(this,e("_process"))},{_process:187}],219:[function(e,t,n){var i,r;i="undefined"!=typeof self?self:this,r=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var i=n(5),r=n(1),o=r.toHex,s=r.ceilHeapSize,a=n(6),c=function(e){for(e+=9;e%64>0;e+=1);return e},l=function(e,t){var n=new Int32Array(e,t+320,5),i=new Int32Array(5),r=new DataView(i.buffer);return r.setInt32(0,n[0],!1),r.setInt32(4,n[1],!1),r.setInt32(8,n[2],!1),r.setInt32(12,n[3],!1),r.setInt32(16,n[4],!1),i},p=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=t||65536)%64>0)throw new Error("Chunk size must be a multiple of 128 bit");this._offset=0,this._maxChunkLen=t,this._padMaxChunkLen=c(t),this._heap=new ArrayBuffer(s(this._padMaxChunkLen+320+20)),this._h32=new Int32Array(this._heap),this._h8=new Int8Array(this._heap),this._core=new i({Int32Array:Int32Array},{},this._heap)}return e.prototype._initState=function(e,t){this._offset=0;var n=new Int32Array(e,t+320,5);n[0]=1732584193,n[1]=-271733879,n[2]=-1732584194,n[3]=271733878,n[4]=-1009589776},e.prototype._padChunk=function(e,t){var n=c(e),i=new Int32Array(this._heap,0,n>>2);return function(e,t){var n=new Uint8Array(e.buffer),i=t%4,r=t-i;switch(i){case 0:n[r+3]=0;case 1:n[r+2]=0;case 2:n[r+1]=0;case 3:n[r+0]=0}for(var o=1+(t>>2);o<e.length;o++)e[o]=0}(i,e),function(e,t,n){e[t>>2]|=128<<24-(t%4<<3),e[14+(2+(t>>2)&-16)]=n/(1<<29)|0,e[15+(2+(t>>2)&-16)]=n<<3}(i,e,t),n},e.prototype._write=function(e,t,n,i){a(e,this._h8,this._h32,t,n,i||0)},e.prototype._coreCall=function(e,t,n,i,r){var o=n;this._write(e,t,n),r&&(o=this._padChunk(n,i)),this._core.hash(o,this._padMaxChunkLen)},e.prototype.rawDigest=function(e){var t=e.byteLength||e.length||e.size||0;this._initState(this._heap,this._padMaxChunkLen);var n=0,i=this._maxChunkLen;for(n=0;t>n+i;n+=i)this._coreCall(e,n,i,t,!1);return this._coreCall(e,n,t-n,t,!0),l(this._heap,this._padMaxChunkLen)},e.prototype.digest=function(e){return o(this.rawDigest(e).buffer)},e.prototype.digestFromString=function(e){return this.digest(e)},e.prototype.digestFromBuffer=function(e){return this.digest(e)},e.prototype.digestFromArrayBuffer=function(e){return this.digest(e)},e.prototype.resetState=function(){return this._initState(this._heap,this._padMaxChunkLen),this},e.prototype.append=function(e){var t=0,n=e.byteLength||e.length||e.size||0,i=this._offset%this._maxChunkLen,r=void 0;for(this._offset+=n;t<n;)r=Math.min(n-t,this._maxChunkLen-i),this._write(e,t,r,i),t+=r,(i+=r)===this._maxChunkLen&&(this._core.hash(this._maxChunkLen,this._padMaxChunkLen),i=0);return this},e.prototype.getState=function(){var e=void 0;if(this._offset%this._maxChunkLen)e=this._heap.slice(0);else{var t=new Int32Array(this._heap,this._padMaxChunkLen+320,5);e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}return{offset:this._offset,heap:e}},e.prototype.setState=function(e){return this._offset=e.offset,20===e.heap.byteLength?new Int32Array(this._heap,this._padMaxChunkLen+320,5).set(new Int32Array(e.heap)):this._h32.set(new Int32Array(e.heap)),this},e.prototype.rawEnd=function(){var e=this._offset,t=e%this._maxChunkLen,n=this._padChunk(t,e);this._core.hash(n,this._padMaxChunkLen);var i=l(this._heap,this._padMaxChunkLen);return this._initState(this._heap,this._padMaxChunkLen),i},e.prototype.end=function(){return o(this.rawEnd().buffer)},e}();e.exports=p,e.exports._core=i},function(e,t){for(var n=new Array(256),i=0;i<256;i++)n[i]=(i<16?"0":"")+i.toString(16);e.exports.toHex=function(e){for(var t=new Uint8Array(e),i=new Array(e.byteLength),r=0;r<i.length;r++)i[r]=n[t[r]];return i.join("")},e.exports.ceilHeapSize=function(e){var t=0;if(e<=65536)return 65536;if(e<16777216)for(t=1;t<e;t<<=1);else for(t=16777216;t<e;t+=16777216);return t},e.exports.isDedicatedWorkerScope=function(e){var t="WorkerGlobalScope"in e&&e instanceof e.WorkerGlobalScope,n="SharedWorkerGlobalScope"in e&&e instanceof e.SharedWorkerGlobalScope,i="ServiceWorkerGlobalScope"in e&&e instanceof e.ServiceWorkerGlobalScope;return t&&!n&&!i}},function(e,t,n){e.exports=function(){var e=n(0),t=function(e,n,i,r,o){var s=new self.FileReader;s.onloadend=function(){if(s.error)return o(s.error);var a=s.result;n+=s.result.byteLength;try{e.append(a)}catch(e){return void o(e)}n<r.size?t(e,n,i,r,o):o(null,e.end())},s.readAsArrayBuffer(r.slice(n,n+i))},i=!0;return self.onmessage=function(n){if(i){var r=n.data.data,o=n.data.file,s=n.data.id;if(void 0!==s&&(o||r)){var a=n.data.blockSize||4194304,c=new e(a);c.resetState();var l=function(e,t){e?self.postMessage({id:s,error:e.name}):self.postMessage({id:s,hash:t})};r&&function(e,t,n){try{n(null,e.digest(t))}catch(e){return n(e)}}(c,r,l),o&&t(c,0,a,o,l)}}},function(){i=!1}}},function(e,t,n){var i=n(4),r=n(0),o=n(7),s=n(2),a=n(1).isDedicatedWorkerScope,c="undefined"!=typeof self&&a(self);r.disableWorkerBehaviour=c?s():function(){},r.createWorker=function(){var e=i(2),t=e.terminate;return e.terminate=function(){URL.revokeObjectURL(e.objectURL),t.call(e)},e},r.createHash=o,e.exports=r},function(e,t,n){function i(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var i=n(n.s=ENTRY_MODULE);return i.default||i}var r="[\\.|\\-|\\+|\\w|/|@]+",o="\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function s(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,i){var a={};a[i]=[];var c=t.toString(),l=c.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return a;for(var p,u=l[1],d=new RegExp("(\\\\n|\\W)"+s(u)+o,"g");p=d.exec(c);)"dll-reference"!==p[3]&&a[i].push(p[3]);for(d=new RegExp("\\("+s(u)+'\\("(dll-reference\\s('+r+'))"\\)\\)'+o,"g");p=d.exec(c);)e[p[2]]||(a[i].push(p[1]),e[p[2]]=n(p[1]).m),a[p[2]]=a[p[2]]||[],a[p[2]].push(p[4]);return a}function c(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var r={main:n.m},o=t.all?{main:Object.keys(r)}:function(e,t){for(var n={main:[t]},i={main:[]},r={main:{}};c(n);)for(var o=Object.keys(n),s=0;s<o.length;s++){var l=o[s],p=n[l].pop();if(r[l]=r[l]||{},!r[l][p]&&e[l][p]){r[l][p]=!0,i[l]=i[l]||[],i[l].push(p);for(var u=a(e,e[l][p],l),d=Object.keys(u),f=0;f<d.length;f++)n[d[f]]=n[d[f]]||[],n[d[f]]=n[d[f]].concat(u[d[f]])}}return i}(r,e),s="";Object.keys(o).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;o[e][t];)t++;o[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",s=s+"var "+e+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o[e].map((function(t){return JSON.stringify(t)+": "+r[e][t].toString()})).join(",")+"});\n"})),s=s+"("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o.main.map((function(e){return JSON.stringify(e)+": "+r.main[e].toString()})).join(",")+"})(self);";var l=new window.Blob([s],{type:"text/javascript"});if(t.bare)return l;var p=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(l),u=new window.Worker(p);return u.objectURL=p,u}},function(e,t){e.exports=function(e,t,n){"use asm";var i=new e.Int32Array(n);function r(e,t){e=e|0;t=t|0;var n=0,r=0,o=0,s=0,a=0,c=0,l=0,p=0,u=0,d=0,f=0,h=0,m=0,g=0;o=i[t+320>>2]|0;a=i[t+324>>2]|0;l=i[t+328>>2]|0;u=i[t+332>>2]|0;f=i[t+336>>2]|0;for(n=0;(n|0)<(e|0);n=n+64|0){s=o;c=a;p=l;d=u;h=f;for(r=0;(r|0)<64;r=r+4|0){g=i[n+r>>2]|0;m=((o<<5|o>>>27)+(a&l|~a&u)|0)+((g+f|0)+1518500249|0)|0;f=u;u=l;l=a<<30|a>>>2;a=o;o=m;i[e+r>>2]=g}for(r=e+64|0;(r|0)<(e+80|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a&l|~a&u)|0)+((g+f|0)+1518500249|0)|0;f=u;u=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}for(r=e+80|0;(r|0)<(e+160|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a^l^u)|0)+((g+f|0)+1859775393|0)|0;f=u;u=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}for(r=e+160|0;(r|0)<(e+240|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a&l|a&u|l&u)|0)+((g+f|0)-1894007588|0)|0;f=u;u=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}for(r=e+240|0;(r|0)<(e+320|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a^l^u)|0)+((g+f|0)-899497514|0)|0;f=u;u=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}o=o+s|0;a=a+c|0;l=l+p|0;u=u+d|0;f=f+h|0}i[t+320>>2]=o;i[t+324>>2]=a;i[t+328>>2]=l;i[t+332>>2]=u;i[t+336>>2]=f}return{hash:r}}},function(e,t){var n=this,i=void 0;"undefined"!=typeof self&&void 0!==self.FileReaderSync&&(i=new self.FileReaderSync);var r=function(e,t,n,i,r,o){var s=void 0,a=o%4,c=(r+a)%4,l=r-c;switch(a){case 0:t[o]=e[i+3];case 1:t[o+1-(a<<1)|0]=e[i+2];case 2:t[o+2-(a<<1)|0]=e[i+1];case 3:t[o+3-(a<<1)|0]=e[i]}if(!(r<c+(4-a))){for(s=4-a;s<l;s=s+4|0)n[o+s>>2|0]=e[i+s]<<24|e[i+s+1]<<16|e[i+s+2]<<8|e[i+s+3];switch(c){case 3:t[o+l+1|0]=e[i+l+2];case 2:t[o+l+2|0]=e[i+l+1];case 1:t[o+l+3|0]=e[i+l]}}};e.exports=function(e,t,o,s,a,c){if("string"==typeof e)return function(e,t,n,i,r,o){var s=void 0,a=o%4,c=(r+a)%4,l=r-c;switch(a){case 0:t[o]=e.charCodeAt(i+3);case 1:t[o+1-(a<<1)|0]=e.charCodeAt(i+2);case 2:t[o+2-(a<<1)|0]=e.charCodeAt(i+1);case 3:t[o+3-(a<<1)|0]=e.charCodeAt(i)}if(!(r<c+(4-a))){for(s=4-a;s<l;s=s+4|0)n[o+s>>2]=e.charCodeAt(i+s)<<24|e.charCodeAt(i+s+1)<<16|e.charCodeAt(i+s+2)<<8|e.charCodeAt(i+s+3);switch(c){case 3:t[o+l+1|0]=e.charCodeAt(i+l+2);case 2:t[o+l+2|0]=e.charCodeAt(i+l+1);case 1:t[o+l+3|0]=e.charCodeAt(i+l)}}}(e,t,o,s,a,c);if(e instanceof Array)return r(e,t,o,s,a,c);if(n&&n.Buffer&&n.Buffer.isBuffer(e))return r(e,t,o,s,a,c);if(e instanceof ArrayBuffer)return r(new Uint8Array(e),t,o,s,a,c);if(e.buffer instanceof ArrayBuffer)return r(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t,o,s,a,c);if(e instanceof Blob)return function(e,t,n,r,o,s){var a=void 0,c=s%4,l=(o+c)%4,p=o-l,u=new Uint8Array(i.readAsArrayBuffer(e.slice(r,r+o)));switch(c){case 0:t[s]=u[3];case 1:t[s+1-(c<<1)|0]=u[2];case 2:t[s+2-(c<<1)|0]=u[1];case 3:t[s+3-(c<<1)|0]=u[0]}if(!(o<l+(4-c))){for(a=4-c;a<p;a=a+4|0)n[s+a>>2|0]=u[a]<<24|u[a+1]<<16|u[a+2]<<8|u[a+3];switch(l){case 3:t[s+p+1|0]=u[p+2];case 2:t[s+p+2|0]=u[p+1];case 1:t[s+p+3|0]=u[p]}}}(e,t,o,s,a,c);throw new Error("Unsupported data type.")}},function(e,t,n){var i=n(0),r=n(1).toHex,o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._rusha=new i,this._rusha.resetState()}return e.prototype.update=function(e){return this._rusha.append(e),this},e.prototype.digest=function(e){var t=this._rusha.rawEnd().buffer;if(!e)return t;if("hex"===e)return r(t);throw new Error("unsupported digest encoding")},e}();e.exports=function(){return new o}}])},"object"==typeof n&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof n?n.Rusha=r():i.Rusha=r()},{}],220:[function(e,t,n){
|
||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=e("buffer"),r=i.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(o(i,n),n.Buffer=s),s.prototype=Object.create(r.prototype),o(r,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},{buffer:60}],221:[function(e,t,n){(function(e){(function(){
|
||
/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(t,n){var i=[];t.on("data",(function(e){i.push(e)})),t.once("end",(function(){n&&n(null,e.concat(i)),n=null})),t.once("error",(function(e){n&&n(e),n=null}))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],222:[function(e,t,n){(function(n){(function(){
|
||
/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=u;const i=e("simple-concat"),r=e("decompress-response"),o=e("http"),s=e("https"),a=e("once"),c=e("querystring"),l=e("url"),p=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function u(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=a(t),e.url){const{hostname:t,port:n,protocol:i,auth:r,path:o}=l.parse(e.url);delete e.url,t||n||i||r?Object.assign(e,{hostname:t,port:n,protocol:i,auth:r,path:o}):e.path=o}const i={"accept-encoding":"gzip, deflate"};let d;e.headers&&Object.keys(e.headers).forEach((t=>i[t.toLowerCase()]=e.headers[t])),e.headers=i,e.body?d=e.json&&!p(e.body)?JSON.stringify(e.body):e.body:e.form&&(d="string"==typeof e.form?e.form:c.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),d&&(e.method||(e.method="POST"),p(d)||(e.headers["content-length"]=n.byteLength(d)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const f=("https:"===e.protocol?s:o).request(e,(n=>{if(!1!==e.followRedirects&&n.statusCode>=300&&n.statusCode<400&&n.headers.location)return e.url=n.headers.location,delete e.headers.host,n.resume(),"POST"===e.method&&[301,302].includes(n.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):u(e,t);const i="function"==typeof r&&"HEAD"!==e.method;t(null,i?r(n):n)}));return f.on("timeout",(()=>{f.abort(),t(new Error("Request timed out"))})),f.on("error",t),p(d)?d.on("error",t).pipe(f):f.end(d),f}u.concat=(e,t)=>u(e,((n,r)=>{if(n)return t(n);i(r,((n,i)=>{if(n)return t(n);if(e.json)try{i=JSON.parse(i.toString())}catch(n){return t(n,r,i)}t(null,r,i)}))})),["get","post","put","patch","head","delete"].forEach((e=>{u[e]=(t,n)=>("string"==typeof t&&(t={url:t}),u(Object.assign({method:e.toUpperCase()},t),n))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60,"decompress-response":55,http:264,https:116,once:183,querystring:192,"simple-concat":221,url:299}],223:[function(e,t,n){
|
||
/*! simple-peer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
const i=e("debug")("simple-peer"),r=e("get-browser-rtc"),o=e("randombytes"),s=e("readable-stream"),a=e("queue-microtask"),c=e("err-code"),{Buffer:l}=e("buffer"),p=65536;function u(e){return e.replace(/a=ice-options:trickle\s\n/g,"")}class d extends s.Duplex{constructor(e){if(super(e=Object.assign({allowHalfOpen:!1},e)),this._id=o(4).toString("hex").slice(0,7),this._debug("new peer %o",e),this.channelName=e.initiator?e.channelName||o(20).toString("hex"):null,this.initiator=e.initiator||!1,this.channelConfig=e.channelConfig||d.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},d.config,e.config),this.offerOptions=e.offerOptions||{},this.answerOptions=e.answerOptions||{},this.sdpTransform=e.sdpTransform||(e=>e),this.streams=e.streams||(e.stream?[e.stream]:[]),this.trickle=void 0===e.trickle||e.trickle,this.allowHalfTrickle=void 0!==e.allowHalfTrickle&&e.allowHalfTrickle,this.iceCompleteTimeout=e.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=e.wrtc&&"object"==typeof e.wrtc?e.wrtc:r(),!this._wrtc)throw"undefined"==typeof window?c(new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"),"ERR_WEBRTC_SUPPORT"):c(new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(e){return void a((()=>this.destroy(c(e,"ERR_PC_CONSTRUCTOR"))))}this._isReactNativeWebrtc="number"==typeof this._pc._peerConnectionId,this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=e=>{this._onIceCandidate(e)},this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=e=>{this._setupData(e)},this.streams&&this.streams.forEach((e=>{this.addStream(e)})),this._pc.ontrack=e=>{this._onTrack(e)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&"open"===this._channel.readyState}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(e){if(this.destroyed)throw c(new Error("cannot signal after peer is destroyed"),"ERR_SIGNALING");if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}this._debug("signal()"),e.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),e.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(e.transceiverRequest.kind,e.transceiverRequest.init)),e.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(e.candidate):this._pendingCandidates.push(e.candidate)),e.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(e)).then((()=>{this.destroyed||(this._pendingCandidates.forEach((e=>{this._addIceCandidate(e)})),this._pendingCandidates=[],"offer"===this._pc.remoteDescription.type&&this._createAnswer())})).catch((e=>{this.destroy(c(e,"ERR_SET_REMOTE_DESCRIPTION"))})),e.sdp||e.candidate||e.renegotiate||e.transceiverRequest||this.destroy(c(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}_addIceCandidate(e){const t=new this._wrtc.RTCIceCandidate(e);this._pc.addIceCandidate(t).catch((e=>{var n;!t.address||t.address.endsWith(".local")?(n="Ignoring unsupported ICE candidate.",console.warn(n)):this.destroy(c(e,"ERR_ADD_ICE_CANDIDATE"))}))}send(e){this._channel.send(e)}addTransceiver(e,t){if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(e,t),this._needsNegotiation()}catch(e){this.destroy(c(e,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:e,init:t}})}addStream(e){this._debug("addStream()"),e.getTracks().forEach((t=>{this.addTrack(t,e)}))}addTrack(e,t){this._debug("addTrack()");const n=this._senderMap.get(e)||new Map;let i=n.get(t);if(i)throw i.removed?c(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):c(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED");i=this._pc.addTrack(e,t),n.set(t,i),this._senderMap.set(e,n),this._needsNegotiation()}replaceTrack(e,t,n){this._debug("replaceTrack()");const i=this._senderMap.get(e),r=i?i.get(n):null;if(!r)throw c(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");t&&this._senderMap.set(t,i),null!=r.replaceTrack?r.replaceTrack(t):this.destroy(c(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK"))}removeTrack(e,t){this._debug("removeSender()");const n=this._senderMap.get(e),i=n?n.get(t):null;if(!i)throw c(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{i.removed=!0,this._pc.removeTrack(i)}catch(e){"NS_ERROR_UNEXPECTED"===e.name?this._sendersAwaitingStable.push(i):this.destroy(c(e,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(e){this._debug("removeSenders()"),e.getTracks().forEach((t=>{this.removeTrack(t,e)}))}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,a((()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1})))}negotiate(){this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout((()=>{this._createOffer()}),0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}destroy(e){this._destroy(e,(()=>{}))}_destroy(e,t){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",e&&(e.message||e)),a((()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",e&&(e.message||e)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch(e){}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch(e){}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,e&&this.emit("error",e),this.emit("close"),t()})))}_setupData(e){if(!e.channel)return this.destroy(c(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=e.channel,this._channel.binaryType="arraybuffer","number"==typeof this._channel.bufferedAmountLowThreshold&&(this._channel.bufferedAmountLowThreshold=p),this.channelName=this._channel.label,this._channel.onmessage=e=>{this._onChannelMessage(e)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=e=>{this.destroy(c(e,"ERR_DATA_CHANNEL"))};let t=!1;this._closingInterval=setInterval((()=>{this._channel&&"closing"===this._channel.readyState?(t&&this._onChannelClose(),t=!0):t=!1}),5e3)}_read(){}_write(e,t,n){if(this.destroyed)return n(c(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(e)}catch(e){return this.destroy(c(e,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>p?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=e,this._cb=n}_onFinish(){if(this.destroyed)return;const e=()=>{setTimeout((()=>this.destroy()),1e3)};this._connected?e():this.once("connect",e)}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout((()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))}),this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then((e=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(e.sdp=u(e.sdp)),e.sdp=this.sdpTransform(e.sdp);const t=()=>{if(this.destroyed)return;const t=this._pc.localDescription||e;this._debug("signal"),this.emit("signal",{type:t.type,sdp:t.sdp})};this._pc.setLocalDescription(e).then((()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?t():this.once("_iceComplete",t))})).catch((e=>{this.destroy(c(e,"ERR_SET_LOCAL_DESCRIPTION"))}))})).catch((e=>{this.destroy(c(e,"ERR_CREATE_OFFER"))}))}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach((e=>{e.mid||!e.sender.track||e.requested||(e.requested=!0,this.addTransceiver(e.sender.track.kind))}))}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then((e=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(e.sdp=u(e.sdp)),e.sdp=this.sdpTransform(e.sdp);const t=()=>{if(this.destroyed)return;const t=this._pc.localDescription||e;this._debug("signal"),this.emit("signal",{type:t.type,sdp:t.sdp}),this.initiator||this._requestMissingTransceivers()};this._pc.setLocalDescription(e).then((()=>{this.destroyed||(this.trickle||this._iceComplete?t():this.once("_iceComplete",t))})).catch((e=>{this.destroy(c(e,"ERR_SET_LOCAL_DESCRIPTION"))}))})).catch((e=>{this.destroy(c(e,"ERR_CREATE_ANSWER"))}))}_onConnectionStateChange(){this.destroyed||"failed"===this._pc.connectionState&&this.destroy(c(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const e=this._pc.iceConnectionState,t=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",e,t),this.emit("iceStateChange",e,t),"connected"!==e&&"completed"!==e||(this._pcReady=!0,this._maybeReady()),"failed"===e&&this.destroy(c(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),"closed"===e&&this.destroy(c(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(e){const t=e=>("[object Array]"===Object.prototype.toString.call(e.values)&&e.values.forEach((t=>{Object.assign(e,t)})),e);0===this._pc.getStats.length||this._isReactNativeWebrtc?this._pc.getStats().then((n=>{const i=[];n.forEach((e=>{i.push(t(e))})),e(null,i)}),(t=>e(t))):this._pc.getStats.length>0?this._pc.getStats((n=>{if(this.destroyed)return;const i=[];n.result().forEach((e=>{const n={};e.names().forEach((t=>{n[t]=e.stat(t)})),n.id=e.id,n.type=e.type,n.timestamp=e.timestamp,i.push(t(n))})),e(null,i)}),(t=>e(t))):e(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const e=()=>{this.destroyed||this.getStats(((t,n)=>{if(this.destroyed)return;t&&(n=[]);const i={},r={},o={};let s=!1;n.forEach((e=>{"remotecandidate"!==e.type&&"remote-candidate"!==e.type||(i[e.id]=e),"localcandidate"!==e.type&&"local-candidate"!==e.type||(r[e.id]=e),"candidatepair"!==e.type&&"candidate-pair"!==e.type||(o[e.id]=e)}));const a=e=>{s=!0;let t=r[e.localCandidateId];t&&(t.ip||t.address)?(this.localAddress=t.ip||t.address,this.localPort=Number(t.port)):t&&t.ipAddress?(this.localAddress=t.ipAddress,this.localPort=Number(t.portNumber)):"string"==typeof e.googLocalAddress&&(t=e.googLocalAddress.split(":"),this.localAddress=t[0],this.localPort=Number(t[1])),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let n=i[e.remoteCandidateId];n&&(n.ip||n.address)?(this.remoteAddress=n.ip||n.address,this.remotePort=Number(n.port)):n&&n.ipAddress?(this.remoteAddress=n.ipAddress,this.remotePort=Number(n.portNumber)):"string"==typeof e.googRemoteAddress&&(n=e.googRemoteAddress.split(":"),this.remoteAddress=n[0],this.remotePort=Number(n[1])),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(n.forEach((e=>{"transport"===e.type&&e.selectedCandidatePairId&&a(o[e.selectedCandidatePairId]),("googCandidatePair"===e.type&&"true"===e.googActiveConnection||("candidatepair"===e.type||"candidate-pair"===e.type)&&e.selected)&&a(e)})),s||Object.keys(o).length&&!Object.keys(r).length){if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(t){return this.destroy(c(t,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const e=this._cb;this._cb=null,e(null)}"number"!=typeof this._channel.bufferedAmountLowThreshold&&(this._interval=setInterval((()=>this._onInterval()),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")}else setTimeout(e,100)}))};e()}_onInterval(){!this._cb||!this._channel||this._channel.bufferedAmount>p||this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||("stable"===this._pc.signalingState&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach((e=>{this._pc.removeTrack(e),this._queuedNegotiation=!0})),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(e){this.destroyed||(e.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:e.candidate.candidate,sdpMLineIndex:e.candidate.sdpMLineIndex,sdpMid:e.candidate.sdpMid}}):e.candidate||this._iceComplete||(this._iceComplete=!0,this.emit("_iceComplete")),e.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(e){if(this.destroyed)return;let t=e.data;t instanceof ArrayBuffer&&(t=l.from(t)),this.push(t)}_onChannelBufferedAmountLow(){if(this.destroyed||!this._cb)return;this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const e=this._cb;this._cb=null,e(null)}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(e){this.destroyed||e.streams.forEach((t=>{this._debug("on track"),this.emit("track",e.track,t),this._remoteTracks.push({track:e.track,stream:t}),this._remoteStreams.some((e=>e.id===t.id))||(this._remoteStreams.push(t),a((()=>{this._debug("on stream"),this.emit("stream",t)})))}))}_debug(){const e=[].slice.call(arguments);e[0]="["+this._id+"] "+e[0],i.apply(null,e)}}d.WEBRTC_SUPPORT=!!r(),d.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},d.channelConfig={},t.exports=d},{buffer:60,debug:224,"err-code":97,"get-browser-rtc":115,"queue-microtask":193,randombytes:195,"readable-stream":241}],224:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./common":225,_process:187,dup:13}],225:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14,ms:226}],226:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],227:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],228:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":230,"./_stream_writable":232,_process:187,dup:17,inherits:119}],229:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":231,dup:18,inherits:119}],230:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":227,"./_stream_duplex":228,"./internal/streams/async_iterator":233,"./internal/streams/buffer_list":234,"./internal/streams/destroy":235,"./internal/streams/from":237,"./internal/streams/state":239,"./internal/streams/stream":240,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],231:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":227,"./_stream_duplex":228,dup:20,inherits:119}],232:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":227,"./_stream_duplex":228,"./internal/streams/destroy":235,"./internal/streams/state":239,"./internal/streams/stream":240,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],233:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":236,_process:187,dup:22}],234:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],235:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],236:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":227,dup:25}],237:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],238:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":227,"./end-of-stream":236,dup:27}],239:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":227,dup:28}],240:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],241:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":228,"./lib/_stream_passthrough.js":229,"./lib/_stream_readable.js":230,"./lib/_stream_transform.js":231,"./lib/_stream_writable.js":232,"./lib/internal/streams/end-of-stream.js":236,"./lib/internal/streams/pipeline.js":238,dup:30}],242:[function(e,t,n){var i=e("rusha"),r=e("./rusha-worker-sha1"),o=new i,s="undefined"!=typeof window?window:self,a=s.crypto||s.msCrypto||{},c=a.subtle||a.webkitSubtle;function l(e){return o.digest(e)}try{c.digest({name:"sha-1"},new Uint8Array).catch((function(){c=!1}))}catch(e){c=!1}t.exports=function(e,t){c?("string"==typeof e&&(e=function(e){for(var t=e.length,n=new Uint8Array(t),i=0;i<t;i++)n[i]=e.charCodeAt(i);return n}(e)),c.digest({name:"sha-1"},e).then((function(e){t(function(e){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")}(new Uint8Array(e)))}),(function(){t(l(e))}))):"undefined"!=typeof window?r(e,(function(n,i){t(n?l(e):i)})):queueMicrotask((()=>t(l(e))))},t.exports.sync=l},{"./rusha-worker-sha1":243,rusha:219}],243:[function(e,t,n){var i,r,o,s=e("rusha");t.exports=function(e,t){i||(i=s.createWorker(),r=1,o={},i.onmessage=function(e){var t=e.data.id,n=o[t];delete o[t],null!=e.data.error?n(new Error("Rusha worker error: "+e.data.error)):n(null,e.data.hash)}),o[r]=t,i.postMessage({id:r,data:e}),r+=1}},{rusha:219}],244:[function(e,t,n){(function(n){(function(){const i=e("debug")("simple-websocket"),r=e("randombytes"),o=e("readable-stream"),s=e("queue-microtask"),a=e("ws"),c="function"!=typeof a?WebSocket:a;class l extends o.Duplex{constructor(e={}){if("string"==typeof e&&(e={url:e}),super(e=Object.assign({allowHalfOpen:!1},e)),null==e.url&&null==e.socket)throw new Error("Missing required `url` or `socket` option");if(null!=e.url&&null!=e.socket)throw new Error("Must specify either `url` or `socket` option, not both");if(this._id=r(4).toString("hex").slice(0,7),this._debug("new websocket: %o",e),this.connected=!1,this.destroyed=!1,this._chunk=null,this._cb=null,this._interval=null,e.socket)this.url=e.socket.url,this._ws=e.socket,this.connected=e.socket.readyState===c.OPEN;else{this.url=e.url;try{this._ws="function"==typeof a?new c(e.url,e):new c(e.url)}catch(e){return void s((()=>this.destroy(e)))}}this._ws.binaryType="arraybuffer",this._ws.onopen=()=>{this._onOpen()},this._ws.onmessage=e=>{this._onMessage(e)},this._ws.onclose=()=>{this._onClose()},this._ws.onerror=()=>{this.destroy(new Error("connection error to "+this.url))},this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}send(e){this._ws.send(e)}destroy(e){this._destroy(e,(()=>{}))}_destroy(e,t){if(!this.destroyed){if(this._debug("destroy (error: %s)",e&&(e.message||e)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this.connected=!1,this.destroyed=!0,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._ws){const t=this._ws,n=()=>{t.onclose=null};if(t.readyState===c.CLOSED)n();else try{t.onclose=n,t.close()}catch(e){n()}t.onopen=null,t.onmessage=null,t.onerror=()=>{}}if(this._ws=null,e){if("undefined"!=typeof DOMException&&e instanceof DOMException){const t=e.code;(e=new Error(e.message)).code=t}this.emit("error",e)}this.emit("close"),t()}}_read(){}_write(e,t,n){if(this.destroyed)return n(new Error("cannot write after socket is destroyed"));if(this.connected){try{this.send(e)}catch(e){return this.destroy(e)}"function"!=typeof a&&this._ws.bufferedAmount>65536?(this._debug("start backpressure: bufferedAmount %d",this._ws.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=e,this._cb=n}_onFinish(){if(this.destroyed)return;const e=()=>{setTimeout((()=>this.destroy()),1e3)};this.connected?e():this.once("connect",e)}_onMessage(e){if(this.destroyed)return;let t=e.data;t instanceof ArrayBuffer&&(t=n.from(t)),this.push(t)}_onOpen(){if(!this.connected&&!this.destroyed){if(this.connected=!0,this._chunk){try{this.send(this._chunk)}catch(e){return this.destroy(e)}this._chunk=null,this._debug('sent chunk from "write before connect"');const e=this._cb;this._cb=null,e(null)}"function"!=typeof a&&(this._interval=setInterval((()=>this._onInterval()),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")}}_onInterval(){if(!this._cb||!this._ws||this._ws.bufferedAmount>65536)return;this._debug("ending backpressure: bufferedAmount %d",this._ws.bufferedAmount);const e=this._cb;this._cb=null,e(null)}_onClose(){this.destroyed||(this._debug("on close"),this.destroy())}_debug(){const e=[].slice.call(arguments);e[0]="["+this._id+"] "+e[0],i.apply(null,e)}}l.WEBSOCKET_SUPPORT=!!c,t.exports=l}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60,debug:245,"queue-microtask":193,randombytes:195,"readable-stream":262,ws:55}],245:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./common":246,_process:187,dup:13}],246:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14,ms:247}],247:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],248:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],249:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":251,"./_stream_writable":253,_process:187,dup:17,inherits:119}],250:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":252,dup:18,inherits:119}],251:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":248,"./_stream_duplex":249,"./internal/streams/async_iterator":254,"./internal/streams/buffer_list":255,"./internal/streams/destroy":256,"./internal/streams/from":258,"./internal/streams/state":260,"./internal/streams/stream":261,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],252:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":248,"./_stream_duplex":249,dup:20,inherits:119}],253:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":248,"./_stream_duplex":249,"./internal/streams/destroy":256,"./internal/streams/state":260,"./internal/streams/stream":261,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],254:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":257,_process:187,dup:22}],255:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],256:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],257:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":248,dup:25}],258:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],259:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":248,"./end-of-stream":257,dup:27}],260:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":248,dup:28}],261:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],262:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":249,"./lib/_stream_passthrough.js":250,"./lib/_stream_readable.js":251,"./lib/_stream_transform.js":252,"./lib/_stream_writable.js":253,"./lib/internal/streams/end-of-stream.js":257,"./lib/internal/streams/pipeline.js":259,dup:30}],263:[function(e,t,n){var i,r=1,o=65535,s=function(){r=r+1&o};t.exports=function(e){i||(i=setInterval(s,250)).unref&&i.unref();var t=4*(e||5),n=[0],a=1,c=r-1&o;return function(e){var i=r-c&o;for(i>t&&(i=t),c=r;i--;)a===t&&(a=0),n[a]=n[0===a?t-1:a-1],a++;e&&(n[a-1]+=e);var s=n[a-1],l=n.length<t?0:n[a===t?0:a];return n.length<4?s:4*(s-l)/n.length}}},{}],264:[function(e,t,n){(function(t){(function(){var i=e("./lib/request"),r=e("./lib/response"),o=e("xtend"),s=e("builtin-status-codes"),a=e("url"),c=n;c.request=function(e,n){e="string"==typeof e?a.parse(e):o(e);var r=-1===t.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||r,c=e.hostname||e.host,l=e.port,p=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?s+"//"+c:"")+(l?":"+l:"")+p,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new i(e);return n&&u.on("response",n),u},c.get=function(e,t){var n=c.request(e,t);return n.end(),n},c.ClientRequest=i,c.IncomingMessage=r.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=s,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":266,"./lib/response":267,"builtin-status-codes":61,url:299,xtend:336}],265:[function(e,t,n){(function(e){(function(){var t;function i(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function r(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function o(e){return"function"==typeof e}n.fetch=o(e.fetch)&&o(e.ReadableStream),n.writableStream=o(e.WritableStream),n.abortController=o(e.AbortController),n.arraybuffer=n.fetch||r("arraybuffer"),n.msstream=!n.fetch&&r("ms-stream"),n.mozchunkedarraybuffer=!n.fetch&&r("moz-chunked-arraybuffer"),n.overrideMimeType=n.fetch||!!i()&&o(i().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],266:[function(e,t,n){(function(n,i,r){(function(){var o=e("./capability"),s=e("inherits"),a=e("./response"),c=e("readable-stream"),l=a.IncomingMessage,p=a.readyStates;var u=t.exports=function(e){var t,n=this;c.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};s(u,c.Writable),u.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===d.indexOf(n)&&(this._headers[n]={name:e,value:t})},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,r=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var a=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){a.push([t,e])})):a.push([t,n])})),"fetch"===e._mode){var c=null;if(o.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=i.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}i.fetch(e._opts.url,{method:e._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){i.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new i.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case p.LOADING:case p.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{u.send(s)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}}}},u.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},u.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},u.prototype._write=function(e,t,n){this._body.push(e),n()},u.prototype.abort=u.prototype.destroy=function(){var e=this;e._destroyed=!0,i.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},u.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},u.prototype.flushHeaders=function(){},u.prototype.setTimeout=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":265,"./response":267,_process:187,buffer:60,inherits:119,"readable-stream":282}],267:[function(e,t,n){(function(t,i,r){(function(){var o=e("./capability"),s=e("inherits"),a=e("readable-stream"),c=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=n.IncomingMessage=function(e,n,s,c){var l=this;if(a.Readable.call(l),l._mode=s,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){t.nextTick((function(){l.emit("close")}))})),"fetch"===s){if(l._fetchResponse=n,l.url=n.url,l.statusCode=n.status,l.statusMessage=n.statusText,n.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),o.writableStream){var p=new WritableStream({write:function(e){return new Promise((function(t,n){l._destroyed?n():l.push(r.from(e))?t():l._resumeFetch=t}))},close:function(){i.clearTimeout(c),l._destroyed||l.push(null)},abort:function(e){l._destroyed||l.emit("error",e)}});try{return void n.body.pipeTo(p).catch((function(e){i.clearTimeout(c),l._destroyed||l.emit("error",e)}))}catch(e){}}var u=n.body.getReader();!function e(){u.read().then((function(t){if(!l._destroyed){if(t.done)return i.clearTimeout(c),void l.push(null);l.push(r.from(t.value)),e()}})).catch((function(e){i.clearTimeout(c),l._destroyed||l.emit("error",e)}))}()}else{if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!o.overrideMimeType){var d=l.rawHeaders["mime-type"];if(d){var f=d.match(/;\s*charset=([^;])(;|$)/);f&&(l._charset=f[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};s(l,a.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text":if((n=t.responseText).length>e._pos){var o=n.substr(e._pos);if("x-user-defined"===e._charset){for(var s=r.alloc(o.length),a=0;a<o.length;a++)s[a]=255&o.charCodeAt(a);e.push(s)}else e.push(o,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==c.DONE||!t.response)break;n=t.response,e.push(r.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==c.LOADING||!n)break;e.push(r.from(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==c.LOADING)break;var l=new i.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(r.from(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(n)}e._xhr.readyState===c.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":265,_process:187,buffer:60,inherits:119,"readable-stream":282}],268:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],269:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":271,"./_stream_writable":273,_process:187,dup:17,inherits:119}],270:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":272,dup:18,inherits:119}],271:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":268,"./_stream_duplex":269,"./internal/streams/async_iterator":274,"./internal/streams/buffer_list":275,"./internal/streams/destroy":276,"./internal/streams/from":278,"./internal/streams/state":280,"./internal/streams/stream":281,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],272:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":268,"./_stream_duplex":269,dup:20,inherits:119}],273:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":268,"./_stream_duplex":269,"./internal/streams/destroy":276,"./internal/streams/state":280,"./internal/streams/stream":281,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],274:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":277,_process:187,dup:22}],275:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],276:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],277:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":268,dup:25}],278:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],279:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":268,"./end-of-stream":277,dup:27}],280:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":268,dup:28}],281:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],282:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":269,"./lib/_stream_passthrough.js":270,"./lib/_stream_readable.js":271,"./lib/_stream_transform.js":272,"./lib/_stream_writable.js":273,"./lib/internal/streams/end-of-stream.js":277,"./lib/internal/streams/pipeline.js":279,dup:30}],283:[function(e,t,n){
|
||
/*! stream-to-blob-url. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=async function(e,t){const n=await i(e,t);return URL.createObjectURL(n)};const i=e("stream-to-blob")},{"stream-to-blob":284}],284:[function(e,t,n){
|
||
/*! stream-to-blob. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=function(e,t){if(null!=t&&"string"!=typeof t)throw new Error("Invalid mimetype, expected string.");return new Promise(((n,i)=>{const r=[];e.on("data",(e=>r.push(e))).once("end",(()=>{const e=null!=t?new Blob(r,{type:t}):new Blob(r);n(e)})).once("error",i)}))}},{}],285:[function(e,t,n){(function(n){(function(){
|
||
/*! stream-with-known-length-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
var i=e("once");t.exports=function(e,t,r){r=i(r);var o=n.alloc(t),s=0;e.on("data",(function(e){e.copy(o,s),s+=e.length})).on("end",(function(){r(null,o)})).on("error",r)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60,once:183}],286:[function(e,t,n){"use strict";var i=e("safe-buffer").Buffer,r=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===r||!r(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=p,this.end=u,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}n.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},o.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var r=s(t[i]);if(r>=0)return r>0&&(e.lastNeed=r-1),r;if(--i<n||-2===r)return 0;if((r=s(t[i]))>=0)return r>0&&(e.lastNeed=r-2),r;if(--i<n||-2===r)return 0;if((r=s(t[i]))>=0)return r>0&&(2===r?r=0:e.lastNeed=r-3),r;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":220}],287:[function(e,t,n){var i=e("./thirty-two");n.encode=i.encode,n.decode=i.decode},{"./thirty-two":288}],288:[function(e,t,n){(function(e){(function(){"use strict";var t=[255,255,26,27,28,29,30,31,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255];n.encode=function(t){e.isBuffer(t)||(t=new e(t));for(var n,i,r=0,o=0,s=0,a=0,c=new e(8*(n=t,i=Math.floor(n.length/5),n.length%5==0?i:i+1));r<t.length;){var l=t[r];s>3?(a=(a=l&255>>s)<<(s=(s+5)%8)|(r+1<t.length?t[r+1]:0)>>8-s,r++):(a=l>>8-(s+5)&31,0===(s=(s+5)%8)&&r++),c[o]="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".charCodeAt(a),o++}for(r=o;r<c.length;r++)c[r]=61;return c},n.decode=function(n){var i,r=0,o=0,s=0;e.isBuffer(n)||(n=new e(n));for(var a=new e(Math.ceil(5*n.length/8)),c=0;c<n.length&&61!==n[c];c++){var l=n[c]-48;if(!(l<t.length))throw new Error("Invalid input - it is not base32 encoded string");o=t[l],r<=3?0===(r=(r+5)%8)?(i|=o,a[s]=i,s++,i=0):i|=255&o<<8-r:(i|=255&o>>>(r=(r+5)%8),a[s]=i,s++,i=255&o<<8-r)}return a.slice(0,s)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],289:[function(e,t,n){(function(t){(function(){
|
||
/**!
|
||
* tippy.js v6.2.7
|
||
* (c) 2017-2020 atomiks
|
||
* MIT License
|
||
*/
|
||
"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=e("@popperjs/core"),r="tippy-content",o="tippy-backdrop",s="tippy-arrow",a="tippy-svg-arrow",c={passive:!0,capture:!0};function l(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function p(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function u(e,t){return"function"==typeof e?e.apply(void 0,t):e}function d(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function f(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}function h(e){return[].concat(e)}function m(e,t){-1===e.indexOf(t)&&e.push(t)}function g(e){return e.split("-")[0]}function v(e){return[].slice.call(e)}function b(){return document.createElement("div")}function x(e){return["Element","Fragment"].some((function(t){return p(e,t)}))}function y(e){return p(e,"MouseEvent")}function _(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function w(e){return x(e)?[e]:function(e){return p(e,"NodeList")}(e)?v(e):Array.isArray(e)?e:v(document.querySelectorAll(e))}function k(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function E(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function S(e){var t=h(e)[0];return t&&t.ownerDocument||document}function C(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}var T={isTouch:!1},j=0;function A(){T.isTouch||(T.isTouch=!0,window.performance&&document.addEventListener("mousemove",L))}function L(){var e=performance.now();e-j<20&&(T.isTouch=!1,document.removeEventListener("mousemove",L)),j=e}function I(){var e=document.activeElement;if(_(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var O,R="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",B=/MSIE |Trident\//.test(R);function U(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function M(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function P(e){return M("\n %ctippy.js\n\n %c"+M(e)+"\n\n %c👷 This is a development-only message. It will be removed in production.\n ")}function N(e){return[P(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function D(e,t){var n;e&&!O.has(t)&&(O.add(t),(n=console).warn.apply(n,N(t)))}function q(e,t){var n;e&&!O.has(t)&&(O.add(t),(n=console).error.apply(n,N(t)))}"production"!==t.env.NODE_ENV&&(O=new Set);var H={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},F=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},H,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),z=Object.keys(F);function W(e){var t=(e.plugins||[]).reduce((function(t,n){var i=n.name,r=n.defaultValue;return i&&(t[i]=void 0!==e[i]?e[i]:r),t}),{});return Object.assign({},e,{},t)}function V(e,t){var n=Object.assign({},t,{content:u(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(W(Object.assign({},F,{plugins:t}))):z).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},F.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function $(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var n,i,r=f(F,Object.keys(H)),o=(n=r,i=e,!{}.hasOwnProperty.call(n,i));o&&(o=0===t.filter((function(t){return t.name===e})).length),D(o,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}function G(e,t){e.innerHTML=t}function Y(e){var t=b();return!0===e?t.className=s:(t.className=a,x(e)?t.appendChild(e):G(t,e)),t}function K(e,t){x(t.content)?(G(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?G(e,t.content):e.textContent=t.content)}function X(e){var t=e.firstElementChild,n=v(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(r)})),arrow:n.find((function(e){return e.classList.contains(s)||e.classList.contains(a)})),backdrop:n.find((function(e){return e.classList.contains(o)}))}}function J(e){var t=b(),n=b();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=b();function o(n,i){var r=X(t),o=r.box,s=r.content,a=r.arrow;i.theme?o.setAttribute("data-theme",i.theme):o.removeAttribute("data-theme"),"string"==typeof i.animation?o.setAttribute("data-animation",i.animation):o.removeAttribute("data-animation"),i.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?o.setAttribute("role",i.role):o.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||K(s,e.props),i.arrow?a?n.arrow!==i.arrow&&(o.removeChild(a),o.appendChild(Y(i.arrow))):o.appendChild(Y(i.arrow)):a&&o.removeChild(a)}return i.className=r,i.setAttribute("data-state","hidden"),K(i,e.props),t.appendChild(n),n.appendChild(i),o(e.props,e.props),{popper:t,onUpdate:o}}J.$$tippy=!0;var Z=1,Q=[],ee=[];function te(e,n){var r,o,s,a,p,f,x,_,w,j=V(e,Object.assign({},F,{},W((r=n,Object.keys(r).reduce((function(e,t){return void 0!==r[t]&&(e[t]=r[t]),e}),{}))))),A=!1,L=!1,I=!1,O=!1,R=[],M=d(we,j.interactiveDebounce),P=Z++,N=(w=j.plugins).filter((function(e,t){return w.indexOf(e)===t})),H={id:P,reference:e,popper:b(),popperInstance:null,props:j,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:N,clearDelayTimeouts:function(){clearTimeout(o),clearTimeout(s),cancelAnimationFrame(a)},setProps:function(n){"production"!==t.env.NODE_ENV&&D(H.state.isDestroyed,U("setProps"));if(H.state.isDestroyed)return;ce("onBeforeUpdate",[H,n]),ye();var i=H.props,r=V(e,Object.assign({},H.props,{},n,{ignoreAttributes:!0}));H.props=r,xe(),i.interactiveDebounce!==r.interactiveDebounce&&(ue(),M=d(we,r.interactiveDebounce));i.triggerTarget&&!r.triggerTarget?h(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");pe(),ae(),G&&G(i,r);H.popperInstance&&(Ce(),je().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));ce("onAfterUpdate",[H,n])},setContent:function(e){H.setProps({content:e})},show:function(){"production"!==t.env.NODE_ENV&&D(H.state.isDestroyed,U("show"));var e=H.state.isVisible,n=H.state.isDestroyed,i=!H.state.isEnabled,r=T.isTouch&&!H.props.touch,o=l(H.props.duration,0,F.duration);if(e||n||i||r)return;if(ie().hasAttribute("disabled"))return;if(ce("onShow",[H],!1),!1===H.props.onShow(H))return;H.state.isVisible=!0,ne()&&($.style.visibility="visible");ae(),me(),H.state.isMounted||($.style.transition="none");if(ne()){var s=oe(),a=s.box,c=s.content;k([a,c],0)}x=function(){if(H.state.isVisible&&!O){if(O=!0,$.offsetHeight,$.style.transition=H.props.moveTransition,ne()&&H.props.animation){var e=oe(),t=e.box,n=e.content;k([t,n],o),E([t,n],"visible")}le(),pe(),m(ee,H),H.state.isMounted=!0,ce("onMount",[H]),H.props.animation&&ne()&&function(e,t){ve(e,t)}(o,(function(){H.state.isShown=!0,ce("onShown",[H])}))}},function(){var e,n=H.props.appendTo,i=ie();e=H.props.interactive&&n===F.appendTo||"parent"===n?i.parentNode:u(n,[i]);e.contains($)||e.appendChild($);Ce(),"production"!==t.env.NODE_ENV&&D(H.props.interactive&&n===F.appendTo&&i.nextElementSibling!==$,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){"production"!==t.env.NODE_ENV&&D(H.state.isDestroyed,U("hide"));var e=!H.state.isVisible,n=H.state.isDestroyed,i=!H.state.isEnabled,r=l(H.props.duration,1,F.duration);if(e||n||i)return;if(ce("onHide",[H],!1),!1===H.props.onHide(H))return;H.state.isVisible=!1,H.state.isShown=!1,O=!1,A=!1,ne()&&($.style.visibility="hidden");if(ue(),ge(),ae(),ne()){var o=oe(),s=o.box,a=o.content;H.props.animation&&(k([s,a],r),E([s,a],"hidden"))}le(),pe(),H.props.animation?ne()&&function(e,t){ve(e,(function(){!H.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&t()}))}(r,H.unmount):H.unmount()},hideWithInteractivity:function(e){"production"!==t.env.NODE_ENV&&D(H.state.isDestroyed,U("hideWithInteractivity"));re().addEventListener("mousemove",M),m(Q,M),M(e)},enable:function(){H.state.isEnabled=!0},disable:function(){H.hide(),H.state.isEnabled=!1},unmount:function(){"production"!==t.env.NODE_ENV&&D(H.state.isDestroyed,U("unmount"));H.state.isVisible&&H.hide();if(!H.state.isMounted)return;Te(),je().forEach((function(e){e._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($);ee=ee.filter((function(e){return e!==H})),H.state.isMounted=!1,ce("onHidden",[H])},destroy:function(){"production"!==t.env.NODE_ENV&&D(H.state.isDestroyed,U("destroy"));if(H.state.isDestroyed)return;H.clearDelayTimeouts(),H.unmount(),ye(),delete e._tippy,H.state.isDestroyed=!0,ce("onDestroy",[H])}};if(!j.render)return"production"!==t.env.NODE_ENV&&q(!0,"render() function has not been supplied."),H;var z=j.render(H),$=z.popper,G=z.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+H.id,H.popper=$,e._tippy=H,$._tippy=H;var Y=N.map((function(e){return e.fn(H)})),K=e.hasAttribute("aria-expanded");return xe(),pe(),ae(),ce("onCreate",[H]),j.showOnCreate&&Ae(),$.addEventListener("mouseenter",(function(){H.props.interactive&&H.state.isVisible&&H.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(e){H.props.interactive&&H.props.trigger.indexOf("mouseenter")>=0&&(re().addEventListener("mousemove",M),M(e))})),H;function J(){var e=H.props.touch;return Array.isArray(e)?e:[e,0]}function te(){return"hold"===J()[0]}function ne(){var e;return!!(null==(e=H.props.render)?void 0:e.$$tippy)}function ie(){return _||e}function re(){var e=ie().parentNode;return e?S(e):document}function oe(){return X($)}function se(e){return H.state.isMounted&&!H.state.isVisible||T.isTouch||p&&"focus"===p.type?0:l(H.props.delay,e?0:1,F.delay)}function ae(){$.style.pointerEvents=H.props.interactive&&H.state.isVisible?"":"none",$.style.zIndex=""+H.props.zIndex}function ce(e,t,n){var i;(void 0===n&&(n=!0),Y.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(i=H.props)[e].apply(i,t)}function le(){var t=H.props.aria;if(t.content){var n="aria-"+t.content,i=$.id;h(H.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(H.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var r=t&&t.replace(i,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}}))}}function pe(){!K&&H.props.aria.expanded&&h(H.props.triggerTarget||e).forEach((function(e){H.props.interactive?e.setAttribute("aria-expanded",H.state.isVisible&&e===ie()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ue(){re().removeEventListener("mousemove",M),Q=Q.filter((function(e){return e!==M}))}function de(e){if(!(T.isTouch&&(I||"mousedown"===e.type)||H.props.interactive&&$.contains(e.target))){if(ie().contains(e.target)){if(T.isTouch)return;if(H.state.isVisible&&H.props.trigger.indexOf("click")>=0)return}else ce("onClickOutside",[H,e]);!0===H.props.hideOnClick&&(H.clearDelayTimeouts(),H.hide(),L=!0,setTimeout((function(){L=!1})),H.state.isMounted||ge())}}function fe(){I=!0}function he(){I=!1}function me(){var e=re();e.addEventListener("mousedown",de,!0),e.addEventListener("touchend",de,c),e.addEventListener("touchstart",he,c),e.addEventListener("touchmove",fe,c)}function ge(){var e=re();e.removeEventListener("mousedown",de,!0),e.removeEventListener("touchend",de,c),e.removeEventListener("touchstart",he,c),e.removeEventListener("touchmove",fe,c)}function ve(e,t){var n=oe().box;function i(e){e.target===n&&(C(n,"remove",i),t())}if(0===e)return t();C(n,"remove",f),C(n,"add",i),f=i}function be(t,n,i){void 0===i&&(i=!1),h(H.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,i),R.push({node:e,eventType:t,handler:n,options:i})}))}function xe(){var e;te()&&(be("touchstart",_e,{passive:!0}),be("touchend",ke,{passive:!0})),(e=H.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(be(e,_e),e){case"mouseenter":be("mouseleave",ke);break;case"focus":be(B?"focusout":"blur",Ee);break;case"focusin":be("focusout",Ee)}}))}function ye(){R.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)})),R=[]}function _e(e){var t,n=!1;if(H.state.isEnabled&&!Se(e)&&!L){var i="focus"===(null==(t=p)?void 0:t.type);p=e,_=e.currentTarget,pe(),!H.state.isVisible&&y(e)&&Q.forEach((function(t){return t(e)})),"click"===e.type&&(H.props.trigger.indexOf("mouseenter")<0||A)&&!1!==H.props.hideOnClick&&H.state.isVisible?n=!0:Ae(e),"click"===e.type&&(A=!n),n&&!i&&Le(e)}}function we(e){var t=e.target,n=ie().contains(t)||$.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,r=e.popperState,o=e.props.interactiveBorder,s=g(r.placement),a=r.modifiersData.offset;if(!a)return!0;var c="bottom"===s?a.top.y:0,l="top"===s?a.bottom.y:0,p="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=t.top-i+c>o,f=i-t.bottom-l>o,h=t.left-n+p>o,m=n-t.right-u>o;return d||f||h||m}))}(je().concat($).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:j}:null})).filter(Boolean),e)&&(ue(),Le(e))}function ke(e){Se(e)||H.props.trigger.indexOf("click")>=0&&A||(H.props.interactive?H.hideWithInteractivity(e):Le(e))}function Ee(e){H.props.trigger.indexOf("focusin")<0&&e.target!==ie()||H.props.interactive&&e.relatedTarget&&$.contains(e.relatedTarget)||Le(e)}function Se(e){return!!T.isTouch&&te()!==e.type.indexOf("touch")>=0}function Ce(){Te();var t=H.props,n=t.popperOptions,r=t.placement,o=t.offset,s=t.getReferenceClientRect,a=t.moveTransition,c=ne()?X($).arrow:null,l=s?{getBoundingClientRect:s,contextElement:s.contextElement||ie()}:e,p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(ne()){var n=oe().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];ne()&&c&&p.push({name:"arrow",options:{element:c,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),H.popperInstance=i.createPopper(l,$,Object.assign({},n,{placement:r,onFirstUpdate:x,modifiers:p}))}function Te(){H.popperInstance&&(H.popperInstance.destroy(),H.popperInstance=null)}function je(){return v($.querySelectorAll("[data-tippy-root]"))}function Ae(e){H.clearDelayTimeouts(),e&&ce("onTrigger",[H,e]),me();var t=se(!0),n=J(),i=n[0],r=n[1];T.isTouch&&"hold"===i&&r&&(t=r),t?o=setTimeout((function(){H.show()}),t):H.show()}function Le(e){if(H.clearDelayTimeouts(),ce("onUntrigger",[H,e]),H.state.isVisible){if(!(H.props.trigger.indexOf("mouseenter")>=0&&H.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&A)){var t=se(!1);t?s=setTimeout((function(){H.state.isVisible&&H.hide()}),t):a=requestAnimationFrame((function(){H.hide()}))}}else ge()}}function ne(e,n){void 0===n&&(n={});var i=F.plugins.concat(n.plugins||[]);"production"!==t.env.NODE_ENV&&(!function(e){var t=!e,n="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;q(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),q(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),$(n,i)),document.addEventListener("touchstart",A,c),window.addEventListener("blur",I);var r=Object.assign({},n,{plugins:i}),o=w(e);if("production"!==t.env.NODE_ENV){var s=x(r.content),a=o.length>1;D(s&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "))}var l=o.reduce((function(e,t){var n=t&&te(t,r);return n&&e.push(n),e}),[]);return x(e)?l[0]:l}ne.defaultProps=F,ne.setDefaultProps=function(e){"production"!==t.env.NODE_ENV&&$(e,[]),Object.keys(e).forEach((function(t){F[t]=e[t]}))},ne.currentInput=T;var ie={mouseover:"mouseenter",focusin:"focus",click:"click"};var re={name:"animateFill",defaultValue:!1,fn:function(e){var n;if(!(null==(n=e.props.render)?void 0:n.$$tippy))return"production"!==t.env.NODE_ENV&&q(e.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var i=X(e.popper),r=i.box,s=i.content,a=e.props.animateFill?function(){var e=b();return e.className=o,E([e],"hidden"),e}():null;return{onCreate:function(){a&&(r.insertBefore(a,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",e.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(a){var e=r.style.transitionDuration,t=Number(e.replace("ms",""));s.style.transitionDelay=Math.round(t/10)+"ms",a.style.transitionDuration=e,E([a],"visible")}},onShow:function(){a&&(a.style.transitionDuration="0ms")},onHide:function(){a&&E([a],"hidden")}}}};var oe={clientX:0,clientY:0},se=[];function ae(e){var t=e.clientX,n=e.clientY;oe={clientX:t,clientY:n}}var ce={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,n=S(e.props.triggerTarget||t),i=!1,r=!1,o=!0,s=e.props;function a(){return"initial"===e.props.followCursor&&e.state.isVisible}function c(){n.addEventListener("mousemove",u)}function l(){n.removeEventListener("mousemove",u)}function p(){i=!0,e.setProps({getReferenceClientRect:null}),i=!1}function u(n){var i=!n.target||t.contains(n.target),r=e.props.followCursor,o=n.clientX,s=n.clientY,a=t.getBoundingClientRect(),c=o-a.left,l=s-a.top;!i&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=t.getBoundingClientRect(),n=o,i=s;"initial"===r&&(n=e.left+c,i=e.top+l);var a="horizontal"===r?e.top:i,p="vertical"===r?e.right:n,u="horizontal"===r?e.bottom:i,d="vertical"===r?e.left:n;return{width:p-d,height:u-a,top:a,right:p,bottom:u,left:d}}})}function d(){e.props.followCursor&&(se.push({instance:e,doc:n}),function(e){e.addEventListener("mousemove",ae)}(n))}function f(){0===(se=se.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===n})).length&&function(e){e.removeEventListener("mousemove",ae)}(n)}return{onCreate:d,onDestroy:f,onBeforeUpdate:function(){s=e.props},onAfterUpdate:function(t,n){var o=n.followCursor;i||void 0!==o&&s.followCursor!==o&&(f(),o?(d(),!e.state.isMounted||r||a()||c()):(l(),p()))},onMount:function(){e.props.followCursor&&!r&&(o&&(u(oe),o=!1),a()||c())},onTrigger:function(e,t){y(t)&&(oe={clientX:t.clientX,clientY:t.clientY}),r="focus"===t.type},onHidden:function(){e.props.followCursor&&(p(),l(),o=!0)}}}};var le={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t,n=e.reference;var i=-1,r=!1,o={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(r){var o=r.state;e.props.inlinePositioning&&(t!==o.placement&&e.setProps({getReferenceClientRect:function(){return function(e){return function(e,t,n,i){if(n.length<2||null===e)return t;if(2===n.length&&i>=0&&n[0].left>n[1].right)return n[i]||t;switch(e){case"top":case"bottom":var r=n[0],o=n[n.length-1],s="top"===e,a=r.top,c=o.bottom,l=s?r.left:o.left,p=s?r.right:o.right;return{top:a,bottom:c,left:l,right:p,width:p-l,height:c-a};case"left":case"right":var u=Math.min.apply(Math,n.map((function(e){return e.left}))),d=Math.max.apply(Math,n.map((function(e){return e.right}))),f=n.filter((function(t){return"left"===e?t.left===u:t.right===d})),h=f[0].top,m=f[f.length-1].bottom;return{top:h,bottom:m,left:u,right:d,width:d-u,height:m-h};default:return t}}(g(e),n.getBoundingClientRect(),v(n.getClientRects()),i)}(o.placement)}}),t=o.placement)}};function s(){var t;r||(t=function(e,t){var n;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat(((null==(n=e.popperOptions)?void 0:n.modifiers)||[]).filter((function(e){return e.name!==t.name})),[t])})}}(e.props,o),r=!0,e.setProps(t),r=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(t,n){if(y(n)){var r=v(e.reference.getClientRects()),o=r.find((function(e){return e.left-2<=n.clientX&&e.right+2>=n.clientX&&e.top-2<=n.clientY&&e.bottom+2>=n.clientY}));i=r.indexOf(o)}},onUntrigger:function(){i=-1}}}};var pe={name:"sticky",defaultValue:!1,fn:function(e){var t=e.reference,n=e.popper;function i(t){return!0===e.props.sticky||e.props.sticky===t}var r=null,o=null;function s(){var a=i("reference")?(e.popperInstance?e.popperInstance.state.elements.reference:t).getBoundingClientRect():null,c=i("popper")?n.getBoundingClientRect():null;(a&&ue(r,a)||c&&ue(o,c))&&e.popperInstance&&e.popperInstance.update(),r=a,o=c,e.state.isMounted&&requestAnimationFrame(s)}return{onMount:function(){e.props.sticky&&s()}}}};function ue(e,t){return!e||!t||(e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left)}ne.setDefaultProps({render:J}),n.animateFill=re,n.createSingleton=function(e,n){void 0===n&&(n={}),"production"!==t.env.NODE_ENV&&q(!Array.isArray(e),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(e)].join(" "));var i,r=e,o=[],s=n.overrides,a=[];function c(){o=r.map((function(e){return e.reference}))}function l(e){r.forEach((function(t){e?t.enable():t.disable()}))}function p(e){return r.map((function(t){var n=t.setProps;return t.setProps=function(r){n(r),t.reference===i&&e.setProps(r)},function(){t.setProps=n}}))}l(!1),c();var u={fn:function(){return{onDestroy:function(){l(!0)},onTrigger:function(e,t){var n=t.currentTarget,a=o.indexOf(n);if(n!==i){i=n;var c=(s||[]).concat("content").reduce((function(e,t){return e[t]=r[a].props[t],e}),{});e.setProps(Object.assign({},c,{getReferenceClientRect:"function"==typeof c.getReferenceClientRect?c.getReferenceClientRect:function(){return n.getBoundingClientRect()}}))}}}}},d=ne(b(),Object.assign({},f(n,["overrides"]),{plugins:[u].concat(n.plugins||[]),triggerTarget:o})),h=d.setProps;return d.setProps=function(e){s=e.overrides||s,h(e)},d.setInstances=function(e){l(!0),a.forEach((function(e){return e()})),r=e,l(!1),c(),p(d),d.setProps({triggerTarget:o})},a=p(d),d},n.default=ne,n.delegate=function(e,n){"production"!==t.env.NODE_ENV&&q(!(n&&n.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var i=[],r=[],o=!1,s=n.target,a=f(n,["target"]),c=Object.assign({},a,{trigger:"manual",touch:!1}),l=Object.assign({},a,{showOnCreate:!0}),p=ne(e,c);function u(e){if(e.target&&!o){var t=e.target.closest(s);if(t){var i=t.getAttribute("data-tippy-trigger")||n.trigger||F.trigger;if(!t._tippy&&!("touchstart"===e.type&&"boolean"==typeof l.touch||"touchstart"!==e.type&&i.indexOf(ie[e.type])<0)){var a=ne(t,l);a&&(r=r.concat(a))}}}}function d(e,t,n,r){void 0===r&&(r=!1),e.addEventListener(t,n,r),i.push({node:e,eventType:t,handler:n,options:r})}return h(p).forEach((function(e){var t=e.destroy,n=e.enable,s=e.disable;e.destroy=function(e){void 0===e&&(e=!0),e&&r.forEach((function(e){e.destroy()})),r=[],i.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,r=e.options;t.removeEventListener(n,i,r)})),i=[],t()},e.enable=function(){n(),r.forEach((function(e){return e.enable()})),o=!1},e.disable=function(){s(),r.forEach((function(e){return e.disable()})),o=!0},function(e){var t=e.reference;d(t,"touchstart",u),d(t,"mouseover",u),d(t,"focusin",u),d(t,"click",u)}(e)})),p},n.followCursor=ce,n.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,i=t.duration;ee.forEach((function(e){var t=!1;if(n&&(t=_(n)?e.reference===n:e.popper===n.popper),!t){var r=e.props.duration;e.setProps({duration:i}),e.hide(),e.state.isDestroyed||e.setProps({duration:r})}}))},n.inlinePositioning=le,n.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',n.sticky=pe}).call(this)}).call(this,e("_process"))},{"@popperjs/core":1,_process:187}],290:[function(e,t,n){var i=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(i.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,r=0;r<n;r++)t[r]=e[r];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:60}],291:[function(e,t,n){(function(n){(function(){
|
||
/*! torrent-discovery. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const i=e("debug")("torrent-discovery"),r=e("bittorrent-dht/client"),o=e("events").EventEmitter,s=e("run-parallel"),a=e("bittorrent-tracker/client"),c=e("bittorrent-lsd");t.exports=class extends o{constructor(e){if(super(),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!n.browser&&!e.port)throw new Error("Option `port` is required");this.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),this.infoHash="string"==typeof e.infoHash?e.infoHash.toLowerCase():e.infoHash.toString("hex"),this._port=e.port,this._userAgent=e.userAgent,this.destroyed=!1,this._announce=e.announce||[],this._intervalMs=e.intervalMs||9e5,this._trackerOpts=null,this._dhtAnnouncing=!1,this._dhtTimeout=!1,this._internalDHT=!1,this._onWarning=e=>{this.emit("warning",e)},this._onError=e=>{this.emit("error",e)},this._onDHTPeer=(e,t)=>{t.toString("hex")===this.infoHash&&this.emit("peer",`${e.host}:${e.port}`,"dht")},this._onTrackerPeer=e=>{this.emit("peer",e,"tracker")},this._onTrackerAnnounce=()=>{this.emit("trackerAnnounce")},this._onLSDPeer=(e,t)=>{this.emit("peer",e,"lsd")};const t=(e,t)=>{const n=new r(t);return n.on("warning",this._onWarning),n.on("error",this._onError),n.listen(e),this._internalDHT=!0,n};!1===e.tracker?this.tracker=null:e.tracker&&"object"==typeof e.tracker?(this._trackerOpts=Object.assign({},e.tracker),this.tracker=this._createTracker()):this.tracker=this._createTracker(),!1===e.dht||"function"!=typeof r?this.dht=null:e.dht&&"function"==typeof e.dht.addNode?this.dht=e.dht:e.dht&&"object"==typeof e.dht?this.dht=t(e.dhtPort,e.dht):this.dht=t(e.dhtPort),this.dht&&(this.dht.on("peer",this._onDHTPeer),this._dhtAnnounce()),!1===e.lsd||"function"!=typeof c?this.lsd=null:this.lsd=this._createLSD()}updatePort(e){e!==this._port&&(this._port=e,this.dht&&this._dhtAnnounce(),this.tracker&&(this.tracker.stop(),this.tracker.destroy((()=>{this.tracker=this._createTracker()}))))}complete(e){this.tracker&&this.tracker.complete(e)}destroy(e){if(this.destroyed)return;this.destroyed=!0,clearTimeout(this._dhtTimeout);const t=[];this.tracker&&(this.tracker.stop(),this.tracker.removeListener("warning",this._onWarning),this.tracker.removeListener("error",this._onError),this.tracker.removeListener("peer",this._onTrackerPeer),this.tracker.removeListener("update",this._onTrackerAnnounce),t.push((e=>{this.tracker.destroy(e)}))),this.dht&&this.dht.removeListener("peer",this._onDHTPeer),this._internalDHT&&(this.dht.removeListener("warning",this._onWarning),this.dht.removeListener("error",this._onError),t.push((e=>{this.dht.destroy(e)}))),this.lsd&&(this.lsd.removeListener("warning",this._onWarning),this.lsd.removeListener("error",this._onError),this.lsd.removeListener("peer",this._onLSDPeer),t.push((e=>{this.lsd.destroy(e)}))),s(t,e),this.dht=null,this.tracker=null,this.lsd=null,this._announce=null}_createTracker(){const e=Object.assign({},this._trackerOpts,{infoHash:this.infoHash,announce:this._announce,peerId:this.peerId,port:this._port,userAgent:this._userAgent}),t=new a(e);return t.on("warning",this._onWarning),t.on("error",this._onError),t.on("peer",this._onTrackerPeer),t.on("update",this._onTrackerAnnounce),t.setInterval(this._intervalMs),t.start(),t}_dhtAnnounce(){this._dhtAnnouncing||(i("dht announce"),this._dhtAnnouncing=!0,clearTimeout(this._dhtTimeout),this.dht.announce(this.infoHash,this._port,(e=>{this._dhtAnnouncing=!1,i("dht announce complete"),e&&this.emit("warning",e),this.emit("dhtAnnounce"),this.destroyed||(this._dhtTimeout=setTimeout((()=>{this._dhtAnnounce()}),this._intervalMs+Math.floor(Math.random()*this._intervalMs/5)),this._dhtTimeout.unref&&this._dhtTimeout.unref())})))}_createLSD(){const e=Object.assign({},{infoHash:this.infoHash,peerId:this.peerId,port:this._port}),t=new c(e);return t.on("warning",this._onWarning),t.on("error",this._onError),t.on("peer",this._onLSDPeer),t.start(),t}}}).call(this)}).call(this,e("_process"))},{_process:187,"bittorrent-dht/client":55,"bittorrent-lsd":55,"bittorrent-tracker/client":31,debug:292,events:98,"run-parallel":218}],292:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./common":293,_process:187,dup:13}],293:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14,ms:294}],294:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],295:[function(e,t,n){(function(e){(function(){const n=16384;class i{constructor(e){this.length=e,this.missing=e,this.sources=null,this._chunks=Math.ceil(e/n),this._remainder=e%n||n,this._buffered=0,this._buffer=null,this._cancellations=null,this._reservations=0,this._flushed=!1}chunkLength(e){return e===this._chunks-1?this._remainder:n}chunkLengthRemaining(e){return this.length-e*n}chunkOffset(e){return e*n}reserve(){return this.init()?this._cancellations.length?this._cancellations.pop():this._reservations<this._chunks?this._reservations++:-1:-1}reserveRemaining(){if(!this.init())return-1;if(this._reservations<this._chunks){const e=this._reservations;return this._reservations=this._chunks,e}return-1}cancel(e){this.init()&&this._cancellations.push(e)}cancelRemaining(e){this.init()&&(this._reservations=e)}get(e){return this.init()?this._buffer[e]:null}set(e,t,i){if(!this.init())return!1;const r=t.length,o=Math.ceil(r/n);for(let r=0;r<o;r++)if(!this._buffer[e+r]){const o=r*n,s=t.slice(o,o+n);this._buffered++,this._buffer[e+r]=s,this.missing-=s.length,this.sources.includes(i)||this.sources.push(i)}return this._buffered===this._chunks}flush(){if(!this._buffer||this._chunks!==this._buffered)return null;const t=e.concat(this._buffer,this.length);return this._buffer=null,this._cancellations=null,this.sources=null,this._flushed=!0,t}init(){return!this._flushed&&(this._buffer||(this._buffer=new Array(this._chunks),this._cancellations=[],this.sources=[]),!0)}}Object.defineProperty(i,"BLOCK_LENGTH",{value:n}),t.exports=i}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60}],296:[function(e,t,n){(function(n){(function(){var i=e("is-typedarray").strict;t.exports=function(e){if(i(e)){var t=n.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return n.from(e)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:60,"is-typedarray":122}],297:[function(e,t,n){var i=e("buffer-alloc"),r=Math.pow(2,32);n.encodingLength=function(){return 8},n.encode=function(e,t,n){t||(t=i(8)),n||(n=0);var o=Math.floor(e/r),s=e-o*r;return t.writeUInt32BE(o,n),t.writeUInt32BE(s,n+4),t},n.decode=function(e,t){t||(t=0);var n=e.readUInt32BE(t),i=e.readUInt32BE(t+4);return n*r+i},n.encode.bytes=8,n.decode.bytes=8},{"buffer-alloc":58}],298:[function(e,t,n){t.exports=function(e,t){if(t>=e.length||t<0)return;var n=e.pop();if(t<e.length){var i=e[t];return e[t]=n,i}return n}},{}],299:[function(e,t,n){"use strict";var i=e("punycode"),r=e("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=x,n.resolve=function(e,t){return x(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?x(e,!1,!0).resolveObject(t):t},n.format=function(e){r.isString(e)&&(e=x(e));return e instanceof o?e.format():o.prototype.format.call(e)},n.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),p=["'"].concat(l),u=["%","/","?",";","#"].concat(p),d=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=e("querystring");function x(e,t,n){if(e&&r.isObject(e)&&e instanceof o)return e;var i=new o;return i.parse(e,t,n),i}o.prototype.parse=function(e,t,n){if(!r.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",l=e.split(a);l[0]=l[0].replace(/\\/g,"/");var x=e=l.join(a);if(x=x.trim(),!n&&1===e.split("#").length){var y=c.exec(x);if(y)return this.path=x,this.href=x,this.pathname=y[1],y[2]?(this.search=y[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(x);if(_){var w=(_=_[0]).toLowerCase();this.protocol=w,x=x.substr(_.length)}if(n||_||x.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===x.substr(0,2);!k||_&&g[_]||(x=x.substr(2),this.slashes=!0)}if(!g[_]&&(k||_&&!v[_])){for(var E,S,C=-1,T=0;T<d.length;T++){-1!==(j=x.indexOf(d[T]))&&(-1===C||j<C)&&(C=j)}-1!==(S=-1===C?x.lastIndexOf("@"):x.lastIndexOf("@",C))&&(E=x.slice(0,S),x=x.slice(S+1),this.auth=decodeURIComponent(E)),C=-1;for(T=0;T<u.length;T++){var j;-1!==(j=x.indexOf(u[T]))&&(-1===C||j<C)&&(C=j)}-1===C&&(C=x.length),this.host=x.slice(0,C),x=x.slice(C),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var L=this.hostname.split(/\./),I=(T=0,L.length);T<I;T++){var O=L[T];if(O&&!O.match(f)){for(var R="",B=0,U=O.length;B<U;B++)O.charCodeAt(B)>127?R+="x":R+=O[B];if(!R.match(f)){var M=L.slice(0,T),P=L.slice(T+1),N=O.match(h);N&&(M.push(N[1]),P.unshift(N[2])),P.length&&(x="/"+P.join(".")+x),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=i.toASCII(this.hostname));var D=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+D,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==x[0]&&(x="/"+x))}if(!m[w])for(T=0,I=p.length;T<I;T++){var H=p[T];if(-1!==x.indexOf(H)){var F=encodeURIComponent(H);F===H&&(F=escape(H)),x=x.split(H).join(F)}}var z=x.indexOf("#");-1!==z&&(this.hash=x.substr(z),x=x.slice(0,z));var W=x.indexOf("?");if(-1!==W?(this.search=x.substr(W),this.query=x.substr(W+1),t&&(this.query=b.parse(this.query)),x=x.slice(0,W)):t&&(this.search="",this.query={}),x&&(this.pathname=x),v[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var V=this.search||"";this.path=D+V}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(e){return this.resolveObject(x(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(r.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),l=0;l<c.length;l++){var p=c[l];"protocol"!==p&&(n[p]=e[p])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var u=Object.keys(e),d=0;d<u.length;d++){var f=u[d];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",b=n.search||"";n.path=m+b}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var x=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=y||x||n.host&&e.pathname,w=_,k=n.pathname&&n.pathname.split("/")||[],E=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),_=_&&(""===h[0]||""===k[0])),y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=h;else if(h.length)k||(k=[]),k.pop(),k=k.concat(h),n.search=e.search,n.query=e.query;else if(!r.isNullOrUndefined(e.search)){if(E)n.hostname=n.host=k.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=k.slice(-1)[0],C=(n.host||e.host||k.length>1)&&("."===S||".."===S)||""===S,T=0,j=k.length;j>=0;j--)"."===(S=k[j])?k.splice(j,1):".."===S?(k.splice(j,1),T++):T&&(k.splice(j,1),T--);if(!_&&!w)for(;T--;T)k.unshift("..");!_||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),C&&"/"!==k.join("/").substr(-1)&&k.push("");var A,L=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=L?"":k.length?k.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(_=_||n.host&&k.length)&&!L&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":300,punycode:189,querystring:192}],300:[function(e,t,n){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],301:[function(e,t,n){(function(n){(function(){
|
||
/*! ut_metadata. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const{EventEmitter:i}=e("events"),r=e("bencode"),o=e("bitfield").default,s=e("debug")("ut_metadata"),a=e("simple-sha1"),c=16384;t.exports=e=>{class t extends i{constructor(t){super(),this._wire=t,this._fetching=!1,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._bitfield=new o(0,{grow:1e3}),n.isBuffer(e)&&this.setMetadata(e)}onHandshake(e,t,n){this._infoHash=e}onExtendedHandshake(e){return e.m&&e.m.ut_metadata?e.metadata_size?"number"!=typeof e.metadata_size||1e7<e.metadata_size||e.metadata_size<=0?this.emit("warning",new Error("Peer gave invalid metadata size")):(this._metadataSize=e.metadata_size,this._numPieces=Math.ceil(this._metadataSize/c),this._remainingRejects=2*this._numPieces,void this._requestPieces()):this.emit("warning",new Error("Peer does not have metadata")):this.emit("warning",new Error("Peer does not support ut_metadata"))}onMessage(e){let t,n;try{const i=e.toString(),o=i.indexOf("ee")+2;t=r.decode(i.substring(0,o)),n=e.slice(o)}catch(e){return}switch(t.msg_type){case 0:this._onRequest(t.piece);break;case 1:this._onData(t.piece,n,t.total_size);break;case 2:this._onReject(t.piece)}}fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&&this._requestPieces())}cancel(){this._fetching=!1}setMetadata(e){if(this._metadataComplete)return!0;s("set metadata");try{const t=r.decode(e).info;t&&(e=r.encode(t))}catch(e){}return(!this._infoHash||this._infoHash===a.sync(e))&&(this.cancel(),this.metadata=e,this._metadataComplete=!0,this._metadataSize=this.metadata.length,this._wire.extendedHandshake.metadata_size=this._metadataSize,this.emit("metadata",r.encode({info:r.decode(this.metadata)})),!0)}_send(e,t){let i=r.encode(e);n.isBuffer(t)&&(i=n.concat([i,t])),this._wire.extended("ut_metadata",i)}_request(e){this._send({msg_type:0,piece:e})}_data(e,t,n){const i={msg_type:1,piece:e};"number"==typeof n&&(i.total_size=n),this._send(i,t)}_reject(e){this._send({msg_type:2,piece:e})}_onRequest(e){if(!this._metadataComplete)return void this._reject(e);const t=e*c;let n=t+c;n>this._metadataSize&&(n=this._metadataSize);const i=this.metadata.slice(t,n);this._data(e,i,this._metadataSize)}_onData(e,t,n){t.length>c||!this._fetching||(t.copy(this.metadata,e*c),this._bitfield.set(e),this._checkDone())}_onReject(e){this._remainingRejects>0&&this._fetching?(this._request(e),this._remainingRejects-=1):this.emit("warning",new Error('Peer sent "reject" too much'))}_requestPieces(){if(this._fetching){this.metadata=n.alloc(this._metadataSize);for(let e=0;e<this._numPieces;e++)this._request(e)}}_checkDone(){let e=!0;for(let t=0;t<this._numPieces;t++)if(!this._bitfield.get(t)){e=!1;break}if(!e)return;this.setMetadata(this.metadata)||this._failedMetadata()}_failedMetadata(){this._bitfield=new o(0,{grow:1e3}),this._remainingRejects-=this._numPieces,this._remainingRejects>0?this._requestPieces():this.emit("warning",new Error("Peer sent invalid metadata"))}}return t.prototype.name="ut_metadata",t}}).call(this)}).call(this,e("buffer").Buffer)},{bencode:7,bitfield:302,buffer:60,debug:303,events:98,"simple-sha1":242}],302:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{dup:12}],303:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./common":304,_process:187,dup:13}],304:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14,ms:305}],305:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],306:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],307:[function(e,t,n){(function(n){(function(){const i=e("binary-search"),r=e("events"),o=e("mp4-stream"),s=e("mp4-box-encoding"),a=e("range-slice-stream");class c{constructor(e,t){this._entries=e,this._countName=t||"count",this._index=0,this._offset=0,this.value=this._entries[0]}inc(){this._offset++,this._offset>=this._entries[this._index][this._countName]&&(this._index++,this._offset=0),this.value=this._entries[this._index]}}const l=1;t.exports=class extends r{constructor(e){super(),this._tracks=[],this._file=e,this._decoder=null,this._findMoov(0)}_findMoov(e){this._decoder&&this._decoder.destroy();let t=0;this._decoder=o.decode();const n=this._file.createReadStream({start:e});n.pipe(this._decoder);const i=r=>{"moov"===r.type?(this._decoder.removeListener("box",i),this._decoder.decode((e=>{n.destroy();try{this._processMoov(e)}catch(e){e.message="Cannot parse mp4 file: "+e.message,this.emit("error",e)}}))):r.length<4096?(t+=r.length,this._decoder.ignore()):(this._decoder.removeListener("box",i),t+=r.length,n.destroy(),this._decoder.destroy(),this._findMoov(e+t))};this._decoder.on("box",i)}_processMoov(e){const t=e.traks;this._tracks=[],this._hasVideo=!1,this._hasAudio=!1;for(let n=0;n<t.length;n++){const r=t[n],o=r.mdia.minf.stbl,s=o.stsd.entries[0],a=r.mdia.hdlr.handlerType;let l,p;if("vide"===a&&"avc1"===s.type){if(this._hasVideo)continue;this._hasVideo=!0,l="avc1",s.avcC&&(l+="."+s.avcC.mimeCodec),p=`video/mp4; codecs="${l}"`}else{if("soun"!==a||"mp4a"!==s.type)continue;if(this._hasAudio)continue;this._hasAudio=!0,l="mp4a",s.esds&&s.esds.mimeCodec&&(l+="."+s.esds.mimeCodec),p=`audio/mp4; codecs="${l}"`}const u=[];let d=0,f=0,h=0,m=0,g=0,v=0;const b=new c(o.stts.entries);let x=null;o.ctts&&(x=new c(o.ctts.entries));let y=0;for(;;){var i=o.stsc.entries[g];const e=o.stsz.entries[d],t=b.value.duration,n=x?x.value.compositionOffset:0;let r=!0;o.stss&&(r=o.stss.entries[y]===d+1);const s=o.stco||o.co64;if(u.push({size:e,duration:t,dts:v,presentationOffset:n,sync:r,offset:m+s.entries[h]}),d++,d>=o.stsz.entries.length)break;if(f++,m+=e,f>=i.samplesPerChunk){f=0,m=0,h++;const e=o.stsc.entries[g+1];e&&h+1>=e.firstChunk&&g++}v+=t,b.inc(),x&&x.inc(),r&&y++}r.mdia.mdhd.duration=0,r.tkhd.duration=0;const _=i.sampleDescriptionId,w={type:"moov",mvhd:e.mvhd,traks:[{tkhd:r.tkhd,mdia:{mdhd:r.mdia.mdhd,hdlr:r.mdia.hdlr,elng:r.mdia.elng,minf:{vmhd:r.mdia.minf.vmhd,smhd:r.mdia.minf.smhd,dinf:r.mdia.minf.dinf,stbl:{stsd:o.stsd,stts:{version:0,flags:0,entries:[]},ctts:{version:0,flags:0,entries:[]},stsc:{version:0,flags:0,entries:[]},stsz:{version:0,flags:0,entries:[]},stco:{version:0,flags:0,entries:[]},stss:{version:0,flags:0,entries:[]}}}}}],mvex:{mehd:{fragmentDuration:e.mvhd.duration},trexs:[{trackId:r.tkhd.trackId,defaultSampleDescriptionIndex:_,defaultSampleDuration:0,defaultSampleSize:0,defaultSampleFlags:0}]}};this._tracks.push({fragmentSequence:1,trackId:r.tkhd.trackId,timeScale:r.mdia.mdhd.timeScale,samples:u,currSample:null,currTime:null,moov:w,mime:p})}if(0===this._tracks.length)return void this.emit("error",new Error("no playable tracks"));e.mvhd.duration=0,this._ftyp={type:"ftyp",brand:"iso5",brandVersion:0,compatibleBrands:["iso5"]};const r=s.encode(this._ftyp),o=this._tracks.map((e=>{const t=s.encode(e.moov);return{mime:e.mime,init:n.concat([r,t])}}));this.emit("ready",o)}seek(e){if(!this._tracks)throw new Error("Not ready yet; wait for 'ready' event");this._fileStream&&(this._fileStream.destroy(),this._fileStream=null);let t=-1;if(this._tracks.map(((n,i)=>{n.outStream&&n.outStream.destroy(),n.inStream&&(n.inStream.destroy(),n.inStream=null);const r=n.outStream=o.encode(),s=this._generateFragment(i,e);if(!s)return r.finalize();(-1===t||s.ranges[0].start<t)&&(t=s.ranges[0].start);const a=e=>{r.destroyed||r.box(e.moof,(t=>{if(t)return this.emit("error",t);if(r.destroyed)return;n.inStream.slice(e.ranges).pipe(r.mediaData(e.length,(e=>{if(e)return this.emit("error",e);if(r.destroyed)return;const t=this._generateFragment(i);if(!t)return r.finalize();a(t)})))}))};a(s)})),t>=0){const e=this._fileStream=this._file.createReadStream({start:t});this._tracks.forEach((n=>{n.inStream=new a(t,{highWaterMark:1e7}),e.pipe(n.inStream)}))}return this._tracks.map((e=>e.outStream))}_findSampleBefore(e,t){const n=this._tracks[e],r=Math.floor(n.timeScale*t);let o=i(n.samples,r,((e,t)=>e.dts+e.presentationOffset-t));for(-1===o?o=0:o<0&&(o=-o-2);!n.samples[o].sync;)o--;return o}_generateFragment(e,t){const n=this._tracks[e];let i;if(i=void 0!==t?this._findSampleBefore(e,t):n.currSample,i>=n.samples.length)return null;const r=n.samples[i].dts;let o=0;const s=[];for(var a=i;a<n.samples.length;a++){const e=n.samples[a];if(e.sync&&e.dts-r>=n.timeScale*l)break;o+=e.size;const t=s.length-1;t<0||s[t].end!==e.offset?s.push({start:e.offset,end:e.offset+e.size}):s[t].end+=e.size}return n.currSample=a,{moof:this._generateMoof(e,i,a),ranges:s,length:o}}_generateMoof(e,t,n){const i=this._tracks[e],r=[];let o=0;for(let e=t;e<n;e++){const t=i.samples[e];t.presentationOffset<0&&(o=1),r.push({sampleDuration:t.duration,sampleSize:t.size,sampleFlags:t.sync?33554432:16842752,sampleCompositionTimeOffset:t.presentationOffset})}const a={type:"moof",mfhd:{sequenceNumber:i.fragmentSequence++},trafs:[{tfhd:{flags:131072,trackId:i.trackId},tfdt:{baseMediaDecodeTime:i.samples[t].dts},trun:{flags:3841,dataOffset:8,entries:r,version:o}}]};return a.trafs[0].trun.dataOffset+=s.encodingLength(a),a}}}).call(this)}).call(this,e("buffer").Buffer)},{"binary-search":9,buffer:60,events:98,"mp4-box-encoding":147,"mp4-stream":150,"range-slice-stream":196}],308:[function(e,t,n){const i=e("mediasource"),r=e("pump"),o=e("./mp4-remuxer");function s(e,t,n={}){if(!(this instanceof s))return console.warn("Don't invoke VideoStream without the 'new' keyword."),new s(e,t,n);this.detailedError=null,this._elem=t,this._elemWrapper=new i(t),this._waitingFired=!1,this._trackMeta=null,this._file=e,this._tracks=null,"none"!==this._elem.preload&&this._createMuxer(),this._onError=()=>{this.detailedError=this._elemWrapper.detailedError,this.destroy()},this._onWaiting=()=>{this._waitingFired=!0,this._muxer?this._tracks&&this._pump():this._createMuxer()},t.autoplay&&(t.preload="auto"),t.addEventListener("waiting",this._onWaiting),t.addEventListener("error",this._onError)}s.prototype={_createMuxer(){this._muxer=new o(this._file),this._muxer.on("ready",(e=>{this._tracks=e.map((e=>{const t=this._elemWrapper.createWriteStream(e.mime);t.on("error",(e=>{this._elemWrapper.error(e)}));const n={muxed:null,mediaSource:t,initFlushed:!1,onInitFlushed:null};return t.write(e.init,(e=>{n.initFlushed=!0,n.onInitFlushed&&n.onInitFlushed(e)})),n})),(this._waitingFired||"auto"===this._elem.preload)&&this._pump()})),this._muxer.on("error",(e=>{this._elemWrapper.error(e)}))},_pump(){const e=this._muxer.seek(this._elem.currentTime,!this._tracks);this._tracks.forEach(((t,n)=>{const i=()=>{t.muxed&&(t.muxed.destroy(),t.mediaSource=this._elemWrapper.createWriteStream(t.mediaSource),t.mediaSource.on("error",(e=>{this._elemWrapper.error(e)}))),t.muxed=e[n],r(t.muxed,t.mediaSource)};t.initFlushed?i():t.onInitFlushed=e=>{e?this._elemWrapper.error(e):i()}}))},destroy(){this.destroyed||(this.destroyed=!0,this._elem.removeEventListener("waiting",this._onWaiting),this._elem.removeEventListener("error",this._onError),this._tracks&&this._tracks.forEach((e=>{e.muxed&&e.muxed.destroy()})),this._elem.src="")}},t.exports=s},{"./mp4-remuxer":307,mediasource:125,pump:188}],309:[function(e,t,n){(function(n,i,r){(function(){
|
||
/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||
const{EventEmitter:o}=e("events"),s=e("simple-concat"),a=e("create-torrent"),c=e("debug")("webtorrent"),l=e("bittorrent-dht/client"),p=e("load-ip-set"),u=e("run-parallel"),d=e("parse-torrent"),f=e("path"),h=e("simple-peer"),m=e("randombytes"),g=e("speedometer"),v=e("./lib/conn-pool"),b=e("./lib/torrent"),x=e("./package.json").version,y=x.replace(/\d*./g,(e=>("0"+e%100).slice(-2))).slice(0,4),_=`-WW${y}-`;class w extends o{constructor(e={}){super(),"string"==typeof e.peerId?this.peerId=e.peerId:r.isBuffer(e.peerId)?this.peerId=e.peerId.toString("hex"):this.peerId=r.from(_+m(9).toString("base64")).toString("hex"),this.peerIdBuffer=r.from(this.peerId,"hex"),"string"==typeof e.nodeId?this.nodeId=e.nodeId:r.isBuffer(e.nodeId)?this.nodeId=e.nodeId.toString("hex"):this.nodeId=m(20).toString("hex"),this.nodeIdBuffer=r.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=e.torrentPort||0,this.dhtPort=e.dhtPort||0,this.tracker=void 0!==e.tracker?e.tracker:{},this.torrents=[],this.maxConns=Number(e.maxConns)||55,this.utp=!0===e.utp,this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),e.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),this.tracker.rtcConfig=e.rtcConfig),e.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),this.tracker.wrtc=e.wrtc),i.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=i.WRTC)),"function"==typeof v?this._connPool=new v(this):n.nextTick((()=>{this._onListening()})),this._downloadSpeed=g(),this._uploadSpeed=g(),!1!==e.dht&&"function"==typeof l?(this.dht=new l(Object.assign({},{nodeId:this.nodeId},e.dht)),this.dht.once("error",(e=>{this._destroy(e)})),this.dht.once("listening",(()=>{const e=this.dht.address();e&&(this.dhtPort=e.port)})),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==e.webSeeds;const t=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof p&&null!=e.blocklist?p(e.blocklist,{headers:{"user-agent":`WebTorrent/${x} (https://webtorrent.io)`}},((e,n)=>{if(e)return this.error("Failed to load blocklist: "+e.message);this.blocked=n,t()})):n.nextTick(t)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const e=this.torrents.filter((e=>1!==e.progress));return e.reduce(((e,t)=>e+t.downloaded),0)/(e.reduce(((e,t)=>e+(t.length||0)),0)||1)}get ratio(){return this.torrents.reduce(((e,t)=>e+t.uploaded),0)/(this.torrents.reduce(((e,t)=>e+t.received),0)||1)}get(e){if(e instanceof b){if(this.torrents.includes(e))return e}else{let t;try{t=d(e)}catch(e){}if(!t)return null;if(!t.infoHash)throw new Error("Invalid torrent identifier");for(const e of this.torrents)if(e.infoHash===t.infoHash)return e}return null}download(e,t,n){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(e,t,n)}add(e,t={},n=(()=>{})){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]);const i=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===o.infoHash&&e!==o)return void o._destroy(new Error("Cannot add duplicate torrent "+o.infoHash))},r=()=>{this.destroyed||(n(o),this.emit("torrent",o))};this._debug("add"),t=t?Object.assign({},t):{};const o=new b(e,this,t);return this.torrents.push(o),o.once("_infoHash",i),o.once("ready",r),o.once("close",(function e(){o.removeListener("_infoHash",i),o.removeListener("ready",r),o.removeListener("close",e)})),o}seed(e,t,n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]),this._debug("seed"),(t=t?Object.assign({},t):{}).skipVerify=!0;const i="string"==typeof e;i&&(t.path=f.dirname(e)),t.createdBy||(t.createdBy="WebTorrent/"+y);const r=e=>{this._debug("on seed"),"function"==typeof n&&n(e),e.emit("seed"),this.emit("seed",e)},o=this.add(null,t,(e=>{const t=[t=>{if(i)return t();e.load(c,t)}];this.dht&&t.push((t=>{e.once("dhtAnnounce",t)})),u(t,(t=>{if(!this.destroyed)return t?e._destroy(t):void r(e)}))}));let c;var l;return l=e,"undefined"!=typeof FileList&&l instanceof FileList?e=Array.from(e):Array.isArray(e)||(e=[e]),u(e.map((e=>t=>{!function(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}(e)?t(null,e):s(e,t)})),((e,n)=>{if(!this.destroyed)return e?o._destroy(e):void a.parseInput(n,t,((e,i)=>{if(!this.destroyed){if(e)return o._destroy(e);c=i.map((e=>e.getStream)),a(n,t,((e,t)=>{if(this.destroyed)return;if(e)return o._destroy(e);const n=this.get(t);n?o._destroy(new Error("Cannot add duplicate torrent "+n.infoHash)):o._onTorrentId(t)}))}}))})),o}remove(e,t,n){if("function"==typeof t)return this.remove(e,null,t);this._debug("remove");if(!this.get(e))throw new Error("No torrent with id "+e);this._remove(e,t,n)}_remove(e,t,n){if("function"==typeof t)return this._remove(e,null,t);const i=this.get(e);i&&(this.torrents.splice(this.torrents.indexOf(i),1),i.destroy(t,n))}address(){return this.listening?this._connPool?this._connPool.tcpServer.address():{address:"0.0.0.0",family:"IPv4",port:0}:null}destroy(e){if(this.destroyed)throw new Error("client already destroyed");this._destroy(null,e)}_destroy(e,t){this._debug("client destroy"),this.destroyed=!0;const n=this.torrents.map((e=>t=>{e.destroy(t)}));this._connPool&&n.push((e=>{this._connPool.destroy(e)})),this.dht&&n.push((e=>{this.dht.destroy(e)})),u(n,t),e&&this.emit("error",e),this.torrents=[],this._connPool=null,this.dht=null}_onListening(){if(this._debug("listening"),this.listening=!0,this._connPool){const e=this._connPool.tcpServer.address();e&&(this.torrentPort=e.port)}this.emit("listening")}_debug(){const e=[].slice.call(arguments);e[0]=`[${this._debugId}] ${e[0]}`,c(...e)}}w.WEBRTC_SUPPORT=h.WEBRTC_SUPPORT,w.VERSION=x,t.exports=w}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./lib/conn-pool":55,"./lib/torrent":314,"./package.json":334,_process:187,"bittorrent-dht/client":55,buffer:60,"create-torrent":80,debug:316,events:98,"load-ip-set":55,"parse-torrent":184,path:185,randombytes:195,"run-parallel":218,"simple-concat":221,"simple-peer":223,speedometer:263}],310:[function(e,t,n){const i=e("debug")("webtorrent:file-stream"),r=e("readable-stream");class o extends r.Readable{constructor(e,t){super(t),this.destroyed=!1,this._torrent=e._torrent;const n=t&&t.start||0,i=t&&t.end&&t.end<e.length?t.end:e.length-1,r=e._torrent.pieceLength;this._startPiece=(n+e.offset)/r|0,this._endPiece=(i+e.offset)/r|0,this._piece=this._startPiece,this._offset=n+e.offset-this._startPiece*r,this._missing=i-n+1,this._reading=!1,this._notifying=!1,this._criticalLength=Math.min(1048576/r|0,2)}_read(){this._reading||(this._reading=!0,this._notify())}_notify(){if(!this._reading||0===this._missing)return;if(!this._torrent.bitfield.get(this._piece))return this._torrent.critical(this._piece,this._piece+this._criticalLength);if(this._notifying)return;if(this._notifying=!0,this._torrent.destroyed)return this._destroy(new Error("Torrent removed"));const e=this._piece;this._torrent.store.get(e,((t,n)=>{if(this._notifying=!1,!this.destroyed){if(i("read %s (length %s) (err %s)",e,n.length,t&&t.message),t)return this._destroy(t);this._offset&&(n=n.slice(this._offset),this._offset=0),this._missing<n.length&&(n=n.slice(0,this._missing)),this._missing-=n.length,i("pushing buffer of length %s",n.length),this._reading=!1,this.push(n),0===this._missing&&this.push(null)}})),this._piece+=1}destroy(e){this._destroy(null,e)}_destroy(e,t){this.destroyed||(this.destroyed=!0,this._torrent.destroyed||this._torrent.deselect(this._startPiece,this._endPiece,!0),e&&this.emit("error",e),this.emit("close"),t&&t())}}t.exports=o},{debug:316,"readable-stream":333}],311:[function(e,t,n){(function(n){(function(){const{EventEmitter:i}=e("events"),{PassThrough:r}=e("readable-stream"),o=e("end-of-stream"),s=e("path"),a=e("render-media"),c=e("stream-to-blob"),l=e("stream-to-blob-url"),p=e("stream-with-known-length-to-buffer"),u=e("./file-stream");t.exports=class extends i{constructor(e,t){super(),this._torrent=e,this._destroyed=!1,this.name=t.name,this.path=t.path,this.length=t.length,this.offset=t.offset,this.done=!1;const n=t.offset,i=n+t.length-1;this._startPiece=n/this._torrent.pieceLength|0,this._endPiece=i/this._torrent.pieceLength|0,0===this.length&&(this.done=!0,this.emit("done"))}get downloaded(){if(!this._torrent.bitfield)return 0;const{pieces:e,bitfield:t,pieceLength:n}=this._torrent,{_startPiece:i,_endPiece:r}=this,o=e[i],s=this.offset%n;let a=t.get(i)?n-s:Math.max(n-s-o.missing,0);for(let o=i+1;o<=r;++o)if(t.get(o))a+=n;else{a+=n-e[o].missing}return Math.min(a,this.length)}get progress(){return this.length?this.downloaded/this.length:0}select(e){0!==this.length&&this._torrent.select(this._startPiece,this._endPiece,e)}deselect(){0!==this.length&&this._torrent.deselect(this._startPiece,this._endPiece,!1)}createReadStream(e){if(0===this.length){const e=new r;return n.nextTick((()=>{e.end()})),e}const t=new u(this,e);return this._torrent.select(t._startPiece,t._endPiece,!0,(()=>{t._notify()})),o(t,(()=>{this._destroyed||this._torrent.destroyed||this._torrent.deselect(t._startPiece,t._endPiece,!0)})),t}getBuffer(e){p(this.createReadStream(),this.length,e)}getBlob(e){if("undefined"==typeof window)throw new Error("browser-only method");c(this.createReadStream(),this._getMimeType()).then((t=>e(null,t)),(t=>e(t)))}getBlobURL(e){if("undefined"==typeof window)throw new Error("browser-only method");l(this.createReadStream(),this._getMimeType()).then((t=>e(null,t)),(t=>e(t)))}appendTo(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");a.append(this,e,t,n)}renderTo(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");a.render(this,e,t,n)}_getMimeType(){return a.mime[s.extname(this.name).toLowerCase()]}_destroy(){this._destroyed=!0,this._torrent=null}}}).call(this)}).call(this,e("_process"))},{"./file-stream":310,_process:187,"end-of-stream":96,events:98,path:185,"readable-stream":333,"render-media":212,"stream-to-blob":284,"stream-to-blob-url":283,"stream-with-known-length-to-buffer":285}],312:[function(e,t,n){const i=e("unordered-array-remove"),r=e("debug")("webtorrent:peer"),o=e("bittorrent-protocol"),s=e("./webconn");n.createWebRTCPeer=(e,t)=>{const n=new l(e.id,"webrtc");return n.conn=e,n.swarm=t,n.conn.connected?n.onConnect():(n.conn.once("connect",(()=>{n.onConnect()})),n.conn.once("error",(e=>{n.destroy(e)})),n.startConnectTimeout()),n},n.createTCPIncomingPeer=e=>a(e,"tcpIncoming"),n.createUTPIncomingPeer=e=>a(e,"utpIncoming"),n.createTCPOutgoingPeer=(e,t)=>c(e,t,"tcpOutgoing"),n.createUTPOutgoingPeer=(e,t)=>c(e,t,"utpOutgoing");const a=(e,t)=>{const n=`${e.remoteAddress}:${e.remotePort}`,i=new l(n,t);return i.conn=e,i.addr=n,i.onConnect(),i},c=(e,t,n)=>{const i=new l(e,n);return i.addr=e,i.swarm=t,i};n.createWebSeedPeer=(e,t)=>{const n=new l(e,"webSeed");return n.swarm=t,n.conn=new s(e,t),n.onConnect(),n};class l{constructor(e,t){this.id=e,this.type=t,r("new %s Peer %s",t,e),this.addr=null,this.conn=null,this.swarm=null,this.wire=null,this.connected=!1,this.destroyed=!1,this.timeout=null,this.retries=0,this.sentHandshake=!1}onConnect(){if(this.destroyed)return;this.connected=!0,r("Peer %s connected",this.id),clearTimeout(this.connectTimeout);const e=this.conn;e.once("end",(()=>{this.destroy()})),e.once("close",(()=>{this.destroy()})),e.once("finish",(()=>{this.destroy()})),e.once("error",(e=>{this.destroy(e)}));const t=this.wire=new o;t.type=this.type,t.once("end",(()=>{this.destroy()})),t.once("close",(()=>{this.destroy()})),t.once("finish",(()=>{this.destroy()})),t.once("error",(e=>{this.destroy(e)})),t.once("handshake",((e,t)=>{this.onHandshake(e,t)})),this.startHandshakeTimeout(),e.pipe(t).pipe(e),this.swarm&&!this.sentHandshake&&this.handshake()}onHandshake(e,t){if(!this.swarm)return;if(this.destroyed)return;if(this.swarm.destroyed)return this.destroy(new Error("swarm already destroyed"));if(e!==this.swarm.infoHash)return this.destroy(new Error("unexpected handshake info hash for this swarm"));if(t===this.swarm.peerId)return this.destroy(new Error("refusing to connect to ourselves"));r("Peer %s got handshake %s",this.id,e),clearTimeout(this.handshakeTimeout),this.retries=0;let n=this.addr;!n&&this.conn.remoteAddress&&this.conn.remotePort&&(n=`${this.conn.remoteAddress}:${this.conn.remotePort}`),this.swarm._onWire(this.wire,n),this.swarm&&!this.swarm.destroyed&&(this.sentHandshake||this.handshake())}handshake(){const e={dht:!this.swarm.private&&!!this.swarm.client.dht};this.wire.handshake(this.swarm.infoHash,this.swarm.client.peerId,e),this.sentHandshake=!0}startConnectTimeout(){clearTimeout(this.connectTimeout);const e={webrtc:25e3,tcpOutgoing:5e3,utpOutgoing:5e3};this.connectTimeout=setTimeout((()=>{this.destroy(new Error("connect timeout"))}),e[this.type]),this.connectTimeout.unref&&this.connectTimeout.unref()}startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.handshakeTimeout=setTimeout((()=>{this.destroy(new Error("handshake timeout"))}),25e3),this.handshakeTimeout.unref&&this.handshakeTimeout.unref()}destroy(e){if(this.destroyed)return;this.destroyed=!0,this.connected=!1,r("destroy %s %s (error: %s)",this.type,this.id,e&&(e.message||e)),clearTimeout(this.connectTimeout),clearTimeout(this.handshakeTimeout);const t=this.swarm,n=this.conn,o=this.wire;this.swarm=null,this.conn=null,this.wire=null,t&&o&&i(t.wires,t.wires.indexOf(o)),n&&(n.on("error",(()=>{})),n.destroy()),o&&o.destroy(),t&&t.removePeer(this.id)}}},{"./webconn":315,"bittorrent-protocol":11,debug:316,"unordered-array-remove":298}],313:[function(e,t,n){t.exports=class{constructor(e){this._torrent=e,this._numPieces=e.pieces.length,this._pieces=new Array(this._numPieces),this._onWire=e=>{this.recalculate(),this._initWire(e)},this._onWireHave=e=>{this._pieces[e]+=1},this._onWireBitfield=()=>{this.recalculate()},this._torrent.wires.forEach((e=>{this._initWire(e)})),this._torrent.on("wire",this._onWire),this.recalculate()}getRarestPiece(e){let t=[],n=1/0;for(let i=0;i<this._numPieces;++i){if(e&&!e(i))continue;const r=this._pieces[i];r===n?t.push(i):r<n&&(t=[i],n=r)}return t.length?t[Math.random()*t.length|0]:-1}destroy(){this._torrent.removeListener("wire",this._onWire),this._torrent.wires.forEach((e=>{this._cleanupWireEvents(e)})),this._torrent=null,this._pieces=null,this._onWire=null,this._onWireHave=null,this._onWireBitfield=null}_initWire(e){e._onClose=()=>{this._cleanupWireEvents(e);for(let t=0;t<this._numPieces;++t)this._pieces[t]-=e.peerPieces.get(t)},e.on("have",this._onWireHave),e.on("bitfield",this._onWireBitfield),e.once("close",e._onClose)}recalculate(){this._pieces.fill(0);for(const e of this._torrent.wires)for(let t=0;t<this._numPieces;++t)this._pieces[t]+=e.peerPieces.get(t)}_cleanupWireEvents(e){e.removeListener("have",this._onWireHave),e.removeListener("bitfield",this._onWireBitfield),e._onClose&&e.removeListener("close",e._onClose),e._onClose=null}}},{}],314:[function(e,t,n){(function(n,i){(function(){const r=e("addr-to-ip-port"),o=e("bitfield"),s=e("chunk-store-stream/write"),a=e("debug")("webtorrent:torrent"),c=e("torrent-discovery"),l=e("events").EventEmitter,p=e("fs"),u=e("fs-chunk-store"),d=e("simple-get"),f=e("immediate-chunk-store"),h=e("multistream"),m=e("net"),g=e("os"),v=e("run-parallel"),b=e("run-parallel-limit"),x=e("parse-torrent"),y=e("path"),_=e("torrent-piece"),w=e("pump"),k=e("random-iterate"),E=e("simple-sha1"),S=e("speedometer"),C=e("ut_metadata"),T=e("ut_pex"),j=e("utp-native"),A=e("./file"),L=e("./peer"),I=e("./rarity-map"),O=e("./server"),R=5e3,B=3*_.BLOCK_LENGTH,U=n.browser?1/0:2,M=[1e3,5e3,15e3],P=`WebTorrent/${e("../package.json").version} (https://webtorrent.io)`;let N;try{N=y.join(p.statSync("/tmp")&&"/tmp","webtorrent")}catch(e){N=y.join("function"==typeof g.tmpdir?g.tmpdir():"/","webtorrent")}function D(e,t){return 2+Math.ceil(t*e.downloadSpeed()/_.BLOCK_LENGTH)}function q(){}t.exports=class extends l{constructor(e,t,n){super(),this._debugId="unknown infohash",this.client=t,this.announce=n.announce,this.urlList=n.urlList,this.path=n.path,this.skipVerify=!!n.skipVerify,this._store=n.store||u,this._getAnnounceOpts=n.getAnnounceOpts,"boolean"==typeof n.private&&(this.private=n.private),this.strategy=n.strategy||"sequential",this.maxWebConns=n.maxWebConns||4,this._rechokeNumSlots=!1===n.uploads||0===n.uploads?0:+n.uploads||10,this._rechokeOptimisticWire=null,this._rechokeOptimisticTime=0,this._rechokeIntervalId=null,this.ready=!1,this.destroyed=!1,this.paused=!1,this.done=!1,this.metadata=null,this.store=null,this.files=[],this.pieces=[],this._amInterested=!1,this._selections=[],this._critical=[],this.wires=[],this._queue=[],this._peers={},this._peersLength=0,this.received=0,this.uploaded=0,this._downloadSpeed=S(),this._uploadSpeed=S(),this._servers=[],this._xsRequests=[],this._fileModtimes=n.fileModtimes,null!==e&&this._onTorrentId(e),this._debug("new torrent")}get timeRemaining(){return this.done?0:0===this.downloadSpeed?1/0:(this.length-this.downloaded)/this.downloadSpeed*1e3}get downloaded(){if(!this.bitfield)return 0;let e=0;for(let t=0,n=this.pieces.length;t<n;++t)if(this.bitfield.get(t))e+=t===n-1?this.lastPieceLength:this.pieceLength;else{const n=this.pieces[t];e+=n.length-n.missing}return e}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){return this.length?this.downloaded/this.length:0}get ratio(){return this.uploaded/(this.received||this.length)}get numPeers(){return this.wires.length}get torrentFileBlobURL(){if("undefined"==typeof window)throw new Error("browser-only property");return this.torrentFile?URL.createObjectURL(new Blob([this.torrentFile],{type:"application/x-bittorrent"})):null}get _numQueued(){return this._queue.length+(this._peersLength-this._numConns)}get _numConns(){let e=0;for(const t in this._peers)this._peers[t].connected&&(e+=1);return e}get swarm(){return console.warn("WebTorrent: `torrent.swarm` is deprecated. Use `torrent` directly instead."),this}_onTorrentId(e){if(this.destroyed)return;let t;try{t=x(e)}catch(e){}t?(this.infoHash=t.infoHash,this._debugId=t.infoHash.toString("hex").substring(0,7),n.nextTick((()=>{this.destroyed||this._onParsedTorrent(t)}))):x.remote(e,((e,t)=>{if(!this.destroyed)return e?this._destroy(e):void this._onParsedTorrent(t)}))}_onParsedTorrent(e){if(!this.destroyed){if(this._processParsedTorrent(e),!this.infoHash)return this._destroy(new Error("Malformed torrent data: No info hash"));this.path||(this.path=y.join(N,this.infoHash)),this._rechokeIntervalId=setInterval((()=>{this._rechoke()}),1e4),this._rechokeIntervalId.unref&&this._rechokeIntervalId.unref(),this.emit("_infoHash",this.infoHash),this.destroyed||(this.emit("infoHash",this.infoHash),this.destroyed||(this.client.listening?this._onListening():this.client.once("listening",(()=>{this._onListening()}))))}}_processParsedTorrent(e){this._debugId=e.infoHash.toString("hex").substring(0,7),void 0!==this.private&&(e.private=this.private),this.announce&&(e.announce=e.announce.concat(this.announce)),this.client.tracker&&i.WEBTORRENT_ANNOUNCE&&!e.private&&(e.announce=e.announce.concat(i.WEBTORRENT_ANNOUNCE)),this.urlList&&(e.urlList=e.urlList.concat(this.urlList)),e.announce=Array.from(new Set(e.announce)),e.urlList=Array.from(new Set(e.urlList)),Object.assign(this,e),this.magnetURI=x.toMagnetURI(e),this.torrentFile=x.toTorrentFile(e)}_onListening(){this.destroyed||(this.info?this._onMetadata(this):(this.xs&&this._getMetadataFromServer(),this._startDiscovery()))}_startDiscovery(){if(this.discovery||this.destroyed)return;let e=this.client.tracker;e&&(e=Object.assign({},this.client.tracker,{getAnnounceOpts:()=>{const e={uploaded:this.uploaded,downloaded:this.downloaded,left:Math.max(this.length-this.downloaded,0)};return this.client.tracker.getAnnounceOpts&&Object.assign(e,this.client.tracker.getAnnounceOpts()),this._getAnnounceOpts&&Object.assign(e,this._getAnnounceOpts()),e}})),this.peerAddresses&&this.peerAddresses.forEach((e=>this.addPeer(e))),this.discovery=new c({infoHash:this.infoHash,announce:this.announce,peerId:this.client.peerId,dht:!this.private&&this.client.dht,tracker:e,port:this.client.torrentPort,userAgent:P}),this.discovery.on("error",(e=>{this._destroy(e)})),this.discovery.on("peer",(e=>{"string"==typeof e&&this.done||this.addPeer(e)})),this.discovery.on("trackerAnnounce",(()=>{this.emit("trackerAnnounce"),0===this.numPeers&&this.emit("noPeers","tracker")})),this.discovery.on("dhtAnnounce",(()=>{this.emit("dhtAnnounce"),0===this.numPeers&&this.emit("noPeers","dht")})),this.discovery.on("warning",(e=>{this.emit("warning",e)}))}_getMetadataFromServer(){const e=this,t=(Array.isArray(this.xs)?this.xs:[this.xs]).map((t=>n=>{!function(t,n){if(0!==t.indexOf("http://")&&0!==t.indexOf("https://"))return e.emit("warning",new Error("skipping non-http xs param: "+t)),n(null);const i={url:t,method:"GET",headers:{"user-agent":P}};let r;try{r=d.concat(i,o)}catch(i){return e.emit("warning",new Error("skipping invalid url xs param: "+t)),n(null)}function o(i,r,o){if(e.destroyed)return n(null);if(e.metadata)return n(null);if(i)return e.emit("warning",new Error("http error from xs param: "+t)),n(null);if(200!==r.statusCode)return e.emit("warning",new Error(`non-200 status code ${r.statusCode} from xs param: ${t}`)),n(null);let s;try{s=x(o)}catch(i){}return s?s.infoHash!==e.infoHash?(e.emit("warning",new Error("got torrent file with incorrect info hash from xs param: "+t)),n(null)):(e._onMetadata(s),void n(null)):(e.emit("warning",new Error("got invalid torrent file from xs param: "+t)),n(null))}e._xsRequests.push(r)}(t,n)}));v(t)}_onMetadata(e){if(this.metadata||this.destroyed)return;let t;if(this._debug("got metadata"),this._xsRequests.forEach((e=>{e.abort()})),this._xsRequests=[],e&&e.infoHash)t=e;else try{t=x(e)}catch(e){return this._destroy(e)}if(this._processParsedTorrent(t),this.metadata=this.torrentFile,this.client.enableWebSeeds&&this.urlList.forEach((e=>{this.addWebSeed(e)})),this._rarityMap=new I(this),this.store=new f(new this._store(this.pieceLength,{torrent:{infoHash:this.infoHash},files:this.files.map((e=>({path:y.join(this.path,e.path),length:e.length,offset:e.offset}))),length:this.length,name:this.infoHash})),this.files=this.files.map((e=>new A(this,e))),this.so?this.files.forEach(((e,t)=>{this.so.includes(t)?this.files[t].select():this.files[t].deselect()})):0!==this.pieces.length&&this.select(0,this.pieces.length-1,!1),this._hashes=this.pieces,this.pieces=this.pieces.map(((e,t)=>{const n=t===this.pieces.length-1?this.lastPieceLength:this.pieceLength;return new _(n)})),this._reservations=this.pieces.map((()=>[])),this.bitfield=new o(this.pieces.length),this.wires.forEach((e=>{e.ut_metadata&&e.ut_metadata.setMetadata(this.metadata),this._onWireWithMetadata(e)})),this.emit("metadata"),!this.destroyed)if(this.skipVerify)this._markAllVerified(),this._onStore();else{const e=e=>{if(e)return this._destroy(e);this._debug("done verifying"),this._onStore()};this._debug("verifying existing torrent data"),this._fileModtimes&&this._store===u?this.getFileModtimes(((t,n)=>{if(t)return this._destroy(t);this.files.map(((e,t)=>n[t]===this._fileModtimes[t])).every((e=>e))?(this._markAllVerified(),this._onStore()):this._verifyPieces(e)})):this._verifyPieces(e)}}getFileModtimes(e){const t=[];b(this.files.map(((e,n)=>i=>{p.stat(y.join(this.path,e.path),((e,r)=>{if(e&&"ENOENT"!==e.code)return i(e);t[n]=r&&r.mtime.getTime(),i(null)}))})),U,(n=>{this._debug("done getting file modtimes"),e(n,t)}))}_verifyPieces(e){b(this.pieces.map(((e,t)=>e=>{if(this.destroyed)return e(new Error("torrent is destroyed"));this.store.get(t,((i,r)=>this.destroyed?e(new Error("torrent is destroyed")):i?n.nextTick(e,null):void E(r,(n=>{if(this.destroyed)return e(new Error("torrent is destroyed"));if(n===this._hashes[t]){if(!this.pieces[t])return e(null);this._debug("piece verified %s",t),this._markVerified(t)}else this._debug("piece invalid %s",t);e(null)}))))})),U,e)}rescanFiles(e){if(this.destroyed)throw new Error("torrent is destroyed");e||(e=q),this._verifyPieces((t=>{if(t)return this._destroy(t),e(t);this._checkDone(),e(null)}))}_markAllVerified(){for(let e=0;e<this.pieces.length;e++)this._markVerified(e)}_markVerified(e){this.pieces[e]=null,this._reservations[e]=null,this.bitfield.set(e,!0)}_onStore(){this.destroyed||(this._debug("on store"),this._startDiscovery(),this.ready=!0,this.emit("ready"),this._checkDone(),this._updateSelections())}destroy(e,t){if("function"==typeof e)return this.destroy(null,e);this._destroy(null,e,t)}_destroy(e,t,n){if("function"==typeof t)return this._destroy(e,null,t);if(this.destroyed)return;this.destroyed=!0,this._debug("destroy"),this.client._remove(this),clearInterval(this._rechokeIntervalId),this._xsRequests.forEach((e=>{e.abort()})),this._rarityMap&&this._rarityMap.destroy();for(const e in this._peers)this.removePeer(e);this.files.forEach((e=>{e instanceof A&&e._destroy()}));const i=this._servers.map((e=>t=>{e.destroy(t)}));this.discovery&&i.push((e=>{this.discovery.destroy(e)})),this.store&&i.push((e=>{t&&t.destroyStore?this.store.destroy(e):this.store.close(e)})),v(i,n),e&&(0===this.listenerCount("error")?this.client.emit("error",e):this.emit("error",e)),this.emit("close"),this.client=null,this.files=[],this.discovery=null,this.store=null,this._rarityMap=null,this._peers=null,this._servers=null,this._xsRequests=null}addPeer(e){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.infoHash)throw new Error("addPeer() must not be called before the `infoHash` event");if(this.client.blocked){let t;if("string"==typeof e){let n;try{n=r(e)}catch(t){return this._debug("ignoring peer: invalid %s",e),this.emit("invalidPeer",e),!1}t=n[0]}else"string"==typeof e.remoteAddress&&(t=e.remoteAddress);if(t&&this.client.blocked.contains(t))return this._debug("ignoring peer: blocked %s",e),"string"!=typeof e&&e.destroy(),this.emit("blockedPeer",e),!1}const t=!!this._addPeer(e,this.client.utp?"utp":"tcp");return t?this.emit("peer",e):this.emit("invalidPeer",e),t}_addPeer(e,t){if(this.destroyed)return"string"!=typeof e&&e.destroy(),null;if("string"==typeof e&&!this._validAddr(e))return this._debug("ignoring peer: invalid %s",e),null;const n=e&&e.id||e;if(this._peers[n])return this._debug("ignoring peer: duplicate (%s)",n),"string"!=typeof e&&e.destroy(),null;if(this.paused)return this._debug("ignoring peer: torrent is paused"),"string"!=typeof e&&e.destroy(),null;let i;return this._debug("add peer %s",n),i="string"==typeof e?"utp"===t?L.createUTPOutgoingPeer(e,this):L.createTCPOutgoingPeer(e,this):L.createWebRTCPeer(e,this),this._peers[i.id]=i,this._peersLength+=1,"string"==typeof e&&(this._queue.push(i),this._drain()),i}addWebSeed(e){if(this.destroyed)throw new Error("torrent is destroyed");if(!/^https?:\/\/.+/.test(e))return this.emit("warning",new Error("ignoring invalid web seed: "+e)),void this.emit("invalidPeer",e);if(this._peers[e])return this.emit("warning",new Error("ignoring duplicate web seed: "+e)),void this.emit("invalidPeer",e);this._debug("add web seed %s",e);const t=L.createWebSeedPeer(e,this);this._peers[t.id]=t,this._peersLength+=1,this.emit("peer",e)}_addIncomingPeer(e){return this.destroyed?e.destroy(new Error("torrent is destroyed")):this.paused?e.destroy(new Error("torrent is paused")):(this._debug("add incoming peer %s",e.id),this._peers[e.id]=e,void(this._peersLength+=1))}removePeer(e){const t=e&&e.id||e;(e=this._peers[t])&&(this._debug("removePeer %s",t),delete this._peers[t],this._peersLength-=1,e.destroy(),this._drain())}select(e,t,n,i){if(this.destroyed)throw new Error("torrent is destroyed");if(e<0||t<e||this.pieces.length<=t)throw new Error(`invalid selection ${e} : ${t}`);n=Number(n)||0,this._debug("select %s-%s (priority %s)",e,t,n),this._selections.push({from:e,to:t,offset:0,priority:n,notify:i||q}),this._selections.sort(((e,t)=>t.priority-e.priority)),this._updateSelections()}deselect(e,t,n){if(this.destroyed)throw new Error("torrent is destroyed");n=Number(n)||0,this._debug("deselect %s-%s (priority %s)",e,t,n);for(let i=0;i<this._selections.length;++i){const r=this._selections[i];if(r.from===e&&r.to===t&&r.priority===n){this._selections.splice(i,1);break}}this._updateSelections()}critical(e,t){if(this.destroyed)throw new Error("torrent is destroyed");this._debug("critical %s-%s",e,t);for(let n=e;n<=t;++n)this._critical[n]=!0;this._updateSelections()}_onWire(e,t){if(this._debug("got wire %s (%s)",e._debugId,t||"Unknown"),e.on("download",(e=>{this.destroyed||(this.received+=e,this._downloadSpeed(e),this.client._downloadSpeed(e),this.emit("download",e),this.destroyed||this.client.emit("download",e))})),e.on("upload",(e=>{this.destroyed||(this.uploaded+=e,this._uploadSpeed(e),this.client._uploadSpeed(e),this.emit("upload",e),this.destroyed||this.client.emit("upload",e))})),this.wires.push(e),t){const n=r(t);e.remoteAddress=n[0],e.remotePort=n[1]}this.client.dht&&this.client.dht.listening&&e.on("port",(n=>{if(!this.destroyed&&!this.client.dht.destroyed){if(!e.remoteAddress)return this._debug("ignoring PORT from peer with no address");if(0===n||n>65536)return this._debug("ignoring invalid PORT from peer");this._debug("port: %s (from %s)",n,t),this.client.dht.addNode({host:e.remoteAddress,port:n})}})),e.on("timeout",(()=>{this._debug("wire timeout (%s)",t),e.destroy()})),e.setTimeout(3e4,!0),e.setKeepAlive(!0),e.use(C(this.metadata)),e.ut_metadata.on("warning",(e=>{this._debug("ut_metadata warning: %s",e.message)})),this.metadata||(e.ut_metadata.on("metadata",(e=>{this._debug("got metadata via ut_metadata"),this._onMetadata(e)})),e.ut_metadata.fetch()),"function"!=typeof T||this.private||(e.use(T()),e.ut_pex.on("peer",(e=>{this.done||(this._debug("ut_pex: got peer: %s (from %s)",e,t),this.addPeer(e))})),e.ut_pex.on("dropped",(e=>{const n=this._peers[e];n&&!n.connected&&(this._debug("ut_pex: dropped peer: %s (from %s)",e,t),this.removePeer(e))})),e.once("close",(()=>{e.ut_pex.reset()}))),this.emit("wire",e,t),this.metadata&&n.nextTick((()=>{this._onWireWithMetadata(e)}))}_onWireWithMetadata(e){let t=null;const n=()=>{this.destroyed||e.destroyed||(this._numQueued>2*(this._numConns-this.numPeers)&&e.amInterested?e.destroy():(t=setTimeout(n,R),t.unref&&t.unref()))};let i;const r=()=>{if(e.peerPieces.buffer.length===this.bitfield.buffer.length){for(i=0;i<this.pieces.length;++i)if(!e.peerPieces.get(i))return;e.isSeeder=!0,e.choke()}};e.on("bitfield",(()=>{r(),this._update(),this._updateWireInterest(e)})),e.on("have",(()=>{r(),this._update(),this._updateWireInterest(e)})),e.once("interested",(()=>{e.unchoke()})),e.once("close",(()=>{clearTimeout(t)})),e.on("choke",(()=>{clearTimeout(t),t=setTimeout(n,R),t.unref&&t.unref()})),e.on("unchoke",(()=>{clearTimeout(t),this._update()})),e.on("request",((t,n,i,r)=>{if(i>131072)return e.destroy();this.pieces[t]||this.store.get(t,{offset:n,length:i},r)})),e.bitfield(this.bitfield),this._updateWireInterest(e),e.peerExtensions.dht&&this.client.dht&&this.client.dht.listening&&e.port(this.client.dht.address().port),"webSeed"!==e.type&&(t=setTimeout(n,R),t.unref&&t.unref()),e.isSeeder=!1,r()}_updateSelections(){this.ready&&!this.destroyed&&(n.nextTick((()=>{this._gcSelections()})),this._updateInterest(),this._update())}_gcSelections(){for(let e=0;e<this._selections.length;++e){const t=this._selections[e],n=t.offset;for(;this.bitfield.get(t.from+t.offset)&&t.from+t.offset<t.to;)t.offset+=1;n!==t.offset&&t.notify(),t.to===t.from+t.offset&&(this.bitfield.get(t.from+t.offset)&&(this._selections.splice(e,1),e-=1,t.notify(),this._updateInterest()))}this._selections.length||this.emit("idle")}_updateInterest(){const e=this._amInterested;this._amInterested=!!this._selections.length,this.wires.forEach((e=>this._updateWireInterest(e))),e!==this._amInterested&&(this._amInterested?this.emit("interested"):this.emit("uninterested"))}_updateWireInterest(e){let t=!1;for(let n=0;n<this.pieces.length;++n)if(this.pieces[n]&&e.peerPieces.get(n)){t=!0;break}t?e.interested():e.uninterested()}_update(){if(this.destroyed)return;const e=k(this.wires);let t;for(;t=e();)this._updateWireWrapper(t)}_updateWireWrapper(e){const t=this;"undefined"!=typeof window&&"function"==typeof window.requestIdleCallback?window.requestIdleCallback((function(){t._updateWire(e)}),{timeout:250}):t._updateWire(e)}_updateWire(e){const t=this;if(e.peerChoking)return;if(!e.downloaded)return function(){if(e.requests.length)return;let n=t._selections.length;for(;n--;){const i=t._selections[n];let o;if("rarest"===t.strategy){const n=i.from+i.offset,s=i.to,a=s-n+1,c={};let l=0;const p=r(n,s,c);for(;l<a&&(o=t._rarityMap.getRarestPiece(p),!(o<0));){if(t._request(e,o,!1))return;c[o]=!0,l+=1}}else for(o=i.to;o>=i.from+i.offset;--o)if(e.peerPieces.get(o)&&t._request(e,o,!1))return}}();const n=D(e,.5);if(e.requests.length>=n)return;const i=D(e,1);function r(t,n,i,r){return o=>o>=t&&o<=n&&!(o in i)&&e.peerPieces.get(o)&&(!r||r(o))}function o(e){let n=e;for(let i=e;i<t._selections.length&&t._selections[i].priority;i++)n=i;const i=t._selections[e];t._selections[e]=t._selections[n],t._selections[n]=i}function s(n){if(e.requests.length>=i)return!0;const s=function(){const n=e.downloadSpeed()||1;if(n>B)return()=>!0;const i=Math.max(1,e.requests.length)*_.BLOCK_LENGTH/n;let r=10,o=0;return e=>{if(!r||t.bitfield.get(e))return!0;let s=t.pieces[e].missing;for(;o<t.wires.length;o++){const a=t.wires[o],c=a.downloadSpeed();if(!(c<B)&&!(c<=n)&&a.peerPieces.get(e)&&!((s-=c*i)>0))return r--,!1}return!0}}();for(let a=0;a<t._selections.length;a++){const c=t._selections[a];let l;if("rarest"===t.strategy){const p=c.from+c.offset,u=c.to,d=u-p+1,f={};let h=0;const m=r(p,u,f,s);for(;h<d&&(l=t._rarityMap.getRarestPiece(m),!(l<0));){for(;t._request(e,l,t._critical[l]||n););if(!(e.requests.length<i))return c.priority&&o(a),!0;f[l]=!0,h++}}else for(l=c.from+c.offset;l<=c.to;l++)if(e.peerPieces.get(l)&&s(l)){for(;t._request(e,l,t._critical[l]||n););if(!(e.requests.length<i))return c.priority&&o(a),!0}}return!1}s(!1)||s(!0)}_rechoke(){if(!this.ready)return;const e=this.wires.map((e=>({wire:e,random:Math.random()}))).sort(((e,t)=>{const n=e.wire,i=t.wire;return n.downloadSpeed()!==i.downloadSpeed()?n.downloadSpeed()-i.downloadSpeed():n.uploadSpeed()!==i.uploadSpeed()?n.uploadSpeed()-i.uploadSpeed():n.amChoking!==i.amChoking?n.amChoking?-1:1:e.random-t.random})).map((e=>e.wire));this._rechokeOptimisticTime<=0?this._rechokeOptimisticWire=null:this._rechokeOptimisticTime-=1;let t=0;for(;e.length>0&&t<this._rechokeNumSlots-1;){const n=e.pop();n.isSeeder||n===this._rechokeOptimisticWire||(n.unchoke(),n.peerInterested&&t++)}if(null===this._rechokeOptimisticWire&&this._rechokeNumSlots>0){const t=e.filter((e=>e.peerInterested));if(t.length>0){const e=t[(n=t.length,Math.random()*n|0)];e.unchoke(),this._rechokeOptimisticWire=e,this._rechokeOptimisticTime=2}}var n;e.filter((e=>e!==this._rechokeOptimisticWire)).forEach((e=>e.choke()))}_hotswap(e,t){const n=e.downloadSpeed();if(n<_.BLOCK_LENGTH)return!1;if(!this._reservations[t])return!1;const i=this._reservations[t];if(!i)return!1;let r,o,s=1/0;for(o=0;o<i.length;o++){const t=i[o];if(!t||t===e)continue;const a=t.downloadSpeed();a>=B||(2*a>n||a>s||(r=t,s=a))}if(!r)return!1;for(o=0;o<i.length;o++)i[o]===r&&(i[o]=null);for(o=0;o<r.requests.length;o++){const e=r.requests[o];e.piece===t&&this.pieces[t].cancel(e.offset/_.BLOCK_LENGTH|0)}return this.emit("hotswap",r,e,t),!0}_request(e,t,i){const r=this,o=e.requests.length,s="webSeed"===e.type;if(r.bitfield.get(t))return!1;if(o>=(s?Math.min(function(e,t,n){return 1+Math.ceil(t*e.downloadSpeed()/n)}(e,1,r.pieceLength),r.maxWebConns):D(e,1)))return!1;const a=r.pieces[t];let c=s?a.reserveRemaining():a.reserve();if(-1===c&&i&&r._hotswap(e,t)&&(c=s?a.reserveRemaining():a.reserve()),-1===c)return!1;let l=r._reservations[t];l||(l=r._reservations[t]=[]);let p=l.indexOf(null);-1===p&&(p=l.length),l[p]=e;const u=a.chunkOffset(c),d=s?a.chunkLengthRemaining(c):a.chunkLength(c);function f(){n.nextTick((()=>{r._update()}))}return e.request(t,u,d,(function n(i,o){if(r.destroyed)return;if(!r.ready)return r.once("ready",(()=>{n(i,o)}));if(l[p]===e&&(l[p]=null),a!==r.pieces[t])return f();if(i)return r._debug("error getting piece %s (offset: %s length: %s) from %s: %s",t,u,d,`${e.remoteAddress}:${e.remotePort}`,i.message),s?a.cancelRemaining(c):a.cancel(c),void f();if(r._debug("got piece %s (offset: %s length: %s) from %s",t,u,d,`${e.remoteAddress}:${e.remotePort}`),!a.set(c,o,e))return f();const h=a.flush();E(h,(e=>{if(!r.destroyed){if(e===r._hashes[t]){if(!r.pieces[t])return;r._debug("piece verified %s",t),r.pieces[t]=null,r._reservations[t]=null,r.bitfield.set(t,!0),r.store.put(t,h),r.wires.forEach((e=>{e.have(t)})),r._checkDone()&&!r.destroyed&&r.discovery.complete()}else r.pieces[t]=new _(a.length),r.emit("warning",new Error(`Piece ${t} failed verification`));f()}}))})),!0}_checkDone(){if(this.destroyed)return;this.files.forEach((e=>{if(!e.done){for(let t=e._startPiece;t<=e._endPiece;++t)if(!this.bitfield.get(t))return;e.done=!0,e.emit("done"),this._debug("file done: "+e.name)}}));let e=!0;for(let t=0;t<this._selections.length;t++){const n=this._selections[t];for(let t=n.from;t<=n.to;t++)if(!this.bitfield.get(t)){e=!1;break}if(!e)break}return!this.done&&e&&(this.done=!0,this._debug("torrent done: "+this.infoHash),this.emit("done")),this._gcSelections(),e}load(e,t){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.ready)return this.once("ready",(()=>{this.load(e,t)}));Array.isArray(e)||(e=[e]),t||(t=q);const n=new h(e),i=new s(this.store,this.pieceLength);w(n,i,(e=>{if(e)return t(e);this._markAllVerified(),this._checkDone(),t(null)}))}createServer(e){if("function"!=typeof O)throw new Error("node.js-only method");if(this.destroyed)throw new Error("torrent is destroyed");const t=new O(this,e);return this._servers.push(t),t}pause(){this.destroyed||(this._debug("pause"),this.paused=!0)}resume(){this.destroyed||(this._debug("resume"),this.paused=!1,this._drain())}_debug(){const e=[].slice.call(arguments);e[0]=`[${this.client?this.client._debugId:"No Client"}] [${this._debugId}] ${e[0]}`,a(...e)}_drain(){if(this._debug("_drain numConns %s maxConns %s",this._numConns,this.client.maxConns),"function"!=typeof m.connect||this.destroyed||this.paused||this._numConns>=this.client.maxConns)return;this._debug("drain (%s queued, %s/%s peers)",this._numQueued,this.numPeers,this.client.maxConns);const e=this._queue.shift();if(!e)return;this._debug("%s connect attempt to %s",e.type,e.addr);const t=r(e.addr),n={host:t[0],port:t[1]};"utpOutgoing"===e.type?e.conn=j.connect(n.port,n.host):e.conn=m.connect(n);const i=e.conn;i.once("connect",(()=>{e.onConnect()})),i.once("error",(t=>{e.destroy(t)})),e.startConnectTimeout(),i.on("close",(()=>{if(this.destroyed)return;if(e.retries>=M.length){if(this.client.utp){const t=this._addPeer(e.addr,"tcp");t&&(t.retries=0)}else this._debug("conn %s closed: will not re-add (max %s attempts)",e.addr,M.length);return}const t=M[e.retries];this._debug("conn %s closed: will re-add to queue in %sms (attempt %s)",e.addr,t,e.retries+1);const n=setTimeout((()=>{if(this.destroyed)return;const t=this._addPeer(e.addr,this.client.utp?"utp":"tcp");t&&(t.retries=e.retries+1)}),t);n.unref&&n.unref()}))}_validAddr(e){let t;try{t=r(e)}catch(e){return!1}const n=t[0],i=t[1];return i>0&&i<65535&&!("127.0.0.1"===n&&i===this.client.torrentPort)}}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":334,"./file":311,"./peer":312,"./rarity-map":313,"./server":55,_process:187,"addr-to-ip-port":3,bitfield:10,"chunk-store-stream/write":78,debug:316,events:98,fs:56,"fs-chunk-store":141,"immediate-chunk-store":118,multistream:166,net:55,os:55,"parse-torrent":184,path:185,pump:188,"random-iterate":194,"run-parallel":218,"run-parallel-limit":217,"simple-get":222,"simple-sha1":242,speedometer:263,"torrent-discovery":291,"torrent-piece":295,ut_metadata:301,ut_pex:55,"utp-native":55}],315:[function(e,t,n){(function(n){(function(){const i=e("bitfield"),r=e("debug")("webtorrent:webconn"),o=e("simple-get"),s=e("simple-sha1"),a=e("bittorrent-protocol"),c=e("../package.json").version;t.exports=class extends a{constructor(e,t){super(),this.url=e,this.webPeerId=s.sync(e),this._torrent=t,this._init()}_init(){this.setKeepAlive(!0),this.once("handshake",((e,t)=>{if(this.destroyed)return;this.handshake(e,this.webPeerId);const n=this._torrent.pieces.length,r=new i(n);for(let e=0;e<=n;e++)r.set(e,!0);this.bitfield(r)})),this.once("interested",(()=>{r("interested"),this.unchoke()})),this.on("uninterested",(()=>{r("uninterested")})),this.on("choke",(()=>{r("choke")})),this.on("unchoke",(()=>{r("unchoke")})),this.on("bitfield",(()=>{r("bitfield")})),this.on("request",((e,t,n,i)=>{r("request pieceIndex=%d offset=%d length=%d",e,t,n),this.httpRequest(e,t,n,i)}))}httpRequest(e,t,i,s){const a=e*this._torrent.pieceLength+t,l=a+i-1,p=this._torrent.files;let u;if(p.length<=1)u=[{url:this.url,start:a,end:l}];else{const e=p.filter((e=>e.offset<=l&&e.offset+e.length>a));if(e.length<1)return s(new Error("Could not find file corresponnding to web seed range request"));u=e.map((e=>{const t=e.offset+e.length-1;return{url:this.url+("/"===this.url[this.url.length-1]?"":"/")+e.path,fileOffsetInRange:Math.max(e.offset-a,0),start:Math.max(a-e.offset,0),end:Math.min(t,l-e.offset)}}))}let d,f=0,h=!1;u.length>1&&(d=n.alloc(i)),u.forEach((n=>{const a=n.url,l=n.start,p=n.end;r("Requesting url=%s pieceIndex=%d offset=%d length=%d start=%d end=%d",a,e,t,i,l,p);const m={url:a,method:"GET",headers:{"user-agent":`WebTorrent/${c} (https://webtorrent.io)`,range:`bytes=${l}-${p}`}};function g(e,t){if(e.statusCode<200||e.statusCode>=300)return h=!0,s(new Error("Unexpected HTTP status code "+e.statusCode));r("Got data of length %d",t.length),1===u.length?s(null,t):(t.copy(d,n.fileOffsetInRange),++f===u.length&&s(null,d))}o.concat(m,((e,t,n)=>{if(!h)return e?"undefined"==typeof window||a.startsWith(window.location.origin+"/")?(h=!0,s(e)):o.head(a,((t,n)=>{if(!h){if(t)return h=!0,s(t);if(n.statusCode<200||n.statusCode>=300)return h=!0,s(new Error("Unexpected HTTP status code "+n.statusCode));if(n.url===a)return h=!0,s(e);m.url=n.url,o.concat(m,((e,t,n)=>{if(!h)return e?(h=!0,s(e)):void g(t,n)}))}})):void g(t,n)}))}))}destroy(){super.destroy(),this._torrent=null}}}).call(this)}).call(this,e("buffer").Buffer)},{"../package.json":334,bitfield:10,"bittorrent-protocol":11,buffer:60,debug:316,"simple-get":222,"simple-sha1":242}],316:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./common":317,_process:187,dup:13}],317:[function(e,t,n){arguments[4][14][0].apply(n,arguments)},{dup:14,ms:318}],318:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],319:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],320:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{"./_stream_readable":322,"./_stream_writable":324,_process:187,dup:17,inherits:119}],321:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{"./_stream_transform":323,dup:18,inherits:119}],322:[function(e,t,n){arguments[4][19][0].apply(n,arguments)},{"../errors":319,"./_stream_duplex":320,"./internal/streams/async_iterator":325,"./internal/streams/buffer_list":326,"./internal/streams/destroy":327,"./internal/streams/from":329,"./internal/streams/state":331,"./internal/streams/stream":332,_process:187,buffer:60,dup:19,events:98,inherits:119,"string_decoder/":286,util:55}],323:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{"../errors":319,"./_stream_duplex":320,dup:20,inherits:119}],324:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{"../errors":319,"./_stream_duplex":320,"./internal/streams/destroy":327,"./internal/streams/state":331,"./internal/streams/stream":332,_process:187,buffer:60,dup:21,inherits:119,"util-deprecate":306}],325:[function(e,t,n){arguments[4][22][0].apply(n,arguments)},{"./end-of-stream":328,_process:187,dup:22}],326:[function(e,t,n){arguments[4][23][0].apply(n,arguments)},{buffer:60,dup:23,util:55}],327:[function(e,t,n){arguments[4][24][0].apply(n,arguments)},{_process:187,dup:24}],328:[function(e,t,n){arguments[4][25][0].apply(n,arguments)},{"../../../errors":319,dup:25}],329:[function(e,t,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],330:[function(e,t,n){arguments[4][27][0].apply(n,arguments)},{"../../../errors":319,"./end-of-stream":328,dup:27}],331:[function(e,t,n){arguments[4][28][0].apply(n,arguments)},{"../../../errors":319,dup:28}],332:[function(e,t,n){arguments[4][29][0].apply(n,arguments)},{dup:29,events:98}],333:[function(e,t,n){arguments[4][30][0].apply(n,arguments)},{"./lib/_stream_duplex.js":320,"./lib/_stream_passthrough.js":321,"./lib/_stream_readable.js":322,"./lib/_stream_transform.js":323,"./lib/_stream_writable.js":324,"./lib/internal/streams/end-of-stream.js":328,"./lib/internal/streams/pipeline.js":330,dup:30}],334:[function(e,t,n){t.exports={version:"0.110.1"}},{}],335:[function(e,t,n){t.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){i[e]=t[e]})),i;function i(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var i=t.apply(this,e),r=e[e.length-1];return"function"==typeof i&&i!==r&&Object.keys(r).forEach((function(e){i[e]=r[e]})),i}}},{}],336:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)i.call(n,r)&&(e[r]=n[r])}return e};var i=Object.prototype.hasOwnProperty},{}],337:[function(e,t,n){const i=e("clipboard"),r=e("parse-torrent"),o=e("Buffer"),s=e("bytes"),a=e("mime-types"),c=e("webtorrent"),l=e("tippy.js").default;var p,u,d=document.getElementById("examples"),f=document.getElementById("example1"),h=document.getElementById("example2"),m=document.getElementById("example3"),g=document.getElementById("properties"),v=document.getElementById("originalSourceIcon"),b=l(v,{theme:"torrent-parts",animation:"shift-away-subtle"}),x=document.getElementById("name"),y=document.getElementById("reset"),_=document.getElementById("created"),w=document.getElementById("createdBy"),k=document.getElementById("comment"),E=document.getElementById("hash"),S=document.getElementById("addTrackers"),C=document.getElementById("addTracker"),T=document.getElementById("removeTrackers"),j=document.getElementById("announce"),A=document.getElementById("urlList"),L=document.getElementById("addWebseed"),I=document.getElementById("removeWebseeds"),O=document.getElementById("filesBody"),R=document.getElementById("getFiles"),B=document.getElementById("copyURL"),U=document.getElementById("copyMagnet"),M=document.getElementById("downloadTorrentWrapper"),P=document.getElementById("downloadTorrent"),N=l(B,{theme:"torrent-parts",animation:"shift-away-subtle",content:"Copy torrent.parts link to clipboard"}),D=l(U,{theme:"torrent-parts",animation:"shift-away-subtle",content:"Copy Magnet link to clipboard"}),q=l(M,{theme:"torrent-parts",animation:"shift-away-subtle",content:"Download Torrent file"}),H=new c,F=new Notyf({duration:8e3,dismissible:!0,ripple:!1,position:{x:"right",y:"top"},types:[{type:"success",background:"#46835C",icon:!1},{type:"error",background:"#A60A0A",icon:!1}]});function z(e){window.innerWidth>1080?(N.setProps({placement:"right"}),D.setProps({placement:"right"}),q.setProps({placement:"right"})):(N.setProps({placement:"top"}),D.setProps({placement:"top"}),q.setProps({placement:"top"}))}function W(e){X();try{console.info("Attempting parse"),u=r(e),$(),u.xs&&(console.info("Magnet includes xs, attempting remote parse"),V(u.xs))}catch(t){console.warn(t),"magnet"==p?(console.info("Attempting remote parse"),V(e)):(F.error("Problem parsing input. Is this a .torrent file?"),console.error("Problem parsing input"))}}function V(e){r.remote(e,(function(e,t){if(e)return F.error("Problem remotely fetching that file or parsing result"),console.warn(e),void X();p="remote-torrent-file",v.innerHTML='<span class="fad fa-file-alt fa-fw"></span>',b.setContent("Currently loaded information sourced from remotely fetched Torrent file"),u=t,$()}))}function $(){if(console.log(u),E.value=u.infoHash,x.value=u.name?u.name:"",u.created?(_.value=u.created.toISOString().slice(0,19),_.type="datetime-local"):_.type="text",w.value=u.createdBy?"by "+u.createdBy:"",k.value=u.comment?u.comment:"",j.innerHTML="",u.announce&&u.announce.length)for(let e=0;e<u.announce.length;e++){let t=document.createElement("div");t.className="announce",t.dataset.index=e;let n=document.createElement("input");n.type="text",n.value=u.announce[e],n.dataset.index=e,n.dataset.group="announce",n.setAttribute("aria-label","Tracker URL #"+e),n.addEventListener("input",K),t.appendChild(n);let i=document.createElement("a");i.className="remove",i.dataset.index=e,i.innerHTML='<span class="far fa-trash"></span>',i.addEventListener("click",Q),t.appendChild(i),j.appendChild(t)}if(A.innerHTML="",u.urlList&&u.urlList.length)for(let e=0;e<u.urlList.length;e++){let t=document.createElement("div");t.className="urlList",t.dataset.index=e;let n=document.createElement("input");n.type="text",n.value=u.urlList[e],n.dataset.index=e,n.dataset.group="urlList",n.setAttribute("aria-label","Webseed URL #"+e),n.addEventListener("input",K),t.appendChild(n);let i=document.createElement("a");i.className="remove",i.dataset.index=e,i.innerHTML='<span class="far fa-trash"></span>',i.addEventListener("click",Q),t.appendChild(i),A.appendChild(t)}if(O.innerHTML="",u.files&&u.files.length){if(R.style.display="none",u.files.length<100)for(let e of u.files){let t=Y(a.lookup(e.name));O.appendChild(G(t,e.name,e.length))}else{for(let e=0;e<100;e++){let t=Y(a.lookup(u.files[e].name));O.appendChild(G(t,u.files[e].name,u.files[e].length))}O.appendChild(G("","...and another "+(u.files.length-100)+" more files",""))}O.appendChild(G("folder-tree","",u.length)),q.setContent("Download Torrent file"),P.addEventListener("click",ie),P.disabled=!1}else H.torrents.length>0?(R.style.display="none",O.innerHTML='<input type="text" placeholder="Attempting fetching of files from Webtorrent..." aria-label="Attempting fetching of files from Webtorrent..." disabled>'):(R.style.display="block",O.innerHTML='<input type="text" placeholder="Not included in the URL/File provided" aria-label="Files information not included in the URL/File provided" disabled>'),q.setContent("Files metadata is required to generate a Torrent file. Try fetching files list from WebTorrent."),P.removeEventListener("click",ie),P.disabled=!0;B.setAttribute("data-clipboard-text",window.location.origin+"#"+r.toMagnetURI(u)),U.setAttribute("data-clipboard-text",r.toMagnetURI(u)),d.style.display="none",g.style.display="flex",window.location.hash=r.toMagnetURI(u),u.name?document.title="Torrent Parts | "+u.name:document.title="Torrent Parts | Inspect and edit what's in your Torrent file or Magnet link",b.enable(),gtag("event","view_item",{items:[{item_id:u.infoHash,item_name:u.name,item_category:p}]})}function G(e,t,n){let i=document.createElement("tr"),r=document.createElement("td");e&&(r.innerHTML='<span class="far fa-'+e+'"></span>'),i.appendChild(r);let o=document.createElement("td");o.innerHTML=t,i.appendChild(o);let a=document.createElement("td");return a.innerHTML=s.format(n,{decimalPlaces:1,unitSeparator:" "}),i.appendChild(a),i}function Y(e){if(!e)return"file";switch(!0){case e.includes("msword"):case e.includes("wordprocessingml"):case e.includes("opendocument.text"):case e.includes("abiword"):return"file-word";case e.includes("ms-excel"):case e.includes("spreadsheet"):return"file-powerpoint";case e.includes("powerpoint"):case e.includes("presentation"):return"file-powerpoint";case e.includes("7z-"):case e.includes("iso9660"):case e.includes("zip"):case e.includes("octet-stream"):return"file-archive";case e.includes("csv"):return"file-csv";case e.includes("pdf"):return"file-pdf";case e.includes("font"):return"file-contract";case e.includes("text"):case e.includes("subrip"):case e.includes("vtt"):return"file-alt";case e.includes("audio"):return"file-audio";case e.includes("image"):return"file-image";case e.includes("video"):return"file-video";default:return"file"}}function K(e){this.dataset.group?u[this.dataset.group][this.dataset.index]=this.value?this.value:"":u[this.id]=this.value?this.value:"",window.location.hash=r.toMagnetURI(u),te()}function X(){document.getElementById("magnet").value="",document.getElementById("torrent").value="",d.style.display="flex",g.style.display="none",x.value="",_.value="",w.value="",k.value="",E.value="",j.innerHTML="",A.innerHTML="",H.torrents.forEach((e=>e.destroy())),R.style.display="block",O.innerHTML="",window.location.hash="",B.setAttribute("data-clipboard-text",""),U.setAttribute("data-clipboard-text",""),document.title="Torrent Parts | Inspect and edit what's in your Torrent file or Magnet link",b.disable(),gtag("event","reset")}async function J(){S.className="disabled",S.innerHTML="Adding...";try{let e=await fetch("https://newtrackon.com/api/100"),t=await e.text();u.announce=u.announce.concat(t.split("\n\n")),u.announce.push("http://bt1.archive.org:6969/announce"),u.announce.push("http://bt2.archive.org:6969/announce"),u.announce=u.announce.filter(((e,t)=>e&&u.announce.indexOf(e)===t)),F.success("Added known working trackers from newTrackon"),te()}catch(e){F.error("Problem fetching trackers from newTrackon"),console.warn(e)}S.className="",S.innerHTML="Add Known Working Trackers",$(),gtag("event","add_trackers")}function Z(){u[this.dataset.type].unshift(""),$()}function Q(){u[this.parentElement.className].splice(this.parentElement.dataset.index,1),$()}function ee(e){u[e]=[],te(),$()}function te(){u.created=new Date,u.createdBy="Torrent Parts <https://torrent.parts/>",u.created?(_.value=u.created.toISOString().slice(0,19),_.type="datetime-local"):_.type="text",w.value=u.createdBy?"by "+u.createdBy:""}function ne(){console.info("Attempting fetching files from Webtorrent..."),R.style.display="none",u.announce.push("wss://tracker.webtorrent.io"),u.announce.push("wss://tracker.openwebtorrent.com"),u.announce.push("wss://tracker.btorrent.xyz"),u.announce.push("wss://tracker.fastcast.nz"),u.announce=u.announce.filter(((e,t)=>e&&u.announce.indexOf(e)===t)),H.add(r.toMagnetURI(u),(e=>{u.info=Object.assign({},e.info),u.files=e.files,u.infoBuffer=e.infoBuffer,u.length=e.length,u.lastPieceLength=e.lastPieceLength,te(),$(),F.success("Fetched file details from Webtorrent peers"),e.destroy()})),$(),gtag("event","attempt_webtorrent_fetch")}function ie(){let e=r.toTorrentFile(u);if(null!==e&&navigator.msSaveBlob)return navigator.msSaveBlob(new Blob([e],{type:"application/x-bittorrent"}),u.name+".torrent");let t=document.createElement("a");t.style.display="none";let n=window.URL.createObjectURL(new Blob([e],{type:"application/x-bittorrent"}));t.setAttribute("href",n),t.setAttribute("download",u.name+".torrent"),document.body.appendChild(t),t.click(),window.URL.revokeObjectURL(n),t.remove(),gtag("event","share",{method:"Torrent Download",content_id:u.name})}window.addEventListener("resize",z),z(),document.addEventListener("DOMContentLoaded",(function(){document.getElementById("magnet").addEventListener("keyup",(function(e){e.preventDefault(),"Enter"===e.key&&(p="magnet",v.innerHTML='<span class="fad fa-magnet fa-fw"></span>',b.setContent("Currently loaded information sourced from Magnet URL"),W(magnet.value))})),document.getElementById("torrent").addEventListener("change",(function(e){e.preventDefault(),e.target.files[0].arrayBuffer().then((function(e){p="torrent-file",v.innerHTML='<span class="fad fa-file-alt fa-fw"></span>',b.setContent("Currently loaded information sourced from Torrent file"),W(o.from(e))}))})),document.addEventListener("dragover",(function(e){e.preventDefault()})),document.addEventListener("drop",(function(e){e.preventDefault(),e.dataTransfer.items[0].getAsFile().arrayBuffer().then((function(e){p="torrent-file",v.innerHTML='<span class="fad fa-file-alt fa-fw"></span>',b.setContent("Currently loaded information sourced from Torrent file"),W(o.from(e))}))})),f.addEventListener("click",(function(e){e.preventDefault(),F.success("Parsing Ubuntu 20.04 Magnet URL"),W("magnet:?xt=urn:btih:9fc20b9e98ea98b4a35e6223041a5ef94ea27809&dn=ubuntu-20.04-desktop-amd64.iso&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce")})),h.addEventListener("click",(async function(e){e.preventDefault(),F.success("Fetching and Parsing “The WIRED CD” Torrent File..."),V("https://webtorrent.io/torrents/wired-cd.torrent")})),m.addEventListener("click",(async function(e){e.preventDefault(),F.success("Parsing Jack Johnson Archive.org Torrent File");let t=await fetch("/ext/jj2008-06-14.mk4_archive.torrent"),n=await t.arrayBuffer();W(o.from(n))}));let e=new i("#copyURL");e.on("success",(function(e){F.success("Copied site URL to clipboard!"),console.info(e),gtag("event","share",{method:"Copy URL",content_id:e.text})})),e.on("failure",(function(e){F.error("Problem copying to clipboard"),console.warn(e)}));let t=new i("#copyMagnet");t.on("success",(function(e){F.success("Copied Magnet URL to clipboard!"),gtag("event","share",{method:"Copy Magnet",content_id:e.text})})),t.on("failure",(function(e){F.error("Problem copying to clipboard"),console.warn(e)})),x.addEventListener("input",K),x.addEventListener("change",K),x.addEventListener("reset",K),x.addEventListener("paste",K),y.addEventListener("click",X),k.addEventListener("input",K),k.addEventListener("change",K),k.addEventListener("reset",K),k.addEventListener("paste",K),S.addEventListener("click",J),C.addEventListener("click",Z),T.addEventListener("click",(()=>ee("announce"))),L.addEventListener("click",Z),I.addEventListener("click",(()=>ee("urlList"))),R.addEventListener("click",ne),l("[data-tippy-content]",{theme:"torrent-parts",animation:"shift-away-subtle"}),b.disable(),window.location.hash&&(p="shared-url",v.innerHTML='<span class="fad fa-link fa-fw"></span>',b.setContent("Currently loaded information sourced from shared torrent.parts link"),W(window.location.hash.split("#")[1]))}))},{Buffer:2,bytes:62,clipboard:79,"mime-types":144,"parse-torrent":184,"tippy.js":289,webtorrent:309}]},{},[337]); |