UNPKG

vsm-box

Version:

Webcomponent for building and showing a VSM-sentence

5 lines 124 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VsmBox=e():t.VsmBox=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=34)}([function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var s=(r=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),o=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[n].concat(o).concat([s]).join("\n")}var r;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},s=0;s<this.length;s++){var o=this[s][0];null!=o&&(i[o]=!0)}for(s=0;s<t.length;s++){var r=t[s];null!=r[0]&&i[r[0]]||(n&&!r[2]?r[2]=n:n&&(r[2]="("+r[2]+") and ("+n+")"),e.push(r))}},e}},function(t,e,n){var i,s,o={},r=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===s&&(s=i.apply(this,arguments)),s}),a=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var i=a.call(this,t,n);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}}(),c=null,u=0,h=[],d=n(15);function p(t,e){for(var n=0;n<t.length;n++){var i=t[n],s=o[i.id];if(s){s.refs++;for(var r=0;r<s.parts.length;r++)s.parts[r](i.parts[r]);for(;r<i.parts.length;r++)s.parts.push(g(i.parts[r],e))}else{var a=[];for(r=0;r<i.parts.length;r++)a.push(g(i.parts[r],e));o[i.id]={id:i.id,refs:1,parts:a}}}}function f(t,e){for(var n=[],i={},s=0;s<t.length;s++){var o=t[s],r=e.base?o[0]+e.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};i[r]?i[r].parts.push(a):n.push(i[r]={id:r,parts:[a]})}return n}function m(t,e){var n=l(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=h[h.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),h.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var s=l(t.insertAt.before,n);n.insertBefore(e,s)}}function y(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=h.indexOf(t);e>=0&&h.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var i=function(){0;return n.nc}();i&&(t.attrs.nonce=i)}return b(e,t.attrs),m(t,e),e}function b(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,i,s,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var r=u++;n=c||(c=v(e)),i=k.bind(null,n,r,!1),s=k.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),m(t,e),e}(e),i=T.bind(null,n,e),s=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(e),i=w.bind(null,n),s=function(){y(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else s()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return p(n,e),function(t){for(var i=[],s=0;s<n.length;s++){var r=n[s];(a=o[r.id]).refs--,i.push(a)}t&&p(f(t,e),e);for(s=0;s<i.length;s++){var a;if(0===(a=i[s]).refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete o[a.id]}}}};var C,x=(C=[],function(t,e){return C[t]=e,C.filter(Boolean).join("\n")});function k(t,e,n,i){var s=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=x(e,s);else{var o=document.createTextNode(s),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(o,r[e]):t.appendChild(o)}}function w(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function T(t,e,n){var i=n.css,s=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&s;(e.convertToAbsoluteUrls||o)&&(i=d(i)),s&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */");var r=new Blob([i],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(r),a&&URL.revokeObjectURL(a)}},function(t,e){var n=/^([bisu])(?:(\d+)(?:-(\d+))?)?$/,i={b:"b",i:"i",s:"sub",u:"sup"};function s(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}t.exports=function(t,e,o){if(!e||"string"!=typeof e)return s(t);if(e.includes("<"))return e;var r=e.split(";"),a=Array.from({length:t.length+1},()=>""),l=(o?" "+o:"")+">";return r.forEach(e=>{var s=e.match(n);if(s){var[,o,r,c]=s;if(o=i[o],void 0===r?(r=0,c=t.length):void 0===c&&(c=Number(r)+1),r=Number(r),(c=Number(c))<r){var u=r;r=c,c=u}if(!(r>=t.length)){c=Math.min(c,t.length);var h="<"+o+l,d="</"+o+">";a[r]=a[r]+h;for(var p=r+1;p<c;p++)""!=a[p]&&(a[p]=d+a[p]+h);a[c]=d+a[c]}}}),t.split("").map((t,e)=>a[e]+s(t)).join("")+a[t.length]}},function(t,e,n){var i=n(14);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(17);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(19);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(21);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(23);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(25);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(27);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(29);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(31);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){var i=n(33);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n(1)(i,s);i.locals&&(t.exports=i.locals)},function(t,e,n){"use strict";var i=n(3);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,"\n.conns[data-v-9e1325b0] {\n box-sizing: border-box;\n padding: 0;\n background-color: #fbfbfb;\n}\n\n/* This seems to prevent the problem of sometimes not receiving a 'mouseleave',\n which could leave a connector highlighted after the mouse left TheConns. */\n.conns *[data-v-9e1325b0] {\n pointer-events: none;\n}\n.conns g.conn-remove-icon[data-v-9e1325b0]:not([class*=\"fade-leave\"]) {\n pointer-events: auto;\n}\n.fade-enter[data-v-9e1325b0]:not(.pos-highlight),\n.fade-leave-to[data-v-9e1325b0] {\n opacity: 0;\n}\n.fade-enter-active[data-v-9e1325b0]:not(.pos-highlight) {\n transition: opacity 0.08s ease-in;\n}\n.fade-enter-active.conn-remove-icon[data-v-9e1325b0] {\n transition-duration: 0.16s;\n}\n.fade-leave-active[data-v-9e1325b0] {\n transition: opacity 0.14s ease-in;\n}\n",""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var s,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(s=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(s)+")")}))}},function(t,e,n){"use strict";var i=n(4);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,"\n.input-wrap[data-v-819a3320] {\n position: relative;\n}\n.input-wrap[data-v-819a3320],\n.input[data-v-819a3320] { /* The $-marked ones undo the automatic 'user agent stylesheets' */\n width: 100%;\n height: 100%;\n padding: 0; /* $ */\n font: inherit; /* $ */\n font-size: 13px; /* Larger than the ListItems. */\n color: #000;\n cursor: text;\n background-color: #fff;\n border: 0; /* $ */\n outline: none; /* $ */\n box-shadow: none; /* $ */\n}\n.placehold[data-v-819a3320] {\n position: absolute;\n top: 0;\n left: 0;\n color: #aaa;\n pointer-events: none;\n transition: 0.2s ease all;\n}\n.placehold.focus[data-v-819a3320] {\n top: -2px;\n left: 2px;\n font-size: 10px;\n color: #ccc;\n opacity: 1;\n}\n.placehold.hidden[data-v-819a3320] {\n display: none;\n}\n.error[data-v-819a3320] {\n background-color: #ffe8e8;\n}\n",""])},function(t,e,n){"use strict";var i=n(5);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,"\n.item-part-str[data-v-0e6a8568] {\n font-weight: bold;\n}\n.item-part-descr[data-v-0e6a8568] {\n padding-left: 4px;\n}\n.item-part-info[data-v-0e6a8568] {\n padding-left: 5px;\n}\n.item-part-extra[data-v-0e6a8568] {\n padding-left: 4px;\n}\n.item > .item-part-str[data-v-0e6a8568] {\n color: #3b5998;\n}\n.item > .item-part-descr[data-v-0e6a8568] {\n color: #222;\n}\n.item > .item-part-info[data-v-0e6a8568] {\n color: #aaa;\n}\n",""])},function(t,e,n){"use strict";var i=n(6);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,'\n.item-type-literal[data-v-b1fa2252] {\n padding-left: 11px;\n font-weight: bold;\n}\n.item.item-type-literal[data-v-b1fa2252] {\n color: #929292;\n}\n.item-type-literal[data-v-b1fa2252]::after {\n margin-left: 4px;\n content: "▸";\n}\n',""])},function(t,e,n){"use strict";var i=n(7);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,"\n.list[data-v-1938b968] {\n position: absolute;\n z-index: 2;\n display: block;\n min-width: 320px;\n margin: 4px 0 0 -4px;\n line-height: 14px; /* Prevents special chars from making ListItems higher. */\n cursor: default;\n background-color: #fff;\n border: 1px solid #999;\n}\n.item[data-v-1938b968] {\n padding: 2px 3px 3px 4px;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border: 0 solid #fff;\n border-width: 1px 0;\n}\n.item-pos-first[data-v-1938b968] {\n margin-top: 2px;\n}\n.item-pos-last[data-v-1938b968] {\n margin-bottom: 2px;\n}\n.item-type-number[data-v-1938b968],\n.item-type-ref[data-v-1938b968],\n.item-type-fixed[data-v-1938b968],\n.item-type-fixed-last[data-v-1938b968] {\n background-color: #f4f4f4;\n border-color: #f4f4f4;\n}\n.item-type-number[data-v-1938b968],\n.item-type-ref[data-v-1938b968],\n.item-type-fixed-last[data-v-1938b968] {\n border-bottom-color: #ddd;\n}\n.item-type-literal[data-v-1938b968] {\n background-color: #fcfcfc;\n border-top-color: #ddd;\n border-bottom-color: #fcfcfc;\n}\n.item-state-active[data-v-1938b968] {\n background-color: #e6ebf4;\n border-color: #ced6ea;\n}\n.item-type-literal.item-state-active[data-v-1938b968] {\n background-color: #e6ebf4;\n border-top-color: #c9d1e7;\n border-bottom-color: #e6ebf4;\n}\n",""])},function(t,e,n){"use strict";var i=n(8);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,"\n.spinner[data-v-9aab1482] {\n position: absolute;\n z-index: 3;\n display: block;\n width: 9px;\n height: 9px;\n margin: 9px 0 0 0;\n pointer-events: none;\n border: 2px solid;\n border-color: #ccc transparent #ccc transparent;\n border-radius: 50%;\n animation: spinning-data-v-9aab1482 1.2s linear infinite;\n}\n.spinner.list-closed[data-v-9aab1482] {\n margin-top: 6px;\n}\n.fade-enter-active[data-v-9aab1482] {\n transition: opacity 0.5s;\n transition-delay: 10ms;\n}\n.fade-enter[data-v-9aab1482],\n.fade-leave[data-v-9aab1482], \n.fade-leave-to[data-v-9aab1482] {\n opacity: 0;\n}\n@keyframes spinning-data-v-9aab1482 {\n0% { transform: rotate(0deg);\n}\n100% { transform: rotate(360deg);\n}\n}\n",""])},function(t,e,n){"use strict";var i=n(9);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,'\n.vsm-autocomplete[data-v-7667f44a] {\n overflow: hidden;\n font-size: 11px;\n}\n.vsm-autocomplete[data-v-7667f44a],\n.input[data-v-7667f44a] {\n font-family: "lucida grande", tahoma, verdana, arial, sans-serif;\n}\n',""])},function(t,e,n){"use strict";var i=n(10);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,'\n.popup[data-v-a3f7a6e6],\n.arrow[data-v-a3f7a6e6],\n.arrow-inner[data-v-a3f7a6e6],\n.hover-extend[data-v-a3f7a6e6] {\n position: absolute;\n display: block;\n line-height: normal;\n cursor: default;\n}\n.popup[data-v-a3f7a6e6] {\n z-index: 4; /* This places it above any Term\'s TheList and TheSpinner */\n width: 240px;\n margin-top: 8px;\n border: 1px solid #c4c4c4;\n box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);\n}\n.hover-extend[data-v-a3f7a6e6] {\n /* Put all `.ext*` elem.s\' coo.-origin back at Term\'s bottom-left corner: */\n margin-top: -9px; /* Equals `.arrow-inner`\'s `top` */\n margin-left: -1px; /* Equals `.popup`\'s `border-left-width` */\n background-color: transparent;\n}\n.ext3[data-v-a3f7a6e6] { /* => No \'mouseleave\' from the visual gap between popup & Terms */\n width: 100%; /* Fallback */\n width: calc(100% + 2px); /* Adds `.popup`\'s left&right border */\n height: 9px; /* Equals: minus `.arrow`\'s `top` */\n\n /* Note: `.ext1/2` => Same for gap between Term\'s left/right neighbor */\n}\n.arrow[data-v-a3f7a6e6],\n.arrow-inner[data-v-a3f7a6e6] {\n top: -9px;\n left: 1px;\n width: 0;\n height: 0;\n border-right: 9px solid transparent;\n border-bottom: 9px solid #c4c4c4; /* Equals `.popup`\'s `border-color` */\n border-left: 9px solid transparent;\n}\n.arrow-inner[data-v-a3f7a6e6] {\n top: -7.5px; /* A bit below `.arrow` => only `.arrow`\'s top-borders show */\n left: 2.5px;\n border-width: 0 7.5px 7.5px 7.5px; /* Make it not overlap `.content` */\n border-bottom-color: #fff; /* Equals `.content`\'s `background-color` */\n}\n.arrow-inner.no-info-panel[data-v-a3f7a6e6] {\n border-bottom-color: #f6f6f6; /* Equals `.menu`\'s `background-color` */\n}\n.content[data-v-a3f7a6e6] { /* Covers (vertically-down-shifted) `.arrow-inner`\'s bottom part */\n z-index: 500; /* Equals `.popup`\'s `z-index` + 1 : to cover `arrow-inner` */\n width: 100%;\n color: #000;\n background-color: #fff;\n}\n.popup[data-v-a3f7a6e6],\n.content[data-v-a3f7a6e6] {\n border-radius: 1.5px;\n}\n.info[data-v-a3f7a6e6] {\n max-height: 111px;\n padding: 8px 0 0 0;\n overflow: auto;\n border-bottom: 1px solid #c4c4c4;\n}\n.info[data-v-a3f7a6e6]::after { /* Instead of padding-bottom. Circumvents bug in Firefox 64 */\n display: block;\n height: 8px;\n line-height: 0;\n content: " ";\n}\n.info > div[data-v-a3f7a6e6] {\n padding: 0 8px 0 9px;\n}\n.info > div[data-v-a3f7a6e6]:not(:first-child)::before,\n.menu > div[data-v-a3f7a6e6]:not(:first-child)::before {\n display: block;\n height: 0;\n margin: 7px -2px 5px -2px;\n line-height: 0;\n content: " ";\n border-top: 1px dotted #e0e0e0;\n}\n.menu > div[data-v-a3f7a6e6]:not(:first-child)::before {\n margin: 2px 0 2px 0;\n border-top: 1px solid #d7d7d7; /* Color: equals `.menu-sep`\'s bkgr-color */\n}\n.str[data-v-a3f7a6e6] {\n font-size: 12px;\n font-weight: bold;\n}\n.descr[data-v-a3f7a6e6] {\n min-height: 14px;\n padding: 6px 0 0 1px;\n}\n.dict[data-v-a3f7a6e6] {\n padding: 6px 0 0 0;\n}\n.grey[data-v-a3f7a6e6] {\n color: #888;\n}\n.info[data-v-a3f7a6e6] a { /* `>>>` makes it work with `v-html`-injected HTML-code. */\n color: #6a88d4;\n text-decoration: none;\n}\n.info[data-v-a3f7a6e6] a:hover {\n text-decoration: underline;\n}\n.info-settings[data-v-a3f7a6e6] {\n font-size: 10px;\n color: #aaa;\n}\n.info-settings > div[data-v-a3f7a6e6] {\n padding-top: 2px;\n}\n.info-settings > div > div[data-v-a3f7a6e6]:first-child {\n padding-top: 1px;\n}\n.dict[data-v-a3f7a6e6]::before {\n content: "Dict: ";\n}\n.comma-sep > span[data-v-a3f7a6e6]:not(:last-child)::after {\n content: ", ";\n}\n.class-id[data-v-a3f7a6e6]::before {\n content: "Class: ";\n}\n.parent-id[data-v-a3f7a6e6]::before {\n content: "\\a0Parent: "; /* \'\\a0\' = \'&nbsp;\' */\n}\n.inst-id[data-v-a3f7a6e6]::before {\n content: "\\a0Inst: ";\n}\n.info-settings .list > div[data-v-a3f7a6e6]::before {\n padding-left: 6px;\n content: "- ";\n}\n.query-filter[data-v-a3f7a6e6]::before {\n content: "Autocomplete limits to: ";\n}\n.query-sort[data-v-a3f7a6e6]::before {\n content: "Autocomplete prioritizes: ";\n}\n.query-fixedterms[data-v-a3f7a6e6]::before {\n content: "Autocomplete\'s fixedTerms: ";\n}\n.query-z[data-v-a3f7a6e6]::before {\n content: "Customizers get only extra: ";\n}\n.widths[data-v-a3f7a6e6]::before {\n content: "Widths: ";\n}\n.placeholder[data-v-a3f7a6e6]::before {\n content: "Placeholder: ";\n}\n.min-width[data-v-a3f7a6e6]::before {\n content: "min:";\n}\n.max-width[data-v-a3f7a6e6]::before {\n content: "max:";\n}\n.edit-width[data-v-a3f7a6e6]::before {\n content: "edit:";\n}\n.width-scale[data-v-a3f7a6e6]::before {\n content: "scale:";\n}\n.menu[data-v-a3f7a6e6] {\n padding: 2px 0 2px 0;\n background-color: #f6f6f6;\n}\n.item[data-v-a3f7a6e6],\n.menu-extra1[data-v-a3f7a6e6],\n.menu-extra2[data-v-a3f7a6e6] {\n padding: 3px 16px 2px 22px;\n}\n.item[data-v-a3f7a6e6] {\n border: 1px solid #f6f6f6; /* Same as `.content/.menu`\'s bkgr-color */\n border-width: 1px 0;\n}\n.item .hotkey[data-v-a3f7a6e6] {\n position: relative;\n float: right;\n color: #c1c1c1;\n}\n.item[data-v-a3f7a6e6]:hover {\n background-color: #d1e2f2;\n border-color: #81b4e7;\n}\n.item.inactive[data-v-a3f7a6e6],\n.types .type.inactive[data-v-a3f7a6e6],\n.hotkey.help[data-v-a3f7a6e6] {\n color: #8a8a8a;\n}\n.item.inactive[data-v-a3f7a6e6]:hover {\n background-color: #e1e1e1;\n border-color: #b4b4b4;\n}\n.types .type[data-v-a3f7a6e6] {\n padding: 3px 4px 2px 4px;\n}\n.types:not(:hover) .type.selected[data-v-a3f7a6e6] {\n padding-top: 2px;\n border: 1px solid #d1d1d1;\n}\n.types:hover .type.selected[data-v-a3f7a6e6] {\n background-color: #add2f8;\n border: 1px solid #add2f8;\n border-width: 0 1px;\n}\n.types:hover .type[data-v-a3f7a6e6]:not(.selected):not(.inactive):hover {\n background-color: #8ebef3;\n}\n.hotkey.help[data-v-a3f7a6e6] {\n padding: 0 0 1px 8px;\n border: 0 solid #c1c1c1;\n border-left-width: 1px;\n}\n.hotkey.help[data-v-a3f7a6e6]:hover {\n color: #6d7dbd;\n border-color: #7c8dcd;\n}\n',""])},function(t,e,n){"use strict";var i=n(11);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,"\n.terms[data-v-4c9a1fe8] {\n position: relative;\n box-sizing: border-box;\n padding: 0 2px 2px 2px;\n background-color: inherit;\n}\nspan.ruler[data-v-4c9a1fe8] { /* For measuring Term string-pixel-width */\n visibility: hidden;\n}\nspan.ruler[data-v-4c9a1fe8],\n.term[data-v-4c9a1fe8] {\n position: absolute;\n line-height: normal;\n}\n.term[data-v-4c9a1fe8] {\n box-sizing: border-box;\n display: inline-block;\n padding: 0 3px;\n margin: 0 2px; /* Is later zero'ed, but abs. positioning uses this value */\n white-space: nowrap;\n cursor: default;\n border: 1px solid transparent;\n border-radius: 2px;\n}\n.term[data-v-4c9a1fe8] sup,\n.term[data-v-4c9a1fe8] sub {\n position: relative;\n top: -0.4em;\n vertical-align: baseline;\n}\n.term[data-v-4c9a1fe8] sub {\n top: 0.15em;\n}\n.term[data-v-4c9a1fe8]:not(.edit),\n.terms[data-v-4c9a1fe8] .popup .menu {\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.term[data-v-4c9a1fe8]:not(.nofade),\n.term[data-v-4c9a1fe8]:not(.nofade):hover {\n transition: border-color 0.1s ease;\n}\n.edit[data-v-4c9a1fe8] {\n color: #000;\n cursor: text;\n background-color: inherit;\n}\n.edit.inp[data-v-4c9a1fe8] {\n overflow: visible; /* Makes autocomplete results visible */\n}\n.edit[data-v-4c9a1fe8]:not(.inp) {\n text-overflow: clip; /* No ellipsis for Edit-Terms without <input> elem. */\n}\n.edit[data-v-4c9a1fe8]:not(.inp),\n.edit[data-v-4c9a1fe8]:not(.focus) input {\n color: #7a7a7a; /* Color for non-focused input, or Edit-term label text */\n}\n.inp[data-v-4c9a1fe8] .list {\n margin-top: 3px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.23);\n}\n.inp[data-v-4c9a1fe8] .item {\n padding-top: 2px;\n}\n.inp[data-v-4c9a1fe8] .item.item-type-literal .hotkey {\n float: right;\n font-weight: normal;\n color: #e0e0e0;\n}\n.inst[data-v-4c9a1fe8] {\n color: #1c2a47;\n background-color: #e2e6f0;\n border-color: #b1bed8;\n}\n.inst[data-v-4c9a1fe8]:hover {\n background-color: #e1e5ef;\n border-color: #95a5c7;\n}\n.edit[data-v-4c9a1fe8]:not(.end) {\n border-color: #c4c4c4;\n}\n.edit[data-v-4c9a1fe8]:hover {\n border-color: #b4b4b4;\n}\n\n/* `.inp.focus`: a VsmBox that just displays a stored VSM-sentence won't show\n a border around the endTerm (that has the input then) when not focused. */\n.end.inp.focus[data-v-4c9a1fe8],\n.end[data-v-4c9a1fe8]:hover {\n border-color: #f0f0f0;\n}\n.end.inp.focus[data-v-4c9a1fe8]:hover {\n border-color: #ebebeb;\n}\n.end[data-v-4c9a1fe8]:not(.inp):not(.nofade):hover {\n transition-duration: 0.18s;\n}\n.ref[data-v-4c9a1fe8]:not(.end),\n.ref.end.inp[data-v-4c9a1fe8] {\n border-style: dashed;\n}\n.ref.end.inp[data-v-4c9a1fe8] {\n border-color: #b1bed8;\n}\n.ref.end.inp[data-v-4c9a1fe8]:hover {\n border-color: #95a5c7;\n}\n.class[data-v-4c9a1fe8]:not(.edit) {\n color: #2a2a05;\n background-color: #f9f2b9;\n border-color: #e5c547;\n}\n.class[data-v-4c9a1fe8]:not(.edit):hover {\n background-color: #f8f1b8;\n border-color: #dab43f;\n}\n.class.edit[data-v-4c9a1fe8]:not(.end),\n.class.edit.inp[data-v-4c9a1fe8] {\n border-color: #ebd262;\n}\n.class.edit[data-v-4c9a1fe8]:not(.end):hover,\n.class.edit.inp[data-v-4c9a1fe8]:hover {\n border-color: #e5c547;\n}\n.lit[data-v-4c9a1fe8]:not(.edit) {\n color: #200505;\n background-color: #f0e2e6;\n border-color: #d8b1ba;\n}\n.lit[data-v-4c9a1fe8]:not(.edit):hover {\n background-color: #efe1e5;\n border-color: #c795a5;\n}\n.lit.edit[data-v-4c9a1fe8]:not(.end),\n.lit.edit.inp[data-v-4c9a1fe8] {\n border-color: #e1c2c7;\n}\n.lit.edit[data-v-4c9a1fe8]:not(.end):hover,\n.lit.edit.inp[data-v-4c9a1fe8]:hover {\n border-color: #dfb1b9;\n}\n.term[data-v-4c9a1fe8] input.input { /* $'s undo automatic 'user agent stylesheets' */\n width: 100%;\n height: 100%;\n padding: 0; /* $ */\n line-height: normal;\n cursor: text;\n background-color: transparent;\n border: 0; /* $ */\n outline: none; /* $ */\n box-shadow: none; /* $ */\n}\n\n/*\n Note: 'placehold' = input-label used as a placeholder.\n Note: .placehold-related CSS is defined in vsm-autocomplete, but needs to be\n mostly repeated here, so EL/ER terms get a same placeholder layout.\n Note: some small positioning adjustments need to be made for vsmAC's\n placehold only, for yet unknown reason.\n*/\n.term[data-v-4c9a1fe8] .input-wrap {\n position: relative;\n line-height: 0;\n background-color: transparent; /* different from vsmAC */\n}\n.term[data-v-4c9a1fe8] .placehold {\n position: absolute;\n top: 0;\n left: 0;\n line-height: normal;\n color: #aaa;\n pointer-events: none;\n transition: 0.2s ease all;\n}\n.term[data-v-4c9a1fe8] .placehold.focus {\n top: -2px;\n left: 1.5px; /* different from vsmAC */\n font-size: 9px; /* different from vsmAC */\n color: #d0d0d0; /* different from vsmAC */\n opacity: 1;\n}\n.term[data-v-4c9a1fe8] .placehold.hidden {\n display: none;\n}\n.term[data-v-4c9a1fe8] .label,\nspan.ruler[data-v-4c9a1fe8] {\n white-space: pre;\n}\n.term[data-v-4c9a1fe8] .label {\n display: inline-block;\n width: calc(100% + 1px);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n/* placeholder for Term not having the <input>. Cf.: `.term >>> .placehold` */\n.term[data-v-4c9a1fe8] .label-placehold {\n color: #aaa;\n}\n.term.drag[data-v-4c9a1fe8] {\n z-index: 3;\n opacity: 0.65;\n}\n.term.drag[data-v-4c9a1fe8],\n.term.drag[data-v-4c9a1fe8] input {\n cursor: grabbing;\n}\n.drag-placeholder[data-v-4c9a1fe8] {\n margin: 0;\n background-color: #e9e9e9;\n border-color: #ebebeb;\n}\n\n/* * */\n.focal[data-v-4c9a1fe8]::before {\n position: absolute;\n top: 0.5px;\n right: 0;\n bottom: 0.5px;\n left: 0;\n width: 100%;\n height: 1px;\n overflow: visible;\n pointer-events: none;\n content: \" \";\n border-top: 1.5px dotted #aaa;\n}\n\n/* * */\n\n",""])},function(t,e,n){"use strict";var i=n(12);n.n(i).a},function(t,e,n){(t.exports=n(0)(!1)).push([t.i,"\n*[data-v-271a8614],\n*[data-v-271a8614]::before,\n*[data-v-271a8614]::after {\n line-height: 0;\n}\n.vsm-box[data-v-271a8614] {\n box-sizing: content-box;\n text-align: left;\n background-color: #fff;\n border: 1px solid #d3d9e5;\n}\n.vsm-box[data-v-271a8614],\n.vsm-box[data-v-271a8614] input, \n.vsm-box[data-v-271a8614] .placehold {\n /* This sets both vsm-autocomplete and plain <input>'s style */\n font-family: tahoma, arial, sans-serif;\n\n /* 'font-size' should equal TheTerms's `defaultFontSize`. External CSS may\n override this CSS-value; if so then `widthScale` will automatically\n update accordingly. */\n font-size: 11px;\n}\n.vsm-box[data-v-271a8614],\n.vsm-box[data-v-271a8614] input {\n color: #000;\n}\n.terms[data-v-271a8614],\n.conns[data-v-271a8614] {\n margin: 0;\n}\n\n/* If Tahoma is not installed, then use a metric-compatible, free alternative\n from the Wine project. But don't use its faulty bold version. */\n@font-face {\n font-family: 'Tahoma';\n src:\n local('Tahoma'),\n local('WineTahoma'),\n url('https://vsm.github.io/bin/font/wine-tahoma.woff') format('woff');\n font-style: normal;\n font-weight: normal;\n}\n@font-face {\n font-family: 'Tahoma';\n src: local('Tahoma Bold'), local('Verdana Bold');\n font-style: normal;\n font-weight: bold;\n}\n",""])},function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vsm-box",style:{width:t.width+"px"}},[n("the-conns",{attrs:{"orig-conns":t.origConns,width:t.width,sizes:t.sizesFull,"terms-change-nr":t.termsChangeNr,enabled:t.isTheConnsEnabled},on:{change:t.onConnsChange,"change-init":t.onConnsChangeInit,"click-above-end-term":t.onClickAboveEndTerm}}),t._v(" "),n("the-terms",{ref:"theTerms",attrs:{"vsm-dictionary":t.vsmDictionary,"query-options":t.queryOptions,autofocus:t.autofocus,placeholder:t.placeholder,"cycle-on-tab":t.cycleOnTab,"max-string-lengths":t.maxStringLengths,"fresh-list-delay":t.freshListDelay,"advanced-search":t.advancedSearch,"allow-class-null":t.allowClassNull,"orig-terms":t.origTerms,sizes:t.sizesFull,"custom-item":t.customItem,"custom-item-literal":t.customItemLiteral,"custom-term":t.customTerm,"custom-popup":t.customPopup,"term-copy":t.termCopy,"term-paste":t.termPaste},on:{width:t.onTermsWidth,change:function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onTermsChange(e)},"change-init":t.onTermsChangeInit,"drag-start":t.onDragStart,"drag-stop":t.onDragStop},nativeOn:{change:function(t){return t.stopPropagation(),t}}})],1)};i._withStripped=!0;var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{staticClass:"conns",attrs:{width:t.width,height:t.height,unselectable:"on"},on:{mousemove:t.onMousemove,mouseleave:t.onMouseleave,mousedown:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button?null:(e.stopPropagation(),t.onMousedown(e)):null}}},[n("rect",{staticClass:"terms-top-margin",style:"fill: "+(t.$parent.$refs.theTerms||{}).bkgrColor+";",attrs:{y:t.height-t.sizes.theConnsMarginBottom,height:t.sizes.theConnsMarginBottom,x:"0",width:"100%"}}),t._v(" "),t.showAnyHighlight?n("g",[n("transition",{attrs:{name:"fade",appear:""}},[t.showPosHighlight?n("rect",{key:"phl0",staticClass:"pos-highlight",style:"fill: "+t.sizes.connHLColorLight+";",attrs:{x:t.colX1s[t.hlPosNr],width:t.colX1s[t.hlPosNr+1]-t.colX1s[t.hlPosNr],y:"0",height:"100%"}}):t._e()])],1):t._e(),t._v(" "),t.showAnyHighlight?n("g",[n("transition",{attrs:{name:"fade",appear:""}},[t.showConnHighlight?n("conn-highlight",{key:"chl"+t.hlConnNr,attrs:{conn:t.conns[t.hlConnNr],sizes:t.sizes,"level-top":t.levelTop,termX1s:t.termX1s,termX2s:t.termX2s}}):t._e()],1)],1):t._e(),t._v(" "),t._l(t.conns,(function(e,i){return n("g",{key:i},[e.justRemoved?t._e():n("conn",{attrs:{conn:e,sizes:t.sizes,"level-top":t.levelTop,termX1s:t.termX1s,termX2s:t.termX2s}})],1)})),t._v(" "),t.showAnyHighlight?n("g",[n("transition",{attrs:{name:"fade",appear:""}},[t.showConnHighlight?n("conn-remove-icon",{key:"cri"+t.hlConnNr,attrs:{conn:t.conns[t.hlConnNr],connNr:t.hlConnNr,sizes:t.sizes,"level-top":t.levelTop,termX2s:t.termX2s},on:{remove:t.onConnRemove}}):t._e()],1)],1):t._e()],2)};s._withStripped=!0;var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("g",{class:["conn",{t:!t.isList&&!t.isRef,l:t.isList,r:t.isRef,uc:t.isUC}]},[!t.isRef&&t.drawBack?n("line",{staticClass:"back",style:t.backStyle,attrs:{x1:t.backX1-t.lwh,y1:t.backY+t.h,x2:t.backX2+t.lwh+t.h+t.h,y2:t.backY+t.h}}):t._e(),t._v(" "),t.isList&&t.drawBack?n("line",{staticClass:"back two",style:t.backStyle,attrs:{x1:t.backX1-t.lwh,y1:t.backY+t.h+t.sizes.connListBackSep,x2:t.backX2+t.lwh+t.h+t.h,y2:t.backY+t.h+t.sizes.connListBackSep}}):t._e(),t._v(" "),t.isRef&&t.drawBack?n("line",{staticClass:"back left",style:t.backStyle,attrs:{x1:t.backX1-t.lwh,y1:t.backY+t.h,x2:t.backXM,y2:t.backY+t.h,"stroke-dasharray":t.sizes.connRefDashes}}):t._e(),t._v(" "),t.isRef&&t.drawBack?n("line",{staticClass:"back right",style:t.backStyle,attrs:{x1:t.backX2+t.lwh+t.h+t.h,y1:t.backY+t.h,x2:t.backXM,y2:t.backY+t.h,"stroke-dasharray":t.sizes.connRefDashes}}):t._e(),t._v(" "),t._l(t.legs,(function(e,i){return n("conn-leg",{key:i,attrs:{leg:e,sizes:t.sizes,l:t.l}})})),t._v(" "),t.legStub?n("conn-leg-stub",{attrs:{stub:t.legStub,sizes:t.sizes,l:t.l}}):t._e()],2)};o._withStripped=!0;var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("g",{class:["conn-leg",{uc:t.leg.isUC}]},[!t.isRef&&t.showFoot?n("line",{staticClass:"foot",style:"stroke: "+t.footColor+"; stroke-width: "+t.l.lw+";",attrs:{x1:t.leg.footX1+t.sizes.connFootIndent,y1:t.footY,x2:t.leg.footX2-t.sizes.connFootIndent,y2:t.footY}}):t._e(),t._v(" "),t.isRef&&t.showFoot?n("line",{staticClass:"foot left",style:"stroke: "+t.footColor+"; stroke-width: "+t.l.lw+";",attrs:{x1:t.footXM,y1:t.footY,x2:t.leg.footX1+t.sizes.connFootIndent,y2:t.footY,"stroke-dasharray":t.sizes.connRefDashes}}):t._e(),t._v(" "),t.isRef&&t.showFoot?n("line",{staticClass:"foot right",style:"stroke: "+t.footColor+"; stroke-width: "+t.l.lw+";",attrs:{x1:t.footXM,y1:t.footY,x2:t.leg.footX2-t.sizes.connFootIndent,y2:t.footY,"stroke-dasharray":t.sizes.connRefDashes}}):t._e(),t._v(" "),n("line",{staticClass:"leg",style:"stroke: "+t.legColor+"; stroke-width: "+t.l.lw+";",attrs:{x1:t.x,y1:t.legY2,x2:t.x,y2:t.leg.y1-t.l.lwh+(t.leg.isUC?t.l.lw:0),"stroke-dasharray":!!t.isRef&&t.sizes.connRefDashes}}),t._v(" "),"R"==t.leg.type?n("path",{staticClass:"pointer relation",style:"fill: "+t.legColor+"; stroke-width: 0;",attrs:{d:"M"+t.x+" "+(t.y2lwh-t.sizes.connTridRelH)+" L"+(t.x+t.sizes.connTridRelW)+" "+t.y2lwh+" H"+(t.x-t.sizes.connTridRelW)+" Z"}}):t._e(),t._v(" "),"O"==t.leg.type?n("path",{staticClass:"pointer object",style:"\n fill: none; stroke: "+t.legColor+"; stroke-width: "+t.l.lw+";",attrs:{d:"M"+(t.x-t.sizes.connTridObjW)+" "+(t.y2-t.sizes.connTridObjH)+" L"+t.x+" "+t.y2+" L"+(t.x+t.sizes.connTridObjW)+" "+(t.y2-t.sizes.connTridObjH)}}):t._e(),t._v(" "),"L"==t.leg.type?n("path",{staticClass:"pointer list-relation",style:"fill: "+t.legColor+"; stroke-width: 0;",attrs:{d:"M"+(t.x-t.sizes.connListRelW)+" "+(t.y2lwh-t.sizes.connListRelH)+" H"+(t.x+t.sizes.connListRelW)+" V"+t.y2lwh+" H"+(t.x-t.sizes.connListRelW)+" Z"}}):t._e(),t._v(" "),"P"==t.leg.type?n("path",{staticClass:"pointer parent",style:"\n fill: none; stroke: "+t.legColor+"; stroke-width: "+t.l.lw+";",attrs:{d:"M"+(t.x-t.sizes.connRefParW)+" "+(t.y2-t.sizes.connRefParH)+" L"+t.x+" "+t.y2+" L"+(t.x+t.sizes.connRefParW)+" "+(t.y2-t.sizes.connRefParH)+" Z"}}):t._e()])};function a(t,e,n,i,s,o,r,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=l):s&&(l=a?function(){s.call(this,this.$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}r._withStripped=!0;var l=a({name:"ConnLeg",props:{leg:{type:Object,required:!0},sizes:{type:Object,required:!0},l:{type:Object,required:!0}},computed:{isRef:function(){return["C","P"].includes(this.leg.type)},x:function(){return this.leg.x+this.l.h+(this.leg.isUC&&"E"==this.leg.type&&this.leg.doublesUp?this.l.lw:0)},y2:function(){return this.leg.y2-(this.leg.isUC?this.sizes.connUCLegShorter:0)},legY2:function(){var t=this,e=t.l.lwh+t.l.h;return t.y2-("R"==t.leg.type?t.sizes.connTridRelH-e-t.l.h-t.l.lw:"L"==t.leg.type?t.sizes.connListRelH-e-t.l.h:"P"==t.leg.type?t.sizes.connRefParH+e:t.sizes.connFootVisible||"O"==t.leg.type||t.leg.isUC?t.l.lwh:t.l.lwh-t.l.lw)},y2lwh:function(){return this.y2+this.l.lwh+this.l.h+this.l.h},footY:function(){return this.leg.y2+this.l.h},footXM:function(){return(this.leg.footX1+this.leg.footX2-1)/2+.5},showFoot:function(){return this.sizes.connFootVisible&&(!this.leg.isUC||!this.leg.doublesUp)},legColor:function(){return this.leg.isUC?this.sizes.connUCLegColor:this.sizes.connLegColor},footColor:function(){return this.leg.isUC?this.sizes.connUCFootColor:this.sizes.connFootColor}}},r,[],!1,null,null,null);l.options.__file="src/subcomponents/ConnLeg.vue";var c=l.exports,u=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.stub?n("g",{staticClass:"conn-leg-stub"},[t.stub.side?n("line",{staticClass:"stub-back",style:"stroke: "+t.sizes.connStubBackColor+"; stroke-width: "+t.l.lw+";",attrs:{x1:t.x+(t.stub.side<0?-t.l.lwh-t.l.h:t.l.lwh+t.l.h),y1:t.stub.y1,x2:t.stub.x+(t.stub.side<0?-t.l.lwh:t.l.lwh+t.l.h+t.l.h),y2:t.stub.y1}}):t._e(),t._v(" "),n("line",{staticClass:"stub-foot",style:"stroke: "+t.sizes.connStubFootColor+"; stroke-width: "+t.l.lw+";",attrs:{x1:t.x-t.footW,y1:t.y2+t.l.h+t.l.lwh,x2:t.x+t.footW,y2:t.y2+t.l.h+t.l.lwh}}),t._v(" "),n("line",{staticClass:"stub-leg",style:"stroke: "+t.sizes.connStubLegColor+"; stroke-width: "+t.l.lw+";",attrs:{x1:t.x,y1:t.y1,x2:t.x,y2:t.y2}}),t._v(" "),"R"==t.stub.type?n("path",{staticClass:"stub-pointer relation",style:"fill: "+t.sizes.connStubLegColor+"; stroke-width: 0;",attrs:{d:"M"+t.x+" "+(t.l.h+t.y2-t.sizes.connStubRelH)+" L"+(t.x+t.sizes.connStubRelW)+" "+t.y2+" H"+(t.x-t.sizes.connStubRelW)+" Z"}}):t._e(),t._v(" "),"O"==t.stub.type?n("path",{staticClass:"stub-pointer object",style:"\n fill: none; stroke: "+t.sizes.connStubLegColor+"; stroke-width: "+t.l.lw+";",attrs:{d:"M"+(t.x-t.sizes.connStubObjW)+" "+(t.y2+t.l.h-t.sizes.connStubObjH)+" L"+t.x+" "+(t.y2-t.l.h-t.l.lwh)+" L"+(t.x+t.sizes.connStubObjW)+" "+(t.y2+t.l.h-t.sizes.connStubObjH)}}):t._e()]):t._e()};u._withStripped=!0;var h=a({name:"ConnLegStub",props:{stub:{type:Object,required:!0},sizes:{type:Object,required:!0},l:{type:Object,required:!0}},computed:{x:function(){return this.stub.x+this.l.h+this.stub.side*("S"==this.stub.type?this.sizes.connStubSubBackW:"O"==this.stub.type?this.sizes.connStubObjBackW:0)},y1:function(){return this.stub.y1+this.l.h+this.l.lwh},y2:function(){return this.stub.y1+("S"==this.stub.type?this.sizes.connStubSubLegH:"R"==this.stub.type?this.sizes.connStubRelLegH:"O"==this.stub.type?this.sizes.connStubObjLegH:0)},footW:function(){return"S"==this.stub.type?this.sizes.connStubSubFootW:"R"==this.stub.type?this.sizes.connStubRelFootW:"O"==this.stub.type?this.sizes.connStubObjFootW:0}}},u,[],!1,null,null,null);h.options.__file="src/subcomponents/ConnLegStub.vue";var d=h.exports;function p(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var f=function(t,e){return~~((t+e-1)/2)},m=a({name:"Conn",components:{"conn-leg":c,"conn-leg-stub":d},props:{conn:{type:Object,required:!0},sizes:{type:Object,required:!0},levelTop:{type:Function,required:!0},termX1s:{type:Array,required:!0},termX2s:{type:Array,required:!0}},computed:{h:function(){return this.sizes.connLineWidth%2/2},lw:function(){return this.sizes.connLineWidth},lwh:function(){return~~(this.lw/2)},l:function(){return{h:this.h,lw:this.lw,lwh:this.lwh}},isRef:function(){return"R"==this.conn.type},isList:function(){return"L"==this.conn.type},isUC:function(){return this.legs.filter((function(t){return t.isUC})).length>0},realPos:function(){return this.conn.pos.filter((function(t){return t>=0}))},posA:function(){return Math.min.apply(Math,p(this.realPos))},posZ:function(){return Math.max.apply(Math,p(this.realPos))},backX1:function(){return f(this.termX1s[this.conn.posA],this.termX2s[this.conn.posA])||0},backX2:function(){return f(this.termX1s[this.conn.posZ],this.termX2s[this.conn.posZ])||0},backXM:function(){return(this.backX1+this.backX2-1)/2+.5},backY:function(){return this.levelTop(this.conn.backLevel)+this.sizes.connBackDepth},drawBack:function(){return this.conn.pos.length>1},backStyle:function(){return"stroke: ".concat(this.sizes.connBackColor,"; stroke-width: ").concat(this.lw,";")},legs:function(){var t=this;return this.conn.pos.reduce((function(e,n,i){if(n>=0){var s="T"==t.conn.type?i?1==i?"R":2==i?"O":"":"S":"L"==t.conn.type?i?"E":"L":"R"==t.conn.type?i?1==i?"P":"":"C":"";if(s){var o=t.termX1s[n]||0,r=t.termX2s[n]||0,a=t.conn.footLevels[i],l=t.conn.isUC&&i==t.conn.pos.length-1;e.push({x:f(o,r),y1:t.backY,y2:t.levelTop(a)+t.sizes.connFootDepth,footX1:o,footX2:r,type:s,isUC:l,doublesUp:t.conn.pos.slice(0,i).includes(n)})}}return e}),[])},legStub:function(){var t=this,e=function(e,n){return t.conn.pos[e]>t.conn.pos[n]};if("T"==this.conn.type){var n=this.backY+this.h;if(this.conn.pos[0]<0){var i=e(1,2);return{type:"S",side:i?1:-1,x:i?this.backX2:this.backX1,y1:n}}if(this.conn.pos[1]<0)return{type:"R",side:0,x:this.backXM,y1:n};if(this.conn.pos[2]<0)return{type:"O",side:(i=e(0,1))?-1:1,x:i?this.backX1:this.backX2,y1:n}}return!1}}},o,[],!1,null,null,null);m.options.__file="src/subcomponents/Conn.vue";var y=m.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("g",{staticClass:"conn-highlight"},[n("path",{staticClass:"hl-back-top",style:"fill: "+t.sizes.connHLColor+"; stroke-width: 0;",attrs:{d:t.hlBackPath}}),t._v(" "),t._l(t.realPos,(function(e,i){return n("rect",{key:i,staticClass:"hl-leg",style:"fill: "+t.sizes.connHLColor+";",attrs:{x:t.termX1s[e]-t.sizes.connHLLegOutdent,y:t.topY+t.sizes.connHLBackHeight,width:t.hlLegW(e),height:t.hlLegHeight(i)}})})),t._v(" "),t._l(t.realPos,(function(e,i){return n("g",{key:"u"+i},[t.realFootLevels[i]>0?n("rect",{staticClass:"hl-leg-under",style:"fill: "+t.sizes.connHLColorLight+";",attrs:{x:t.termX1s[e]-t.sizes.connHLLegOutdent,y:t.levelTop(t.realFootLevels[i]-1),width:t.hlLegW(e),height:t.realFootLevels[i]*t.sizes.theConnsLevelHeight+t.sizes.theConnsSpaceBelow+t.sizes.theConnsMarginBottom}}):t._e()])}))],2)};v._withStripped=!0;var b=a({name:"ConnHL",props:{conn:{type:Object,required:!0},sizes:{type:Object,required:!0},levelTop:{type:Function,required:!0},termX1s:{type:Array,required:!0},termX2s:{type:Array,required:!0}},computed:{topY:function(){return this.levelTop(this.conn.backLevel)},backW:function(){return this.termX2s[this.conn.posZ]-this.termX1s[this.conn.posA]+2*this.sizes.connHLLegOutdent},hlBackPath:function(){var t=this.termX1s[this.conn.posA]-this.sizes.connHLLegOutdent,e=this.levelTop(this.conn.backLevel),n=this.backW,i=this.sizes.connHLBackHeight,s=this.sizes.connHLBorderRadius,o="a ".concat(s," ").concat(s," 0 0 1 ").concat(s," ");return"M ".concat(t," ").concat(e+s)+o+"-".concat(s)+"h ".concat(n-s-s)+o+s+"v ".concat(i-s)+"h -".concat(n," Z")},realPos:function(){return this.conn.pos.filter((function(t){return t>=0}))},realFootLevels:function(){return this.conn.footLevels.filter((function(t){return t>=0}))}},methods:{hlLegW:function(t){return this.termX2s[t]-this.termX1s[t]+2*this.sizes.connHLLegOutdent},hlLegHeight:function(t){var e=this.realFootLevels[t],n=this.sizes;return this.levelTop(e)-this.levelTop(this.conn.backLevel)+n.theConnsLevelHeight-n.connHLBackHeight+(e>0?0:n.theConnsSpaceBelow+n.theConnsMarginBottom)}}},v,[],!1,null,null,null);b.options.__file="src/subcomponents/ConnHighlight.vue";var g=b.exports,C=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("g",{staticClass:"conn-remove-icon",on:{mouseenter:t.onMouseenter,mouseleave:t.onMouseleave,mousedown:t.onMousedown,mouseup:t.onMouseup}},[n("rect",{staticClass:"ri-bg",style:"fill: "+t.sizes.connRIBGColor[t.state]+";",attrs:{x:t.x1,y:t.y1,width:t.sizes.connRIW,height:t.sizes.connRIW,rx:t.sizes.connHLBorderRadius,ry:t.sizes.connHLBorderRadius}}),t._v(" "),n("path",{staticClass:"ri-fg",style:"stroke: "+t.sizes.connRIFGColor[t.state]+";\n stroke-width: "+t.sizes.connRILineWidth+";",attrs:{d:t.crossPath}})])};C._withStripped=!0;var x=a({name:"ConnRemoveIcon",props:{conn:{type:Object,required:!0},connNr:{type:Number,required:!0},sizes:{type:Object,required:!0},levelTop:{type:Function,required:!0},termX2s:{type:Array,required:!0}},data:function(){return{state:0}},computed:{x1:function(){return this.termX2s[this.conn.posZ]+this.sizes.connHLLegOutdent-this.sizes.connRIW},y1:function(){return this.levelTop(this.conn.backLevel)},crossPath:function(){var t=this.x1+this.sizes.connRIPadding,e=this.y1+this.sizes.connRIPadding,n=this.x1+this.sizes.connRIW-this.sizes.connRIPadding,i=this.y1+this.sizes.connRIW-this.sizes.connRIPadding;return"M ".concat(t," ").concat(e," L ").concat(n," ").concat(i)+"M ".concat(t," ").concat(i," L ").concat(n," ").concat(e)}},methods:{onMouseenter:function(){this.state=1},onMouseleave:function(){this.state=0},onMousedown:function(){this.state=2},onMouseup:function(){2==this.state&&(this.state=1,this.$emit("remove",this.connNr))}}},C,[],!1,null,null,null);x.options.__file="src/subcomponents/ConnRemoveIcon.vue";var k=x.exports;function w(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var T=function(t){return JSON.parse(JSON.stringify(t))},L={prepConnToReceive:function(t){var e=T(t);return L.pruneProperties(e),e},prepConnToEmit:function(t){var e=T(t);return L.pruneProperties(e),e},pruneProperties:function(t){delete t.backLevel,delete t.footLevels,delete t.posA,delete t.posZ,delete t.isUC,delete t.justRemoved,delete t.justAdded},sortListConnElemPos:function(t){t.pos=[t.pos[0]].concat(t.pos.slice(1).sort((function(t,e){return t-e})))},sortConnectors:function(t){var e=t.map((function(t,e){return{type:"T"==t.type?0:"L"==t.type?1:2,ttd:t.pos.map((function(t){return{eid:t<0?null:"pos-".concat(t),pos:t}})),pos0:Math.min.apply(Math,w(t.pos.filter((function(t){return t>=0})))),pos1:Math.max.apply(Math,w(t.pos)),origIndex:e}})),n=t.length&&t[t.length-1].isUC?1:0,i=0;return t.forEach((function(t){return i=Math.max.apply(Math,[i].concat(w(t.pos)))})),(e=L.protoSortVSMConns(e,n,i+1)).map((function(e){return t[e.origIndex]}))},protoSortVSMConns:function(t,e,n){var i,s,o,r,a,l,c,u,h,d,p,f,m,y=[],v=[],b=[],g=[],C=n,x=t,k=x.length,w=function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1};for(i=0;i<C;i++)y.push([]);for(e>0&&(f=x[--k]),i=0;i<k;i++)for(r=0,a=(o=(s=x[i]).ttd).length;r<a;r++)if(null!=(l=o[r]).eid){switch(s.type){case 0:h=0==r?a<3||(null==(c=o[1]).eid||l.pos<c.pos)&&(null==(c=o[2]).eid||l.pos<c.pos)?3:2:2==r?a<3||(null==(c=o[0]).eid||l.pos>c.pos)&&(null==(c=o[1]).eid||l.pos>c.pos)?5:4:1;break;case 1:h=0==r?0:6;break;default:h=0==r?7:8}y[l.pos].push({nr:i,t:h})}var T=function(t,e){var n,i,s,o,r,a,l;for(n=0;n<C;n++){for(i=0,o=(s=y[n]).length,a=l=-1;i<o;i++)(r=s[i]).nr==t&&(a=r.t),r.nr==e&&(l=r.t);if(a>=0&&l>=0)break}return n==C||a==l?0:a<l?-1:1};for(i=0;i<C;i++)v.push(i);for(i=0;i<k;i++)b.push({nr:i,v:x[i],c:0,s:!1});for(;b.length>0;){for(i=0,d=b.length,u=C;i<d;i++){for(o=(s=b[i].v).ttd,r=s.pos0,p=[];r<=s.pos1;r++)0!=!y[r].length||w(p,c=v[r])||p.push(c);u=Math.min(u,b[i].c=p.length-(o.length-(0!=s.type||null!=o[0].eid&&null!=o[1].eid&&null!=o[2].eid?0:1)))}for(m=[],i=0;i<d;i++)(c=b[i]).c==u&&m.push(c);for(i=0,a=m.length;i<a;i++)m[i].s=!1;for(i=0;i<a;i++)for(r=i+1;r<a;r++)(u=T(m[i].nr,m[r].nr))>0?m[i].s=!0:u<0&&(m[r].s=!0);for(i=0,u=!0;i<a;i++)u=u&&m[i].s;for(i=0,p=C,r=0;i<a;i++)(!(c=m[i]).s||u)&&(l=c.v.pos0)<p&&(p=l,r=i);for(g.push((c=m[r]).v),i=0,r=c.nr;i<d;i++)if(b[i].nr==r){b.splice(i,1);break}for(i=0,p=[],d=(o=c.v.ttd).length;i<d;i++)null!=(c=o[i]).eid&&p.push(v[c.pos]);for(i=0,l=p.pop();i<C;i++)w(p,v[i])&&(v[i]=l)}return e>0&&(g.push(f),k++),x=t=g,t}},I=L;function S(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var _=function(t){return JSON.parse(JSON.stringify(t))},E=window.addEventListener,K=window.removeEventListener,D={name:"TheConns",components:{conn:y,"conn-highlight":g,"conn-remove-icon":k},props:{origConns:{type:[Array,Boolean],required:!0},width:{type:Number,required:!0},sizes:{type:Object,required:!0},termsChangeNr:{type:Number,required:!0},enabled:{type:Boolean,default:!0}},data:function(){return{conns:[],lastKeys:[],fullTerms:[],termX1s:[],termX2s:[],colX1s:[],highLevels:[],hlConnNr:-1,levelCount:this.sizes.theConnsMinLevels,cellOwner:[[]],finalizeTimer:0,shiftCtrlListener:0,escListener:0,clickOutListener:0}},computed:{lastConn:function(){var t=this.conns.length;return!!t&&this.conns[t-1]},hasUCConn:function(){return this.lastConn&&!!this.lastConn.isUC},hasActiveUCConn:function(){return this.lastConn.isUC&&this.lastConn.pos.length>1},height:function(){return this.levelCount*this.sizes.theConnsLevelHeight+this.sizes.theConnsMarginBottom+this.sizes.theConnsSpaceBelow},hlPosNr:function(){if(!this.hasUCConn)return-1;var t=this.lastConn.pos;return t[t.length-1]},showPosHighlight:function(){return this.hlPosNr>=0&&this.hlPosNr<this.colX1s.length-1},showConnHighlight:function(){return this.hlConnNr>=0&&this.hlConnNr<this.conns.length&&!this.conns[this.hlConnNr].justRemoved&&!this.conns[this.hlConnNr].justAdded&&!this.conns[this.hlConnNr].isUC&&!this.hasActiveUCConn},showAnyHighlight:function(){return this.showPosHighlight||this.showConnHighlight},anyConnJustAddedOrRemoved:function(){return this.conns.filter((function(t){return t.justRemoved||t.justAdded})).length}},watch:{origConns:function(t){this.updateTermsRef(),!1===t?this.reset():this.initForNewConns()},termsChangeNr:function(t){this.updateAfterTermsChange(t)},height:function(){this.calcCoordinates()},enabled:function(t){t||(this.hlConnNr=-1,this.hasUCConn&&this.removeUCConn())}},created:function(){var t=this;this.shiftCtrlListener=function(e){var n=t.eventModifiersToConnType(e);t.updateUCConnType(n)},this.escListener=function(e){"Escape"==e.key&&t.stopUCConn()},this.clickOutListener=function(){return t.stopUCConn()}},destroyed:function(){this.setShiftCtrlListeners(!1),this.setStopUCConnListeners(!1)},methods:{updateTermsRef:function(){this.fullTerms=this.$parent.$refs.theTerms.terms},getCurrentTermKeys:function(){return this.fullTerms.slice(0,-1).map((function(t){return t.key}))},reset:function(){this.conns=[],this.lastKeys=[]},emitValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.conns.filter((function(t){return!t.isUC&&!t.justRemoved})).map(I.prepConnToEmit);this.$emit(t||"change",{conns:n,termsChangeNr:e})},initForNewConns:function(){var t=this;this.hlConnNr=-1,this.lastKeys=this.getCurrentTermKeys(),this.conns=this.origConns.map((function(e){return!(Math.max.apply(Math,S(e.pos))>t.fullTerms.length-2)&&I.prepConnToReceive(e)})).filter((function(t){return t})),this.sortConnectors(),this.emitValue("change-init")},updateAfterTermsChange:function(t){this.hlConnNr=-1,this.updateTermsRef(),this.hasUCConn&&this.removeUCConn(),this.makeLegsFollowTerms(),this.emitValue(0,t)},makeLegsFollowTerms:function(){var t=this,e=this.getCurrentTermKeys(),n={},i={};this.lastKeys.forEach((function(t,s){var o=e.indexOf(t);-1==o?n[s]=!0:o!=s&&(i[s]=o)}));var s=this.conns.map((function(t){var e=_(t);return e.pos=e.pos.map((function(t){return n[t]?-2:void 0!==i[t]?i[t]:t})),e.pos.includes(-2)&&(e.justRemoved=!0),"L"==e.type&&I.sortListConnElemPos(e),e}));this.lastKeys=e,this.conns=s;var o=Object.keys(n);o.length?(o.sort((function(t,e){return t-e})).reverse().forEach((function(e){t.highLevels.splice(e,1),t.cellOwner.splice(e,1)})),this.calcCoordinates(!1),this.delayedFinalizeChanges()):this.sortConnectors()},calcCoordinates:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=[],i=[],s=[],o=[],r=-1;if(this.fullTerms.forEach((function(e,r){n[r]=e.x,i[r]=e.x+e.width,s[r]=0==r?0:e.x-((t.$parent.$refs.theTerms||{}).termMarginHor||0)/2,o[r]=-1})),this.termX1s=n,this.termX2s=i,this.colX1s=s,this.conns=this.conns.map((function(n){if(n=Object.assign({},n),t.setConnPosAZ(n),!e)return n;n.footLevels=[],n.pos.forEach((function(t,e){n.footLevels[e]=t<0?t:n.pos.slice(0,e).includes(t)?o[t]:++o[t]}));for(var i=0,s=n.pos.filter((function(t){return t>=0})),a=n.posA;a<=n.posZ;a++)i=Math.max(i,o[a]+(s.includes(a)?0:1));for(a=n.posA;a<=n.posZ;a++)o[a]=i;return n.backLevel=i,n.isUC||(r=Math.max.apply(Math,o)),n})),e){this.highLevels=o,this.levelCount=Math.max(this.sizes.theConnsMinLevels,r+2);for(var a=[],l=this.fullTerms.length,c=this.levelCount,u=0;u<l;u++){a[u]=[];for(var h=0;h<c;h++)a[u][h]=-1}this.conns.forEach((function(t,e){for(t.pos.forEach((function(n,i){for(h=t.footLevels[i];h<=t.backLevel;h++)n>=0&&(a[n][h]=e)})),u=t.posA;u<t.posZ;u++)a[u][t.backLevel]=e})),this.cellOwner=a}},setConnPosAZ:function(t){var e=t.pos.filter((function(t){return t>=0}));t.posA=Math.min.apply(Math,S(e)),t.posZ=Math.max.apply(Math,S(e))},levelTop:function(t){return this.height-this.sizes.theConnsMarginBottom-this.sizes.theConnsSpaceBelow-this.sizes.theConnsLevelHeight*(t+1)},eventToCoos:function(t){var e=this.$el.getBoundingClientRect();return[t.clientX-~~e.left,t.clientY-~~e.top]},coosToCell:function(t,e){for(var n=this.fullTerms.length-1;n>0&&!(t>=this.colX1s[n]);n--);for(var i=this.levelCount;i>0&&!(e<this.levelTop(i-1));i--);return{pos:n,level:i}},eventToCell:function(t){return this.coosToCell.apply(this,S(this.eventToCoos(t)))},onMousemove:function(t){if(this.enabled&&!this.anyConnJustAddedOrRemoved){var e=this.eventToCell(t);this.updateHLConnNr(e),this.handleUCConnAfterMousemove(t,e)}},onMouseleave:function(){this.enabled&&(this.hlConnNr=-1,this.hasUCConn&&!this.hasActiveUCConn&&this.removeUCConn())},onMousedown:function(t){if(this.enabled){var e=this.eventToCell(t);e.pos!=this.fullTerms.length-1?this.handleUCConnAfterMousedown(t,e):this.hasActiveUCConn||this.$emit("click-above-end-term")}},updateHLConnNr:function(t){var e=this.cellOwner[t.pos][t.level],n=this.conns[e];this.hlConnNr=!n||n.justRemoved||n.isUC||this.hasActiveUCConn?-1:e},onConnRemove:function(t){this.enabled&&(this.hlConnNr=-1,this.$set(this.conns[t],"justRemoved",!0),this.emitValue(),this.delayedFinalizeChanges())},delayedFinalizeChanges:function(){this.finalizeTimer&&clearTimeout(this.finalizeTimer),this.finalizeTimer=setTimeout(this.finalizeChanges.bind(this),this.sizes.theConnsResortDelay)},finalizeChanges:function(){var t=this;clearTimeout(this.finalizeTimer),this.hlConnNr=-1,this.conns=this.conns.reduce((function(e,n){return n.justRemoved||(n.justAdded&&t.$delete(n,"justAdded"),e.push(n)),e}),[]),this.sortConnectors()},handleUCConnAfterMousemove:function(t,e){if(this.hlConnNr<0&&e.pos<this.fullTerms.length-1){var n=this.eventModifiersToConnType(t);this.hasUCConn?(this.updateUCConnType(n),this.updateUCConnPos(e)):this.createUCConn(n,e)}else this.hasUCConn&&!this.hasActiveUCConn&&this.removeUCConn()},handleUCConnAfterMousedown:function(t,e){this.updateHLConnNr(e),!this.hasUCConn&&this.hlConnNr<0&&this.handleUCConnAfterMousemove(t,e),this.hasUCConn&&(this.updateUCConnType(this.eventModifiersToConnType(t)),this.updateUCConnOnClick(e))},eventModifiersToConnType:function(t){return t.shiftKey?"L":t.ctrlKey?"R":"T"},createUCConn:function(t,e){this.setShiftCtrlListeners(!0),this.conns.push({type:t,pos:[e.pos],isUC:!0}),this.calcCoordinates()},updateUCConnType:function(t){if(this.hasUCConn&&!this.hasActiveUCConn&&this.lastConn.type!=t){var e=_(this.lastConn);e.type=t,this.$set(this.conns,this.conns.length-1,e)}},updateUCConnPos:function(t){if(this.hasUCConn){var e=this.lastConn.pos;if(e[e.length-1]!=t.pos){var n=_(this.lastConn);n.pos[e.length-1]=t.pos,this.$set(this.conns,this.conns.length-1,n),this.calcCoordinates()}}},updateUCConnOnClick:function(t){var e=_(this.lastConn),n=e.type,i=e.pos.length,s=t.pos;if(1==i)this.setShiftCtrlListeners(!1),e.pos.push(s);else if("T"==n)if(2==i)e.pos[0]==s&&(e.pos[0]=-1),e.pos.push(s);else{if(e.pos[0]==s)return;if(e.pos[1]==s){if(-1==e.pos[0])return this.removeUCConn();e.pos[1]=-1}e.justAdded=!0}else if("L"==n)if(2==i){if(e.pos[0]==s)return this.removeUCConn();e.pos.push(s)}else e.pos.slice(0,i-1).includes(s)?(e.pos.pop(),I.sortListConnElemPos(e),e.justAdded=!0):e.pos.push(s);else if("R"==n){if(e.pos[0]==s)return this.removeUCConn();e.justAdded=!0}2==e.pos.length&&this.setStopUCConnListeners(!0),this.$set(this.conns,this.conns.length-1,e),e.justAdded?(delete e.isUC,this.setStopUCConnListeners(!1),this.emitValue(),this.delayedFinalizeChanges()):this.calcCoordinates()},removeUCConn:function(){this.setShiftCtrlListeners(!1),this.conns.pop(),this.calcCoordinates()},stopUCConn:function(){if(this.hasUCConn){this.setStopUCConnListeners(!1);var t=_(this.lastConn);t.pos.length<2||("T"==t.type&&3==t.pos.length&&-1!=t.pos[0]?(t.pos[2]=-1,t.justAdded=!0):"L"==t.type&&t.pos.length>2&&(t.pos.pop(),I.sortListConnElemPos(t),t.justAdded=!0),t.justAdded?(delete t.isUC,this.setConnPosAZ(t),this.$set(this.conns,this.conns.length-1,t),this.emitValue(),this.delayedFinalizeChanges()):this.removeUCConn())}},setShiftCtrlListeners:function(t){var e=t?E:K;e("keydown",this.shiftCtrlListener),e("keyup",this.shiftCtrlListener)},setStopUCConnListeners:function(t){var e=t?E:K;e("keydown",this.escListener),e("mousedown",this.clickOutListener)},sortConnectors:function(){this.conns=I.sortConnectors(this.conns),this.calcCoordinates()}}},M=(n(13),a(D,s,[],!1,null,"9e1325b0",null));M.options.__file="src/subcomponents/TheConns.vue";var O=M.exports,P=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"terms",style:{width:t.width+"px",height:t.height+"px"},on:{mousedown:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onMousedown_div(e):null}}},[n("span",{ref:"ruler",staticClass:"ruler term"}),t._v(" "),t._l(t.terms,(function(e,i){return n("term",{key:e.key,attrs:{term:e,index:i,"has-input":i==t.inputIndex,"vsm-dictionary":t.vsmDictionary,"query-options":t.queryOptions,autofocus:i==t.inputIndex&&t.autofocus,placeholder:1==t.terms.length&&t.placeholder,"tab-listen-mode":i==t.inputIndex?t.inputTabListenMode:3,"fresh-list-delay":t.freshListDelay,"max-string-lengths":t.maxStringLengths,"has-item-literal":!(!t.allowClassNull&&!t.advancedSearch),"custom-item":t.customItem,"custom-item-literal":t.customItemLiteral2,unselectable:"on"},on:{input:t.onInput,"key-esc":t.onKeyEsc,"key-bksp":t.onKeyBksp,"key-ctrl-enter":t.onKeyCtrlEnter,"key-tab":t.onKeyTab,"key-alt-up":t.onKeyAltUp,"key-alt-down":t.onKeyAltDown,"key-ctrl-delete":t.onKeyCtrlDelete,"key-ctrl-bksp":t.onKeyCtrlBksp,"key-shift-enter":t.onKeyShiftEnter,mouseenter:t.onMouseenter,mouseleave:t.onMouseleave,focus:t.onFocus,blur:t.onBlur,"list-open":t.onListOpen,"item-select":t.insertFromMatch,"item-literal-select":t.onItemLiteralSelect,"plain-enter":t.onPlainEnter,mousedown:t.onMousedown,"ctrl-mousedown":t.onCtrlMousedown,"ctrl-shift-mousedown":t.onCtrlShiftMousedown,"alt-mousedown":t.onAltMousedown,click:t.onClick,dblclick:t.onDblclick}})})),t._v(" "),t.dragIndex>=0?n("div",{staticClass:"term drag-placeholder",style:{width:t.terms[t.dragIndex].width+"px",height:t.terms[t.dragIndex].height+"px",top:t.terms[t.dragIndex].y+"px",left:t.terms[t.dragIndex].x+"px"}}):t._e(),t._v(" "),t.popupLoc>=0&&t.popupLoc<t.terms.length?n("the-popup",{attrs:{index:t.popupLoc,term:t.terms[t.popupLoc],"vsm-dictionary":t.vsmDictionary,sizes:t.sizes,"allow-class-null":t.allowClassNull,"term-margin":t.popupTermMargin,"custom-popup":t.customPopup,"term-copy":t.termCopy,"term-paste":t.termPaste},on:{mouseenter:t.onMouseenter_popup,mouseleave:t.onMouseleave,edit:t.onDblclick,"undo-edit":t.onKeyEsc,"toggle-focal":t.onAltMousedown,insert:t.onInsertBefore,remove:t.onKeyCtrlDelete,"set-type":t.onSetType,copy:t.onCopy,"copy-ref":t.onCopyRef,paste:t.onPaste},nativeOn:{mousedown:function(t){return t.stopPropagation(),t}}}):t._e()],2)};P._withStripped=!0;var z=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["term",{edit:t.isEditType,lit:"L"==t.term.type||"EL"==t.term.type,class:"C"==t.term.type||"EC"==t.term.type,inst:"I"==t.term.type||"R"==t.term.type,ref:"R"==t.term.type||"ER"==t.term.type,focal:t.term.isFocal,end:t.term.isEndTerm,drag:t.term.drag,inp:t.hasInput||t.showAutocomplete,focus:t.hasFocus&&t.hasInput,nofade:t.noFade}],style:{width:t.term.width+"px",height:t.term.height+"px",top:(t.term.drag?t.term.drag.y:t.term.y)+"px",left:(t.term.drag?t.term.drag.x:t.term.x)+"px",margin:0},on:{keydown:[function(e){return("button"in e||!t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))&&e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onKeyAltUp(e):null},function(e){return("button"in e||!t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))&&e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onKeyAltDown(e):null},function(e){return("button"in e||46===e.keyCode)&&e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onKeyCtrlDelete(e):null},function(e){return("button"in e||8===e.keyCode)&&e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onKeyCtrlBksp(e):null},function(e){return"button"in e||!t._k(e.keyCode,"tab",9,e.key,"Tab")?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyTab(e):null},function(e){return("button"in e||!t._k(e.keyCode,"tab",9,e.key,"Tab"))&&e.shiftKey?e.ctrlKey||e.altKey||e.metaKey?null:t.onKeyShiftTab(e):null}],mouseover:t.onMouseenter,mouseleave:t.onMouseleave,mousedown:[function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||e.target!==e.currentTarget?null:(e.preventDefault(),e.stopPropagation(),t.onMousedown_div(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.stopPropagation(),t.onMousedown(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onCtrlMousedown(e):null:null},function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button?null:e.ctrlKey&&e.shiftKey?e.altKey||e.metaKey?null:(e.preventDefault(),t.onCtrlShiftMousedown(e)):null:null},function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onAltMousedown(e):null:null}],click:[function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||e.target!==e.currentTarget?null:(e.preventDefault(),e.stopPropagation(),t.onClick_div(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.stopPropagation(),t.onClick(e)):null}],dblclick:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onDblclick(e):null}}},[t.showPlain?n("div",{staticClass:"input-wrap plain"},[n("input",{ref:"input_plain",staticClass:"input plain",attrs:{autofocus:t.autofocus,spellcheck:"false"},domProps:{value:t.term.str},on:{input:function(e){return t.onInput(e.target.value)},focus:t.onFocus,blur:t.onBlur,keydown:[function(e){return"button"in e||!t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.preventDefault(),t.onKeyEsc(e)):null},function(e){return"button"in e||8===e.keyCode?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyBksp_plain(e):null},function(e){return("button"in e||8===e.keyCode)&&e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:(e.stopPropagation(),t.onKeyCtrlBksp(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyEnter_plain(e):null},function(e){return("button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter"))&&e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onKeyCtrlEnter(e):null},function(e){return("button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter"))&&e.shiftKey?e.ctrlKey||e.altKey||e.metaKey?null:t.onKeyShiftEnter(e):null}]}}),t.finalPlaceholder?n("span",{class:["placehold plain",{focus:t.hasFocus,hidden:!t.showPlainPlaceholder}],domProps:{textContent:t._s(t.finalPlaceholder)}}):t._e()]):t.showAutocomplete?n("vsm-autocomplete",t._g({ref:"vsmac",attrs:{"vsm-dictionary":t.vsmDictionary,autofocus:t.autofocus,placeholder:t.finalPlaceholder,"query-options":t.finalQueryOptions,"max-string-lengths":t.maxStringLengths,"fresh-list-delay":t.freshListDelay,"initial-value":t.term.str,"custom-item":t.customItem,"custom-item-literal":t.customItemLiteral},on:{input:t.onInput,focus:t.onFocus,blur:t.onBlur,"key-esc":t.onKeyEsc,"key-bksp":t.onKeyBksp,"key-ctrl-enter":t.onKeyCtrlEnter,"key-shift-enter":t.onKeyShiftEnter,"item-select":t.onItemSelect,"list-open":t.onListOpen,"mouseover-input":t.onMouseenter},nativeOn:{mouseover:function(t){return t.stopPropagation(),t}}},t.hasItemLiteral?{"item-literal-select":t.onItemLiteralSelect}:{})):n("span",{class:["label",{"label-placehold":!t.term.label&&t.finalPlaceholder}],domProps:{innerHTML:t._s(t.term.label||t.finalPlaceholder)}})],1)};z._withStripped=!0;var R=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vsm-autocomplete"},[n("the-input",{ref:"theInput",attrs:{placeholder:t.placeholder,autofocus:t.autofocus,"show-error":t.showError},on:{focus:t.onInputFocus,blur:t.onInputBlur,"key-ctrl-enter":t.onKeyCtrlEnter,"key-shift-enter":t.onKeyShiftEnter,"key-up":t.onKeyUp,"key-down":t.onKeyDown,"key-esc":t.onKeyEsc,"key-enter":t.onKeyEnter,"key-bksp":t.onKeyBksp,"key-tab":t.onKeyTab,click:t.onInputClick,dblclick:t.onInputDblclick},nativeOn:{mouseover:function(e){return t.onInputHover(e)}},model:{value:t.inputStr,callback:function(e){t.inputStr=e},expression:"inputStr"}}),t._v(" "),t.isListOpen?n("the-list",{attrs:{"search-str":t.activeSearchStr||"",items:t.matches,"max-string-lengths":t.sanitizedMaxStringLengths,"query-options":t.queryOptions2,"dict-infos":t.dictInfos,"has-item-literal":t.hasItemLiteral,"custom-item-literal":t.customItemLiteral,"custom-item":t.customItem,"active-index":t.activeIndex,"vsm-dictionary":t.vsmDictionary},on:{"item-hover":t.onItemHover,"item-click":t.onItemClick}}):t._e(),t._v(" "),t.isSpinnerShown?n("the-spinner",{class:{"list-closed":!t.isListOpen}}):t._e()],1)};R._withStripped=!0;var A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"input-wrap"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.str,expression:"str"}],ref:"input",class:["input",{error:t.showError}],attrs:{autofocus:t.autofocus,spellcheck:"false"},domProps:{value:t.str},on:{focus:t.onFocus,blur:t.onBlur,keydown:[function(e){return"button"in e||!t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyUp(e):null},function(e){return"button"in e||!t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyDown(e):null},function(e){return"button"in e||!t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.preventDefault(),t.onKeyEsc(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyEnter(e):null},function(e){return"button"in e||8===e.keyCode?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyBksp(e):null},function(e){return"button"in e||!t._k(e.keyCode,"tab",9,e.key,"Tab")?e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onKeyTab(e):null},function(e){return("button"in e||!t._k(e.keyCode,"tab",9,e.key,"Tab"))&&e.shiftKey?e.ctrlKey||e.altKey||e.metaKey?null:t.onKeyShiftTab(e):null},function(e){return("button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter"))&&e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onKeyCtrlEnter(e):null},function(e){return("button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter"))&&e.shiftKey?e.ctrlKey||e.altKey||e.metaKey?null:t.onKeyShiftEnter(e):null}],click:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onClick(e):null},dblclick:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onDblclick(e):null},input:function(e){e.target.composing||(t.str=e.target.value)}}}),t._v(" "),t.placeholder?n("span",{class:["placehold",{focus:t.hasFocus,hidden:!t.showPlaceholder}],domProps:{textContent:t._s(t.placeholder)}}):t._e()])};A._withStripped=!0;var F={name:"TheInput",props:{placeholder:{type:[String,Boolean],default:!1},autofocus:{type:Boolean,default:!1},showError:{type:Boolean,default:!1},value:{type:String,default:""}},data:function(){return{input:null,str:this.value,hasFocus:!1}},computed:{showPlaceholder(){return this.placeholder&&!this.str}},watch:{value:function(t){this.str=t},str:function(t){this.$emit("input",t)}},mounted:function(){this.input=this.$refs.input},methods:{onFocus(){this.cursorToEnd(),this.hasFocus=!0,this.$emit("focus")},onBlur(){this.hasFocus=!1,this.$emit("blur")},cursorToEnd(){setTimeout(()=>{this.input.selectionStart=this.input.selectionEnd=this.str.length},0)},onKeyUp(){this.$emit("key-up")},onKeyDown(){this.$emit("key-down")},onKeyEsc(){this.$emit("key-esc")},onKeyEnter(){this.$emit("key-enter")},onKeyBksp(t){this.$emit("key-bksp",t)},onKeyTab(t){this.$emit("key-tab","",t)},onKeyShiftTab(t){this.$emit("key-tab","shift",t)},onKeyCtrlEnter(){this.$emit("key-ctrl-enter")},onKeyShiftEnter(){this.$emit("key-shift-enter")},onClick(){this.hasFocus=!0,this.$emit("click")},onDblclick(){this.cursorToEnd(),this.hasFocus=!0,this.$emit("dblclick")}}},j=(n(16),a(F,A,[],!1,null,"819a3320",null));j.options.__file="node_modules/vsm-autocomplete/src/subcomponents/TheInput.vue";var B=j.exports,H=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"list",on:{mousedown:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.preventDefault(),e):null},click:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onClick(e):null}}},[t._l(t.items,(function(e,i){return n("list-item",{key:i+e.id+e.str,class:["item",{"item-pos-first":0==i,"item-pos-last":i==t.items.length-1,"item-type-number":"N"==e.type,"item-type-ref":"R"==e.type,"item-type-fixed":"F"==e.type||"G"==e.type,"item-type-fixed-last":i==t.indexLastFixedItem,"item-state-active":t.isActive(i)}],attrs:{"search-str":t.searchStr,index:i,item:e,"max-string-lengths":t.maxStringLengths,"query-options":t.queryOptions,"custom-item":t.customItem,"dict-info":t.dictInfos[e.dictID],"vsm-dictionary":t.vsmDictionary,unselectable:"on"},on:{hover:t.onItemHover,click:t.onItemClick}})})),t._v(" "),t.hasItemLiteral?n("list-item-literal",{class:["item","item-type-literal",{"item-state-active":t.isActive(t.items.length)}],attrs:{"search-str":t.searchStr,index:t.items.length,"max-string-lengths":t.maxStringLengths,"custom-item-literal":t.customItemLiteral,unselectable:"on"},on:{hover:t.onItemHover,click:t.onItemClick}}):t._e()],2)};H._withStripped=!0;var $=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{on:{mousemove:t.onHover,mousedown:function(e){return e.preventDefault(),t.onMousedown(e)},click:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onClick(e):null}}},[n("span",{staticClass:"item-part-str",attrs:{title:t.strs.strTitle},domProps:{innerHTML:t._s(t.strs.str)}}),t._v(" "),t.strs.descr?n("span",{staticClass:"item-part-descr",attrs:{title:t.strs.descrTitle},domProps:{innerHTML:t._s(t.strs.descr)}}):t._e(),t._v(" "),t.strs.info?n("span",{staticClass:"item-part-info",attrs:{title:t.strs.infoTitle},domProps:{innerHTML:t._s(t.strs.info)}}):t._e(),t._v(" "),t.strs.extra?n("span",{staticClass:"item-part-extra",domProps:{innerHTML:t._s(t.strs.extra)}}):t._e()])};$._withStripped=!0;var U=n(2),q=n.n(U);function N(t,e){return t.length<=e?t:t.substr(0,e-1)+"…"}function W(t){return t.replace(/<(\s*(script|iframe|style|textarea)\W)/g,"&lt;$1")}var X={name:"ListItem",props:{searchStr:{type:String,default:""},index:{type:Number,default:0},item:{type:Object,required:!0},maxStringLengths:{type:Object,required:!0},queryOptions:{type:Object,default:()=>({})},customItem:{type:[Function,Boolean],default:!1},dictInfo:{type:Object,default:void 0},vsmDictionary:{type:Object,default:()=>({})}},computed:{isNumberItem(){return"N"==this.item.type||this.vsmDictionary&&this.vsmDictionary.numberMatchConfig&&this.item.dictID==this.vsmDictionary.numberMatchConfig.dictID},strs(){var t=this.item.str||"",e=q()(N(t,this.maxStringLengths.str),this.item.style),n=t.length>this.maxStringLengths.str?t:"",i=Math.min(t.length,this.maxStringLengths.str),s=this.item.descr||"",o=N(s,this.maxStringLengths.strAndDescr-i),r=i+s.length>this.maxStringLengths.strAndDescr?s:"",a=this.isNumberItem?this.uriTail(this.item.id):"R"==this.item.type?"":(this.dictInfo||{}).abbrev||this.uriTail(this.item.dictID);if(this.isNumberItem){var l=this.vsmDictionary&&this.vsmDictionary.numberMatchConfig?this.vsmDictionary.numberMatchConfig.conceptIDPrefix:"";a=a.replace(l,"")}var c={str:e,strTitle:n,descr:o,descrTitle:r,info:a,infoTitle:this.uriTail(this.item.id)+(this.dictInfo&&this.dictInfo.name?` in ${this.dictInfo.name}`:""),extra:""};return this.customItem&&(c=this.customItem({item:this.item,searchStr:this.searchStr,maxStringLengths:this.maxStringLengths,queryOptions:this.queryOptions,dictInfo:this.dictInfo,vsmDictionary:this.vsmDictionary,strs:c})),c.strTitle||(c.strTitle=!1),c.descrTitle||(c.descrTitle=!1),c.infoTitle||(c.infoTitle=!1),c.str=W(c.str),c.descr=!!c.descr&&W(this.isNumberItem||"R"==this.item.type?"["+c.descr+"]":"("+c.descr+")"),c.info=!!c.info&&W("("+c.info+")"),c.extra=!!c.extra&&W(c.extra),c}},methods:{onHover(){this.$emit("hover",this.index)},onMousedown(){this.$emit("hover",this.index)},onClick(){this.$emit("click",this.index)},uriTail:t=>(t||"").replace(/^.*\/([^/]*)$/,"$1")}},V=(n(18),a(X,$,[],!1,null,"0e6a8568",null));V.options.__file="node_modules/vsm-autocomplete/src/subcomponents/ListItem.vue";var Y=V.exports,Z=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{attrs:{title:t.strs.strTitle},domProps:{innerHTML:t._s(t.strs.str)},on:{mousemove:t.onHover,mousedown:function(e){return e.preventDefault(),t.onMousedown(e)},click:function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onClick(e):null}}})};Z._withStripped=!0;var J={name:"ListItemLiteral",props:{searchStr:{type:String,default:""},index:{type:Number,default:0},maxStringLengths:{type:Object,required:!0},customItemLiteral:{type:[Function,Boolean],default:!1}},computed:{strs(){var t={str:N(this.searchStr,this.maxStringLengths.str),strTitle:`Search for '${this.searchStr}'`};return this.customItemLiteral&&(t=this.customItemLiteral({searchStr:this.searchStr,maxStringLengths:this.maxStringLengths,strs:t})),t.str=W(t.str),t}},methods:{onHover(){this.$emit("hover",this.index)},onMousedown(){this.$emit("hover",this.index)},onClick(){this.$emit("click",this.index)}}},G=(n(20),a(J,Z,[],!1,null,"b1fa2252",null));G.options.__file="node_modules/vsm-autocomplete/src/subcomponents/ListItemLiteral.vue";var Q={name:"TheList",components:{ListItem:Y,ListItemLiteral:G.exports},props:{searchStr:{type:String,default:""},items:{type:Array,required:!0},maxStringLengths:{type:Object,required:!0},queryOptions:{type:Object,default:()=>({})},dictInfos:{type:Object,required:!0},hasItemLiteral:{type:Boolean,default:!1},customItemLiteral:{type:[Function,Boolean],default:!1},customItem:{type:[Function,Boolean],default:!1},activeIndex:{type:Number,default:0},vsmDictionary:{type:Object,default:()=>({})}},computed:{indexLastFixedItem(){return this.items.reduce((t,e,n)=>"F"==e.type||"G"==e.type?n:t,-1)}},methods:{isActive(t){return t==this.activeIndex},onClick(){this.onItemClick(this.activeIndex)},onItemHover(t){this.$emit("item-hover",t)},onItemClick(t){this.$emit("item-click",t)}}},tt=(n(22),a(Q,H,[],!1,null,"1938b968",null));tt.options.__file="node_modules/vsm-autocomplete/src/subcomponents/TheList.vue";var et=tt.exports,nt=function(){var t=this.$createElement,e=this._self._c||t;return e("transition",{attrs:{name:"fade"}},[e("div",{staticClass:"spinner"})])};nt._withStripped=!0;var it={name:"TheSpinner"},st=(n(24),a(it,nt,[],!1,null,"9aab1482",null));st.options.__file="node_modules/vsm-autocomplete/src/subcomponents/TheSpinner.vue";var ot=st.exports,rt=[["α","alpha"],["β","beta"],["γ","gamma"],["δ","delta"],["ε","epsilon"],["ζ","zeta"],["η","eta"],["θ","theta"],["ι","iota"],["κ","kappa"],["λ","lambda"],["μ","mu"],["ν","nu"],["ξ","xi"],["ο","omicron"],["π","pi"],["ρ","rho"],["σ","sigma"],["τ","tau"],["υ","upsilon"],["φ","phi"],["χ","chi"],["ψ","psi"],["ω","omega"],["∀","forall"],["∃","exist"],["∧","and"],["∨","or"],["¬","not"],["∏","prod"],["∑","sum"],["µ","micro"]];var at={name:"VsmAutocomplete",components:{TheInput:B,TheList:et,TheSpinner:ot},props:{vsmDictionary:{type:Object,required:!0},autofocus:{type:Boolean,default:!1},placeholder:{type:[String,Boolean],default:!1},initialValue:{type:String,default:""},queryOptions:{type:Object,default:()=>({perPage:20})},maxStringLengths:{type:Object,default:()=>({str:40,strAndDescr:70})},freshListDelay:{type:Number,default:0},customItemLiteral:{type:[Function,Boolean],default:!1},customItem:{type:[Function,Boolean],default:!1}},data:function(){return{inputStr:this.initialValue,activeSearchStr:!1,loadingFixedTerms:0,showError:!1,mayListOpen:!1,listClosedHard:!1,autoChangedInputStr:!1,matches:[],dictInfos:{},activeIndex:0}},computed:{searchStr(){return this.inputStr.trim()},queryOptions2(){return Object.assign({},this.queryOptions,{page:1},this.customItem?{}:{z:[]})},hasItemLiteral(){return this.$listeners&&this.$listeners["item-literal-select"]&&!!this.activeSearchStr},listLength(){return this.matches.length+(this.hasItemLiteral?1:0)},isListOpen(){return this.mayListOpen&&this.listLength>0},isListStale(){return this.searchStr!==this.activeSearchStr},isSpinnerShown(){return this.mayListOpen&&this.isListStale},hasKeyTabListener(){return this.$listeners&&this.$listeners["key-tab"]},hasItemActiveListener(){return this.$listeners&&this.$listeners["item-active-change"]},activeItemKey(){if(this.hasItemActiveListener){if(this.isListOpen){if(this.hasItemLiteral&&this.activeIndex==this.listLength-1)return"-"+this.searchStr;var t=this.matches[this.activeIndex];return this.activeIndex+","+t.id+t.str}return!1}},sanitizedMaxStringLengths(){return Object.assign({str:Number.MAX_VALUE,strAndDescr:Number.MAX_VALUE},this.maxStringLengths)}},watch:{vsmDictionary:function(){this.resetComponent()},initialValue:function(t){this.inputStr!==t&&(this.inputStr=this.autoChangedInputStr=t)},queryOptions:function(){this.resetComponent()},searchStr:function(){this.onInputChange(),this.$emit("input-change",this.searchStr)},inputStr:function(){this.$emit("input",this.inputStr)},isListOpen:function(t){this.$emit("list-"+(t?"open":"close"))},activeItemKey:function(t){this.$emit("item-active-change",!!t&&(t.startsWith("-")?t.substr(1):this.matches[+t.replace(/^(\d+),.*$/,"$1")]))}},created:function(){this.resetComponent()},mounted:function(){this.$emit("input-change",this.searchStr),this.$emit("input",this.inputStr)},methods:{resetComponent(){this.resetList(),this.loadingFixedTerms++,this.loadFixedTermsMaybe(()=>{0==--this.loadingFixedTerms&&this.requestListDataMaybe()})},loadFixedTermsMaybe(t){this.queryOptions2.idts?this.vsmDictionary.loadFixedTerms(this.queryOptions2.idts,this.queryOptions2,t):t(null)},onInputChange(){var t=!this.isListOpen&&this.inputStr===this.autoChangedInputStr;this.autoChangedInputStr=!1,this.isListOpen||this.resetList(),t||this.openList()},onKeyCtrlEnter(){var t=function(t){return rt.reduce((t,e)=>t.replace(new RegExp("[\\\\/]"+e[1],"g"),e[0]).replace(new RegExp("[\\\\/]"+e[1],"gi"),e[0].toUpperCase()),t)}(this.inputStr);t!=this.inputStr?this.inputStr=t:(this.closeList(),this.$emit("key-ctrl-enter"))},onKeyShiftEnter(){this.closeList(),this.$emit("key-shift-enter")},onInputFocus(){this.openList(!1),this.$emit("focus")},onInputBlur(){this.closeList(!1),this.$emit("blur")},openList(t=!0){this.listClosedHard&&!t||(this.listClosedHard=!1,this.mayListOpen=!0,this.requestListDataMaybe())},closeList(t=!0){this.mayListOpen=!1,t&&(this.listClosedHard=!0),this.isListStale&&this.resetList()},resetList(){this.matches=[],this.dictInfos={},this.activeIndex=0,this.activeSearchStr=!1},requestListDataMaybe(){!this.loadingFixedTerms&&this.mayListOpen&&this.isListStale&&this.requestListData()},requestListData(){this.vsmDictionary.getMatchesForString(this.searchStr,this.queryOptions2,this.newMatchesArrived.bind(this,this.searchStr,this.queryOptions2))},newMatchesArrived(t,e,n,i){if(t===this.searchStr&&e===this.queryOptions2&&this.mayListOpen){var s=n?[]:i.items,o=this.newDictInfosArrived.bind(this,t,e,s);if(n)return o(n);var r=[...new Set(s.map(t=>t.dictID))];if(!r.length)return o(null,{items:[]});this.vsmDictionary.getDictInfos({filter:{id:r}},o)}},newDictInfosArrived(t,e,n,i,s){if(t===this.searchStr&&e===this.queryOptions2){if(this.showError=!!i,!i){var o={};[this.vsmDictionary.getExtraDictInfos(),s.items].forEach(t=>t.forEach(t=>o[t.id]=t)),this.dictInfos=o}this.isListStale&&(this.activeIndex=0),this.matches=i?[]:n,this.activeSearchStr=t,this.lastFreshListTime=Date.now()}},openFreshList(){this.isListStale&&this.resetList(),this.openList()},onKeyUp(){this.isListOpen?this.isListStale||(this.activeIndex=(this.activeIndex||this.listLength)-1):this.openFreshList()},onKeyDown(){this.isListOpen?this.isListStale||(this.activeIndex=this.activeIndex>=this.listLength-1?0:this.activeIndex+1):this.openFreshList()},onKeyEsc(){this.isListOpen||this.$emit("key-esc"),this.closeList()},onKeyEnter(){this.isListOpen?this.selectItem(this.activeIndex):this.openFreshList()},onKeyBksp(t){!this.inputStr||this.searchStr||this.$refs.theInput.input.selectionStart||(this.inputStr=""),this.inputStr||(this.closeList(),t.preventDefault(),this.$emit("key-bksp"))},onKeyTab(t,e){this.hasKeyTabListener&&(this.$emit("key-tab",t),e.preventDefault())},onInputClick(){this.openList()},onInputDblclick(){this.closeList(),this.$emit("dblclick")},onInputHover(){this.$emit("mouseover-input")},onItemHover(t){this.isListStale||(this.activeIndex=t)},onItemClick(t){this.selectItem(t)},isListTooFresh(){return Date.now()-this.lastFreshListTime<this.freshListDelay},selectItem(t){this.isListStale||this.isListTooFresh()||(this.closeList(),this.hasItemLiteral&&t==this.listLength-1?this.$emit("item-literal-select",this.searchStr):this.$emit("item-select",this.matches[t]),this.resetList())}}},lt=(n(26),a(at,R,[],!1,null,"7667f44a",null));lt.options.__file="node_modules/vsm-autocomplete/src/VsmAutocomplete.vue";var ct=lt.exports;function ut(t){return t.replace(/<(\s*(script|iframe|style|textarea)\W)/gi,"&lt;$1")}function ht(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),i.forEach((function(e){dt(t,e,n[e])}))}return t}function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var pt=-1,ft={newEndTerm:function(){return ft.newEditTerm(!0)},newEditTerm:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ht({str:"",label:"",x:0,y:0,width:0,height:0,type:"EI",key:++pt},t&&{isEndTerm:t})},clone:function(t){return JSON.parse(JSON.stringify(t))},prepToReceive:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=ft.clone(t);return ft.inferType(n),e&&(n.key=++pt),ft.pruneProperties(n),n},prepToReceiveForPaste:function(t){var e=ft.prepToReceive(t,!1);return ft.deleteInternallyUsedProperties(e),delete e.isFocal,delete e.minWidth,delete e.maxWidth,delete e.editWidth,delete e.queryOptions,delete e.placeholder,e},inferType:function(t){t.type=void 0===t.str?["ER","EC","EL"].includes(t.type)?t.type:"EI":void 0===t.classID?"L":void 0===t.instID?"C":void 0===t.parentID?"I":"R"},pruneProperties:function(t){var e=t.type;"R"==e?t.classID&&t.parentID||(t.classID=t.parentID=null):(delete t.parentID,"I"!=e&&(delete t.instID,"C"!=e&&delete t.classID));var n=!["R","I","C"].includes(e);!n&&t.dictID||delete t.dictID,!n&&t.descr||delete t.descr,t.style&&!ft.isEditable(t)||delete t.style,delete t.label,delete t.backup,delete t.drag},isEditable:function(t){return"E"==t.type[0]},cycleType:function(t,e,n){var i=ft.isEditable(t)?"E":"",s=(i||t.classID||e?["I","C","L","R","I"]:["L","R","L"]).map((function(t){return i+t}));t.type=s[s.indexOf(t.type)+1],ft.ensureIDs(t,n)},setType:function(t,e,n){t.type=e,ft.ensureIDs(t,n)},ensureIDs:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];["classID","instID","parentID"].forEach((function(n){void 0===t[n]&&(e?e.$set(t,n,null):t[n]=null)}))},makeFocal:function(t,e,n){e?n.$set(t,"isFocal",!0):n.$delete(t,"isFocal")},prepToEmit:function(t){var e=ft.clone(t),n=ft.isEditable(e);return ft.pruneProperties(e),n&&delete e.str,n&&"EI"!=e.type||delete e.type,ft.deleteInternallyUsedProperties(e),e},deleteInternallyUsedProperties:function(t){delete t.label,delete t.key,delete t.x,delete t.width,delete t.y,delete t.height,delete t.isEndTerm,delete t.drag,delete t.backup},createEditTerm:function(t){var e=ut(t.str),n=Object.assign(ft.clone(t),{type:"E"+t.type,label:e,backup:ht({type:t.type,str:t.str},t.style&&{style:t.style},{label:t.label})});return delete n.style,n},createRestoredTerm:function(t){var e=Object.assign(ft.clone(t),t.backup);return delete e.backup,e},unsetAsEndTerm:function(t,e){e.$delete(t,"isEndTerm")},createRorLTerm:function(t){return t=Object.assign(ft.clone(t),{type:t.type.replace("E","")}),ft.ensureIDs(t),t},createTermFromMatch:function(t,e){return t=Object.assign(ft.clone(t),{type:e.termType||(""===e.id?"R":"EC"==t.type?"C":"I"),str:e.str,classID:e.id||null,instID:null,parentID:e.parentID||null,style:e.style||"",dictID:e.dictID,descr:e.descr}),"R"!=e.type&&"N"!=e.type||(t.descr=""),ft.pruneProperties(t),t},keepCoreProps:function(t){return["str","style","type","dictID","descr","classID","instID","parentID"].reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})},prepForCopy:function(t,e){var n=ft.keepCoreProps(ft.prepToEmit(t));return void 0!==n.instID&&(e&&(n.parentID=n.instID),n.instID=null),n},prepForPaste:function(t,e){var n=ft.clone(t);return delete n.style,delete n.label,Object.assign(n,ft.prepToReceiveForPaste(e),{instID:null})}},mt=ft,yt=a({name:"Term",components:{"vsm-autocomplete":ct},props:{index:{type:Number,required:!0},term:{type:Object,required:!0},hasInput:{type:Boolean,default:!1},vsmDictionary:{type:Object,required:!0},queryOptions:{type:[Object,Boolean],default:!1},autofocus:{type:Boolean,default:!1},placeholder:{type:[String,Boolean],default:!1},tabListenMode:{type:Number,default:3},maxStringLengths:{type:Object,required:!0},freshListDelay:{type:Number,default:0},hasItemLiteral:{type:Boolean,default:!0},customItem:{type:[Function,Boolean],default:!1},customItemLiteral:{type:[Function,Boolean],default:!1}},data:function(){return{hasFocus:!1,noFade:!1}},computed:{isEditType:function(){return this.term.type&&"E"==this.term.type[0]},showPlain:function(){return this.hasInput&&("EL"==this.term.type||"ER"==this.term.type)},showAutocomplete:function(){return this.hasInput&&!this.showPlain},finalQueryOptions:function(){return mt.clone(Object.assign({},this.queryOptions,this.term.queryOptions))},finalPlaceholder:function(){return this.isEditType&&(this.term.placeholder||this.placeholder)||""},showPlainPlaceholder:function(){return this.showPlain&&this.finalPlaceholder&&!this.term.str}},watch:{showPlain:{immediate:!0,handler:function(t){t&&this.emitInput(this.term.str)}},term:{deep:!0,immediate:!0,handler:function(){var t=this;this.noFade=!0,setTimeout((function(){return t.noFade=!1}),2)}}},methods:{emit2:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.$emit.apply(this,[t,this.index].concat(n))},inputElement:function(){return this.$el.querySelector("input")},onKeyBksp_plain:function(t){var e=this.$refs.input_plain;!e.value||e.value.trim()||e.selectionStart||this.emitInput(e.value=""),e.value||(this.onKeyBksp(),t.preventDefault())},onKeyCtrlBksp:function(){if(this.term.str.trim()){var t=this.inputElement();t&&!t.selectionStart&&this.emitInput(t.value="")}else this.emit2("key-ctrl-bksp")},onKeyTab:function(t){this.tabHandler(t,"",1&this.tabListenMode)},onKeyShiftTab:function(t){this.tabHandler(t,"shift",2&this.tabListenMode)},tabHandler:function(t,e,n){n&&t.preventDefault(),this.emit2("key-tab",n?e:"ignore")},onKeyEsc:function(){this.emit2("key-esc")},onKeyBksp:function(){this.emit2("key-bksp")},onKeyCtrlEnter:function(){this.emit2("key-ctrl-enter")},onKeyAltUp:function(){this.emit2("key-alt-up")},onKeyAltDown:function(){this.emit2("key-alt-down")},onKeyCtrlDelete:function(){this.emit2("key-ctrl-delete")},onKeyShiftEnter:function(){this.emit2("key-shift-enter")},onMouseleave:function(){this.emit2("mouseleave")},onMouseenter:function(){this.emit2("mouseenter")},emitInput:function(t){this.emit2("input",t)},onInput:function(t){this.emitInput(t)},onFocus:function(){this.hasFocus=!0,this.emit2("focus")},onBlur:function(){this.hasFocus=!1,this.emit2("blur")},onListOpen:function(){this.emit2("list-open")},onItemSelect:function(t){this.emit2("item-select",t)},onItemLiteralSelect:function(){this.emit2("item-literal-select")},onKeyEnter_plain:function(){this.emit2("plain-enter")},onMousedown_div:function(){(this.showPlain||this.showAutocomplete)&&this.inputElement().focus()},onMousedown:function(t){this.emit2("mousedown",t)},onCtrlShiftMousedown:function(t){this.emit2("ctrl-shift-mousedown",t)},onCtrlMousedown:function(){this.emit2("ctrl-mousedown")},onAltMousedown:function(){this.emit2("alt-mousedown")},onClick:function(){this.emit2("click")},onClick_div:function(){this.sendToAC("click")},onDblclick:function(){var t=this.$refs.input_plain;t&&(t.selectionStart=t.selectionEnd=this.term.str.length),this.sendToAC("dblclick"),this.emit2("dblclick")},sendToAC:function(t){var e=this.$refs.vsmac;e&&(e=this.inputElement()),e&&e.dispatchEvent(new MouseEvent(t,{bubbles:!1}))}}},z,[],!1,null,"179b8284",null);yt.options.__file="src/subcomponents/Term.vue";var vt=yt.exports,bt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"popup",style:{top:t.px(t.term.y+t.term.height),left:t.px(t.term.x)},on:{mouseenter:t.onMouseenter,mouseleave:t.onMouseleave}},[n("div",{staticClass:"hover-extend ext1",style:{top:t.px(-t.term.height),left:t.px(-t.termMargin.left),width:t.px(t.termMargin.left),height:t.px(t.term.height)}}),t._v(" "),n("div",{staticClass:"hover-extend ext2",style:{top:t.px(-t.term.height),left:t.px(t.term.width),width:t.px(t.termMargin.right),height:t.px(t.term.height)}}),t._v(" "),n("div",{staticClass:"hover-extend ext3"}),t._v(" "),n("div",{staticClass:"arrow"}),t._v(" "),n("div",{class:["arrow-inner",{"no-info-panel":!t.hasInfo}]}),t._v(" "),n("div",{staticClass:"content"},[t.hasInfo?n("div",{staticClass:"info"},[t.isTypeRIC?n("div",{staticClass:"info-term"},[n("div",{staticClass:"str",domProps:{innerHTML:t._s(t.strs.str)}}),t._v(" "),n("div",{staticClass:"descr",domProps:{innerHTML:t._s(t.strs.descr)}}),t._v(" "),n("div",{staticClass:"grey dict",domProps:{innerHTML:t._s(t.strs.dict)}}),t._v(" "),n("div",{staticClass:"grey ids comma-sep"},[t.isTypeRIC?n("span",{staticClass:"class-id",domProps:{innerHTML:t._s(t.strs.classID)}}):t._e(),"R"==t.term.type?n("span",{staticClass:"parent-id",domProps:{innerHTML:t._s(t.strs.parentID)}}):t._e(),t.isTypeRI?n("span",{staticClass:"inst-id",domProps:{innerHTML:t._s(t.strs.instID)}}):t._e()])]):t._e(),t._v(" "),t.strs.infoExtra1?n("div",{staticClass:"grey info-extra1",domProps:{innerHTML:t._s(t.strs.infoExtra1)}}):t._e(),t._v(" "),t.hasSettings?n("div",{staticClass:"info-settings"},[t.strs.queryFilter.length?n("div",{staticClass:"query-filter list"},t._l(t.strs.queryFilter,(function(e){return n("div",{key:e,domProps:{innerHTML:t._s(e)}})})),0):t._e(),t._v(" "),t.strs.querySort.length?n("div",{staticClass:"query-sort list"},t._l(t.strs.querySort,(function(e){return n("div",{key:e,domProps:{innerHTML:t._s(e)}})})),0):t._e(),t._v(" "),t.strs.queryFixedTerms.length?n("div",{staticClass:"query-fixedterms list"},t._l(t.strs.queryFixedTerms,(function(e){return n("div",{key:e,domProps:{innerHTML:t._s(e)}})})),0):t._e(),t._v(" "),t.strs.queryZ?n("div",{staticClass:"query-z",domProps:{innerHTML:t._s(t.strs.queryZ)}}):t._e(),t._v(" "),t.strs.placeholder?n("div",{staticClass:"placeholder",domProps:{innerHTML:t._s(t.strs.placeholder)}}):t._e(),t._v(" "),t.hasWidths?n("div",{staticClass:"widths comma-sep"},[t.strs.minWidth?n("span",{staticClass:"min-width",domProps:{innerHTML:t._s(t.strs.minWidth)}}):t._e(),t._v(" "),t.strs.maxWidth?n("span",{staticClass:"max-width",domProps:{innerHTML:t._s(t.strs.maxWidth)}}):t._e(),t._v(" "),t.strs.editWidth?n("span",{staticClass:"edit-width",domProps:{innerHTML:t._s(t.strs.editWidth)}}):t._e(),t._v(" "),t.strs.widthScale?n("span",{staticClass:"width-scale",domProps:{innerHTML:t._s(t.strs.widthScale)}}):t._e()]):t._e()]):t._e(),t._v(" "),t.strs.infoExtra2?n("div",{staticClass:"grey info-extra2",domProps:{innerHTML:t._s(t.strs.infoExtra2)}}):t._e()]):t._e(),t._v(" "),n("div",{staticClass:"menu"},[t.strs.menuExtra1?n("div",{staticClass:"menu-block"},[n("div",{staticClass:"menu-extra1",domProps:{innerHTML:t._s(t.strs.menuExtra1)}})]):t._e(),t._v(" "),n("div",{staticClass:"menu-block"},[t.isTermEditable?t._e():n("div",{staticClass:"item edit",on:{click:t.onMenuEdit}},[t._v("Edit"),n("span",{staticClass:"hotkey"},[t._v("Doubleclick")])]),t._v(" "),t.isTermEditable&&t.term.backup?n("div",{staticClass:"item undo-edit",on:{click:t.onMenuUndoEdit}},[t._v("Undo edit"),n("span",{staticClass:"hotkey"},[t._v("Esc")])]):t._e(),t._v(" "),t.isTermEditable?t._e():n("div",{class:["item","copy",{inactive:!t.isCopyActive}],on:{click:t.onMenuCopy}},[t._v("Copy")]),t._v(" "),t.isTermEditable?t._e():n("div",{class:["item","copy-ref",{inactive:!t.isCopyRefActive}],on:{click:t.onMenuCopyRef}},[t._v("Copy reference")]),t._v(" "),t.isTermEditable?n("div",{class:["item","paste",{inactive:!t.isPasteActive}],on:{click:t.onMenuPaste}},[t._v("Paste")]):t._e()]),t._v(" "),n("div",{staticClass:"menu-block"},[n("div",{staticClass:"item types"},[t._v("\n Type:\n "),n("span",{class:["type","ref",{selected:t.isTypeLike("R")}],attrs:{title:"Referring instance"},on:{click:function(){return t.onMenuSetType("R")}}},[t._v("Ref.")]),n("span",{class:["type","inst",{selected:t.isTypeLike("I"),inactive:!t.canBecomeTypeIorC}],attrs:{title:"Instance"},on:{click:function(){return t.onMenuSetType("I")}}},[t._v("Inst.")]),n("span",{class:["type","class",{selected:t.isTypeLike("C"),inactive:!t.canBecomeTypeIorC}],on:{click:function(){return t.onMenuSetType("C")}}},[t._v("Class")]),n("span",{class:["type","lit",{selected:t.isTypeLike("L")}],attrs:{title:"Literal data"},on:{click:function(){return t.onMenuSetType("L")}}},[t._v("Lit.")]),t._v(" "),n("span",{staticClass:"hotkey"},[t._v("Ctrl+click")])]),t._v(" "),t.isTermEditable&&"EI"!=t.term.type?n("div",{staticClass:"item reset",on:{click:function(){return t.onMenuSetType("I")}}},[t._v("\n Reset type\n "),t.term.isEndTerm?n("span",{staticClass:"hotkey"},[t._v("Ctrl+Del")]):t._e()]):t._e(),t._v(" "),t.term.isEndTerm?t._e():n("div",{staticClass:"item focal",on:{click:t.onMenuFocal}},[t._v("\n "+t._s(t.term.isFocal?"Unset as":"Make")+" focal\n "),n("span",{staticClass:"hotkey"},[t._v("Alt+click")])])]),t._v(" "),n("div",{staticClass:"menu-block"},[n("div",{staticClass:"item insert",on:{click:t.onMenuInsert}},[t._v("\n Insert term\n "),t.term.isEndTerm?n("help"):t._e()],1),t._v(" "),t.term.isEndTerm?t._e():n("div",{staticClass:"item remove",on:{click:t.onMenuRemove}},[t._v("\n Remove\n "),n("help")],1)]),t._v(" "),t.strs.menuExtra2?n("div",{staticClass:"menu-block"},[n("div",{staticClass:"menu-extra2",domProps:{innerHTML:t._s(t.strs.menuExtra2)}})]):t._e()])])])};bt._withStripped=!0;var gt=function(){var t=this.$createElement;return(this._self._c||t)("span",{staticClass:"hotkey help",attrs:{title:"--Terms--\nDoubleclick: show popup for empty Term, or edit normal Term\nMousehover: show popup for normal Term\nMousedrag: move normal Term\nCtrl+Shift+Mousedrag: move empty Term\nAlt+Up/Down: move empty Term\nCtrl+Del: remove empty Term, or reset empty end-Term\nCtrl+Bksp: remove Term to the left\nCtrl+Enter: insert empty Term to the right\nAlt+Click: assign Term as sentence head\n--Connectors--\nAdd trident: click above 3 Terms and above any other connector,\n to assign subject, relation, object.\nAdd bident: click twice above a Term to omit subject or relation,\n or Esc (or click outside vsm-box) to omit object.\nAdd list: Shift+click for relation, then click for elements, then Esc.\nAdd coreference: Ctrl+click for child, then click for parent.\nRemove connector: hover it and click the X.\n['vsm-box': developed by stcruy]"},on:{click:function(t){return t.stopPropagation(),t}}},[this._v("\n Help (hover me)\n ")])};gt._withStripped=!0;var Ct=a({},gt,[],!1,null,null,null);Ct.options.__file="src/subcomponents/Help.vue";var xt=Ct.exports;function kt(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function wt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),i.forEach((function(e){Tt(t,e,n[e])}))}return t}function Tt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Lt=0,It={name:"ThePopup",components:{help:xt},props:{index:{type:Number,required:!0},term:{type:Object,required:!0},vsmDictionary:{type:Object,default:function(){return{}}},sizes:{type:Object,default:function(){return{}}},allowClassNull:{type:Boolean,default:!0},termMargin:{type:Object,default:function(){return{left:0,right:0}}},customPopup:{type:[Function,Boolean],default:!1},termCopy:{type:[Function,Boolean],default:!1},termPaste:{type:[Function,Boolean],default:!1}},data:function(){return{descr:"",dictID:"",filterIDs:[],sortIDs:[],idts:[],zFilter:!0,contentKey:0,zObj:{},dictInfos:{}}},computed:{isTypeRIC:function(){return["R","I","C"].includes(this.term.type)},isTypeRI:function(){return["R","I"].includes(this.term.type)},hasSettings:function(){var t=this.strs;return t.queryFilter.length||t.querySort.length||t.queryFixedTerms.length||t.queryZ||t.placeholder||this.hasWidths},hasInfo:function(){return this.isTypeRIC||this.hasSettings},hasWidths:function(){return this.strs.minWidth||this.strs.maxWidth||this.strs.editWidth||!!(this.sizes.widthScale-1)},strs:function(){return this.calcStrs()},isTermEditable:function(){return"E"==this.term.type[0]},isCopyActive:function(){return this.termCopy&&!this.isTermEditable},isCopyRefActive:function(){return this.isCopyActive&&this.isTypeRI&&this.term.instID},isPasteActive:function(){return this.termPaste&&this.isTermEditable},canBecomeTypeIorC:function(){return this.isTermEditable||this.allowClassNull||this.term.classID}},watch:{term:{immediate:!0,handler:function(){this.initForNewTerm()}}},methods:{initForNewTerm:function(){var t=null===this.term.classID?"-":"";this.descr=this.term.descr||t,this.dictID=this.term.dictID||t;var e=this.term.queryOptions||{};this.filterIDs=(e.filter||{}).dictID||[],this.sortIDs=(e.sort||{}).dictID||[],this.idts=e.idts||[],this.zFilter=e.z||!0,this.contentKey=Lt++,this.zObj={},this.dictInfos={},this.loadNewData()},loadNewData:function(){this.isTypeRIC&&this.term.classID&&(!this.dictID||!this.descr||this.customPopup&&0!=this.zFilter.length)?this.loadTermData():this.loadDictInfos(),this.loadFixedTermData()},loadTermData:function(){var t=this,e=this.contentKey;this.vsmDictionary.getEntries({filter:wt({id:[this.term.classID]},this.dictID&&{dictID:[this.dictID]}),z:this.customPopup?this.zFilter:[]},(function(n,i){if(e==t.contentKey){if(!n&&i.items.length){var s=i.items[0];t.dictID=s.dictID||t.dictID||"",t.descr=s.descr||t.descr||"",(s.terms||[]).forEach((function(e){t.term.str==e.str&&e.descr&&(t.descr=e.descr)})),t.zObj=s.z||{}}t.dictID=t.dictID||"-",t.descr=t.descr||"-",t.loadDictInfos()}}))},loadFixedTermData:function(){var t=this;if(this.idts.length){var e=this.contentKey;this.vsmDictionary.getEntries({filter:{id:this.idts.map((function(t){return t.id})),z:[]}},(function(n,i){e!=t.contentKey||n||(t.idts=t.idts.map((function(t){return t=Object.assign({},t),i.items.forEach((function(e){if(t.id==e.id){var n=e.terms.find((function(e){return t.str==e.str}))||e.terms[0];t.str=n.str||"",t.style=n.style}})),t})))}))}},loadDictInfos:function(){var t=this,e=kt(new Set((this.dictID&&"-"!=this.dictID?[this.dictID]:[]).concat(this.filterIDs).concat(this.sortIDs)));if(e.length){var n=this.contentKey;this.vsmDictionary.getDictInfos({filter:{id:e}},(function(e,i){n!=t.contentKey||e||i.items.forEach((function(e){return t.$set(t.dictInfos,e.id,e)}))}))}},calcStrs:function(){var t=this,e=this.term,n=function(t){return void 0===t?"":""+t},i="R"!=e.type||e.parentID&&e.classID?1:null,s={str:q()(e.str||"",e.style),descr:this.descr,dict:this.dictString(this.dictID),classID:this.idCalc(i&&e.classID),instID:this.idCalc(e.instID),parentID:this.idCalc(i&&e.parentID),queryFilter:this.filterIDs.map((function(e){return t.dictString(e)})),querySort:this.sortIDs.map((function(e){return t.dictString(e)})),queryFixedTerms:this.idts.map((function(e){return t.idtsString(e)})),queryZ:this.zString(),placeholder:e.placeholder||"",minWidth:n(e.minWidth),maxWidth:n(e.maxWidth),editWidth:n(e.editWidth),widthScale:1==this.sizes.widthScale?"":n(~~(100*this.sizes.widthScale+.5)/100),infoExtra1:"",infoExtra2:"",menuExtra1:"",menuExtra2:""};return this.customPopup&&(s=this.customPopup({strs:s,term:e,type:e.type,dictInfo:this.dictInfos[this.dictID]||{},z:this.zObj,vsmDictionary:this.vsmDictionary,sizes:this.sizes})),Object.keys(s).forEach((function(t){return s[t]=Array.isArray(s[t])?s[t].map((function(t){return ut(t)})):ut(s[t])})),s},idCalc:function(t){var e=void 0===t?"":this.uriTail(t)||"&hellip;";return/^https?:\/\/./.test(t)&&(e='<a href="'.concat(t,'" target="_blank">').concat(e,"</a>")),e},uriTail:function(t){return(t||"").replace(/^.*\/([^/]*)$/,"$1")},dictString:function(t){if("-"==t||!t)return t;var e=this.dictInfos[t]||{id:t};return[e.name?e.name:0,e.abbrev?"("+e.abbrev+")":"["+this.uriTail(e.id)+"]"].filter((function(t){return t})).join(" ")},idtsString:function(t){return(t.str?q()(t.str,t.style)+" ":"")+"["+this.uriTail(t.id)+"]"},zString:function(){return!0===this.zFilter?"":this.zFilter.length?this.zFilter.join(", "):"(none)"},px:function(t){return t+"px"},onMouseenter:function(){this.$emit("mouseenter")},onMouseleave:function(){this.$emit("mouseleave")},emit2:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.$emit.apply(this,[t,this.index].concat(n))},onMenuEdit:function(){this.emit2("edit")},onMenuUndoEdit:function(){this.emit2("undo-edit")},onMenuCopy:function(){this.isCopyActive&&this.emit2("copy")},onMenuCopyRef:function(){this.isCopyRefActive&&this.emit2("copy-ref")},onMenuPaste:function(){this.isPasteActive&&this.emit2("paste")},isTypeLike:function(t){return[t,"E"+t].includes(this.term.type)},onMenuSetType:function(t){var e=(this.isTermEditable?"E":"")+t;e==this.term.type||!this.canBecomeTypeIorC&&["I","C"].includes(e)||this.emit2("set-type",e)},onMenuFocal:function(){this.emit2("toggle-focal")},onMenuInsert:function(){this.emit2("insert")},onMenuRemove:function(){this.emit2("remove")}}},St=(n(28),a(It,bt,[],!1,null,"a3f7a6e6",null));St.options.__file="src/subcomponents/ThePopup.vue";var _t=St.exports,Et={name:"TheTerms",components:{term:vt,"the-popup":_t},props:{vsmDictionary:{type:Object,required:!0},queryOptions:{type:[Object,Boolean],default:!1},autofocus:{type:Boolean,default:!1},placeholder:{type:[String,Boolean],default:!1},cycleOnTab:{type:Boolean,default:!1},maxStringLengths:{type:Object,required:!0},freshListDelay:{type:Number,default:0},advancedSearch:{type:[Function,Boolean],default:!1},allowClassNull:{type:Boolean,default:!0},origTerms:{type:Array,required:!0},sizes:{type:Object,required:!0},customItem:{type:[Function,Boolean],default:!1},customItemLiteral:{type:[Function,Boolean],default:!1},customTerm:{type:[Function,Boolean],default:!1},customPopup:{type:[Function,Boolean],default:!1},termCopy:{type:[Function,Boolean],default:!1},termPaste:{type:[Function,Boolean],default:!1}},data:function(){return{terms:[],padTop:0,padRight:0,padBottom:0,padLeft:0,bkgrColor:"",termPadBordLR:0,termMarginHor:0,termHeight:0,inputIndex:0,popupLoc:-1,width:0,hasEndTermFocus:!1,endSpaceX:0,dragIndex:-1,enablePopup:!0,timerPopupHide:0,timerPopupShow:0,popupEscListener:!1,mayNarrow:!1}},computed:{height:function(){return this.termHeight+this.padTop+this.padBottom},inputTabListenMode:function(){if(this.cycleOnTab)return 3;for(var t=0,e=[];t<this.terms.length;t++)mt.isEditable(this.terms[t])&&e.push(t);return(this.inputIndex==e[e.length-1]?0:1)+(this.inputIndex==e[0]?0:2)},customItemLiteral2:function(){var t=this,e=function(e){return e.strs.strTitle=t.advancedSearch?"Advanced search":"Create new concept",t.customItemLiteral?e.strs=t.customItemLiteral(e):e.strs.str=(t.advancedSearch?"Search":"Create")+" '".concat(e.strs.str,"'"),e.strs};return this.advancedSearch?function(t){return t.strs=e(t),t.strs.str+='<span class="hotkey">Shift+Enter</span>',t.strs}:e},popupTermMargin:function(){var t=this.popupLoc;return t<0?{}:{left:t?this.termMarginHor:this.padLeft,right:t<this.terms.length-1?this.termMarginHor:this.padRight}}},watch:{origTerms:function(){this.initForNewTerms()},sizes:function(){this.measureSizes(),this.setTermCoordinates(),this.emitValue("change")},customTerm:function(){this.setTermCoordinates(),this.emitValue("change")},hasEndTermFocus:function(t){t&&this.setTermCoordinates(this.terms.length-1)}},mounted:function(){this.measureSizes(),this.initForNewTerms()},methods:{getRuler:function(){return this.$refs.ruler},measureSizes:function(){var t=getComputedStyle(this.$el),e=function(t){return+t.replace(/px$/,"")},n=function(n){return e(t["padding-"+n])};this.padTop=n("top"),this.padRight=n("right"),this.padBottom=n("bottom"),this.padLeft=n("left"),this.bkgrColor=t["background-color"];var i=this.getRuler();t=getComputedStyle(i),n=function(n){return e(t["padding-"+n])+e(t["border-"+n+"-width"])},this.termPadBordLR=n("left")+n("right"),n=function(n){return e(t["margin-"+n])},this.termMarginHor=n("left")+n("right"),i.innerHTML="W",this.termHeight=i.offsetHeight,this.sizes.widthScale=this.sizes.widthScale||e(t["font-size"])/11||1},termWidth:function(t,e,n){var i=this,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=function(t){return Math.ceil(t*i.sizes.widthScale)+i.termPadBordLR},r=this.$refs.ruler;r.innerHTML=t,r.style=s?"width:".concat(o(s),"px;"):(e?"min-width:".concat(o(e),"px;"):"")+(n?"max-width:".concat(o(n),"px;"):"");var a=Math.ceil(r.getBoundingClientRect().width);return r.style="",a},initForNewTerms:function(){this.dragIndex>=0&&window.dispatchEvent(new MouseEvent("mouseup")),this.tempDisablePopup();var t=this.origTerms.map((function(t){return mt.prepToReceive(t)}));t.push(mt.newEndTerm());for(var e=0;e<t.length;e++)if(mt.isEditable(t[e])){this.inputIndex=e;break}this.setTermCoordinates(0,t),this.terms=t,this.emitValue("change-init")},setTermCoordinates:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;e=e||this.terms;for(var n,i,s=(t=0)-1,o=t?e[s].x+e[s].width+this.termMarginHor:this.padLeft;n=e[++s];){if(n.str=n.str||"",n.isEndTerm){this.endSpaceX=s?o-this.termMarginHor:0,i=Math.ceil(this.sizes.widthScale*(this.hasEndTermFocus?this.sizes.minEndTermWideWidth:this.sizes.minEndTermWidth));var r=Math.max(this.sizes.minWidth,this.mayNarrow?0:this.width)-o-i-this.termPadBordLR-this.padRight;this.mayNarrow=!1,n.width=i+Math.max(0,r)+this.termPadBordLR}else{i=mt.isEditable(n)&&(n.editWidth||this.sizes.defaultEditWidth);var a=void 0===n.maxWidth?this.sizes.defaultMaxWidth:n.maxWidth;n.label=this.termLabel(n,s),n.width=this.termWidth(n.label,n.minWidth,a,i)}n.height=this.termHeight,n.x=o,n.y=this.padTop,o+=n.width+this.termMarginHor}(o=o-this.termMarginHor+this.padRight)!=this.width&&this.$emit("width",this.width=o)},termLabel:function(t,e){var n={str:q()(t.str,t.style)};return this.customTerm&&!mt.isEditable(t)&&(n=this.customTerm({strs:n,index:e,type:t.type,term:mt.prepToEmit(t),vsmDictionary:this.vsmDictionary})),ut(n.str)},onFocus:function(t){this.hasEndTermFocus=t==this.terms.length-1},onBlur:function(t){t==this.terms.length-1&&(this.hasEndTermFocus=!1)},onInput:function(t,e){this.hidePopup();var n=this.terms[t];n.str=e,n.label=ut(e)},onKeyTab:function(t,e){if("ignore"==e)return this.hidePopup();this.moveInputToNextEditTerm(t,e?-1:1)},moveInputToNextEditTerm:function(t,e){this.moveInputTo(this.getNextEditTermIndex(t,e))},getNextEditTermIndex:function(t,e){for(var n=this.terms.length,i=t;;)if((i=(i+e+n)%n)==t||mt.isEditable(this.terms[i]))return i},onMousedown_div:function(t){var e=this.$el.getBoundingClientRect(),n=t.clientX-e.left;this.endSpaceX<=n?this.moveInputTo(this.terms.length-1):this.focusInput()},onMousedown:function(t,e){this.hidePopup(),mt.isEditable(this.terms[t])?this.moveInputTo(t):this.initDrag(t,e)},moveInputTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.hidePopup(),mt.isEditable(this.terms[t])&&(this.inputIndex=t),this.focusInput(e)},focusInput:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hidePopup(),this.$nextTick((function(){var n=t.inputElement();n.focus(),e&&(n.selectionStart=n.selectionEnd=n.value.length)}))},inputElement:function(){return this.$el.querySelector(".input")},moveInputToEndTerm:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.moveInputTo(this.terms.length-1,t)},onCtrlMousedown:function(t){var e=this.terms[t];mt.cycleType(e,this.allowClassNull,this),this.moveInputTo(t,!0),e.isEndTerm||this.emitValue()},onAltMousedown:function(t){var e=this,n=this.terms[t];n.isEndTerm||(mt.makeFocal(n,!n.isFocal,this),n.isFocal&&this.terms.forEach((function(t){return t==n||mt.makeFocal(t,!1,e)}))),this.moveInputTo(t,!0),n.isEndTerm||this.emitValue()},emitValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"change";this.$emit(t,this.terms.slice(0,-1).map(mt.prepToEmit))},onDblclick:function(t){mt.isEditable(this.terms[t])?this.showPopup(t):(this.makeTermEditable(t),this.moveInputTo(t),this.setTermCoordinates(t),this.emitValue())},makeTermEditable:function(t){this.$set(this.terms,t,mt.createEditTerm(this.terms[t]))},onKeyEsc:function(t){this.hidePopup();var e=this.terms[t];mt.isEditable(e)&&e.backup&&this.replaceTerm(t,mt.createRestoredTerm(e))},onKeyBksp:function(t){if(this.hidePopup(),t){this.hasEndTermFocus=!1,t=--this.inputIndex;var e=!mt.isEditable(this.terms[t]);e&&this.makeTermEditable(t),this.focusInput(!0),this.setTermCoordinates(t),e&&this.emitValue()}},onKeyCtrlDelete:function(t){this.hidePopup();var e=this.terms[t];if(e.isEndTerm)return e.str=e.label="",mt.setType(e,"EI",this),this.mayNarrow=!0,this.setTermCoordinates(t),this.focusInput();var n=mt.isEditable(this.terms[t+1])?t:t&&mt.isEditable(this.terms[t-1])?t-1:this.getNextEditTermIndex(t,1)-1;this.deleteTerm(t),this.moveInputTo(n,!0),this.setTermCoordinates(t),this.emitValue()},onKeyCtrlBksp:function(t){t?this.onKeyCtrlDelete(t-1):1==this.terms.length&&this.onKeyCtrlDelete(0)},deleteTerm:function(t){t==this.inputIndex&&this.inputElement().blur(),this.terms.splice(t,1)},onKeyCtrlEnter:function(t){this.insertEmptyTerm(t)},insertEmptyTerm:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.terms[t],i=mt.newEditTerm(n.isEndTerm&&e);e?mt.unsetAsEndTerm(n,this):this.hasEndTermFocus=!1,this.terms.splice(t+e,0,i),this.moveInputTo(t+e),this.setTermCoordinates(t),this.emitValue()},onKeyAltUp:function(t){this.moveEditTerm(t,t-1)},onKeyAltDown:function(t){this.moveEditTerm(t,t+1)},moveEditTerm:function(t,e){this.hidePopup();var n=this.terms.length;t==n-1||n<3||(e<0?e=n-2:e>n-2&&(e=0),this.moveTerm(t,e,!0))},moveTerm:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.terms.slice(0,t).concat(this.terms.slice(t+1));i.splice(e,0,this.terms[t]),n&&(this.inputIndex=e,this.focusInput()),this.setTermCoordinates(Math.min(t,e),i),this.terms=i,this.emitValue()},onPlainEnter:function(t){this.hidePopup(),this.fillInTerm(t,mt.createRorLTerm(this.terms[t]))},onItemLiteralSelect:function(t){this.hidePopup(),this.advancedSearch?this.launchAdvancedSearch(t):this.allowClassNull&&this.insertFromMatch(t,{str:this.terms[t].str,id:null})},onKeyShiftEnter:function(t){this.hidePopup(),this.advancedSearch&&this.launchAdvancedSearch(t)},launchAdvancedSearch:function(t){var e=this,n=this.terms[t],i=mt.clone(n.queryOptions||{});delete i.sort,this.$nextTick((function(){return e.advancedSearch({str:n.str,termType:n.type.replace("E",""),vsmDictionary:e.vsmDictionary,queryOptions:i,allowClassNull:e.allowClassNull},(function(n){return e.insertFromMatch(t,n)}))}))},insertFromMatch:function(t,e){e&&this.fillInTerm(t,mt.createTermFromMatch(this.terms[t],e))},fillInTerm:function(t,e){e&&e.str&&(null!==e.classID||this.allowClassNull||"R"==e.type)&&(e.isEndTerm&&(mt.unsetAsEndTerm(e,this),this.terms.push(mt.newEndTerm())),this.replaceTerm(t,e))},replaceTerm:function(t,e){this.moveInputToNextEditTerm(t,1),this.$set(this.terms,t,e),this.setTermCoordinates(t),this.emitValue(),this.tempDisablePopup()},onCtrlShiftMousedown:function(t,e){this.hidePopup(),this.initDrag(t,e)},initDrag:function(t,e){var n=this,i=this.$el.getBoundingClientRect();i={x:~~i.left,y:~~i.top};var s=function(e){var s=n.terms[t];return{x:e.clientX-i.x-s.x,y:e.clientY-i.y-s.y}},o=s(e),r=Math.pow(this.sizes.termDragThreshold,2),a=function(t){t("mousemove",u),t("mouseup",h),t("blur",d)},l=document.body.style.cursor,c=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];document.body.style.cursor=t?"grabbing":l},u=function(e){var i=n.terms[t],a=s(e);if(n.dragIndex<0){if(i.isEndTerm)return;var l=a.x-o.x,u=a.y-o.y;if(l*l+u*u<r)return;n.dragIndex=t,n.$set(i,"drag",{x:i.x,y:i.y}),n.inputElement().blur(),c(),n.$emit("drag-start")}i.drag.x=Math.min(Math.max(n.padLeft-i.width,i.x+a.x-o.x),n.endSpaceX),i.drag.y=Math.min(Math.max(i.y-i.height,i.y+a.y-o.y),i.y+i.height);for(var h=0;h<n.terms.length-1;h++){var d=n.terms[h];if(a.x+i.x<=d.x+d.width/2)break}if(h>t&&h--,t!=h){var p=t,f=n.terms[n.inputIndex].key;n.moveTerm(p,h),n.dragIndex=t=h,n.inputIndex=n.terms.findIndex((function(t){return t.key==f}))}},h=function(t){u(t),d()},d=function(){a(window.removeEventListener),n.dragIndex>=0&&(n.dragIndex=-1,n.$delete(n.terms[t],"drag"),c(!1),n.tempDisablePopup(),n.$emit("drag-stop"))};a(window.addEventListener)},clearPopupTimers:function(){clearTimeout(this.timerPopupHide),clearTimeout(this.timerPopupShow)},showPopup:function(t){this.clearPopupTimers(),this.popupLoc=t,this.addPopupEscListener(t)},hidePopup:function(){this.clearPopupTimers(),this.showPopup(-1),this.removePopupEscListener()},showPopupDelayed:function(t){var e=this;this.clearPopupTimers(),(!mt.isEditable(this.terms[t])||this.popupLoc>=0)&&this.dragIndex<0&&this.enablePopup&&(this.timerPopupShow=setTimeout((function(){return e.showPopup(t)}),this.popupLoc<0?this.sizes.delayPopupShow:this.sizes.delayPopupSwitch),this.addPopupEscListener(t))},hidePopupDelayed:function(){var t=this;this.clearPopupTimers(),this.timerPopupHide=setTimeout((function(){return t.hidePopup()}),this.sizes.delayPopupHide)},tempDisablePopup:function(){var t=this;this.hidePopup(),this.enablePopup=!1,setTimeout((function(){return t.enablePopup=!0}),200)},addPopupEscListener:function(t){var e=this;t>=0&&!this.popupEscListener&&(this.popupEscListener=function(t){"Escape"==t.key&&e.hidePopup()},window.addEventListener("keydown",this.popupEscListener))},removePopupEscListener:function(){this.popupEscListener&&(window.removeEventListener("keydown",this.popupEscListener),this.popupEscListener=!1)},onMouseenter_popup:function(){clearTimeout(this.timerPopupHide)},onMouseenter:function(t){this.showPopupDelayed(t)},onMouseleave:function(){this.hidePopupDelayed()},onClick:function(t){this.showPopupDelayed(t)},onListOpen:function(t){this.hidePopup()},onInsertBefore:function(t){this.hidePopup(),this.insertEmptyTerm(t,0)},onSetType:function(t,e){this.hidePopup();var n=this.terms[t];mt.setType(n,e,this),mt.isEditable(n)&&this.moveInputTo(t),n.isEndTerm||this.emitValue()},onCopy:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.hidePopup(),this.$nextTick((function(){return e.termCopy(mt.prepForCopy(e.terms[t],n))}))},onCopyRef:function(t){this.onCopy(t,!0)},onPaste:function(t){var e=this;this.hidePopup(),this.$nextTick((function(){return e.fillInTerm(t,mt.prepForPaste(e.terms[t],e.termPaste()))}))}}},Kt=(n(30),a(Et,P,[],!1,null,"4c9a1fe8",null));Kt.options.__file="src/subcomponents/TheTerms.vue";var Dt=Kt.exports,Mt=function(t){return JSON.parse(JSON.stringify(t))},Ot={minWidth:200,minEndTermWidth:40,minEndTermWideWidth:100,defaultEditWidth:80,defaultMaxWidth:200,widthScale:!1,termDragThreshold:3,delayPopupShow:650,delayPopupSwitch:300,delayPopupHide:200,theConnsMarginBottom:2,theConnsSpaceBelow:3,theConnsMinLevels:3,theConnsLevelHeight:19,theConnsResortDelay:300,connLineWidth:1,connBackDepth:6,connFootDepth:17,connBackColor:"#7a7a7a",connLegColor:"#7a7a7a",connFootColor:"#b6b6b6",connFootIndent:1,connFootVisible:!0,connTridRelW:3.9,connTridRelH:6.9,connTridObjW:3.5,connTridObjH:4.72,connListBackSep:1.79,connListRelW:3.2,connListRelH:5.8,connRefDashes:"2 1",connRefParW:2.85,connRefParH:4.5,connStubBackColor:"#c3c3c3",connStubLegColor:"#c3c3c3",connStubFootColor:"#cbcbcb",connStubSubBackW:9,connStubObjBackW:10,connStubSubLegH:3.5,connStubRelLegH:4.5,connStubObjLegH:4.5,connStubSubFootW:2.7,connStubRelFootW:2.8,connStubObjFootW:2.8,connStubRelW:1.7,connStubRelH:3.55,connStubObjW:1.8,connStubObjH:3.7,connUCLegColor:"rgba(46,72,255,0.56)",connUCFootColor:"#e6e6e6",connUCLegShorter:4,connHLColor:"#e5e9fb",connHLColorLight:"#f0f4fb",connHLBackHeight:10,connHLLegOutdent:1,connHLBorderRadius:2.6,connRIW:11,connRIPadding:2.5,connRILineWidth:2,connRIFGColor:["#aabcce","#fff","#fff"],connRIBGColor:["transparent","#7491ab","#446d9c"]},Pt={name:"VsmBox",components:{"the-conns":O,"the-terms":Dt},props:{vsmDictionary:{type:Object,default:function(){return{loadFixedTerms:function(t,e,n){return n(null)},getExtraDictInfos:function(){return[]},getDictInfos:function(t,e){return e(null,{items:[]})},getEntries:function(t,e){return e(null,{items:[]})},getMatchesForString:function(t,e,n){return n(null,{items:[]})}}}},queryOptions:{type:[Object,Boolean],default:!1},autofocus:{type:Boolean,default:!1},placeholder:{type:[String,Boolean],default:!1},cycleOnTab:{type:Boolean,default:!1},maxStringLengths:{type:Object,default:function(){return{str:50,strAndDescr:80}}},freshListDelay:{type:Number,default:250},advancedSearch:{type:[Function,Boolean],default:!1},allowClassNull:{type:Boolean,default:!0},initialValue:{type:[Object,Boolean],default:function(){return{terms:[],conns:[]}}},sizes:{type:Object,default:function(){return{}}},customTerm:{type:[Function,Boolean],default:!1},customPopup:{type:[Function,Boolean],default:!1},customItem:{type:[Function,Boolean],default:!1},customItemLiteral:{type:[Function,Boolean],default:!1},termCopy:{type:[Function,Boolean],default:!1},termPaste:{type:[Function,Boolean],default:!1}},data:function(){return{origTerms:[],origConns:[],latestTerms:[],termsChangeNr:1,width:0,isTheConnsEnabled:!0}},computed:{sizesFull:function(){return Object.assign({},Ot,this.sizes)}},watch:{initialValue:{immediate:!0,handler:function(t,e){if(t!=e){this.origConns=!1;var n=t.terms||[];n=this.mapFixedTerms(n,!0),this.preloadFixedTerms(n),this.preloadDictInfos(n),this.origTerms=n}}},vsmDictionary:function(t,e){t!=e&&(this.preloadFixedTerms(this.origTerms),this.preloadDictInfos(this.origTerms))}},created:function(){this.width=this.sizesFull.minWidth||Ot.minWidth},methods:{preloadFixedTerms:function(t){var e=this,n={};t.forEach((function(t){if(t.queryOptions){var e=JSON.stringify(t.queryOptions.z||!0);n[e]=(n[e]||[]).concat(t.queryOptions.idts||[])}})),Object.keys(n).forEach((function(t){e.vsmDictionary.loadFixedTerms(n[t],{z:JSON.parse(t)},(function(){}))}))},preloadDictInfos:function(t){if(this.vsmDictionary.cacheDI){var e=[];t.forEach((function(t){t.queryOptions&&void 0===t.str&&(e=e.concat((t.queryOptions.filter||{}).dictID||[]).concat((t.queryOptions.sort||{}).dictID||[]))})),this.vsmDictionary.getDictInfos({filter:{id:e}},(function(){}))}},onTermsWidth:function(t){this.width=t},onTermsChangeInit:function(t){this.latestTerms=t,this.origConns=this.initialValue.conns||[]},onConnsChangeInit:function(t){this.emitValue(t.conns,"change-init")},onTermsChange:function(t){this.latestTerms=t,this.termsChangeNr++},onConnsChange:function(t){t.termsChangeNr&&t.termsChangeNr!=this.termsChangeNr||this.emitValue(t.conns)},onClickAboveEndTerm:function(){this.$refs.theTerms.moveInputToEndTerm(!0)},onDragStart:function(){this.isTheConnsEnabled=!1},onDragStop:function(){this.isTheConnsEnabled=!0},emitValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change",n=Mt(this.latestTerms);n=this.mapFixedTerms(n),this.$emit(e,{terms:n,conns:t})},mapFixedTerms:function(t,e){var n=e?"fixedTerms":"idts",i=e?"idts":"fixedTerms";return t.map((function(t){return t.queryOptions&&t.queryOptions[n]&&((t=Mt(t)).queryOptions[i]=t.queryOptions[n],delete t.queryOptions[n]),t}))}}},zt=(n(32),a(Pt,i,[],!1,null,"271a8614",null)); /**! * vsm-box * By Steven Vercruysse, https://orcid.org/0000-0002-3136-7353 */zt.options.__file="src/VsmBox.vue";e.default=zt.exports}])}));