@khanacademy/perseus 19.1.7 → 19.1.8

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.js CHANGED
@@ -4237,22 +4237,13 @@ const InteractiveUtil = {
4237
4237
  }
4238
4238
  };
4239
4239
 
4240
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4241
-
4242
- function getDefaultExportFromCjs (x) {
4243
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
4244
- }
4245
-
4246
- var raphael = {exports: {}};
4247
-
4248
4240
  /*!
4249
4241
  * Raphael 1.5.2 - JavaScript Vector Library
4250
4242
  *
4251
4243
  * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
4252
4244
  * Licensed under the MIT (http://raphaeljs.com/license.html) license.
4253
4245
  */
4254
-
4255
- (function () {
4246
+ var Raphael$1 = (function () {
4256
4247
  var setAttr;
4257
4248
  if ("".trim) {
4258
4249
  setAttr = function (node, att, value) {
@@ -8429,7 +8420,7 @@ var raphael = {exports: {}};
8429
8420
  };
8430
8421
  R.el = elproto;
8431
8422
  R.st = Set[proto];
8432
- raphael.exports = R;
8423
+ return R;
8433
8424
  })();
8434
8425
 
8435
8426
  /**
@@ -8717,7 +8708,7 @@ class Graphie$1 {
8717
8708
  constructor(el) {
8718
8709
  this.el = el;
8719
8710
  $__default["default"](el).css("position", "relative");
8720
- this.raphael = raphael.exports(el);
8711
+ this.raphael = Raphael$1(el);
8721
8712
 
8722
8713
  // For a sometimes-reproducible IE8 bug; doesn't affect SVG browsers at all
8723
8714
  $__default["default"](el).children("div").css("position", "absolute");
@@ -9076,7 +9067,7 @@ class Graphie$1 {
9076
9067
  // wrapper.setAttribute("data-graphie-type", "ellipse");
9077
9068
 
9078
9069
  // Create Raphael canvas
9079
- const localRaphael = raphael.exports(wrapper, width, height);
9070
+ const localRaphael = Raphael$1(wrapper, width, height);
9080
9071
  const visibleShape = localRaphael.ellipse(width / 2, height / 2, scaledRadii[0], scaledRadii[1]);
9081
9072
  return {
9082
9073
  wrapper: wrapper,
@@ -9143,7 +9134,7 @@ class Graphie$1 {
9143
9134
  });
9144
9135
 
9145
9136
  // Create Raphael canvas
9146
- const localRaphael = raphael.exports(wrapper, width, height);
9137
+ const localRaphael = Raphael$1(wrapper, width, height);
9147
9138
 
9148
9139
  // Calculate path
9149
9140
  const visibleShape = localRaphael.path(createPath(points));
@@ -9206,7 +9197,7 @@ class Graphie$1 {
9206
9197
  });
9207
9198
 
9208
9199
  // Create Raphael canvas
9209
- const localRaphael = raphael.exports(wrapper, width, height);
9200
+ const localRaphael = Raphael$1(wrapper, width, height);
9210
9201
 
9211
9202
  // Calculate path
9212
9203
  const path = "M" + start[0] + " " + start[1] + " " + "L" + end[0] + " " + end[1];
@@ -9430,7 +9421,7 @@ class Graphie$1 {
9430
9421
  postprocessDrawingResult(result) {
9431
9422
  // Bad heuristic for recognizing Raphael elements and sets
9432
9423
  const type = result.constructor.prototype;
9433
- if (type === raphael.exports.el || type === raphael.exports.st) {
9424
+ if (type === Raphael$1.el || type === Raphael$1.st) {
9434
9425
  result.attr(this.currentStyle);
9435
9426
  if (this.currentStyle.arrows) {
9436
9427
  result = this.addArrowheads(result);
@@ -9448,7 +9439,7 @@ class Graphie$1 {
9448
9439
  }
9449
9440
  addArrowheads(path) {
9450
9441
  const type = path.constructor.prototype;
9451
- if (type === raphael.exports.el) {
9442
+ if (type === Raphael$1.el) {
9452
9443
  if (path.type === "path" && typeof path.arrowheadsDrawn === "undefined") {
9453
9444
  const w = path.attr("stroke-width");
9454
9445
  const s = 0.6 + 0.4 * w;
@@ -9476,7 +9467,7 @@ class Graphie$1 {
9476
9467
  set.push(head);
9477
9468
  return set;
9478
9469
  }
9479
- } else if (type === raphael.exports.st) {
9470
+ } else if (type === Raphael$1.st) {
9480
9471
  for (let i = 0, l = path.items.length; i < l; i++) {
9481
9472
  this.addArrowheads(path.items[i]);
9482
9473
  }
@@ -10664,7 +10655,7 @@ ___default["default"].extend(GraphUtils.Graphie.prototype, {
10664
10655
  setDrawingAreaAvailable: function () {}
10665
10656
  }, options);
10666
10657
  const mouselayerZIndex = 2;
10667
- graph.mouselayer = raphael.exports(graph.raphael.canvas.parentNode, graph.xpixels, graph.ypixels);
10658
+ graph.mouselayer = Raphael$1(graph.raphael.canvas.parentNode, graph.xpixels, graph.ypixels);
10668
10659
  $__default["default"](graph.mouselayer.canvas).css("z-index", mouselayerZIndex);
10669
10660
  if (options.onClick || options.onMouseDown || options.onMouseMove || options.onMouseOver || options.onMouseOut) {
10670
10661
  const canvasClickTarget = graph.mouselayer.rect(0, 0, graph.xpixels, graph.ypixels).attr({
@@ -40597,366 +40588,222 @@ var Table$1 = {
40597
40588
  isLintable: true
40598
40589
  };
40599
40590
 
40600
- var hubble = {exports: {}};
40601
-
40602
- (function (module, exports) {
40603
- (function webpackUniversalModuleDefinition(root, factory) {
40604
- module.exports = factory();
40605
- })(commonjsGlobal, function () {
40606
- return (/******/function (modules) {
40607
- // webpackBootstrap
40608
- /******/ // The module cache
40609
- /******/
40610
- var installedModules = {};
40611
- /******/
40612
- /******/ // The require function
40613
- /******/
40614
- function __webpack_require__(moduleId) {
40615
- /******/
40616
- /******/ // Check if module is in cache
40617
- /******/if (installedModules[moduleId]) {
40618
- /******/return installedModules[moduleId].exports;
40619
- /******/
40620
- }
40621
- /******/ // Create a new module (and put it into the cache)
40622
- /******/
40623
- var module = installedModules[moduleId] = {
40624
- /******/i: moduleId,
40625
- /******/l: false,
40626
- /******/exports: {}
40627
- /******/
40628
- };
40629
- /******/
40630
- /******/ // Execute the module function
40631
- /******/
40632
- modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
40633
- /******/
40634
- /******/ // Flag the module as loaded
40635
- /******/
40636
- module.l = true;
40637
- /******/
40638
- /******/ // Return the exports of the module
40639
- /******/
40640
- return module.exports;
40641
- /******/
40642
- }
40643
- /******/
40644
- /******/
40645
- /******/ // expose the modules object (__webpack_modules__)
40646
- /******/
40647
- __webpack_require__.m = modules;
40648
- /******/
40649
- /******/ // expose the module cache
40650
- /******/
40651
- __webpack_require__.c = installedModules;
40652
- /******/
40653
- /******/ // define getter function for harmony exports
40654
- /******/
40655
- __webpack_require__.d = function (exports, name, getter) {
40656
- /******/if (!__webpack_require__.o(exports, name)) {
40657
- /******/Object.defineProperty(exports, name, {
40658
- /******/configurable: false,
40659
- /******/enumerable: true,
40660
- /******/get: getter
40661
- /******/
40662
- });
40663
- /******/
40664
- }
40665
- /******/
40666
- };
40667
- /******/
40668
- /******/ // getDefaultExport function for compatibility with non-harmony modules
40669
- /******/
40670
- __webpack_require__.n = function (module) {
40671
- /******/var getter = module && module.__esModule ? /******/function getDefault() {
40672
- return module['default'];
40673
- } : /******/function getModuleExports() {
40674
- return module;
40675
- };
40676
- /******/
40677
- __webpack_require__.d(getter, 'a', getter);
40678
- /******/
40679
- return getter;
40680
- /******/
40681
- };
40682
- /******/
40683
- /******/ // Object.prototype.hasOwnProperty.call
40684
- /******/
40685
- __webpack_require__.o = function (object, property) {
40686
- return Object.prototype.hasOwnProperty.call(object, property);
40687
- };
40688
- /******/
40689
- /******/ // __webpack_public_path__
40690
- /******/
40691
- __webpack_require__.p = "";
40692
- /******/
40693
- /******/ // Load entry module and return exports
40694
- /******/
40695
- return __webpack_require__(__webpack_require__.s = 1);
40696
- /******/
40697
- }
40698
- /************************************************************************/
40699
- /******/([/* 0 */
40700
- /***/function (module, exports) {
40701
- var isObject = function (obj) {
40702
- return obj === Object(obj);
40703
- };
40704
- var merge = function () {
40705
- var obj = {};
40706
- for (var i = 0; i < arguments.length; i++) {
40707
- var source = arguments[i];
40708
- if (source) {
40709
- for (var prop in source) {
40710
- obj[prop] = source[prop];
40711
- }
40712
- }
40713
- }
40714
- return obj;
40715
- };
40716
- var clone = function (obj) {
40717
- if (!isObject(obj)) {
40718
- return obj;
40719
- }
40720
- return Array.isArray(obj) ? obj.slice() : merge(obj);
40721
- };
40722
- module.exports = {
40723
- isObject: isObject,
40724
- merge: merge,
40725
- clone: clone
40726
- };
40727
-
40728
- /***/
40729
- }, /* 1 */
40730
- /***/function (module, exports, __webpack_require__) {
40731
- /* TODO batch *all* mutations
40732
- * idea: freeze / thaw implementations for all types
40733
- * lens constructor thaws, freeze delegates to type's freeze
40734
- */
40735
-
40736
- var util = __webpack_require__(0);
40737
- var clone = util.clone;
40738
- var isObject = util.isObject;
40739
- var merge = util.merge;
40740
- var arr = __webpack_require__(2);
40741
- var obj = __webpack_require__(3);
40742
- var str = __webpack_require__(4);
40743
-
40744
- // equivalents, without requiring it
40745
- // find the implementation to use for a given object
40746
- var dispatch = function (x) {
40747
- if (Array.isArray(x)) {
40748
- return arr;
40749
- } else if (isObject(x)) {
40750
- return obj;
40751
- } else if (typeof x === "string") {
40752
- return str;
40753
- }
40754
- };
40755
-
40756
- // This is underscore with a different name
40757
- var lens = function (obj) {
40758
- if (obj instanceof lens) {
40759
- return obj;
40760
- }
40761
- if (!(this instanceof lens)) {
40762
- return new lens(obj);
40763
- }
40764
- var ops = dispatch(obj);
40765
- this._wrapped = ops.thaw ? ops.thaw(obj) : obj;
40766
- };
40767
- lens.prototype.freeze = function () {
40768
- var obj = this._wrapped;
40769
- var ops = dispatch(obj);
40770
- return ops.freeze ? ops.freeze(obj) : obj;
40771
- };
40772
- lens.prototype.zoom = function (lensArr) {
40773
- if (this._zoomStack === undefined) {
40774
- this._zoomStack = [];
40775
- }
40776
- this._zoomStack.push({
40777
- zoom: lensArr,
40778
- wrapped: this._wrapped
40779
- });
40780
- this._wrapped = lens(this._wrapped).get(lensArr);
40781
- return this;
40782
- };
40783
- lens.prototype.deZoom = function () {
40784
- var frame = this._zoomStack.pop();
40785
- this._wrapped = lens(frame.wrapped).set(frame.zoom, this._wrapped).freeze();
40786
- return this;
40787
- };
40788
- lens.prototype.get = function (lensArr) {
40789
- var obj = this._wrapped;
40790
- for (var i = 0; i < lensArr.length; i++) {
40791
- obj = dispatch(obj).get(obj, lensArr[i]);
40792
- }
40793
- return obj;
40794
- };
40795
- lens.prototype.mod = function (lensArr, f) {
40796
- var obj = this._wrapped;
40797
- var newObj = clone(obj);
40798
- var ops = dispatch(obj);
40799
- if (lensArr.length === 0) {
40800
- this._wrapped = f(this._wrapped);
40801
- } else if (lensArr.length === 1) {
40802
- this._wrapped = ops.mod(newObj, lensArr[0], f);
40803
- } else {
40804
- var monocle = lensArr[0];
40805
- var shortLens = lensArr.slice(1);
40806
-
40807
- // newObj = ops.mod(obj[monocle], shortLens, f);
40808
-
40809
- newObj[monocle] = lens(obj[monocle]).mod(shortLens, f).freeze();
40810
- this._wrapped = newObj;
40811
- }
40812
- return this;
40813
- };
40814
-
40815
- // TODO - move to individual files
40816
- lens.prototype.merge = function (lensArr, props) {
40817
- this._wrapped = lens(this._wrapped).mod(lensArr, function (oldProps) {
40818
- return merge(oldProps, props);
40819
- }).freeze();
40820
- return this;
40821
- };
40822
-
40823
- // Lens must have length >= 1 or there would be nothing to return
40824
- lens.prototype.del = function (lensArr) {
40825
- var obj = this._wrapped;
40826
- var ops = dispatch(obj);
40827
- if (lensArr.length === 1) {
40828
- this._wrapped = ops.del(obj, lensArr[0]);
40829
- } else {
40830
- var monocle = lensArr[0];
40831
- var shortLens = lensArr.slice(1);
40832
- var newObj = clone(obj);
40833
- newObj[monocle] = lens(obj[monocle]).del(shortLens).freeze();
40834
- this._wrapped = newObj;
40835
- }
40836
- return this;
40837
- };
40838
- lens.prototype.set = function (lensArr, set) {
40839
- return this.mod(lensArr, function () {
40840
- return set;
40841
- });
40842
- };
40843
- module.exports = lens;
40844
-
40845
- /***/
40846
- }, /* 2 */
40847
- /***/function (module, exports) {
40848
- var get = function (arr, monocle) {
40849
- return arr[monocle];
40850
- };
40851
- var set = function (arr, monocle, val) {
40852
- var newArr = arr.splice();
40853
- newArr[monocle] = val;
40854
- return newArr;
40855
- };
40856
- var mod = function (arr, monocle, f) {
40857
- var newArr = arr.slice();
40858
- newArr[monocle] = f(arr[monocle]);
40859
- return newArr;
40860
- };
40861
- var del = function (arr, monocle) {
40862
- var newArr = arr.slice();
40863
- newArr.splice(monocle, 1);
40864
- return newArr;
40865
- };
40866
-
40867
- /*
40868
- // Lens must point to a member of an array. We'll insert into that array.
40869
- lens.prototype.insertAt = function(lensArr, toInsert) {
40870
- var obj = this._wrapped;
40871
-
40872
- var arrLens = lensArr.slice(0, -1);
40873
- var arr = lens(obj).get(arrLens).slice(); // slice to copy
40874
-
40875
- var arrIdx = lensArr[lensArr.length-1];
40876
- arr.splice(arrIdx, 0, toInsert);
40877
- return lens(obj).set(arrLens, arr);
40878
- };
40879
-
40880
- lens.prototype.insertBefore = lens.prototype.insertAt;
40881
- lens.prototype.insertAfter = function(lensArr, toInsert) {
40882
- var newLens = lensArr.slice();
40883
- newLens[newLens.length-1] += 1;
40884
- return lens(this._wrapped).insertAt(newLens, toInsert);
40885
- };
40886
- */
40887
-
40888
- module.exports = {
40889
- get: get,
40890
- set: set,
40891
- mod: mod,
40892
- del: del
40893
- };
40894
-
40895
- /***/
40896
- }, /* 3 */
40897
- /***/function (module, exports, __webpack_require__) {
40898
- var clone = __webpack_require__(0).clone;
40899
- var get = function (obj, monocle) {
40900
- return obj[monocle];
40901
- };
40902
- var set = function (obj, monocle, val) {
40903
- var newObj = clone(obj);
40904
- newObj[monocle] = val;
40905
- return newObj;
40906
- };
40907
- var mod = function (obj, monocle, f) {
40908
- var newObj = clone(obj);
40909
- newObj[monocle] = f(obj[monocle]);
40910
- return newObj;
40911
- };
40912
- var del = function (obj, monocle) {
40913
- var newObj = clone(obj);
40914
- delete newObj[monocle];
40915
- return newObj;
40916
- };
40917
- module.exports = {
40918
- get: get,
40919
- set: set,
40920
- mod: mod,
40921
- del: del
40922
- };
40923
-
40924
- /***/
40925
- }, /* 4 */
40926
- /***/function (module, exports) {
40927
- var get = function (arr, monocle) {
40928
- return arr[monocle];
40929
- };
40930
- var set = function (arr, monocle, val) {
40931
- var newArr = arr.splice();
40932
- newArr[monocle] = val;
40933
- return newArr;
40934
- };
40935
- var mod = function (arr, monocle, f) {
40936
- var newArr = arr.splice();
40937
- newArr[monocle] = f(arr[monocle]);
40938
- return newArr;
40939
- };
40940
- var del = function (arr, monocle) {
40941
- var newArr = arr.slice();
40942
- newArr.splice(monocle);
40943
- return newArr;
40944
- };
40945
- module.exports = {
40946
- get: get,
40947
- set: set,
40948
- mod: mod,
40949
- del: del
40950
- };
40951
-
40952
- /***/
40953
- }
40954
- /******/])
40955
- );
40956
- });
40957
- } (hubble));
40958
-
40959
- var lens = /*@__PURE__*/getDefaultExportFromCjs(hubble.exports);
40591
+ var isObject = function (obj) {
40592
+ return obj === Object(obj);
40593
+ };
40594
+ var merge = function () {
40595
+ var obj = {};
40596
+ for (var i = 0; i < arguments.length; i++) {
40597
+ var source = arguments[i];
40598
+ if (source) {
40599
+ for (var prop in source) {
40600
+ obj[prop] = source[prop];
40601
+ }
40602
+ }
40603
+ }
40604
+ return obj;
40605
+ };
40606
+ var clone = function (obj) {
40607
+ if (!isObject(obj)) {
40608
+ return obj;
40609
+ }
40610
+ return Array.isArray(obj) ? obj.slice() : merge(obj);
40611
+ };
40612
+
40613
+ /* TODO batch *all* mutations
40614
+ * idea: freeze / thaw implementations for all types
40615
+ * lens constructor thaws, freeze delegates to type's freeze
40616
+ */
40617
+
40618
+ // equivalents, without requiring it
40619
+ // find the implementation to use for a given object
40620
+ var dispatch = function (x) {
40621
+ if (Array.isArray(x)) {
40622
+ return arr;
40623
+ } else if (isObject(x)) {
40624
+ return obj;
40625
+ } else if (typeof x === "string") {
40626
+ return str;
40627
+ }
40628
+ };
40629
+
40630
+ // This is underscore with a different name
40631
+ var lens = function (obj) {
40632
+ if (obj instanceof lens) {
40633
+ return obj;
40634
+ }
40635
+ if (!(this instanceof lens)) {
40636
+ return new lens(obj);
40637
+ }
40638
+ var ops = dispatch(obj);
40639
+ this._wrapped = ops.thaw ? ops.thaw(obj) : obj;
40640
+ };
40641
+ lens.prototype.freeze = function () {
40642
+ var obj = this._wrapped;
40643
+ var ops = dispatch(obj);
40644
+ return ops.freeze ? ops.freeze(obj) : obj;
40645
+ };
40646
+ lens.prototype.zoom = function (lensArr) {
40647
+ if (this._zoomStack === undefined) {
40648
+ this._zoomStack = [];
40649
+ }
40650
+ this._zoomStack.push({
40651
+ zoom: lensArr,
40652
+ wrapped: this._wrapped
40653
+ });
40654
+ this._wrapped = lens(this._wrapped).get(lensArr);
40655
+ return this;
40656
+ };
40657
+ lens.prototype.deZoom = function () {
40658
+ var frame = this._zoomStack.pop();
40659
+ this._wrapped = lens(frame.wrapped).set(frame.zoom, this._wrapped).freeze();
40660
+ return this;
40661
+ };
40662
+ lens.prototype.get = function (lensArr) {
40663
+ var obj = this._wrapped;
40664
+ for (var i = 0; i < lensArr.length; i++) {
40665
+ obj = dispatch(obj).get(obj, lensArr[i]);
40666
+ }
40667
+ return obj;
40668
+ };
40669
+ lens.prototype.mod = function (lensArr, f) {
40670
+ var obj = this._wrapped;
40671
+ var newObj = clone(obj);
40672
+ var ops = dispatch(obj);
40673
+ if (lensArr.length === 0) {
40674
+ this._wrapped = f(this._wrapped);
40675
+ } else if (lensArr.length === 1) {
40676
+ this._wrapped = ops.mod(newObj, lensArr[0], f);
40677
+ } else {
40678
+ var monocle = lensArr[0];
40679
+ var shortLens = lensArr.slice(1);
40680
+
40681
+ // newObj = ops.mod(obj[monocle], shortLens, f);
40682
+
40683
+ newObj[monocle] = lens(obj[monocle]).mod(shortLens, f).freeze();
40684
+ this._wrapped = newObj;
40685
+ }
40686
+ return this;
40687
+ };
40688
+
40689
+ // TODO - move to individual files
40690
+ lens.prototype.merge = function (lensArr, props) {
40691
+ this._wrapped = lens(this._wrapped).mod(lensArr, function (oldProps) {
40692
+ return merge(oldProps, props);
40693
+ }).freeze();
40694
+ return this;
40695
+ };
40696
+
40697
+ // Lens must have length >= 1 or there would be nothing to return
40698
+ lens.prototype.del = function (lensArr) {
40699
+ var obj = this._wrapped;
40700
+ var ops = dispatch(obj);
40701
+ if (lensArr.length === 1) {
40702
+ this._wrapped = ops.del(obj, lensArr[0]);
40703
+ } else {
40704
+ var monocle = lensArr[0];
40705
+ var shortLens = lensArr.slice(1);
40706
+ var newObj = clone(obj);
40707
+ newObj[monocle] = lens(obj[monocle]).del(shortLens).freeze();
40708
+ this._wrapped = newObj;
40709
+ }
40710
+ return this;
40711
+ };
40712
+ lens.prototype.set = function (lensArr, set) {
40713
+ return this.mod(lensArr, function () {
40714
+ return set;
40715
+ });
40716
+ };
40717
+
40718
+ // ARRAY FUNCTIONS
40719
+
40720
+ const arr = {
40721
+ get: function (arr, monocle) {
40722
+ return arr[monocle];
40723
+ },
40724
+ set: function (arr, monocle, val) {
40725
+ var newArr = arr.splice();
40726
+ newArr[monocle] = val;
40727
+ return newArr;
40728
+ },
40729
+ mod: function (arr, monocle, f) {
40730
+ var newArr = arr.slice();
40731
+ newArr[monocle] = f(arr[monocle]);
40732
+ return newArr;
40733
+ },
40734
+ del: function (arr, monocle) {
40735
+ var newArr = arr.slice();
40736
+ newArr.splice(monocle, 1);
40737
+ return newArr;
40738
+ }
40739
+ };
40740
+
40741
+ /*
40742
+ // Lens must point to a member of an array. We'll insert into that array.
40743
+ lens.prototype.insertAt = function(lensArr, toInsert) {
40744
+ var obj = this._wrapped;
40745
+
40746
+ var arrLens = lensArr.slice(0, -1);
40747
+ var arr = lens(obj).get(arrLens).slice(); // slice to copy
40748
+
40749
+ var arrIdx = lensArr[lensArr.length-1];
40750
+ arr.splice(arrIdx, 0, toInsert);
40751
+ return lens(obj).set(arrLens, arr);
40752
+ };
40753
+
40754
+ lens.prototype.insertBefore = lens.prototype.insertAt;
40755
+ lens.prototype.insertAfter = function(lensArr, toInsert) {
40756
+ var newLens = lensArr.slice();
40757
+ newLens[newLens.length-1] += 1;
40758
+ return lens(this._wrapped).insertAt(newLens, toInsert);
40759
+ };
40760
+ */
40761
+
40762
+ // OBJECT FUNCTIONS
40763
+
40764
+ const obj = {
40765
+ get: function (obj, monocle) {
40766
+ return obj[monocle];
40767
+ },
40768
+ set: function (obj, monocle, val) {
40769
+ var newObj = clone(obj);
40770
+ newObj[monocle] = val;
40771
+ return newObj;
40772
+ },
40773
+ mod: function (obj, monocle, f) {
40774
+ var newObj = clone(obj);
40775
+ newObj[monocle] = f(obj[monocle]);
40776
+ return newObj;
40777
+ },
40778
+ del: function (obj, monocle) {
40779
+ var newObj = clone(obj);
40780
+ delete newObj[monocle];
40781
+ return newObj;
40782
+ }
40783
+ };
40784
+
40785
+ // STRING FUNCTIONS
40786
+
40787
+ const str = {
40788
+ get: function (arr, monocle) {
40789
+ return arr[monocle];
40790
+ },
40791
+ set: function (arr, monocle, val) {
40792
+ var newArr = arr.splice();
40793
+ newArr[monocle] = val;
40794
+ return newArr;
40795
+ },
40796
+ mod: function (arr, monocle, f) {
40797
+ var newArr = arr.splice();
40798
+ newArr[monocle] = f(arr[monocle]);
40799
+ return newArr;
40800
+ },
40801
+ del: function (arr, monocle) {
40802
+ var newArr = arr.slice();
40803
+ newArr.splice(monocle);
40804
+ return newArr;
40805
+ }
40806
+ };
40960
40807
 
40961
40808
  /* eslint-disable eqeqeq, @typescript-eslint/no-unused-vars */
40962
40809
  /*
@@ -41862,7 +41709,7 @@ const init = function (options) {
41862
41709
 
41863
41710
  // This file is processed by a Rollup plugin (replace) to inject the production
41864
41711
  const libName = "@khanacademy/perseus";
41865
- const libVersion = "19.1.7";
41712
+ const libVersion = "19.1.8";
41866
41713
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
41867
41714
 
41868
41715
  const apiVersion = {