@teselagen/ove 0.3.9 → 0.3.11

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/index.js CHANGED
@@ -3439,10 +3439,7 @@ function getAugmentedNamespace(n) {
3439
3439
  if (typeof f == "function") {
3440
3440
  var a = function a () {
3441
3441
  if (this instanceof a) {
3442
- var args = [null];
3443
- args.push.apply(args, arguments);
3444
- var Ctor = Function.bind.apply(f, args);
3445
- return new Ctor();
3442
+ return Reflect.construct(f, arguments, this.constructor);
3446
3443
  }
3447
3444
  return f.apply(this, arguments);
3448
3445
  };
@@ -5521,7 +5518,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
5521
5518
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5522
5519
  PERFORMANCE OF THIS SOFTWARE.
5523
5520
  ***************************************************************************** */
5524
- /* global Reflect, Promise */
5521
+ /* global Reflect, Promise, SuppressedError, Symbol */
5525
5522
 
5526
5523
 
5527
5524
  function __awaiter$1(thisArg, _arguments, P, generator) {
@@ -5586,6 +5583,11 @@ function __spread() {
5586
5583
  return ar;
5587
5584
  }
5588
5585
 
5586
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
5587
+ var e = new Error(message);
5588
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
5589
+ };
5590
+
5589
5591
  var COMMON_MIME_TYPES = new Map([
5590
5592
  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
5591
5593
  ['aac', 'audio/aac'],
@@ -9185,19 +9187,20 @@ var Reaction = /*#__PURE__*/function () {
9185
9187
  }
9186
9188
  }
9187
9189
  };
9188
- _proto.getDisposer_ = function getDisposer_() {
9189
- var r = this.dispose.bind(this);
9190
- r[$mobx] = this;
9191
- return r;
9190
+ _proto.getDisposer_ = function getDisposer_(abortSignal) {
9191
+ var _this2 = this;
9192
+ var dispose = function dispose() {
9193
+ _this2.dispose();
9194
+ abortSignal == null ? void 0 : abortSignal.removeEventListener == null ? void 0 : abortSignal.removeEventListener("abort", dispose);
9195
+ };
9196
+ abortSignal == null ? void 0 : abortSignal.addEventListener == null ? void 0 : abortSignal.addEventListener("abort", dispose);
9197
+ dispose[$mobx] = this;
9198
+ return dispose;
9192
9199
  };
9193
9200
  _proto.toString = function toString() {
9194
9201
  return "Reaction[" + this.name_ + "]";
9195
9202
  };
9196
9203
  _proto.trace = function trace$1(enterBreakPoint) {
9197
- if (enterBreakPoint === void 0) {
9198
- enterBreakPoint = false;
9199
- }
9200
- trace(this, enterBreakPoint);
9201
9204
  };
9202
9205
  return Reaction;
9203
9206
  }();
@@ -9329,7 +9332,7 @@ function isAction(thing) {
9329
9332
  * @returns disposer function, which can be used to stop the view from being updated in the future.
9330
9333
  */
9331
9334
  function autorun(view, opts) {
9332
- var _opts$name, _opts;
9335
+ var _opts$name, _opts, _opts2, _opts2$signal, _opts3;
9333
9336
  if (opts === void 0) {
9334
9337
  opts = EMPTY_OBJECT;
9335
9338
  }
@@ -9360,8 +9363,10 @@ function autorun(view, opts) {
9360
9363
  function reactionRunner() {
9361
9364
  view(reaction);
9362
9365
  }
9363
- reaction.schedule_();
9364
- return reaction.getDisposer_();
9366
+ if (!((_opts2 = opts) != null && (_opts2$signal = _opts2.signal) != null && _opts2$signal.aborted)) {
9367
+ reaction.schedule_();
9368
+ }
9369
+ return reaction.getDisposer_((_opts3 = opts) == null ? void 0 : _opts3.signal);
9365
9370
  }
9366
9371
  var run = function run(f) {
9367
9372
  return f();
@@ -9578,37 +9583,6 @@ function isObservable$1(value) {
9578
9583
  return _isObservable(value);
9579
9584
  }
9580
9585
 
9581
- function trace() {
9582
- {
9583
- die("trace() is not available in production builds");
9584
- }
9585
- var enterBreakPoint = false;
9586
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9587
- args[_key] = arguments[_key];
9588
- }
9589
- if (typeof args[args.length - 1] === "boolean") {
9590
- enterBreakPoint = args.pop();
9591
- }
9592
- var derivation = getAtomFromArgs(args);
9593
- if (!derivation) {
9594
- return die("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");
9595
- }
9596
- if (derivation.isTracing_ === TraceMode.NONE) {
9597
- console.log("[mobx.trace] '" + derivation.name_ + "' tracing enabled");
9598
- }
9599
- derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;
9600
- }
9601
- function getAtomFromArgs(args) {
9602
- switch (args.length) {
9603
- case 0:
9604
- return globalState.trackingDerivation;
9605
- case 1:
9606
- return getAtom(args[0]);
9607
- case 2:
9608
- return getAtom(args[0], args[1]);
9609
- }
9610
- }
9611
-
9612
9586
  /**
9613
9587
  * During a transaction no views are updated until the end of the transaction.
9614
9588
  * The transaction will be run synchronously nonetheless.
@@ -30452,12 +30426,20 @@ var _cof = function (it) {
30452
30426
  return toString$6.call(it).slice(8, -1);
30453
30427
  };
30454
30428
 
30455
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
30456
- var cof$2 = _cof;
30457
- // eslint-disable-next-line no-prototype-builtins
30458
- var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
30459
- return cof$2(it) == 'String' ? it.split('') : Object(it);
30460
- };
30429
+ var _iobject;
30430
+ var hasRequired_iobject;
30431
+
30432
+ function require_iobject () {
30433
+ if (hasRequired_iobject) return _iobject;
30434
+ hasRequired_iobject = 1;
30435
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
30436
+ var cof = _cof;
30437
+ // eslint-disable-next-line no-prototype-builtins
30438
+ _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
30439
+ return cof(it) == 'String' ? it.split('') : Object(it);
30440
+ };
30441
+ return _iobject;
30442
+ }
30461
30443
 
30462
30444
  // 7.2.1 RequireObjectCoercible(argument)
30463
30445
  var _defined = function (it) {
@@ -30466,7 +30448,7 @@ var _defined = function (it) {
30466
30448
  };
30467
30449
 
30468
30450
  // to indexed object, toObject with fallback for non-array-like ES3 strings
30469
- var IObject = _iobject;
30451
+ var IObject = require_iobject();
30470
30452
  var defined$2 = _defined;
30471
30453
  var _toIobject = function (it) {
30472
30454
  return IObject(defined$2(it));
@@ -30586,7 +30568,14 @@ _objectGops.f = Object.getOwnPropertySymbols;
30586
30568
 
30587
30569
  var _objectPie = {};
30588
30570
 
30589
- _objectPie.f = {}.propertyIsEnumerable;
30571
+ var hasRequired_objectPie;
30572
+
30573
+ function require_objectPie () {
30574
+ if (hasRequired_objectPie) return _objectPie;
30575
+ hasRequired_objectPie = 1;
30576
+ _objectPie.f = {}.propertyIsEnumerable;
30577
+ return _objectPie;
30578
+ }
30590
30579
 
30591
30580
  // 7.1.13 ToObject(argument)
30592
30581
  var defined$1 = _defined;
@@ -30604,9 +30593,9 @@ function require_objectAssign () {
30604
30593
  var DESCRIPTORS = _descriptors;
30605
30594
  var getKeys = _objectKeys;
30606
30595
  var gOPS = _objectGops;
30607
- var pIE = _objectPie;
30596
+ var pIE = require_objectPie();
30608
30597
  var toObject = _toObject;
30609
- var IObject = _iobject;
30598
+ var IObject = require_iobject();
30610
30599
  var $assign = Object.assign;
30611
30600
 
30612
30601
  // should work with symbols and should have deterministic property order (V8 bug)
@@ -31319,7 +31308,7 @@ var _wksDefine = function (name) {
31319
31308
  // all enumerable object keys, includes symbols
31320
31309
  var getKeys = _objectKeys;
31321
31310
  var gOPS$1 = _objectGops;
31322
- var pIE$1 = _objectPie;
31311
+ var pIE$1 = require_objectPie();
31323
31312
  var _enumKeys = function (it) {
31324
31313
  var result = getKeys(it);
31325
31314
  var getSymbols = gOPS$1.f;
@@ -31372,7 +31361,7 @@ _objectGopnExt.f = function getOwnPropertyNames(it) {
31372
31361
 
31373
31362
  var _objectGopd = {};
31374
31363
 
31375
- var pIE = _objectPie;
31364
+ var pIE = require_objectPie();
31376
31365
  var createDesc$1 = _propertyDesc;
31377
31366
  var toIObject$1 = _toIobject;
31378
31367
  var toPrimitive$1 = _toPrimitive$1;
@@ -31540,7 +31529,7 @@ if (!USE_NATIVE) {
31540
31529
  $GOPD.f = $getOwnPropertyDescriptor;
31541
31530
  $DP.f = $defineProperty$1;
31542
31531
  _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
31543
- _objectPie.f = $propertyIsEnumerable;
31532
+ require_objectPie().f = $propertyIsEnumerable;
31544
31533
  $GOPS.f = $getOwnPropertySymbols;
31545
31534
 
31546
31535
  if (DESCRIPTORS && !_library) {
@@ -41273,7 +41262,7 @@ ReactTable.defaultProps = defaultProps$2;
41273
41262
  var dayjs_min = {exports: {}};
41274
41263
 
41275
41264
  (function (module, exports) {
41276
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),l=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
41265
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof b},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,f=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=O.p(f),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return O.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return O.s(e.$y,4,"0");case"M":return a+1;case"MM":return O.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return O.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return O.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return O.s(u,2,"0");case"s":return String(e.$s);case"ss":return O.s(e.$s,2,"0");case"SSS":return O.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=O.p(d),m=w(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return O.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:O.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),_=b.prototype;return w.prototype=_,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,b,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
41277
41266
  } (dayjs_min));
41278
41267
 
41279
41268
  var dayjs_minExports = dayjs_min.exports;
@@ -97717,7 +97706,9 @@ const extractZipFiles = async (allFiles) => {
97717
97706
  const zipFilesArray = Array.isArray(zipFiles) ? zipFiles : [zipFiles];
97718
97707
  const parsedZips = await Promise$1.map(
97719
97708
  zipFilesArray,
97720
- (file) => jszip_minExports.loadAsync(file instanceof Blob ? file : file.originFileObj)
97709
+ (file) => jszip_minExports.loadAsync(
97710
+ file instanceof (typeof Blob !== "undefined" ? Blob : require("buffer").Blob) ? file : file.originFileObj
97711
+ )
97721
97712
  );
97722
97713
  const zippedFiles = lodashExports.flatMap(
97723
97714
  parsedZips,
@@ -99574,10 +99565,7 @@ function UploaderInner({
99574
99565
  const { showDialogPromise: showUploadCsvWizardDialog, comp } = useDialog({
99575
99566
  ModalComponent: UploadCsvWizardDialog
99576
99567
  });
99577
- const {
99578
- showDialogPromise: showSimpleInsertDataDialog,
99579
- comp: comp2
99580
- } = useDialog({
99568
+ const { showDialogPromise: showSimpleInsertDataDialog, comp: comp2 } = useDialog({
99581
99569
  ModalComponent: SimpleInsertDataDialog
99582
99570
  });
99583
99571
  function cleanupFiles() {
@@ -99653,17 +99641,16 @@ function UploaderInner({
99653
99641
  const handleDownloadXlsxFile = async () => {
99654
99642
  const dataDictionarySchema = [
99655
99643
  { value: (f) => f.displayName || f.path, column: `Column Name` },
99644
+ // {
99645
+ // value: f => f.isUnique ? "Unique" : "",
99646
+ // column: `Unique?`
99647
+ // },
99656
99648
  {
99657
- value: (f) => f.isUnique,
99658
- column: `Unique`
99649
+ value: (f) => f.isRequired ? "Required" : "Optional",
99650
+ column: `Required?`
99659
99651
  },
99660
99652
  {
99661
- value: (f) => f.isRequired,
99662
- column: `Required`,
99663
- type: Boolean
99664
- },
99665
- {
99666
- value: (f) => f.type || "text",
99653
+ value: (f) => f.type === "dropdown" ? "text" : f.type || "text",
99667
99654
  column: `Data Type`
99668
99655
  },
99669
99656
  {
@@ -99999,10 +99986,7 @@ function UploaderInner({
99999
99986
  ...file.parsedString ? { parsedString: file.parsedString } : {}
100000
99987
  };
100001
99988
  });
100002
- const cleanedFileList = [
100003
- ...cleanedAccepted,
100004
- ...fileListToUse
100005
- ].slice(0, fileLimit ? fileLimit : void 0);
99989
+ const toKeep = [];
100006
99990
  if (validateAgainstSchema) {
100007
99991
  const filesWIssues = [];
100008
99992
  const filesWOIssues = [];
@@ -100033,65 +100017,65 @@ function UploaderInner({
100033
100017
  userSchema,
100034
100018
  parsedF.data
100035
100019
  );
100036
- window.toastr && window.toastr.error(
100037
- `It looks like there wasn't any data in your file. Please add some data and try again`
100038
- );
100039
- return;
100040
- }
100041
- let csvValidationIssue = _csvValidationIssue;
100042
- if (csvValidationIssue) {
100043
- if (lodashExports.isObject(csvValidationIssue)) {
100044
- initializeForm(
100045
- `editableCellTable${cleanedAccepted.length > 1 ? `-${i}` : ""}`,
100046
- {
100047
- reduxFormCellValidation: csvValidationIssue
100048
- },
100049
- {
100050
- keepDirty: true,
100051
- keepValues: true,
100052
- updateUnregisteredFields: true
100053
- }
100054
- );
100055
- const err = Object.values(csvValidationIssue)[0];
100056
- const errMsg = err && err.message ? err.message : err;
100057
- if (lodashExports.isPlainObject(errMsg)) {
100058
- throw new Error(
100059
- `errMsg is an object ${JSON.stringify(
100060
- errMsg,
100061
- null,
100062
- 4
100063
- )}`
100020
+ } else {
100021
+ toKeep.push(file);
100022
+ let csvValidationIssue = _csvValidationIssue;
100023
+ if (csvValidationIssue) {
100024
+ if (lodashExports.isObject(csvValidationIssue)) {
100025
+ initializeForm(
100026
+ `editableCellTable${cleanedAccepted.length > 1 ? `-${i}` : ""}`,
100027
+ {
100028
+ reduxFormCellValidation: csvValidationIssue
100029
+ },
100030
+ {
100031
+ keepDirty: true,
100032
+ keepValues: true,
100033
+ updateUnregisteredFields: true
100034
+ }
100064
100035
  );
100036
+ const err = Object.values(csvValidationIssue)[0];
100037
+ const errMsg = err && err.message ? err.message : err;
100038
+ if (lodashExports.isPlainObject(errMsg)) {
100039
+ throw new Error(
100040
+ `errMsg is an object ${JSON.stringify(
100041
+ errMsg,
100042
+ null,
100043
+ 4
100044
+ )}`
100045
+ );
100046
+ }
100047
+ csvValidationIssue = /* @__PURE__ */ React$3.createElement("div", null, /* @__PURE__ */ React$3.createElement("div", null, "It looks like there was an error with your data (Correct on the Review Data page):"), /* @__PURE__ */ React$3.createElement("div", { style: { color: "red" } }, errMsg), /* @__PURE__ */ React$3.createElement("div", null, "Please review your headers and then correct any errors on the next page."));
100065
100048
  }
100066
- csvValidationIssue = /* @__PURE__ */ React$3.createElement("div", null, /* @__PURE__ */ React$3.createElement("div", null, "It looks like there was an error with your data (Correct on the Review Data page):"), /* @__PURE__ */ React$3.createElement("div", { style: { color: "red" } }, errMsg), /* @__PURE__ */ React$3.createElement("div", null, "Please review your headers and then correct any errors on the next page."));
100049
+ filesWIssues.push({
100050
+ file,
100051
+ csvValidationIssue,
100052
+ matchedHeaders,
100053
+ userSchema,
100054
+ searchResults
100055
+ });
100056
+ } else {
100057
+ filesWOIssues.push({
100058
+ file,
100059
+ csvValidationIssue,
100060
+ matchedHeaders,
100061
+ userSchema,
100062
+ searchResults
100063
+ });
100064
+ const newFileName = removeExt(file.name) + `.csv`;
100065
+ const { newFile, cleanedEntities } = getNewCsvFile(
100066
+ userSchema.userData,
100067
+ newFileName
100068
+ );
100069
+ file.meta = parsedF.meta;
100070
+ file.hasEditClick = true;
100071
+ file.parsedData = cleanedEntities;
100072
+ file.name = newFileName;
100073
+ file.originFileObj = newFile;
100074
+ file.originalFileObj = newFile;
100067
100075
  }
100068
- filesWIssues.push({
100069
- file,
100070
- csvValidationIssue,
100071
- matchedHeaders,
100072
- userSchema,
100073
- searchResults
100074
- });
100075
- } else {
100076
- filesWOIssues.push({
100077
- file,
100078
- csvValidationIssue,
100079
- matchedHeaders,
100080
- userSchema,
100081
- searchResults
100082
- });
100083
- const newFileName = removeExt(file.name) + `.csv`;
100084
- const { newFile, cleanedEntities } = getNewCsvFile(
100085
- userSchema.userData,
100086
- newFileName
100087
- );
100088
- file.meta = parsedF.meta;
100089
- file.hasEditClick = true;
100090
- file.parsedData = cleanedEntities;
100091
- file.name = newFileName;
100092
- file.originFileObj = newFile;
100093
- file.originalFileObj = newFile;
100094
100076
  }
100077
+ } else {
100078
+ toKeep.push(file);
100095
100079
  }
