Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

Location:
imaps-frontend/node_modules/konva/lib
Files:
65 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/konva/lib/Animation.js

    rd565449 r0c6b92a  
    117117            }
    118118        }
    119         for (let key in layerHash) {
     119        for (const key in layerHash) {
    120120            if (!layerHash.hasOwnProperty(key)) {
    121121                continue;
  • imaps-frontend/node_modules/konva/lib/BezierFunctions.js

    rd565449 r0c6b92a  
    688688exports.binomialCoefficients = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
    689689const getCubicArcLength = (xs, ys, t) => {
    690     let z;
    691690    let sum;
    692691    let correctedT;
    693692    const n = 20;
    694     z = t / 2;
     693    const z = t / 2;
    695694    sum = 0;
    696695    for (let i = 0; i < n; i++) {
  • imaps-frontend/node_modules/konva/lib/Canvas.js

    rd565449 r0c6b92a  
    77const Factory_1 = require("./Factory");
    88const Validators_1 = require("./Validators");
    9 var _pixelRatio;
     9let _pixelRatio;
    1010function getDevicePixelRatio() {
    1111    if (_pixelRatio) {
    1212        return _pixelRatio;
    1313    }
    14     var canvas = Util_1.Util.createCanvasElement();
    15     var context = canvas.getContext('2d');
     14    const canvas = Util_1.Util.createCanvasElement();
     15    const context = canvas.getContext('2d');
    1616    _pixelRatio = (function () {
    17         var devicePixelRatio = Global_1.Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||
     17        const devicePixelRatio = Global_1.Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||
    1818            context.mozBackingStorePixelRatio ||
    1919            context.msBackingStorePixelRatio ||
     
    3232        this.height = 0;
    3333        this.isCache = false;
    34         var conf = config || {};
    35         var pixelRatio = conf.pixelRatio || Global_1.Konva.pixelRatio || getDevicePixelRatio();
     34        const conf = config || {};
     35        const pixelRatio = conf.pixelRatio || Global_1.Konva.pixelRatio || getDevicePixelRatio();
    3636        this.pixelRatio = pixelRatio;
    3737        this._canvas = Util_1.Util.createCanvasElement();
     
    5151    }
    5252    setPixelRatio(pixelRatio) {
    53         var previousRatio = this.pixelRatio;
     53        const previousRatio = this.pixelRatio;
    5454        this.pixelRatio = pixelRatio;
    5555        this.setSize(this.getWidth() / previousRatio, this.getHeight() / previousRatio);
     
    5858        this.width = this._canvas.width = width * this.pixelRatio;
    5959        this._canvas.style.width = width + 'px';
    60         var pixelRatio = this.pixelRatio, _context = this.getContext()._context;
     60        const pixelRatio = this.pixelRatio, _context = this.getContext()._context;
    6161        _context.scale(pixelRatio, pixelRatio);
    6262    }
     
    6464        this.height = this._canvas.height = height * this.pixelRatio;
    6565        this._canvas.style.height = height + 'px';
    66         var pixelRatio = this.pixelRatio, _context = this.getContext()._context;
     66        const pixelRatio = this.pixelRatio, _context = this.getContext()._context;
    6767        _context.scale(pixelRatio, pixelRatio);
    6868    }
  • imaps-frontend/node_modules/konva/lib/Container.d.ts

    rd565449 r0c6b92a  
    2929        attrs: any;
    3030        className: string;
    31         children?: any[] | undefined;
     31        children?: Array<any>;
    3232    };
    3333    isAncestorOf(node: Node): boolean;
  • imaps-frontend/node_modules/konva/lib/Container.js

    rd565449 r0c6b92a  
    1515        }
    1616        const children = this.children || [];
    17         var results = [];
     17        const results = [];
    1818        children.forEach(function (child) {
    1919            if (filterFunc(child)) {
     
    5151        }
    5252        if (children.length > 1) {
    53             for (var i = 0; i < children.length; i++) {
     53            for (let i = 0; i < children.length; i++) {
    5454                this.add(children[i]);
    5555            }
     
    8383    }
    8484    findOne(selector) {
    85         var result = this._generalFind(selector, true);
     85        const result = this._generalFind(selector, true);
    8686        return result.length > 0 ? result[0] : undefined;
    8787    }
    8888    _generalFind(selector, findOne) {
    89         var retArr = [];
     89        const retArr = [];
    9090        this._descendants((node) => {
    9191            const valid = node._isMatch(selector);
     
    119119    }
    120120    toObject() {
    121         var obj = Node_1.Node.prototype.toObject.call(this);
     121        const obj = Node_1.Node.prototype.toObject.call(this);
    122122        obj.children = [];
    123123        this.getChildren().forEach((child) => {
     
    127127    }
    128128    isAncestorOf(node) {
    129         var parent = node.getParent();
     129        let parent = node.getParent();
    130130        while (parent) {
    131131            if (parent._id === this._id) {
     
    137137    }
    138138    clone(obj) {
    139         var node = Node_1.Node.prototype.clone.call(this, obj);
     139        const node = Node_1.Node.prototype.clone.call(this, obj);
    140140        this.getChildren().forEach(function (no) {
    141141            node.add(no.clone());
     
    144144    }
    145145    getAllIntersections(pos) {
    146         var arr = [];
     146        const arr = [];
    147147        this.find('Shape').forEach((shape) => {
    148148            if (shape.isVisible() && shape.intersects(pos)) {
     
    170170    }
    171171    drawScene(can, top, bufferCanvas) {
    172         var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;
    173         var caching = canvas && canvas.isCache;
     172        const layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;
     173        const caching = canvas && canvas.isCache;
    174174        if (!this.isVisible() && !caching) {
    175175            return this;
     
    177177        if (cachedSceneCanvas) {
    178178            context.save();
    179             var m = this.getAbsoluteTransform(top).getMatrix();
     179            const m = this.getAbsoluteTransform(top).getMatrix();
    180180            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
    181181            this._drawCachedSceneCanvas(context);
     
    191191            return this;
    192192        }
    193         var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;
     193        const layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;
    194194        if (cachedHitCanvas) {
    195195            context.save();
    196             var m = this.getAbsoluteTransform(top).getMatrix();
     196            const m = this.getAbsoluteTransform(top).getMatrix();
    197197            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
    198198            this._drawCachedHitCanvas(context);
     
    206206    _drawChildren(drawMethod, canvas, top, bufferCanvas) {
    207207        var _a;
    208         var context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (typeof clipWidth === 'number' && typeof clipHeight === 'number') ||
     208        const context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (typeof clipWidth === 'number' && typeof clipHeight === 'number') ||
    209209            clipFunc;
    210210        const selfCache = top === this;
    211211        if (hasClip) {
    212212            context.save();
    213             var transform = this.getAbsoluteTransform(top);
    214             var m = transform.getMatrix();
     213            const transform = this.getAbsoluteTransform(top);
     214            let m = transform.getMatrix();
    215215            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
    216216            context.beginPath();
     
    220220            }
    221221            else {
    222                 var clipX = this.clipX();
    223                 var clipY = this.clipY();
     222                const clipX = this.clipX();
     223                const clipY = this.clipY();
    224224                context.rect(clipX || 0, clipY || 0, clipWidth, clipHeight);
    225225            }
     
    228228            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
    229229        }
    230         var hasComposition = !selfCache &&
     230        const hasComposition = !selfCache &&
    231231            this.globalCompositeOperation() !== 'source-over' &&
    232232            drawMethod === 'drawScene';
     
    247247    getClientRect(config = {}) {
    248248        var _a;
    249         var skipTransform = config.skipTransform;
    250         var relativeTo = config.relativeTo;
    251         var minX, minY, maxX, maxY;
    252         var selfRect = {
     249        const skipTransform = config.skipTransform;
     250        const relativeTo = config.relativeTo;
     251        let minX, minY, maxX, maxY;
     252        let selfRect = {
    253253            x: Infinity,
    254254            y: Infinity,
     
    256256            height: 0,
    257257        };
    258         var that = this;
     258        const that = this;
    259259        (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
    260260            if (!child.visible()) {
    261261                return;
    262262            }
    263             var rect = child.getClientRect({
     263            const rect = child.getClientRect({
    264264                relativeTo: that,
    265265                skipShadow: config.skipShadow,
     
    282282            }
    283283        });
    284         var shapes = this.find('Shape');
    285         var hasVisible = false;
    286         for (var i = 0; i < shapes.length; i++) {
    287             var shape = shapes[i];
     284        const shapes = this.find('Shape');
     285        let hasVisible = false;
     286        for (let i = 0; i < shapes.length; i++) {
     287            const shape = shapes[i];
    288288            if (shape._isVisible(this)) {
    289289                hasVisible = true;
  • imaps-frontend/node_modules/konva/lib/Context.d.ts

    rd565449 r0c6b92a  
    33import { IRect } from './types.js';
    44import type { Node } from './Node.js';
    5 declare var CONTEXT_PROPERTIES: readonly ["fillStyle", "strokeStyle", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "letterSpacing", "lineCap", "lineDashOffset", "lineJoin", "lineWidth", "miterLimit", "direction", "font", "textAlign", "textBaseline", "globalAlpha", "globalCompositeOperation", "imageSmoothingEnabled"];
     5declare const CONTEXT_PROPERTIES: readonly ["fillStyle", "strokeStyle", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "letterSpacing", "lineCap", "lineDashOffset", "lineJoin", "lineWidth", "miterLimit", "direction", "font", "textAlign", "textBaseline", "globalAlpha", "globalCompositeOperation", "imageSmoothingEnabled"];
    66interface ExtendedCanvasRenderingContext2D extends CanvasRenderingContext2D {
    77    letterSpacing: string;
     
    1010    canvas: Canvas;
    1111    _context: CanvasRenderingContext2D;
    12     traceArr: Array<String>;
     12    traceArr: Array<string>;
    1313    constructor(canvas: Canvas);
    1414    fillShape(shape: Shape): void;
  • imaps-frontend/node_modules/konva/lib/Context.js

    rd565449 r0c6b92a  
    55const Global_1 = require("./Global");
    66function simplifyArray(arr) {
    7     var retArr = [], len = arr.length, util = Util_1.Util, n, val;
     7    let retArr = [], len = arr.length, util = Util_1.Util, n, val;
    88    for (n = 0; n < len; n++) {
    99        val = arr[n];
     
    1818    return retArr;
    1919}
    20 var COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [
     20const COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [
    2121    'arc',
    2222    'arcTo',
     
    5252    'translate',
    5353];
    54 var CONTEXT_PROPERTIES = [
     54const CONTEXT_PROPERTIES = [
    5555    'fillStyle',
    5656    'strokeStyle',
     
    107107    }
    108108    getTrace(relaxed, rounded) {
    109         var traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;
     109        let traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;
    110110        for (n = 0; n < len; n++) {
    111111            trace = traceArr[n];
     
    143143    }
    144144    _trace(str) {
    145         var traceArr = this.traceArr, len;
     145        let traceArr = this.traceArr, len;
    146146        traceArr.push(str);
    147147        len = traceArr.length;
     
    151151    }
    152152    reset() {
    153         var pixelRatio = this.getCanvas().getPixelRatio();
     153        const pixelRatio = this.getCanvas().getPixelRatio();
    154154        this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);
    155155    }
     
    158158    }
    159159    clear(bounds) {
    160         var canvas = this.getCanvas();
     160        const canvas = this.getCanvas();
    161161        if (bounds) {
    162162            this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);
     
    173173    }
    174174    _applyOpacity(shape) {
    175         var absOpacity = shape.getAbsoluteOpacity();
     175        const absOpacity = shape.getAbsoluteOpacity();
    176176        if (absOpacity !== 1) {
    177177            this.setAttr('globalAlpha', absOpacity);
     
    209209    }
    210210    createImageData(width, height) {
    211         var a = arguments;
     211        const a = arguments;
    212212        if (a.length === 2) {
    213213            return this._context.createImageData(width, height);
     
    227227    }
    228228    drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) {
    229         var a = arguments, _context = this._context;
     229        const a = arguments, _context = this._context;
    230230        if (a.length === 3) {
    231231            _context.drawImage(image, sx, sy);
     
    335335    }
    336336    _enableTrace() {
    337         var that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;
    338         var func = function (methodName) {
    339             var origMethod = that[methodName], ret;
     337        let that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;
     338        const func = function (methodName) {
     339            let origMethod = that[methodName], ret;
    340340            that[methodName] = function () {
    341341                args = simplifyArray(Array.prototype.slice.call(arguments, 0));
     
    353353        that.setAttr = function () {
    354354            origSetter.apply(that, arguments);
    355             var prop = arguments[0];
    356             var val = arguments[1];
     355            const prop = arguments[0];
     356            let val = arguments[1];
    357357            if (prop === 'shadowOffsetX' ||
    358358                prop === 'shadowOffsetY' ||
     
    368368    _applyGlobalCompositeOperation(node) {
    369369        const op = node.attrs.globalCompositeOperation;
    370         var def = !op || op === 'source-over';
     370        const def = !op || op === 'source-over';
    371371        if (!def) {
    372372            this.setAttr('globalCompositeOperation', op);
     
    393393    }
    394394    _fillColor(shape) {
    395         var fill = shape.fill();
     395        const fill = shape.fill();
    396396        this.setAttr('fillStyle', fill);
    397397        shape._fillFunc(this);
     
    402402    }
    403403    _fillLinearGradient(shape) {
    404         var grd = shape._getLinearGradient();
     404        const grd = shape._getLinearGradient();
    405405        if (grd) {
    406406            this.setAttr('fillStyle', grd);
     
    452452        const start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);
    453453        if (colorStops) {
    454             for (var n = 0; n < colorStops.length; n += 2) {
     454            for (let n = 0; n < colorStops.length; n += 2) {
    455455                grd.addColorStop(colorStops[n], colorStops[n + 1]);
    456456            }
     
    459459    }
    460460    _stroke(shape) {
    461         var dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();
     461        const dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();
    462462        if (shape.hasStroke()) {
    463463            if (!strokeScaleEnabled) {
    464464                this.save();
    465                 var pixelRatio = this.getCanvas().getPixelRatio();
     465                const pixelRatio = this.getCanvas().getPixelRatio();
    466466                this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
    467467            }
     
    475475                this.setAttr('shadowColor', 'rgba(0,0,0,0)');
    476476            }
    477             var hasLinearGradient = shape.getStrokeLinearGradientColorStops();
     477            const hasLinearGradient = shape.getStrokeLinearGradientColorStops();
    478478            if (hasLinearGradient) {
    479479                this._strokeLinearGradient(shape);
     
    490490    _applyShadow(shape) {
    491491        var _a, _b, _c;
    492         var color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {
     492        const color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {
    493493            x: 0,
    494494            y: 0,
     
    524524            if (!strokeScaleEnabled) {
    525525                this.save();
    526                 var pixelRatio = this.getCanvas().getPixelRatio();
     526                const pixelRatio = this.getCanvas().getPixelRatio();
    527527                this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
    528528            }
    529529            this._applyLineCap(shape);
    530             var hitStrokeWidth = shape.hitStrokeWidth();
    531             var strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;
     530            const hitStrokeWidth = shape.hitStrokeWidth();
     531            const strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;
    532532            this.setAttr('lineWidth', strokeWidth);
    533533            this.setAttr('strokeStyle', shape.colorKey);
  • imaps-frontend/node_modules/konva/lib/DragAndDrop.d.ts

    rd565449 r0c6b92a  
    99        startPointerPos: Vector2d;
    1010        offset: Vector2d;
    11         pointerId?: number | undefined;
    12         dragStatus: 'ready' | 'dragging' | 'stopped';
     11        pointerId?: number;
     12        dragStatus: "ready" | "dragging" | "stopped";
    1313    }>;
    1414    _drag(evt: any): void;
  • imaps-frontend/node_modules/konva/lib/DragAndDrop.js

    rd565449 r0c6b92a  
    66exports.DD = {
    77    get isDragging() {
    8         var flag = false;
     8        let flag = false;
    99        exports.DD._dragElements.forEach((elem) => {
    1010            if (elem.dragStatus === 'dragging') {
     
    1616    justDragged: false,
    1717    get node() {
    18         var node;
     18        let node;
    1919        exports.DD._dragElements.forEach((elem) => {
    2020            node = elem.node;
     
    3737            }
    3838            if (elem.dragStatus !== 'dragging') {
    39                 var dragDistance = node.dragDistance();
    40                 var distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));
     39                const dragDistance = node.dragDistance();
     40                const distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));
    4141                if (distance < dragDistance) {
    4242                    return;
     
    105105    window.addEventListener('mouseup', exports.DD._endDragBefore, true);
    106106    window.addEventListener('touchend', exports.DD._endDragBefore, true);
     107    window.addEventListener('touchcancel', exports.DD._endDragBefore, true);
    107108    window.addEventListener('mousemove', exports.DD._drag);
    108109    window.addEventListener('touchmove', exports.DD._drag);
    109110    window.addEventListener('mouseup', exports.DD._endDragAfter, false);
    110111    window.addEventListener('touchend', exports.DD._endDragAfter, false);
     112    window.addEventListener('touchcancel', exports.DD._endDragAfter, false);
    111113}
  • imaps-frontend/node_modules/konva/lib/Factory.js

    rd565449 r0c6b92a  
    44const Util_1 = require("./Util");
    55const Validators_1 = require("./Validators");
    6 var GET = 'get', SET = 'set';
     6const GET = 'get', SET = 'set';
    77exports.Factory = {
    88    addGetterSetter(constructor, attr, def, validator, after) {
     
    1212    },
    1313    addGetter(constructor, attr, def) {
    14         var method = GET + Util_1.Util._capitalize(attr);
     14        const method = GET + Util_1.Util._capitalize(attr);
    1515        constructor.prototype[method] =
    1616            constructor.prototype[method] ||
    1717                function () {
    18                     var val = this.attrs[attr];
     18                    const val = this.attrs[attr];
    1919                    return val === undefined ? def : val;
    2020                };
    2121    },
    2222    addSetter(constructor, attr, validator, after) {
    23         var method = SET + Util_1.Util._capitalize(attr);
     23        const method = SET + Util_1.Util._capitalize(attr);
    2424        if (!constructor.prototype[method]) {
    2525            exports.Factory.overWriteSetter(constructor, attr, validator, after);
     
    2727    },
    2828    overWriteSetter(constructor, attr, validator, after) {
    29         var method = SET + Util_1.Util._capitalize(attr);
     29        const method = SET + Util_1.Util._capitalize(attr);
    3030        constructor.prototype[method] = function (val) {
    3131            if (validator && val !== undefined && val !== null) {
     
    4040    },
    4141    addComponentsGetterSetter(constructor, attr, components, validator, after) {
    42         var len = components.length, capitalize = Util_1.Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;
     42        let len = components.length, capitalize = Util_1.Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;
    4343        constructor.prototype[getter] = function () {
    44             var ret = {};
     44            const ret = {};
    4545            for (n = 0; n < len; n++) {
    4646                component = components[n];
     
    4949            return ret;
    5050        };
    51         var basicValidator = (0, Validators_1.getComponentValidator)(components);
     51        const basicValidator = (0, Validators_1.getComponentValidator)(components);
    5252        constructor.prototype[setter] = function (val) {
    53             var oldVal = this.attrs[attr], key;
     53            let oldVal = this.attrs[attr], key;
    5454            if (validator) {
    5555                val = validator.call(this, val);
     
    7878    },
    7979    addOverloadedGetterSetter(constructor, attr) {
    80         var capitalizedAttr = Util_1.Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;
     80        const capitalizedAttr = Util_1.Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;
    8181        constructor.prototype[attr] = function () {
    8282            if (arguments.length) {
     
    8989    addDeprecatedGetterSetter(constructor, attr, def, validator) {
    9090        Util_1.Util.error('Adding deprecated ' + attr);
    91         var method = GET + Util_1.Util._capitalize(attr);
    92         var message = attr +
     91        const method = GET + Util_1.Util._capitalize(attr);
     92        const message = attr +
    9393            ' property is deprecated and will be removed soon. Look at Konva change log for more information.';
    9494        constructor.prototype[method] = function () {
    9595            Util_1.Util.error(message);
    96             var val = this.attrs[attr];
     96            const val = this.attrs[attr];
    9797            return val === undefined ? def : val;
    9898        };
     
    104104    backCompat(constructor, methods) {
    105105        Util_1.Util.each(methods, function (oldMethodName, newMethodName) {
    106             var method = constructor.prototype[newMethodName];
    107             var oldGetter = GET + Util_1.Util._capitalize(oldMethodName);
    108             var oldSetter = SET + Util_1.Util._capitalize(oldMethodName);
     106            const method = constructor.prototype[newMethodName];
     107            const oldGetter = GET + Util_1.Util._capitalize(oldMethodName);
     108            const oldSetter = SET + Util_1.Util._capitalize(oldMethodName);
    109109            function deprecated() {
    110110                method.apply(this, arguments);
  • imaps-frontend/node_modules/konva/lib/Global.js

    rd565449 r0c6b92a  
    1717exports.Konva = {
    1818    _global: exports.glob,
    19     version: '9.3.14',
     19    version: '9.3.16',
    2020    isBrowser: detectBrowser(),
    2121    isUnminified: /param/.test(function (param) { }.toString()),
  • imaps-frontend/node_modules/konva/lib/Group.js

    rd565449 r0c6b92a  
    77class Group extends Container_1.Container {
    88    _validateAdd(child) {
    9         var type = child.getType();
     9        const type = child.getType();
    1010        if (type !== 'Group' && type !== 'Shape') {
    1111            Util_1.Util.throw('You may only add groups and shapes to groups.');
  • imaps-frontend/node_modules/konva/lib/Layer.js

    rd565449 r0c6b92a  
    1010const Shape_1 = require("./Shape");
    1111const Global_1 = require("./Global");
    12 var HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [
     12const HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [
    1313    { x: 0, y: 0 },
    1414    { x: -1, y: -1 },
     
    5353    setZIndex(index) {
    5454        super.setZIndex(index);
    55         var stage = this.getStage();
     55        const stage = this.getStage();
    5656        if (stage && stage.content) {
    5757            stage.content.removeChild(this.getNativeCanvasElement());
     
    6767    moveToTop() {
    6868        Node_1.Node.prototype.moveToTop.call(this);
    69         var stage = this.getStage();
     69        const stage = this.getStage();
    7070        if (stage && stage.content) {
    7171            stage.content.removeChild(this.getNativeCanvasElement());
     
    7575    }
    7676    moveUp() {
    77         var moved = Node_1.Node.prototype.moveUp.call(this);
     77        const moved = Node_1.Node.prototype.moveUp.call(this);
    7878        if (!moved) {
    7979            return false;
    8080        }
    81         var stage = this.getStage();
     81        const stage = this.getStage();
    8282        if (!stage || !stage.content) {
    8383            return false;
     
    9494    moveDown() {
    9595        if (Node_1.Node.prototype.moveDown.call(this)) {
    96             var stage = this.getStage();
     96            const stage = this.getStage();
    9797            if (stage) {
    98                 var children = stage.children;
     98                const children = stage.children;
    9999                if (stage.content) {
    100100                    stage.content.removeChild(this.getNativeCanvasElement());
     
    108108    moveToBottom() {
    109109        if (Node_1.Node.prototype.moveToBottom.call(this)) {
    110             var stage = this.getStage();
     110            const stage = this.getStage();
    111111            if (stage) {
    112                 var children = stage.children;
     112                const children = stage.children;
    113113                if (stage.content) {
    114114                    stage.content.removeChild(this.getNativeCanvasElement());
     
    124124    }
    125125    remove() {
    126         var _canvas = this.getNativeCanvasElement();
     126        const _canvas = this.getNativeCanvasElement();
    127127        Node_1.Node.prototype.remove.call(this);
    128128        if (_canvas && _canvas.parentNode && Util_1.Util._isInDocument(_canvas)) {
     
    141141    }
    142142    _validateAdd(child) {
    143         var type = child.getType();
     143        const type = child.getType();
    144144        if (type !== 'Group' && type !== 'Shape') {
    145145            Util_1.Util.throw('You may only add groups and shapes to a layer.');
     
    197197            return null;
    198198        }
    199         var spiralSearchDistance = 1;
    200         var continueSearch = false;
     199        let spiralSearchDistance = 1;
     200        let continueSearch = false;
    201201        while (true) {
    202202            for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {
     
    247247    }
    248248    drawScene(can, top) {
    249         var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());
     249        const layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());
    250250        this._fire(BEFORE_DRAW, {
    251251            node: this,
     
    261261    }
    262262    drawHit(can, top) {
    263         var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);
     263        const layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);
    264264        if (layer && layer.clearBeforeDraw()) {
    265265            layer.getHitCanvas().getContext().clear();
     
    288288            return;
    289289        }
    290         var parent = this.parent;
    291         var added = !!this.hitCanvas._canvas.parentNode;
     290        const parent = this.parent;
     291        const added = !!this.hitCanvas._canvas.parentNode;
    292292        if (added) {
    293293            parent.content.removeChild(this.hitCanvas._canvas);
  • imaps-frontend/node_modules/konva/lib/Node.d.ts

    rd565449 r0c6b92a  
    4040    [index: string]: any;
    4141};
    42 export interface KonvaEventObject<EventType> {
     42export interface KonvaEventObject<EventType, This = Node> {
    4343    type: string;
    4444    target: Shape | Stage;
    4545    evt: EventType;
    4646    pointerId: number;
    47     currentTarget: Node;
     47    currentTarget: This;
    4848    cancelBubble: boolean;
    4949    child?: Node;
    5050}
    51 export type KonvaEventListener<This, EventType> = (this: This, ev: KonvaEventObject<EventType>) => void;
     51export type KonvaEventListener<This, EventType> = (this: This, ev: KonvaEventObject<EventType, This>) => void;
    5252export declare abstract class Node<Config extends NodeConfig = NodeConfig> {
    5353    _id: number;
     
    181181        attrs: Config & Record<string, any>;
    182182        className: string;
    183         children?: any[] | undefined;
     183        children?: Array<any>;
    184184    };
    185185    toJSON(): string;
     
    320320    transformsEnabled: GetSet<string, this>;
    321321    visible: GetSet<boolean, this>;
    322     width: number;
     322    width: GetSet<number, this>;
    323323    height: GetSet<number, this>;
    324324    x: GetSet<number, this>;
  • imaps-frontend/node_modules/konva/lib/Node.js

    rd565449 r0c6b92a  
    88const DragAndDrop_1 = require("./DragAndDrop");
    99const Validators_1 = require("./Validators");
    10 var ABSOLUTE_OPACITY = 'absoluteOpacity', ALL_LISTENERS = 'allEventListeners', ABSOLUTE_TRANSFORM = 'absoluteTransform', ABSOLUTE_SCALE = 'absoluteScale', CANVAS = 'canvas', CHANGE = 'Change', CHILDREN = 'children', KONVA = 'konva', LISTENING = 'listening', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', NAME = 'name', SET = 'set', SHAPE = 'Shape', SPACE = ' ', STAGE = 'stage', TRANSFORM = 'transform', UPPER_STAGE = 'Stage', VISIBLE = 'visible', TRANSFORM_CHANGE_STR = [
     10const ABSOLUTE_OPACITY = 'absoluteOpacity', ALL_LISTENERS = 'allEventListeners', ABSOLUTE_TRANSFORM = 'absoluteTransform', ABSOLUTE_SCALE = 'absoluteScale', CANVAS = 'canvas', CHANGE = 'Change', CHILDREN = 'children', KONVA = 'konva', LISTENING = 'listening', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', NAME = 'name', SET = 'set', SHAPE = 'Shape', SPACE = ' ', STAGE = 'stage', TRANSFORM = 'transform', UPPER_STAGE = 'Stage', VISIBLE = 'visible', TRANSFORM_CHANGE_STR = [
    1111    'xChange.konva',
    1212    'yChange.konva',
     
    5757    }
    5858    _getCache(attr, privateGetter) {
    59         var cache = this._cache.get(attr);
    60         var isTransform = attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM;
    61         var invalid = cache === undefined || (isTransform && cache.dirty === true);
     59        let cache = this._cache.get(attr);
     60        const isTransform = attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM;
     61        const invalid = cache === undefined || (isTransform && cache.dirty === true);
    6262        if (invalid) {
    6363            cache = privateGetter.call(this);
     
    9696    }
    9797    cache(config) {
    98         var conf = config || {};
    99         var rect = {};
     98        const conf = config || {};
     99        let rect = {};
    100100        if (conf.x === undefined ||
    101101            conf.y === undefined ||
     
    107107            });
    108108        }
    109         var width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? Math.floor(rect.x) : conf.x, y = conf.y === undefined ? Math.floor(rect.y) : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false, hitCanvasPixelRatio = conf.hitCanvasPixelRatio || 1;
     109        let width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? Math.floor(rect.x) : conf.x, y = conf.y === undefined ? Math.floor(rect.y) : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false, hitCanvasPixelRatio = conf.hitCanvasPixelRatio || 1;
    110110        if (!width || !height) {
    111111            Util_1.Util.error('Can not cache the node. Width or height of the node equals 0. Caching is skipped.');
     
    118118        x -= offset;
    119119        y -= offset;
    120         var cachedSceneCanvas = new Canvas_1.SceneCanvas({
     120        const cachedSceneCanvas = new Canvas_1.SceneCanvas({
    121121            pixelRatio: pixelRatio,
    122122            width: width,
     
    179179    }
    180180    _transformedRect(rect, top) {
    181         var points = [
     181        const points = [
    182182            { x: rect.x, y: rect.y },
    183183            { x: rect.x + rect.width, y: rect.y },
     
    185185            { x: rect.x, y: rect.y + rect.height },
    186186        ];
    187         var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
    188         var trans = this.getAbsoluteTransform(top);
     187        let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
     188        const trans = this.getAbsoluteTransform(top);
    189189        points.forEach(function (point) {
    190             var transformed = trans.point(point);
     190            const transformed = trans.point(point);
    191191            if (minX === undefined) {
    192192                minX = maxX = transformed.x;
     
    211211        const canvasCache = this._getCanvasCache();
    212212        context.translate(canvasCache.x, canvasCache.y);
    213         var cacheCanvas = this._getCachedSceneCanvas();
    214         var ratio = cacheCanvas.pixelRatio;
     213        const cacheCanvas = this._getCachedSceneCanvas();
     214        const ratio = cacheCanvas.pixelRatio;
    215215        context.drawImage(cacheCanvas._canvas, 0, 0, cacheCanvas.width / ratio, cacheCanvas.height / ratio);
    216216        context.restore();
    217217    }
    218218    _drawCachedHitCanvas(context) {
    219         var canvasCache = this._getCanvasCache(), hitCanvas = canvasCache.hit;
     219        const canvasCache = this._getCanvasCache(), hitCanvas = canvasCache.hit;
    220220        context.save();
    221221        context.translate(canvasCache.x, canvasCache.y);
     
    224224    }
    225225    _getCachedSceneCanvas() {
    226         var filters = this.filters(), cachedCanvas = this._getCanvasCache(), sceneCanvas = cachedCanvas.scene, filterCanvas = cachedCanvas.filter, filterContext = filterCanvas.getContext(), len, imageData, n, filter;
     226        let filters = this.filters(), cachedCanvas = this._getCanvasCache(), sceneCanvas = cachedCanvas.scene, filterCanvas = cachedCanvas.filter, filterContext = filterCanvas.getContext(), len, imageData, n, filter;
    227227        if (filters) {
    228228            if (!this._filterUpToDate) {
    229                 var ratio = sceneCanvas.pixelRatio;
     229                const ratio = sceneCanvas.pixelRatio;
    230230                filterCanvas.setSize(sceneCanvas.width / sceneCanvas.pixelRatio, sceneCanvas.height / sceneCanvas.pixelRatio);
    231231                try {
     
    262262            return this._delegate.apply(this, arguments);
    263263        }
    264         var events = evtStr.split(SPACE), len = events.length, n, event, parts, baseEvent, name;
     264        let events = evtStr.split(SPACE), len = events.length, n, event, parts, baseEvent, name;
    265265        for (n = 0; n < len; n++) {
    266266            event = events[n];
     
    279279    }
    280280    off(evtStr, callback) {
    281         var events = (evtStr || '').split(SPACE), len = events.length, n, t, event, parts, baseEvent, name;
     281        let events = (evtStr || '').split(SPACE), len = events.length, n, t, event, parts, baseEvent, name;
    282282        this._cache && this._cache.delete(ALL_LISTENERS);
    283283        if (!evtStr) {
     
    305305    }
    306306    dispatchEvent(evt) {
    307         var e = {
     307        const e = {
    308308            target: this,
    309309            type: evt.type,
     
    324324    }
    325325    _delegate(event, selector, handler) {
    326         var stopNode = this;
     326        const stopNode = this;
    327327        this.on(event, function (evt) {
    328             var targets = evt.target.findAncestors(selector, true, stopNode);
    329             for (var i = 0; i < targets.length; i++) {
     328            const targets = evt.target.findAncestors(selector, true, stopNode);
     329            for (let i = 0; i < targets.length; i++) {
    330330                evt = Util_1.Util.cloneObject(evt);
    331331                evt.currentTarget = targets[i];
     
    352352    _remove() {
    353353        this._clearCaches();
    354         var parent = this.getParent();
     354        const parent = this.getParent();
    355355        if (parent && parent.children) {
    356356            parent.children.splice(this.index, 1);
     
    365365    }
    366366    getAttr(attr) {
    367         var method = 'get' + Util_1.Util._capitalize(attr);
     367        const method = 'get' + Util_1.Util._capitalize(attr);
    368368        if (Util_1.Util._isFunction(this[method])) {
    369369            return this[method]();
     
    372372    }
    373373    getAncestors() {
    374         var parent = this.getParent(), ancestors = [];
     374        let parent = this.getParent(), ancestors = [];
    375375        while (parent) {
    376376            ancestors.push(parent);
     
    384384    setAttrs(config) {
    385385        this._batchTransformChanges(() => {
    386             var key, method;
     386            let key, method;
    387387            if (!config) {
    388388                return this;
     
    439439            return this._isVisible(top) && this._isListening(top);
    440440        }
    441         var layer = this.getLayer();
    442         var layerUnderDrag = false;
     441        const layer = this.getLayer();
     442        let layerUnderDrag = false;
    443443        DragAndDrop_1.DD._dragElements.forEach((elem) => {
    444444            if (elem.dragStatus !== 'dragging') {
     
    452452            }
    453453        });
    454         var dragSkip = !skipDragCheck &&
     454        const dragSkip = !skipDragCheck &&
    455455            !Global_1.Konva.hitOnDragEnabled &&
    456456            (layerUnderDrag || Global_1.Konva.isTransforming());
     
    469469    }
    470470    getAbsoluteZIndex() {
    471         var depth = this.getDepth(), that = this, index = 0, nodes, len, n, child;
     471        let depth = this.getDepth(), that = this, index = 0, nodes, len, n, child;
    472472        function addChildren(children) {
    473473            nodes = [];
     
    494494    }
    495495    getDepth() {
    496         var depth = 0, parent = this.parent;
     496        let depth = 0, parent = this.parent;
    497497        while (parent) {
    498498            depth++;
     
    529529            return null;
    530530        }
    531         var pos = stage.getPointerPosition();
     531        const pos = stage.getPointerPosition();
    532532        if (!pos) {
    533533            return null;
    534534        }
    535         var transform = this.getAbsoluteTransform().copy();
     535        const transform = this.getAbsoluteTransform().copy();
    536536        transform.invert();
    537537        return transform.point(pos);
     
    550550            top = true;
    551551        }
    552         var absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(), absoluteTransform = new Util_1.Transform(), offset = this.offset();
     552        const absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(), absoluteTransform = new Util_1.Transform(), offset = this.offset();
    553553        absoluteTransform.m = absoluteMatrix.slice();
    554554        absoluteTransform.translate(offset.x, offset.y);
     
    560560        this.attrs.y = y;
    561561        this._clearCache(TRANSFORM);
    562         var it = this._getAbsoluteTransform().copy();
     562        const it = this._getAbsoluteTransform().copy();
    563563        it.invert();
    564564        it.translate(pos.x, pos.y);
     
    574574    }
    575575    _setTransform(trans) {
    576         var key;
     576        let key;
    577577        for (key in trans) {
    578578            this.attrs[key] = trans[key];
     
    580580    }
    581581    _clearTransform() {
    582         var trans = {
     582        const trans = {
    583583            x: this.x(),
    584584            y: this.y(),
     
    603603    }
    604604    move(change) {
    605         var changeX = change.x, changeY = change.y, x = this.x(), y = this.y();
     605        let changeX = change.x, changeY = change.y, x = this.x(), y = this.y();
    606606        if (changeX !== undefined) {
    607607            x += changeX;
     
    614614    }
    615615    _eachAncestorReverse(func, top) {
    616         var family = [], parent = this.getParent(), len, n;
     616        let family = [], parent = this.getParent(), len, n;
    617617        if (top && top._id === this._id) {
    618618            return;
     
    637637            return false;
    638638        }
    639         var index = this.index, len = this.parent.getChildren().length;
     639        const index = this.index, len = this.parent.getChildren().length;
    640640        if (index < len - 1) {
    641641            this.parent.children.splice(index, 1);
     
    651651            return false;
    652652        }
    653         var index = this.index, len = this.parent.getChildren().length;
     653        const index = this.index, len = this.parent.getChildren().length;
    654654        if (index < len - 1) {
    655655            this.parent.children.splice(index, 1);
     
    665665            return false;
    666666        }
    667         var index = this.index;
     667        const index = this.index;
    668668        if (index > 0) {
    669669            this.parent.children.splice(index, 1);
     
    679679            return false;
    680680        }
    681         var index = this.index;
     681        const index = this.index;
    682682        if (index > 0) {
    683683            this.parent.children.splice(index, 1);
     
    700700                '.');
    701701        }
    702         var index = this.index;
     702        const index = this.index;
    703703        this.parent.children.splice(index, 1);
    704704        this.parent.children.splice(zIndex, 0, this);
     
    710710    }
    711711    _getAbsoluteOpacity() {
    712         var absOpacity = this.opacity();
    713         var parent = this.getParent();
     712        let absOpacity = this.opacity();
     713        const parent = this.getParent();
    714714        if (parent && !parent._isUnderCache) {
    715715            absOpacity *= parent.getAbsoluteOpacity();
     
    725725    }
    726726    toObject() {
    727         var attrs = this.getAttrs(), key, val, getter, defaultValue, nonPlainObject;
     727        let attrs = this.getAttrs(), key, val, getter, defaultValue, nonPlainObject;
    728728        const obj = {
    729729            attrs: {},
     
    754754    }
    755755    findAncestors(selector, includeSelf, stopNode) {
    756         var res = [];
     756        const res = [];
    757757        if (includeSelf && this._isMatch(selector)) {
    758758            res.push(this);
    759759        }
    760         var ancestor = this.parent;
     760        let ancestor = this.parent;
    761761        while (ancestor) {
    762762            if (ancestor === stopNode) {
     
    783783            return selector(this);
    784784        }
    785         var selectorArr = selector.replace(/ /g, '').split(','), len = selectorArr.length, n, sel;
     785        let selectorArr = selector.replace(/ /g, '').split(','), len = selectorArr.length, n, sel;
    786786        for (n = 0; n < len; n++) {
    787787            sel = selectorArr[n];
     
    810810    }
    811811    getLayer() {
    812         var parent = this.getParent();
     812        const parent = this.getParent();
    813813        return parent ? parent.getLayer() : null;
    814814    }
     
    817817    }
    818818    _getStage() {
    819         var parent = this.getParent();
     819        const parent = this.getParent();
    820820        if (parent) {
    821821            return parent.getStage();
     
    844844    }
    845845    _getAbsoluteTransform(top) {
    846         var at;
     846        let at;
    847847        if (top) {
    848848            at = new Util_1.Transform();
    849849            this._eachAncestorReverse(function (node) {
    850                 var transformsEnabled = node.transformsEnabled();
     850                const transformsEnabled = node.transformsEnabled();
    851851                if (transformsEnabled === 'all') {
    852852                    at.multiply(node.getTransform());
     
    866866                at.reset();
    867867            }
    868             var transformsEnabled = this.transformsEnabled();
     868            const transformsEnabled = this.transformsEnabled();
    869869            if (transformsEnabled === 'all') {
    870870                at.multiply(this.getTransform());
     
    882882    }
    883883    getAbsoluteScale(top) {
    884         var parent = this;
     884        let parent = this;
    885885        while (parent) {
    886886            if (parent._isUnderCache) {
     
    904904    _getTransform() {
    905905        var _a, _b;
    906         var m = this._cache.get(TRANSFORM) || new Util_1.Transform();
     906        const m = this._cache.get(TRANSFORM) || new Util_1.Transform();
    907907        m.reset();
    908         var x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== void 0 ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== void 0 ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;
     908        const x = this.x(), y = this.y(), rotation = Global_1.Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== void 0 ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== void 0 ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;
    909909        if (x !== 0 || y !== 0) {
    910910            m.translate(x, y);
     
    926926    }
    927927    clone(obj) {
    928         var attrs = Util_1.Util.cloneObject(this.attrs), key, allListeners, len, n, listener;
     928        let attrs = Util_1.Util.cloneObject(this.attrs), key, allListeners, len, n, listener;
    929929        for (key in obj) {
    930930            attrs[key] = obj[key];
    931931        }
    932         var node = new this.constructor(attrs);
     932        const node = new this.constructor(attrs);
    933933        for (key in this.eventListeners) {
    934934            allListeners = this.eventListeners[key];
     
    948948    _toKonvaCanvas(config) {
    949949        config = config || {};
    950         var box = this.getClientRect();
    951         var stage = this.getStage(), x = config.x !== undefined ? config.x : Math.floor(box.x), y = config.y !== undefined ? config.y : Math.floor(box.y), pixelRatio = config.pixelRatio || 1, canvas = new Canvas_1.SceneCanvas({
     950        const box = this.getClientRect();
     951        const stage = this.getStage(), x = config.x !== undefined ? config.x : Math.floor(box.x), y = config.y !== undefined ? config.y : Math.floor(box.y), pixelRatio = config.pixelRatio || 1, canvas = new Canvas_1.SceneCanvas({
    952952            width: config.width || Math.ceil(box.width) || (stage ? stage.width() : 0),
    953953            height: config.height ||
     
    977977    toDataURL(config) {
    978978        config = config || {};
    979         var mimeType = config.mimeType || null, quality = config.quality || null;
    980         var url = this._toKonvaCanvas(config).toDataURL(mimeType, quality);
     979        const mimeType = config.mimeType || null, quality = config.quality || null;
     980        const url = this._toKonvaCanvas(config).toDataURL(mimeType, quality);
    981981        if (config.callback) {
    982982            config.callback(url);
     
    10451045    }
    10461046    _off(type, name, callback) {
    1047         var evtListeners = this.eventListeners[type], i, evtName, handler;
     1047        let evtListeners = this.eventListeners[type], i, evtName, handler;
    10481048        for (i = 0; i < evtListeners.length; i++) {
    10491049            evtName = evtListeners[i].name;
     
    10691069    addName(name) {
    10701070        if (!this.hasName(name)) {
    1071             var oldName = this.name();
    1072             var newName = oldName ? oldName + ' ' + name : name;
     1071            const oldName = this.name();
     1072            const newName = oldName ? oldName + ' ' + name : name;
    10731073            this.name(newName);
    10741074        }
     
    10831083            return false;
    10841084        }
    1085         var names = (fullName || '').split(/\s/g);
     1085        const names = (fullName || '').split(/\s/g);
    10861086        return names.indexOf(name) !== -1;
    10871087    }
    10881088    removeName(name) {
    1089         var names = (this.name() || '').split(/\s/g);
    1090         var index = names.indexOf(name);
     1089        const names = (this.name() || '').split(/\s/g);
     1090        const index = names.indexOf(name);
    10911091        if (index !== -1) {
    10921092            names.splice(index, 1);
     
    10961096    }
    10971097    setAttr(attr, val) {
    1098         var func = this[SET + Util_1.Util._capitalize(attr)];
     1098        const func = this[SET + Util_1.Util._capitalize(attr)];
    10991099        if (Util_1.Util._isFunction(func)) {
    11001100            func.call(this, val);
     
    11121112    }
    11131113    _setAttr(key, val) {
    1114         var oldVal = this.attrs[key];
     1114        const oldVal = this.attrs[key];
    11151115        if (oldVal === val && !Util_1.Util.isObject(val)) {
    11161116            return;
     
    11281128    }
    11291129    _setComponentAttr(key, component, val) {
    1130         var oldVal;
     1130        let oldVal;
    11311131        if (val !== undefined) {
    11321132            oldVal = this.attrs[key];
     
    11421142            evt.target = this;
    11431143        }
    1144         var shouldStop = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&
     1144        const shouldStop = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&
    11451145            ((compareShape &&
    11461146                (this === compareShape ||
     
    11491149        if (!shouldStop) {
    11501150            this._fire(eventType, evt);
    1151             var stopBubble = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&
     1151            const stopBubble = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&
    11521152                compareShape &&
    11531153                compareShape.isAncestorOf &&
     
    12071207    }
    12081208    _createDragElement(evt) {
    1209         var pointerId = evt ? evt.pointerId : undefined;
    1210         var stage = this.getStage();
    1211         var ap = this.getAbsolutePosition();
     1209        const pointerId = evt ? evt.pointerId : undefined;
     1210        const stage = this.getStage();
     1211        const ap = this.getAbsolutePosition();
    12121212        if (!stage) {
    12131213            return;
    12141214        }
    1215         var pos = stage._getPointerById(pointerId) ||
     1215        const pos = stage._getPointerById(pointerId) ||
    12161216            stage._changedPointerPositions[0] ||
    12171217            ap;
     
    12441244            return;
    12451245        }
    1246         var newNodePos = {
     1246        let newNodePos = {
    12471247            x: pos.x - elem.offset.x,
    12481248            y: pos.y - elem.offset.y,
    12491249        };
    1250         var dbf = this.dragBoundFunc();
     1250        const dbf = this.dragBoundFunc();
    12511251        if (dbf !== undefined) {
    12521252            const bounded = dbf.call(this, newNodePos, evt);
     
    12851285        this._dragCleanup();
    12861286        this.on('mousedown.konva touchstart.konva', function (evt) {
    1287             var shouldCheckButton = evt.evt['button'] !== undefined;
    1288             var canDrag = !shouldCheckButton || Global_1.Konva.dragButtons.indexOf(evt.evt['button']) >= 0;
     1287            const shouldCheckButton = evt.evt['button'] !== undefined;
     1288            const canDrag = !shouldCheckButton || Global_1.Konva.dragButtons.indexOf(evt.evt['button']) >= 0;
    12891289            if (!canDrag) {
    12901290                return;
     
    12931293                return;
    12941294            }
    1295             var hasDraggingChild = false;
     1295            let hasDraggingChild = false;
    12961296            DragAndDrop_1.DD._dragElements.forEach((elem) => {
    12971297                if (this.isAncestorOf(elem.node)) {
     
    13101310        else {
    13111311            this._dragCleanup();
    1312             var stage = this.getStage();
     1312            const stage = this.getStage();
    13131313            if (!stage) {
    13141314                return;
     
    13491349    }
    13501350    static _createNode(obj, container) {
    1351         var className = Node.prototype.getClassName.call(obj), children = obj.children, no, len, n;
     1351        let className = Node.prototype.getClassName.call(obj), children = obj.children, no, len, n;
    13521352        if (container) {
    13531353            obj.attrs.container = container;
  • imaps-frontend/node_modules/konva/lib/PointerEvents.js

    rd565449 r0c6b92a  
    11"use strict";
    22Object.defineProperty(exports, "__esModule", { value: true });
    3 exports.releaseCapture = exports.setPointerCapture = exports.hasPointerCapture = exports.createEvent = exports.getCapturedShape = void 0;
     3exports.getCapturedShape = getCapturedShape;
     4exports.createEvent = createEvent;
     5exports.hasPointerCapture = hasPointerCapture;
     6exports.setPointerCapture = setPointerCapture;
     7exports.releaseCapture = releaseCapture;
    48const Global_1 = require("./Global");
    59const Captures = new Map();
     
    812    return Captures.get(pointerId);
    913}
    10 exports.getCapturedShape = getCapturedShape;
    1114function createEvent(evt) {
    1215    return {
     
    1518    };
    1619}
    17 exports.createEvent = createEvent;
    1820function hasPointerCapture(pointerId, shape) {
    1921    return Captures.get(pointerId) === shape;
    2022}
    21 exports.hasPointerCapture = hasPointerCapture;
    2223function setPointerCapture(pointerId, shape) {
    2324    releaseCapture(pointerId);
     
    3031    }
    3132}
    32 exports.setPointerCapture = setPointerCapture;
    3333function releaseCapture(pointerId, target) {
    3434    const shape = Captures.get(pointerId);
     
    4343    }
    4444}
    45 exports.releaseCapture = releaseCapture;
  • imaps-frontend/node_modules/konva/lib/Shape.js

    rd565449 r0c6b92a  
    99const Global_2 = require("./Global");
    1010const PointerEvents = require("./PointerEvents");
    11 var HAS_SHADOW = 'hasShadow';
    12 var SHADOW_RGBA = 'shadowRGBA';
    13 var patternImage = 'patternImage';
    14 var linearGradient = 'linearGradient';
    15 var radialGradient = 'radialGradient';
     11const HAS_SHADOW = 'hasShadow';
     12const SHADOW_RGBA = 'shadowRGBA';
     13const patternImage = 'patternImage';
     14const linearGradient = 'linearGradient';
     15const radialGradient = 'radialGradient';
    1616let dummyContext;
    1717function getDummyContext() {
     
    105105    __getFillPattern() {
    106106        if (this.fillPatternImage()) {
    107             var ctx = getDummyContext();
     107            const ctx = getDummyContext();
    108108            const pattern = ctx.createPattern(this.fillPatternImage(), this.fillPatternRepeat() || 'repeat');
    109109            if (pattern && pattern.setTransform) {
     
    133133    }
    134134    __getLinearGradient() {
    135         var colorStops = this.fillLinearGradientColorStops();
     135        const colorStops = this.fillLinearGradientColorStops();
    136136        if (colorStops) {
    137             var ctx = getDummyContext();
    138             var start = this.fillLinearGradientStartPoint();
    139             var end = this.fillLinearGradientEndPoint();
    140             var grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);
    141             for (var n = 0; n < colorStops.length; n += 2) {
     137            const ctx = getDummyContext();
     138            const start = this.fillLinearGradientStartPoint();
     139            const end = this.fillLinearGradientEndPoint();
     140            const grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);
     141            for (let n = 0; n < colorStops.length; n += 2) {
    142142                grd.addColorStop(colorStops[n], colorStops[n + 1]);
    143143            }
     
    149149    }
    150150    __getRadialGradient() {
    151         var colorStops = this.fillRadialGradientColorStops();
     151        const colorStops = this.fillRadialGradientColorStops();
    152152        if (colorStops) {
    153             var ctx = getDummyContext();
    154             var start = this.fillRadialGradientStartPoint();
    155             var end = this.fillRadialGradientEndPoint();
    156             var grd = ctx.createRadialGradient(start.x, start.y, this.fillRadialGradientStartRadius(), end.x, end.y, this.fillRadialGradientEndRadius());
    157             for (var n = 0; n < colorStops.length; n += 2) {
     153            const ctx = getDummyContext();
     154            const start = this.fillRadialGradientStartPoint();
     155            const end = this.fillRadialGradientEndPoint();
     156            const grd = ctx.createRadialGradient(start.x, start.y, this.fillRadialGradientStartRadius(), end.x, end.y, this.fillRadialGradientEndRadius());
     157            for (let n = 0; n < colorStops.length; n += 2) {
    158158                grd.addColorStop(colorStops[n], colorStops[n + 1]);
    159159            }
     
    168168            return;
    169169        }
    170         var rgba = Util_1.Util.colorToRGBA(this.shadowColor());
     170        const rgba = Util_1.Util.colorToRGBA(this.shadowColor());
    171171        if (rgba) {
    172172            return ('rgba(' +
     
    216216    }
    217217    intersects(point) {
    218         var stage = this.getStage();
     218        const stage = this.getStage();
    219219        if (!stage) {
    220220            return false;
     
    269269    }
    270270    getSelfRect() {
    271         var size = this.size();
     271        const size = this.size();
    272272        return {
    273273            x: this._centroid ? -size.width / 2 : 0,
     
    318318    }
    319319    drawScene(can, top, bufferCanvas) {
    320         var layer = this.getLayer();
    321         var canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.getSceneFunc(), hasShadow = this.hasShadow(), stage, bufferContext;
    322         var skipBuffer = canvas.isCache;
    323         var cachingSelf = top === this;
     320        const layer = this.getLayer();
     321        let canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.getSceneFunc(), hasShadow = this.hasShadow(), stage, bufferContext;
     322        const skipBuffer = canvas.isCache;
     323        const cachingSelf = top === this;
    324324        if (!this.isVisible() && !cachingSelf) {
    325325            return this;
     
    327327        if (cachedCanvas) {
    328328            context.save();
    329             var m = this.getAbsoluteTransform(top).getMatrix();
     329            const m = this.getAbsoluteTransform(top).getMatrix();
    330330            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
    331331            this._drawCachedSceneCanvas(context);
     
    348348            drawFunc.call(this, bufferContext, this);
    349349            bufferContext.restore();
    350             var ratio = bc.pixelRatio;
     350            const ratio = bc.pixelRatio;
    351351            if (hasShadow) {
    352352                context._applyShadow(this);
     
    376376            return this;
    377377        }
    378         var layer = this.getLayer(), canvas = can || layer.hitCanvas, context = canvas && canvas.getContext(), drawFunc = this.hitFunc() || this.sceneFunc(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;
     378        const layer = this.getLayer(), canvas = can || layer.hitCanvas, context = canvas && canvas.getContext(), drawFunc = this.hitFunc() || this.sceneFunc(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;
    379379        if (!this.colorKey) {
    380380            Util_1.Util.warn('Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()');
     
    382382        if (cachedHitCanvas) {
    383383            context.save();
    384             var m = this.getAbsoluteTransform(top).getMatrix();
     384            const m = this.getAbsoluteTransform(top).getMatrix();
    385385            context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
    386386            this._drawCachedHitCanvas(context);
     
    395395        const selfCache = this === top;
    396396        if (!selfCache) {
    397             var o = this.getAbsoluteTransform(top).getMatrix();
     397            const o = this.getAbsoluteTransform(top).getMatrix();
    398398            context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);
    399399        }
     
    403403    }
    404404    drawHitFromCache(alphaThreshold = 0) {
    405         var cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight(), hitImageData, hitData, len, rgbColorKey, i, alpha;
     405        let cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight(), hitImageData, hitData, len, rgbColorKey, i, alpha;
    406406        hitContext.clear();
    407407        hitContext.drawImage(sceneCanvas._canvas, 0, 0, hitWidth, hitHeight);
  • imaps-frontend/node_modules/konva/lib/Stage.d.ts

    rd565449 r0c6b92a  
    55import { Layer } from './Layer.js';
    66export interface StageConfig extends ContainerConfig {
    7     container: HTMLDivElement | string;
     7    container?: HTMLDivElement | string;
    88}
    99export declare const stages: Stage[];
     
    4141    getPointerPosition(): Vector2d | null;
    4242    _getPointerById(id?: number): (Vector2d & {
    43         id?: number | undefined;
     43        id?: number;
    4444    }) | undefined;
    4545    getPointersPositions(): (Vector2d & {
    46         id?: number | undefined;
     46        id?: number;
    4747    })[];
    4848    getStage(): this;
  • imaps-frontend/node_modules/konva/lib/Stage.js

    rd565449 r0c6b92a  
    1010const Global_2 = require("./Global");
    1111const PointerEvents = require("./PointerEvents");
    12 var STAGE = 'Stage', STRING = 'string', PX = 'px', MOUSEOUT = 'mouseout', MOUSELEAVE = 'mouseleave', MOUSEOVER = 'mouseover', MOUSEENTER = 'mouseenter', MOUSEMOVE = 'mousemove', MOUSEDOWN = 'mousedown', MOUSEUP = 'mouseup', POINTERMOVE = 'pointermove', POINTERDOWN = 'pointerdown', POINTERUP = 'pointerup', POINTERCANCEL = 'pointercancel', LOSTPOINTERCAPTURE = 'lostpointercapture', POINTEROUT = 'pointerout', POINTERLEAVE = 'pointerleave', POINTEROVER = 'pointerover', POINTERENTER = 'pointerenter', CONTEXTMENU = 'contextmenu', TOUCHSTART = 'touchstart', TOUCHEND = 'touchend', TOUCHMOVE = 'touchmove', TOUCHCANCEL = 'touchcancel', WHEEL = 'wheel', MAX_LAYERS_NUMBER = 5, EVENTS = [
     12const STAGE = 'Stage', STRING = 'string', PX = 'px', MOUSEOUT = 'mouseout', MOUSELEAVE = 'mouseleave', MOUSEOVER = 'mouseover', MOUSEENTER = 'mouseenter', MOUSEMOVE = 'mousemove', MOUSEDOWN = 'mousedown', MOUSEUP = 'mouseup', POINTERMOVE = 'pointermove', POINTERDOWN = 'pointerdown', POINTERUP = 'pointerup', POINTERCANCEL = 'pointercancel', LOSTPOINTERCAPTURE = 'lostpointercapture', POINTEROUT = 'pointerout', POINTERLEAVE = 'pointerleave', POINTEROVER = 'pointerover', POINTERENTER = 'pointerenter', CONTEXTMENU = 'contextmenu', TOUCHSTART = 'touchstart', TOUCHEND = 'touchend', TOUCHMOVE = 'touchmove', TOUCHCANCEL = 'touchcancel', WHEEL = 'wheel', MAX_LAYERS_NUMBER = 5, EVENTS = [
    1313    [MOUSEENTER, '_pointerenter'],
    1414    [MOUSEDOWN, '_pointerdown'],
     
    129129        if (typeof container === STRING) {
    130130            if (container.charAt(0) === '.') {
    131                 var className = container.slice(1);
     131                const className = container.slice(1);
    132132                container = document.getElementsByClassName(className)[0];
    133133            }
     
    159159    }
    160160    clear() {
    161         var layers = this.children, len = layers.length, n;
     161        let layers = this.children, len = layers.length, n;
    162162        for (n = 0; n < len; n++) {
    163163            layers[n].clear();
     
    175175    destroy() {
    176176        super.destroy();
    177         var content = this.content;
     177        const content = this.content;
    178178        if (content && Util_1.Util._isInDocument(content)) {
    179179            this.container().removeChild(content);
    180180        }
    181         var index = exports.stages.indexOf(this);
     181        const index = exports.stages.indexOf(this);
    182182        if (index > -1) {
    183183            exports.stages.splice(index, 1);
     
    215215        config.width = config.width || this.width();
    216216        config.height = config.height || this.height();
    217         var canvas = new Canvas_1.SceneCanvas({
     217        const canvas = new Canvas_1.SceneCanvas({
    218218            width: config.width,
    219219            height: config.height,
    220220            pixelRatio: config.pixelRatio || 1,
    221221        });
    222         var _context = canvas.getContext()._context;
    223         var layers = this.children;
     222        const _context = canvas.getContext()._context;
     223        const layers = this.children;
    224224        if (config.x || config.y) {
    225225            _context.translate(-1 * config.x, -1 * config.y);
     
    229229                return;
    230230            }
    231             var layerCanvas = layer._toKonvaCanvas(config);
     231            const layerCanvas = layer._toKonvaCanvas(config);
    232232            _context.drawImage(layerCanvas._canvas, config.x, config.y, layerCanvas.getWidth() / layerCanvas.getPixelRatio(), layerCanvas.getHeight() / layerCanvas.getPixelRatio());
    233233        });
     
    238238            return null;
    239239        }
    240         var layers = this.children, len = layers.length, end = len - 1, n;
     240        let layers = this.children, len = layers.length, end = len - 1, n;
    241241        for (n = end; n >= 0; n--) {
    242242            const shape = layers[n].getIntersection(pos);
     
    248248    }
    249249    _resizeDOM() {
    250         var width = this.width();
    251         var height = this.height();
     250        const width = this.width();
     251        const height = this.height();
    252252        if (this.content) {
    253253            this.content.style.width = width + PX;
     
    263263    add(layer, ...rest) {
    264264        if (arguments.length > 1) {
    265             for (var i = 0; i < arguments.length; i++) {
     265            for (let i = 0; i < arguments.length; i++) {
    266266                this.add(arguments[i]);
    267267            }
     
    269269        }
    270270        super.add(layer);
    271         var length = this.children.length;
     271        const length = this.children.length;
    272272        if (length > MAX_LAYERS_NUMBER) {
    273273            Util_1.Util.warn('The stage has ' +
     
    346346        }
    347347        this.setPointersPositions(evt);
    348         var targetShape = this._getTargetShape(eventType);
    349         var eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;
     348        const targetShape = this._getTargetShape(eventType);
     349        const eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;
    350350        if (targetShape && eventsEnabled) {
    351351            targetShape._fireAndBubble(events.pointerout, { evt: evt });
     
    380380        }
    381381        this.setPointersPositions(evt);
    382         var triggeredOnShape = false;
     382        let triggeredOnShape = false;
    383383        this._changedPointerPositions.forEach((pos) => {
    384             var shape = this.getIntersection(pos);
     384            const shape = this.getIntersection(pos);
    385385            DragAndDrop_1.DD.justDragged = false;
    386386            Global_1.Konva['_' + eventType + 'ListenClick'] = true;
     
    422422        }
    423423        this.setPointersPositions(evt);
    424         var eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;
     424        const eventsEnabled = !(Global_1.Konva.isDragging() || Global_1.Konva.isTransforming()) || Global_1.Konva.hitOnDragEnabled;
    425425        if (!eventsEnabled) {
    426426            return;
    427427        }
    428         var processedShapesIds = {};
     428        const processedShapesIds = {};
    429429        let triggeredOnShape = false;
    430         var targetShape = this._getTargetShape(eventType);
     430        const targetShape = this._getTargetShape(eventType);
    431431        this._changedPointerPositions.forEach((pos) => {
    432432            const shape = (PointerEvents.getCapturedShape(pos.id) ||
     
    434434            const pointerId = pos.id;
    435435            const event = { evt: evt, pointerId };
    436             var differentTarget = targetShape !== shape;
     436            const differentTarget = targetShape !== shape;
    437437            if (differentTarget && targetShape) {
    438438                targetShape._fireAndBubble(events.pointerout, { ...event }, shape);
     
    484484        const clickStartShape = this[eventType + 'ClickStartShape'];
    485485        const clickEndShape = this[eventType + 'ClickEndShape'];
    486         var processedShapesIds = {};
     486        const processedShapesIds = {};
    487487        let triggeredOnShape = false;
    488488        this._changedPointerPositions.forEach((pos) => {
     
    558558    _contextmenu(evt) {
    559559        this.setPointersPositions(evt);
    560         var shape = this.getIntersection(this.getPointerPosition());
     560        const shape = this.getIntersection(this.getPointerPosition());
    561561        if (shape && shape.isListening()) {
    562562            shape._fireAndBubble(CONTEXTMENU, { evt: evt });
     
    572572    _wheel(evt) {
    573573        this.setPointersPositions(evt);
    574         var shape = this.getIntersection(this.getPointerPosition());
     574        const shape = this.getIntersection(this.getPointerPosition());
    575575        if (shape && shape.isListening()) {
    576576            shape._fireAndBubble(WHEEL, { evt: evt });
     
    597597    }
    598598    setPointersPositions(evt) {
    599         var contentPosition = this._getContentPosition(), x = null, y = null;
     599        let contentPosition = this._getContentPosition(), x = null, y = null;
    600600        evt = evt ? evt : window.event;
    601601        if (evt.touches !== undefined) {
     
    643643            };
    644644        }
    645         var rect = this.content.getBoundingClientRect();
     645        const rect = this.content.getBoundingClientRect();
    646646        return {
    647647            top: rect.top,
     
    664664            return;
    665665        }
    666         var container = this.container();
     666        const container = this.container();
    667667        if (!container) {
    668668            throw 'Stage has no container. A container is required.';
  • imaps-frontend/node_modules/konva/lib/Tween.js

    rd565449 r0c6b92a  
    66const Node_1 = require("./Node");
    77const Global_1 = require("./Global");
    8 var blacklist = {
     8let blacklist = {
    99    node: 1,
    1010    duration: 1,
     
    3232    }
    3333    fire(str) {
    34         var handler = this[str];
     34        const handler = this[str];
    3535        if (handler) {
    3636            handler();
     
    111111    }
    112112    onEnterFrame() {
    113         var t = this.getTimer() - this._startTime;
     113        const t = this.getTimer() - this._startTime;
    114114        if (this.state === PLAYING) {
    115115            this.setTime(t);
     
    129129class Tween {
    130130    constructor(config) {
    131         var that = this, node = config.node, nodeId = node._id, duration, easing = config.easing || exports.Easings.Linear, yoyo = !!config.yoyo, key;
     131        let that = this, node = config.node, nodeId = node._id, duration, easing = config.easing || exports.Easings.Linear, yoyo = !!config.yoyo, key;
    132132        if (typeof config.duration === 'undefined') {
    133133            duration = 0.3;
     
    141141        this.node = node;
    142142        this._id = idCounter++;
    143         var layers = node.getLayer() ||
     143        const layers = node.getLayer() ||
    144144            (node instanceof Global_1.Konva['Stage'] ? node.getLayers() : null);
    145145        if (!layers) {
     
    173173    }
    174174    _addAttr(key, end) {
    175         var node = this.node, nodeId = node._id, start, diff, tweenId, n, len, trueEnd, trueStart, endRGBA;
     175        let node = this.node, nodeId = node._id, start, diff, tweenId, n, len, trueEnd, trueStart, endRGBA;
    176176        tweenId = Tween.tweens[nodeId][key];
    177177        if (tweenId) {
     
    198198                    }
    199199                    else {
    200                         var startRGBA = Util_1.Util.colorToRGBA(start[n]);
     200                        const startRGBA = Util_1.Util.colorToRGBA(start[n]);
    201201                        endRGBA = Util_1.Util.colorToRGBA(end[n]);
    202202                        start[n] = startRGBA;
     
    239239    }
    240240    _tweenFunc(i) {
    241         var node = this.node, attrs = Tween.attrs[node._id][this._id], key, attr, start, diff, newVal, n, len, end;
     241        let node = this.node, attrs = Tween.attrs[node._id][this._id], key, attr, start, diff, newVal, n, len, end;
    242242        for (key in attrs) {
    243243            attr = attrs[key];
     
    301301        };
    302302        this.tween.onFinish = () => {
    303             var node = this.node;
    304             var attrs = Tween.attrs[node._id][this._id];
     303            const node = this.node;
     304            const attrs = Tween.attrs[node._id][this._id];
    305305            if (attrs.points && attrs.points.trueEnd) {
    306306                node.setAttr('points', attrs.points.trueEnd);
     
    311311        };
    312312        this.tween.onReset = () => {
    313             var node = this.node;
    314             var attrs = Tween.attrs[node._id][this._id];
     313            const node = this.node;
     314            const attrs = Tween.attrs[node._id][this._id];
    315315            if (attrs.points && attrs.points.trueStart) {
    316316                node.points(attrs.points.trueStart);
     
    351351    }
    352352    destroy() {
    353         var nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId], key;
     353        let nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId], key;
    354354        this.pause();
    355355        for (key in attrs) {
     
    363363Tween.tweens = {};
    364364Node_1.Node.prototype.to = function (params) {
    365     var onFinish = params.onFinish;
     365    const onFinish = params.onFinish;
    366366    params.node = this;
    367367    params.onFinish = function () {
     
    371371        }
    372372    };
    373     var tween = new Tween(params);
     373    const tween = new Tween(params);
    374374    tween.play();
    375375};
    376376exports.Easings = {
    377377    BackEaseIn(t, b, c, d) {
    378         var s = 1.70158;
     378        const s = 1.70158;
    379379        return c * (t /= d) * t * ((s + 1) * t - s) + b;
    380380    },
    381381    BackEaseOut(t, b, c, d) {
    382         var s = 1.70158;
     382        const s = 1.70158;
    383383        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
    384384    },
    385385    BackEaseInOut(t, b, c, d) {
    386         var s = 1.70158;
     386        let s = 1.70158;
    387387        if ((t /= d / 2) < 1) {
    388388            return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;
     
    391391    },
    392392    ElasticEaseIn(t, b, c, d, a, p) {
    393         var s = 0;
     393        let s = 0;
    394394        if (t === 0) {
    395395            return b;
     
    413413    },
    414414    ElasticEaseOut(t, b, c, d, a, p) {
    415         var s = 0;
     415        let s = 0;
    416416        if (t === 0) {
    417417            return b;
     
    435435    },
    436436    ElasticEaseInOut(t, b, c, d, a, p) {
    437         var s = 0;
     437        let s = 0;
    438438        if (t === 0) {
    439439            return b;
  • imaps-frontend/node_modules/konva/lib/Util.d.ts

    rd565449 r0c6b92a  
    3737    _isFunction(obj: any): boolean;
    3838    _isPlainObject(obj: any): boolean;
    39     _isArray(obj: any): obj is any[];
     39    _isArray(obj: any): obj is Array<any>;
    4040    _isNumber(obj: any): obj is number;
    4141    _isString(obj: any): obj is string;
    4242    _isBoolean(obj: any): obj is boolean;
    43     isObject(val: any): val is Object;
     43    isObject(val: any): val is object;
    4444    isValidSelector(selector: any): boolean;
    4545    _sign(number: number): 1 | -1;
     
    119119    error(str: string): void;
    120120    warn(str: string): void;
    121     each(obj: Object, func: Function): void;
     121    each(obj: object, func: Function): void;
    122122    _inRange(val: number, left: number, right: number): boolean;
    123123    _getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
     
    125125    _prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
    126126    _prepareToStringify<T>(obj: any): T | null;
    127     _assign<T_1, U>(target: T_1, source: U): T_1 & U;
     127    _assign<T, U>(target: T, source: U): T & U;
    128128    _getFirstPointerId(evt: any): any;
    129129    releaseCanvas(...canvases: HTMLCanvasElement[]): void;
  • imaps-frontend/node_modules/konva/lib/Util.js

    rd565449 r0c6b92a  
    2828    }
    2929    point(point) {
    30         var m = this.m;
     30        const m = this.m;
    3131        return {
    3232            x: m[0] * point.x + m[2] * point.y + m[4],
     
    4747    }
    4848    rotate(rad) {
    49         var c = Math.cos(rad);
    50         var s = Math.sin(rad);
    51         var m11 = this.m[0] * c + this.m[2] * s;
    52         var m12 = this.m[1] * c + this.m[3] * s;
    53         var m21 = this.m[0] * -s + this.m[2] * c;
    54         var m22 = this.m[1] * -s + this.m[3] * c;
     49        const c = Math.cos(rad);
     50        const s = Math.sin(rad);
     51        const m11 = this.m[0] * c + this.m[2] * s;
     52        const m12 = this.m[1] * c + this.m[3] * s;
     53        const m21 = this.m[0] * -s + this.m[2] * c;
     54        const m22 = this.m[1] * -s + this.m[3] * c;
    5555        this.m[0] = m11;
    5656        this.m[1] = m12;
     
    6666    }
    6767    skew(sx, sy) {
    68         var m11 = this.m[0] + this.m[2] * sy;
    69         var m12 = this.m[1] + this.m[3] * sy;
    70         var m21 = this.m[2] + this.m[0] * sx;
    71         var m22 = this.m[3] + this.m[1] * sx;
     68        const m11 = this.m[0] + this.m[2] * sy;
     69        const m12 = this.m[1] + this.m[3] * sy;
     70        const m21 = this.m[2] + this.m[0] * sx;
     71        const m22 = this.m[3] + this.m[1] * sx;
    7272        this.m[0] = m11;
    7373        this.m[1] = m12;
     
    7777    }
    7878    multiply(matrix) {
    79         var m11 = this.m[0] * matrix.m[0] + this.m[2] * matrix.m[1];
    80         var m12 = this.m[1] * matrix.m[0] + this.m[3] * matrix.m[1];
    81         var m21 = this.m[0] * matrix.m[2] + this.m[2] * matrix.m[3];
    82         var m22 = this.m[1] * matrix.m[2] + this.m[3] * matrix.m[3];
    83         var dx = this.m[0] * matrix.m[4] + this.m[2] * matrix.m[5] + this.m[4];
    84         var dy = this.m[1] * matrix.m[4] + this.m[3] * matrix.m[5] + this.m[5];
     79        const m11 = this.m[0] * matrix.m[0] + this.m[2] * matrix.m[1];
     80        const m12 = this.m[1] * matrix.m[0] + this.m[3] * matrix.m[1];
     81        const m21 = this.m[0] * matrix.m[2] + this.m[2] * matrix.m[3];
     82        const m22 = this.m[1] * matrix.m[2] + this.m[3] * matrix.m[3];
     83        const dx = this.m[0] * matrix.m[4] + this.m[2] * matrix.m[5] + this.m[4];
     84        const dy = this.m[1] * matrix.m[4] + this.m[3] * matrix.m[5] + this.m[5];
    8585        this.m[0] = m11;
    8686        this.m[1] = m12;
     
    9292    }
    9393    invert() {
    94         var d = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]);
    95         var m0 = this.m[3] * d;
    96         var m1 = -this.m[1] * d;
    97         var m2 = -this.m[2] * d;
    98         var m3 = this.m[0] * d;
    99         var m4 = d * (this.m[2] * this.m[5] - this.m[3] * this.m[4]);
    100         var m5 = d * (this.m[1] * this.m[4] - this.m[0] * this.m[5]);
     94        const d = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]);
     95        const m0 = this.m[3] * d;
     96        const m1 = -this.m[1] * d;
     97        const m2 = -this.m[2] * d;
     98        const m3 = this.m[0] * d;
     99        const m4 = d * (this.m[2] * this.m[5] - this.m[3] * this.m[4]);
     100        const m5 = d * (this.m[1] * this.m[4] - this.m[0] * this.m[5]);
    101101        this.m[0] = m0;
    102102        this.m[1] = m1;
     
    111111    }
    112112    decompose() {
    113         var a = this.m[0];
    114         var b = this.m[1];
    115         var c = this.m[2];
    116         var d = this.m[3];
    117         var e = this.m[4];
    118         var f = this.m[5];
    119         var delta = a * d - b * c;
    120         let result = {
     113        const a = this.m[0];
     114        const b = this.m[1];
     115        const c = this.m[2];
     116        const d = this.m[3];
     117        const e = this.m[4];
     118        const f = this.m[5];
     119        const delta = a * d - b * c;
     120        const result = {
    121121            x: e,
    122122            y: f,
     
    128128        };
    129129        if (a != 0 || b != 0) {
    130             var r = Math.sqrt(a * a + b * b);
     130            const r = Math.sqrt(a * a + b * b);
    131131            result.rotation = b > 0 ? Math.acos(a / r) : -Math.acos(a / r);
    132132            result.scaleX = r;
     
    136136        }
    137137        else if (c != 0 || d != 0) {
    138             var s = Math.sqrt(c * c + d * d);
     138            const s = Math.sqrt(c * c + d * d);
    139139            result.rotation =
    140140                Math.PI / 2 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));
     
    151151}
    152152exports.Transform = Transform;
    153 var OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {
     153let OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {
    154154    aliceblue: [240, 248, 255],
    155155    antiquewhite: [250, 235, 215],
     
    337337            return false;
    338338        }
    339         var firstChar = selector[0];
     339        const firstChar = selector[0];
    340340        return (firstChar === '#' ||
    341341            firstChar === '.' ||
     
    366366    },
    367367    createCanvasElement() {
    368         var canvas = document.createElement('canvas');
     368        const canvas = document.createElement('canvas');
    369369        try {
    370370            canvas.style = canvas.style || {};
     
    385385    },
    386386    _urlToImage(url, callback) {
    387         var imageObj = exports.Util.createImageElement();
     387        const imageObj = exports.Util.createImageElement();
    388388        imageObj.onload = function () {
    389389            callback(imageObj);
     
    396396    _hexToRgb(hex) {
    397397        hex = hex.replace(HASH, EMPTY_STRING);
    398         var bigint = parseInt(hex, 16);
     398        const bigint = parseInt(hex, 16);
    399399        return {
    400400            r: (bigint >> 16) & 255,
     
    404404    },
    405405    getRandomColor() {
    406         var randColor = ((Math.random() * 0xffffff) << 0).toString(16);
     406        let randColor = ((Math.random() * 0xffffff) << 0).toString(16);
    407407        while (randColor.length < 6) {
    408408            randColor = ZERO + randColor;
     
    411411    },
    412412    getRGB(color) {
    413         var rgb;
     413        let rgb;
    414414        if (color in COLORS) {
    415415            rgb = COLORS[color];
     
    451451    },
    452452    _namedColorToRBA(str) {
    453         var c = COLORS[str.toLowerCase()];
     453        const c = COLORS[str.toLowerCase()];
    454454        if (!c) {
    455455            return null;
     
    465465        if (str.indexOf('rgb(') === 0) {
    466466            str = str.match(/rgb\(([^)]+)\)/)[1];
    467             var parts = str.split(/ *, */).map(Number);
     467            const parts = str.split(/ *, */).map(Number);
    468468            return {
    469469                r: parts[0],
     
    477477        if (str.indexOf('rgba(') === 0) {
    478478            str = str.match(/rgba\(([^)]+)\)/)[1];
    479             var parts = str.split(/ *, */).map((n, index) => {
     479            const parts = str.split(/ *, */).map((n, index) => {
    480480                if (n.slice(-1) === '%') {
    481481                    return index === 3 ? parseInt(n) / 100 : (parseInt(n) / 100) * 255;
     
    594594    },
    595595    cloneObject(obj) {
    596         var retObj = {};
    597         for (var key in obj) {
     596        const retObj = {};
     597        for (const key in obj) {
    598598            if (this._isPlainObject(obj[key])) {
    599599                retObj[key] = this.cloneObject(obj[key]);
     
    644644    },
    645645    each(obj, func) {
    646         for (var key in obj) {
     646        for (const key in obj) {
    647647            func(key, obj[key]);
    648648        }
     
    652652    },
    653653    _getProjectionToSegment(x1, y1, x2, y2, x3, y3) {
    654         var x, y, dist;
    655         var pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
     654        let x, y, dist;
     655        const pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
    656656        if (pd2 == 0) {
    657657            x = x1;
     
    660660        }
    661661        else {
    662             var u = ((x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1)) / pd2;
     662            const u = ((x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1)) / pd2;
    663663            if (u < 0) {
    664664                x = x1;
     
    680680    },
    681681    _getProjectionToLine(pt, line, isClosed) {
    682         var pc = exports.Util.cloneObject(pt);
    683         var dist = Number.MAX_VALUE;
     682        const pc = exports.Util.cloneObject(pt);
     683        let dist = Number.MAX_VALUE;
    684684        line.forEach(function (p1, i) {
    685685            if (!isClosed && i === line.length - 1) {
    686686                return;
    687687            }
    688             var p2 = line[(i + 1) % line.length];
    689             var proj = exports.Util._getProjectionToSegment(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y);
    690             var px = proj[0], py = proj[1], pdist = proj[2];
     688            const p2 = line[(i + 1) % line.length];
     689            const proj = exports.Util._getProjectionToSegment(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y);
     690            const px = proj[0], py = proj[1], pdist = proj[2];
    691691            if (pdist < dist) {
    692692                pc.x = px;
     
    698698    },
    699699    _prepareArrayForTween(startArray, endArray, isClosed) {
    700         var n, start = [], end = [];
     700        let n, start = [], end = [];
    701701        if (startArray.length > endArray.length) {
    702             var temp = endArray;
     702            const temp = endArray;
    703703            endArray = startArray;
    704704            startArray = temp;
     
    716716            });
    717717        }
    718         var newStart = [];
     718        const newStart = [];
    719719        end.forEach(function (point) {
    720             var pr = exports.Util._getProjectionToLine(point, start, isClosed);
     720            const pr = exports.Util._getProjectionToLine(point, start, isClosed);
    721721            newStart.push(pr.x);
    722722            newStart.push(pr.y);
     
    725725    },
    726726    _prepareToStringify(obj) {
    727         var desc;
     727        let desc;
    728728        obj.visitedByCircularReferenceRemoval = true;
    729         for (var key in obj) {
     729        for (const key in obj) {
    730730            if (!(obj.hasOwnProperty(key) && obj[key] && typeof obj[key] == 'object')) {
    731731                continue;
     
    754754    },
    755755    _assign(target, source) {
    756         for (var key in source) {
     756        for (const key in source) {
    757757            target[key] = source[key];
    758758        }
  • imaps-frontend/node_modules/konva/lib/Validators.js

    rd565449 r0c6b92a  
    11"use strict";
    22Object.defineProperty(exports, "__esModule", { value: true });
    3 exports.getComponentValidator = exports.getBooleanValidator = exports.getNumberArrayValidator = exports.getFunctionValidator = exports.getStringOrGradientValidator = exports.getStringValidator = exports.getNumberOrAutoValidator = exports.getNumberOrArrayOfNumbersValidator = exports.getNumberValidator = exports.alphaComponent = exports.RGBComponent = void 0;
     3exports.RGBComponent = RGBComponent;
     4exports.alphaComponent = alphaComponent;
     5exports.getNumberValidator = getNumberValidator;
     6exports.getNumberOrArrayOfNumbersValidator = getNumberOrArrayOfNumbersValidator;
     7exports.getNumberOrAutoValidator = getNumberOrAutoValidator;
     8exports.getStringValidator = getStringValidator;
     9exports.getStringOrGradientValidator = getStringOrGradientValidator;
     10exports.getFunctionValidator = getFunctionValidator;
     11exports.getNumberArrayValidator = getNumberArrayValidator;
     12exports.getBooleanValidator = getBooleanValidator;
     13exports.getComponentValidator = getComponentValidator;
    414const Global_1 = require("./Global");
    515const Util_1 = require("./Util");
     
    2535    return Math.round(val);
    2636}
    27 exports.RGBComponent = RGBComponent;
    2837function alphaComponent(val) {
    2938    if (val > 1) {
     
    3544    return val;
    3645}
    37 exports.alphaComponent = alphaComponent;
    3846function getNumberValidator() {
    3947    if (Global_1.Konva.isUnminified) {
     
    4957    }
    5058}
    51 exports.getNumberValidator = getNumberValidator;
    5259function getNumberOrArrayOfNumbersValidator(noOfElements) {
    5360    if (Global_1.Konva.isUnminified) {
    5461        return function (val, attr) {
    55             let isNumber = Util_1.Util._isNumber(val);
    56             let isValidArray = Util_1.Util._isArray(val) && val.length == noOfElements;
     62            const isNumber = Util_1.Util._isNumber(val);
     63            const isValidArray = Util_1.Util._isArray(val) && val.length == noOfElements;
    5764            if (!isNumber && !isValidArray) {
    5865                Util_1.Util.warn(_formatValue(val) +
     
    6774    }
    6875}
    69 exports.getNumberOrArrayOfNumbersValidator = getNumberOrArrayOfNumbersValidator;
    7076function getNumberOrAutoValidator() {
    7177    if (Global_1.Konva.isUnminified) {
    7278        return function (val, attr) {
    73             var isNumber = Util_1.Util._isNumber(val);
    74             var isAuto = val === 'auto';
     79            const isNumber = Util_1.Util._isNumber(val);
     80            const isAuto = val === 'auto';
    7581            if (!(isNumber || isAuto)) {
    7682                Util_1.Util.warn(_formatValue(val) +
     
    8389    }
    8490}
    85 exports.getNumberOrAutoValidator = getNumberOrAutoValidator;
    8691function getStringValidator() {
    8792    if (Global_1.Konva.isUnminified) {
     
    97102    }
    98103}
    99 exports.getStringValidator = getStringValidator;
    100104function getStringOrGradientValidator() {
    101105    if (Global_1.Konva.isUnminified) {
     
    114118    }
    115119}
    116 exports.getStringOrGradientValidator = getStringOrGradientValidator;
    117120function getFunctionValidator() {
    118121    if (Global_1.Konva.isUnminified) {
     
    128131    }
    129132}
    130 exports.getFunctionValidator = getFunctionValidator;
    131133function getNumberArrayValidator() {
    132134    if (Global_1.Konva.isUnminified) {
     
    157159    }
    158160}
    159 exports.getNumberArrayValidator = getNumberArrayValidator;
    160161function getBooleanValidator() {
    161162    if (Global_1.Konva.isUnminified) {
    162163        return function (val, attr) {
    163             var isBool = val === true || val === false;
     164            const isBool = val === true || val === false;
    164165            if (!isBool) {
    165166                Util_1.Util.warn(_formatValue(val) +
     
    172173    }
    173174}
    174 exports.getBooleanValidator = getBooleanValidator;
    175175function getComponentValidator(components) {
    176176    if (Global_1.Konva.isUnminified) {
     
    190190    }
    191191}
    192 exports.getComponentValidator = getComponentValidator;
  • imaps-frontend/node_modules/konva/lib/_CoreInternals.d.ts

    rd565449 r0c6b92a  
    4949        _isFunction(obj: any): boolean;
    5050        _isPlainObject(obj: any): boolean;
    51         _isArray(obj: any): obj is any[];
     51        _isArray(obj: any): obj is Array<any>;
    5252        _isNumber(obj: any): obj is number;
    5353        _isString(obj: any): obj is string;
    5454        _isBoolean(obj: any): obj is boolean;
    55         isObject(val: any): val is Object;
     55        isObject(val: any): val is object;
    5656        isValidSelector(selector: any): boolean;
    5757        _sign(number: number): 1 | -1;
     
    121121        haveIntersection(r1: import("./types").IRect, r2: import("./types.js").IRect): boolean;
    122122        cloneObject<Any>(obj: Any): Any;
    123         cloneArray(arr: any[]): any[];
     123        cloneArray(arr: Array<any>): any[];
    124124        degToRad(deg: number): number;
    125125        radToDeg(rad: number): number;
     
    131131        error(str: string): void;
    132132        warn(str: string): void;
    133         each(obj: Object, func: Function): void;
     133        each(obj: object, func: Function): void;
    134134        _inRange(val: number, left: number, right: number): boolean;
    135135        _getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
    136         _getProjectionToLine(pt: import("./types").Vector2d, line: import("./types").Vector2d[], isClosed: boolean): import("./types.js").Vector2d;
     136        _getProjectionToLine(pt: import("./types").Vector2d, line: Array<import("./types").Vector2d>, isClosed: boolean): import("./types.js").Vector2d;
    137137        _prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
    138138        _prepareToStringify<T>(obj: any): T | null;
    139         _assign<T_1, U>(target: T_1, source: U): T_1 & U;
     139        _assign<T, U>(target: T, source: U): T & U;
    140140        _getFirstPointerId(evt: any): any;
    141141        releaseCanvas(...canvases: HTMLCanvasElement[]): void;
     
    155155        readonly node: Node<import("./Node.js").NodeConfig> | undefined;
    156156        _dragElements: Map<number, {
    157             node: Node<import("./Node.js").NodeConfig>;
     157            node: Node;
    158158            startPointerPos: import("./types.js").Vector2d;
    159159            offset: import("./types.js").Vector2d;
    160             pointerId?: number | undefined;
     160            pointerId?: number;
    161161            dragStatus: "ready" | "dragging" | "stopped";
    162162        }>;
  • imaps-frontend/node_modules/konva/lib/_FullInternals.d.ts

    rd565449 r0c6b92a  
    5454        _isFunction(obj: any): boolean;
    5555        _isPlainObject(obj: any): boolean;
    56         _isArray(obj: any): obj is any[];
     56        _isArray(obj: any): obj is Array<any>;
    5757        _isNumber(obj: any): obj is number;
    5858        _isString(obj: any): obj is string;
    5959        _isBoolean(obj: any): obj is boolean;
    60         isObject(val: any): val is Object;
     60        isObject(val: any): val is object;
    6161        isValidSelector(selector: any): boolean;
    6262        _sign(number: number): 1 | -1;
     
    126126        haveIntersection(r1: import("./types").IRect, r2: import("./types.js").IRect): boolean;
    127127        cloneObject<Any>(obj: Any): Any;
    128         cloneArray(arr: any[]): any[];
     128        cloneArray(arr: Array<any>): any[];
    129129        degToRad(deg: number): number;
    130130        radToDeg(rad: number): number;
     
    136136        error(str: string): void;
    137137        warn(str: string): void;
    138         each(obj: Object, func: Function): void;
     138        each(obj: object, func: Function): void;
    139139        _inRange(val: number, left: number, right: number): boolean;
    140140        _getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
    141         _getProjectionToLine(pt: import("./types").Vector2d, line: import("./types").Vector2d[], isClosed: boolean): import("./types.js").Vector2d;
     141        _getProjectionToLine(pt: import("./types").Vector2d, line: Array<import("./types").Vector2d>, isClosed: boolean): import("./types.js").Vector2d;
    142142        _prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
    143143        _prepareToStringify<T>(obj: any): T | null;
    144         _assign<T_1, U>(target: T_1, source: U): T_1 & U;
     144        _assign<T, U>(target: T, source: U): T & U;
    145145        _getFirstPointerId(evt: any): any;
    146146        releaseCanvas(...canvases: HTMLCanvasElement[]): void;
     
    160160        readonly node: import("./Node").Node<import("./Node.js").NodeConfig> | undefined;
    161161        _dragElements: Map<number, {
    162             node: import("./Node").Node<import("./Node.js").NodeConfig>;
     162            node: import("./Node.js").Node;
    163163            startPointerPos: import("./types.js").Vector2d;
    164164            offset: import("./types.js").Vector2d;
    165             pointerId?: number | undefined;
     165            pointerId?: number;
    166166            dragStatus: "ready" | "dragging" | "stopped";
    167167        }>;
  • imaps-frontend/node_modules/konva/lib/filters/Blur.js

    rd565449 r0c6b92a  
    1212    this.next = null;
    1313}
    14 var mul_table = [
     14const mul_table = [
    1515    512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292,
    1616    512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292,
     
    3131    289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259,
    3232];
    33 var shg_table = [
     33const shg_table = [
    3434    9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17,
    3535    17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19,
     
    4848];
    4949function filterGaussBlurRGBA(imageData, radius) {
    50     var pixels = imageData.data, width = imageData.width, height = imageData.height;
    51     var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;
    52     var div = radius + radius + 1, widthMinus1 = width - 1, heightMinus1 = height - 1, radiusPlus1 = radius + 1, sumFactor = (radiusPlus1 * (radiusPlus1 + 1)) / 2, stackStart = new BlurStack(), stackEnd = null, stack = stackStart, stackIn = null, stackOut = null, mul_sum = mul_table[radius], shg_sum = shg_table[radius];
     50    const pixels = imageData.data, width = imageData.width, height = imageData.height;
     51    let x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;
     52    let div = radius + radius + 1, widthMinus1 = width - 1, heightMinus1 = height - 1, radiusPlus1 = radius + 1, sumFactor = (radiusPlus1 * (radiusPlus1 + 1)) / 2, stackStart = new BlurStack(), stackEnd = null, stack = stackStart, stackIn = null, stackOut = null, mul_sum = mul_table[radius], shg_sum = shg_table[radius];
    5353    for (i = 1; i < div; i++) {
    5454        stack = stack.next = new BlurStack();
     
    230230}
    231231const Blur = function Blur(imageData) {
    232     var radius = Math.round(this.blurRadius());
     232    const radius = Math.round(this.blurRadius());
    233233    if (radius > 0) {
    234234        filterGaussBlurRGBA(imageData, radius);
  • imaps-frontend/node_modules/konva/lib/filters/Brighten.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const Brighten = function (imageData) {
    8     var brightness = this.brightness() * 255, data = imageData.data, len = data.length, i;
     8    let brightness = this.brightness() * 255, data = imageData.data, len = data.length, i;
    99    for (i = 0; i < len; i += 4) {
    1010        data[i] += brightness;
  • imaps-frontend/node_modules/konva/lib/filters/Contrast.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const Contrast = function (imageData) {
    8     var adjust = Math.pow((this.contrast() + 100) / 100, 2);
    9     var data = imageData.data, nPixels = data.length, red = 150, green = 150, blue = 150, i;
     8    const adjust = Math.pow((this.contrast() + 100) / 100, 2);
     9    let data = imageData.data, nPixels = data.length, red = 150, green = 150, blue = 150, i;
    1010    for (i = 0; i < nPixels; i += 4) {
    1111        red = data[i];
  • imaps-frontend/node_modules/konva/lib/filters/Emboss.js

    rd565449 r0c6b92a  
    77const Validators_1 = require("../Validators");
    88const Emboss = function (imageData) {
    9     var strength = this.embossStrength() * 10, greyLevel = this.embossWhiteLevel() * 255, direction = this.embossDirection(), blend = this.embossBlend(), dirY = 0, dirX = 0, data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;
     9    let strength = this.embossStrength() * 10, greyLevel = this.embossWhiteLevel() * 255, direction = this.embossDirection(), blend = this.embossBlend(), dirY = 0, dirX = 0, data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;
    1010    switch (direction) {
    1111        case 'top-left':
     
    4545    }
    4646    do {
    47         var offsetY = (y - 1) * w4;
    48         var otherY = dirY;
     47        const offsetY = (y - 1) * w4;
     48        let otherY = dirY;
    4949        if (y + otherY < 1) {
    5050            otherY = 0;
     
    5353            otherY = 0;
    5454        }
    55         var offsetYOther = (y - 1 + otherY) * w * 4;
    56         var x = w;
     55        const offsetYOther = (y - 1 + otherY) * w * 4;
     56        let x = w;
    5757        do {
    58             var offset = offsetY + (x - 1) * 4;
    59             var otherX = dirX;
     58            const offset = offsetY + (x - 1) * 4;
     59            let otherX = dirX;
    6060            if (x + otherX < 1) {
    6161                otherX = 0;
     
    6464                otherX = 0;
    6565            }
    66             var offsetOther = offsetYOther + (x - 1 + otherX) * 4;
    67             var dR = data[offset] - data[offsetOther];
    68             var dG = data[offset + 1] - data[offsetOther + 1];
    69             var dB = data[offset + 2] - data[offsetOther + 2];
    70             var dif = dR;
    71             var absDif = dif > 0 ? dif : -dif;
    72             var absG = dG > 0 ? dG : -dG;
    73             var absB = dB > 0 ? dB : -dB;
     66            const offsetOther = offsetYOther + (x - 1 + otherX) * 4;
     67            const dR = data[offset] - data[offsetOther];
     68            const dG = data[offset + 1] - data[offsetOther + 1];
     69            const dB = data[offset + 2] - data[offsetOther + 2];
     70            let dif = dR;
     71            const absDif = dif > 0 ? dif : -dif;
     72            const absG = dG > 0 ? dG : -dG;
     73            const absB = dB > 0 ? dB : -dB;
    7474            if (absG > absDif) {
    7575                dif = dG;
     
    8080            dif *= strength;
    8181            if (blend) {
    82                 var r = data[offset] + dif;
    83                 var g = data[offset + 1] + dif;
    84                 var b = data[offset + 2] + dif;
     82                const r = data[offset] + dif;
     83                const g = data[offset + 1] + dif;
     84                const b = data[offset + 2] + dif;
    8585                data[offset] = r > 255 ? 255 : r < 0 ? 0 : r;
    8686                data[offset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;
     
    8888            }
    8989            else {
    90                 var grey = greyLevel - dif;
     90                let grey = greyLevel - dif;
    9191                if (grey < 0) {
    9292                    grey = 0;
  • imaps-frontend/node_modules/konva/lib/filters/Enhance.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77function remap(fromValue, fromMin, fromMax, toMin, toMax) {
    8     var fromRange = fromMax - fromMin, toRange = toMax - toMin, toValue;
     8    let fromRange = fromMax - fromMin, toRange = toMax - toMin, toValue;
    99    if (fromRange === 0) {
    1010        return toMin + toRange / 2;
     
    1818}
    1919const Enhance = function (imageData) {
    20     var data = imageData.data, nSubPixels = data.length, rMin = data[0], rMax = rMin, r, gMin = data[1], gMax = gMin, g, bMin = data[2], bMax = bMin, b, i;
    21     var enhanceAmount = this.enhance();
     20    let data = imageData.data, nSubPixels = data.length, rMin = data[0], rMax = rMin, r, gMin = data[1], gMax = gMin, g, bMin = data[2], bMax = bMin, b, i;
     21    const enhanceAmount = this.enhance();
    2222    if (enhanceAmount === 0) {
    2323        return;
     
    5858        bMin = 0;
    5959    }
    60     var rMid, rGoalMax, rGoalMin, gMid, gGoalMax, gGoalMin, bMid, bGoalMax, bGoalMin;
     60    let rMid, rGoalMax, rGoalMin, gMid, gGoalMax, gGoalMin, bMid, bGoalMax, bGoalMin;
    6161    if (enhanceAmount > 0) {
    6262        rGoalMax = rMax + enhanceAmount * (255 - rMax);
  • imaps-frontend/node_modules/konva/lib/filters/Grayscale.js

    rd565449 r0c6b92a  
    33exports.Grayscale = void 0;
    44const Grayscale = function (imageData) {
    5     var data = imageData.data, len = data.length, i, brightness;
     5    let data = imageData.data, len = data.length, i, brightness;
    66    for (i = 0; i < len; i += 4) {
    77        brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];
  • imaps-frontend/node_modules/konva/lib/filters/HSL.js

    rd565449 r0c6b92a  
    99Factory_1.Factory.addGetterSetter(Node_1.Node, 'luminance', 0, (0, Validators_1.getNumberValidator)(), Factory_1.Factory.afterSetFilter);
    1010const HSL = function (imageData) {
    11     var data = imageData.data, nPixels = data.length, v = 1, s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, l = this.luminance() * 127, i;
    12     var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);
    13     var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;
    14     var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;
    15     var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;
    16     var r, g, b, a;
     11    let data = imageData.data, nPixels = data.length, v = 1, s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, l = this.luminance() * 127, i;
     12    const vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);
     13    const rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;
     14    const gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;
     15    const br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;
     16    let r, g, b, a;
    1717    for (i = 0; i < nPixels; i += 4) {
    1818        r = data[i + 0];
  • imaps-frontend/node_modules/konva/lib/filters/HSV.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const HSV = function (imageData) {
    8     var data = imageData.data, nPixels = data.length, v = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, i;
    9     var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);
    10     var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;
    11     var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;
    12     var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;
    13     var r, g, b, a;
    14     for (i = 0; i < nPixels; i += 4) {
     8    const data = imageData.data, nPixels = data.length, v = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360;
     9    const vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);
     10    const rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;
     11    const gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;
     12    const br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;
     13    let r, g, b, a;
     14    for (let i = 0; i < nPixels; i += 4) {
    1515        r = data[i + 0];
    1616        g = data[i + 1];
  • imaps-frontend/node_modules/konva/lib/filters/Invert.js

    rd565449 r0c6b92a  
    33exports.Invert = void 0;
    44const Invert = function (imageData) {
    5     var data = imageData.data, len = data.length, i;
     5    let data = imageData.data, len = data.length, i;
    66    for (i = 0; i < len; i += 4) {
    77        data[i] = 255 - data[i];
  • imaps-frontend/node_modules/konva/lib/filters/Kaleidoscope.js

    rd565449 r0c6b92a  
    66const Util_1 = require("../Util");
    77const Validators_1 = require("../Validators");
    8 var ToPolar = function (src, dst, opt) {
    9     var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, r = 0, g = 0, b = 0, a = 0;
    10     var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);
     8const ToPolar = function (src, dst, opt) {
     9    let srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, r = 0, g = 0, b = 0, a = 0;
     10    let rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);
    1111    x = xSize - xMid;
    1212    y = ySize - yMid;
    1313    rad = Math.sqrt(x * x + y * y);
    1414    rMax = rad > rMax ? rad : rMax;
    15     var rSize = ySize, tSize = xSize, radius, theta;
    16     var conversion = ((360 / tSize) * Math.PI) / 180, sin, cos;
     15    let rSize = ySize, tSize = xSize, radius, theta;
     16    let conversion = ((360 / tSize) * Math.PI) / 180, sin, cos;
    1717    for (theta = 0; theta < tSize; theta += 1) {
    1818        sin = Math.sin(theta * conversion);
     
    3434    }
    3535};
    36 var FromPolar = function (src, dst, opt) {
    37     var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, dx, dy, r = 0, g = 0, b = 0, a = 0;
    38     var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);
     36const FromPolar = function (src, dst, opt) {
     37    let srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, dx, dy, r = 0, g = 0, b = 0, a = 0;
     38    let rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);
    3939    x = xSize - xMid;
    4040    y = ySize - yMid;
    4141    rad = Math.sqrt(x * x + y * y);
    4242    rMax = rad > rMax ? rad : rMax;
    43     var rSize = ySize, tSize = xSize, radius, theta, phaseShift = opt.polarRotation || 0;
    44     var x1, y1;
     43    let rSize = ySize, tSize = xSize, radius, theta, phaseShift = opt.polarRotation || 0;
     44    let x1, y1;
    4545    for (x = 0; x < xSize; x += 1) {
    4646        for (y = 0; y < ySize; y += 1) {
     
    6666};
    6767const Kaleidoscope = function (imageData) {
    68     var xSize = imageData.width, ySize = imageData.height;
    69     var x, y, xoff, i, r, g, b, a, srcPos, dstPos;
    70     var power = Math.round(this.kaleidoscopePower());
    71     var angle = Math.round(this.kaleidoscopeAngle());
    72     var offset = Math.floor((xSize * (angle % 360)) / 360);
     68    const xSize = imageData.width, ySize = imageData.height;
     69    let x, y, xoff, i, r, g, b, a, srcPos, dstPos;
     70    let power = Math.round(this.kaleidoscopePower());
     71    const angle = Math.round(this.kaleidoscopeAngle());
     72    const offset = Math.floor((xSize * (angle % 360)) / 360);
    7373    if (power < 1) {
    7474        return;
    7575    }
    76     var tempCanvas = Util_1.Util.createCanvasElement();
     76    const tempCanvas = Util_1.Util.createCanvasElement();
    7777    tempCanvas.width = xSize;
    7878    tempCanvas.height = ySize;
    79     var scratchData = tempCanvas
     79    const scratchData = tempCanvas
    8080        .getContext('2d')
    8181        .getImageData(0, 0, xSize, ySize);
     
    8585        polarCenterY: ySize / 2,
    8686    });
    87     var minSectionSize = xSize / Math.pow(2, power);
     87    let minSectionSize = xSize / Math.pow(2, power);
    8888    while (minSectionSize <= 8) {
    8989        minSectionSize = minSectionSize * 2;
     
    9191    }
    9292    minSectionSize = Math.ceil(minSectionSize);
    93     var sectionSize = minSectionSize;
    94     var xStart = 0, xEnd = sectionSize, xDelta = 1;
     93    let sectionSize = minSectionSize;
     94    let xStart = 0, xEnd = sectionSize, xDelta = 1;
    9595    if (offset + minSectionSize > xSize) {
    9696        xStart = sectionSize;
  • imaps-frontend/node_modules/konva/lib/filters/Mask.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77function pixelAt(idata, x, y) {
    8     var idx = (y * idata.width + x) * 4;
    9     var d = [];
     8    let idx = (y * idata.width + x) * 4;
     9    const d = [];
    1010    d.push(idata.data[idx++], idata.data[idx++], idata.data[idx++], idata.data[idx++]);
    1111    return d;
     
    1717}
    1818function rgbMean(pTab) {
    19     var m = [0, 0, 0];
    20     for (var i = 0; i < pTab.length; i++) {
     19    const m = [0, 0, 0];
     20    for (let i = 0; i < pTab.length; i++) {
    2121        m[0] += pTab[i][0];
    2222        m[1] += pTab[i][1];
     
    2929}
    3030function backgroundMask(idata, threshold) {
    31     var rgbv_no = pixelAt(idata, 0, 0);
    32     var rgbv_ne = pixelAt(idata, idata.width - 1, 0);
    33     var rgbv_so = pixelAt(idata, 0, idata.height - 1);
    34     var rgbv_se = pixelAt(idata, idata.width - 1, idata.height - 1);
    35     var thres = threshold || 10;
     31    const rgbv_no = pixelAt(idata, 0, 0);
     32    const rgbv_ne = pixelAt(idata, idata.width - 1, 0);
     33    const rgbv_so = pixelAt(idata, 0, idata.height - 1);
     34    const rgbv_se = pixelAt(idata, idata.width - 1, idata.height - 1);
     35    const thres = threshold || 10;
    3636    if (rgbDistance(rgbv_no, rgbv_ne) < thres &&
    3737        rgbDistance(rgbv_ne, rgbv_se) < thres &&
    3838        rgbDistance(rgbv_se, rgbv_so) < thres &&
    3939        rgbDistance(rgbv_so, rgbv_no) < thres) {
    40         var mean = rgbMean([rgbv_ne, rgbv_no, rgbv_se, rgbv_so]);
    41         var mask = [];
    42         for (var i = 0; i < idata.width * idata.height; i++) {
    43             var d = rgbDistance(mean, [
     40        const mean = rgbMean([rgbv_ne, rgbv_no, rgbv_se, rgbv_so]);
     41        const mask = [];
     42        for (let i = 0; i < idata.width * idata.height; i++) {
     43            const d = rgbDistance(mean, [
    4444                idata.data[i * 4],
    4545                idata.data[i * 4 + 1],
     
    5252}
    5353function applyMask(idata, mask) {
    54     for (var i = 0; i < idata.width * idata.height; i++) {
     54    for (let i = 0; i < idata.width * idata.height; i++) {
    5555        idata.data[4 * i + 3] = mask[i];
    5656    }
    5757}
    5858function erodeMask(mask, sw, sh) {
    59     var weights = [1, 1, 1, 1, 0, 1, 1, 1, 1];
    60     var side = Math.round(Math.sqrt(weights.length));
    61     var halfSide = Math.floor(side / 2);
    62     var maskResult = [];
    63     for (var y = 0; y < sh; y++) {
    64         for (var x = 0; x < sw; x++) {
    65             var so = y * sw + x;
    66             var a = 0;
    67             for (var cy = 0; cy < side; cy++) {
    68                 for (var cx = 0; cx < side; cx++) {
    69                     var scy = y + cy - halfSide;
    70                     var scx = x + cx - halfSide;
     59    const weights = [1, 1, 1, 1, 0, 1, 1, 1, 1];
     60    const side = Math.round(Math.sqrt(weights.length));
     61    const halfSide = Math.floor(side / 2);
     62    const maskResult = [];
     63    for (let y = 0; y < sh; y++) {
     64        for (let x = 0; x < sw; x++) {
     65            const so = y * sw + x;
     66            let a = 0;
     67            for (let cy = 0; cy < side; cy++) {
     68                for (let cx = 0; cx < side; cx++) {
     69                    const scy = y + cy - halfSide;
     70                    const scx = x + cx - halfSide;
    7171                    if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {
    72                         var srcOff = scy * sw + scx;
    73                         var wt = weights[cy * side + cx];
     72                        const srcOff = scy * sw + scx;
     73                        const wt = weights[cy * side + cx];
    7474                        a += mask[srcOff] * wt;
    7575                    }
     
    8282}
    8383function dilateMask(mask, sw, sh) {
    84     var weights = [1, 1, 1, 1, 1, 1, 1, 1, 1];
    85     var side = Math.round(Math.sqrt(weights.length));
    86     var halfSide = Math.floor(side / 2);
    87     var maskResult = [];
    88     for (var y = 0; y < sh; y++) {
    89         for (var x = 0; x < sw; x++) {
    90             var so = y * sw + x;
    91             var a = 0;
    92             for (var cy = 0; cy < side; cy++) {
    93                 for (var cx = 0; cx < side; cx++) {
    94                     var scy = y + cy - halfSide;
    95                     var scx = x + cx - halfSide;
     84    const weights = [1, 1, 1, 1, 1, 1, 1, 1, 1];
     85    const side = Math.round(Math.sqrt(weights.length));
     86    const halfSide = Math.floor(side / 2);
     87    const maskResult = [];
     88    for (let y = 0; y < sh; y++) {
     89        for (let x = 0; x < sw; x++) {
     90            const so = y * sw + x;
     91            let a = 0;
     92            for (let cy = 0; cy < side; cy++) {
     93                for (let cx = 0; cx < side; cx++) {
     94                    const scy = y + cy - halfSide;
     95                    const scx = x + cx - halfSide;
    9696                    if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {
    97                         var srcOff = scy * sw + scx;
    98                         var wt = weights[cy * side + cx];
     97                        const srcOff = scy * sw + scx;
     98                        const wt = weights[cy * side + cx];
    9999                        a += mask[srcOff] * wt;
    100100                    }
     
    107107}
    108108function smoothEdgeMask(mask, sw, sh) {
    109     var weights = [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9];
    110     var side = Math.round(Math.sqrt(weights.length));
    111     var halfSide = Math.floor(side / 2);
    112     var maskResult = [];
    113     for (var y = 0; y < sh; y++) {
    114         for (var x = 0; x < sw; x++) {
    115             var so = y * sw + x;
    116             var a = 0;
    117             for (var cy = 0; cy < side; cy++) {
    118                 for (var cx = 0; cx < side; cx++) {
    119                     var scy = y + cy - halfSide;
    120                     var scx = x + cx - halfSide;
     109    const weights = [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9];
     110    const side = Math.round(Math.sqrt(weights.length));
     111    const halfSide = Math.floor(side / 2);
     112    const maskResult = [];
     113    for (let y = 0; y < sh; y++) {
     114        for (let x = 0; x < sw; x++) {
     115            const so = y * sw + x;
     116            let a = 0;
     117            for (let cy = 0; cy < side; cy++) {
     118                for (let cx = 0; cx < side; cx++) {
     119                    const scy = y + cy - halfSide;
     120                    const scx = x + cx - halfSide;
    121121                    if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {
    122                         var srcOff = scy * sw + scx;
    123                         var wt = weights[cy * side + cx];
     122                        const srcOff = scy * sw + scx;
     123                        const wt = weights[cy * side + cx];
    124124                        a += mask[srcOff] * wt;
    125125                    }
     
    132132}
    133133const Mask = function (imageData) {
    134     var threshold = this.threshold(), mask = backgroundMask(imageData, threshold);
     134    let threshold = this.threshold(), mask = backgroundMask(imageData, threshold);
    135135    if (mask) {
    136136        mask = erodeMask(mask, imageData.width, imageData.height);
  • imaps-frontend/node_modules/konva/lib/filters/Noise.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const Noise = function (imageData) {
    8     var amount = this.noise() * 255, data = imageData.data, nPixels = data.length, half = amount / 2, i;
    9     for (i = 0; i < nPixels; i += 4) {
     8    const amount = this.noise() * 255, data = imageData.data, nPixels = data.length, half = amount / 2;
     9    for (let i = 0; i < nPixels; i += 4) {
    1010        data[i + 0] += half - 2 * half * Math.random();
    1111        data[i + 1] += half - 2 * half * Math.random();
  • imaps-frontend/node_modules/konva/lib/filters/Pixelate.js

    rd565449 r0c6b92a  
    77const Validators_1 = require("../Validators");
    88const Pixelate = function (imageData) {
    9     var pixelSize = Math.ceil(this.pixelSize()), width = imageData.width, height = imageData.height, x, y, i, red, green, blue, alpha, nBinsX = Math.ceil(width / pixelSize), nBinsY = Math.ceil(height / pixelSize), xBinStart, xBinEnd, yBinStart, yBinEnd, xBin, yBin, pixelsInBin, data = imageData.data;
     9    let pixelSize = Math.ceil(this.pixelSize()), width = imageData.width, height = imageData.height, x, y, i, red, green, blue, alpha, nBinsX = Math.ceil(width / pixelSize), nBinsY = Math.ceil(height / pixelSize), xBinStart, xBinEnd, yBinStart, yBinEnd, xBin, yBin, pixelsInBin, data = imageData.data;
    1010    if (pixelSize <= 0) {
    1111        Util_1.Util.error('pixelSize value can not be <= 0');
  • imaps-frontend/node_modules/konva/lib/filters/Posterize.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const Posterize = function (imageData) {
    8     var levels = Math.round(this.levels() * 254) + 1, data = imageData.data, len = data.length, scale = 255 / levels, i;
     8    let levels = Math.round(this.levels() * 254) + 1, data = imageData.data, len = data.length, scale = 255 / levels, i;
    99    for (i = 0; i < len; i += 1) {
    1010        data[i] = Math.floor(data[i] / scale) * scale;
  • imaps-frontend/node_modules/konva/lib/filters/RGB.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const RGB = function (imageData) {
    8     var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), i, brightness;
     8    let data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), i, brightness;
    99    for (i = 0; i < nPixels; i += 4) {
    1010        brightness =
  • imaps-frontend/node_modules/konva/lib/filters/RGBA.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const RGBA = function (imageData) {
    8     var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), alpha = this.alpha(), i, ia;
    9     for (i = 0; i < nPixels; i += 4) {
    10         ia = 1 - alpha;
     8    const data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), alpha = this.alpha();
     9    for (let i = 0; i < nPixels; i += 4) {
     10        const ia = 1 - alpha;
    1111        data[i] = red * alpha + data[i] * ia;
    1212        data[i + 1] = green * alpha + data[i + 1] * ia;
  • imaps-frontend/node_modules/konva/lib/filters/Sepia.js

    rd565449 r0c6b92a  
    33exports.Sepia = void 0;
    44const Sepia = function (imageData) {
    5     var data = imageData.data, nPixels = data.length, i, r, g, b;
     5    let data = imageData.data, nPixels = data.length, i, r, g, b;
    66    for (i = 0; i < nPixels; i += 4) {
    77        r = data[i + 0];
  • imaps-frontend/node_modules/konva/lib/filters/Solarize.js

    rd565449 r0c6b92a  
    33exports.Solarize = void 0;
    44const Solarize = function (imageData) {
    5     var data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;
     5    const data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4;
     6    let y = h;
    67    do {
    7         var offsetY = (y - 1) * w4;
    8         var x = w;
     8        const offsetY = (y - 1) * w4;
     9        let x = w;
    910        do {
    10             var offset = offsetY + (x - 1) * 4;
    11             var r = data[offset];
    12             var g = data[offset + 1];
    13             var b = data[offset + 2];
     11            const offset = offsetY + (x - 1) * 4;
     12            let r = data[offset];
     13            let g = data[offset + 1];
     14            let b = data[offset + 2];
    1415            if (r > 127) {
    1516                r = 255 - r;
  • imaps-frontend/node_modules/konva/lib/filters/Threshold.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const Threshold = function (imageData) {
    8     var level = this.threshold() * 255, data = imageData.data, len = data.length, i;
    9     for (i = 0; i < len; i += 1) {
     8    const level = this.threshold() * 255, data = imageData.data, len = data.length;
     9    for (let i = 0; i < len; i += 1) {
    1010        data[i] = data[i] < level ? 0 : 255;
    1111    }
  • imaps-frontend/node_modules/konva/lib/shapes/Arc.js

    rd565449 r0c6b92a  
    99class Arc extends Shape_1.Shape {
    1010    _sceneFunc(context) {
    11         var angle = Global_1.Konva.getAngle(this.angle()), clockwise = this.clockwise();
     11        const angle = Global_1.Konva.getAngle(this.angle()), clockwise = this.clockwise();
    1212        context.beginPath();
    1313        context.arc(0, 0, this.outerRadius(), 0, angle, clockwise);
  • imaps-frontend/node_modules/konva/lib/shapes/Arrow.js

    rd565449 r0c6b92a  
    1010    _sceneFunc(ctx) {
    1111        super._sceneFunc(ctx);
    12         var PI2 = Math.PI * 2;
    13         var points = this.points();
    14         var tp = points;
    15         var fromTension = this.tension() !== 0 && points.length > 4;
     12        const PI2 = Math.PI * 2;
     13        const points = this.points();
     14        let tp = points;
     15        const fromTension = this.tension() !== 0 && points.length > 4;
    1616        if (fromTension) {
    1717            tp = this.getTensionPoints();
    1818        }
    19         var length = this.pointerLength();
    20         var n = points.length;
    21         var dx, dy;
     19        const length = this.pointerLength();
     20        const n = points.length;
     21        let dx, dy;
    2222        if (fromTension) {
    2323            const lp = [
     
    3838            dy = points[n - 1] - points[n - 3];
    3939        }
    40         var radians = (Math.atan2(dy, dx) + PI2) % PI2;
    41         var width = this.pointerWidth();
     40        const radians = (Math.atan2(dy, dx) + PI2) % PI2;
     41        const width = this.pointerWidth();
    4242        if (this.pointerAtEnding()) {
    4343            ctx.save();
     
    7474    }
    7575    __fillStroke(ctx) {
    76         var isDashEnabled = this.dashEnabled();
     76        const isDashEnabled = this.dashEnabled();
    7777        if (isDashEnabled) {
    7878            this.attrs.dashEnabled = false;
  • imaps-frontend/node_modules/konva/lib/shapes/Ellipse.js

    rd565449 r0c6b92a  
    88class Ellipse extends Shape_1.Shape {
    99    _sceneFunc(context) {
    10         var rx = this.radiusX(), ry = this.radiusY();
     10        const rx = this.radiusX(), ry = this.radiusY();
    1111        context.beginPath();
    1212        context.save();
  • imaps-frontend/node_modules/konva/lib/shapes/Image.js

    rd565449 r0c6b92a  
    7979    }
    8080    _hitFunc(context) {
    81         var width = this.width(), height = this.height(), cornerRadius = this.cornerRadius();
     81        const width = this.width(), height = this.height(), cornerRadius = this.cornerRadius();
    8282        context.beginPath();
    8383        if (!cornerRadius) {
     
    9999    }
    100100    static fromURL(url, callback, onError = null) {
    101         var img = Util_1.Util.createImageElement();
     101        const img = Util_1.Util.createImageElement();
    102102        img.onload = function () {
    103             var image = new Image({
     103            const image = new Image({
    104104                image: img,
    105105            });
  • imaps-frontend/node_modules/konva/lib/shapes/Label.d.ts

    rd565449 r0c6b92a  
    3030        height: number;
    3131    };
    32     pointerDirection: GetSet<'left' | 'top' | 'right' | 'bottom', this>;
     32    pointerDirection: GetSet<'left' | 'top' | 'right' | 'bottom' | 'up' | 'down', this>;
    3333    pointerWidth: GetSet<number, this>;
    3434    pointerHeight: GetSet<number, this>;
  • imaps-frontend/node_modules/konva/lib/shapes/Label.js

    rd565449 r0c6b92a  
    77const Validators_1 = require("../Validators");
    88const Global_1 = require("../Global");
    9 var ATTR_CHANGE_LIST = [
     9const ATTR_CHANGE_LIST = [
    1010    'fontFamily',
    1111    'fontSize',
     
    3535    }
    3636    _addListeners(text) {
    37         var that = this, n;
    38         var func = function () {
     37        let that = this, n;
     38        const func = function () {
    3939            that._sync();
    4040        };
     
    5050    }
    5151    _sync() {
    52         var text = this.getText(), tag = this.getTag(), width, height, pointerDirection, pointerWidth, x, y, pointerHeight;
     52        let text = this.getText(), tag = this.getTag(), width, height, pointerDirection, pointerWidth, x, y, pointerHeight;
    5353        if (text && tag) {
    5454            width = text.width();
     
    9595class Tag extends Shape_1.Shape {
    9696    _sceneFunc(context) {
    97         var width = this.width(), height = this.height(), pointerDirection = this.pointerDirection(), pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), cornerRadius = this.cornerRadius();
     97        const width = this.width(), height = this.height(), pointerDirection = this.pointerDirection(), pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), cornerRadius = this.cornerRadius();
    9898        let topLeft = 0;
    9999        let topRight = 0;
     
    147147    }
    148148    getSelfRect() {
    149         var x = 0, y = 0, pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), direction = this.pointerDirection(), width = this.width(), height = this.height();
     149        let x = 0, y = 0, pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), direction = this.pointerDirection(), width = this.width(), height = this.height();
    150150        if (direction === UP) {
    151151            y -= pointerHeight;
  • imaps-frontend/node_modules/konva/lib/shapes/Line.d.ts

    rd565449 r0c6b92a  
    11import { Shape, ShapeConfig } from '../Shape.js';
     2import { Context } from '../Context.js';
    23import { GetSet } from '../types.js';
    3 import { Context } from '../Context.js';
    44export interface LineConfig extends ShapeConfig {
    55    points?: number[] | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
  • imaps-frontend/node_modules/konva/lib/shapes/Line.js

    rd565449 r0c6b92a  
    33exports.Line = void 0;
    44const Factory_1 = require("../Factory");
     5const Global_1 = require("../Global");
    56const Shape_1 = require("../Shape");
    67const Validators_1 = require("../Validators");
    7 const Global_1 = require("../Global");
    88function getControlPoints(x0, y0, x1, y1, x2, y2, t) {
    9     var d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);
     9    const d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);
    1010    return [p1x, p1y, p2x, p2y];
    1111}
    1212function expandPoints(p, tension) {
    13     var len = p.length, allPoints = [], n, cp;
    14     for (n = 2; n < len - 2; n += 2) {
    15         cp = getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);
     13    const len = p.length, allPoints = [];
     14    for (let n = 2; n < len - 2; n += 2) {
     15        const cp = getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);
    1616        if (isNaN(cp[0])) {
    1717            continue;
     
    3434    }
    3535    _sceneFunc(context) {
    36         var points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;
     36        let points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;
    3737        if (!length) {
    3838            return;
     
    8585    }
    8686    _getTensionPointsClosed() {
    87         var p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]
     87        const p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]
    8888            .concat(middle)
    8989            .concat([
     
    108108    }
    109109    getSelfRect() {
    110         var points = this.points();
     110        let points = this.points();
    111111        if (points.length < 4) {
    112112            return {
     
    129129            points = this.points();
    130130        }
    131         var minX = points[0];
    132         var maxX = points[0];
    133         var minY = points[1];
    134         var maxY = points[1];
    135         var x, y;
    136         for (var i = 0; i < points.length / 2; i++) {
     131        let minX = points[0];
     132        let maxX = points[0];
     133        let minY = points[1];
     134        let maxY = points[1];
     135        let x, y;
     136        for (let i = 0; i < points.length / 2; i++) {
    137137            x = points[i * 2];
    138138            y = points[i * 2 + 1];
  • imaps-frontend/node_modules/konva/lib/shapes/Path.d.ts

    rd565449 r0c6b92a  
    1818    getLength(): number;
    1919    getPointAtLength(length: any): {
    20         x: any;
    21         y: any;
     20        x: number;
     21        y: number;
    2222    } | null;
    2323    data: GetSet<string, this>;
    2424    static getLineLength(x1: any, y1: any, x2: any, y2: any): number;
    2525    static getPathLength(dataArray: PathSegment[]): number;
    26     static getPointAtLengthOfDataArray(length: number, dataArray: any): {
    27         x: any;
    28         y: any;
     26    static getPointAtLengthOfDataArray(length: number, dataArray: PathSegment[]): {
     27        x: number;
     28        y: number;
    2929    } | null;
    30     static getPointOnLine(dist: any, P1x: any, P1y: any, P2x: any, P2y: any, fromX?: any, fromY?: any): {
    31         x: any;
    32         y: any;
     30    static getPointOnLine(dist: number, P1x: number, P1y: number, P2x: number, P2y: number, fromX?: number, fromY?: number): {
     31        x: number;
     32        y: number;
    3333    };
    3434    static getPointOnCubicBezier(pct: any, P1x: any, P1y: any, P2x: any, P2y: any, P3x: any, P3y: any, P4x: any, P4y: any): {
  • imaps-frontend/node_modules/konva/lib/shapes/Path.js

    rd565449 r0c6b92a  
    2121    }
    2222    _sceneFunc(context) {
    23         var ca = this.dataArray;
     23        const ca = this.dataArray;
    2424        context.beginPath();
    25         var isClosed = false;
    26         for (var n = 0; n < ca.length; n++) {
    27             var c = ca[n].command;
    28             var p = ca[n].points;
     25        let isClosed = false;
     26        for (let n = 0; n < ca.length; n++) {
     27            const c = ca[n].command;
     28            const p = ca[n].points;
    2929            switch (c) {
    3030                case 'L':
     
    6767    }
    6868    getSelfRect() {
    69         var points = [];
     69        let points = [];
    7070        this.dataArray.forEach(function (data) {
    7171            if (data.command === 'A') {
    72                 var start = data.points[4];
    73                 var dTheta = data.points[5];
    74                 var end = data.points[4] + dTheta;
    75                 var inc = Math.PI / 180.0;
     72                const start = data.points[4];
     73                const dTheta = data.points[5];
     74                const end = data.points[4] + dTheta;
     75                let inc = Math.PI / 180.0;
    7676                if (Math.abs(start - end) < inc) {
    7777                    inc = Math.abs(start - end);
     
    100100            }
    101101        });
    102         var minX = points[0];
    103         var maxX = points[0];
    104         var minY = points[1];
    105         var maxY = points[1];
    106         var x, y;
    107         for (var i = 0; i < points.length / 2; i++) {
     102        let minX = points[0];
     103        let maxX = points[0];
     104        let minY = points[1];
     105        let maxY = points[1];
     106        let x, y;
     107        for (let i = 0; i < points.length / 2; i++) {
    108108            x = points[i * 2];
    109109            y = points[i * 2 + 1];
     
    135135    static getPathLength(dataArray) {
    136136        let pathLength = 0;
    137         for (var i = 0; i < dataArray.length; ++i) {
     137        for (let i = 0; i < dataArray.length; ++i) {
    138138            pathLength += dataArray[i].pathLength;
    139139        }
     
    141141    }
    142142    static getPointAtLengthOfDataArray(length, dataArray) {
    143         var point, i = 0, ii = dataArray.length;
     143        let points, i = 0, ii = dataArray.length;
    144144        if (!ii) {
    145145            return null;
     
    150150        }
    151151        if (i === ii) {
    152             point = dataArray[i - 1].points.slice(-2);
     152            points = dataArray[i - 1].points.slice(-2);
    153153            return {
    154                 x: point[0],
    155                 y: point[1],
     154                x: points[0],
     155                y: points[1],
    156156            };
    157157        }
    158158        if (length < 0.01) {
    159             point = dataArray[i].points.slice(0, 2);
     159            points = dataArray[i].points.slice(0, 2);
    160160            return {
    161                 x: point[0],
    162                 y: point[1],
     161                x: points[0],
     162                y: points[1],
    163163            };
    164164        }
    165         var cp = dataArray[i];
    166         var p = cp.points;
     165        const cp = dataArray[i];
     166        const p = cp.points;
    167167        switch (cp.command) {
    168168            case 'L':
     
    221221            return (1 - t) * (1 - t) * (1 - t);
    222222        }
    223         var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);
    224         var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);
     223        const x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);
     224        const y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);
    225225        return {
    226226            x: x,
     
    238238            return (1 - t) * (1 - t);
    239239        }
    240         var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);
    241         var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);
     240        const x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);
     241        const y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);
    242242        return {
    243243            x: x,
     
    246246    }
    247247    static getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
    248         var cosPsi = Math.cos(psi), sinPsi = Math.sin(psi);
    249         var pt = {
     248        const cosPsi = Math.cos(psi), sinPsi = Math.sin(psi);
     249        const pt = {
    250250            x: rx * Math.cos(theta),
    251251            y: ry * Math.sin(theta),
     
    260260            return [];
    261261        }
    262         var cs = data;
    263         var cc = [
     262        let cs = data;
     263        const cc = [
    264264            'm',
    265265            'M',
     
    287287            cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);
    288288        }
    289         var arr = cs.split('|');
    290         var ca = [];
    291         var coords = [];
    292         var cpx = 0;
    293         var cpy = 0;
    294         var re = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;
    295         var match;
     289        const arr = cs.split('|');
     290        const ca = [];
     291        const coords = [];
     292        let cpx = 0;
     293        let cpy = 0;
     294        const re = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;
     295        let match;
    296296        for (n = 1; n < arr.length; n++) {
    297             var str = arr[n];
    298             var c = str.charAt(0);
     297            let str = arr[n];
     298            let c = str.charAt(0);
    299299            str = str.slice(1);
    300300            coords.length = 0;
     
    302302                coords.push(match[0]);
    303303            }
    304             var p = [];
    305             for (var j = 0, jlen = coords.length; j < jlen; j++) {
     304            const p = [];
     305            for (let j = 0, jlen = coords.length; j < jlen; j++) {
    306306                if (coords[j] === '00') {
    307307                    p.push(0, 0);
    308308                    continue;
    309309                }
    310                 var parsed = parseFloat(coords[j]);
     310                const parsed = parseFloat(coords[j]);
    311311                if (!isNaN(parsed)) {
    312312                    p.push(parsed);
     
    320320                    break;
    321321                }
    322                 var cmd = '';
    323                 var points = [];
    324                 var startX = cpx, startY = cpy;
     322                let cmd = '';
     323                let points = [];
     324                const startX = cpx, startY = cpy;
    325325                var prevCmd, ctlPtx, ctlPty;
    326326                var rx, ry, psi, fa, fs, x1, y1;
     
    344344                        cmd = 'M';
    345345                        if (ca.length > 2 && ca[ca.length - 1].command === 'z') {
    346                             for (var idx = ca.length - 2; idx >= 0; idx--) {
     346                            for (let idx = ca.length - 2; idx >= 0; idx--) {
    347347                                if (ca[idx].command === 'M') {
    348348                                    cpx = ca[idx].points[0] + dx;
     
    511511    }
    512512    static calcLength(x, y, cmd, points) {
    513         var len, p1, p2, t;
    514         var path = Path;
     513        let len, p1, p2, t;
     514        const path = Path;
    515515        switch (cmd) {
    516516            case 'L':
     
    551551    }
    552552    static convertEndpointToCenterParameterization(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg) {
    553         var psi = psiDeg * (Math.PI / 180.0);
    554         var xp = (Math.cos(psi) * (x1 - x2)) / 2.0 + (Math.sin(psi) * (y1 - y2)) / 2.0;
    555         var yp = (-1 * Math.sin(psi) * (x1 - x2)) / 2.0 +
     553        const psi = psiDeg * (Math.PI / 180.0);
     554        const xp = (Math.cos(psi) * (x1 - x2)) / 2.0 + (Math.sin(psi) * (y1 - y2)) / 2.0;
     555        const yp = (-1 * Math.sin(psi) * (x1 - x2)) / 2.0 +
    556556            (Math.cos(psi) * (y1 - y2)) / 2.0;
    557         var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);
     557        const lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);
    558558        if (lambda > 1) {
    559559            rx *= Math.sqrt(lambda);
    560560            ry *= Math.sqrt(lambda);
    561561        }
    562         var f = Math.sqrt((rx * rx * (ry * ry) - rx * rx * (yp * yp) - ry * ry * (xp * xp)) /
     562        let f = Math.sqrt((rx * rx * (ry * ry) - rx * rx * (yp * yp) - ry * ry * (xp * xp)) /
    563563            (rx * rx * (yp * yp) + ry * ry * (xp * xp)));
    564564        if (fa === fs) {
     
    568568            f = 0;
    569569        }
    570         var cxp = (f * rx * yp) / ry;
    571         var cyp = (f * -ry * xp) / rx;
    572         var cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;
    573         var cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;
    574         var vMag = function (v) {
     570        const cxp = (f * rx * yp) / ry;
     571        const cyp = (f * -ry * xp) / rx;
     572        const cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;
     573        const cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;
     574        const vMag = function (v) {
    575575            return Math.sqrt(v[0] * v[0] + v[1] * v[1]);
    576576        };
    577         var vRatio = function (u, v) {
     577        const vRatio = function (u, v) {
    578578            return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));
    579579        };
    580         var vAngle = function (u, v) {
     580        const vAngle = function (u, v) {
    581581            return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));
    582582        };
    583         var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);
    584         var u = [(xp - cxp) / rx, (yp - cyp) / ry];
    585         var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];
    586         var dTheta = vAngle(u, v);
     583        const theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);
     584        const u = [(xp - cxp) / rx, (yp - cyp) / ry];
     585        const v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];
     586        let dTheta = vAngle(u, v);
    587587        if (vRatio(u, v) <= -1) {
    588588            dTheta = Math.PI;
  • imaps-frontend/node_modules/konva/lib/shapes/Rect.js

    rd565449 r0c6b92a  
    99class Rect extends Shape_1.Shape {
    1010    _sceneFunc(context) {
    11         var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();
     11        const cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();
    1212        context.beginPath();
    1313        if (!cornerRadius) {
  • imaps-frontend/node_modules/konva/lib/shapes/RegularPolygon.js

    rd565449 r0c6b92a  
    1111        context.beginPath();
    1212        context.moveTo(points[0].x, points[0].y);
    13         for (var n = 1; n < points.length; n++) {
     13        for (let n = 1; n < points.length; n++) {
    1414            context.lineTo(points[n].x, points[n].y);
    1515        }
     
    2121        const radius = this.attrs.radius || 0;
    2222        const points = [];
    23         for (var n = 0; n < sides; n++) {
     23        for (let n = 0; n < sides; n++) {
    2424            points.push({
    2525                x: radius * Math.sin((n * 2 * Math.PI) / sides),
     
    3131    getSelfRect() {
    3232        const points = this._getPoints();
    33         var minX = points[0].x;
    34         var maxX = points[0].y;
    35         var minY = points[0].x;
    36         var maxY = points[0].y;
     33        let minX = points[0].x;
     34        let maxX = points[0].y;
     35        let minY = points[0].x;
     36        let maxY = points[0].y;
    3737        points.forEach((point) => {
    3838            minX = Math.min(minX, point.x);
  • imaps-frontend/node_modules/konva/lib/shapes/Ring.js

    rd565449 r0c6b92a  
    66const Validators_1 = require("../Validators");
    77const Global_1 = require("../Global");
    8 var PIx2 = Math.PI * 2;
     8const PIx2 = Math.PI * 2;
    99class Ring extends Shape_1.Shape {
    1010    _sceneFunc(context) {
  • imaps-frontend/node_modules/konva/lib/shapes/Sprite.js

    rd565449 r0c6b92a  
    1212        this._updated = true;
    1313        this.anim = new Animation_1.Animation(() => {
    14             var updated = this._updated;
     14            const updated = this._updated;
    1515            this._updated = false;
    1616            return updated;
     
    3131    }
    3232    _sceneFunc(context) {
    33         var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), x = set[ix4 + 0], y = set[ix4 + 1], width = set[ix4 + 2], height = set[ix4 + 3], image = this.image();
     33        const anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), x = set[ix4 + 0], y = set[ix4 + 1], width = set[ix4 + 2], height = set[ix4 + 3], image = this.image();
    3434        if (this.hasFill() || this.hasStroke()) {
    3535            context.beginPath();
     
    4040        if (image) {
    4141            if (offsets) {
    42                 var offset = offsets[anim], ix2 = index * 2;
     42                const offset = offsets[anim], ix2 = index * 2;
    4343                context.drawImage(image, x, y, width, height, offset[ix2 + 0], offset[ix2 + 1], width, height);
    4444            }
     
    4949    }
    5050    _hitFunc(context) {
    51         var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), width = set[ix4 + 2], height = set[ix4 + 3];
     51        const anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), width = set[ix4 + 2], height = set[ix4 + 3];
    5252        context.beginPath();
    5353        if (offsets) {
    54             var offset = offsets[anim];
    55             var ix2 = index * 2;
     54            const offset = offsets[anim];
     55            const ix2 = index * 2;
    5656            context.rect(offset[ix2 + 0], offset[ix2 + 1], width, height);
    5757        }
     
    6666    }
    6767    _setInterval() {
    68         var that = this;
     68        const that = this;
    6969        this.interval = setInterval(function () {
    7070            that._updateIndex();
     
    7575            return;
    7676        }
    77         var layer = this.getLayer();
     77        const layer = this.getLayer();
    7878        this.anim.setLayers(layer);
    7979        this._setInterval();
     
    8888    }
    8989    _updateIndex() {
    90         var index = this.frameIndex(), animation = this.animation(), animations = this.animations(), anim = animations[animation], len = anim.length / 4;
     90        const index = this.frameIndex(), animation = this.animation(), animations = this.animations(), anim = animations[animation], len = anim.length / 4;
    9191        if (index < len - 1) {
    9292            this.frameIndex(index + 1);
  • imaps-frontend/node_modules/konva/lib/shapes/Star.js

    rd565449 r0c6b92a  
    88class Star extends Shape_1.Shape {
    99    _sceneFunc(context) {
    10         var innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();
     10        const innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();
    1111        context.beginPath();
    1212        context.moveTo(0, 0 - outerRadius);
    13         for (var n = 1; n < numPoints * 2; n++) {
    14             var radius = n % 2 === 0 ? outerRadius : innerRadius;
    15             var x = radius * Math.sin((n * Math.PI) / numPoints);
    16             var y = -1 * radius * Math.cos((n * Math.PI) / numPoints);
     13        for (let n = 1; n < numPoints * 2; n++) {
     14            const radius = n % 2 === 0 ? outerRadius : innerRadius;
     15            const x = radius * Math.sin((n * Math.PI) / numPoints);
     16            const y = -1 * radius * Math.cos((n * Math.PI) / numPoints);
    1717            context.lineTo(x, y);
    1818        }
  • imaps-frontend/node_modules/konva/lib/shapes/Text.d.ts

    rd565449 r0c6b92a  
    3838    getTextWidth(): number;
    3939    getTextHeight(): number;
    40     measureSize(text: any): {
    41         actualBoundingBoxAscent: any;
    42         actualBoundingBoxDescent: any;
    43         actualBoundingBoxLeft: any;
    44         actualBoundingBoxRight: any;
    45         alphabeticBaseline: any;
    46         emHeightAscent: any;
    47         emHeightDescent: any;
    48         fontBoundingBoxAscent: any;
    49         fontBoundingBoxDescent: any;
    50         hangingBaseline: any;
    51         ideographicBaseline: any;
    52         width: any;
     40    measureSize(text: string): {
     41        actualBoundingBoxAscent: number;
     42        actualBoundingBoxDescent: number;
     43        actualBoundingBoxLeft: number;
     44        actualBoundingBoxRight: number;
     45        alphabeticBaseline: number;
     46        emHeightAscent: number;
     47        emHeightDescent: number;
     48        fontBoundingBoxAscent: number;
     49        fontBoundingBoxDescent: number;
     50        hangingBaseline: number;
     51        ideographicBaseline: number;
     52        width: number;
    5353        height: number;
    5454    };
  • imaps-frontend/node_modules/konva/lib/shapes/Text.js

    rd565449 r0c6b92a  
    11"use strict";
    22Object.defineProperty(exports, "__esModule", { value: true });
    3 exports.Text = exports.stringToArray = void 0;
     3exports.Text = void 0;
     4exports.stringToArray = stringToArray;
    45const Util_1 = require("../Util");
    56const Factory_1 = require("../Factory");
     
    910const Global_2 = require("../Global");
    1011function stringToArray(string) {
    11     return Array.from(string);
    12 }
    13 exports.stringToArray = stringToArray;
    14 var AUTO = 'auto', CENTER = 'center', INHERIT = 'inherit', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', LTR = 'ltr', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', RTL = 'rtl', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [
     12    return [...string].reduce((acc, char, index, array) => {
     13        if (/\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?(?:\u200D\p{Emoji_Presentation})+/u.test(char)) {
     14            acc.push(char);
     15        }
     16        else if (/\p{Regional_Indicator}{2}/u.test(char + (array[index + 1] || ''))) {
     17            acc.push(char + array[index + 1]);
     18        }
     19        else if (index > 0 && /\p{Mn}|\p{Me}|\p{Mc}/u.test(char)) {
     20            acc[acc.length - 1] += char;
     21        }
     22        else {
     23            acc.push(char);
     24        }
     25        return acc;
     26    }, []);
     27}
     28const AUTO = 'auto', CENTER = 'center', INHERIT = 'inherit', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', RTL = 'rtl', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [
    1529    'direction',
    1630    'fontFamily',
     
    4357        .join(', ');
    4458}
    45 var dummyContext;
     59let dummyContext;
    4660function getDummyContext() {
    4761    if (dummyContext) {
     
    7286        this._partialTextX = 0;
    7387        this._partialTextY = 0;
    74         for (var n = 0; n < attrChangeListLen; n++) {
     88        for (let n = 0; n < attrChangeListLen; n++) {
    7589            this.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, this._setTextData);
    7690        }
     
    7892    }
    7993    _sceneFunc(context) {
    80         var textArr = this.textArr, textArrLen = textArr.length;
     94        const textArr = this.textArr, textArrLen = textArr.length;
    8195        if (!this.text()) {
    8296            return;
    8397        }
    84         var padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, verticalAlign = this.verticalAlign(), direction = this.direction(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;
     98        let padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, verticalAlign = this.verticalAlign(), direction = this.direction(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;
    8599        direction = direction === INHERIT ? context.direction : direction;
    86         var translateY = lineHeightPx / 2;
    87         var baseline = MIDDLE;
     100        let translateY = lineHeightPx / 2;
     101        let baseline = MIDDLE;
    88102        if (Global_1.Konva._fixTextRendering) {
    89             var metrics = this.measureSize('M');
     103            const metrics = this.measureSize('M');
    90104            baseline = 'alphabetic';
    91105            translateY =
     
    122136                context.save();
    123137                context.beginPath();
    124                 let yOffset = Global_1.Konva._fixTextRendering
     138                const yOffset = Global_1.Konva._fixTextRendering
    125139                    ? Math.round(fontSize / 4)
    126140                    : Math.round(fontSize / 2);
     
    142156                context.save();
    143157                context.beginPath();
    144                 let yOffset = Global_1.Konva._fixTextRendering ? -Math.round(fontSize / 4) : 0;
     158                const yOffset = Global_1.Konva._fixTextRendering ? -Math.round(fontSize / 4) : 0;
    145159                context.moveTo(lineTranslateX, translateY + lineTranslateY + yOffset);
    146160                spacesNumber = text.split(' ').length - 1;
     
    159173            if (direction !== RTL && (letterSpacing !== 0 || align === JUSTIFY)) {
    160174                spacesNumber = text.split(' ').length - 1;
    161                 var array = stringToArray(text);
    162                 for (var li = 0; li < array.length; li++) {
    163                     var letter = array[li];
     175                const array = stringToArray(text);
     176                for (let li = 0; li < array.length; li++) {
     177                    const letter = array[li];
    164178                    if (letter === ' ' && !lastLine && align === JUSTIFY) {
    165179                        lineTranslateX += (totalWidth - padding * 2 - width) / spacesNumber;
     
    188202    }
    189203    _hitFunc(context) {
    190         var width = this.getWidth(), height = this.getHeight();
     204        const width = this.getWidth(), height = this.getHeight();
    191205        context.beginPath();
    192206        context.rect(0, 0, width, height);
     
    195209    }
    196210    setText(text) {
    197         var str = Util_1.Util._isString(text)
     211        const str = Util_1.Util._isString(text)
    198212            ? text
    199213            : text === null || text === undefined
     
    204218    }
    205219    getWidth() {
    206         var isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;
     220        const isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;
    207221        return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;
    208222    }
    209223    getHeight() {
    210         var isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;
     224        const isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;
    211225        return isAuto
    212226            ? this.fontSize() * this.textArr.length * this.lineHeight() +
     
    223237    measureSize(text) {
    224238        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
    225         var _context = getDummyContext(), fontSize = this.fontSize(), metrics;
     239        let _context = getDummyContext(), fontSize = this.fontSize(), metrics;
    226240        _context.save();
    227241        _context.font = this._getContextFont();
     
    258272            line = line.trim();
    259273        }
    260         var width = this._getTextWidth(line);
     274        const width = this._getTextWidth(line);
    261275        return this.textArr.push({
    262276            text: line,
     
    266280    }
    267281    _getTextWidth(text) {
    268         var letterSpacing = this.letterSpacing();
    269         var length = text.length;
     282        const letterSpacing = this.letterSpacing();
     283        const length = text.length;
    270284        return (getDummyContext().measureText(text).width +
    271285            (length ? letterSpacing * (length - 1) : 0));
    272286    }
    273287    _setTextData() {
    274         var lines = this.text().split('\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();
     288        let lines = this.text().split('\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();
    275289        this.textArr = [];
    276290        getDummyContext().font = this._getContextFont();
    277         var additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;
    278         for (var i = 0, max = lines.length; i < max; ++i) {
    279             var line = lines[i];
    280             var lineWidth = this._getTextWidth(line);
     291        const additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;
     292        for (let i = 0, max = lines.length; i < max; ++i) {
     293            let line = lines[i];
     294            let lineWidth = this._getTextWidth(line);
    281295            if (fixedWidth && lineWidth > maxWidth) {
    282296                while (line.length > 0) {
    283                     var low = 0, high = line.length, match = '', matchWidth = 0;
     297                    let low = 0, high = line.length, match = '', matchWidth = 0;
    284298                    while (low < high) {
    285                         var mid = (low + high) >>> 1, substr = line.slice(0, mid + 1), substrWidth = this._getTextWidth(substr) + additionalWidth;
     299                        const mid = (low + high) >>> 1, substr = line.slice(0, mid + 1), substrWidth = this._getTextWidth(substr) + additionalWidth;
    286300                        if (substrWidth <= maxWidth) {
    287301                            low = mid + 1;
     
    296310                        if (wrapAtWord) {
    297311                            var wrapIndex;
    298                             var nextChar = line[match.length];
    299                             var nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;
     312                            const nextChar = line[match.length];
     313                            const nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;
    300314                            if (nextIsSpaceOrDash && matchWidth <= maxWidth) {
    301315                                wrapIndex = match.length;
     
    316330                        textWidth = Math.max(textWidth, matchWidth);
    317331                        currentHeightPx += lineHeightPx;
    318                         var shouldHandleEllipsis = this._shouldHandleEllipsis(currentHeightPx);
     332                        const shouldHandleEllipsis = this._shouldHandleEllipsis(currentHeightPx);
    319333                        if (shouldHandleEllipsis) {
    320334                            this._tryToAddEllipsisToLastLine();
     
    357371    }
    358372    _shouldHandleEllipsis(currentHeightPx) {
    359         var fontSize = +this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, height = this.attrs.height, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxHeightPx = height - padding * 2, wrap = this.wrap(), shouldWrap = wrap !== NONE;
     373        const fontSize = +this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, height = this.attrs.height, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxHeightPx = height - padding * 2, wrap = this.wrap(), shouldWrap = wrap !== NONE;
    360374        return (!shouldWrap ||
    361375            (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx));
    362376    }
    363377    _tryToAddEllipsisToLastLine() {
    364         var width = this.attrs.width, fixedWidth = width !== AUTO && width !== undefined, padding = this.padding(), maxWidth = width - padding * 2, shouldAddEllipsis = this.ellipsis();
    365         var lastLine = this.textArr[this.textArr.length - 1];
     378        const width = this.attrs.width, fixedWidth = width !== AUTO && width !== undefined, padding = this.padding(), maxWidth = width - padding * 2, shouldAddEllipsis = this.ellipsis();
     379        const lastLine = this.textArr[this.textArr.length - 1];
    366380        if (!lastLine || !shouldAddEllipsis) {
    367381            return;
    368382        }
    369383        if (fixedWidth) {
    370             var haveSpace = this._getTextWidth(lastLine.text + ELLIPSIS) < maxWidth;
     384            const haveSpace = this._getTextWidth(lastLine.text + ELLIPSIS) < maxWidth;
    371385            if (!haveSpace) {
    372386                lastLine.text = lastLine.text.slice(0, lastLine.text.length - 3);
  • imaps-frontend/node_modules/konva/lib/shapes/TextPath.d.ts

    rd565449 r0c6b92a  
    2929    _getTextPathLength(): number;
    3030    _getPointAtLength(length: number): {
    31         x: any;
    32         y: any;
     31        x: number;
     32        y: number;
    3333    } | null;
    3434    _readDataAttribute(): void;
  • imaps-frontend/node_modules/konva/lib/shapes/TextPath.js

    rd565449 r0c6b92a  
    99const Validators_1 = require("../Validators");
    1010const Global_1 = require("../Global");
    11 var EMPTY_STRING = '', NORMAL = 'normal';
     11const EMPTY_STRING = '', NORMAL = 'normal';
    1212function _fillFunc(context) {
    1313    context.fillText(this.partialText, 0, 0);
     
    5151        context.setAttr('textAlign', 'left');
    5252        context.save();
    53         var textDecoration = this.textDecoration();
    54         var fill = this.fill();
    55         var fontSize = this.fontSize();
    56         var glyphInfo = this.glyphInfo;
     53        const textDecoration = this.textDecoration();
     54        const fill = this.fill();
     55        const fontSize = this.fontSize();
     56        const glyphInfo = this.glyphInfo;
    5757        if (textDecoration === 'underline') {
    5858            context.beginPath();
    5959        }
    60         for (var i = 0; i < glyphInfo.length; i++) {
     60        for (let i = 0; i < glyphInfo.length; i++) {
    6161            context.save();
    62             var p0 = glyphInfo[i].p0;
     62            const p0 = glyphInfo[i].p0;
    6363            context.translate(p0.x, p0.y);
    6464            context.rotate(glyphInfo[i].rotation);
     
    8282    _hitFunc(context) {
    8383        context.beginPath();
    84         var glyphInfo = this.glyphInfo;
     84        const glyphInfo = this.glyphInfo;
    8585        if (glyphInfo.length >= 1) {
    86             var p0 = glyphInfo[0].p0;
     86            const p0 = glyphInfo[0].p0;
    8787            context.moveTo(p0.x, p0.y);
    8888        }
    89         for (var i = 0; i < glyphInfo.length; i++) {
    90             var p1 = glyphInfo[i].p1;
     89        for (let i = 0; i < glyphInfo.length; i++) {
     90            const p1 = glyphInfo[i].p1;
    9191            context.lineTo(p1.x, p1.y);
    9292        }
     
    109109    }
    110110    _getTextSize(text) {
    111         var dummyCanvas = this.dummyCanvas;
    112         var _context = dummyCanvas.getContext('2d');
     111        const dummyCanvas = this.dummyCanvas;
     112        const _context = dummyCanvas.getContext('2d');
    113113        _context.save();
    114114        _context.font = this._getContextFont();
    115         var metrics = _context.measureText(text);
     115        const metrics = _context.measureText(text);
    116116        _context.restore();
    117117        return {
     
    141141        const charArr = (0, Text_1.stringToArray)(this.text());
    142142        let offsetToGlyph = offset;
    143         for (var i = 0; i < charArr.length; i++) {
     143        for (let i = 0; i < charArr.length; i++) {
    144144            const charStartPoint = this._getPointAtLength(offsetToGlyph);
    145145            if (!charStartPoint)
     
    188188            };
    189189        }
    190         var points = [];
     190        const points = [];
    191191        this.glyphInfo.forEach(function (info) {
    192192            points.push(info.p0.x);
     
    195195            points.push(info.p1.y);
    196196        });
    197         var minX = points[0] || 0;
    198         var maxX = points[0] || 0;
    199         var minY = points[1] || 0;
    200         var maxY = points[1] || 0;
    201         var x, y;
    202         for (var i = 0; i < points.length / 2; i++) {
     197        let minX = points[0] || 0;
     198        let maxX = points[0] || 0;
     199        let minY = points[1] || 0;
     200        let maxY = points[1] || 0;
     201        let x, y;
     202        for (let i = 0; i < points.length / 2; i++) {
    203203            x = points[i * 2];
    204204            y = points[i * 2 + 1];
     
    208208            maxY = Math.max(maxY, y);
    209209        }
    210         var fontSize = this.fontSize();
     210        const fontSize = this.fontSize();
    211211        return {
    212212            x: minX - fontSize / 2,
  • imaps-frontend/node_modules/konva/lib/shapes/Transformer.d.ts

    rd565449 r0c6b92a  
    9595        attrs: any;
    9696        className: string;
    97         children?: any[] | undefined;
     97        children?: Array<any>;
    9898    };
    9999    clone(obj?: any): this;
  • imaps-frontend/node_modules/konva/lib/shapes/Transformer.js

    rd565449 r0c6b92a  
    1111const Validators_1 = require("../Validators");
    1212const Global_2 = require("../Global");
    13 var EVENTS_NAME = 'tr-konva';
    14 var ATTR_CHANGE_LIST = [
     13const EVENTS_NAME = 'tr-konva';
     14const ATTR_CHANGE_LIST = [
    1515    'resizeEnabledChange',
    1616    'rotateAnchorOffsetChange',
     
    3131    .map((e) => e + `.${EVENTS_NAME}`)
    3232    .join(' ');
    33 var NODES_RECT = 'nodesRect';
    34 var TRANSFORM_CHANGE_STR = [
     33const NODES_RECT = 'nodesRect';
     34const TRANSFORM_CHANGE_STR = [
    3535    'widthChange',
    3636    'heightChange',
     
    4545    'strokeWidthChange',
    4646];
    47 var ANGLES = {
     47const ANGLES = {
    4848    'top-left': -45,
    4949    'top-center': 0,
     
    6161    }
    6262    rad += Util_1.Util.degToRad(ANGLES[anchorName] || 0);
    63     var angle = ((Util_1.Util.radToDeg(rad) % 360) + 360) % 360;
     63    const angle = ((Util_1.Util.radToDeg(rad) % 360) + 360) % 360;
    6464    if (Util_1.Util._inRange(angle, 315 + 22.5, 360) || Util_1.Util._inRange(angle, 0, 22.5)) {
    6565        return 'ns-resize';
     
    9191    }
    9292}
    93 var ANCHORS_NAMES = [
     93const ANCHORS_NAMES = [
    9494    'top-left',
    9595    'top-center',
     
    101101    'bottom-right',
    102102];
    103 var MAX_SAFE_INTEGER = 100000000;
     103const MAX_SAFE_INTEGER = 100000000;
    104104function getCenter(shape) {
    105105    return {
     
    208208        });
    209209        this._resetTransformCache();
    210         var elementsCreated = !!this.findOne('.top-left');
     210        const elementsCreated = !!this.findOne('.top-left');
    211211        if (elementsCreated) {
    212212            this.update();
     
    270270    }
    271271    __getNodeShape(node, rot = this.rotation(), relative) {
    272         var rect = node.getClientRect({
     272        const rect = node.getClientRect({
    273273            skipTransform: true,
    274274            skipShadow: true,
    275275            skipStroke: this.ignoreStroke(),
    276276        });
    277         var absScale = node.getAbsoluteScale(relative);
    278         var absPos = node.getAbsolutePosition(relative);
    279         var dx = rect.x * absScale.x - node.offsetX() * absScale.x;
    280         var dy = rect.y * absScale.y - node.offsetY() * absScale.y;
     277        const absScale = node.getAbsoluteScale(relative);
     278        const absPos = node.getAbsolutePosition(relative);
     279        const dx = rect.x * absScale.x - node.offsetX() * absScale.x;
     280        const dy = rect.y * absScale.y - node.offsetY() * absScale.y;
    281281        const rotation = (Global_1.Konva.getAngle(node.getAbsoluteRotation()) + Math.PI * 2) %
    282282            (Math.PI * 2);
     
    294294    }
    295295    __getNodeRect() {
    296         var node = this.getNode();
     296        const node = this.getNode();
    297297        if (!node) {
    298298            return {
     
    311311                skipStroke: this.ignoreStroke(),
    312312            });
    313             var points = [
     313            const points = [
    314314                { x: box.x, y: box.y },
    315315                { x: box.x + box.width, y: box.y },
     
    317317                { x: box.x, y: box.y + box.height },
    318318            ];
    319             var trans = node.getAbsoluteTransform();
     319            const trans = node.getAbsoluteTransform();
    320320            points.forEach(function (point) {
    321                 var transformed = trans.point(point);
     321                const transformed = trans.point(point);
    322322                totalPoints.push(transformed);
    323323            });
     
    325325        const tr = new Util_1.Transform();
    326326        tr.rotate(-Global_1.Konva.getAngle(this.rotation()));
    327         var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
     327        let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
    328328        totalPoints.forEach(function (point) {
    329             var transformed = tr.point(point);
     329            const transformed = tr.point(point);
    330330            if (minX === undefined) {
    331331                minX = maxX = transformed.x;
     
    367367    }
    368368    _createAnchor(name) {
    369         var anchor = new Rect_1.Rect({
     369        const anchor = new Rect_1.Rect({
    370370            stroke: 'rgb(0, 161, 255)',
    371371            fill: 'white',
     
    376376            hitStrokeWidth: TOUCH_DEVICE ? 10 : 'auto',
    377377        });
    378         var self = this;
     378        const self = this;
    379379        anchor.on('mousedown touchstart', function (e) {
    380380            self._handleMouseDown(e);
     
    388388        });
    389389        anchor.on('mouseenter', () => {
    390             var rad = Global_1.Konva.getAngle(this.rotation());
    391             var rotateCursor = this.rotateAnchorCursor();
    392             var cursor = getCursor(name, rad, rotateCursor);
     390            const rad = Global_1.Konva.getAngle(this.rotation());
     391            const rotateCursor = this.rotateAnchorCursor();
     392            const cursor = getCursor(name, rad, rotateCursor);
    393393            anchor.getStage().content &&
    394394                (anchor.getStage().content.style.cursor = cursor);
     
    403403    }
    404404    _createBack() {
    405         var back = new Shape_1.Shape({
     405        const back = new Shape_1.Shape({
    406406            name: 'back',
    407407            width: 0,
     
    409409            draggable: true,
    410410            sceneFunc(ctx, shape) {
    411                 var tr = shape.getParent();
    412                 var padding = tr.padding();
     411                const tr = shape.getParent();
     412                const padding = tr.padding();
    413413                ctx.beginPath();
    414414                ctx.rect(-padding, -padding, shape.width() + padding * 2, shape.height() + padding * 2);
     
    423423                    return;
    424424                }
    425                 var padding = this.padding();
     425                const padding = this.padding();
    426426                ctx.beginPath();
    427427                ctx.rect(-padding, -padding, shape.width() + padding * 2, shape.height() + padding * 2);
     
    449449        }
    450450        this._movingAnchorName = e.target.name().split(' ')[0];
    451         var attrs = this._getNodeRect();
    452         var width = attrs.width;
    453         var height = attrs.height;
    454         var hypotenuse = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));
     451        const attrs = this._getNodeRect();
     452        const width = attrs.width;
     453        const height = attrs.height;
     454        const hypotenuse = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));
    455455        this.sin = Math.abs(height / hypotenuse);
    456456        this.cos = Math.abs(width / hypotenuse);
     
    462462        }
    463463        this._transforming = true;
    464         var ap = e.target.getAbsolutePosition();
    465         var pos = e.target.getStage().getPointerPosition();
     464        const ap = e.target.getAbsolutePosition();
     465        const pos = e.target.getStage().getPointerPosition();
    466466        this._anchorDragOffset = {
    467467            x: pos.x - ap.x,
     
    475475    }
    476476    _handleMouseMove(e) {
    477         var x, y, newHypotenuse;
    478         var anchorNode = this.findOne('.' + this._movingAnchorName);
    479         var stage = anchorNode.getStage();
     477        let x, y, newHypotenuse;
     478        const anchorNode = this.findOne('.' + this._movingAnchorName);
     479        const stage = anchorNode.getStage();
    480480        stage.setPointersPositions(e);
    481481        const pp = stage.getPointerPosition();
     
    494494        }
    495495        if (this._movingAnchorName === 'rotater') {
    496             var attrs = this._getNodeRect();
     496            const attrs = this._getNodeRect();
    497497            x = anchorNode.x() - attrs.width / 2;
    498498            y = -anchorNode.y() + attrs.height / 2;
     
    501501                delta -= Math.PI;
    502502            }
    503             var oldRotation = Global_1.Konva.getAngle(this.rotation());
     503            const oldRotation = Global_1.Konva.getAngle(this.rotation());
    504504            const newRotation = oldRotation + delta;
    505505            const tol = Global_1.Konva.getAngle(this.rotationSnapTolerance());
     
    510510            return;
    511511        }
    512         var shiftBehavior = this.shiftBehavior();
    513         var keepProportion;
     512        const shiftBehavior = this.shiftBehavior();
     513        let keepProportion;
    514514        if (shiftBehavior === 'inverted') {
    515515            keepProportion = this.keepRatio() && !e.shiftKey;
     
    630630        var centeredScaling = this.centeredScaling() || e.altKey;
    631631        if (centeredScaling) {
    632             var topLeft = this.findOne('.top-left');
    633             var bottomRight = this.findOne('.bottom-right');
    634             var topOffsetX = topLeft.x();
    635             var topOffsetY = topLeft.y();
    636             var bottomOffsetX = this.getWidth() - bottomRight.x();
    637             var bottomOffsetY = this.getHeight() - bottomRight.y();
     632            const topLeft = this.findOne('.top-left');
     633            const bottomRight = this.findOne('.bottom-right');
     634            const topOffsetX = topLeft.x();
     635            const topOffsetY = topLeft.y();
     636            const bottomOffsetX = this.getWidth() - bottomRight.x();
     637            const bottomOffsetY = this.getHeight() - bottomRight.y();
    638638            bottomRight.move({
    639639                x: -topOffsetX,
     
    645645            });
    646646        }
    647         var absPos = this.findOne('.top-left').getAbsolutePosition();
     647        const absPos = this.findOne('.top-left').getAbsolutePosition();
    648648        x = absPos.x;
    649649        y = absPos.y;
    650         var width = this.findOne('.bottom-right').x() - this.findOne('.top-left').x();
    651         var height = this.findOne('.bottom-right').y() - this.findOne('.top-left').y();
     650        const width = this.findOne('.bottom-right').x() - this.findOne('.top-left').x();
     651        const height = this.findOne('.bottom-right').y() - this.findOne('.top-left').y();
    652652        this._fitNodesInto({
    653653            x: x,
     
    674674                window.removeEventListener('touchend', this._handleMouseUp, true);
    675675            }
    676             var node = this.getNode();
     676            const node = this.getNode();
    677677            activeTransformersCount--;
    678678            this._fire('transformend', { evt: e, target: node });
     
    689689    }
    690690    _fitNodesInto(newAttrs, evt) {
    691         var oldAttrs = this._getNodeRect();
     691        const oldAttrs = this._getNodeRect();
    692692        const minSize = 1;
    693693        if (Util_1.Util._inRange(newAttrs.width, -this.padding() * 2 - minSize, minSize)) {
     
    699699            return;
    700700        }
    701         var t = new Util_1.Transform();
     701        const t = new Util_1.Transform();
    702702        t.rotate(Global_1.Konva.getAngle(this.rotation()));
    703703        if (this._movingAnchorName &&
     
    816816    update() {
    817817        var _a;
    818         var attrs = this._getNodeRect();
     818        const attrs = this._getNodeRect();
    819819        this.rotation(Util_1.Util._getRotation(attrs.rotation));
    820         var width = attrs.width;
    821         var height = attrs.height;
    822         var enabledAnchors = this.enabledAnchors();
    823         var resizeEnabled = this.resizeEnabled();
    824         var padding = this.padding();
    825         var anchorSize = this.anchorSize();
     820        const width = attrs.width;
     821        const height = attrs.height;
     822        const enabledAnchors = this.enabledAnchors();
     823        const resizeEnabled = this.resizeEnabled();
     824        const padding = this.padding();
     825        const anchorSize = this.anchorSize();
    826826        const anchors = this.find('._anchor');
    827827        anchors.forEach((node) => {
     
    918918        if (this._transforming) {
    919919            this._removeEvents();
    920             var anchorNode = this.findOne('.' + this._movingAnchorName);
     920            const anchorNode = this.findOne('.' + this._movingAnchorName);
    921921            if (anchorNode) {
    922922                anchorNode.stopDrag();
     
    937937    }
    938938    clone(obj) {
    939         var node = Node_1.Node.prototype.clone.call(this, obj);
     939        const node = Node_1.Node.prototype.clone.call(this, obj);
    940940        return node;
    941941    }
Note: See TracChangeset for help on using the changeset viewer.