"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[1218],{1218:(t,n,e)=>{e.d(n,{JLW:()=>jr.A,l78:()=>g,tlR:()=>_,qrM:()=>ri.Ay,Yu4:()=>ni.A,IA3:()=>ei.A,Wi0:()=>ui,PGM:()=>ai,OEq:()=>li.A,y8u:()=>hi.Ay,olC:()=>ci.A,IrU:()=>fi.A,oDi:()=>di.A,Q7f:()=>pi.A,cVp:()=>vi.A,lUB:()=>_i.A,Lx9:()=>yi.A,nVG:()=>mi.G,uxU:()=>mi.N,Xf2:()=>gi.A,GZz:()=>wi.Ay,UPb:()=>wi.Ps,dyv:()=>wi.Ko,GPZ:()=>Pr.GP,Sk5:()=>Vr.Ay,bEH:()=>Ir.interpolateHcl,n8j:()=>Fr.A,T9B:()=>r.A,jkA:()=>i.A,rLf:()=>ti,WH:()=>Lr,m4Y:()=>Yr.A,UMr:()=>Ur.A,w7C:()=>Rr.A,zt:()=>qr,Ltv:()=>Kr,UAC:()=>zi.UA,DCK:()=>Ti.DC,TUC:()=>Mi.TU,Agd:()=>ki.Ag,t6C:()=>Ai.y,wXd:()=>xi.wX,ABi:()=>Mi.AB,Ui6:()=>Ei.Ui,rGn:()=>Mi.rG,ucG:()=>bi.R,YPH:()=>Mi.YP,Mol:()=>Mi.Mo,PGu:()=>Mi.PG,GuW:()=>Mi.Gu,hkb:()=>Br.A});var r=e(21671);var i=e(44317);function o(t){return t}var u=1,a=2,s=3,l=4,c=1e-6;function f(t){return"translate("+t+",0)"}function h(t){return"translate(0,"+t+")"}function p(t){return n=>+t(n)}function v(t,n){n=Math.max(0,t.bandwidth()-n*2)/2;if(t.round())n=Math.round(n);return e=>+t(e)+n}function d(){return!this.__axis}function y(t,n){var e=[],r=null,i=null,y=6,_=6,m=3,g=typeof window!=="undefined"&&window.devicePixelRatio>1?0:.5,w=t===u||t===l?-1:1,A=t===l||t===a?"x":"y",b=t===u||t===s?f:h;function x(f){var h=r==null?n.ticks?n.ticks.apply(n,e):n.domain():r,x=i==null?n.tickFormat?n.tickFormat.apply(n,e):o:i,k=Math.max(y,0)+m,z=n.range(),M=+z[0]+g,E=+z[z.length-1]+g,T=(n.bandwidth?v:p)(n.copy(),g),C=f.selection?f.selection():f,S=C.selectAll(".domain").data([null]),N=C.selectAll(".tick").data(h,n).order(),P=N.exit(),V=N.enter().append("g").attr("class","tick"),B=N.select("line"),I=N.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor"));N=N.merge(V);B=B.merge(V.append("line").attr("stroke","currentColor").attr(A+"2",w*y));I=I.merge(V.append("text").attr("fill","currentColor").attr(A,w*k).attr("dy",t===u?"0em":t===s?"0.71em":"0.32em"));if(f!==C){S=S.transition(f);N=N.transition(f);B=B.transition(f);I=I.transition(f);P=P.transition(f).attr("opacity",c).attr("transform",(function(t){return isFinite(t=T(t))?b(t+g):this.getAttribute("transform")}));V.attr("opacity",c).attr("transform",(function(t){var n=this.parentNode.__axis;return b((n&&isFinite(n=n(t))?n:T(t))+g)}))}P.remove();S.attr("d",t===l||t===a?_?"M"+w*_+","+M+"H"+g+"V"+E+"H"+w*_:"M"+g+","+M+"V"+E:_?"M"+M+","+w*_+"V"+g+"H"+E+"V"+w*_:"M"+M+","+g+"H"+E);N.attr("opacity",1).attr("transform",(function(t){return b(T(t)+g)}));B.attr(A+"2",w*y);I.attr(A,w*k).text(x);C.filter(d).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===a?"start":t===l?"end":"middle");C.each((function(){this.__axis=T}))}x.scale=function(t){return arguments.length?(n=t,x):n};x.ticks=function(){return e=Array.from(arguments),x};x.tickArguments=function(t){return arguments.length?(e=t==null?[]:Array.from(t),x):e.slice()};x.tickValues=function(t){return arguments.length?(r=t==null?null:Array.from(t),x):r&&r.slice()};x.tickFormat=function(t){return arguments.length?(i=t,x):i};x.tickSize=function(t){return arguments.length?(y=_=+t,x):y};x.tickSizeInner=function(t){return arguments.length?(y=+t,x):y};x.tickSizeOuter=function(t){return arguments.length?(_=+t,x):_};x.tickPadding=function(t){return arguments.length?(m=+t,x):m};x.offset=function(t){return arguments.length?(g=+t,x):g};return x}function _(t){return y(u,t)}function m(t){return y(a,t)}function g(t){return y(s,t)}function w(t){return y(l,t)}function A(){}function b(t){return t==null?A:function(){return this.querySelector(t)}}function x(t){if(typeof t!=="function")t=b(t);for(var n=this._groups,e=n.length,r=new Array(e),i=0;i=g)g=m+1;while(!(A=y[g])&&++g=0;){if(u=r[i]){if(o&&u.compareDocumentPosition(o)^4)o.parentNode.insertBefore(u,o);o=u}}}return this}function $(t){if(!t)t=tt;function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}for(var e=this._groups,r=e.length,i=new Array(r),o=0;on?1:t>=n?0:NaN}function nt(){var t=arguments[0];arguments[0]=this;t.apply(null,arguments);return this}function et(){return Array.from(this)}function rt(){for(var t=this._groups,n=0,e=t.length;n=0&&(n=t.slice(0,e))!=="xmlns")t=t.slice(e+1);return st.hasOwnProperty(n)?{space:st[n],local:t}:t}function ct(t){return function(){this.removeAttribute(t)}}function ft(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ht(t,n){return function(){this.setAttribute(t,n)}}function pt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function vt(t,n){return function(){var e=n.apply(this,arguments);if(e==null)this.removeAttribute(t);else this.setAttribute(t,e)}}function dt(t,n){return function(){var e=n.apply(this,arguments);if(e==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,e)}}function yt(t,n){var e=lt(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?ft:ct:typeof n==="function"?e.local?dt:vt:e.local?pt:ht)(e,n))}function _t(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function mt(t){return function(){this.style.removeProperty(t)}}function gt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function wt(t,n,e){return function(){var r=n.apply(this,arguments);if(r==null)this.style.removeProperty(t);else this.style.setProperty(t,r,e)}}function At(t,n,e){return arguments.length>1?this.each((n==null?mt:typeof n==="function"?wt:gt)(t,n,e==null?"":e)):bt(this.node(),t)}function bt(t,n){return t.style.getPropertyValue(n)||_t(t).getComputedStyle(t,null).getPropertyValue(n)}function xt(t){return function(){delete this[t]}}function kt(t,n){return function(){this[t]=n}}function zt(t,n){return function(){var e=n.apply(this,arguments);if(e==null)delete this[t];else this[t]=e}}function Mt(t,n){return arguments.length>1?this.each((n==null?xt:typeof n==="function"?zt:kt)(t,n)):this.node()[t]}function Et(t){return t.trim().split(/^|\s+/)}function Tt(t){return t.classList||new Ct(t)}function Ct(t){this._node=t;this._names=Et(t.getAttribute("class")||"")}Ct.prototype={add:function(t){var n=this._names.indexOf(t);if(n<0){this._names.push(t);this._node.setAttribute("class",this._names.join(" "))}},remove:function(t){var n=this._names.indexOf(t);if(n>=0){this._names.splice(n,1);this._node.setAttribute("class",this._names.join(" "))}},contains:function(t){return this._names.indexOf(t)>=0}};function St(t,n){var e=Tt(t),r=-1,i=n.length;while(++r=0)n=t.slice(e+1),t=t.slice(0,e);return{type:t,name:n}}))}function ln(t){return function(){var n=this.__on;if(!n)return;for(var e=0,r=-1,i=n.length,o;e{r.stop();t(e+n)}),n,e);return r}var zn=(0,bn.A)("start","end","cancel","interrupt");var Mn=[];var En=0;var Tn=1;var Cn=2;var Sn=3;var Nn=4;var Pn=5;var Vn=6;function Bn(t,n,e,r,i,o){var u=t.__transition;if(!u)t.__transition={};else if(e in u)return;Un(t,e,{name:n,index:r,group:i,on:zn,tween:Mn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:En})}function In(t,n){var e=Dn(t,n);if(e.state>En)throw new Error("too late; already scheduled");return e}function Gn(t,n){var e=Dn(t,n);if(e.state>Sn)throw new Error("too late; already running");return e}function Dn(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Un(t,n,e){var r=t.__transition,i;r[n]=e;e.timer=(0,xn.O1)(o,0,e.time);function o(t){e.state=Tn;e.timer.restart(u,e.delay,e.time);if(e.delay<=t)u(t-e.delay)}function u(o){var l,c,f,h;if(e.state!==Tn)return s();for(l in r){h=r[l];if(h.name!==e.name)continue;if(h.state===Sn)return kn(u);if(h.state===Nn){h.state=Vn;h.timer.stop();h.on.call("interrupt",t,t.__data__,h.index,h.group);delete r[l]}else if(+lCn&&r.state=0)t=t.slice(0,n);return!t||t==="start"}))}function be(t,n,e){var r,i,o=Ae(n)?In:Gn;return function(){var u=o(this,t),a=u.on;if(a!==r)(i=(r=a).copy()).on(n,e);u.on=i}}function xe(t,n){var e=this._id;return arguments.length<2?Dn(this.node(),e).on.on(t):this.each(be(e,t,n))}function ke(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;if(n)n.removeChild(this)}}function ze(){return this.on("end.remove",ke(this._id))}function Me(t){var n=this._name,e=this._id;if(typeof t!=="function")t=b(t);for(var r=this._groups,i=r.length,o=new Array(i),u=0;u{const n=t.identifier;t=pointer(t,r);t.point0=t.slice();t.identifier=n;return t}));interrupt(r);var B=c(r,arguments,true).beforestart();if(o==="overlay"){if(v)C=true;const e=[V[0],V[1]||V[0]];h.selection=v=[[y=t===vr?d:cr(e[0][0],e[1][0]),g=t===pr?m:cr(e[0][1],e[1][1])],[b=t===vr?A:lr(e[0][0],e[1][0]),z=t===pr?k:lr(e[0][1],e[1][1])]];if(V.length>1)L(n)}else{y=v[0][0];g=v[0][1];b=v[1][0];z=v[1][1]}_=y;w=g;x=b;M=z;var I=select(r).attr("pointer-events","none");var G=I.selectAll(".overlay").attr("cursor",yr[o]);if(n.touches){B.moved=U;B.ended=O}else{var D=select(n.view).on("mousemove.brush",U,true).on("mouseup.brush",O,true);if(i)D.on("keydown.brush",H,true).on("keyup.brush",Y,true);dragDisable(n.view)}l.call(r);B.start(n,u.name);function U(t){for(const n of t.changedTouches||[t]){for(const t of V)if(t.identifier===n.identifier)t.cur=pointer(n,r)}if(S&&!N&&!P&&V.length===1){const t=V[0];if(sr(t.cur[0]-t[0])>sr(t.cur[1]-t[1]))P=true;else N=true}for(const n of V)if(n.cur)n[0]=n.cur[0],n[1]=n.cur[1];C=true;noevent(t);L(t)}function L(t){const n=V[0],e=n.point0;var i;E=n[0]-e[0];T=n[1]-e[1];switch(u){case or:case ir:{if(s)E=lr(d-y,cr(A-b,E)),_=y+E,x=b+E;if(f)T=lr(m-g,cr(k-z,T)),w=g+T,M=z+T;break}case ur:{if(V[1]){if(s)_=lr(d,cr(A,V[0][0])),x=lr(d,cr(A,V[1][0])),s=1;if(f)w=lr(m,cr(k,V[0][1])),M=lr(m,cr(k,V[1][1])),f=1}else{if(s<0)E=lr(d-y,cr(A-y,E)),_=y+E,x=b;else if(s>0)E=lr(d-b,cr(A-b,E)),_=y,x=b+E;if(f<0)T=lr(m-g,cr(k-g,T)),w=g+T,M=z;else if(f>0)T=lr(m-z,cr(k-z,T)),w=g,M=z+T}break}case ar:{if(s)_=lr(d,cr(A,y-E*s)),x=lr(d,cr(A,b+E*s));if(f)w=lr(m,cr(k,g-T*f)),M=lr(m,cr(k,z+T*f));break}}if(x<_){s*=-1;i=y,y=b,b=i;i=_,_=x,x=i;if(o in _r)G.attr("cursor",yr[o=_r[o]])}if(M0)y=_-E;if(f<0)z=M-T;else if(f>0)g=w-T;u=or;G.attr("cursor",yr.selection);L(t)}break}default:return}noevent(t)}function Y(t){switch(t.keyCode){case 16:{if(S){N=P=S=false;L(t)}break}case 18:{if(u===ar){if(s<0)b=x;else if(s>0)y=_;if(f<0)z=M;else if(f>0)g=w;u=ur;L(t)}break}case 32:{if(u===or){if(t.altKey){if(s)b=x-E*s,y=_+E*s;if(f)z=M-T*f,g=w+T*f;u=ar}else{if(s<0)b=x;else if(s>0)y=_;if(f<0)z=M;else if(f>0)g=w;u=ur}G.attr("cursor",yr[o]);L(t)}break}default:return}noevent(t)}}function p(t){c(this,arguments).moved(t)}function v(t){c(this,arguments).ended(t)}function d(){var e=this.__brush||{selection:null};e.extent=hr(n.apply(this,arguments));e.dim=t;return e}s.extent=function(t){return arguments.length?(n=typeof t==="function"?t:constant(hr(t)),s):n};s.filter=function(t){return arguments.length?(e=typeof t==="function"?t:constant(!!t),s):e};s.touchable=function(t){return arguments.length?(r=typeof t==="function"?t:constant(!!t),s):r};s.handleSize=function(t){return arguments.length?(u=+t,s):u};s.keyModifiers=function(t){return arguments.length?(i=!!t,s):i};s.on=function(){var t=o.on.apply(o,arguments);return t===o?s:t};return s}var Pr=e(24626);var Vr=e(59459);var Br=e(93926);var Ir=e(67360);var Gr=e(18312);var Dr=e(25758);var Ur=e(16527);function Lr(){var t=(0,Ur.A)().unknown(undefined),n=t.domain,e=t.range,r=0,i=1,o,u,a=false,s=0,l=0,c=.5;delete t.unknown;function f(){var t=n().length,f=it?1:n>=t?0:NaN}function Qr(t){return t}var $r=e(98247);function ti(){var t=Qr,n=Jr,e=null,r=(0,Zr.A)(0),i=(0,Zr.A)($r.FA),o=(0,Zr.A)(0);function u(u){var a,s=(u=(0,Wr.A)(u)).length,l,c,f=0,h=new Array(s),p=new Array(s),v=+r.apply(this,arguments),d=Math.min($r.FA,Math.max(-$r.FA,i.apply(this,arguments)-v)),y,_=Math.min(Math.abs(d)/s,o.apply(this,arguments)),m=_*(d<0?-1:1),g;for(a=0;a0){f+=g}}if(n!=null)h.sort((function(t,e){return n(p[t],p[e])}));else if(e!=null)h.sort((function(t,n){return e(u[t],u[n])}));for(a=0,c=f?(d-s*m)/f:0;a0?g*c:0)+m,p[l]={data:u[l],index:a,value:g,startAngle:v,endAngle:y,padAngle:_}}return p}u.value=function(n){return arguments.length?(t=typeof n==="function"?n:(0,Zr.A)(+n),u):t};u.sortValues=function(t){return arguments.length?(n=t,e=null,u):n};u.sort=function(t){return arguments.length?(e=t,n=null,u):e};u.startAngle=function(t){return arguments.length?(r=typeof t==="function"?t:(0,Zr.A)(+t),u):r};u.endAngle=function(t){return arguments.length?(i=typeof t==="function"?t:(0,Zr.A)(+t),u):i};u.padAngle=function(t){return arguments.length?(o=typeof t==="function"?t:(0,Zr.A)(+t),u):o};return u}var ni=e(60075);var ei=e(69683);var ri=e(24363);class ii{constructor(t,n){this._context=t;this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(t,n){t=+t,n=+n;switch(this._point){case 0:{this._point=1;if(this._line)this._context.lineTo(t,n);else this._context.moveTo(t,n);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}class oi{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){t=+t,n=+n;if(this._point===0){this._point=1}else{const e=pointRadial(this._x0,this._y0);const r=pointRadial(this._x0,this._y0=(this._y0+n)/2);const i=pointRadial(t,this._y0);const o=pointRadial(t,n);this._context.moveTo(...e);this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=n}}function ui(t){return new ii(t,true)}function ai(t){return new ii(t,false)}function si(t){return new oi(t)}var li=e(54545);var ci=e(13893);var fi=e(46457);var hi=e(43793);var pi=e(25633);var vi=e(13309);var di=e(76413);var yi=e(43272);var _i=e(71228);var mi=e(67694);var gi=e(29944);var wi=e(79011);var Ai=e(26530);var bi=e(61147);var xi=e(23383);var ki=e(9017);var zi=e(20293);var Mi=e(61779);var Ei=e(77849);var Ti=e(82692);function Ci(t,n,e){this.k=t;this.x=n;this.y=e}Ci.prototype={constructor:Ci,scale:function(t){return t===1?this:new Ci(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new Ci(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Si=new Ci(1,0,0);Ni.prototype=Ci.prototype;function Ni(t){while(!t.__zoom)if(!(t=t.parentNode))return Si;return t.__zoom}function Pi(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Vi(){var t=this;if(t instanceof SVGElement){t=t.ownerSVGElement||t;if(t.hasAttribute("viewBox")){t=t.viewBox.baseVal;return[[t.x,t.y],[t.x+t.width,t.y+t.height]]}return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}return[[0,0],[t.clientWidth,t.clientHeight]]}function Bi(){return this.__zoom||identity}function Ii(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Gi(){return navigator.maxTouchPoints||"ontouchstart"in this}function Di(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],u=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}function Ui(){var t=Pi,n=Vi,e=Di,r=Ii,i=Gi,o=[0,Infinity],u=[[-Infinity,-Infinity],[Infinity,Infinity]],a=250,s=interpolateZoom,l=dispatch("start","zoom","end"),c,f,h,p=500,v=150,d=0,y=10;function _(t){t.property("__zoom",Bi).on("wheel.zoom",k,{passive:false}).on("mousedown.zoom",z).on("dblclick.zoom",M).filter(i).on("touchstart.zoom",E).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",C).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(t,n,e,r){var i=t.selection?t.selection():t;i.property("__zoom",Bi);if(t!==i){A(t,n,e,r)}else{i.interrupt().each((function(){b(this,arguments).event(r).start().zoom(null,typeof n==="function"?n.apply(this,arguments):n).end()}))}};_.scaleBy=function(t,n,e,r){_.scaleTo(t,(function(){var t=this.__zoom.k,e=typeof n==="function"?n.apply(this,arguments):n;return t*e}),e,r)};_.scaleTo=function(t,r,i,o){_.transform(t,(function(){var t=n.apply(this,arguments),o=this.__zoom,a=i==null?w(t):typeof i==="function"?i.apply(this,arguments):i,s=o.invert(a),l=typeof r==="function"?r.apply(this,arguments):r;return e(g(m(o,l),a,s),t,u)}),i,o)};_.translateBy=function(t,r,i,o){_.transform(t,(function(){return e(this.__zoom.translate(typeof r==="function"?r.apply(this,arguments):r,typeof i==="function"?i.apply(this,arguments):i),n.apply(this,arguments),u)}),null,o)};_.translateTo=function(t,r,i,o,a){_.transform(t,(function(){var t=n.apply(this,arguments),a=this.__zoom,s=o==null?w(t):typeof o==="function"?o.apply(this,arguments):o;return e(identity.translate(s[0],s[1]).scale(a.k).translate(typeof r==="function"?-r.apply(this,arguments):-r,typeof i==="function"?-i.apply(this,arguments):-i),t,u)}),o,a)};function m(t,n){n=Math.max(o[0],Math.min(o[1],n));return n===t.k?t:new Transform(n,t.x,t.y)}function g(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Transform(t.k,r,i)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function A(t,e,r,i){t.on("start.zoom",(function(){b(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,u=b(t,o).event(i),a=n.apply(t,o),l=r==null?w(a):typeof r==="function"?r.apply(t,o):r,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),f=t.__zoom,h=typeof e==="function"?e.apply(t,o):e,p=s(f.invert(l).concat(c/f.k),h.invert(l).concat(c/h.k));return function(t){if(t===1)t=h;else{var n=p(t),e=c/n[2];t=new Transform(e,l[0]-n[0]*e,l[1]-n[1]*e)}u.zoom(null,t)}}))}function b(t,n,e){return!e&&t.__zooming||new x(t,n)}function x(t,e){this.that=t;this.args=e;this.active=0;this.sourceEvent=null;this.extent=n.apply(t,e);this.taps=0}x.prototype={event:function(t){if(t)this.sourceEvent=t;return this},start:function(){if(++this.active===1){this.that.__zooming=this;this.emit("start")}return this},zoom:function(t,n){if(this.mouse&&t!=="mouse")this.mouse[1]=n.invert(this.mouse[0]);if(this.touch0&&t!=="touch")this.touch0[1]=n.invert(this.touch0[0]);if(this.touch1&&t!=="touch")this.touch1[1]=n.invert(this.touch1[0]);this.that.__zoom=n;this.emit("zoom");return this},end:function(){if(--this.active===0){delete this.that.__zooming;this.emit("end")}return this},emit:function(t){var n=select(this.that).datum();l.call(t,this.that,new ZoomEvent(t,{sourceEvent:this.sourceEvent,target:_,type:t,transform:this.that.__zoom,dispatch:l}),n)}};function k(n,...i){if(!t.apply(this,arguments))return;var a=b(this,i).event(n),s=this.__zoom,l=Math.max(o[0],Math.min(o[1],s.k*Math.pow(2,r.apply(this,arguments)))),c=pointer(n);if(a.wheel){if(a.mouse[0][0]!==c[0]||a.mouse[0][1]!==c[1]){a.mouse[1]=s.invert(a.mouse[0]=c)}clearTimeout(a.wheel)}else if(s.k===l)return;else{a.mouse=[c,s.invert(c)];interrupt(this);a.start()}noevent(n);a.wheel=setTimeout(f,v);a.zoom("mouse",e(g(m(s,l),a.mouse[0],a.mouse[1]),a.extent,u));function f(){a.wheel=null;a.end()}}function z(n,...r){if(h||!t.apply(this,arguments))return;var i=n.currentTarget,o=b(this,r,true).event(n),a=select(n.view).on("mousemove.zoom",f,true).on("mouseup.zoom",p,true),s=pointer(n,i),l=n.clientX,c=n.clientY;dragDisable(n.view);nopropagation(n);o.mouse=[s,this.__zoom.invert(s)];interrupt(this);o.start();function f(t){noevent(t);if(!o.moved){var n=t.clientX-l,r=t.clientY-c;o.moved=n*n+r*r>d}o.event(t).zoom("mouse",e(g(o.that.__zoom,o.mouse[0]=pointer(t,i),o.mouse[1]),o.extent,u))}function p(t){a.on("mousemove.zoom mouseup.zoom",null);dragEnable(t.view,o.moved);noevent(t);o.event(t).end()}}function M(r,...i){if(!t.apply(this,arguments))return;var o=this.__zoom,s=pointer(r.changedTouches?r.changedTouches[0]:r,this),l=o.invert(s),c=o.k*(r.shiftKey?.5:2),f=e(g(m(o,c),s,l),n.apply(this,i),u);noevent(r);if(a>0)select(this).transition().duration(a).call(A,f,s,r);else select(this).call(_.transform,f,s,r)}function E(n,...e){if(!t.apply(this,arguments))return;var r=n.touches,i=r.length,o=b(this,e,n.changedTouches.length===i).event(n),u,a,s,l;nopropagation(n);for(a=0;a