100096
100080
  }
100097
100081
  if (filesWIssues.length) {
@@ -100139,7 +100123,18 @@ function UploaderInner({
100139
100123
  }, 200);
100140
100124
  }
100141
100125
  }
100126
+ } else {
100127
+ toKeep.push(...cleanedAccepted);
100128
+ }
100129
+ if (toKeep.length === 0) {
100130
+ window.toastr && window.toastr.error(
100131
+ `It looks like there wasn't any data in your file. Please add some data and try again`
100132
+ );
100142
100133
  }
100134
+ const cleanedFileList = [...toKeep, ...fileListToUse].slice(
100135
+ 0,
100136
+ fileLimit ? fileLimit : void 0
100137
+ );
100143
100138
  handleSecondHalfOfUpload({ acceptedFiles, cleanedFileList });
100144
100139
  }
100145
100140
  },
@@ -100274,9 +100269,7 @@ function UploaderInner({
100274
100269
  incomingData: file.parsedData,
100275
100270
  validateAgainstSchema
100276
100271
  });
100277
- const {
100278
- newEntities
100279
- } = await showSimpleInsertDataDialog(
100272
+ const { newEntities } = await showSimpleInsertDataDialog(
100280
100273
  "onSimpleInsertDialogFinish",
100281
100274
  {
100282
100275
  dialogProps: {
@@ -100292,10 +100285,7 @@ function UploaderInner({
100292
100285
  if (!newEntities) {
100293
100286
  return;
100294
100287
  } else {
100295
- const {
100296
- newFile,
100297
- cleanedEntities
100298
- } = getNewCsvFile(newEntities, file.name);
100288
+ const { newFile, cleanedEntities } = getNewCsvFile(newEntities, file.name);
100299
100289
  Object.assign(file, {
100300
100290
  ...newFile,
100301
100291
  originFileObj: newFile,
@@ -122994,6 +122984,19 @@ function createInitialSequence(options) {
122994
122984
  };
122995
122985
  }
122996
122986
 
122987
+ function extractFileExtension(name) {
122988
+ if (typeof name === "string") {
122989
+ let ext = "";
122990
+ const match = name.match(/\.(\w+)$/);
122991
+ if (match && match[1]) {
122992
+ ext = match[1];
122993
+ }
122994
+ return ext;
122995
+ } else {
122996
+ return "";
122997
+ }
122998
+ }
122999
+
122997
123000
  function splitStringIntoLines(string) {
122998
123001
  let lines = [];
122999
123002
  if (string === "") {
@@ -123567,7 +123570,11 @@ function validateSequenceArray(parsingResultArray, options) {
123567
123570
  return parsingResultArray;
123568
123571
  }
123569
123572
 
123570
- function fastaToJson(fileString, options) {
123573
+ function fastaToJson(fileString, options = {}) {
123574
+ const ext = extractFileExtension(options.fileName);
123575
+ if (/^(faa)$/.test(ext)) {
123576
+ options.isProtein = true;
123577
+ }
123571
123578
  let resultArray = [];
123572
123579
  let result = null;
123573
123580
  try {
@@ -125211,6 +125218,7 @@ const parseXml = function(xmlData) {
125211
125218
  if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
125212
125219
  if (tagName[tagName.length - 1] === "/") {
125213
125220
  tagName = tagName.substr(0, tagName.length - 1);
125221
+ jPath = jPath.substr(0, jPath.length - 1);
125214
125222
  tagExp = tagName;
125215
125223
  } else {
125216
125224
  tagExp = tagExp.substr(0, tagExp.length - 1);
@@ -125767,11 +125775,18 @@ Builder.prototype.j2x = function(jObj, level) {
125767
125775
  let attrStr = "";
125768
125776
  let val = "";
125769
125777
  for (let key in jObj) {
125770
- if (typeof jObj[key] === "undefined") ; else if (jObj[key] === null) {
125771
- if (key[0] === "?")
125778
+ if (typeof jObj[key] === "undefined") {
125779
+ if (this.isAttribute(key)) {
125780
+ val += "";
125781
+ }
125782
+ } else if (jObj[key] === null) {
125783
+ if (this.isAttribute(key)) {
125784
+ val += "";
125785
+ } else if (key[0] === "?") {
125772
125786
  val += this.indentate(level) + "<" + key + "?" + this.tagEndChar;
125773
- else
125787
+ } else {
125774
125788
  val += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
125789
+ }
125775
125790
  } else if (jObj[key] instanceof Date) {
125776
125791
  val += this.buildTextValNode(jObj[key], key, "", level);
125777
125792
  } else if (typeof jObj[key] !== "object") {
@@ -125854,7 +125869,7 @@ Builder.prototype.buildObjectNode = function(val, key, attrStr, level) {
125854
125869
  piClosingChar = "?";
125855
125870
  tagEndExp = "";
125856
125871
  }
125857
- if (attrStr && val.indexOf("<") === -1) {
125872
+ if ((attrStr || attrStr === "") && val.indexOf("<") === -1) {
125858
125873
  return this.indentate(level) + "<" + key + attrStr + piClosingChar + ">" + val + tagEndExp;
125859
125874
  } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {
125860
125875
  return this.indentate(level) + `<!--${val}-->` + this.newLine;
@@ -125905,7 +125920,7 @@ function indentate(level) {
125905
125920
  return this.options.indentBy.repeat(level);
125906
125921
  }
125907
125922
  function isAttribute(name) {
125908
- if (name.startsWith(this.options.attributeNamePrefix)) {
125923
+ if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {
125909
125924
  return name.substr(this.attrPrefixLen);
125910
125925
  } else {
125911
125926
  return false;
@@ -126031,19 +126046,6 @@ function parseSbolJson(sbolJson, options) {
126031
126046
  };
126032
126047
  }
126033
126048
 
126034
- function extractFileExtension(name) {
126035
- if (typeof name === "string") {
126036
- let ext = "";
126037
- const match = name.match(/\.(\w+)$/);
126038
- if (match && match[1]) {
126039
- ext = match[1];
126040
- }
126041
- return ext;
126042
- } else {
126043
- return "";
126044
- }
126045
- }
126046
-
126047
126049
  /*!
126048
126050
  * Copyright 2008 Fair Oaks Labs, Inc.
126049
126051
  * All rights reserved.
@@ -135760,7 +135762,7 @@ async function anyToJson(fileContentStringOrFileObj, options) {
135760
135762
  );
135761
135763
  }
135762
135764
  }
135763
- if (/^(fasta|fas|fa|fna|ffn)$/.test(ext)) {
135765
+ if (/^(fasta|fas|fa|fna|ffn|faa)$/.test(ext)) {
135764
135766
  return fastaToJson(fileContentString, options);
135765
135767
  } else if (/^(gb|gbk)$/.test(ext)) {
135766
135768
  return genbankToJson(fileContentString, options);
@@ -142544,7 +142546,7 @@ const importSequenceFromFile = (props) => async (file, opts = {}) => {
142544
142546
  }
142545
142547
  async function finishDisplayingSeq(seqData) {
142546
142548
  if (onImport) {
142547
- seqData = await onImport(seqData);
142549
+ seqData = await onImport(seqData, file, props);
142548
142550
  }
142549
142551
  if (seqData) {
142550
142552
  seqData.stateTrackingId = uuid();
@@ -161050,7 +161052,7 @@ function showFileDialog({ multiple = false, onSelect }) {
161050
161052
  }
161051
161053
 
161052
161054
  const name = "@teselagen/ove";
161053
- const version = "0.3.8";
161055
+ const version = "0.3.10";
161054
161056
  const main = "./src/index.js";
161055
161057
  const exports$1 = {
161056
161058
  ".": {
@@ -169301,7 +169303,7 @@ class _LinearView extends React$3.Component {
169301
169303
  updateLabelsForInViewFeatures();
169302
169304
  },
169303
169305
  rowContainerStyle: {
169304
- height: height - 36,
169306
+ height: isNaN(height - 36) ? "auto" : height - 36,
169305
169307
  width: innerWidth + 26,
169306
169308
  paddingRight: marginWidth / 2,
169307
169309
  ...isLinViewZoomed && !isInAlignment && { paddingBottom: 15 }