@swiftcast/clip-editor-react 0.0.1-alpha.3 → 0.0.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +1 -1
- package/dist/mf-manifest.json +1198 -35
- package/dist/mf-stats.json +1565 -37
- package/dist/remoteEntry.js +5 -5
- package/dist/static/js/{94.233614b7.js → 8094.03bf5edc.js} +3 -3
- package/dist/static/js/async/109.256a32bd.js +2 -0
- package/dist/static/js/async/109.256a32bd.js.LICENSE.txt +9 -0
- package/dist/static/js/async/1099.7ec4a1d4.js +1 -0
- package/dist/static/js/async/1167.eafb458c.js +1 -0
- package/dist/static/js/async/1229.3824b191.js +1 -0
- package/dist/static/js/async/1358.c5623f2c.js +2 -0
- package/dist/static/js/async/1358.c5623f2c.js.LICENSE.txt +9 -0
- package/dist/static/js/async/1359.c78c33cc.js +1 -0
- package/dist/static/js/async/1408.45dd942f.js +1 -0
- package/dist/static/js/async/1475.ca68a958.js +2 -0
- package/dist/static/js/async/1475.ca68a958.js.LICENSE.txt +9 -0
- package/dist/static/js/async/1491.afc05a88.js +1 -0
- package/dist/static/js/async/1536.acd44187.js +2 -0
- package/dist/static/js/async/1536.acd44187.js.LICENSE.txt +9 -0
- package/dist/static/js/async/1545.339b9e4a.js +1 -0
- package/dist/static/js/async/1663.0a34b1a6.js +2 -0
- package/dist/static/js/async/1663.0a34b1a6.js.LICENSE.txt +9 -0
- package/dist/static/js/async/1677.4c84f733.js +2 -0
- package/dist/static/js/async/1677.4c84f733.js.LICENSE.txt +9 -0
- package/dist/static/js/async/1690.28cd4402.js +2 -0
- package/dist/static/js/async/{510.e827048d.js.LICENSE.txt → 1690.28cd4402.js.LICENSE.txt} +0 -36
- package/dist/static/js/async/1855.dc79d72c.js +1 -0
- package/dist/static/js/async/1921.7437e362.js +1 -0
- package/dist/static/js/async/2068.600661ee.js +1 -0
- package/dist/static/js/async/2111.5db2cfc1.js +2 -0
- package/dist/static/js/async/2111.5db2cfc1.js.LICENSE.txt +9 -0
- package/dist/static/js/async/213.94b97063.js +1 -0
- package/dist/static/js/async/2199.65d29190.js +1 -0
- package/dist/static/js/async/2305.9e6f32d6.js +2 -0
- package/dist/static/js/async/2305.9e6f32d6.js.LICENSE.txt +8 -0
- package/dist/static/js/async/2375.042f6260.js +1 -0
- package/dist/static/js/async/2469.fc8a042e.js +1 -0
- package/dist/static/js/async/2746.01a51768.js +2 -0
- package/dist/static/js/async/2746.01a51768.js.LICENSE.txt +1 -0
- package/dist/static/js/async/2790.ff501683.js +5 -0
- package/dist/static/js/async/2900.6ab855e9.js +1 -0
- package/dist/static/js/async/2927.6711b41c.js +2 -0
- package/dist/static/js/async/2927.6711b41c.js.LICENSE.txt +45 -0
- package/dist/static/js/async/3126.500697e8.js +1 -0
- package/dist/static/js/async/3145.6d46bb3e.js +1 -0
- package/dist/static/js/async/3328.3edb2c5f.js +7 -0
- package/dist/static/js/async/3328.3edb2c5f.js.LICENSE.txt +9 -0
- package/dist/static/js/async/3357.3cc4b057.js +1 -0
- package/dist/static/js/async/3358.f439fe77.js +3 -0
- package/dist/static/js/async/3436.02b7dced.js +2 -0
- package/dist/static/js/async/3436.02b7dced.js.LICENSE.txt +9 -0
- package/dist/static/js/async/35.63ec382c.js +2 -0
- package/dist/static/js/async/35.63ec382c.js.LICENSE.txt +9 -0
- package/dist/static/js/async/3500.2a5e861e.js +2 -0
- package/dist/static/js/async/3500.2a5e861e.js.LICENSE.txt +5 -0
- package/dist/static/js/async/3714.3de0cc07.js +1 -0
- package/dist/static/js/async/3761.30e06c21.js +2 -0
- package/dist/static/js/async/4437.c013a47e.js +1 -0
- package/dist/static/js/async/4516.86f759b3.js +1 -0
- package/dist/static/js/async/4588.381756a4.js +4 -0
- package/dist/static/js/async/4617.3c1cb2e1.js +1 -0
- package/dist/static/js/async/4804.4b5a6c4b.js +1 -0
- package/dist/static/js/async/4964.31141e42.js +1 -0
- package/dist/static/js/async/5040.ad9e108f.js +2 -0
- package/dist/static/js/async/5040.ad9e108f.js.LICENSE.txt +9 -0
- package/dist/static/js/async/5058.6c88d364.js +2 -0
- package/dist/static/js/async/5058.6c88d364.js.LICENSE.txt +62 -0
- package/dist/static/js/async/5083.a594c3b4.js +2 -0
- package/dist/static/js/async/5083.a594c3b4.js.LICENSE.txt +9 -0
- package/dist/static/js/async/5127.095785dd.js +2 -0
- package/dist/static/js/async/5127.095785dd.js.LICENSE.txt +9 -0
- package/dist/static/js/async/5128.27f2ad05.js +2 -0
- package/dist/static/js/async/{355.7bff4544.js.LICENSE.txt → 5128.27f2ad05.js.LICENSE.txt} +2 -14
- package/dist/static/js/async/5184.c393a127.js +1 -0
- package/dist/static/js/async/5218.87494e0c.js +1 -0
- package/dist/static/js/async/5285.fe1791d9.js +5 -0
- package/dist/static/js/async/{661.83de2736.js.LICENSE.txt → 5285.fe1791d9.js.LICENSE.txt} +1 -8
- package/dist/static/js/async/5408.253200ee.js +1 -0
- package/dist/static/js/async/5450.359d95c3.js +1 -0
- package/dist/static/js/async/5469.f0179be1.js +1 -0
- package/dist/static/js/async/5522.cc016a92.js +1 -0
- package/dist/static/js/async/5770.c3d8277f.js +1 -0
- package/dist/static/js/async/5876.36f8e85a.js +2 -0
- package/dist/static/js/async/5876.36f8e85a.js.LICENSE.txt +9 -0
- package/dist/static/js/async/5921.bfb648cb.js +1 -0
- package/dist/static/js/async/6127.1257e70c.js +1 -0
- package/dist/static/js/async/6140.5479e7b9.js +2 -0
- package/dist/static/js/async/6140.5479e7b9.js.LICENSE.txt +9 -0
- package/dist/static/js/async/6297.336e7ffc.js +2 -0
- package/dist/static/js/async/6297.336e7ffc.js.LICENSE.txt +9 -0
- package/dist/static/js/async/6452.a2c7f164.js +2 -0
- package/dist/static/js/async/{__federation_expose_ProjectsPage.e597d172.js.LICENSE.txt → 6452.a2c7f164.js.LICENSE.txt} +1 -1
- package/dist/static/js/async/6504.53e9c9c5.js +1 -0
- package/dist/static/js/async/6678.fe09eab0.js +1 -0
- package/dist/static/js/async/6682.e0084aeb.js +2 -0
- package/dist/static/js/async/6703.f8fca121.js +1 -0
- package/dist/static/js/async/6716.50326c01.js +2 -0
- package/dist/static/js/async/6716.50326c01.js.LICENSE.txt +8 -0
- package/dist/static/js/async/6734.4a52d73f.js +6 -0
- package/dist/static/js/async/6964.d244eb15.js +7 -0
- package/dist/static/js/async/7300.69a06cf8.js +1 -0
- package/dist/static/js/async/7420.4846bd05.js +2 -0
- package/dist/static/js/async/7420.4846bd05.js.LICENSE.txt +9 -0
- package/dist/static/js/async/7426.2ccadab1.js +1 -0
- package/dist/static/js/async/747.3568c169.js +2 -0
- package/dist/static/js/async/747.3568c169.js.LICENSE.txt +9 -0
- package/dist/static/js/async/753.c9fb4bb6.js +2 -0
- package/dist/static/js/async/753.c9fb4bb6.js.LICENSE.txt +8 -0
- package/dist/static/js/async/7560.cfdf6fc1.js +3 -0
- package/dist/static/js/async/7560.cfdf6fc1.js.LICENSE.txt +19 -0
- package/dist/static/js/async/7693.99348793.js +2 -0
- package/dist/static/js/async/7693.99348793.js.LICENSE.txt +6 -0
- package/dist/static/js/async/7785.4146afc2.js +1 -0
- package/dist/static/js/async/7855.3a70056f.js +1 -0
- package/dist/static/js/async/787.fe3d07c6.js +1 -0
- package/dist/static/js/async/7889.09b20686.js +1 -0
- package/dist/static/js/async/7961.5d19744b.js +1 -0
- package/dist/static/js/async/8062.09a6fdbd.js +2 -0
- package/dist/static/js/async/8062.09a6fdbd.js.LICENSE.txt +9 -0
- package/dist/static/js/async/8112.26771b29.js +1 -0
- package/dist/static/js/async/8145.7711418b.js +1 -0
- package/dist/static/js/async/8194.e3680a0e.js +1 -0
- package/dist/static/js/async/8247.71ad8780.js +1 -0
- package/dist/static/js/async/8314.4fbcc580.js +2 -0
- package/dist/static/js/async/8314.4fbcc580.js.LICENSE.txt +9 -0
- package/dist/static/js/async/8327.d70b6d2b.js +2 -0
- package/dist/static/js/async/8327.d70b6d2b.js.LICENSE.txt +9 -0
- package/dist/static/js/async/8377.491112d2.js +1 -0
- package/dist/static/js/async/8430.cc4ab0b0.js +2 -0
- package/dist/static/js/async/8430.cc4ab0b0.js.LICENSE.txt +9 -0
- package/dist/static/js/async/8512.ae31acae.js +2 -0
- package/dist/static/js/async/8512.ae31acae.js.LICENSE.txt +9 -0
- package/dist/static/js/async/8522.7b59f26a.js +17 -0
- package/dist/static/js/async/8572.889a2f0f.js +1 -0
- package/dist/static/js/async/8636.3a0609ce.js +4 -0
- package/dist/static/js/async/8652.231efd09.js +1 -0
- package/dist/static/js/async/8719.d5d23e80.js +1 -0
- package/dist/static/js/async/8865.2104211d.js +8 -0
- package/dist/static/js/async/8895.153ddc5f.js +2 -0
- package/dist/static/js/async/8895.153ddc5f.js.LICENSE.txt +19 -0
- package/dist/static/js/async/8913.64eea008.js +1 -0
- package/dist/static/js/async/8964.196834ba.js +1 -0
- package/dist/static/js/async/9047.c6fa7623.js +452 -0
- package/dist/static/js/async/9047.c6fa7623.js.LICENSE.txt +117 -0
- package/dist/static/js/async/905.4340e6d5.js +2 -0
- package/dist/static/js/async/905.4340e6d5.js.LICENSE.txt +5 -0
- package/dist/static/js/async/9146.efbecec7.js +1 -0
- package/dist/static/js/async/9149.82308d8f.js +1 -0
- package/dist/static/js/async/9249.622a286f.js +2 -0
- package/dist/static/js/async/9249.622a286f.js.LICENSE.txt +5 -0
- package/dist/static/js/async/9525.2192486e.js +1 -0
- package/dist/static/js/async/9594.516654c9.js +2 -0
- package/dist/static/js/async/9594.516654c9.js.LICENSE.txt +9 -0
- package/dist/static/js/async/9630.c795adce.js +1 -0
- package/dist/static/js/async/9669.dc59da89.js +75 -0
- package/dist/static/js/async/9798.20a5011c.js +2 -0
- package/dist/static/js/async/9798.20a5011c.js.LICENSE.txt +9 -0
- package/dist/static/js/async/9854.c86b795e.js +1 -0
- package/dist/static/js/async/9905.e5456d13.js +2 -0
- package/dist/static/js/async/9905.e5456d13.js.LICENSE.txt +9 -0
- package/dist/static/js/async/9973.04e09e35.js +1 -0
- package/dist/static/js/async/__federation_expose_ProjectsPage.d61a8a68.js +1 -0
- package/dist/static/js/async/__federation_expose_SniffingPage.79823a67.js +1 -0
- package/dist/static/js/async/__federation_expose_WorkFlow.39bd1b8e.js +11 -0
- package/dist/static/js/index.03348712.js +1 -0
- package/package.json +4 -4
- package/dist/static/js/async/194.fb5067a8.js +0 -1
- package/dist/static/js/async/216.dd2d476e.js +0 -3
- package/dist/static/js/async/216.dd2d476e.js.LICENSE.txt +0 -38
- package/dist/static/js/async/353.1d23abc7.js +0 -175
- package/dist/static/js/async/353.1d23abc7.js.LICENSE.txt +0 -144
- package/dist/static/js/async/355.7bff4544.js +0 -3
- package/dist/static/js/async/375.444c8914.js +0 -1
- package/dist/static/js/async/491.179841c1.js +0 -1
- package/dist/static/js/async/510.e827048d.js +0 -36
- package/dist/static/js/async/525.9c60477e.js +0 -1
- package/dist/static/js/async/661.83de2736.js +0 -8
- package/dist/static/js/async/682.f9ec3784.js +0 -2
- package/dist/static/js/async/738.b950a194.js +0 -1
- package/dist/static/js/async/852.1a544322.js +0 -6
- package/dist/static/js/async/__federation_expose_ProjectsPage.e597d172.js +0 -2
- package/dist/static/js/async/__federation_expose_SniffingPage.ad10d51a.js +0 -1
- package/dist/static/js/async/__federation_expose_WorkFlow.e18339ec.js +0 -11
- package/dist/static/js/async/lib-axios.64c3f6d8.js +0 -1
- package/dist/static/js/index.e9f49efa.js +0 -1
- /package/dist/static/css/async/{555.ecec5306.css → 9139.ecec5306.css} +0 -0
- /package/dist/static/js/async/{852.1a544322.js.LICENSE.txt → 3761.30e06c21.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/{682.f9ec3784.js.LICENSE.txt → 6682.e0084aeb.js.LICENSE.txt} +0 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["8522"],{12260:function(t,e,i){i.r(e),i.d(e,{aggMean:()=>eL,aggMedian:()=>eT,aggWeightedMedian:()=>eR,cachedNodeSize:()=>e_,coordCenter:()=>e4,coordGreedy:()=>ie,coordQuad:()=>ir,coordSimplex:()=>eG,coordTopological:()=>io,decrossDfs:()=>eY,decrossOpt:()=>is,decrossTwoLayer:()=>eZ,graph:()=>eo,graphConnect:()=>eh,graphHierarchy:()=>ed,graphJson:()=>tS,graphStratify:()=>ey,grid:()=>eS,laneGreedy:()=>eB,laneOpt:()=>ez,layerSeparation:()=>eK,layeringLongestPath:()=>il,layeringSimplex:()=>e0,layeringTopological:()=>iu,shapeEllipse:()=>ik,shapeRect:()=>ix,sizedSeparation:()=>eH,splitNodeSize:()=>ej,sugiNodeLength:()=>e5,sugifyCompact:()=>e3,sugifyLayer:()=>e2,sugiyama:()=>e6,tweakFlip:()=>iw,tweakGrid:()=>iy,tweakShape:()=>iI,tweakSize:()=>ig,twolayerAgg:()=>eD,twolayerGreedy:()=>eJ,twolayerOpt:()=>ip,unsugify:()=>e9,zherebko:()=>iC});var r=Object.create,o=Object.defineProperty,n=Object.defineProperties,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,c=(t,e)=>{if(e=Symbol[t])return e;throw Error("Symbol."+t+" is not defined")},p=(t,e,i)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,g=(t,e)=>{for(var i in e||(e={}))f.call(e,i)&&p(t,i,e[i]);if(h)for(var i of h(e))d.call(e,i)&&p(t,i,e[i]);return t},y=(t,e)=>n(t,a(e)),v=(t,e)=>{var i={};for(var r in t)f.call(t,r)&&0>e.indexOf(r)&&(i[r]=t[r]);if(null!=t&&h)for(var r of h(t))0>e.indexOf(r)&&d.call(t,r)&&(i[r]=t[r]);return i},m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),b=(t,e,i,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of l(e))f.call(t,n)||n===i||o(t,n,{get:()=>e[n],enumerable:!(r=s(e,n))||r.enumerable});return t},w=(t,e,i)=>(i=null!=t?r(u(t)):{},b(!e&&t&&t.__esModule?i:o(i,"default",{value:t,enumerable:!0}),t)),x=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},k=(t,e,i)=>(x(t,e,"read from private field"),i?i.call(t):e.get(t)),I=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},M=(t,e,i,r)=>(x(t,e,"write to private field"),r?r.call(t,i):e.set(t,i),i),C=(t,e,i)=>(x(t,e,"access private method"),i),$=function(t,e){this[0]=t,this[1]=e},B=t=>{var e,i=t[c("asyncIterator")],r=!1,o={};return null==i?(i=t[c("iterator")](),e=t=>o[t]=e=>i[t](e)):(i=i.call(t),e=t=>o[t]=e=>{if(r){if(r=!1,"throw"===t)throw e;return e}return r=!0,{done:!1,value:new $(new Promise(r=>{var o=i[t](e);if(!(o instanceof Object))throw TypeError("Object expected");r(o)}),1)}}),o[c("iterator")]=()=>o,e("next"),"throw"in i?e("throw"):o.throw=t=>{throw t},"return"in i&&e("return"),o},S=m((t,e)=>{function i(t,e,i,r){this.feasible=i,this.evaluation=e,this.bounded=r,this._tableau=t}e.exports=i,i.prototype.generateSolutionSet=function(){for(var t={},e=this._tableau,i=e.varIndexByRow,r=e.variablesPerIndex,o=e.matrix,n=e.rhsColumn,s=e.height-1,a=Math.round(1/e.precision),l=1;l<=s;l+=1){var h=r[i[l]];if(void 0!==h&&!0!==h.isSlack){var u=o[l][n];t[h.id]=Math.round((Number.EPSILON+u)*a)/a}}return t}}),O=m((t,e)=>{var i=S();function r(t,e,r,o,n){i.call(this,t,e,r,o),this.iter=n}e.exports=r,r.prototype=Object.create(i.prototype),r.constructor=r}),V=m((t,e)=>{var i=S(),r=O();function o(t){this.model=null,this.matrix=null,this.width=0,this.height=0,this.costRowIndex=0,this.rhsColumn=0,this.variablesPerIndex=[],this.unrestrictedVars=null,this.feasible=!0,this.evaluation=0,this.simplexIters=0,this.varIndexByRow=null,this.varIndexByCol=null,this.rowByVarIndex=null,this.colByVarIndex=null,this.precision=t||1e-8,this.optionalObjectives=[],this.objectivesByPriority={},this.savedState=null,this.availableIndexes=[],this.lastElementIndex=0,this.variables=null,this.nVars=0,this.bounded=!0,this.unboundedVarIndex=null,this.branchAndCutIterations=0}function n(t,e){this.priority=t,this.reducedCosts=Array(e);for(var i=0;i<e;i+=1)this.reducedCosts[i]=0}e.exports=o,o.prototype.solve=function(){return this.model.getNumberOfIntegerVariables()>0?this.branchAndCut():this.simplex(),this.updateVariableValues(),this.getSolution()},n.prototype.copy=function(){var t=new n(this.priority,this.reducedCosts.length);return t.reducedCosts=this.reducedCosts.slice(),t},o.prototype.setOptionalObjective=function(t,e,i){var r=this.objectivesByPriority[t];void 0===r&&(r=new n(t,Math.max(this.width,e+1)),this.objectivesByPriority[t]=r,this.optionalObjectives.push(r),this.optionalObjectives.sort(function(t,e){return t.priority-e.priority})),r.reducedCosts[e]=i},o.prototype.initialize=function(t,e,i,r){this.variables=i,this.unrestrictedVars=r,this.width=t,this.height=e;for(var o=Array(t),n=0;n<t;n++)o[n]=0;this.matrix=Array(e);for(var s=0;s<e;s++)this.matrix[s]=o.slice();this.varIndexByRow=Array(this.height),this.varIndexByCol=Array(this.width),this.varIndexByRow[0]=-1,this.varIndexByCol[0]=-1,this.nVars=t+e-2,this.rowByVarIndex=Array(this.nVars),this.colByVarIndex=Array(this.nVars),this.lastElementIndex=this.nVars},o.prototype._resetMatrix=function(){var t,e,i=this.model.variables,r=this.model.constraints,o=i.length,n=r.length,s=this.matrix[0],a=!0===this.model.isMinimization?-1:1;for(t=0;t<o;t+=1){var l=i[t],h=l.priority,u=a*l.cost;0===h?s[t+1]=u:this.setOptionalObjective(h,t+1,u),e=i[t].index,this.rowByVarIndex[e]=-1,this.colByVarIndex[e]=t+1,this.varIndexByCol[t+1]=e}for(var f=1,d=0;d<n;d+=1){var c=r[d],p=c.index;this.rowByVarIndex[p]=f,this.colByVarIndex[p]=-1,this.varIndexByRow[f]=p;var g,y,v,m=c.terms,b=m.length,w=this.matrix[f++];if(c.isUpperBound){for(g=0;g<b;g+=1)y=m[g],w[this.colByVarIndex[y.variable.index]]=y.coefficient;w[0]=c.rhs}else{for(g=0;g<b;g+=1)y=m[g],w[this.colByVarIndex[y.variable.index]]=-y.coefficient;w[0]=-c.rhs}}},o.prototype.setModel=function(t){this.model=t;var e=t.nVariables+1,i=t.nConstraints+1;return this.initialize(e,i,t.variables,t.unrestrictedVariables),this._resetMatrix(),this},o.prototype.getNewElementIndex=function(){if(this.availableIndexes.length>0)return this.availableIndexes.pop();var t=this.lastElementIndex;return this.lastElementIndex+=1,t},o.prototype.density=function(){for(var t=0,e=this.matrix,i=0;i<this.height;i++)for(var r=e[i],o=0;o<this.width;o++)0!==r[o]&&(t+=1);return t/(this.height*this.width)},o.prototype.setEvaluation=function(){var t=Math.round(1/this.precision),e=Math.round((Number.EPSILON+this.matrix[this.costRowIndex][this.rhsColumn])*t)/t;this.evaluation=e,0===this.simplexIters&&(this.bestPossibleEval=e)},o.prototype.getSolution=function(){var t=!0===this.model.isMinimization?this.evaluation:-this.evaluation;return this.model.getNumberOfIntegerVariables()>0?new r(this,t,this.feasible,this.bounded,this.branchAndCutIterations):new i(this,t,this.feasible,this.bounded)}}),z=m(()=>{var t=V();t.prototype.simplex=function(){return this.bounded=!0,this.phase1(),!0===this.feasible&&this.phase2(),this},t.prototype.phase1=function(){for(var t,e=this.model.checkForCycles,i=[],r=this.matrix,o=this.rhsColumn,n=this.width-1,s=this.height-1,a=0;;){for(var l=0,h=-this.precision,u=1;u<=s;u++){this.unrestrictedVars[this.varIndexByRow[u]];var f=r[u][o];f<h&&(h=f,l=u)}if(0===l)return this.feasible=!0,a;for(var d=0,c=-1/0,p=r[0],g=r[l],y=1;y<=n;y++){var v=g[y];if(!0===this.unrestrictedVars[this.varIndexByCol[y]]||v<-this.precision){var m=-p[y]/v;c<m&&(c=m,d=y)}}if(0===d)return this.feasible=!1,a;if(e){i.push([this.varIndexByRow[l],this.varIndexByCol[d]]);var b=this.checkForCycles(i);if(b.length>0)return this.model.messages.push("Cycle in phase 1"),this.model.messages.push("Start :"+b[0]),this.model.messages.push("Length :"+b[1]),this.feasible=!1,a}this.pivot(l,d),a+=1}},t.prototype.phase2=function(){for(var t,e,i=this.model.checkForCycles,r=[],o=this.matrix,n=this.rhsColumn,s=this.width-1,a=this.height-1,l=this.precision,h=this.optionalObjectives.length,u=null,f=0;;){var d=o[this.costRowIndex];h>0&&(u=[]);for(var c=0,p=l,g=!1,y=1;y<=s;y++){if(t=d[y],e=!0===this.unrestrictedVars[this.varIndexByCol[y]],h>0&&-l<t&&t<l){u.push(y);continue}if(e&&t<0){-t>p&&(p=-t,c=y,g=!0);continue}t>p&&(p=t,c=y,g=!1)}if(h>0)for(var v=0;0===c&&u.length>0&&v<h;){var m=[],b=this.optionalObjectives[v].reducedCosts;p=l;for(var w=0;w<u.length;w++){if(t=b[y=u[w]],e=!0===this.unrestrictedVars[this.varIndexByCol[y]],-l<t&&t<l){m.push(y);continue}if(e&&t<0){-t>p&&(p=-t,c=y,g=!0);continue}t>p&&(p=t,c=y,g=!1)}u=m,v+=1}if(0===c)return this.setEvaluation(),this.simplexIters+=1,f;for(var x=0,k=1/0,I=(this.varIndexByRow,1);I<=a;I++){var M=o[I],C=M[n],$=M[c];if(!(-l<$&&$<l)){if($>0&&l>C&&C>-l){k=0,x=I;break}var B=g?-C/$:C/$;B>l&&k>B&&(k=B,x=I)}}if(k===1/0)return this.evaluation=-1/0,this.bounded=!1,this.unboundedVarIndex=this.varIndexByCol[c],f;if(i){r.push([this.varIndexByRow[x],this.varIndexByCol[c]]);var S=this.checkForCycles(r);if(S.length>0)return this.model.messages.push("Cycle in phase 2"),this.model.messages.push("Start :"+S[0]),this.model.messages.push("Length :"+S[1]),this.feasible=!1,f}this.pivot(x,c,!0),f+=1}};var e=[];t.prototype.pivot=function(t,i){var r=this.matrix,o=r[t][i],n=this.height-1,s=this.width-1,a=this.varIndexByRow[t],l=this.varIndexByCol[i];this.varIndexByRow[t]=l,this.varIndexByCol[i]=a,this.rowByVarIndex[l]=t,this.rowByVarIndex[a]=-1,this.colByVarIndex[l]=-1,this.colByVarIndex[a]=i;for(var h=r[t],u=0,f=0;f<=s;f++)h[f]>=-1e-16&&h[f]<=1e-16?h[f]=0:(h[f]/=o,e[u]=f,u+=1);h[i]=1/o,this.precision;for(var d,c,p,g=0;g<=n;g++)if(g!==t&&!(r[g][i]>=-1e-16&&r[g][i]<=1e-16)){var y=r[g];if((d=y[i])>=-1e-16&&d<=1e-16)0!==d&&(y[i]=0);else{for(c=0;c<u;c++)(p=h[f=e[c]])>=-1e-16&&p<=1e-16?0!==p&&(h[f]=0):y[f]=y[f]-d*p;y[i]=-d/o}}var v=this.optionalObjectives.length;if(v>0)for(var m=0;m<v;m+=1){var b=this.optionalObjectives[m].reducedCosts;if(0!==(d=b[i])){for(c=0;c<u;c++)0!==(p=h[f=e[c]])&&(b[f]=b[f]-d*p);b[i]=-d/o}}},t.prototype.checkForCycles=function(t){for(var e=0;e<t.length-1;e++)for(var i=e+1;i<t.length;i++){var r=t[e],o=t[i];if(r[0]===o[0]&&r[1]===o[1]){if(i-e>t.length-i)break;for(var n=!0,s=1;s<i-e;s++){var a=t[e+s],l=t[i+s];if(a[0]!==l[0]||a[1]!==l[1]){n=!1;break}}if(n)return[e,i-e]}}return[]}}),_=m((t,e)=>{function i(t,e,i,r){this.id=t,this.cost=e,this.index=i,this.value=0,this.priority=r}function r(t,e,r,o){i.call(this,t,e,r,o)}function o(t,e){i.call(this,t,0,e,0)}function n(t,e){this.variable=t,this.coefficient=e}function s(t,e,i){return 0===i||"required"===i?null:(e=e||1,i=i||1,!1===t.isMinimization&&(e=-e),t.addVariable(e,"r"+t.relaxationIndex++,!1,!1,i))}function a(t,e,i,r){this.slack=new o("s"+i,i),this.index=i,this.model=r,this.rhs=t,this.isUpperBound=e,this.terms=[],this.termsByVarIndex={},this.relaxation=null}function l(t,e){this.upperBound=t,this.lowerBound=e,this.model=t.model,this.rhs=t.rhs,this.relaxation=null}r.prototype.isInteger=!0,o.prototype.isSlack=!0,a.prototype.addTerm=function(t,e){var i=e.index,r=this.termsByVarIndex[i];if(void 0===r)r=new n(e,t),this.termsByVarIndex[i]=r,this.terms.push(r),!0===this.isUpperBound&&(t=-t),this.model.updateConstraintCoefficient(this,e,t);else{var o=r.coefficient+t;this.setVariableCoefficient(o,e)}return this},a.prototype.removeTerm=function(t){return this},a.prototype.setRightHandSide=function(t){if(t!==this.rhs){var e=t-this.rhs;!0===this.isUpperBound&&(e=-e),this.rhs=t,this.model.updateRightHandSide(this,e)}return this},a.prototype.setVariableCoefficient=function(t,e){var i=e.index;if(-1===i)return void console.warn("[Constraint.setVariableCoefficient] Trying to change coefficient of inexistant variable.");var r=this.termsByVarIndex[i];if(void 0===r)this.addTerm(t,e);else if(t!==r.coefficient){var o=t-r.coefficient;!0===this.isUpperBound&&(o=-o),r.coefficient=t,this.model.updateConstraintCoefficient(this,e,o)}return this},a.prototype.relax=function(t,e){this.relaxation=s(this.model,t,e),this._relax(this.relaxation)},a.prototype._relax=function(t){null!==t&&(this.isUpperBound?this.setVariableCoefficient(-1,t):this.setVariableCoefficient(1,t))},l.prototype.isEquality=!0,l.prototype.addTerm=function(t,e){return this.upperBound.addTerm(t,e),this.lowerBound.addTerm(t,e),this},l.prototype.removeTerm=function(t){return this.upperBound.removeTerm(t),this.lowerBound.removeTerm(t),this},l.prototype.setRightHandSide=function(t){this.upperBound.setRightHandSide(t),this.lowerBound.setRightHandSide(t),this.rhs=t},l.prototype.relax=function(t,e){this.relaxation=s(this.model,t,e),this.upperBound.relaxation=this.relaxation,this.upperBound._relax(this.relaxation),this.lowerBound.relaxation=this.relaxation,this.lowerBound._relax(this.relaxation)},e.exports={Constraint:a,Variable:i,IntegerVariable:r,SlackVariable:o,Equality:l,Term:n}}),j=m(()=>{var t=V(),e=_().SlackVariable;t.prototype.addCutConstraints=function(t){for(var i=t.length,r=this.height,o=r+i,n=r;n<o;n+=1)void 0===this.matrix[n]&&(this.matrix[n]=this.matrix[n-1].slice());this.height=o,this.nVars=this.width+this.height-2;for(var s,a=this.width-1,l=0;l<i;l+=1){var h=t[l],u=r+l,f="min"===h.type?-1:1,d=h.varIndex,c=this.rowByVarIndex[d],p=this.matrix[u];if(-1===c){for(p[this.rhsColumn]=f*h.value,s=1;s<=a;s+=1)p[s]=0;p[this.colByVarIndex[d]]=f}else{var g=this.matrix[c],y=g[this.rhsColumn];for(p[this.rhsColumn]=f*(h.value-y),s=1;s<=a;s+=1)p[s]=-f*g[s]}var v=this.getNewElementIndex();this.varIndexByRow[u]=v,this.rowByVarIndex[v]=u,this.colByVarIndex[v]=-1,this.variablesPerIndex[v]=new e("s"+v,v),this.nVars+=1}},t.prototype._addLowerBoundMIRCut=function(t){if(t===this.costRowIndex)return!1;this.model;var i=this.matrix;if(!this.variablesPerIndex[this.varIndexByRow[t]].isInteger)return!1;var r=i[t][this.rhsColumn],o=r-Math.floor(r);if(o<this.precision||1-this.precision<o)return!1;var n=this.height;i[n]=i[n-1].slice(),this.height+=1,this.nVars+=1;var s=this.getNewElementIndex();this.varIndexByRow[n]=s,this.rowByVarIndex[s]=n,this.colByVarIndex[s]=-1,this.variablesPerIndex[s]=new e("s"+s,s),i[n][this.rhsColumn]=Math.floor(r);for(var a=1;a<this.varIndexByCol.length;a+=1)if(this.variablesPerIndex[this.varIndexByCol[a]].isInteger){var l=i[t][a],h=Math.floor(l)+Math.max(0,l-Math.floor(l)-o)/(1-o);i[n][a]=h}else i[n][a]=Math.min(0,i[t][a]/(1-o));for(var u=0;u<this.width;u+=1)i[n][u]-=i[t][u];return!0},t.prototype._addUpperBoundMIRCut=function(t){if(t===this.costRowIndex)return!1;this.model;var i=this.matrix;if(!this.variablesPerIndex[this.varIndexByRow[t]].isInteger)return!1;var r=i[t][this.rhsColumn],o=r-Math.floor(r);if(o<this.precision||1-this.precision<o)return!1;var n=this.height;i[n]=i[n-1].slice(),this.height+=1,this.nVars+=1;var s=this.getNewElementIndex();this.varIndexByRow[n]=s,this.rowByVarIndex[s]=n,this.colByVarIndex[s]=-1,this.variablesPerIndex[s]=new e("s"+s,s),i[n][this.rhsColumn]=-o;for(var a=1;a<this.varIndexByCol.length;a+=1){var l=this.variablesPerIndex[this.varIndexByCol[a]],h=i[t][a],u=h-Math.floor(h);l.isInteger?u<=o?i[n][a]=-u:i[n][a]=-(1-u)*o/u:h>=0?i[n][a]=-h:i[n][a]=h*o/(1-o)}return!0},t.prototype.applyMIRCuts=function(){}}),E=m(()=>{var t=V();t.prototype._putInBase=function(t){var e=this.rowByVarIndex[t];if(-1===e){for(var i=this.colByVarIndex[t],r=1;r<this.height;r+=1){var o=this.matrix[r][i];if(o<-this.precision||this.precision<o){e=r;break}}this.pivot(e,i)}return e},t.prototype._takeOutOfBase=function(t){var e=this.colByVarIndex[t];if(-1===e){for(var i=this.rowByVarIndex[t],r=this.matrix[i],o=1;o<this.height;o+=1){var n=r[o];if(n<-this.precision||this.precision<n){e=o;break}}this.pivot(i,e)}return e},t.prototype.updateVariableValues=function(){for(var t=this.variables.length,e=Math.round(1/this.precision),i=0;i<t;i+=1){var r=this.variables[i],o=r.index,n=this.rowByVarIndex[o];-1===n?r.value=0:r.value=Math.round((this.matrix[n][this.rhsColumn]+Number.EPSILON)*e)/e}},t.prototype.updateRightHandSide=function(t,e){var i=this.height-1,r=this.rowByVarIndex[t.index];if(-1===r){for(var o=this.colByVarIndex[t.index],n=0;n<=i;n+=1){var s=this.matrix[n];s[this.rhsColumn]-=e*s[o]}var a=this.optionalObjectives.length;if(a>0)for(var l=0;l<a;l+=1){var h=this.optionalObjectives[l].reducedCosts;h[this.rhsColumn]-=e*h[o]}}else this.matrix[r][this.rhsColumn]-=e},t.prototype.updateConstraintCoefficient=function(t,e,i){if(t.index===e.index)throw Error("[Tableau.updateConstraintCoefficient] constraint index should not be equal to variable index !");var r=this._putInBase(t.index),o=this.colByVarIndex[e.index];if(-1===o)for(var n=this.rowByVarIndex[e.index],s=0;s<this.width;s+=1)this.matrix[r][s]+=i*this.matrix[n][s];else this.matrix[r][o]-=i},t.prototype.updateCost=function(t,e){var i=t.index,r=this.width-1,o=this.colByVarIndex[i];if(-1===o){var n,s=this.matrix[this.rowByVarIndex[i]];if(0===t.priority){var a=this.matrix[0];for(n=0;n<=r;n+=1)a[n]+=e*s[n]}else{var l=this.objectivesByPriority[t.priority].reducedCosts;for(n=0;n<=r;n+=1)l[n]+=e*s[n]}}else this.matrix[0][o]-=e},t.prototype.addConstraint=function(t){var e=t.isUpperBound?1:-1,i=this.height,r=this.matrix[i];void 0===r&&(r=this.matrix[0].slice(),this.matrix[i]=r);for(var o=this.width-1,n=0;n<=o;n+=1)r[n]=0;r[this.rhsColumn]=e*t.rhs;for(var s=t.terms,a=s.length,l=0;l<a;l+=1){var h=s[l],u=h.coefficient,f=h.variable.index,d=this.rowByVarIndex[f];if(-1===d)r[this.colByVarIndex[f]]+=e*u;else{var c=this.matrix[d];for(c[this.rhsColumn],n=0;n<=o;n+=1)r[n]-=e*u*c[n]}}var p=t.index;this.varIndexByRow[i]=p,this.rowByVarIndex[p]=i,this.colByVarIndex[p]=-1,this.height+=1},t.prototype.removeConstraint=function(t){var e=t.index,i=this.height-1,r=this._putInBase(e),o=this.matrix[i];this.matrix[i]=this.matrix[r],this.matrix[r]=o,this.varIndexByRow[r]=this.varIndexByRow[i],this.varIndexByRow[i]=-1,this.rowByVarIndex[e]=-1,this.availableIndexes[this.availableIndexes.length]=e,t.slack.index=-1,this.height-=1},t.prototype.addVariable=function(t){var e=this.height-1,i=this.width,r=!0===this.model.isMinimization?-t.cost:t.cost,o=t.priority,n=this.optionalObjectives.length;if(n>0)for(var s=0;s<n;s+=1)this.optionalObjectives[s].reducedCosts[i]=0;0===o?this.matrix[0][i]=r:(this.setOptionalObjective(o,i,r),this.matrix[0][i]=0);for(var a=1;a<=e;a+=1)this.matrix[a][i]=0;var l=t.index;this.varIndexByCol[i]=l,this.rowByVarIndex[l]=-1,this.colByVarIndex[l]=i,this.width+=1},t.prototype.removeVariable=function(t){var e=t.index,i=this._takeOutOfBase(e),r=this.width-1;if(i!==r){for(var o=this.height-1,n=0;n<=o;n+=1){var s=this.matrix[n];s[i]=s[r]}var a=this.optionalObjectives.length;if(a>0)for(var l=0;l<a;l+=1){var h=this.optionalObjectives[l].reducedCosts;h[i]=h[r]}var u=this.varIndexByCol[r];this.varIndexByCol[i]=u,this.colByVarIndex[u]=i}this.varIndexByCol[r]=-1,this.colByVarIndex[e]=-1,this.availableIndexes[this.availableIndexes.length]=e,t.index=-1,this.width-=1}}),L=m(()=>{V().prototype.log=function(t,e){console.log("****",t,"****"),console.log("Nb Variables",this.width-1),console.log("Nb Constraints",this.height-1),console.log("Basic Indexes",this.varIndexByRow),console.log("Non Basic Indexes",this.varIndexByCol),console.log("Rows",this.rowByVarIndex),console.log("Cols",this.colByVarIndex);var i,r,o,n,s,a,l,h,u,f,d,c="",p=[" "];for(r=1;r<this.width;r+=1)s=this.varIndexByCol[r],l=(a=void 0===(n=this.variablesPerIndex[s])?"c"+s:n.id).length,h=" ",u=" ",l>5?h+=" ":u+=" ",p[r]=h,c+=u+a;console.log(c);var g,y=this.matrix[this.costRowIndex],v=" ";for(i=1;i<this.width;i+=1)v+=" ",v+=p[i],v+=y[i].toFixed(5);for(console.log((v+=" "+p[0]+y[0].toFixed(5))+" Z"),o=1;o<this.height;o+=1){for(f=this.matrix[o],d=" ",r=1;r<this.width;r+=1)d+=" "+p[r]+f[r].toFixed(5);d+=" "+p[0]+f[0].toFixed(5),s=this.varIndexByRow[o],console.log(d+" "+(a=void 0===(n=this.variablesPerIndex[s])?"c"+s:n.id))}console.log("");var m=this.optionalObjectives.length;if(m>0){console.log(" Optional objectives:");for(var b=0;b<m;b+=1){var w=this.optionalObjectives[b].reducedCosts,x="";for(i=1;i<this.width;i+=1)x+=w[i]<0?"":" ",x+=p[i],x+=w[i].toFixed(5);console.log((x+=(w[0]<0?"":" ")+p[0]+w[0].toFixed(5))+" z"+b)}}return console.log("Feasible?",this.feasible),console.log("evaluation",this.evaluation),this}}),T=m(()=>{var t=V();t.prototype.copy=function(){var e=new t(this.precision);e.width=this.width,e.height=this.height,e.nVars=this.nVars,e.model=this.model,e.variables=this.variables,e.variablesPerIndex=this.variablesPerIndex,e.unrestrictedVars=this.unrestrictedVars,e.lastElementIndex=this.lastElementIndex,e.varIndexByRow=this.varIndexByRow.slice(),e.varIndexByCol=this.varIndexByCol.slice(),e.rowByVarIndex=this.rowByVarIndex.slice(),e.colByVarIndex=this.colByVarIndex.slice(),e.availableIndexes=this.availableIndexes.slice();for(var i=[],r=0;r<this.optionalObjectives.length;r++)i[r]=this.optionalObjectives[r].copy();e.optionalObjectives=i;for(var o=this.matrix,n=Array(this.height),s=0;s<this.height;s++)n[s]=o[s].slice();return e.matrix=n,e},t.prototype.save=function(){this.savedState=this.copy()},t.prototype.restore=function(){if(null!==this.savedState){var t,e,i=this.savedState,r=i.matrix;for(this.nVars=i.nVars,this.model=i.model,this.variables=i.variables,this.variablesPerIndex=i.variablesPerIndex,this.unrestrictedVars=i.unrestrictedVars,this.lastElementIndex=i.lastElementIndex,this.width=i.width,this.height=i.height,t=0;t<this.height;t+=1){var o=r[t],n=this.matrix[t];for(e=0;e<this.width;e+=1)n[e]=o[e]}var s=i.varIndexByRow;for(e=0;e<this.height;e+=1)this.varIndexByRow[e]=s[e];for(;this.varIndexByRow.length>this.height;)this.varIndexByRow.pop();var a=i.varIndexByCol;for(t=0;t<this.width;t+=1)this.varIndexByCol[t]=a[t];for(;this.varIndexByCol.length>this.width;)this.varIndexByCol.pop();for(var l=i.rowByVarIndex,h=i.colByVarIndex,u=0;u<this.nVars;u+=1)this.rowByVarIndex[u]=l[u],this.colByVarIndex[u]=h[u];if(i.optionalObjectives.length>0&&this.optionalObjectives.length>0){this.optionalObjectives=[],this.optionalObjectivePerPriority={};for(var f=0;f<i.optionalObjectives.length;f++){var d=i.optionalObjectives[f].copy();this.optionalObjectives[f]=d,this.optionalObjectivePerPriority[d.priority]=d}}}}}),R=m(()=>{var t=V();function e(t,e){this.index=t,this.value=e}t.prototype.getMostFractionalVar=function(){for(var t=0,i=null,r=null,o=this.model.integerVariables,n=o.length,s=0;s<n;s++){var a=o[s].index,l=this.rowByVarIndex[a];if(-1!==l){var h=this.matrix[l][this.rhsColumn],u=Math.abs(h-Math.round(h));t<u&&(t=u,i=a,r=h)}}return new e(i,r)},t.prototype.getFractionalVarWithLowestCost=function(){for(var t=1/0,i=null,r=null,o=this.model.integerVariables,n=o.length,s=0;s<n;s++){var a=o[s],l=a.index,h=this.rowByVarIndex[l];if(-1!==h){var u=this.matrix[h][this.rhsColumn];if(Math.abs(u-Math.round(u))>this.precision){var f=a.cost;t>f&&(t=f,i=l,r=u)}}}return new e(i,r)}}),D=m(()=>{var t=V();t.prototype.countIntegerValues=function(){for(var t=0,e=1;e<this.height;e+=1)if(this.variablesPerIndex[this.varIndexByRow[e]].isInteger){var i=this.matrix[e][this.rhsColumn];(i-=Math.floor(i))<this.precision&&-i<this.precision&&(t+=1)}return t},t.prototype.isIntegral=function(){for(var t=this.model.integerVariables,e=t.length,i=0;i<e;i++){var r=this.rowByVarIndex[t[i].index];if(-1!==r){var o=this.matrix[r][this.rhsColumn];if(Math.abs(o-Math.round(o))>this.precision)return!1}}return!0},t.prototype.computeFractionalVolume=function(t){for(var e=-1,i=1;i<this.height;i+=1)if(this.variablesPerIndex[this.varIndexByRow[i]].isInteger){var r=this.matrix[i][this.rhsColumn];if(Math.min((r=Math.abs(r))-Math.floor(r),Math.floor(r+1))<this.precision){if(!t)return 0}else -1===e?e=r:e*=r}return -1===e?0:e}}),N=m((t,e)=>{z(),j(),E(),L(),T(),R(),D(),e.exports=V()}),P=m(()=>{var t=V();function e(t,e,i){this.type=t,this.varIndex=e,this.value=i}function i(t,e){this.relaxedEvaluation=t,this.cuts=e}function r(t,e){return e.relaxedEvaluation-t.relaxedEvaluation}t.prototype.applyCuts=function(t){if(this.restore(),this.addCutConstraints(t),this.simplex(),this.model.useMIRCuts)for(var e=!0;e;){var i=this.computeFractionalVolume(!0);this.applyMIRCuts(),this.simplex(),this.computeFractionalVolume(!0)>=.9*i&&(e=!1)}},t.prototype.branchAndCut=function(){var t=[],o=0,n=this.model.tolerance,s=!0,a=1e99;this.model.timeout&&(a=Date.now()+this.model.timeout);for(var l=1/0,h=null,u=[],f=0;f<this.optionalObjectives.length;f+=1)u.push(1/0);var d,c=new i(-1/0,[]);for(t.push(c);t.length>0&&!0===s&&Date.now()<a;)if(d=this.model.isMinimization?this.bestPossibleEval*(1+n):this.bestPossibleEval*(1-n),n>0&&l<d&&(s=!1),!((c=t.pop()).relaxedEvaluation>l)){var p=c.cuts;if(this.applyCuts(p),o++,!1!==this.feasible){var g=this.evaluation;if(!(g>l)){if(g===l){for(var y=!0,v=0;v<this.optionalObjectives.length&&!(this.optionalObjectives[v].reducedCosts[0]>u[v]);v+=1)if(this.optionalObjectives[v].reducedCosts[0]<u[v]){y=!1;break}if(y)continue}if(!0===this.isIntegral()){if(this.__isIntegral=!0,1===o){this.branchAndCutIterations=o;return}h=c,l=g;for(var m=0;m<this.optionalObjectives.length;m+=1)u[m]=this.optionalObjectives[m].reducedCosts[0]}else{1===o&&this.save();for(var b=this.getMostFractionalVar(),w=b.index,x=[],k=[],I=p.length,M=0;M<I;M+=1){var C=p[M];C.varIndex===w?"min"===C.type?k.push(C):x.push(C):(x.push(C),k.push(C))}var $=Math.ceil(b.value),B=Math.floor(b.value),S=new e("min",w,$);x.push(S);var O=new e("max",w,B);k.push(O),t.push(new i(g,x)),t.push(new i(g,k)),t.sort(r)}}}}null!==h&&this.applyCuts(h.cuts),this.branchAndCutIterations=o}}),A=m((t,e)=>{var i=V(),r=(P(),_()),o=r.Constraint,n=r.Equality,s=r.Variable,a=r.IntegerVariable;function l(t,e){this.tableau=new i(t),this.name=e,this.variables=[],this.integerVariables=[],this.unrestrictedVariables={},this.constraints=[],this.nConstraints=0,this.nVariables=0,this.isMinimization=!0,this.tableauInitialized=!1,this.relaxationIndex=1,this.useMIRCuts=!1,this.checkForCycles=!0,this.messages=[]}r.Term,e.exports=l,l.prototype.minimize=function(){return this.isMinimization=!0,this},l.prototype.maximize=function(){return this.isMinimization=!1,this},l.prototype._getNewElementIndex=function(){if(this.availableIndexes.length>0)return this.availableIndexes.pop();var t=this.lastElementIndex;return this.lastElementIndex+=1,t},l.prototype._addConstraint=function(t){var e=t.slack;this.tableau.variablesPerIndex[e.index]=e,this.constraints.push(t),this.nConstraints+=1,!0===this.tableauInitialized&&this.tableau.addConstraint(t)},l.prototype.smallerThan=function(t){var e=new o(t,!0,this.tableau.getNewElementIndex(),this);return this._addConstraint(e),e},l.prototype.greaterThan=function(t){var e=new o(t,!1,this.tableau.getNewElementIndex(),this);return this._addConstraint(e),e},l.prototype.equal=function(t){var e=new o(t,!0,this.tableau.getNewElementIndex(),this);this._addConstraint(e);var i=new o(t,!1,this.tableau.getNewElementIndex(),this);return this._addConstraint(i),new n(e,i)},l.prototype.addVariable=function(t,e,i,r,o){if("string"==typeof o)switch(o){case"required":default:o=0;break;case"strong":o=1;break;case"medium":o=2;break;case"weak":o=3}var n,l=this.tableau.getNewElementIndex();return null==e&&(e="v"+l),null==t&&(t=0),null==o&&(o=0),i?(n=new a(e,t,l,o),this.integerVariables.push(n)):n=new s(e,t,l,o),this.variables.push(n),this.tableau.variablesPerIndex[l]=n,r&&(this.unrestrictedVariables[l]=!0),this.nVariables+=1,!0===this.tableauInitialized&&this.tableau.addVariable(n),n},l.prototype._removeConstraint=function(t){var e=this.constraints.indexOf(t);if(-1===e)return void console.warn("[Model.removeConstraint] Constraint not present in model");this.constraints.splice(e,1),this.nConstraints-=1,!0===this.tableauInitialized&&this.tableau.removeConstraint(t),t.relaxation&&this.removeVariable(t.relaxation)},l.prototype.removeConstraint=function(t){return t.isEquality?(this._removeConstraint(t.upperBound),this._removeConstraint(t.lowerBound)):this._removeConstraint(t),this},l.prototype.removeVariable=function(t){var e=this.variables.indexOf(t);return -1===e?void console.warn("[Model.removeVariable] Variable not present in model"):(this.variables.splice(e,1),!0===this.tableauInitialized&&this.tableau.removeVariable(t),this)},l.prototype.updateRightHandSide=function(t,e){return!0===this.tableauInitialized&&this.tableau.updateRightHandSide(t,e),this},l.prototype.updateConstraintCoefficient=function(t,e,i){return!0===this.tableauInitialized&&this.tableau.updateConstraintCoefficient(t,e,i),this},l.prototype.setCost=function(t,e){var i=t-e.cost;return!1===this.isMinimization&&(i=-i),e.cost=t,this.tableau.updateCost(e,i),this},l.prototype.loadJson=function(t){this.isMinimization="max"!==t.opType;for(var e=t.variables,i=t.constraints,r={},o={},s=Object.keys(i),a=s.length,l=0;l<a;l+=1){var h,u,f=s[l],d=i[f],c=d.equal,p=d.weight,g=d.priority,y=void 0!==p||void 0!==g;if(void 0===c){var v=d.min;void 0!==v&&(h=this.greaterThan(v),r[f]=h,y&&h.relax(p,g));var m=d.max;void 0!==m&&(u=this.smallerThan(m),o[f]=u,y&&u.relax(p,g))}else{h=this.greaterThan(c),r[f]=h,u=this.smallerThan(c),o[f]=u;var b=new n(h,u);y&&b.relax(p,g)}}var w=Object.keys(e),x=w.length;this.tolerance=t.tolerance||0,t.timeout&&(this.timeout=t.timeout),t.options&&(t.options.timeout&&(this.timeout=t.options.timeout),0===this.tolerance&&(this.tolerance=t.options.tolerance||0),t.options.useMIRCuts&&(this.useMIRCuts=t.options.useMIRCuts),void 0===t.options.exitOnCycles?this.checkForCycles=!0:this.checkForCycles=t.options.exitOnCycles);for(var k=t.ints||{},I=t.binaries||{},M=t.unrestricted||{},C=t.optimize,$=0;$<x;$+=1){var B=w[$],S=e[B],O=S[C]||0,V=!!I[B],z=!!k[B]||V,_=!!M[B],j=this.addVariable(O,B,z,_);V&&this.smallerThan(1).addTerm(1,j);var E=Object.keys(S);for(l=0;l<E.length;l+=1){var L=E[l];if(L!==C){var T=S[L],R=r[L];void 0!==R&&R.addTerm(T,j);var D=o[L];void 0!==D&&D.addTerm(T,j)}}}return this},l.prototype.getNumberOfIntegerVariables=function(){return this.integerVariables.length},l.prototype.solve=function(){return!1===this.tableauInitialized&&(this.tableau.setModel(this),this.tableauInitialized=!0),this.tableau.solve()},l.prototype.isFeasible=function(){return this.tableau.feasible},l.prototype.save=function(){return this.tableau.save()},l.prototype.restore=function(){return this.tableau.restore()},l.prototype.activateMIRCuts=function(t){this.useMIRCuts=t},l.prototype.debug=function(t){this.checkForCycles=t},l.prototype.log=function(t){return this.tableau.log(t)}}),W=m(t=>{t.CleanObjectiveAttributes=function(t){var e,i,r;if("string"==typeof t.optimize)if(!t.constraints[t.optimize])return t;else{for(i in e=Math.random(),t.variables)t.variables[i][t.optimize]&&(t.variables[i][e]=t.variables[i][t.optimize]);return t.constraints[e]=t.constraints[t.optimize],delete t.constraints[t.optimize],t}for(r in t.optimize)if(t.constraints[r])if("equal"===t.constraints[r])delete t.optimize[r];else{for(i in e=Math.random(),t.variables)t.variables[i][r]&&(t.variables[i][e]=t.variables[i][r]);t.constraints[e]=t.constraints[r],delete t.constraints[r]}return t}}),F=m((t,e)=>{e.exports=function(t){return t.length?function(t){var e={is_objective:/(max|min)(imize){0,}\:/i,is_int:/^(?!\/\*)\W{0,}int/i,is_bin:/^(?!\/\*)\W{0,}bin/i,is_constraint:/(\>|\<){0,}\=/i,is_unrestricted:/^\S{0,}unrestricted/i,parse_lhs:/(\-|\+){0,1}\s{0,1}\d{0,}\.{0,}\d{0,}\s{0,}[A-Za-z]\S{0,}/gi,parse_rhs:/(\-|\+){0,1}\d{1,}\.{0,}\d{0,}\W{0,}\;{0,1}$/i,parse_dir:/(\>|\<){0,}\=/gi,parse_int:/[^\s|^\,]+/gi,parse_bin:/[^\s|^\,]+/gi,get_num:/(\-|\+){0,1}(\W|^)\d+\.{0,1}\d{0,}/g,get_word:/[A-Za-z].*/},i={opType:"",optimize:"_obj",constraints:{},variables:{}},r={">=":"min","<=":"max","=":"equal"},o="",n=null,s="",a="",l="",h=0;"string"==typeof t&&(t=t.split(`
|
2
|
+
`));for(var u=0;u<t.length;u++)if(l="__"+u,o=t[u],n=null,e.is_objective.test(o))i.opType=o.match(/(max|min)/gi)[0],(n=o.match(e.parse_lhs).map(function(t){return t.replace(/\s+/,"")}).slice(1)).forEach(function(t){s=parseFloat(s=null===(s=t.match(e.get_num))?"-"===t.substr(0,1)?-1:1:s[0]),a=t.match(e.get_word)[0].replace(/\;$/,""),i.variables[a]=i.variables[a]||{},i.variables[a]._obj=s});else if(e.is_int.test(o))n=o.match(e.parse_int).slice(1),i.ints=i.ints||{},n.forEach(function(t){t=t.replace(";",""),i.ints[t]=1});else if(e.is_bin.test(o))n=o.match(e.parse_bin).slice(1),i.binaries=i.binaries||{},n.forEach(function(t){t=t.replace(";",""),i.binaries[t]=1});else if(e.is_constraint.test(o)){var f=o.indexOf(":");(n=(-1===f?o:o.slice(f+1)).match(e.parse_lhs).map(function(t){return t.replace(/\s+/,"")})).forEach(function(t){s=parseFloat(s=null===(s=t.match(e.get_num))?"-"===t.substr(0,1)?-1:1:s[0]),a=t.match(e.get_word)[0],i.variables[a]=i.variables[a]||{},i.variables[a][l]=s}),h=parseFloat(o.match(e.parse_rhs)[0]),o=r[o.match(e.parse_dir)[0]],i.constraints[l]=i.constraints[l]||{},i.constraints[l][o]=h}else e.is_unrestricted.test(o)&&(n=o.match(e.parse_int).slice(1),i.unrestricted=i.unrestricted||{},n.forEach(function(t){t=t.replace(";",""),i.unrestricted[t]=1}));return i}(t):function(t){if(!t)throw Error("Solver requires a model to operate on");var e="",i={max:"<=",min:">=",equal:"="},r=RegExp("[^A-Za-z0-9_[{}/.&#$%~'@^]","gi");if(t.opType)for(var o in e+=t.opType+":",t.variables)t.variables[o][o]=t.variables[o][o]?t.variables[o][o]:1,t.variables[o][t.optimize]&&(e+=" "+t.variables[o][t.optimize]+" "+o.replace(r,"_"));else e+="max:";for(var n in e+=`;
|
3
|
+
|
4
|
+
`,t.constraints)for(var s in t.constraints[n])if(void 0!==i[s]){for(var a in t.variables)void 0!==t.variables[a][n]&&(e+=" "+t.variables[a][n]+" "+a.replace(r,"_"));e+=" "+i[s]+" "+t.constraints[n][s]+`;
|
5
|
+
`}if(t.ints)for(var l in e+=`
|
6
|
+
|
7
|
+
`,t.ints)e+="int "+l.replace(r,"_")+`;
|
8
|
+
`;if(t.unrestricted)for(var h in e+=`
|
9
|
+
|
10
|
+
`,t.unrestricted)e+="unrestricted "+h.replace(r,"_")+`;
|
11
|
+
`;return e}(t)}}),q=m(()=>{}),G=m(()=>{}),U=m(t=>{function e(t){return t=(t=(t=t.replace("\\r\\n",`\r
|
12
|
+
`)).split(`\r
|
13
|
+
`)).filter(function(t){var e;return!0!==RegExp(" 0$","gi").test(t)&&!1!==RegExp("\\d$","gi").test(t)}).map(function(t){return t.split(/\:{0,1} +(?=\d)/)}).reduce(function(t,e,i){return t[e[0]]=e[1],t},{})}t.reformat=F(),t.solve=function(t){return new Promise(function(i,r){"undefined"!=typeof window&&r("Function Not Available in Browser");var o=F()(t);t.external||r("Data for this function must be contained in the 'external' attribute. Not seeing anything there."),t.external.binPath||r("No Executable | Binary path provided in arguments as 'binPath'"),t.external.args||r("No arguments array for cli | bash provided on 'args' attribute"),t.external.tempName||r("No 'tempName' given. This is necessary to produce a staging file for the solver to operate on"),q().writeFile(t.external.tempName,o,function(o,n){if(o)r(o);else{var s=G().execFile;t.external.args.push(t.external.tempName),s(t.external.binPath,t.external.args,function(t,o){t?1===t.code?i(e(o)):r({code:t.code,meaning:{"-2":"Out of Memory",1:"SUBOPTIMAL",2:"INFEASIBLE",3:"UNBOUNDED",4:"DEGENERATE",5:"NUMFAILURE",6:"USER-ABORT",7:"TIMEOUT",9:"PRESOLVED",25:"ACCURACY ERROR",255:"FILE-ERROR"}[t.code],data:o}):i(e(o))})}})})}}),J=m((t,e)=>{e.exports={lpsolve:U()}}),H=m((t,e)=>{e.exports=function(t,e){var i,r,o,n,s,a=e.optimize,l=JSON.parse(JSON.stringify(e.optimize)),h=Object.keys(e.optimize),u=0,f={},d="",c={},p=[];for(delete e.optimize,r=0;r<h.length;r++)l[h[r]]=0;for(r=0;r<h.length;r++){for(s in e.optimize=h[r],e.opType=a[h[r]],i=t.Solve(e,void 0,void 0,!0),h)if(!e.variables[h[s]])for(n in i[h[s]]=i[h[s]]?i[h[s]]:0,e.variables)e.variables[n][h[s]]&&i[n]&&(i[h[s]]+=i[n]*e.variables[n][h[s]]);for(d="base",o=0;o<h.length;o++)i[h[o]]?d+="-"+(1e3*i[h[o]]|0)/1e3:d+="-0";if(!f[d]){for(f[d]=1,u++,o=0;o<h.length;o++)i[h[o]]&&(l[h[o]]+=i[h[o]]);delete i.feasible,delete i.result,p.push(i)}}for(r=0;r<h.length;r++)e.constraints[h[r]]={equal:l[h[r]]/u};for(r in e.optimize="cheater-"+Math.random(),e.opType="max",e.variables)e.variables[r].cheater=1;for(r in p)for(n in p[r])c[n]=c[n]||{min:1e99,max:-1e99};for(r in c)for(n in p)p[n][r]?(p[n][r]>c[r].max&&(c[r].max=p[n][r]),p[n][r]<c[r].min&&(c[r].min=p[n][r])):(p[n][r]=0,c[r].min=0);return{midpoint:i=t.Solve(e,void 0,void 0,!0),vertices:p,ranges:c}}}),Q=m((t,e)=>{var i=N(),r=A(),o=P(),n=_(),s=W(),a=n.Constraint,l=n.Variable,h=n.Numeral,u=n.Term,f=J(),d=function(){this.Model=r,this.branchAndCut=o,this.Constraint=a,this.Variable=l,this.Numeral=h,this.Term=u,this.Tableau=i,this.lastSolvedModel=null,this.External=f,this.Solve=function(t,e,i,o){if(o)for(var n in s)t=s[n](t);if(!t)throw Error("Solver requires a model to operate on");if("object"==typeof t.optimize&&Object.keys(t.optimize>1))return H()(this,t);if(t.external){var a=Object.keys(f);if(a=JSON.stringify(a),!t.external.solver)throw Error("The model you provided has an 'external' object that doesn't have a solver attribute. Use one of the following:"+a);if(!f[t.external.solver])throw Error("No support (yet) for "+t.external.solver+". Please use one of these instead:"+a);return f[t.external.solver].solve(t)}t instanceof r||(t=new r(e).loadJson(t));var l=t.solve();if(this.lastSolvedModel=t,l.solutionSet=l.generateSolutionSet(),i)return l;var h={};return h.feasible=l.feasible,h.result=l.evaluation,h.bounded=l.bounded,l._tableau.__isIntegral&&(h.isIntegral=!0),Object.keys(l.solutionSet).forEach(function(t){0!==l.solutionSet[t]&&(h[t]=l.solutionSet[t])}),h},this.ReformatLP=F(),this.MultiObjective=function(t){return H()(this,t)}};"function"==typeof define?define([],function(){return new d}):"object"==typeof window?window.solver=new d:"object"==typeof self&&(self.solver=new d),e.exports=new d}),Y=m((t,e)=>{var i,r,o=1e-60;do o+=o,i=1+.1*o,r=1+.2*o;while(i<=1||r<=1);e.exports=o}),Z=m((t,e)=>{e.exports=function(t,e,i){let r,o;for(let e=1;e<=i;e+=1){t[e][e]=1/t[e][e],o=-t[e][e];for(let i=1;i<e;i+=1)t[i][e]*=o;if(i<(r=e+1))break;for(let n=r;n<=i;n+=1){o=t[e][n],t[e][n]=0;for(let i=1;i<=e;i+=1)t[i][n]+=o*t[i][e]}}}}),K=m((t,e)=>{e.exports=function(t,e,i,r){let o,n;for(o=1;o<=i;o+=1){n=0;for(let e=1;e<o;e+=1)n+=t[e][o]*r[e];r[o]=(r[o]-n)/t[o][o]}for(let e=1;e<=i;e+=1){o=i+1-e,r[o]/=t[o][o],n=-r[o];for(let e=1;e<o;e+=1)r[e]+=n*t[e][o]}}}),X=m((t,e)=>{e.exports=function(t,e,i,r){let o,n,s;for(let e=1;e<=i;e+=1){if(r[1]=e,s=0,(o=e-1)<1){if((s=t[e][e]-s)<=0)break;t[e][e]=Math.sqrt(s)}else{for(let i=1;i<=o;i+=1){n=t[i][e];for(let r=1;r<i;r+=1)n-=t[r][e]*t[r][i];n/=t[i][i],t[i][e]=n,s+=n*n}if((s=t[e][e]-s)<=0)break;t[e][e]=Math.sqrt(s)}r[1]=0}}}),tt=m((t,e)=>{var i=Y(),r=Z(),o=K(),n=X();e.exports=function(t,e,s,a,l,h,u,f,d,c,p,g,y,v=0,m,b,w){let x,k,I,M,C,$,B,S,O,V,z,_,j,E,L=Math.min(a,p),T=2*a+L*(L+5)/2+2*p+1;for(let t=1;t<=a;t+=1)b[t]=e[t];for(let t=a+1;t<=T;t+=1)b[t]=0;for(let t=1;t<=p;t+=1)y[t]=0,h[t]=0;let R=[];if(0===w[1]){if(n(t,s,a,R),0!==R[1]){w[1]=2;return}o(t,s,a,e),r(t,s,a)}else{for(let i=1;i<=a;i+=1){l[i]=0;for(let r=1;r<=i;r+=1)l[i]+=t[r][i]*e[r]}for(let i=1;i<=a;i+=1){e[i]=0;for(let r=i;r<=a;r+=1)e[i]+=t[i][r]*l[r]}}u[1]=0;for(let i=1;i<=a;i+=1){l[i]=e[i],u[1]+=b[i]*l[i],b[i]=0;for(let e=i+1;e<=a;e+=1)t[e][i]=0}u[1]=-u[1]/2,w[1]=0;let D=a+a,N=D+L,P=N+L+1,A=P+L*(L+1)/2,W=A+p;for(let t=1;t<=p;t+=1){$=0;for(let e=1;e<=a;e+=1)$+=f[e][t]*f[e][t];b[W+t]=Math.sqrt($)}function F(){return b[N+M]=b[N+M+1],b[N+M+1]=0,y[M]=0,M-=1,m[2]+=1,0}for(M=v,m[1]=0,m[2]=0,E=0;;){if(999===(E=function(){m[1]+=1,T=A;for(let t=1;t<=p;t+=1){T+=1,$=-d[t];for(let e=1;e<=a;e+=1)$+=f[e][t]*l[e];if(Math.abs($)<i&&($=0),t>g)b[T]=$;else if(b[T]=-Math.abs($),$>0){for(let e=1;e<=a;e+=1)f[e][t]=-f[e][t];d[t]=-d[t]}}for(let t=1;t<=M;t+=1)b[A+y[t]]=0;I=0,C=0;for(let t=1;t<=p;t+=1)b[A+t]<C*b[W+t]&&(I=t,C=b[A+t]/b[W+t]);if(0===I){for(let t=1;t<=M;t+=1)h[y[t]]=b[N+t];return 999}return 0}()))return;for(;0!==(E=function(){for(let e=1;e<=a;e+=1){$=0;for(let i=1;i<=a;i+=1)$+=t[i][e]*f[i][I];b[e]=$}x=a;for(let t=1;t<=a;t+=1)b[x+t]=0;for(let e=M+1;e<=a;e+=1)for(let i=1;i<=a;i+=1)b[x+i]=b[x+i]+t[i][e]*b[e];_=!0;for(let t=M;t>=1;t-=1){$=b[t],x=(T=P+t*(t+3)/2)-t;for(let e=t+1;e<=M;e+=1)$-=b[T]*b[D+e],T+=e;$/=b[x],b[D+t]=$,!(y[t]<=g)&&($<=0||(_=!1,k=t))}if(!_){B=b[N+k]/b[D+k];for(let t=1;t<=M;t+=1)y[t]<=g||b[D+t]<=0||(C=b[N+t]/b[D+t])<B&&(B=C,k=t)}$=0;for(let t=a+1;t<=a+a;t+=1)$+=b[t]*b[t];if(Math.abs($)<=i){if(_)return w[1]=1,999;for(let t=1;t<=M;t+=1)b[N+t]=b[N+t]-B*b[D+t];return b[N+M+1]=b[N+M+1]+B,700}$=0;for(let t=1;t<=a;t+=1)$+=b[a+t]*f[t][I];S=-b[A+I]/$,j=!0,_||B<S&&(S=B,j=!1);for(let t=1;t<=a;t+=1)l[t]+=S*b[a+t],Math.abs(l[t])<i&&(l[t]=0);u[1]+=S*$*(S/2+b[N+M+1]);for(let t=1;t<=M;t+=1)b[N+t]=b[N+t]-S*b[D+t];if(b[N+M+1]=b[N+M+1]+S,j){y[M+=1]=I,T=P+(M-1)*M/2+1;for(let t=1;t<=M-1;t+=1)b[T]=b[t],T+=1;if(M===a)b[T]=b[a];else{for(let e=a;e>=M+1;e-=1)if(0!==b[e]&&(O=Math.max(Math.abs(b[e-1]),Math.abs(b[e])),V=Math.min(Math.abs(b[e-1]),Math.abs(b[e])),C=b[e-1]>=0?Math.abs(O*Math.sqrt(1+V*V/(O*O))):-Math.abs(O*Math.sqrt(1+V*V/(O*O))),O=b[e-1]/C,V=b[e]/C,1!==O))if(0===O){b[e-1]=V*C;for(let i=1;i<=a;i+=1)C=t[i][e-1],t[i][e-1]=t[i][e],t[i][e]=C}else{b[e-1]=C,z=V/(1+O);for(let i=1;i<=a;i+=1)C=O*t[i][e-1]+V*t[i][e],t[i][e]=z*(t[i][e-1]+C)-t[i][e],t[i][e-1]=C}b[T]=b[M]}}else{$=-d[I];for(let t=1;t<=a;t+=1)$+=l[t]*f[t][I];if(I>g)b[A+I]=$;else if(b[A+I]=-Math.abs($),$>0){for(let t=1;t<=a;t+=1)f[t][I]=-f[t][I];d[I]=-d[I]}return 700}return 0}());){if(999===E)return;if(700===E)if(k===M)F();else{for(;function(){if(0!==b[x=(T=P+k*(k+1)/2+1)+k]&&(O=Math.max(Math.abs(b[x-1]),Math.abs(b[x])),V=Math.min(Math.abs(b[x-1]),Math.abs(b[x])),C=b[x-1]>=0?Math.abs(O*Math.sqrt(1+V*V/(O*O))):-Math.abs(O*Math.sqrt(1+V*V/(O*O))),O=b[x-1]/C,V=b[x]/C,1!==O))if(0===O){for(let t=k+1;t<=M;t+=1)C=b[x-1],b[x-1]=b[x],b[x]=C,x+=t;for(let e=1;e<=a;e+=1)C=t[e][k],t[e][k]=t[e][k+1],t[e][k+1]=C}else{z=V/(1+O);for(let t=k+1;t<=M;t+=1)C=O*b[x-1]+V*b[x],b[x]=z*(b[x-1]+C)-b[x],b[x-1]=C,x+=t;for(let e=1;e<=a;e+=1)C=O*t[e][k]+V*t[e][k+1],t[e][k+1]=z*(t[e][k]+C)-t[e][k+1],t[e][k]=C}}(),797===(E=function(){x=T-k;for(let t=1;t<=k;t+=1)b[x]=b[T],T+=1,x+=1;return b[N+k]=b[N+k+1],y[k]=y[k+1],797*((k+=1)<M)}()););F()}}}}}),te=m(t=>{var e=tt();t.solveQP=function(t,i,r,o=[],n=0,s=[0,0]){let a=[],l=[],h=[],u=[],f=[],d=[],c="",p=t.length-1,g=r[1].length-1;if(!o)for(let t=1;t<=g;t+=1)o[t]=0;if(p!==t[1].length-1&&(c="Dmat is not symmetric!"),p!==i.length-1&&(c="Dmat and dvec are incompatible!"),p!==r.length-1&&(c="Amat and dvec are incompatible!"),g!==o.length-1&&(c="Amat and bvec are incompatible!"),(n>g||n<0)&&(c="Value of meq is invalid!"),""!==c)return{message:c};for(let t=1;t<=g;t+=1)l[t]=0,u[t]=0;let y=Math.min(p,g);for(let t=1;t<=p;t+=1)h[t]=0;a[1]=0;for(let t=1;t<=2*p+y*(y+5)/2+2*g+1;t+=1)f[t]=0;for(let t=1;t<=2;t+=1)d[t]=0;return e(t,i,p,p,h,u,a,r,o,p,g,n,l,0,d,f,s),1===s[1]&&(c="constraints are inconsistent, no solution!"),2===s[1]&&(c="matrix D in quadratic function is not positive definite!"),{solution:h,Lagrangian:u,value:a,unconstrained_solution:i,iterations:d,iact:l,message:c}}}),ti=m((t,e)=>{e.exports=te()});function tr(t){for(let e of t)return t.delete(e),e}function to(t,e,i){let r=t.get(e);void 0===r?t.set(e,[i]):r.push(i)}function tn(t,e,i){let r=t.get(e);void 0===r?t.set(e,new Set([i])):r.add(i)}function ts(t,e,i){let r=t.get(e);void 0!==r&&(r.delete(i),r.size||t.delete(e))}var{toString:ta}=Object.prototype,{propertyIsEnumerable:tl}=Object.prototype;function*th(t,...e){let i=new Set,r;for(;void 0!==(r=e.pop());)i.has(r)||(yield r,i.add(r),e.push(...t(r)))}function tu(t,e){let i=[];for(let[r,o]of tg(e))i.push(t[r]),i.push(o);return i.push(t[t.length-1]),i.join("")}function tf(t,...e){return Error(tu(t,tv(e,t=>{let e;return e=[],function t(i,r={},o=""){var n,s,a;let l,h=r.indent||" ",u;u=void 0===r.inlineCharacterLimit?{newline:`
|
14
|
+
`,newlineOrSpace:`
|
15
|
+
`,pad:o,indent:o+h}:{newline:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newlineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"};let f=t=>{if(void 0===r.inlineCharacterLimit)return t;let e=t.replace(RegExp(u.newline,"g"),"").replace(RegExp(u.newlineOrSpace,"g")," ").replace(RegExp(u.pad+"|"+u.indent,"g"),"");return e.length<=r.inlineCharacterLimit?e:t.replace(RegExp(u.newline+"|"+u.newlineOrSpace,"g"),`
|
16
|
+
`).replace(RegExp(u.pad,"g"),o).replace(RegExp(u.indent,"g"),o+h)};if(e.includes(i))return'"[Circular]"';if(null==i||"number"==typeof i||"boolean"==typeof i||"function"==typeof i||"symbol"==typeof i||(n=i,"[object RegExp]"===ta.call(n)))return String(i);if(i instanceof Date)return`new Date('${i.toISOString()}')`;if(Array.isArray(i)){if(0===i.length)return"[]";e.push(i);let n="["+u.newline+i.map((e,n)=>{let s=i.length-1===n?u.newline:","+u.newlineOrSpace,a=t(e,r,o+h);return r.transform&&(a=r.transform(i,n,a)),u.indent+a+s}).join("")+u.pad+"]";return e.pop(),f(n)}if(l=typeof(s=i),null!==s&&("object"===l||"function"===l)){let n=[...Object.keys(a=i),...Object.getOwnPropertySymbols(a).filter(t=>tl.call(a,t))];if(r.filter&&(n=n.filter(t=>r.filter(i,t))),0===n.length)return"{}";e.push(i);let s="{"+u.newline+n.map((e,s)=>{let a=n.length-1===s?u.newline:","+u.newlineOrSpace,l="symbol"==typeof e,f=!l&&/^[a-z$_][$\w]*$/i.test(e),d=l||f?e:t(e,r),c=t(i[e],r,o+h);return r.transform&&(c=r.transform(i,e,c)),u.indent+String(d)+": "+c+a}).join("")+u.pad+"}";return e.pop(),f(s)}return i=String(i=i.replace(/\\/g,"\\\\")).replace(/[\r\n]/g,t=>t===`
|
17
|
+
`?"\\n":"\\r"),!1===r.singleQuotes?(i=i.replace(/"/g,'\\"'),`"${i}"`):(i=i.replace(/'/g,"\\'"),`'${i}'`)}(t,{indent:" ",singleQuotes:!1,inlineCharacterLimit:60},void 0)})))}function td(t){return`internal error: ${t}; if you encounter this please submit an issue at: https://github.com/erikbrinkman/d3-dag/issues`}function tc(t,...e){return Error(td(tu(t,tv(e,t=>t.toString()))))}function tp(t,e,...i){let[r,...o]=t,n=tu(o,tv(i,t=>t.toString())),s=e.name||"anonymous";return Error("d3dagBuiltin"in e?td(`builtin ${r}'${s}'${n}`):`custom ${r}'${s}'${n}`)}function*tg(t){let e=0;for(let i of t)yield[e++,i]}function*ty(t,e){for(let[i,r]of tg(t))yield*B(e(r,i))}function*tv(t,e){for(let[i,r]of tg(t))yield e(r,i)}function*tm(t,e){for(let[i,r]of tg(t))e(r,i)&&(yield r)}function tb(t,e){for(let[i,r]of tg(t))if(e(r,i))return!0;return!1}function tw(t,e=0,i=t.length,r=1){if(r>0)return function*(t,e,i,r){let o=Math.min(i,t.length);for(let i=e;i<o;i+=r)yield t[i]}(t,e,i,r);if(r<0)return function*(t,e,i,r){let o=Math.max(i,-1);for(let i=e;i>o;i+=r)yield t[i]}(t,e,i,r);throw tf`can't slice with zero stride`}function*tx(...t){for(let e of t)yield*B(e)}function*tk(t){let e=t[Symbol.iterator](),i=e.next();if(!i.done){let t=i.value,r;for(;!(r=e.next()).done;)yield[t,r.value],t=r.value}}function tI(t){return"object"==typeof t&&null!==t&&Symbol.iterator in t&&"function"==typeof t[Symbol.iterator]}function tM(t){if("object"!=typeof t||null===t)return!1;let e="x"in t?t.x:void 0,i="y"in t?t.y:void 0;return"data"in t&&t.data,("number"==typeof e||void 0===e)&&("number"==typeof i||void 0===i)}function tC(t){if(!Array.isArray(t)||2!==t.length)return!1;let[e,i]=t;return"number"==typeof e&&"number"==typeof i}function t$(t){if("object"!=typeof t||null===t||!("source"in t)||!("target"in t)||!("points"in t))return!1;let{source:e,target:i,points:r}=t;return"data"in t&&t.data,"number"==typeof e&&"number"==typeof i&&!!Array.isArray(r)&&!!r.every(tC)}function tB(t){let e=[],i,r=new Map;for(let[o,n]of tg(t.nodes()))r.set(n,o),e.push({x:n.ux,y:n.uy,data:n.data}),n===t&&(i=o);let o=[];for(let{source:e,target:i,data:n,points:s}of t.links())o.push({source:r.get(e),target:r.get(i),points:s,data:n});return{nodes:e,links:o,index:i,v:1}}function tS(...t){if(t.length)throw tf`got arguments to graphJson(${t}), but constructor takes no arguments; these were probably meant as data which should be called as \`graphJson()(...)\``;return function t(e){function i(t){if("object"!=typeof t||null===t)throw tf`parsedJson was null or wasn't an object: ${t}`;if(!("nodes"in t)||!("links"in t))throw tf`parsedJson didn't have 'nodes' and 'links' properties: ${t}`;let{nodes:i,links:r}=t,o="index"in t?t.index:void 0;if(!Array.isArray(i)||!Array.isArray(r))throw tf`'nodes' and 'links' weren't arrays: ${t}`;if(!i.every(tM)||!r.every(t$)||void 0!==o&&"number"!=typeof o)throw tf`'nodes' and 'links' didn't have the appropriate structure: ${t}`;return function(t,e,i,r,o){let n=eo(),s=t.map(({x:t,y:e,data:i})=>{let o=n.node(r(i));return o.ux=t,o.uy=e,o});for(let{source:t,target:i,points:r,data:a}of e)n.link(s[t],s[i],o(a)).points=r.map(([t,e])=>[t,e]);return void 0===i?n:s[i]}(i,r,o,e.nodeDatum,e.linkDatum)}return i.nodeDatum=function(i){if(void 0===i)return e.nodeDatum;{let{nodeDatum:r}=e;return t(g({nodeDatum:i},v(e,["nodeDatum"])))}},i.linkDatum=function(i){if(void 0===i)return e.linkDatum;{let{linkDatum:r}=e;return t(g({linkDatum:i},v(e,["linkDatum"])))}},i}({nodeDatum:t=>t,linkDatum:t=>t})}var tO=class{constructor(t,e,i,r="inactive"){this.node=t,this.indeg=e,this.outdeg=i,this.stat=r}bucket(){let t=0===this.indeg?-1/0:0===this.outdeg?1/0:this.indeg-this.outdeg;return"top"===this.stat?Math.min(t,0):"bottom"===this.stat?Math.max(t,0):t}isTop(){return this.indeg<=this.outdeg&&"bottom"!==this.stat||"top"===this.stat}};function tV(t,e){let i=t[e];if(void 0!==i)return i;{let i=new Set;return t[e]=i,i}}function tz(t){var e;let i;for(;t.length&&!(null!=(e=i=t[t.length-1])&&e.size);)t.pop();return i||void 0}function t_(t,e=()=>{}){let i=new Map,r=new Map,o=new Set,n=new Set,s=[],a=[];function l(t){return t===-1/0?o:t===1/0?n:t<=0?tV(s,-t):tV(a,t-1)}for(let o of t){let t=o.nparentLinks(),n=o.nchildLinks(),s=new tO(o,t,n),a=e(o);i.set(o,s),void 0===a?(s.stat="active",l(s.bucket()).add(s)):tn(r,a,s)}let h=[...r].sort(([t],[e])=>t-e).map(([,t])=>t),u=0,f=h.length,d=h.length?h[u++]:new Set,c=h.length>1?h[--f]:new Set;for(let t of d)t.stat="top",l(t.bucket()).add(t);for(let t of c)t.stat="bottom",l(t.bucket()).add(t);let p=Array(i.size),g=0,y=i.size,v;for(;v=function(){var t;let e;if(e=null!=(t=tr(o))?t:tr(n))return e;let i=tz(s),r=tz(a);return r?tr(s.length>a.length?i:r):i?tr(i):void 0}();){let{node:t}=v,e=v.isTop()?g++:--y;for(let[r,o]of(v.stat="ranked",p[e]=t,t.parentCounts())){let t=i.get(r);l(t.bucket()).delete(t),t.outdeg-=o,"ranked"!==t.stat&&"inactive"!==t.stat&&l(t.bucket()).add(t)}for(let[e,r]of t.childCounts()){let t=i.get(e);l(t.bucket()).delete(t),t.indeg-=r,"ranked"!==t.stat&&"inactive"!==t.stat&&l(t.bucket()).add(t)}if(d.delete(v),!d.size&&u<f)for(let t of d=h[u++])t.stat="top",l(t.bucket()).add(t);if(c.delete(v),!c.size&&u<f)for(let t of c=h[--f])t.stat="bottom",l(t.bucket()).add(t)}return p}function tj(t,e){let i=new Set,r=new Set,o=[],n;for(let s of t)if(!r.has(s)){for(o.push(s);n=o.pop();)i.delete(n),r.has(n)||(r.add(n),o.push(...e(n)));i.add(s)}return i}var tE,tL,tT,tR,tD,tN,tP,tA,tW,tF=class{constructor(){I(this,tE,0),I(this,tL,0),I(this,tT,0),I(this,tR,!0),I(this,tD,new Set),I(this,tN,new Set),I(this,tP,()=>{M(this,tE,k(this,tE)-1)}),I(this,tA,(t,e)=>{M(this,tL,k(this,tL)+1),t?M(this,tT,k(this,tT)+1):e||!0!==k(this,tR)||M(this,tR,null)}),I(this,tW,t=>{M(this,tL,k(this,tL)-1),t?M(this,tT,k(this,tT)-1):!1===k(this,tR)&&M(this,tR,null)})}*nodes(){for(let t of this.split())yield*B(t.nodes())}topological(t){return t_(this.nodes(),t)}*links(){for(let t of this.nodes())yield*B(t.childLinks())}nnodes(){return k(this,tE)}nlinks(){return k(this,tL)}*roots(){for(let t of this.split())yield*B(t.roots())}*leaves(){for(let t of this.split())yield*B(t.leaves())}*split(){let t;for(yield*B(k(this,tD));t=function(t){for(let e of t)return e}(k(this,tN));)yield t,t.nnodes()}connected(){let t=!1;for(let e of this.split()){if(t)return!1;t=!0}return!0}multi(){return!!k(this,tT)}acyclic(){if(null!==k(this,tR))return k(this,tR);for(let t of this.split())if(!t.acyclic())return M(this,tR,!1),!1;return M(this,tR,!0),!0}node(t){return M(this,tE,k(this,tE)+1),new et(this,k(this,tD),k(this,tN),k(this,tP),k(this,tA),k(this,tW),t)}link(t,e,i){return t.link(t,e,i)}toJSON(){return tB(this)}};function tq(t){for(let e of t.values())for(let t of e)return t}function tG(t){return t instanceof et}tE=new WeakMap,tL=new WeakMap,tT=new WeakMap,tR=new WeakMap,tD=new WeakMap,tN=new WeakMap,tP=new WeakMap,tA=new WeakMap,tW=new WeakMap;var tU,tJ,tH,tQ,tY,tZ,tK,tX,t0,t1,t2,t3,t9,t5,t6,t4,t7,t8,et=class{constructor(t,e,i,r,o,n,s){this.data=s,I(this,t5),I(this,t4),I(this,tU,void 0),I(this,tJ,void 0),I(this,tH,void 0),I(this,tQ,void 0),I(this,tY,void 0),I(this,tZ,void 0),I(this,tK,0),I(this,tX,0),I(this,t0,new Map),I(this,t1,0),I(this,t2,new Map),I(this,t3,void 0),I(this,t9,void 0),I(this,t8,t=>{let{source:e,target:i}=t,r=e.nchildLinksTo(i)>1;if(r){M(e,tK,k(e,tK)-1);let t=C(e,t4,t7).call(e);t.nlinks-=1,t.multis-=1}else{let t=C(e,t5,t6).call(e);M(t,t9,null),k(this,tY).delete(t),k(this,tZ).add(e),M(e,t3,e),M(e,t9,null),k(this,tZ).add(i),M(i,t3,i),M(i,t9,null)}k(this,tQ).call(this,r),ts(k(e,t2),i,t),M(e,t1,k(e,t1)-1),ts(k(i,t0),e,t),M(i,tX,k(i,tX)-1)}),M(this,tU,t),M(this,tY,e),M(this,tZ,i),M(this,tJ,r),M(this,tH,o),M(this,tQ,n),M(this,t3,this),M(this,t9,{nnodes:1,nlinks:0,multis:0,acyclic:!0,roots:[this],leaves:[this]}),k(this,tY).add(this)}get x(){if(void 0===this.ux)throw tf`can't get \`x\` when \`ux\` is undefined`;return this.ux}set x(t){this.ux=t}get y(){if(void 0===this.uy)throw tf`can't get \`y\` when \`uy\` is undefined`;return this.uy}set y(t){this.uy=t}*nodes(){yield*B(th(t=>tx(t.children(),t.parents()),this))}topological(t){return t_(this.nodes(),t)}*links(){for(let t of this.nodes())yield*B(t.childLinks())}nnodes(){return C(this,t4,t7).call(this).nnodes}nlinks(){return C(this,t4,t7).call(this).nlinks}*split(){yield this}connected(){return!0}multi(){return C(this,t4,t7).call(this).multis>0}acyclic(){let t=C(this,t4,t7).call(this);return null===t.acyclic?t.acyclic=function(t){let e,i=new Map(tv(t,t=>[t,t.nparents()])),r=[...tv(tm(i,([,t])=>0===t),([t])=>t)];for(let t of r)i.delete(t);for(;e=r.pop();)for(let t of e.children()){let e=i.get(t)-1;e?i.set(t,e):(i.delete(t),r.push(t))}return!i.size}(this.nodes()):t.acyclic}node(t){if(k(this,tU))return k(this,tU).node(t);throw tf`can't add a node from a deleted node`}link(t,e,i){if(k(this,tU)){if(t===e)throw tf`tried to create a link between the same node, but self loops are not supported`;if(tG(t)&&tG(e)&&k(t,tU)===k(e,tU)&&k(this,tU)===k(t,tU)){let r=new er(k(this,tU),t,e,k(this,t8),i),o=t.nchildLinksTo(e)>0,n=C(t,t5,t6).call(t),s=k(n,t9),a=C(e,t5,t6).call(e),l=k(a,t9);if(o&&s)M(t,tK,k(t,tK)+1),s.nlinks+=1,s.multis+=1;else if(o)M(t,tK,k(t,tK)+1);else if(n===a&&s)s.nlinks+=1,!0===s.acyclic&&(s.acyclic=null);else if(n!==a&&s&&l){let[t,e,i,r]=s.nnodes>l.nnodes?[n,s,a,l]:[a,l,n,s];k(this,tY).delete(i),M(i,t3,t),M(i,t9,void 0),e.nnodes+=r.nnodes,e.nlinks+=r.nlinks+1,e.multis+=r.multis,e.acyclic=!1!==e.acyclic&&!1!==r.acyclic&&(!0===e.acyclic&&!0===r.acyclic||null),e.roots=null,e.leaves=null}else n!==a&&(M(n,t9,null),M(a,t9,null));return k(this,tH).call(this,o,n!==a),M(t,t1,k(t,t1)+1),tn(k(t,t2),e,r),M(e,tX,k(e,tX)+1),tn(k(e,t0),t,r),r}throw tf`when creating a link, both source and target must be current members of the same graph, and can't have been deleted`}throw tf`can't add a link from a deleted node`}nparents(){return k(this,t0).size}nchildren(){return k(this,t2).size}nparentLinks(){return k(this,tX)}nchildLinks(){return k(this,t1)}nparentLinksTo(t){var e,i;return tG(t)&&null!=(i=null==(e=k(this,t0).get(t))?void 0:e.size)?i:0}*parentLinksTo(t){if(tG(t)){let e=k(this,t0).get(t);e&&(yield*B(e))}}nchildLinksTo(t){var e,i;return tG(t)&&null!=(i=null==(e=k(this,t2).get(t))?void 0:e.size)?i:0}*childLinksTo(t){if(tG(t)){let e=k(this,t2).get(t);e&&(yield*B(e))}}*parents(){yield*B(k(this,t0).keys())}*children(){yield*B(k(this,t2).keys())}*parentCounts(){for(let[t,e]of k(this,t0))yield[t,e.size]}*childCounts(){for(let[t,e]of k(this,t2))yield[t,e.size]}*parentLinks(){for(let t of k(this,t0).values())yield*B(t)}*childLinks(){for(let t of k(this,t2).values())yield*B(t)}*ancestors(){yield*B(th(t=>t.parents(),this))}*descendants(){yield*B(th(t=>t.children(),this))}*roots(){let t=C(this,t4,t7).call(this);t.roots||(t.roots=[...tj(this.nodes(),t=>t.children())]),yield*B(t.roots)}*leaves(){let t=C(this,t4,t7).call(this);t.leaves||(t.leaves=[...tj(this.nodes(),t=>t.parents())]),yield*B(t.leaves)}parent(t,e){return this.link(t,this,e)}child(t,e){return this.link(this,t,e)}delete(){if(k(this,tU)){let t;for(;t=tq(k(this,t2));)t.delete();for(;t=tq(k(this,t0));)t.delete();k(this,tY).delete(this),k(this,tZ).delete(this),k(this,tJ).call(this),M(this,tU,null),M(this,t9,null)}}toJSON(){return tB(this)}};tU=new WeakMap,tJ=new WeakMap,tH=new WeakMap,tQ=new WeakMap,tY=new WeakMap,tZ=new WeakMap,tK=new WeakMap,tX=new WeakMap,t0=new WeakMap,t1=new WeakMap,t2=new WeakMap,t3=new WeakMap,t9=new WeakMap,t5=new WeakSet,t6=function(){let t=this;for(;k(t,t3)!==t;)M(t,t3,k(k(t,t3),t3)),t=k(t,t3);return t},t4=new WeakSet,t7=function(){let t=C(this,t5,t6).call(this);if(void 0===k(t,t9))throw tc`undefined cached info`;if(null!==k(t,t9))return k(t,t9);{let t=0,e=0,i=0;for(let r of this.nodes())t+=1,e+=r.nchildLinks(),i+=k(r,tK),M(r,t3,this),M(r,t9,void 0),k(this,tZ).delete(r);return k(this,tY).add(this),M(this,t9,{nnodes:t,nlinks:e,multis:i,acyclic:null,roots:null,leaves:null})}},t8=new WeakMap;var ee,ei,er=class{constructor(t,e,i,r,o){this.source=e,this.target=i,this.data=o,I(this,ee,void 0),I(this,ei,void 0),this.points=[],M(this,ee,t),M(this,ei,r)}delete(){k(this,ee)&&(k(this,ei).call(this,this),M(this,ee,null))}};function eo(){return new tF}function en(t){if("string"!=typeof t)throw tf`id is supposed to be type string but got type ${typeof t}`;return t}function es(t){if("object"!=typeof t||null===t||!(0 in t))throw tf`default source id expected datum[0] to exist but got datum: ${t}; you should check the data you're passing to \`graphConnect()\` to make sure it looks like \`[[source_id, target_id], ...]\` or set a custom accessor with \`graphConnect().source(d => ...).target(d => ...)\``;let e=t[0];if("string"==typeof e)return e;throw tf`default source id expected datum[0] to be a string but got datum: ${t}; you should check the data you're passing to \`graphConnect()\` to make sure it looks like \`[[source_id, target_id], ...]\` or set a custom accessor with \`graphConnect().source(d => ...).target(d => ...)\``}function ea(t){if("object"!=typeof t||null===t||!(1 in t))throw tf`default target id expected datum[1] to exist but got datum: ${t}; you should check the data you're passing to \`graphConnect()\` to make sure it looks like \`[[source_id, target_id], ...]\` or set a custom accessor with \`graphConnect().source(d => ...).target(d => ...)\``;let e=t[1];if("string"==typeof e)return e;throw tf`default target id expected datum[1] to be a string but got datum: ${t}; you should check the data you're passing to \`graphConnect()\` to make sure it looks like \`[[source_id, target_id], ...]\` or set a custom accessor with \`graphConnect().source(d => ...).target(d => ...)\``}function el(t){return t}function eh(...t){if(t.length)throw tf`got arguments to graphConnect(${t}), but constructor takes no arguments; these were probably meant as data which should be called as \`graphConnect()(...)\``;return function t(e){function i(t){let i=eo(),r=new Map;for(let[o,n]of t.entries()){let t=en(e.sourceId(n,o)),s=r.get(t);void 0===s&&(s=i.node(e.nodeDatum(t,o)),r.set(t,s));let a=en(e.targetId(n,o)),l=r.get(a);void 0===l&&(l=i.node(e.nodeDatum(a,o)),r.set(a,l)),t===a&&e.single||i.link(s,l,n)}return i}return i.sourceId=function(i){if(void 0===i)return e.sourceId;{let{sourceId:r}=e;return t(y(g({},v(e,["sourceId"])),{sourceId:i}))}},i.targetId=function(i){if(void 0===i)return e.targetId;{let{targetId:r}=e;return t(y(g({},v(e,["targetId"])),{targetId:i}))}},i.nodeDatum=function(i){if(void 0===i)return e.nodeDatum;{let{nodeDatum:r}=e;return t(y(g({},v(e,["nodeDatum"])),{nodeDatum:i}))}},i.single=function(i){return void 0===i?e.single:t(y(g({},e),{single:i}))},i}({sourceId:es,targetId:ea,nodeDatum:el,single:!1})}function eu(t){function e(e,i){var r;return tv(null!=(r=t(e,i))?r:[],t=>[t,void 0])}return e.wrapped=t,e}function ef(t){if(function(t){if("object"!=typeof t||null===t)return!1;if(!("children"in t))return!0;{let{children:e}=t;return void 0===e||tI(e)}}(t))return t.children;throw tf`datum did not have an iterable children field, and no custom children accessor was specified; try calling \`graphHierarchy().children(d => ...)\` to set a custom children accessor`}function ed(...t){if(t.length)throw tf`got arguments to graphHierarchy(${t}), but constructor takes no arguments; these were probably meant as data which should be called as \`graphHierarchy()(...)\``;return function t(e,i){function r(...t){var e,o;let n,s=eo(),a=new Map,l=[],h=0;for(let r of t)if(!a.has(r)){let t=s.node(r);for(let[o,n]of(a.set(r,t),null!=(e=i(r,h++))?e:[]))l.push([t,o,n])}for(;n=l.pop();){let[t,e,r]=n,u=a.get(e);if(u)s.link(t,u,r);else{let n=s.node(e);for(let[u,f]of(a.set(e,n),s.link(t,n,r),null!=(o=i(e,h++))?o:[]))l.push([n,u,f])}}return s}return r.children=function(i){return void 0===i?e:t(i,eu(i))},r.childrenData=function(e){return void 0===e?i:t(function(t){function e(e,i){var r;return tv(null!=(r=t(e,i))?r:[],([t])=>t)}return e.wrapped=t,e}(e),e)},r}(ef,eu(ef))}function ec(t){function e(e,i){var r;return tv(null!=(r=t(e,i))?r:[],t=>[t,void 0])}return e.wrapped=t,e}function ep(t){if("object"!=typeof t||null===t||!("id"in t))throw tf`datum did not have an id field, and no id accessor was specified; try calling \`graphStratify().id(d => d...)\` to set a custom id accessor`;let{id:e}=t;if("string"==typeof e)return e;throw tf`datum has an id field that was not a string, and no id accessor was specified; try calling \`graphStratify().id(d => d...)\` to set a custom id accessor`}function eg(t){var e;if("object"!=typeof t||null===t)throw tf`default parentIds function expected datum to be an object but got: ${t}; try setting a custom accessor for parentIds with \`graphStratify().parentIds(d => ...)\``;if(!("parentIds"in t))return;let{parentIds:i}=t;if(void 0===i||tI(i)&&(e=t=>"string"==typeof t,!tb(i,(t,i)=>!e(t,i))))return i;throw tf`default parentIds function expected parentIds to be an iterable of strings but got: ${i}; try setting a custom accessor for parentIds with \`graphStratify().parentIds(d => ...)\``}function ey(...t){if(t.length)throw tf`got arguments to graphStratify(${t}), but constructor takes no arguments; these were probably meant as data which should be called as \`graphStratify()(...)\``;return function t(e){function i(t){var i;let o=eo(),n=new Map,s=[];for(let[a,l]of t.entries()){let t=en(e.id(l,a)),h=o.node(l);for(let[t,r]of null!=(i=e.parentData(l,a))?i:[])s.push([t,h,r]);if(n.has(t))throw tf`found a duplicate id: ${r}, but ids passed to \`graphStratify()\` must be unique`;n.set(t,h)}for(let[t,e,i]of s){let r=n.get(t);if(!r)throw tf`missing id: ${t}; this id was references in a node's parentIds, but no node with that id exists`;o.link(r,e,i)}return o}function r(i){if(void 0===i)return e.id;{let{id:r}=e;return t(y(g({},v(e,["id"])),{id:i}))}}return i.id=r,i.parentData=function(i){if(void 0===i)return e.parentData;{let{parentIds:r,parentData:o}=e;return t(y(g({},v(e,["parentIds","parentData"])),{parentIds:function(t){function e(e,i){var r;return tv(null!=(r=t(e,i))?r:[],([t])=>t)}return e.wrapped=t,e}(i),parentData:i}))}},i.parentIds=function(i){if(void 0===i)return e.parentIds;{let{parentIds:r,parentData:o}=e;return t(y(g({},v(e,["parentIds","parentData"])),{parentIds:i,parentData:ec(i)}))}},i}({id:ep,parentIds:eg,parentData:ec(eg)})}function ev(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function em(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function eb(t,e){let i;if(void 0===e)for(let e of t)null!=e&&(i<e||void 0===i&&e>=e)&&(i=e);else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(i<o||void 0===i&&o>=o)&&(i=o)}return i}function ew(t,e){let i;if(void 0===e)for(let e of t)null!=e&&(i>e||void 0===i&&e>=e)&&(i=e);else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(i>o||void 0===i&&o>=o)&&(i=o)}return i}function ex(t,e,i){let r=t[e];t[e]=t[i],t[i]=r}function ek(t,e){var i=t,r=.5;if(!(!(o=(i=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(r*=1)>=r&&(yield r)}}(i,e))).length)||isNaN(r*=1))){if(r<=0||o<2)return ew(i);if(r>=1)return eb(i);var o,n=(o-1)*r,s=Math.floor(n),a=eb((function t(e,i,r=0,o=1/0,n){if(i=Math.floor(i),r=Math.floor(Math.max(0,r)),o=Math.floor(Math.min(e.length-1,o)),!(r<=i&&i<=o))return e;for(n=void 0===n?em:function(t=ev){if(t===ev)return em;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,i)=>{let r=t(e,i);return r||0===r?r:(0===t(i,i))-(0===t(e,e))}}(n);o>r;){if(o-r>600){let s=o-r+1,a=i-r+1,l=Math.log(s),h=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*h*(s-h)/s)*(a-s/2<0?-1:1),f=Math.max(r,Math.floor(i-a*h/s+u)),d=Math.min(o,Math.floor(i+(s-a)*h/s+u));t(e,i,f,d,n)}let s=e[i],a=r,l=o;for(ex(e,r,i),n(e[o],s)>0&&ex(e,r,o);a<l;){for(ex(e,a,l),++a,--l;0>n(e[a],s);)++a;for(;n(e[l],s)>0;)--l}0===n(e[r],s)?ex(e,r,l):ex(e,++l,o),l<=i&&(r=l+1),i<=l&&(o=l-1)}return e})(i,s).subarray(0,s+1));return a+(ew(i.subarray(s+1))-a)*(n-s)}}function eI(t,e=ev){let i,r=!1;if(1===e.length){let o;for(let n of t){let t=e(n);(r?0>ev(t,o):0===ev(t,t))&&(i=n,o=t,r=!0)}}else for(let o of t)(r?0>e(o,i):0===e(o,o))&&(i=o,r=!0);return i}function eM(t){return new Set(tm(tx(t.children(),t.parents()),e=>e.y>t.y))}ee=new WeakMap,ei=new WeakMap;var eC=class{constructor(t){this.uncompressed=t,this.indices=[]}getIndex(t,e){var i;let r=[];for(let[e,i]of this.indices.entries())i<=t&&r.push(e);this.uncompressed&&r.push(this.indices.length);let o=void 0===e?0:e,n=null!=(i=eI(r,t=>[Math.abs(o-t),t]))?i:this.indices.length;return this.setIndex(n,t),n}setIndex(t,e){this.indices[t]=e}offset(){return 0}},e$=class{constructor(t){this.uncompressed=t,this.posIndices=[0],this.negIndices=[]}nextNeg(){return-this.negIndices.length-1}nextPos(){return this.posIndices.length}getIndex(t,e){var i;let r=[];for(let[e,i]of this.negIndices.entries())i<=t&&r.push(-e-1);for(let[e,i]of this.posIndices.entries())i<=t&&r.push(e);this.uncompressed&&(r.push(this.nextNeg()),r.push(this.nextPos()));let o=void 0===e?0:e,n=this.negIndices.length<this.posIndices.length-1?this.nextNeg():this.nextPos(),s=null!=(i=eI(r,t=>[Math.abs(o-t),Math.abs(t),-t]))?i:n;return this.setIndex(s,t),s}setIndex(t,e){t<0?this.negIndices[-t-1]=e:this.posIndices[t]=e}offset(){return this.negIndices.length}};function eB(...t){if(t.length)throw tf`got arguments to laneGreedy(${t}); you probably forgot to construct laneGreedy before passing to lane: \`grid().lane(laneGreedy())\``;return function t(e,i,r){function o(t){for(let e of t)e.ux=void 0;let o=r?new e$(!i):new eC(!i);e?function(t,e){for(let i of t)for(let t of(void 0===i.ux&&(i.x=e.getIndex(i.y)),[...eM(i)].sort((t,e)=>e.y-t.y)))void 0===t.ux&&(t.x=e.getIndex(i.y,i.x),e.setIndex(t.x,t.y));let i=e.offset();for(let e of t)e.x+=i}(t,o):function(t,e){let i=new Map;for(let e of t)for(let t of eM(e)){let r=i.get(t);(void 0===r||e.y<r.y)&&i.set(t,e)}for(let r of tw(t,t.length-1,-1,-1)){if(void 0===r.ux){let i=ek(tv(eM(r),t=>t.x));r.x=e.getIndex(t.length-r.y,i)}let o=i.get(r);void 0!==o&&(void 0===o.ux&&(o.x=r.x),e.setIndex(r.x,t.length-o.y))}let r=e.offset();for(let e of t)e.x+=r}(t,o)}return o.topDown=function(o){return void 0===o?e:t(o,i,r)},o.compressed=function(o){return void 0===o?i:t(e,o,r)},o.bidirectional=function(o){return void 0===o?r:t(e,i,o)},o.d3dagBuiltin=!0,o}(!0,!0,!1)}function eS(...t){if(t.length)throw tf`got arguments to grid(${t}), but constructor takes no arguments; these were probably meant as data which should be called as \`grid()(...)\``;return function t(e,i){function r(t){let r;if(t.nnodes()){let o=t.topological(e.rank);for(let[t,e]of o.entries())e.y=t;e.lane(o);let n=function(t,e){for(let i of t){if(void 0===i.ux)throw tp`lane ${e} didn't assign an x to every node`;if(i.x<0)throw tp`lane ${e} assigned an x less than 0: ${i.x}`}let i=new Set(t.map(t=>t.x));if(!function(t,e){if(e.size!==t.size)return!1;for(let i of t)if(!e.has(i))return!1;return!0}(i,new Set(tv(i,(t,e)=>e)))){let t=[...i].sort((t,e)=>t-e).join(", ");throw tp`lane ${e} didn't assign increasing positive integers for x coordinates: ${t}`}let r=new Map;for(let[i,o]of t.entries()){let n=r.get(o);if(void 0!==n){for(let r of tw(t,n+1,i))if(r.x===o.x)throw tp`lane ${e} assigned nodes to an overlapping lane: ${o.x}`}for(let t of o.children())r.has(t)||r.set(t,i)}return i.size}(o,e.lane),{xgap:s,ygap:a}=i,l,h;if("function"==typeof e.nodeSize){let t=Array(n).fill(0);for(let i of(h=-a,o)){let[r,o]=e.nodeSize(i);if(r<=0||o<=0)throw tf`nodeSize must be positive, but got: [${r}, ${o}]`;t[i.x]=Math.max(t[i.x],r),i.y=(h+=a)+o/2,h+=o}for(let[e,i]of(l=-s,t.entries()))l+=s,t[e]=l+i/2,l+=i;for(let e of o)e.x=t[e.x]}else{let[t,i]=e.nodeSize;for(let e of o)e.x=(e.x+.5)*t+e.x*s,e.y=(e.y+.5)*i+e.y*a;l=n*(t+s)-s,h=o.length*(i+a)-a}for(let e of t.links()){let{source:t,target:i,points:r}=e;r.splice(0),t.x===i.x?r.push([t.x,t.y],[i.x,i.y]):(r.push([t.x,t.y]),t.y<i.y?r.push([i.x,t.y]):r.push([t.x,i.y]),r.push([i.x,i.y]))}r={width:l,height:h}}else r={width:0,height:0};for(let i of e.tweaks)r=i(t,r);return r}return r.lane=function(r){if(void 0===r)return e.lane;{let{lane:o}=e;return t(y(g({},v(e,["lane"])),{lane:r}),i)}},r.rank=function(r){if(void 0===r)return e.rank;{let{rank:o}=e;return t(y(g({},v(e,["rank"])),{rank:r}),i)}},r.tweaks=function(r){if(void 0===r)return e.tweaks;{let{tweaks:o}=e;return t(y(g({},v(e,["tweaks"])),{tweaks:r}),i)}},r.nodeSize=function(r){if(void 0===r)return e.nodeSize;if("function"!=typeof r&&(r[0]<=0||r[1]<=0)){let[t,e]=r;throw tf`constant nodeSize must be positive, but got: [${t}, ${e}]`}{let{nodeSize:o}=e;return t(y(g({},v(e,["nodeSize"])),{nodeSize:r}),i)}},r.gap=function(r){if(void 0!==r){let[i,o]=r;if(i<0||o<0)throw tf`gaps must be non-negative, but got [${i}, ${o}]`;return t(e,{xgap:i,ygap:o})}{let{xgap:t,ygap:e}=i;return[t,e]}},r}({lane:eB(),rank:()=>{},nodeSize:[1,1],tweaks:[]},{xgap:1,ygap:1})}var eO=w(Q());function eV(t,e,i,r,o={}){let n=eO.Solve.call({},{optimize:t,opType:e,constraints:r,variables:i,ints:o}),{feasible:s}=n,a=v(n,["feasible"]);if(!s)throw tc`could not find a feasible simplex solution`;return a}function ez(...t){if(t.length)throw tf`got arguments to laneOpt(${t}); you probably forgot to construct laneOpt before passing to lane: \`grid().lane(laneOpt())\`, note the trailing "()"`;return function t(e){function i(t){var i,r,o;let n={},s={},a={},l=new Map(tv(t,(t,e)=>[t,e])),h=e.compressed?function(t){let e=[],i=new Set;for(let r of t){if(!i.has(r)){let t=e.findIndex(t=>t<=r.y),i=-1===t?e.length:t;e[i]=r.y}for(let t of[...eM(r)].sort((t,e)=>e.y-t.y))if(!i.has(t)){let o=e.findIndex(t=>t<=r.y),n=-1===o?e.length:o;e[n]=t.y,i.add(t)}}return e.length}(t):Math.max(t.length-1,1);for(let e of t.keys())n[e]={opt:0,[e]:1},s[e]={max:h-1};let u=new Map;for(let[e,i]of t.entries()){let r=u.get(i);if(void 0!==r)for(let[o,u]of t.slice(r+1,e).entries()){let t=o+r+1,f=`${e}-${t}-above`;n[f]={opt:0,[f]:1},s[f]={max:1},a[f]=1;let d=`${f}-span`;for(let r of(n[e][d]=1,n[t][d]=-1,n[f][d]=-h,s[d]={min:1-h,max:-1},eM(u))){if(r===i)continue;let t=l.get(r),o=`${f}-${t}-cross`;n[o]={opt:1,[o]:1},s[o]={max:1},a[o]=1;let u=`${o}-left`;n[e][u]=-1,n[t][u]=1,n[f][u]=h,n[o][u]=-h,s[u]={max:h};let d=`${o}-right`;n[e][d]=-1,n[t][d]=1,n[f][d]=h,n[o][d]=h,s[d]={min:0}}}for(let t of eM(i))u.has(t)||u.set(t,e)}if(e.dist){let e=t.reduce((t,e)=>t+eM(e).size,0);for(let[i,r]of t.entries())for(let t of eM(r)){let r=l.get(t),o=`${i}-${r}-dist`;n[o]={opt:1/e};let a=`${o}-upper`;n[i][a]=1,n[r][a]=-1,n[o][a]=-h,s[a]={max:0};let u=`${o}-lower`;n[i][u]=1,n[r][u]=-1,n[o][u]=h,s[u]={min:0}}}let f=Object.keys(n).length,d=Object.keys(s).length;if("oom"!==e.check&&f>2e3)throw tf`size of dag to decrossOpt is too large and will likely crash instead of complete; you probably want to use a cheaper decrossing strategy for sugiyama like \`sugiyama().decross(decrossTwoLayer())\`, but if you still want to continue you can suppress this check with \`sugiyama().decross(decrossOp().check("oom"))\``;if("fast"===e.check&&(f>1e3||d>5e3))throw tf`size of dag to decrossOpt is too large and will likely not complete; you probably want to use a cheaper decrossing strategy for sugiyama like \`sugiyama().decross(decrossTwoLayer())\`, but if you still want to continue you can suppress this check with \`sugiyama().decross(decrossOp().check("slow"))\``;let c=eV("opt","min",n,s,a);if(e.compressed)for(let[e,r]of t.entries())r.x=null!=(i=c[e])?i:0;else{let e=new Set;for(let i of t.keys())e.add(null!=(r=c[i])?r:0);let i=new Map(tv([...e].sort(),(t,e)=>[t,e]));for(let[e,r]of t.entries())r.x=i.get(null!=(o=c[e])?o:0)}}return i.compressed=function(i){return void 0===i?e.compressed:t(y(g({},e),{compressed:i}))},i.dist=function(i){return void 0===i?e.dist:t(y(g({},e),{dist:i}))},i.check=function(i){return void 0===i?e.check:t(y(g({},e),{check:i}))},i.d3dagBuiltin=!0,i}({compressed:!1,dist:!0,check:"fast"})}function e_(t){if("function"!=typeof t){let[e,i]=t;if(e<=0||i<=0)throw tf`all node sizes must be positive, but got width ${e} and height ${i}`;return()=>[e,i]}{let e=new Map;return i=>{let r=e.get(i);if(void 0===r){let[o,n]=r=t(i);if(o<=0||n<=0)throw tf`all node sizes must be positive, but got width ${o} and height ${n} for node with data: ${i.data}; make sure the callback passed to \`sugiyama().nodeSize(...)\` is doing that`;e.set(i,r)}return r}}}function ej(t){if("function"==typeof t)return[e=>t(e)[0],e=>t(e)[1]];{let[e,i]=t;return[()=>e,()=>i]}}var eE=w(ti());function eL(t){let e=0,i=0;for(let r of t)i++,e+=(r-e)/i;return i?e:void 0}function eT(t){return ek([...t])}function eR(t){let e=[...t];if(e.sort((t,e)=>t-e),0!==e.length){if(2===e.length)return(e[0]+e[1])/2;if(e.length%2!=0)return e[(e.length-1)/2];{let t=e.length/2,i=e[0],r=e[t-1],o=e[t],n=e[e.length-1],s=r-i,a=n-o;return(r*a+o*s)/(s+a)}}}function eD(...t){if(t.length)throw tf`got arguments to twolayerAgg(${t}); you probably forgot to construct twolayerAgg before passing to order: \`decrossTwoLayer().order(twolayerAgg())\`, note the trailing "()"`;return function t({aggregate:e}){function i(t,i,r){let[o,n]=r?[i,t]:[t,i],s=r?t=>t.parents():t=>t.children(),a=new Map(n.map((t,e)=>[t,e])),l=new Map(o.map(t=>{let i=a.get(t),r=null!=i?i:e(tv(s(t),t=>a.get(t)));return[t,r]}));!function(t,e){let i=new Map;for(let r of t){let t=e.get(r);void 0!==t&&to(i,t,r)}let r=[...i.entries()].sort(([t],[e])=>t-e).flatMap(([,t])=>t),o=new Map(t.map((t,e)=>[t,e])),n=t.filter(t=>void 0===e.get(t)),s=Array(n.length).fill(null);(function t(e,i,a,l){if(i<=e)return;let h=Math.floor((e+i)/2),u=n[h],f=o.get(u),d=0,c=[0];for(let t=a;t<l;++t)d+=o.get(r[t])<f?-1:1,c.push(d);let p=a+c.indexOf(Math.min(...c));s[h]=p,t(e,h,a,p),t(h+1,i,p,l)})(0,n.length,0,r.length),s.push(r.length+1);let a=0,l=0;for(let[e,i]of r.entries()){for(;s[l]==e;)t[a++]=n[l++];t[a++]=i}for(;s[l]==r.length;)t[a++]=n[l++]}(o,l)}return i.aggregator=function(i){return void 0===i?e:t({aggregate:i})},i.d3dagBuiltin=!0,i}({aggregate:eR})}function eN(t,e,i,r,o=0){e.pop(),t.pop(),t.forEach(t=>t.pop()),i.forEach(t=>t.pop());let n=function(t,e,i,r,o){if(!e.length)return[];let n=[[0]],s=[0],a=[[0]],l=[0];for(let e of t){let t=[0];t.push(...e),n.push(t)}for(let t of(s.push(...e),a.push(...e.map(()=>[0])),i))for(let[e,i]of t.entries())a[e+1].push(-i);l.push(...r.map(t=>-t));let{solution:h,message:u}=(0,eE.solveQP)(n,s,a,l,o);if(u.length)throw tc`quadratic program failed: ${u}`;return h.shift(),h}(t,e,i,r,o);return n.push(0),n}function eP(t,e,i,r=0){let o=1+Math.max(...e.values()),n=Array(o).fill(null).map((t,e)=>Array(o).fill(null).map((t,i)=>e===i?r:0)),s=Array(o).fill(0),a=[],l=[];for(let r of t)for(let[t,n]of tk(r)){let r=e.get(t),s=e.get(n),h=Array(o).fill(0);h[r]=1,h[s]=-1,a.push(h),l.push(-i(t,n))}return[n,s,a,l]}function eA(t,e,i,r,o,n){let s=o+n;t[r][r]+=n*n,t[r][i]-=n*s,t[r][e]+=n*o,t[i][r]-=s*n,t[i][i]+=s*s,t[i][e]-=s*o,t[e][r]+=o*n,t[e][i]-=o*s,t[e][e]+=o*o}function eW(t,e,i,r){for(let[t,e]of i)t.x=r[e];let o=1/0,n=-1/0;for(let i of t){let t=i[0],r=i[i.length-1];o=Math.min(o,t.x-e(void 0,t)),n=Math.max(n,r.x+e(r,void 0))}for(let t of i.keys())t.x-=o;return n-o}function eF(t){return eL(ty(t,t=>tv(t.children(),e=>e.y-t.y)))}function eq([t,e,i]){if(t<=0||e<=0||i<=0)throw tf`simplex weights must be positive, but got: ${t}, ${e}, ${i}`}function eG(...t){if(t.length)throw tf`got arguments to coordSimplex(${t}); you probably forgot to construct coordSimplex before passing to coord: \`sugiyama().coord(coordSimplex())\`, note the trailing "()"`;return function t(e){function i(t,i){var r;let o={},n={},s=function(t,e){if("function"!=typeof e){let[t,i,r]=e;return(e,o)=>{switch(+("node"===e.data.role)+ +("node"===o.data.role)){case 0:return r;case 1:return i;case 2:return t;default:throw tc`invalid count`}}}{let i=new Map;for(let r of ty(t,t=>t))if("node"===r.data.role){let t=r.data.node,o=new Map;for(let i of t.childLinks()){let{target:t}=i,r=e(i);eq(r),o.set(t,r)}i.set(t,o)}return(t,e)=>{if("link"===t.data.role){let{source:r,target:o}=t.data.link,[,n,s]=i.get(r).get(o);return"link"===e.data.role?s:n}if("link"===e.data.role){let{source:t,target:r}=e.data.link,[,o]=i.get(t).get(r);return o}{let[r]=i.get(t.data.node).get(e.data.node);return r}}}}(t,e.weight),a=new Map,l=0;for(let e of t)for(let t of e)if(!a.has(t)){let e=`${l++}`;a.set(t,e),o[e]={}}function h(t){return a.get(t)}for(let e of t)for(let[t,r]of tk(e)){let e=h(t),s=h(r),a=`layer ${e} -> ${s}`,l=i(t,r);n[a]={min:l},o[e][a]=-1,o[s][a]=1}let u=eF(a.keys());for(let t of a.keys()){let e=h(t);for(let i of t.children()){let r=h(i),a=`link ${e} -> ${r}`,l=`${a} parent`;n[l]={min:0};let f=`${a} child`;n[f]={min:0},o[e][l]=1,o[e][f]=-1,o[r][l]=-1,o[r][f]=1;let d=s(t,i),c=(i.y-t.y)/u;o[a]={opt:d/c,[l]:1,[f]:1}}}let f=eV("opt","min",o,n);for(let[t,e]of a)t.x=null!=(r=f[e])?r:0;let d=0,c=0;for(let e of t){let t=e[0];d=Math.min(d,t.x-i(void 0,t));let r=e[e.length-1];c=Math.max(c,r.x+i(r,void 0))}for(let t of a.keys())t.x-=d;let p=c-d;if(p<=0)throw tf`must assign nonzero width to at least one node; double check the callback passed to \`sugiyama().nodeSize(...)\``;return p}return i.weight=function(i){if(void 0===i)return e.weight;{"function"!=typeof i&&eq(i);let{weight:r}=e;return t(y(g({},v(e,["weight"])),{weight:i}))}},i.d3dagBuiltin=!0,i}({weight:[1,2,8]})}function eU(t,e){let i=new Map,r=new Map(t.map((t,e)=>[t,e]));return function(t,o){var n;let s=null==(n=i.get(t))?void 0:n.get(o);if(void 0!==s)return s;if(r.has(t)||r.has(o))return-1/0;{let n=0;for(let[i,s]of e(t)){let t=r.get(i);for(let[i,a]of e(o))n+=Math.sign(t-r.get(i))*s*a}let s=i.get(t);void 0===s?i.set(t,new Map([[o,n]])):s.set(o,n);let a=i.get(o);return void 0===a?i.set(o,new Map([[t,-n]])):a.set(t,-n),n}}}function eJ(...t){if(t.length)throw tf`got arguments to twolayerGreedy(${t}); you probably forgot to construct twolayerGreedy before passing to order: \`decrossTwoLayer().order(twolayerGreedy())\`, note the trailing "()"`;return function t({baseOp:e,doScan:i}){function r(t,r,o){e(t,r,o);let n=o?r:t,s=o?eU(t,t=>t.parentCounts()):eU(r,t=>t.childCounts());i?function(t,e){let i=Array(t.length*(t.length-1)/2);for(;;){let r=0;for(let o=1;o<t.length;++o){let n=0,s=r;for(let r=o-1;r>=0;--r)i[s]=n,n+=e(t[r],t[o]),s-=t.length-r-1;r+=t.length-o}let o=0,n=0,s=0,a=0;for(let r=0;r<t.length-1;++r){let l=0;for(let h=r+1;h<t.length;++h){l+=e(t[r],t[h]);let u=i[o++]+l;u>n&&(n=u,s=r,a=h)}}if(0===n)break;let l=t[a];t[a]=t[s],t[s]=l}}(n,s):function(t,e){let i=[[0,t.length]],r;for(;r=i.pop();){let[o,n]=r;if(o>=n)continue;let s=0,a=n;for(let i=o;i<n-1;++i){let r=e(t[i],t[i+1]);r>s&&(s=r,a=i)}if(a!==n){let e=t[a+1];t[a+1]=t[a],t[a]=e,i.push([o,a],[a+2,n])}}}(n,s)}return r.base=function(r){return void 0===r?e:t({baseOp:r,doScan:i})},r.scan=function(r){return void 0===r?i:t({baseOp:e,doScan:r})},r.d3dagBuiltin=!0,r}({baseOp:()=>{},doScan:!1})}function eH(t,e){return function(i,r){let o=((i?t(i):0)+(r?t(r):0))/2;return i&&r?o+e:o}}function eQ(t){let e=0;for(let[i,r]of tk(t)){let t=new Map(r.map((t,e)=>[t,e]));for(let[r,o]of i.entries())for(let n of i.slice(r+1))for(let[i,r]of o.childCounts())for(let[o,s]of n.childCounts())i!==o&&t.get(i)>t.get(o)&&(e+=r*s)}return e}function eY(...t){if(t.length)throw tf`got arguments to decrossDfs(${t}); you probably forgot to construct decrossDfs before passing to decross: \`sugiyama().decross(decrossDfs())\`, note the trailing "()"`;return function t(e){function i(t){let i;for(let r of(i=e.topDown?th(t=>[...t.children()].sort((t,e)=>e.nchildren()-t.nchildren()),...ty(t,t=>[...tm(t,t=>!t.nparents())].sort((t,e)=>e.nchildren()-t.nchildren()))):th(t=>[...t.parents()].sort((t,e)=>e.nparents()-t.nparents()),...ty(tw(t,t.length-1,-1,-1),t=>[...tm(t,t=>!t.nchildren())].sort((t,e)=>e.nparents()-t.nparents()))),t))r.splice(0);for(let e of i){let{data:i}=e;if("node"===i.role)for(let r=i.topLayer;r<=i.bottomLayer;++r)t[r].push(e);else t[i.layer].push(e)}}return i.topDown=function(i){return void 0===i?e.topDown:t({topDown:i})},i.d3dagBuiltin=!0,i}({topDown:!0})}function eZ(...t){if(t.length)throw tf`got arguments to decrossTwoLayer(${t}); you probably forgot to construct decrossTwoLayer before passing to decross: \`sugiyama().decross(decrossTwoLayer())\`, note the trailing "()"`;return function t(e){function i(t){let i=t.slice().reverse(),r=t.map(t=>t.slice()),o=eQ(r);for(let n of e.inits.length?e.inits:[()=>{}]){n(t);let s=!0;for(let n=0;n<e.passes&&s;++n){for(let[i,r]of(s=!1,tk(t))){let t=r.slice();e.order(i,r,!0),r.some((e,i)=>t[i]!==e)&&(s=!0)}let n=eQ(t);for(let[a,l]of(n<o&&(o=n,r=t.map(t=>t.slice())),tk(i))){let t=l.slice();e.order(l,a,!1),l.some((e,i)=>t[i]!==e)&&(s=!0)}let a=eQ(t);a<o&&(o=a,r=t.map(t=>t.slice()))}}t.splice(0,t.length,...r)}return i.order=function(i){if(void 0===i)return e.order;{let{order:r}=e;return t(y(g({},v(e,["order"])),{order:i}))}},i.inits=function(i){if(void 0===i)return[...e.inits];{let{inits:r}=e;return t(y(g({},v(e,["inits"])),{inits:i}))}},i.passes=function(i){if(void 0===i)return e.passes;if(i<=0)throw tf`number of passes must be positive`;return t(y(g({},e),{passes:i}))},i.d3dagBuiltin=!0,i}({order:eJ().base(eD()),inits:[eY().topDown(!0),eY().topDown(!1)],passes:24})}function eK(t,e){return+!!(t&&e)}function eX(){}function e0(...t){if(t.length)throw tf`got arguments to layeringSimplex(${t}); you probably forgot to construct layeringSimplex before passing to layering: \`sugiyama().layering(layeringSimplex())\`, note the trailing "()"`;return function t(e){function i(t,i){var r;let o={},n={},s=new Map(tv(t.nodes(),(t,e)=>[t,e.toString()]));function a(t){return s.get(t)}function l(t,e,i,r,s=0){let h=o[a(e)],u=o[a(i)],f=`${t}: ${a(e)} -> ${a(i)}`;n[f]={min:r},h[f]=-1,u[f]=1,h.opt+=s,u.opt-=s}function h(t,e,i){l(`${t} before`,e,i,0),l(`${t} after`,i,e,0)}let u=[],f=new Map;for(let i of t.nodes()){o[a(i)]={opt:0};let t=e.rank(i);void 0!==t&&u.push([t,i]);let r=e.group(i);if(void 0!==r){let t=f.get(r);t?t.push(i):f.set(r,[i])}}let d=new Set;for(let r of t.topological(e.rank)){for(let[t,e]of r.childCounts())d.has(t)?l("link",t,r,i(t,r),e):l("link",r,t,i(r,t),e);d.add(r)}for(let[[t,e],[r,o]]of tk(u.sort(([t],[e])=>t-e)))t<r?l("rank",e,o,i(e,o)):h("rank",e,o);for(let t of f.values())for(let[e,i]of tk(t))h("group",e,i);try{let e=eV("opt","max",o,n,{}),s=0,l=0;for(let o of t.nodes()){let t=null!=(r=e[a(o)])?r:0;o.y=t,s=Math.min(s,t-i(void 0,o)),l=Math.max(l,t+i(o,void 0))}for(let e of t.nodes())e.y-=s;return l-s}catch(t){throw f.size?tf`could not find a feasible simplex layout; this is likely due to group constraints producing an infeasible layout, try relaxing the functions you're passing to \`layeringSimplex().group(...)\``:tc`could not find a feasible simplex solution`}}return i.rank=function(i){if(void 0===i)return e.rank;{let{rank:r}=e;return t(y(g({},v(e,["rank"])),{rank:i}))}},i.group=function(i){if(void 0===i)return e.group;{let{group:r}=e;return t(y(g({},v(e,["group"])),{group:i}))}},i.d3dagBuiltin=!0,i}({rank:eX,group:eX})}function e1(t,e,i,r){for(let[i,[o,n]]of e){let s=o.bottomLayer;for(let o of i.childLinks()){let[i,a]=e.get(o.target),l=i.topLayer;if(l>s){let e=n;for(let i=s+1;i<l;++i){let r=t.node({link:o,layer:i,role:"link"});e.child(r,void 0),e=r}e.child(a)}else if(l<s){let e=a;for(let i=l+1;i<s;++i){let r=t.node({link:o,layer:i,role:"link"});e.child(r,void 0),e=r}e.child(n)}else throw tp`layering ${r} assigned nodes with an edge to the same layer`}}let o=Array(i).fill(null).map(()=>[]);for(let e of t.nodes()){let{data:t}=e;if("node"===t.role){let{topLayer:i,bottomLayer:r}=t;for(let t=i;t<=r;++t)o[t].push(e)}else{let{layer:i}=t;o[i].push(e)}}for(let t of o)if(!t.length)throw tp`layering ${r} didn't assign a node to every layer`;return o}function e2(t,e,i,r,o){let n=eo(),s=Array(r).fill(!1),a=new Map;for(let e of t.nodes()){let t=e.uy;if(void 0===t)throw tp`layering ${o} didn't assign a layer to a node`;if(t<0||t>=r)throw tp`layering ${o} assigned node an invalid layer: ${t}`;{let i=tx(e.parentCounts(),e.childCounts());!s[t]&&tb(i,([{uy:e},i])=>i>1&&e===t-1)&&(s[t]=!0);let r={node:e,topLayer:t,bottomLayer:t,role:"node"};a.set(e,[r,n.node(r)])}}let l=0,h=s.map(t=>l+=+t);for(let[t]of a.values()){let e=h[t.topLayer];t.topLayer+=e,t.bottomLayer+=e}let u=e1(n,a,r+l,o),f=-i;for(let t of u){f+=i;let r=Math.max(-i,...tv(t,({data:t})=>"node"===t.role?e(t.node):-1/0)),o=f+r/2;for(let e of t)e.y=o;f+=r}return[u,f]}function e3(t,e,i,r){let o=eo(),n=[0,i],s=new Map;for(let i of t.nodes()){let t=i.uy;if(void 0===t)throw tp`layering ${r} didn't assign a y coordinate to every node`;{let r=e(i)/2,a=t-r,l=t+r,h={node:i,topLayer:a,bottomLayer:l,role:"node"};s.set(i,[h,o.node(h)]),n.push(a,l)}}n.sort((t,e)=>t-e);let a=i/s.size*.001,l=[],h=new Map,u=0,f=0;for(let t of n)t>u+a&&(l.push(u),u=t,f++),h.set(t,f);l.push(u);let d=Array(l.length).fill(!1);for(let[t,[{topLayer:e}]]of s){let i=h.get(e),r=i-1;for(let[o,n]of tx(t.childCounts(),t.parentCounts()))if(n>1){let[{bottomLayer:t}]=s.get(o);if(h.get(t)===r){d[i]||(d[i]=!0,l.push((e+t)/2));break}}}l.sort((t,e)=>t-e);let c=0,p=d.map(t=>c+=+t);for(let[t,e]of h)h.set(t,e+p[e]);for(let[t]of s.values())t.topLayer=h.get(t.topLayer),t.bottomLayer=h.get(t.bottomLayer);let g=e1(o,s,l.length,r);for(let t of g)for(let e of t)"node"===e.data.role?e.y=e.data.node.y:e.y=l[e.data.layer];return g}function e9(t){for(let e of t)for(let t of e)if("node"===t.data.role){let{node:e}=t.data;for(let i of(e.x=t.x,e.y=t.y,t.children())){let r=[[t.x,t.y]],o;for(;"link"===i.data.role;)o=i.data.link,r.push([i.x,i.y]),[i]=i.children();r.push([i.x,i.y]);let n=i.data.node,s=tx(e.childLinksTo(n),e.parentLinksTo(n));o||([o]=s),o.source!==e&&r.reverse(),o.points.splice(0,o.points.length,...r)}}}function e5(t,e=0){return({data:i})=>"node"===i.role?t(i.node):e}function e6(...t){if(t.length)throw tf`got arguments to sugiyama(${t}), but constructor takes no arguments; these were probably meant as data which should be called as \`sugiyama()(...)\``;return function t(e,i){function r(t){let r;if(t.nnodes()){let[o,n]=ej(e_(e.nodeSize)),[s,a]=i.gap,l=e.layering(t,eK)+1,[h,u]=e2(t,n,a,l,e.layering);e.decross(h);let f=eH(e5(o),s),d=e.coord(h,f);(function(t,e,i,r,o=.001){for(let n of t){for(let t of n)if(void 0===t.ux)throw tp`coord ${r} didn't assign an x to every node`;for(let[[t,s],[a,l]]of tk(tx([[void 0,0]],tv(n,t=>[t,t.x]),[[void 0,i]])))if(l-s<e(t,a)-o)throw tp`coord ${r} assigned nodes too close for separation`}})(h,f,d,e.coord),e9(h),r={width:d,height:u}}else r={width:0,height:0};for(let i of e.tweaks)r=i(t,r);return r}return r.layering=function(r){if(void 0===r)return e.layering;{let{layering:o}=e;return t(y(g({},v(e,["layering"])),{layering:r}),i)}},r.decross=function(r){if(void 0===r)return e.decross;{let{decross:o}=e;return t(y(g({},v(e,["decross"])),{decross:r}),i)}},r.coord=function(r){if(void 0===r)return e.coord;{let{coord:o}=e;return t(y(g({},v(e,["coord"])),{coord:r}),i)}},r.tweaks=function(r){if(void 0===r)return e.tweaks;{let{tweaks:o}=e;return t(y(g({},v(e,["tweaks"])),{tweaks:r}),i)}},r.nodeSize=function(r){if(void 0===r)return e.nodeSize;if("function"!=typeof r&&(r[0]<=0||r[1]<=0)){let[t,e]=r;throw tf`constant nodeSize must be positive, but got: [${t}, ${e}]`}{let{nodeSize:o}=e;return t(y(g({},v(e,["nodeSize"])),{nodeSize:r}),i)}},r.gap=function(r){if(void 0!==r){let[o,n]=r;if(o<0||n<0)throw tf`gap width (${o}) and height (${n}) must be non-negative`;return t(e,y(g({},i),{gap:r}))}{let[t,e]=i.gap;return[t,e]}},r}({layering:e0(),decross:eZ(),coord:eG(),nodeSize:[1,1],tweaks:[]},{gap:[1,1]})}function e4(...t){if(t.length)throw tf`got arguments to coordCenter(${t}); you probably forgot to construct coordCenter before passing to coord: \`sugiyama().coord(coordCenter())\`, note the trailing "()"`;function e(t,e){let i=t.map(t=>{let i=0,r;for(let o of t)i+=e(r,o),o.x=i,r=o;return i+e(r,void 0)}),r=Math.max(...i);if(r<=0)throw tf`must assign nonzero width to at least one node; double check the callback passed to \`sugiyama().nodeSize(...)\``;for(let[e,o]of t.entries()){let t=(r-i[e])/2;for(let e of o)e.x+=t}return r}return e.d3dagBuiltin=!0,e}function e7(t,e){for(let i of t){let t=ek([...tv(e(i),({x:t})=>t)]);void 0!==t&&(i.x=t)}}function e8(t,e){for(let i of t){let[t]=e(i);"link"===i.data.role&&"link"===t.data.role&&(i.x=t.x)}}function it(t,e){let i=t[t.length-1],r=i.x,o=[r];for(let n of tw(t,t.length-2,-1,-1)){let t=Math.min(n.x,r-e(i,n));o.push(t),i=n,r=t}for(let[n,s]of(o.reverse(),r=(i=t[0]).x,i.x=(r+o[0])/2,tg(tw(t,1)))){let t=Math.max(s.x,r+e(i,s));s.x=(t+o[n+1])/2,i=s,r=t}}function ie(...t){if(t.length)throw tf`got arguments to coordGreedy(${t}); you probably forgot to construct coordGreedy before passing to coord: \`sugiyama().coord(coordGreedy())\`, note the trailing "()"`;function e(t,e){let i=0,r=0,o=new Set;for(let e of t)for(let t of e)o.has(t)||(o.add(t),void 0!==t.ux&&(i+=(t.ux-i)/++r));for(let r of t){let t=0,o=0;for(let e of r)void 0!==e.ux&&(t+=(e.ux-t)/++o);let n=o?t:i;for(let t of r)void 0===t.ux&&(t.ux=n);it(r,e)}for(let i of tw(t,1))e7(i,t=>t.parents()),it(i,e);for(let i of tw(t,t.length-2,-1,-1))e7(i,t=>t.children()),it(i,e);for(let i=0;i<t.length;++i){let i=t.map(t=>t.map(({x:t})=>t));for(let i of tw(t,1))e8(i,t=>t.parents()),it(i,e);for(let i of tw(t,t.length-2,-1,-1))e8(i,t=>t.children()),it(i,e);if(function(t,e){for(let[i,r]of t.entries()){let t=e[i];for(let[e,{x:i}]of r.entries())if(t[e]!==i)return!1}return!0}(t,i))break}let n=1/0,s=-1/0;for(let i of t){let t=i[0];n=Math.min(n,t.x-e(void 0,t));let r=i[i.length-1];s=Math.max(s,r.x+e(r,void 0))}for(let t of o)t.x-=n;let a=s-n;if(a<=0)throw tf`must assign nonzero width to at least one node; double check the callback passed to \`sugiyama().nodeSize(...)\``;return a}return e.d3dagBuiltin=!0,e}function ii(t,e,i){if("function"!=typeof t)return()=>t;{let r=new Map;return o=>{let n=r.get(o);if(void 0!==n)return n;{let n=t(o);if(n<0)throw Error(`${e} weights must be non-negative; double check the accessor passed into \`coordQuad().${i}(...)\``);return r.set(o,n),n}}}}function ir(...t){if(t.length)throw tf`got arguments to coordQuad(${t}); you probably forgot to construct coordQuad before passing to coord: \`sugiyama().coord(coordQuad())\`, note the trailing "()"`;return function t(e){function i(t,i){let r,o=function(t){let e=new Map,i=0;for(let r of t)for(let t of r)e.has(t)||e.set(t,i++);return e}(t),[n,s,a,l]=eP(t,o,i,e.comp),h=function(t,e){if("function"!=typeof t)return()=>t;{let i=new Map;for(let r of ty(e,t=>t))if("node"===r.data.role){let e=r.data.node,o=new Map;for(let i of e.childLinks()){let e=t(i);if(e<0)throw tf`link weights must be non-negative; double check the accessor passed into \`coordQuad().vertWeak(...)\``;o.set(i.target,e)}i.set(e,o)}return(t,e)=>i.get(t).get(e)}}(e.vertWeak,t),u=ii(e.vertStrong,"link","vertStrong"),f=ii(e.linkCurve,"link","linkCurve"),d=ii(e.nodeCurve,"node","nodeCurve"),c=eF(o.keys());for(let[t,e]of o){let i=t.data,r="node"===i.role?i.node:i.link.source;for(let s of t.children()){var p;let a=o.get(s),l=s.data,g="node"===l.role?l.node:l.link.target,y="node"===i.role?h(r,g):u(i.link),v="node"===l.role?h(r,g):u(l.link),m="node"===l.role?d(l.node):f(l.link),b=(s.y-t.y)/c;for(let t of(p=(y+v)/b,n[a][a]+=p,n[a][e]-=p,n[e][a]-=p,n[e][e]+=p,s.children()))eA(n,e,a,o.get(t),m/b,m/((t.y-s.y)/c))}}try{let e=eN(n,s,a,l);r=eW(t,i,o,e)}catch(t){throw"string"==typeof t?tc`${t}`:tc`undefined quadprog exception`}if(r<=0)throw tf`must assign nonzero width to at least one node; double check the callback passed to \`sugiyama().nodeSize(...)\``;return r}return i.vertWeak=function(i){if(void 0===i)return e.vertWeak;if("number"==typeof i&&i<0)throw tf`vertWeak must be non-negative but was: ${i}`;{let{vertWeak:r}=e;return t(y(g({},v(e,["vertWeak"])),{vertWeak:i}))}},i.vertStrong=function(i){if(void 0===i)return e.vertStrong;if("number"==typeof i&&i<0)throw tf`vertStrong must be non-negative but was: ${i}`;{let{vertStrong:r}=e;return t(y(g({},v(e,["vertStrong"])),{vertStrong:i}))}},i.linkCurve=function(i){if(void 0===i)return e.linkCurve;if("number"==typeof i&&i<0)throw tf`linkCurve must be non-negative but was: ${i}`;{let{linkCurve:r}=e;return t(y(g({},v(e,["linkCurve"])),{linkCurve:i}))}},i.nodeCurve=function(i){if(void 0===i)return e.nodeCurve;if("number"==typeof i&&i<0)throw tf`nodeCurve must be non-negative but was: ${i}`;{let{nodeCurve:r}=e;return t(y(g({},v(e,["nodeCurve"])),{nodeCurve:i}))}},i.compress=function(i){if(void 0===i)return e.comp;if(i<=0)throw tf`compress weight must be positive, but was: ${i}`;return t(y(g({},e),{comp:i}))},i.d3dagBuiltin=!0,i}({vertWeak:1,vertStrong:0,linkCurve:1,nodeCurve:0,comp:1e-6})}function io(...t){if(t.length)throw tf`got arguments to coordTopological(${t}); you probably forgot to construct coordTopological before passing to coord: \`sugiyama().coord(coordTopological())\`, note the trailing "()"`;return function t(e){function i(t,i){for(let e of t)if(e.reduce((t,e)=>t+ +("node"===e.data.role),0)>1)throw tf`topological() only works with a topological layering, make sure you've set up sugiyama as \`sugiyama().layering(layeringTopological())\``;if(e.simp){let e={center:{}},r={},o=new Map,n=0;for(let i of t){let t=!0;for(let r of i)if("link"===r.data.role){let i=`${n++}`;o.set(r,[i,t]),e[i]={}}else o.set(r,["center",!1]),t=!1}let s=t=>o.get(t);for(let o of t)for(let[t,n]of tk(o)){let[o,a]=s(t),[l,h]=s(n),u=`layer ${o} -> ${l}`,f=i(t,n);r[u]={min:f},e[o][u]=a?1:-1,e[l][u]=h?-1:1}let a=eF(o.keys());for(let i of t)for(let t of i){let[i,o]=s(t);if("center"!==i)for(let n of t.children()){let[l,h]=s(n);if("center"!==l){let s=`link ${i} -> ${l}`,u=`${s} parent`;r[u]={min:0};let f=`${s} child`;r[f]={min:0},e[i][u]=o?-1:1,e[i][f]=o?1:-1,e[l][u]=h?1:-1,e[l][f]=h?-1:1;let d=(n.y-t.y)/a;e[s]={opt:1/d,[u]:1,[f]:1}}}}delete e.center;let l=eV("opt","min",e,r);for(let[t,[e,i]]of o){let r=l[e];t.x=void 0===r?0:i?-r:r}let h=0,u=0;for(let e of t){let t=e[0];h=Math.min(h,t.x-i(void 0,t));let r=e[e.length-1];u=Math.max(u,r.x+i(r,void 0))}for(let t of o.keys())t.x-=h;let f=u-h;if(f<=0)throw tf`must assign nonzero width to at least one node; double check the callback passed to \`sugiyama().nodeSize(...)\``;return f}{let e=new Map,r=0;for(let i of t)for(let t of i)"link"===t.data.role&&e.set(t,r++);for(let i of t)for(let t of i)"node"===t.data.role&&e.set(t,r);let[o,n,s,a]=eP(t,e,i),l=eF(e.keys());for(let t of e.keys()){let i=e.get(t);for(let r of t.children()){let n=e.get(r),s=(r.y-t.y)/l;if("link"===r.data.role)for(let t of r.children())eA(o,i,n,e.get(t),1/s,1/((t.y-r.y)/l))}}let h=eW(t,i,e,eN(o,n,s,a));if(h<=0)throw tf`must assign nonzero width to at least one node; double check the callback passed to \`sugiyama().nodeSize(...)\``;return h}}return i.straight=function(i){return void 0===i?e.simp:t(y(g({},e),{simp:i}))},i.d3dagBuiltin=!0,i}({simp:!0})}function is(...t){if(t.length)throw tf`got arguments to decrossOpt(${t}); you probably forgot to construct decrossOpt before passing to decross: \`sugiyama().decross(decrossOpt())\`, note the trailing "()"`;return function t(e){function i(t){var i;let r=t.reduce((t,e)=>t+e.length*Math.max(e.length-1,0)/2,0),o=[];if(e.dist)for(let[e,i]of tk(t)){let t=i.filter(t=>!t.nparents()),r=e.map(t=>[...t.children()]);o.push([t,r]);let n=e.filter(t=>!t.nchildren()),s=i.map(t=>[...t.parents()]);o.push([n,s])}let n=function(t){var e,i;let r=[],o=new Map,n=new Map;for(let i of t){let[t]=i;for(let o of(t!==r[r.length-1]&&r.push(t),tw(i,1))){let t=null!=(e=n.get(o))?e:0;n.set(o,t+1)}for(let[t,e]of tk(i))to(o,t,e)}let s=new Map,a=0,l;for(;l=r.pop();)for(let t of(s.set(l,a++),null!=(i=o.get(l))?i:[])){let e=n.get(t)-1;n.set(t,e),e||r.push(t)}return s}(t),s=new Map;function a(t,e){var i;let r=`${t} => ${e}`;return null!=(i=s.get(r))?i:r}let l=new Map;for(let[e,i]of tg(tw(t,0,t.length-1)))for(let t of i){if("node"!==t.data.role||t.data.bottomLayer===e)continue;let r=n.get(t),o=!0;for(let s of i)if(s===t)o=!1;else if("node"!==s.data.role||s.data.bottomLayer===e){let t=n.get(s),e=o?a(t,r):a(r,t);for(let t of s.children()){let i=n.get(t),s=o?a(i,r):a(r,i);l.set(s,e)}}}let h=new Map;for(let[t,e]of l){let i=e,r;for(;r=l.get(i);)i=r;let o=h.get(i);o?o.push(t):h.set(i,[i,t])}for(let t of h.values()){let e=`{ ${t.join(" & ")} }`;for(let i of t)s.set(i,e)}let u=1/(o.reduce((t,[e,i])=>i.reduce((t,e)=>t+e.length*e.length,0)*e.length,0)/4+1),f=u/(r+1),d={},c={},p={};for(let e of t){for(let[t,i]of e.entries()){let r=n.get(i);for(let i of tw(e,t+1)){let t=a(r,n.get(i));p[t]=1,c[t]={max:1},d[t]={opt:f,[t]:1}}}for(let[t,i]of e.entries()){let r=n.get(i);for(let[i,o]of tg(tw(e,t+1))){let s=n.get(o);for(let o of e.slice(t+i+2)){let t=n.get(o),e=a(r,s),i=a(r,t),l=a(s,t),h=`tri: ${r} - ${s} - ${t}`,u=`${h} +`,f=`${h} -`;c[u]={max:1},d[e][u]=1,d[i][u]=-1,d[l][u]=1,c[f]={min:0},d[e][f]=1,d[i][f]=-1,d[l][f]=1}}}}for(let[e,r]of tg(tw(t,0,t.length-1)))for(let[t,o]of r.entries()){if("node"===o.data.role&&o.data.bottomLayer!==e)continue;let s=n.get(o);for(let l of tw(r,t+1)){if("node"===l.data.role&&l.data.bottomLayer!==e)continue;let t=a(s,n.get(l)),r=new Map;for(let[t,e]of o.childCounts()){let o=n.get(t);for(let[s,h]of l.childCounts()){if(t===s)continue;let l=n.get(s),u=Math.sign(o-l),f=u<0?a(o,l):a(l,o),d=null!=(i=r.get(f))?i:0;r.set(f,u*e*h+d)}}for(let[e,i]of r){let r=`slack: ${t} : ${e}`,o=`${r} +`,n=`${r} -`;i<0?(d[r]={opt:-i,[o]:1,[n]:1},c[o]={min:0},d[t][o]=1,d[e][o]=-1,c[n]={min:0},d[t][n]=-1,d[e][n]=1):i>0&&(d[r]={opt:i,[o]:1,[n]:1},c[o]={min:1},d[t][o]=1,d[e][o]=1,c[n]={min:-1},d[t][n]=-1,d[e][n]=-1)}}}for(let[t,e]of o)for(let i of t){let t=n.get(i);for(let i of e)for(let[e,r]of tg(i)){let o=n.get(r);for(let r of tw(i,e+1)){let e=n.get(r),i=`dist: ${o} - ${t} - ${e}`,s=`${i} :normal`,l=`${i} :reversed`;d[i]={opt:u,[s]:1,[l]:1};let h=0;for(let[i,r]of[[o,t],[o,e],[t,e]]){let t=Math.sign(i-r),e=t<0?a(i,r):a(r,i);h+=t,d[e][s]=-t,d[e][l]=t}c[s]={min:-((h+1)/2)},c[l]={min:(h-1)/2}}}}let g=Object.keys(d).length,y=Object.keys(c).length;if("oom"!==e.check&&g>2e3)throw tf`size of dag to decrossOpt is too large and will likely crash instead of complete; you probably want to use a cheaper decrossing strategy for sugiyama like \`sugiyama().decross(decrossTwoLayer())\`, but if you still want to continue you can suppress this check with \`sugiyama().decross(decrossOp().check("oom"))\``;if("fast"===e.check&&(g>1e3||y>5e3))throw tf`size of dag to decrossOpt is too large and will likely not complete; you probably want to use a cheaper decrossing strategy for sugiyama like \`sugiyama().decross(decrossTwoLayer())\`, but if you still want to continue you can suppress this check with \`sugiyama().decross(decrossOp().check("slow"))\``;let v=eV("opt","min",d,c,p);if(!v.bounded)throw tc`optimization result was not bounded`;for(let e of t)e.sort((t,e)=>{let i=n.get(t),r=n.get(e);return i<r?v[a(i,r)]||-1:-(v[a(r,i)]||-1)})}return i.check=function(i){return void 0===i?e.check:t(y(g({},e),{check:i}))},i.dist=function(i){return void 0===i?e.dist:t(y(g({},e),{dist:i}))},i.d3dagBuiltin=!0,i}({check:"fast",dist:!1})}function ia(){}function il(...t){if(t.length)throw tf`got arguments to layeringLongestPath(${t}); you probably forgot to construct layeringLongestPath before passing to layering: \`sugiyama().layering(layeringLongestPath())\`, note the trailing "()"`;return function t(e,i){function r(t,r){let o=0,n=t.topological(e.rank);for(let t of n)t.uy=void 0;for(let t of(i.topDown&&n.reverse(),n)){let e=Math.max(r(void 0,t),...tv(tx(t.parents(),t.children()),e=>{var i;return(null!=(i=e.uy)?i:-1/0)+r(e,t)}));o=Math.max(o,e+r(t,void 0)),t.y=e}for(let t of n.reverse()){let e=Math.min(...tv(tm(tx(t.parents(),t.children()),e=>t.y<e.y),e=>e.y-r(e,t)));e!==1/0&&(t.y=e)}if(i.topDown)for(let t of n)t.y=o-t.y;return o}return r.rank=function(r){if(void 0===r)return e.rank;{let{rank:o}=e;return t(y(g({},v(e,["rank"])),{rank:r}),i)}},r.topDown=function(r){return void 0===r?i.topDown:t(e,y(g({},i),{topDown:r}))},r.d3dagBuiltin=!0,r}({rank:ia},{topDown:!0})}function ih(){}function iu(...t){if(t.length)throw tf`got arguments to layeringTopological(${t}); you probably forgot to construct layeringTopological before passing to layering: \`sugiyama().layering(layeringTopological())\`, note the trailing "()"`;return function t(e){function i(t,i){let r=0,o;for(let n of t.topological(e.rank))r+=i(o,n),n.y=r,o=n;return r+i(o,void 0)}return i.rank=function(i){if(void 0===i)return e.rank;{let{rank:r}=e;return t(y(g({},v(e,["rank"])),{rank:i}))}},i.d3dagBuiltin=!0,i}({rank:ih})}function id(t,e){return`${t} => ${e}`}function ic(t,e,i,r,{dist:o,check:n}){let s=o?t.filter(t=>!function(t){for(let e of t)return e}(r(t))):[],a=new Map;if(o)for(let e of t)for(let[t]of r(e))to(a,t,e);let l=Math.max(t.length*(t.length-1)/2,0),h=function(t,e,i){let r=0;for(let[i,o]of tg(t))r=e(r,o,i);return r}(a.values(),(t,e)=>t+e.length*e.length,0)*s.length/4,u={},f={},d={},c=1/(h+1),p=c/(l+1);for(let[i,r]of tg(tw(t,0,t.length-1))){let o=e.get(r);for(let r of tw(t,i+1)){let t=id(o,e.get(r));d[t]=1,f[t]={max:1},u[t]={opt:p,[t]:1}}}for(let[i,r]of tg(tw(t,0,t.length-1))){let o=e.get(r);for(let[r,n]of tg(tw(t,i+1))){let s=e.get(n);for(let n of tw(t,i+r+2)){let t=e.get(n),i=id(o,s),r=id(o,t),a=id(s,t),l=`tri: ${o} - ${s} - ${t}`,h=`${l} +`,d=`${l} -`;f[h]={max:1},u[i][h]=1,u[r][h]=-1,u[a][h]=1,f[d]={min:0},u[i][d]=1,u[r][d]=-1,u[a][d]=1}}}for(let[o,n]of tg(tw(t,0,t.length-1))){let s=e.get(n);for(let a of tw(t,o+1)){let t=id(s,e.get(a));for(let[e,o]of r(n)){let n=i.get(e);for(let[s,l]of r(a)){if(e===s)continue;let r=i.get(s);u[t].opt+=Math.sign(r-n)*o*l}}}}for(let t of s){let i=e.get(t);for(let t of a.values())for(let[r,o]of tg(t)){let n=e.get(o);for(let o of tw(t,r+1)){let t=e.get(o),r=`dist: ${n} - ${i} - ${t}`,s=`${r} :normal`,a=`${r} :reversed`;u[r]={opt:c,[s]:1,[a]:1};let l=0;for(let[e,r]of[[n,i],[n,t],[i,t]]){let t=e<r?id(e,r):id(r,e),i=Math.sign(e-r);l+=i,u[t][s]=-i,u[t][a]=i}f[s]={min:-((l+1)/2)},f[a]={min:(l-1)/2}}}}let g=Object.keys(u).length,y=Object.keys(f).length;if("oom"!==n&&g>1200)throw tf`size of dag to twolayerOpt is too large and will likely crash instead of complete; you probably want to use a cheaper twolayer strategy for sugiyama like \`decrossTwoLayer(twolayerAgg())\`, but if you still want to continue you can suppress this check with \`decrossTwoLayer().order(twolayerOpt().check("oom"))\``;if("fast"===n&&(g>400||y>1e3))throw tf`size of dag to twolayerOpt is too large and will likely not finish; you probably want to use a cheaper twolayer strategy for sugiyama like \`decrossTwoLayer(twolayerAgg())\`, but if you still want to continue you can suppress this check with \`decrossTwoLayer().order(twolayerOpt().check("slow"))\``;return eV("opt","min",u,f,d)}function ip(...t){if(t.length)throw tf`got arguments to twolayerOpt(${t}); you probably forgot to construct twolayerOpt before passing to order: \`decrossTwoLayer().order(twolayerOpt())\`, note the trailing "()"`;return function t(e){function i(t,i,r){let[o,n]=r?[i,t]:[t,i],s=r?t=>t.parentCounts():t=>t.childCounts(),a=new Map(tv(o,(t,e)=>[t,e])),l=new Map(tv(n,(t,e)=>[t,e])),h={},u=[];for(let t of o)l.has(t)?(Object.assign(h,ic(u,a,l,s,e)),u.length=0):u.push(t);Object.assign(h,ic(u,a,l,s,e)),o.sort((t,e)=>{let i=a.get(t),r=a.get(e);return i<r?h[id(i,r)]||-1:-(h[id(r,i)]||-1)})}return i.check=function(i){return void 0===i?e.check:t(y(g({},e),{check:i}))},i.dist=function(i){return void 0===i?e.dist:t(y(g({},e),{dist:i}))},i.d3dagBuiltin=!0,i}({check:"fast",dist:!1})}function ig(t){let{width:e,height:i}=t;return function(r,o){let{width:n,height:s}=o,a=e/n,l=i/s;for(let t of r.nodes())t.x*=a,t.y*=l;for(let t of r.links())for(let e of t.points)e[0]*=a,e[1]*=l;return t}}function iy(t){let[e,i]=t;return function(t,r){for(let r of t.links()){let[t,o,n,s]=r.points;if(void 0!==s)throw tf`link points had more than three points: ${r.points.length}; tweakGridPoints can only be applied to grid layouts`;if(void 0!==n){let[s,a]=t,[l,h]=o,[u,f]=n;r.points=[t,[l+e*Math.sign(s-l),h+i*Math.sign(a-h)],o,[l+e*Math.sign(u-l),h+i*Math.sign(f-h)],n]}}return r}}function iv(t,e){for(let e of t.nodes()){let t=e.x;e.x=e.y,e.y=t}for(let e of t.links())for(let t of e.points){let[e]=t;t[0]=t[1],t[1]=e}let{width:i,height:r}=e;return{width:r,height:i}}function im(t,e){let{height:i}=e;for(let e of t.nodes())e.y=i-e.y;for(let e of t.links())for(let t of e.points)t[1]=i-t[1];return e}function ib(t,e){let{width:i}=e;for(let e of t.nodes())e.x=i-e.x;for(let e of t.links())for(let t of e.points)t[0]=i-t[0];return e}function iw(t="diagonal"){if("diagonal"===t)return iv;if("vertical"===t)return im;if("horizontal"===t)return ib;throw tf`invalid tweakFlip style: ${t}`}function ix(t,e,i,r){let[o,n]=t,[s,a]=e,[l,h]=i,[u,f]=r,d=o-s/2,c=o+s/2,p=n-a/2,g=n+a/2;function y(t,e){let i=0;return t<d?i|=1:t>c&&(i|=2),e<p?i|=4:e>g&&(i|=8),i}let v=y(l,h),m=y(u,f);if(!m)throw tf`line from [${l}, ${h}] -> [${u}, ${f}] ended inside rectangle centered at [${o}, ${n}] with size [${s}, ${a}]`;for(;;){if(!m)return[u,f];if(v&m)return[l,h];8&m?(u=l+(u-l)*(g-h)/(f-h),f=g):4&m?(u=l+(u-l)*(p-h)/(f-h),f=p):2&m?(f=h+(f-h)*(c-l)/(u-l),u=c):(f=h+(f-h)*(d-l)/(u-l),u=d),m=y(u,f)}}function ik(t,e,i,r){let[o,n]=t,[s,a]=e,[l,h]=i,[u,f]=r,d=s/2,c=a/2,p=u-l,g=l-o,y=f-h,v=h-n,m=d*d,b=c*c,w=m*y*y+b*p*p,x=p*v-y*g,k=w-x*x;if(!(k>=0))return[l,h];{let t=d*c*Math.sqrt(k),e=p*g*b+y*v*m,i=-((e-t)/w);if(1>-((e+t)/w)&&1<i)throw tf`line from [${l}, ${h}] -> [${u}, ${f}] ended inside ellipse at [${o}, ${n}] with size [${s}, ${a}]`;return 0<=i&&i<=1?[i*p+l,i*y+h]:[l,h]}}function iI(t,e=ix){return function(i,r){for(let r of i.nodes()){let i=[r.x,r.y],o="function"==typeof t?t(r):t;for(let{points:t}of r.parentLinks()){let[r,n]=t.slice(-2),s=e(i,o,n,r);t.splice(-1,1,s)}for(let{points:t}of r.childLinks()){let[r,n]=t,s=e(i,o,r,n);t.splice(0,1,s)}}return r}}function iM(t,e){let i=t.findIndex(t=>t<e);return i>=0?i:t.length}function iC(...t){if(t.length)throw tf`got arguments to zherebko(${t}), but constructor takes no arguments; these were probably meant as data which should be called as \`zherebko()(...)\``;return function t(e,i){function r(t){var r,o;let n;if(t.nnodes()){let{xgap:s,ygap:a}=i,l="function"==typeof(o=e.nodeSize)?o:()=>o,h=[...t.topological(e.rank)],u=-a,f=0;for(let t of h){let[e,i]=l(t);if(e<=0||i<=0)throw tf`constant nodeSize must be positive, but got: [${e}, ${i}]`;f=Math.max(f,e),t.y=(u+=a)+i/2,u+=i}let d=u,c=Math.min(...tv(tk(h),([t,e])=>(e.y-t.y)/(t.nchildLinksTo(e)+t.nparentLinksTo(e)>1?2:1))),p=function(t,e){let i=[];for(let[e,r]of tk(t)){let t=!1;for(let o of function*(t){for(let e of t.parentLinks()){let{source:i}=e;i.y<t.y&&(yield[i,t,e])}for(let e of t.childLinks()){let{target:i}=e;i.y<t.y&&(yield[i,t,e])}}(r)){let[r]=o;e!==r||t?i.push(o):t=!0}}i.sort(([t,e],[i,r])=>e.y-r.y||i.y-t.y);let r=[],o=[],n=new Map;for(let[t,s,a]of i){let i=iM(o,t.y),l=iM(r,t.y);i<l?(n.set(a,-i-1),o[i]=s.y-e):(n.set(a,l+1),r[l]=s.y-e)}return n}(h,1.5*c),g=0,y=0;for(let t of p.values())g=Math.min(g,t),y=Math.max(y,t);let v=-g*s+f/2;for(let t of h)t.x=v;for(let e of t.links()){let t=null!=(r=p.get(e))?r:0,{source:i,target:o,points:n}=e;if(n.splice(0),n.push([i.x,i.y]),0!==t){let e=(t-g)*s+(t>0?f:0),r=i.y+c,a=o.y-c;a-r>.001*c?n.push([e,r],[e,a]):n.push([e,r])}n.push([o.x,o.y])}n={width:(y-g)*s+f,height:d}}else n={width:0,height:0};for(let i of e.tweaks)n=i(t,n);return n}return r.rank=function(r){if(void 0===r)return e.rank;{let{rank:o}=e;return t(y(g({},v(e,["rank"])),{rank:r}),i)}},r.tweaks=function(r){if(void 0===r)return e.tweaks;{let{tweaks:o}=e;return t(y(g({},v(e,["tweaks"])),{tweaks:r}),i)}},r.nodeSize=function(r){if(void 0===r)return e.nodeSize;if("function"!=typeof r&&(r[0]<=0||r[1]<=0)){let[t,e]=r;throw tf`constant nodeSize must be positive, but got: [${t}, ${e}]`}{let{nodeSize:o}=e;return t(y(g({},v(e,["nodeSize"])),{nodeSize:r}),i)}},r.gap=function(r){if(void 0!==r){let[o,n]=r;if(o<0||n<0)throw tf`gap width (${o}) and height (${n}) must be non-negative`;return t(e,y(g({},i),{xgap:o,ygap:n}))}{let{xgap:t,ygap:e}=i;return[t,e]}},r}({rank:()=>{},nodeSize:[1,1],tweaks:[]},{xgap:1,ygap:1})}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunkremote=self.webpackChunkremote||[]).push([["8572"],{28266:function(e,t,r){"use strict";r.r(t),r.d(t,{FontAwesomeIcon:()=>g});var n=r(17179),o=r(7862),a=r.n(o),i=r(8491),s=r.n(i);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return b(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e){var t;return(t=e-0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)}var m=["style"],d=!1;try{d=!0}catch(e){}function O(e){return e&&"object"===f(e)&&e.prefix&&e.iconName&&e.icon?e:n.parse.icon?n.parse.icon(e):null===e?null:e&&"object"===f(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function h(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?u({},e,t):{}}var v={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},g=s().forwardRef(function(e,t){var r,o,a,i,s,l,f,b,y,m,g,j,k,w,I,P,S,A,T,C,E=c(c({},v),e),N=E.icon,_=E.mask,R=E.symbol,W=E.className,z=E.title,D=E.titleId,F=E.maskId,U=O(N),L=h("classes",[].concat(p((o=E.beat,a=E.fade,i=E.beatFade,s=E.bounce,l=E.shake,f=E.flash,b=E.spin,y=E.spinPulse,m=E.spinReverse,g=E.pulse,j=E.fixedWidth,k=E.inverse,w=E.border,I=E.listItem,P=E.flip,S=E.size,A=E.rotation,T=E.pull,Object.keys((u(r={"fa-beat":o,"fa-fade":a,"fa-beat-fade":i,"fa-bounce":s,"fa-shake":l,"fa-flash":f,"fa-spin":b,"fa-spin-reverse":m,"fa-spin-pulse":y,"fa-pulse":g,"fa-fw":j,"fa-inverse":k,"fa-border":w,"fa-li":I,"fa-flip":!0===P,"fa-flip-horizontal":"horizontal"===P||"both"===P,"fa-flip-vertical":"vertical"===P||"both"===P},"fa-".concat(S),null!=S),u(r,"fa-rotate-".concat(A),null!=A&&0!==A),u(r,"fa-pull-".concat(T),null!=T),u(r,"fa-swap-opacity",E.swapOpacity),C=r)).map(function(e){return C[e]?e:null}).filter(function(e){return e}))),p((W||"").split(" ")))),q=h("transform","string"==typeof E.transform?n.parse.transform(E.transform):E.transform),B=h("mask",O(_)),H=(0,n.icon)(U,c(c(c(c({},L),q),B),{},{symbol:R,title:z,titleId:D,maskId:F}));if(!H)return!function(){if(!d&&console&&"function"==typeof console.error){var e;(e=console).error.apply(e,arguments)}}("Could not find icon",U),null;var M=H.abstract,V={ref:t};return Object.keys(E).forEach(function(e){v.hasOwnProperty(e)||(V[e]=E[e])}),x(M[0],V)});g.displayName="FontAwesomeIcon",g.propTypes={beat:a().bool,border:a().bool,beatFade:a().bool,bounce:a().bool,className:a().string,fade:a().bool,flash:a().bool,mask:a().oneOfType([a().object,a().array,a().string]),maskId:a().string,fixedWidth:a().bool,inverse:a().bool,flip:a().oneOf([!0,!1,"horizontal","vertical","both"]),icon:a().oneOfType([a().object,a().array,a().string]),listItem:a().bool,pull:a().oneOf(["right","left"]),pulse:a().bool,rotation:a().oneOf([0,90,180,270]),shake:a().bool,size:a().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:a().bool,spinPulse:a().bool,spinReverse:a().bool,symbol:a().oneOfType([a().bool,a().string]),title:a().string,titleId:a().string,transform:a().oneOfType([a().string,a().object]),swapOpacity:a().bool};var x=(function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof r)return r;var o=(r.children||[]).map(function(r){return e(t,r)}),a=Object.keys(r.attributes||{}).reduce(function(e,t){var n=r.attributes[t];switch(t){case"class":e.attrs.className=n,delete r.attributes.class;break;case"style":e.attrs.style=n.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var r=t.indexOf(":"),n=y(t.slice(0,r)),o=t.slice(r+1).trim();return n.startsWith("webkit")?e[n.charAt(0).toUpperCase()+n.slice(1)]=o:e[n]=o,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=n:e.attrs[y(t)]=n}return e},{attrs:{}}),i=n.style,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,m);return a.attrs.style=c(c({},a.attrs.style),void 0===i?{}:i),t.apply(void 0,[r.tag,c(c({},a.attrs),s)].concat(p(o)))}).bind(null,s().createElement)},31772:function(e,t,r){"use strict";var n=r(25148);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},7862:function(e,t,r){e.exports=r(31772)()},25148:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|
@@ -0,0 +1,4 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["8636"],{48959:function(e,t,r){r.r(t),r.d(t,{MediaType:()=>n,asBlob:()=>U,asString:()=>E,download:()=>j,generateCsv:()=>H,mkConfig:()=>l}),(o=n||(n={})).csv="text/csv",o.tsv="text/tab-separated-values",o.plain="text/plain";var o,n,a=e=>e,i=e=>e,s={fieldSeparator:",",decimalSeparator:".",quoteStrings:!0,quoteCharacter:'"',showTitle:!1,title:"My Generated Report",filename:"generated",showColumnHeaders:!0,useTextFile:!1,fileExtension:"csv",mediaType:n.csv,useBom:!0,columnHeaders:[],useKeysAsHeaders:!1,boolDisplay:{true:"TRUE",false:"FALSE"},replaceUndefinedWith:""},l=e=>Object.assign({},s,e);class u extends Error{constructor(e){super(e),this.name="CsvGenerationError"}}class d extends Error{constructor(e){super(e),this.name="EmptyHeadersError"}}class c extends Error{constructor(e){super(e),this.name="CsvDownloadEnvironmentError"}}class p extends Error{constructor(e){super(e),this.name="UnsupportedDataFormatError"}}var f=e=>"object"==typeof e?a(e.key):a(e),h=e=>"object"==typeof e?a(e.displayLabel):a(e),m=(e,...t)=>t.reduce((e,t)=>t(e),e),y=e=>t=>e.useBom?a(i(t)+"\uFEFF"):t,b=e=>t=>e.showTitle?g(a(i(t)+e.title))(a("")):t,g=e=>t=>a(i(e)+i(t)+"\r\n"),w=e=>(t,r)=>v(e)(a(i(t)+i(r))),v=e=>t=>a(i(t)+e.fieldSeparator),x=(e,t)=>r=>{if(!e.showColumnHeaders)return r;if(t.length<1)throw new d("Option to show headers but none supplied. Make sure there are keys in your collection or that you've supplied headers through the config options.");let o=a("");for(let r=0;r<t.length;r++){let n=h(t[r]);o=w(e)(o,q(e,i(n)))}return o=a(i(o).slice(0,-1)),g(r)(o)},C=(e,t,r)=>o=>{let n=o;for(var s=0;s<r.length;s++){let o=a("");for(let n=0;n<t.length;n++){let a=f(t[n]),l=r[s][i(a)];o=w(e)(o,q(e,l))}o=a(i(o).slice(0,-1)),n=g(n)(o)}return n},E=i,S=e=>+e===e&&(!isFinite(e)||!!(e%1)),O=(e,t)=>{if(S(t)){if("locale"===e.decimalSeparator)return a(t.toLocaleString());if(e.decimalSeparator)return a(t.toString().replace(".",e.decimalSeparator))}return a(t.toString())},k=(e,t)=>{let r=t;return(e.quoteStrings||e.fieldSeparator&&t.indexOf(e.fieldSeparator)>-1||e.quoteCharacter&&t.indexOf(e.quoteCharacter)>-1||t.indexOf("\n")>-1||t.indexOf("\r")>-1)&&(r=e.quoteCharacter+('"'==e.quoteCharacter&&t.indexOf('"')>-1?t.replace(/"/g,'""'):t)+e.quoteCharacter),a(r)},F=(e,t)=>a(e.boolDisplay[t?"true":"false"]),T=(e,t)=>void 0===t&&void 0!==e.replaceUndefinedWith?k(e,e.replaceUndefinedWith+""):null===t?k(e,"null"):k(e,""),q=(e,t)=>{if("number"==typeof t)return O(e,t);if("string"==typeof t)return k(e,t);if("boolean"==typeof t&&e.boolDisplay)return F(e,t);if(null==t)return T(e,t);throw new p(`
|
2
|
+
typeof ${typeof t} isn't supported. Only number, string, boolean, null and undefined are supported.
|
3
|
+
Please convert the data in your object to one of those before generating the CSV.
|
4
|
+
`)},H=e=>t=>{let r=l(e),o=r.useKeysAsHeaders?Object.keys(t[0]):r.columnHeaders,n=m(a(""),y(r),b(r),x(r,o),C(r,o,t));if(i(n).length<1)throw new u("Output is empty. Is your data formatted correctly?");return n},U=e=>t=>{let r=l(e),o=i(t),n=r.useTextFile?"text/plain":r.mediaType;return new Blob([o],{type:`${n};charset=utf8;`})},j=e=>t=>{if(!window)throw new c("Downloading only supported in a browser environment.");let r=U(e)(t),o=l(e),n=o.useTextFile?"txt":o.fileExtension,a=`${o.filename}.${n}`,i=document.createElement("a");i.download=a,i.href=URL.createObjectURL(r),i.setAttribute("visibility","hidden"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["8652"],{99947:function(e,t,n){n.r(t),n.d(t,{Label:()=>i,Root:()=>l});var r=n(8491),a=n(78737),o=n(31549),i=r.forwardRef((e,t)=>(0,o.jsx)(a.WV.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var l=i},78737:function(e,t,n){n.d(t,{WV:()=>l,jH:()=>u});var r=n(8491),a=n(96853),o=n(30638),i=n(31549),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,o.createSlot)(`Primitive.${t}`),a=r.forwardRef((e,r)=>{let{asChild:a,...o}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(a?n:t,{...o,ref:r})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function u(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["8719"],{88905:function(e,t,r){r.d(t,{F:()=>a,e:()=>u});var n=r(8491);function l(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t=>{let r=!1,n=e.map(e=>{let n=l(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():l(e[t],null)}}}}function u(...e){return n.useCallback(a(...e),e)}},1563:function(e,t,r){r.d(t,{M:()=>o});var n,l=r(8491),a=r(82836),u=(n||(n=r.t(l,2)))[" useId ".trim().toString()]||(()=>void 0),i=0;function o(e){let[t,r]=l.useState(u());return(0,a.b)(()=>{e||r(e=>e??String(i++))},[e]),e||(t?`radix-${t}`:"")}},78737:function(e,t,r){r.d(t,{WV:()=>i,jH:()=>o});var n=r(8491),l=r(96853),a=r(30638),u=r(31549),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=(0,a.createSlot)(`Primitive.${t}`),l=n.forwardRef((e,n)=>{let{asChild:l,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,u.jsx)(l?r:t,{...a,ref:n})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{});function o(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))}},82836:function(e,t,r){r.d(t,{b:()=>l});var n=r(8491),l=globalThis?.document?n.useLayoutEffect:()=>{}},36236:function(e,t,r){r.r(t),r.d(t,{CommandSeparator:()=>R,CommandDialog:()=>F,Command:()=>D,CommandInput:()=>M,defaultFilter:()=>E,CommandItem:()=>x,CommandList:()=>V,useCommandState:()=>O,CommandRoot:()=>I,CommandLoading:()=>$,CommandEmpty:()=>P,CommandGroup:()=>A});var n=/[\\\/_+.#"@\[\(\{&]/,l=/[\\\/_+.#"@\[\(\{&]/g,a=/[\s-]/,u=/[\s-]/g;function i(e){return e.toLowerCase().replace(u," ")}var o=r(21573),c=r(8491),d=r(78737),s=r(1563),f=r(88905),m='[cmdk-group=""]',v='[cmdk-group-items=""]',p='[cmdk-item=""]',h=`${p}:not([aria-disabled="true"])`,g="cmdk-item-select",b="data-value",E=(e,t,r)=>{var o;return o=e,function e(t,r,i,o,c,d,s){if(d===r.length)return c===t.length?1:.99;var f=`${c},${d}`;if(void 0!==s[f])return s[f];for(var m,v,p,h,g=o.charAt(d),b=i.indexOf(g,c),E=0;b>=0;)(m=e(t,r,i,o,b+1,d+1,s))>E&&(b===c?m*=1:n.test(t.charAt(b-1))?(m*=.8,(p=t.slice(c,b-1).match(l))&&c>0&&(m*=Math.pow(.999,p.length))):a.test(t.charAt(b-1))?(m*=.9,(h=t.slice(c,b-1).match(u))&&c>0&&(m*=Math.pow(.999,h.length))):(m*=.17,c>0&&(m*=Math.pow(.999,b-c))),t.charAt(b)!==r.charAt(d)&&(m*=.9999)),(m<.1&&i.charAt(b-1)===o.charAt(d+1)||o.charAt(d+1)===o.charAt(d)&&i.charAt(b-1)!==o.charAt(d))&&.1*(v=e(t,r,i,o,b+1,d+2,s))>m&&(m=.1*v),m>E&&(E=m),b=i.indexOf(g,b+1);return s[f]=E,E}(o=r&&r.length>0?`${o+" "+r.join(" ")}`:o,t,i(o),i(t),0,0,{})},w=c.createContext(void 0),y=()=>c.useContext(w),k=c.createContext(void 0),S=()=>c.useContext(k),C=c.createContext(void 0),I=c.forwardRef((e,t)=>{let r=K(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=K(()=>new Set),l=K(()=>new Map),a=K(()=>new Map),u=K(()=>new Set),i=L(e),{label:o,children:f,value:y,onValueChange:S,filter:C,shouldFilter:I,loop:x,disablePointerSelection:A=!1,vimBindings:R=!0,...M}=e,V=(0,s.M)(),F=(0,s.M)(),P=(0,s.M)(),$=c.useRef(null),D=q();W(()=>{if(void 0!==y){let e=y.trim();r.current.value=e,O.emit()}},[y]),W(()=>{D(6,_)},[]);let O=c.useMemo(()=>({subscribe:e=>(u.current.add(e),()=>u.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var l,a,u,o;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)U(),H(),D(1,G);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(P);e?e.focus():null==(l=document.getElementById(V))||l.focus()}if(D(7,()=>{var e;r.current.selectedItemId=null==(e=T())?void 0:e.id,O.emit()}),n||D(5,_),(null==(a=i.current)?void 0:a.value)!==void 0){null==(o=(u=i.current).onValueChange)||o.call(u,null!=t?t:"");return}}O.emit()}},emit:()=>{u.current.forEach(e=>e())}}),[]),j=c.useMemo(()=>({value:(e,t,n)=>{var l;t!==(null==(l=a.current.get(e))?void 0:l.value)&&(a.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,B(t,n)),D(2,()=>{H(),O.emit()}))},item:(e,t)=>(n.current.add(e),t&&(l.current.has(t)?l.current.get(t).add(e):l.current.set(t,new Set([e]))),D(3,()=>{U(),H(),r.current.value||G(),O.emit()}),()=>{a.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=T();D(4,()=>{U(),(null==t?void 0:t.getAttribute("id"))===e&&G(),O.emit()})}),group:e=>(l.current.has(e)||l.current.set(e,new Set),()=>{a.current.delete(e),l.current.delete(e)}),filter:()=>i.current.shouldFilter,label:o||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:V,inputId:P,labelId:F,listInnerRef:$}),[]);function B(e,t){var n,l;let a=null!=(l=null==(n=i.current)?void 0:n.filter)?l:E;return e?a(e,r.current.search,t):0}function H(){if(!r.current.search||!1===i.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=l.current.get(r),a=0;n.forEach(t=>{a=Math.max(e.get(t),a)}),t.push([r,a])});let n=$.current;J().sort((t,r)=>{var n,l;let a=t.getAttribute("id"),u=r.getAttribute("id");return(null!=(n=e.get(u))?n:0)-(null!=(l=e.get(a))?l:0)}).forEach(e=>{let t=e.closest(v);t?t.appendChild(e.parentElement===t?e:e.closest(`${v} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${v} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=$.current)?void 0:t.querySelector(`${m}[${b}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function G(){let e=J().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(b);O.setState("value",t||void 0)}function U(){var e,t,u,o;if(!r.current.search||!1===i.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let c=0;for(let l of n.current){let n=B(null!=(t=null==(e=a.current.get(l))?void 0:e.value)?t:"",null!=(o=null==(u=a.current.get(l))?void 0:u.keywords)?o:[]);r.current.filtered.items.set(l,n),n>0&&c++}for(let[e,t]of l.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function _(){var e,t,r;let n=T();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(m))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function T(){var e;return null==(e=$.current)?void 0:e.querySelector(`${p}[aria-selected="true"]`)}function J(){var e;return Array.from((null==(e=$.current)?void 0:e.querySelectorAll(h))||[])}function Q(e){let t=J()[e];t&&O.setState("value",t.getAttribute(b))}function X(e){var t;let r=T(),n=J(),l=n.findIndex(e=>e===r),a=n[l+e];null!=(t=i.current)&&t.loop&&(a=l+e<0?n[n.length-1]:l+e===n.length?n[0]:n[l+e]),a&&O.setState("value",a.getAttribute(b))}function Y(e){let t=T(),r=null==t?void 0:t.closest(m),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,m):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,m))?void 0:r.querySelector(h);n?O.setState("value",n.getAttribute(b)):X(e)}let Z=()=>Q(J().length-1),ee=e=>{e.preventDefault(),e.metaKey?Z():e.altKey?Y(1):X(1)},et=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?Y(-1):X(-1)};return c.createElement(d.WV.div,{ref:t,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=M.onKeyDown)||t.call(M,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":R&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":R&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),Q(0);break;case"End":e.preventDefault(),Z();break;case"Enter":{e.preventDefault();let t=T();if(t){let e=new Event(g);t.dispatchEvent(e)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:z},o),N(e,e=>c.createElement(k.Provider,{value:O},c.createElement(w.Provider,{value:j},e))))}),x=c.forwardRef((e,t)=>{var r,n;let l=(0,s.M)(),a=c.useRef(null),u=c.useContext(C),i=y(),o=L(e),m=null!=(n=null==(r=o.current)?void 0:r.forceMount)?n:null==u?void 0:u.forceMount;W(()=>{if(!m)return i.item(l,null==u?void 0:u.id)},[m]);let v=j(l,a,[e.value,e.children,a],e.keywords),p=S(),h=O(e=>e.value&&e.value===v.current),b=O(e=>!!m||!1===i.filter()||!e.search||e.filtered.items.get(l)>0);function E(){var e,t;w(),null==(t=(e=o.current).onSelect)||t.call(e,v.current)}function w(){p.setState("value",v.current,!0)}if(c.useEffect(()=>{let t=a.current;if(!(!t||e.disabled))return t.addEventListener(g,E),()=>t.removeEventListener(g,E)},[b,e.onSelect,e.disabled]),!b)return null;let{disabled:k,value:I,onSelect:x,forceMount:A,keywords:R,...M}=e;return c.createElement(d.WV.div,{ref:(0,f.F)(a,t),...M,id:l,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!h,"data-disabled":!!k,"data-selected":!!h,onPointerMove:k||i.getDisablePointerSelection()?void 0:w,onClick:k?void 0:E},e.children)}),A=c.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:l,...a}=e,u=(0,s.M)(),i=c.useRef(null),o=c.useRef(null),m=(0,s.M)(),v=y(),p=O(e=>!!l||!1===v.filter()||!e.search||e.filtered.groups.has(u));W(()=>v.group(u),[]),j(u,i,[e.value,e.heading,o]);let h=c.useMemo(()=>({id:u,forceMount:l}),[l]);return c.createElement(d.WV.div,{ref:(0,f.F)(i,t),...a,"cmdk-group":"",role:"presentation",hidden:!p||void 0},r&&c.createElement("div",{ref:o,"cmdk-group-heading":"","aria-hidden":!0,id:m},r),N(e,e=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?m:void 0},c.createElement(C.Provider,{value:h},e))))}),R=c.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,l=c.useRef(null),a=O(e=>!e.search);return r||a?c.createElement(d.WV.div,{ref:(0,f.F)(l,t),...n,"cmdk-separator":"",role:"separator"}):null}),M=c.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,l=null!=e.value,a=S(),u=O(e=>e.search),i=O(e=>e.selectedItemId),o=y();return c.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),c.createElement(d.WV.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":o.listId,"aria-labelledby":o.labelId,"aria-activedescendant":i,id:o.inputId,type:"text",value:l?e.value:u,onChange:e=>{l||a.setState("search",e.target.value),null==r||r(e.target.value)}})}),V=c.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...l}=e,a=c.useRef(null),u=c.useRef(null),i=O(e=>e.selectedItemId),o=y();return c.useEffect(()=>{if(u.current&&a.current){let e=u.current,t=a.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),c.createElement(d.WV.div,{ref:(0,f.F)(a,t),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":n,id:o.listId},N(e,e=>c.createElement("div",{ref:(0,f.F)(u,o.listInnerRef),"cmdk-list-sizer":""},e)))}),F=c.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:l,contentClassName:a,container:u,...i}=e;return c.createElement(o.Root,{open:r,onOpenChange:n},c.createElement(o.Portal,{container:u},c.createElement(o.Overlay,{"cmdk-overlay":"",className:l}),c.createElement(o.Content,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(I,{ref:t,...i}))))}),P=c.forwardRef((e,t)=>O(e=>0===e.filtered.count)?c.createElement(d.WV.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),$=c.forwardRef((e,t)=>{let{progress:r,children:n,label:l="Loading...",...a}=e;return c.createElement(d.WV.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},N(e,e=>c.createElement("div",{"aria-hidden":!0},e)))}),D=Object.assign(I,{List:V,Item:x,Input:M,Group:A,Separator:R,Dialog:F,Empty:P,Loading:$});function L(e){let t=c.useRef(e);return W(()=>{t.current=e}),t}var W="undefined"==typeof window?c.useEffect:c.useLayoutEffect;function K(e){let t=c.useRef();return void 0===t.current&&(t.current=e()),t}function O(e){let t=S(),r=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,r,r)}function j(e,t,r,n=[]){let l=c.useRef(),a=y();return W(()=>{var u;let i=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():l.current}})(),o=n.map(e=>e.trim());a.value(e,i,o),null==(u=t.current)||u.setAttribute(b,i),l.current=i}),l}var q=()=>{let[e,t]=c.useState(),r=K(()=>new Map);return W(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function N({asChild:e,children:t},r){let n;return e&&c.isValidElement(t)?c.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},r(t.props.children)):r(t)}var z={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}}}]);
|