meadow-integration 1.0.39 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function r(o,i,n,r){var l=i&&i.prototype instanceof s?i:s,c=Object.create(l.prototype);return _regeneratorDefine2(c,"_invoke",function(o,i,n){var r,s,l,c=0,d=n||[],p=!1,h={p:0,n:0,v:t,a:u,f:u.bind(t,4),d:function(e,o){return r=e,s=0,l=t,h.n=o,a}};function u(o,i){for(s=o,l=i,e=0;!p&&c&&!n&&e<d.length;e++){var n,r=d[e],u=h.p,f=r[2];o>3?(n=f===i)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=u&&((n=o<2&&u<r[1])?(s=0,h.v=i,h.n=r[1]):u<f&&(n=o<3||r[0]>i||i>f)&&(r[4]=o,r[5]=i,h.n=f,s=0))}if(n||o>1)return a;throw p=!0,i}return function(n,d,f){if(c>1)throw TypeError("Generator is already running");for(p&&1===d&&u(d,f),s=d,l=f;(e=s<2?t:l)||!p;){r||(s?s<3?(s>1&&(h.n=-1),u(s,l)):h.n=l:h.v=l);try{if(c=2,r){if(s||(n="next"),e=r[n]){if(!(e=e.call(r,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=r.return)&&e.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);r=t}else if((e=(p=h.n<0)?l:o.call(i,h))!==a)break}catch(e){r=t,s=1,l=e}finally{c=1}}return{value:e,done:p}}}(o,n,r),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var d=[][i]?e(e([][i]())):(_regeneratorDefine2(e={},i,function(){return this}),e),p=c.prototype=s.prototype=Object.create(d);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_regeneratorDefine2(t,n,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=c,_regeneratorDefine2(p,"constructor",c),_regeneratorDefine2(c,"constructor",l),l.displayName="GeneratorFunction",_regeneratorDefine2(c,n,"GeneratorFunction"),_regeneratorDefine2(p),_regeneratorDefine2(p,n,"Generator"),_regeneratorDefine2(p,i,function(){return this}),_regeneratorDefine2(p,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:r,m:h}})()}function _regeneratorDefine2(t,e,o,i){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}_regeneratorDefine2=function(t,e,o,i){function r(e,o){_regeneratorDefine2(t,e,function(t){return this._invoke(e,o,t)})}e?n?n(t,e,{value:o,enumerable:!i,configurable:!i,writable:!i}):t[e]=o:(r("next",0),r("throw",1),r("return",2))},_regeneratorDefine2(t,e,o,i)}function asyncGeneratorStep(t,e,o,i,n,r,a){try{var s=t[r](a),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(i,n)}function _asyncToGenerator(t){return function(){var e=this,o=arguments;return new Promise(function(i,n){var r=t.apply(e,o);function a(t){asyncGeneratorStep(r,i,n,a,s,"next",t)}function s(t){asyncGeneratorStep(r,i,n,a,s,"throw",t)}a(void 0)})}}function _createForOfIteratorHelper(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=Array(e);o<e;o++)i[o]=t[o];return i}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,e,o){return e&&_defineProperties(t.prototype,e),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _callSuper(t,e,o){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,o||[],_getPrototypeOf(t).constructor):e.apply(t,o))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _superPropGet(t,e,o,i){var n=_get(_getPrototypeOf(1&i?t.prototype:t),e,o);return 2&i&&"function"==typeof n?function(t){return n.apply(o,t)}:n}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=_superPropBase(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}},_get.apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).MappingDemoApplication=t()}}(function(){return function t(e,o,i){function n(a,s){if(!o[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[a]={exports:{}};e[a][0].call(d.exports,function(t){return n(e[a][1][t]||t)},d,d.exports,t,e,o,i)}return o[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)n(i[a]);return n}({1:[function(t,e,o){var i=t("pict-application"),n=t("./views/MappingDemoEditorView.js"),r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,o,i])).pict.addView("MappingDemoEditor",n.default_configuration,n),r}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){return window.openMappingEditor=function(){var t=document.getElementById("mapping-editor-placeholder");t&&(t.style.display="none"),window._Pict.views.MappingDemoEditor.editMappings(1,"Book")},_superPropGet(e,"onAfterInitializeAsync",this,3)([t])}}])}(i);e.exports=r,e.exports.default_configuration={Name:"MappingDemoApp",Hash:"MappingDemo",AutoSolveAfterInitialize:!0}},{"./views/MappingDemoEditorView.js":2,"pict-application":6}],2:[function(t,e,o){var i=t("../../../../source/views/PictView-MeadowMappingEditor.js"),n={ViewIdentifier:"MappingDemoEditor",DefaultRenderable:"MappingDemoEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:i.default_configuration.CSS,Templates:[{Hash:"MappingDemoEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px; background:var(--bg-card); color:var(--text);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"Book","GUIDTemplate":"{~D:Record.id~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-dim); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MappingDemoEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MappingDemoEditor-Content",TemplateHash:"MappingDemoEditor-Template",ContentDestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){return _classCallCheck(this,e),_callSuper(this,e,[t,o,i])}return _inherits(e,t),_createClass(e,[{key:"_doLoadMappings",value:function(t){return fetch("/1.0/Demo/VisualMapping").then(function(t){return t.json()})}},{key:"_doLoadSources",value:function(){return fetch("/1.0/Demo/Sources").then(function(t){return t.json()})}},{key:"_doLoadStores",value:function(t){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(t){return fetch("/1.0/Demo/TargetSchema").then(function(t){return t.json()})}},{key:"_doLoadMapping",value:function(t){return fetch("/1.0/Demo/VisualMapping/"+t).then(function(t){return t.json()})}},{key:"_doDeleteMapping",value:function(t){return fetch("/1.0/Demo/VisualMapping/"+t,{method:"DELETE"}).then(function(t){return t.json()})}},{key:"_doDiscoverSourceFields",value:function(t,e,o){return fetch("/1.0/Demo/SourceSchema").then(function(t){return t.json()})}},{key:"_doCreateMapping",value:function(t,e){return fetch("/1.0/Demo/VisualMapping",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(function(t){return t.json()})}},{key:"_doUpdateMapping",value:function(t,e){return fetch("/1.0/Demo/VisualMapping/"+t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(function(t){return t.json()})}},{key:"_onClose",value:function(){var t=document.getElementById("MeadowMap-Editor");t&&t.classList.remove("active");var e=document.getElementById("mapping-editor-placeholder");e&&(e.style.display=""),document.dispatchEvent(new CustomEvent("mapping-editor-closed"))}}])}(i);e.exports=r,e.exports.default_configuration=n},{"../../../../source/views/PictView-MeadowMappingEditor.js":47}],3:[function(t,e,o){e.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],4:[function(t,e,o){var i=t("../package.json"),n=function(){return _createClass(function t(e,o,n){_classCallCheck(this,t),this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"===_typeof(e)&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=i,this.fable?(this.UUID=e.getUUID(),this.options="object"===_typeof(o)?o:{}):(this.options="object"!==_typeof(e)||e.isFable?"object"===_typeof(o)?o:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof n?n:this.fable||"string"!=typeof o?"".concat(this.UUID):o},[{key:"connectFable",value:function(t){if("object"!==_typeof(t)||!t.isFable){var e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(t),"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}])}();_defineProperty(n,"isFableService",!0),e.exports=n,e.exports.CoreServiceProviderBase=n},{"../package.json":3}],5:[function(t,e,o){e.exports={name:"pict-application",version:"1.0.33",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],6:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e);var s="object"===_typeof(t.settings.PictApplicationConfiguration)?t.settings.PictApplicationConfiguration:{};(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),s,o),i])).options,a.log,a.fable,a.UUID,a.Hash,a.servicesMap,a.serviceType="PictApplication",a._Package=n,a.pict=a.fable,a.AppData=a.fable.AppData,a.Bundle=a.fable.Bundle,a.initializeTimestamp,a.lastSolvedTimestamp,a.lastLoginTimestamp,a.lastMarshalFromViewsTimestamp,a.lastMarshalToViewsTimestamp,a.lastAutoRenderTimestamp,a.lastLoadDataTimestamp;var l=Object.keys(a.options.Manifests);if(l.length>0)for(var c=0;c<l.length;c++){var d=l[c];a.fable.instantiateServiceProvider("Manifest",a.options.Manifests[d],d)}return a}return _inherits(e,t),_createClass(e,[{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));for(var t=Object.keys(this.pict.providers),e=[],o=0;o<t.length;o++){var i=this.pict.providers[t[o]];i.options.AutoSolveWithApp&&e.push(i)}e.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var n=0;n<e.length;n++)e[n].solve(e[n]);this.onBeforeSolve();for(var r=Object.keys(this.pict.views),a=[],s=0;s<r.length;s++){var l=this.pict.views[r[s]];l.options.AutoInitialize&&a.push(l)}a.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var c=0;c<a.length;c++)a[c].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");o.anticipate(this.onBeforeSolveAsync.bind(this));var i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoSolveWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var l=0;l<r.length;l++)o.anticipate(r[l].solveAsync.bind(r[l]));for(var c=Object.keys(this.pict.views),d=[],p=0;p<c.length;p++){var h=this.pict.views[c[p]];h.options.AutoSolveWithApp&&d.push(h)}d.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var u=0;u<d.length;u++)o.anticipate(d[u].solveAsync.bind(d[u]));o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync() complete.")),e.lastSolvedTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}},{key:"onLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}},{key:"loginAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeLoginAsync.bind(this)),o.anticipate(this.onLoginAsync.bind(this)),o.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&o.anticipate(function(t){if(!e.isLoggedIn())return t();e.pict.LogNoisiness>1&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," auto loading data after login...")),e.loadDataAsync(function(e){t(e)})}),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync() complete.")),e.lastLoginTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"isLoggedIn",value:function(){return!0}},{key:"onAfterLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}},{key:"loadDataAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeLoadDataAsync.bind(this));for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoLoadDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];o.anticipate(d.onBeforeLoadDataAsync.bind(d))}o.anticipate(this.onLoadDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onLoadDataAsync.bind(u))}o.anticipate(this.onAfterLoadDataAsync.bind(this));for(var f=0,w=r;f<w.length;f++){var v=w[f];o.anticipate(v.onAfterLoadDataAsync.bind(v))}o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync() complete.")),e.lastLoadDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}},{key:"onBeforeSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}},{key:"saveDataAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeSaveDataAsync.bind(this));for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoSaveDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];o.anticipate(d.onBeforeSaveDataAsync.bind(d))}o.anticipate(this.onSaveDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onSaveDataAsync.bind(u))}o.anticipate(this.onAfterSaveDataAsync.bind(this));for(var f=0,w=r;f<w.length;f++){var v=w[f];o.anticipate(v.onAfterSaveDataAsync.bind(v))}o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync() complete.")),e.lastSaveDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(var t=0;t<this.options.ConfigurationOnlyViews.length;t++){var e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();for(var o=Object.keys(this.pict.providers),i=[],n=0;n<o.length;n++){var r=this.pict.providers[o[n]];r.options.AutoInitialize&&i.push(r)}i.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var a=0;a<i.length;a++)i[a].initialize();for(var s=Object.keys(this.pict.views),l=[],c=0;c<s.length;c++){var d=this.pict.views[s[c]];d.options.AutoInitialize&&l.push(d)}l.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var p=0;p<l.length;p++)l[p].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}},{key:"initializeAsync",value:function(t){var e=this;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));var o="function"==typeof t&&t;if(o||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(o);var i=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(var n=0;n<this.options.ConfigurationOnlyViews.length;n++){var r=void 0===this.options.ConfigurationOnlyViews[n].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[n].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(r)),this.pict.addView(r,this.options.ConfigurationOnlyViews[n])}i.anticipate(this.onBeforeInitializeAsync.bind(this)),i.anticipate(this.onInitializeAsync.bind(this));for(var a=Object.keys(this.pict.providers),s=[],l=0;l<a.length;l++){var c=this.pict.providers[a[l]];c.options.AutoInitialize&&s.push(c)}s.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var d=0;d<s.length;d++)i.anticipate(s[d].initializeAsync.bind(s[d]));for(var p=Object.keys(this.pict.views),h=[],u=0;u<p.length;u++){var f=this.pict.views[p[u]];f.options.AutoInitialize&&h.push(f)}h.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var w=0;w<h.length;w++){var v=h[w];i.anticipate(v.initializeAsync.bind(v))}i.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),i.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),i.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),i.anticipate(this.renderMainViewportAsync.bind(this))),i.wait(function(t){return t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),e.initializeTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initialization complete.")),o()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onCompletionOfInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}},{key:"onCompletionOfInitializeAsync",value:function(t){return this.onCompletionOfInitialize(),t()}},{key:"onBeforeMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}},{key:"onBeforeMarshalFromViewsAsync",value:function(t){return this.onBeforeMarshalFromViews(),t()}},{key:"onMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}},{key:"onMarshalFromViewsAsync",value:function(t){return this.onMarshalFromViews(),t()}},{key:"marshalFromViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();for(var t=Object.keys(this.pict.views),e=[],o=0;o<t.length;o++){var i=this.pict.views[t[o]];e.push(i)}for(var n=0;n<e.length;n++)e[n].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalFromViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));for(var n=Object.keys(this.pict.views),r=[],a=0;a<n.length;a++){var s=this.pict.views[n[a]];r.push(s)}for(var l=0;l<r.length;l++)o.anticipate(r[l].marshalFromViewAsync.bind(r[l]));o.anticipate(this.onMarshalFromViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync() complete.")),e.lastMarshalFromViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}},{key:"onAfterMarshalFromViewsAsync",value:function(t){return this.onAfterMarshalFromViews(),t()}},{key:"onBeforeMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}},{key:"onBeforeMarshalToViewsAsync",value:function(t){return this.onBeforeMarshalToViews(),t()}},{key:"onMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}},{key:"onMarshalToViewsAsync",value:function(t){return this.onMarshalToViews(),t()}},{key:"marshalToViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();for(var t=Object.keys(this.pict.views),e=[],o=0;o<t.length;o++){var i=this.pict.views[t[o]];e.push(i)}for(var n=0;n<e.length;n++)e[n].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalToViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));for(var n=Object.keys(this.pict.views),r=[],a=0;a<n.length;a++){var s=this.pict.views[n[a]];r.push(s)}for(var l=0;l<r.length;l++)o.anticipate(r[l].marshalToViewAsync.bind(r[l]));o.anticipate(this.onMarshalToViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync() complete.")),e.lastMarshalToViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}},{key:"onAfterMarshalToViewsAsync",value:function(t){return this.onAfterMarshalToViews(),t()}},{key:"onBeforeRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t){return this.onBeforeRender(),t()}},{key:"render",value:function(t,e,o,i){var n="string"!=typeof t?this.options.MainViewportViewIdentifier:t,r="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof o?this.options.MainViewportDestinationAddress:o,s="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();var l="string"==typeof n&&this.servicesMap.PictView[n];return l?(this.onRender(),l.render(r,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(n," because it is not a valid view.")),!1)}},{key:"onRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}},{key:"onRenderAsync",value:function(t){return this.onRender(),t()}},{key:"renderAsync",value:function(t,e,o,i,n){var r=this,a="string"!=typeof t?this.options.MainViewportViewIdentifier:t,s="string"!=typeof e?this.options.MainViewportRenderableHash:e,l="string"!=typeof o?this.options.MainViewportDestinationAddress:o,c="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i,d="function"==typeof n?n:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof t&&t;d||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=function(t){t&&r.log.error("PictApp [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(l,"] TemplateDataAddress[").concat(c,"] renderAsync:"));var p=this.fable.newAnticipate();p.anticipate(this.onBeforeRenderAsync.bind(this));var h="string"==typeof a&&this.servicesMap.PictView[a];if(!h){var u="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(a," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(u),d(new Error(u))}return p.anticipate(this.onRenderAsync.bind(this)),p.anticipate(function(t){h.renderAsync.call(h,s,l,c,t)}),p.anticipate(this.onAfterRenderAsync.bind(this)),p.wait(d)}},{key:"onAfterRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}},{key:"onAfterRenderAsync",value:function(t){return this.onAfterRender(),t()}},{key:"renderMainViewport",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}},{key:"renderMainViewportAsync",value:function(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}},{key:"renderAutoViews",value:function(){var t=this;this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));var e=Object.keys(this.pict.views);e.sort(function(e,o){return t.pict.views[e].options.AutoRenderOrdinal-t.pict.views[o].options.AutoRenderOrdinal});for(var o=0;o<e.length;o++){var i=this.pict.views[e[o]];i.options.AutoRender&&i.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}},{key:"renderAutoViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));var n=Object.keys(this.pict.views);n.sort(function(t,o){return e.pict.views[t].options.AutoRenderOrdinal-e.pict.views[o].options.AutoRenderOrdinal});for(var r=0;r<n.length;r++){var a=this.pict.views[n[r]];a.options.AutoRender&&o.anticipate(a.renderAsync.bind(a))}o.wait(function(t){return e.lastAutoRenderTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync complete.")),i(t)})}},{key:"isPictApplication",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":5,"fable-serviceproviderbase":4}],7:[function(t,e,o){e.exports={name:"pict-provider",version:"1.0.12",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351",quackage:"^1.0.58",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],8:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),o),i])).fable,a.pict,a.log,a.options,a.UUID,a.Hash,a.options.ProviderIdentifier||(a.options.ProviderIdentifier="AutoProviderID-".concat(a.fable.getUUID())),a.serviceType="PictProvider",a._Package=n,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1;for(var s=0;s<a.options.Templates.length;s++){var l=a.options.Templates[s];l.hasOwnProperty("Postfix")&&l.hasOwnProperty("Template")?(l.Source||(l.Source="PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(l.Prefix,l.Postfix,l.Template,l.Source)):a.log.error("PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," could not load Default Template ").concat(s," in the options array."),l)}return a}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return e.initializeTimestamp=e.pict.log.getTimeStamp(),o?e.log.error("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization failed: ").concat(o.message||o),{Stack:o.stack}):e.pict.LogNoisiness>0&&e.log.info("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onPreRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}},{key:"onPreRenderAsync",value:function(t){return this.onPreRender(),t()}},{key:"render",value:function(){return this.onPreRender()}},{key:"renderAsync",value:function(t){return this.onPreRender(),t()}},{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"solve",value:function(){return this.onPreSolve()}},{key:"solveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}},{key:"onAfterLoadDataAsync",value:function(t){return t()}},{key:"onBeforeSaveDataAsync",value:function(t){return t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}},{key:"onAfterSaveDataAsync",value:function(t){return t()}}])}(i);e.exports=a},{"../package.json":7,"fable-serviceproviderbase":4}],9:[function(t,e,o){e.exports=t("./views/PictView-Flow.js"),e.exports.PictViewFlowNode=t("./views/PictView-Flow-Node.js"),e.exports.PictViewFlowToolbar=t("./views/PictView-Flow-Toolbar.js"),e.exports.PictViewFlowFloatingToolbar=t("./views/PictView-Flow-FloatingToolbar.js"),e.exports.PictServiceFlowInteractionManager=t("./services/PictService-Flow-InteractionManager.js"),e.exports.PictServiceFlowConnectionRenderer=t("./services/PictService-Flow-ConnectionRenderer.js"),e.exports.PictServiceFlowTether=t("./services/PictService-Flow-Tether.js"),e.exports.PictServiceFlowLayout=t("./services/PictService-Flow-Layout.js"),e.exports.PictServiceFlowPathGenerator=t("./services/PictService-Flow-PathGenerator.js"),e.exports.PictServiceFlowViewportManager=t("./services/PictService-Flow-ViewportManager.js"),e.exports.PictServiceFlowSelectionManager=t("./services/PictService-Flow-SelectionManager.js"),e.exports.PictServiceFlowPanelManager=t("./services/PictService-Flow-PanelManager.js"),e.exports.PictServiceFlowDataManager=t("./services/PictService-Flow-DataManager.js"),e.exports.PictServiceFlowConnectionHandleManager=t("./services/PictService-Flow-ConnectionHandleManager.js"),e.exports.PictServiceFlowRenderManager=t("./services/PictService-Flow-RenderManager.js"),e.exports.PictServiceFlowPortRenderer=t("./services/PictService-Flow-PortRenderer.js"),e.exports.PictProviderFlowNodeTypes=t("./providers/PictProvider-Flow-NodeTypes.js"),e.exports.PictProviderFlowEventHandler=t("./providers/PictProvider-Flow-EventHandler.js"),e.exports.PictProviderFlowLayouts=t("./providers/PictProvider-Flow-Layouts.js"),e.exports.PictProviderFlowSVGHelpers=t("./providers/PictProvider-Flow-SVGHelpers.js"),e.exports.PictProviderFlowGeometry=t("./providers/PictProvider-Flow-Geometry.js"),e.exports.PictProviderFlowPanelChrome=t("./providers/PictProvider-Flow-PanelChrome.js"),e.exports.PictProviderFlowCSS=t("./providers/PictProvider-Flow-CSS.js"),e.exports.PictProviderFlowIcons=t("./providers/PictProvider-Flow-Icons.js"),e.exports.PictProviderFlowConnectorShapes=t("./providers/PictProvider-Flow-ConnectorShapes.js"),e.exports.PictFlowCard=t("./PictFlowCard.js"),e.exports.PictFlowCardPropertiesPanel=t("./PictFlowCardPropertiesPanel.js"),e.exports.FlowCardPropertiesPanelTemplate=t("./panels/FlowCardPropertiesPanel-Template.js"),e.exports.FlowCardPropertiesPanelMarkdown=t("./panels/FlowCardPropertiesPanel-Markdown.js"),e.exports.FlowCardPropertiesPanelForm=t("./panels/FlowCardPropertiesPanel-Form.js"),e.exports.FlowCardPropertiesPanelView=t("./panels/FlowCardPropertiesPanel-View.js"),e.exports.PictViewFlowPropertiesPanel=t("./views/PictView-Flow-PropertiesPanel.js")},{"./PictFlowCard.js":10,"./PictFlowCardPropertiesPanel.js":11,"./panels/FlowCardPropertiesPanel-Form.js":12,"./panels/FlowCardPropertiesPanel-Markdown.js":13,"./panels/FlowCardPropertiesPanel-Template.js":14,"./panels/FlowCardPropertiesPanel-View.js":15,"./providers/PictProvider-Flow-CSS.js":16,"./providers/PictProvider-Flow-ConnectorShapes.js":17,"./providers/PictProvider-Flow-EventHandler.js":18,"./providers/PictProvider-Flow-Geometry.js":19,"./providers/PictProvider-Flow-Icons.js":20,"./providers/PictProvider-Flow-Layouts.js":21,"./providers/PictProvider-Flow-NodeTypes.js":22,"./providers/PictProvider-Flow-PanelChrome.js":24,"./providers/PictProvider-Flow-SVGHelpers.js":25,"./services/PictService-Flow-ConnectionHandleManager.js":27,"./services/PictService-Flow-ConnectionRenderer.js":28,"./services/PictService-Flow-DataManager.js":29,"./services/PictService-Flow-InteractionManager.js":30,"./services/PictService-Flow-Layout.js":31,"./services/PictService-Flow-PanelManager.js":32,"./services/PictService-Flow-PathGenerator.js":33,"./services/PictService-Flow-PortRenderer.js":34,"./services/PictService-Flow-RenderManager.js":35,"./services/PictService-Flow-SelectionManager.js":36,"./services/PictService-Flow-Tether.js":37,"./services/PictService-Flow-ViewportManager.js":38,"./views/PictView-Flow-FloatingToolbar.js":39,"./views/PictView-Flow-Node.js":40,"./views/PictView-Flow-PropertiesPanel.js":41,"./views/PictView-Flow-Toolbar.js":42,"./views/PictView-Flow.js":43}],10:[function(t,e,o){var i=function(t){function e(t,o,i){var n;_classCallCheck(this,e);var r=Object.assign({},e.default_configuration,o);return(n=_callSuper(this,e,[t,r,i])).serviceType="PictFlowCard",n.cardTitle=r.Title?r.Title:"Card",n.cardName=!!r.Name&&r.Name,n.cardCode=r.Code?r.Code:"",n.cardDescription=!!r.Description&&r.Description,n.cardIcon=!!r.Icon&&r.Icon,n.cardPreviewImage=!!r.PreviewImage&&r.PreviewImage,n.cardDocumentation=!!r.Documentation&&r.Documentation,n.cardTooltip=!!r.Tooltip&&r.Tooltip,n.cardHelp=!!r.Help&&r.Help,n.cardEnabled="boolean"!=typeof r.Enabled||r.Enabled,n.cardTitleBarColor=r.TitleBarColor?r.TitleBarColor:"#2c3e50",n.cardBodyStyle=r.BodyStyle?r.BodyStyle:{},n.cardWidth="number"==typeof r.Width?r.Width:180,n.cardHeight="number"==typeof r.Height?r.Height:80,n.cardCategory=r.Category?r.Category:"General",n.cardInputs=Array.isArray(r.Inputs)?r.Inputs:[],n.cardOutputs=Array.isArray(r.Outputs)?r.Outputs:[],n.cardPropertiesPanel=r.PropertiesPanel&&"object"===_typeof(r.PropertiesPanel)?r.PropertiesPanel:null,n.cardBodyContent=r.BodyContent&&"object"===_typeof(r.BodyContent)?r.BodyContent:null,n.cardShowTypeLabel="boolean"!=typeof r.ShowTypeLabel||r.ShowTypeLabel,n.cardPortLabelsOnHover="boolean"==typeof r.PortLabelsOnHover&&r.PortLabelsOnHover,n.cardPortLabelsVertical="boolean"==typeof r.PortLabelsVertical&&r.PortLabelsVertical,n.cardPortLabelPadding="boolean"==typeof r.PortLabelPadding&&r.PortLabelPadding,n.cardPortLabelsOutside="boolean"==typeof r.PortLabelsOutside&&r.PortLabelsOutside,n.cardLabelsInFront="boolean"!=typeof r.LabelsInFront||r.LabelsInFront,n}return _inherits(e,t),_createClass(e,[{key:"getNodeTypeConfiguration",value:function(){for(var t=[],e=0;e<this.cardInputs.length;e++){var o=this.cardInputs[e],i={Hash:null,Direction:"input",Side:o.Side||"left",Label:o.Name||"In ".concat(e+1),MinimumInputCount:"number"==typeof o.MinimumInputCount?o.MinimumInputCount:0,MaximumInputCount:"number"==typeof o.MaximumInputCount?o.MaximumInputCount:-1};o.PortType&&(i.PortType=o.PortType),o.DataType&&(i.DataType=o.DataType),t.push(i)}for(var n=0;n<this.cardOutputs.length;n++){var r=this.cardOutputs[n],a={Hash:null,Direction:"output",Side:r.Side||"right",Label:r.Name||"Out ".concat(n+1)};r.PortType&&(a.PortType=r.PortType),r.DataType&&(a.DataType=r.DataType),t.push(a)}0===t.length&&(t.push({Hash:null,Direction:"input",Side:"left",Label:"In"}),t.push({Hash:null,Direction:"output",Side:"right",Label:"Out"}));var s={Hash:this.cardCode,Label:this.cardTitle,DefaultWidth:this.cardWidth,DefaultHeight:this.cardHeight,DefaultPorts:t,TitleBarColor:this.cardTitleBarColor,BodyStyle:JSON.parse(JSON.stringify(this.cardBodyStyle)),CardMetadata:{Name:this.cardName,Code:this.cardCode,Description:this.cardDescription,Icon:this.cardIcon,PreviewImage:this.cardPreviewImage,Documentation:this.cardDocumentation,Tooltip:this.cardTooltip,Enabled:this.cardEnabled,Category:this.cardCategory,Help:this.cardHelp}};return s.ShowTypeLabel=this.cardShowTypeLabel,s.PortLabelsOnHover=this.cardPortLabelsOnHover,s.PortLabelsVertical=this.cardPortLabelsVertical,s.PortLabelPadding=this.cardPortLabelPadding,s.PortLabelsOutside=this.cardPortLabelsOutside,s.LabelsInFront=this.cardLabelsInFront,this.cardPropertiesPanel&&(s.PropertiesPanel=JSON.parse(JSON.stringify(this.cardPropertiesPanel))),this.cardBodyContent&&(s.BodyContent=JSON.parse(JSON.stringify(this.cardBodyContent)),"function"==typeof this.options.BodyContent.RenderCallback&&(s.BodyContent.RenderCallback=this.options.BodyContent.RenderCallback)),s}},{key:"registerWithFlowView",value:function(t){if(!t||!t._NodeTypeProvider)return this.log.warn("PictFlowCard registerWithFlowView: no valid FlowView or NodeTypeProvider"),!1;var e=this.getNodeTypeConfiguration();return t._NodeTypeProvider.registerNodeType(e)}}])}(t("fable-serviceproviderbase"));e.exports=i,e.exports.default_configuration={Title:"Card",Name:!1,Code:"",Description:!1,Icon:!1,PreviewImage:!1,Documentation:!1,Tooltip:!1,Inputs:[],Outputs:[],Enabled:!0,TitleBarColor:"#2c3e50",BodyStyle:{},Width:180,Height:80,Category:"General",PropertiesPanel:null,BodyContent:null,ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsVertical:!1,PortLabelPadding:!1,PortLabelsOutside:!1,LabelsInFront:!0}},{"fable-serviceproviderbase":4}],11:[function(t,e,o){var i=function(t){function e(t,o,i){var n;_classCallCheck(this,e);var r=Object.assign({},e.default_configuration,o);return(n=_callSuper(this,e,[t,r,i])).serviceType="PictFlowCardPropertiesPanel",n.panelType=r.PanelType||"Base",n.panelTitle=r.Title||"Properties",n.panelWidth="number"==typeof r.Width?r.Width:300,n.panelHeight="number"==typeof r.Height?r.Height:200,n._FlowView=null,n._NodeData=null,n._ContentContainer=null,n._Configuration=r.Configuration||{},n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,e){this._ContentContainer=t,this._NodeData=e}},{key:"marshalToPanel",value:function(t){this._NodeData=t}},{key:"marshalFromPanel",value:function(t){}},{key:"destroy",value:function(){this._ContentContainer=null,this._NodeData=null}}])}(t("fable-serviceproviderbase"));e.exports=i,e.exports.default_configuration={PanelType:"Base",Title:"Properties",Width:300,Height:200,Configuration:{}}},{"fable-serviceproviderbase":4}],12:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Form",n._Metacontroller=null,n._InjectedSectionHash=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.Manifest){var i="pict-flow-panel-form-".concat(o.Hash);t.innerHTML='<div id="'.concat(i,'"></div>'),this.fable.AppData.Record=o;try{if(!this._Metacontroller){var n=null;this.fable.servicesMap.hasOwnProperty("PictFormMetacontroller")?n="PictFormMetacontroller":this.fable.servicesMap.hasOwnProperty("PictViewFormMetacontroller")&&(n="PictViewFormMetacontroller"),n&&(this._Metacontroller=this.fable.instantiateServiceProviderWithoutRegistration(n,{ViewIdentifier:"FlowPanelForm-".concat(o.Hash),DefaultDestinationAddress:"#".concat(i),AutoRender:!1,AutoPopulateAfterRender:!0,AutoSolveBeforeRender:!1}))}if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifestAndRender){var r="Pict-".concat(this._Metacontroller.UUID,"-FormContainer"),a=t.querySelector("#".concat(i));a&&(a.innerHTML='<div id="'.concat(r,'" class="pict-form"></div>'));var s=JSON.parse(JSON.stringify(this._Configuration.Manifest));this._InjectedSectionHash=s.Hash||null,this._Metacontroller.injectManifestAndRender(s)}else if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifest){var l=JSON.parse(JSON.stringify(this._Configuration.Manifest)),c=this._Metacontroller.injectManifest(l);this._InjectedSectionHash=l.Hash||null;var d=t.querySelector("#".concat(i));if(d&&c.length>0){for(var p="",h=0;h<c.length;h++){var u=c[h].options.DefaultDestinationAddress;u&&"#"===u.charAt(0)&&(u=u.substring(1)),p+='<div id="'.concat(u,'" class="pict-form-view"></div>')}d.innerHTML=p;for(var f=0;f<c.length;f++)c[f].render()}}else t.innerHTML="<em>pict-section-form is not available. Install it in your application to use Form panels.</em>"}catch(e){this.log.warn("FlowCardPropertiesPanel-Form render error: ".concat(e.message)),t.innerHTML="<em>Form render error: ".concat(e.message,"</em>")}}else t.innerHTML="<em>No form manifest configured</em>"}},{key:"marshalFromPanel",value:function(t){this._Metacontroller&&"function"==typeof this._Metacontroller.marshalFromView&&this._Metacontroller.marshalFromView()}},{key:"destroy",value:function(){this._Metacontroller=null,this._InjectedSectionHash=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Form",Configuration:{Manifest:null}})},{"../PictFlowCardPropertiesPanel.js":11}],13:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Markdown",n._ContentProvider=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){_superPropGet(e,"render",this,3)([t,o]),this._renderMarkdown()}},{key:"marshalToPanel",value:function(t){_superPropGet(e,"marshalToPanel",this,3)([t]),this._renderMarkdown()}},{key:"_renderMarkdown",value:function(){if(this._ContentContainer&&this._Configuration){var t="";if(this._Configuration.MarkdownAddress&&this._NodeData?t=this.fable.manifest.getValueByHash(this._NodeData,this._Configuration.MarkdownAddress)||"":this._Configuration.Markdown&&(t=this._Configuration.Markdown),t)try{if(this._ContentProvider||this.fable.servicesMap.hasOwnProperty("PictContentProvider")&&(this._ContentProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictContentProvider",{})),this._ContentProvider&&"function"==typeof this._ContentProvider.parseMarkdown){var e=this._ContentProvider.parseMarkdown(t);this._ContentContainer.innerHTML=e,"function"==typeof this._ContentProvider.renderKaTeXEquations&&this._ContentProvider.renderKaTeXEquations(this._ContentContainer),"function"==typeof this._ContentProvider.renderMermaidDiagrams&&this._ContentProvider.renderMermaidDiagrams(this._ContentContainer)}else this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(t),"</pre>")}catch(e){this.log.warn("FlowCardPropertiesPanel-Markdown render error: ".concat(e.message)),this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(t),"</pre>")}else this._ContentContainer.innerHTML="<em>No content</em>"}}},{key:"_escapeHTML",value:function(t){var e=document.createElement("div");return e.textContent=t,e.innerHTML}},{key:"destroy",value:function(){this._ContentProvider=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Markdown",Configuration:{Markdown:"",MarkdownAddress:""}})},{"../PictFlowCardPropertiesPanel.js":11}],14:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Template",n._TemplatesRegistered=!1,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.Templates){if(!this._TemplatesRegistered){for(var i=this._Configuration.Templates,n=0;n<i.length;n++)i[n].Hash&&i[n].Template&&this.fable.TemplateProvider.addTemplate(i[n].Hash,i[n].Template);this._TemplatesRegistered=!0}this._renderTemplate()}}},{key:"marshalToPanel",value:function(t){_superPropGet(e,"marshalToPanel",this,3)([t]),this._renderTemplate()}},{key:"_renderTemplate",value:function(){if(this._ContentContainer&&this._NodeData){var t=this._Configuration.TemplateHash;if(t){var e=this._NodeData,o=this.fable.parseTemplateByHash(t,e,null,[e]);this._ContentContainer.innerHTML=o}}}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Template",Configuration:{Templates:[],TemplateHash:""}})},{"../PictFlowCardPropertiesPanel.js":11}],15:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-View",n._OriginalDestination=null,n._ViewInstance=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.ViewHash){var i=this._Configuration.ViewHash,n="pict-flow-panel-view-".concat(o.Hash);t.innerHTML='<div id="'.concat(n,'"></div>');try{var r=this.pict||this.fable;r.views&&r.views[i]?(this._ViewInstance=r.views[i],this._OriginalDestination=this._ViewInstance.options.DefaultDestinationAddress,this._ViewInstance.options.DefaultDestinationAddress="#".concat(n),"function"==typeof this._ViewInstance.render&&this._ViewInstance.render()):t.innerHTML='<em>View "'.concat(i,'" not found</em>')}catch(e){this.log.warn("FlowCardPropertiesPanel-View render error: ".concat(e.message)),t.innerHTML="<em>View render error: ".concat(e.message,"</em>")}}else t.innerHTML="<em>No ViewHash configured</em>"}},{key:"marshalFromPanel",value:function(t){this._ViewInstance&&"function"==typeof this._ViewInstance.marshalFromView&&this._ViewInstance.marshalFromView()}},{key:"destroy",value:function(){this._ViewInstance&&this._OriginalDestination&&(this._ViewInstance.options.DefaultDestinationAddress=this._OriginalDestination),this._ViewInstance=null,this._OriginalDestination=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"View",Configuration:{ViewHash:""}})},{"../PictFlowCardPropertiesPanel.js":11}],16:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowCSS"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowCSS",r._FlowView=o&&o.FlowView?o.FlowView:null,r}return _inherits(e,t),_createClass(e,[{key:"getContainerCSS",value:function(){return"\n\t\t.pict-flow-container {\n\t\t\t/* ── Design Tokens ─────────────────────────────────────\n\t\t\t Override these custom properties to theme the flow diagram.\n\t\t\t Node-type classes (.pict-flow-node-{type}) can scope-override\n\t\t\t any variable for per-type variation. */\n\n\t\t\t/* Text */\n\t\t\t--pf-text-primary: #2c3e50;\n\t\t\t--pf-text-heading: #1a252f;\n\t\t\t--pf-text-secondary: #7f8c8d;\n\t\t\t--pf-text-tertiary: #8e99a4;\n\t\t\t--pf-text-placeholder: #95a5a6;\n\n\t\t\t/* Node */\n\t\t\t--pf-node-body-fill: #ffffff;\n\t\t\t--pf-node-body-stroke: #d0d4d8;\n\t\t\t--pf-node-body-stroke-hover: #b0b8c0;\n\t\t\t--pf-node-body-stroke-width: 1;\n\t\t\t--pf-node-body-radius: 8px;\n\t\t\t--pf-node-shadow: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.10));\n\t\t\t--pf-node-shadow-hover: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));\n\t\t\t--pf-node-shadow-selected: drop-shadow(0 2px 8px rgba(52, 152, 219, 0.25));\n\t\t\t--pf-node-shadow-dragging: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.20));\n\t\t\t--pf-node-title-fill: #ffffff;\n\t\t\t--pf-node-title-size: 11.5px;\n\t\t\t--pf-node-title-weight: 600;\n\t\t\t--pf-node-title-bar-color: #2c3e50;\n\t\t\t--pf-node-type-label-fill: #a0a8b0;\n\t\t\t--pf-node-selected-stroke: #3498db;\n\n\t\t\t/* Node Variants */\n\t\t\t--pf-node-start-fill: #eafaf1;\n\t\t\t--pf-node-start-stroke: #27ae60;\n\t\t\t--pf-node-end-fill: #e8f8f5;\n\t\t\t--pf-node-end-stroke: #1abc9c;\n\t\t\t--pf-node-halt-fill: #fdedec;\n\t\t\t--pf-node-halt-stroke: #e74c3c;\n\t\t\t--pf-node-decision-fill: #fff9e6;\n\t\t\t--pf-node-decision-stroke: #f39c12;\n\n\t\t\t/* Ports */\n\t\t\t--pf-port-input-fill: #3498db;\n\t\t\t--pf-port-output-fill: #2ecc71;\n\t\t\t--pf-port-stroke: #ffffff;\n\t\t\t--pf-port-stroke-width: 2;\n\t\t\t--pf-port-label-bg: rgba(255, 253, 240, 0.5);\n\t\t\t--pf-port-label-text: #2c3e50;\n\n\t\t\t/* Port Type Colors */\n\t\t\t--pf-port-event-in-fill: #3498db;\n\t\t\t--pf-port-event-out-fill: #2ecc71;\n\t\t\t--pf-port-setting-fill: #e67e22;\n\t\t\t--pf-port-value-fill: #f1c40f;\n\t\t\t--pf-port-error-fill: #e74c3c;\n\n\t\t\t/* Connection Type Colors (match source port) */\n\t\t\t--pf-connection-event-in-stroke: #3498db;\n\t\t\t--pf-connection-event-out-stroke: #2ecc71;\n\t\t\t--pf-connection-setting-stroke: #e67e22;\n\t\t\t--pf-connection-value-stroke: #f1c40f;\n\t\t\t--pf-connection-error-stroke: #e74c3c;\n\n\t\t\t/* Connections */\n\t\t\t--pf-connection-stroke: #95a5a6;\n\t\t\t--pf-connection-stroke-hover: #7f8c8d;\n\t\t\t--pf-connection-selected-stroke: #3498db;\n\n\t\t\t/* Panels */\n\t\t\t--pf-panel-bg: #ffffff;\n\t\t\t--pf-panel-border: #d0d4d8;\n\t\t\t--pf-panel-radius: 8px;\n\t\t\t--pf-panel-shadow: 0 4px 12px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);\n\t\t\t--pf-panel-titlebar-bg: #f7f8fa;\n\t\t\t--pf-panel-titlebar-border: #e8eaed;\n\t\t\t--pf-panel-title-color: #2c3e50;\n\n\t\t\t/* Tabs */\n\t\t\t--pf-tab-text: #8e99a4;\n\t\t\t--pf-tab-text-hover: #5a6a7a;\n\t\t\t--pf-tab-active-border: var(--pf-node-selected-stroke);\n\t\t\t--pf-resize-handle-hover: #e0e3e6;\n\n\t\t\t/* Forms & Inputs */\n\t\t\t--pf-input-border: #d5d8dc;\n\t\t\t--pf-input-border-focus: #3498db;\n\t\t\t--pf-divider-light: #ecf0f1;\n\t\t\t--pf-divider-medium: #e8eaed;\n\n\t\t\t/* Buttons */\n\t\t\t--pf-button-border: #bdc3c7;\n\t\t\t--pf-button-hover-border: #95a5a6;\n\t\t\t--pf-button-hover-bg: #ecf0f1;\n\t\t\t--pf-button-active-bg: #d5dbdb;\n\t\t\t--pf-button-danger-text: #e74c3c;\n\t\t\t--pf-button-danger-hover-bg: #fdedec;\n\t\t\t--pf-button-close-color: #b0b8c0;\n\n\t\t\t/* Badges */\n\t\t\t--pf-badge-category-bg: #f0f2f4;\n\t\t\t--pf-badge-category-text: #6b7b8d;\n\t\t\t--pf-badge-code-bg: #eaf2f8;\n\t\t\t--pf-badge-code-text: #2980b9;\n\n\t\t\t/* Info Panel */\n\t\t\t--pf-port-item-bg: #f8f9fa;\n\n\t\t\t/* Toolbar */\n\t\t\t--pf-toolbar-bg: #ffffff;\n\t\t\t--pf-toolbar-border: #e0e0e0;\n\n\t\t\t/* Palette Cards */\n\t\t\t--pf-card-border: #d5d8dc;\n\t\t\t--pf-card-hover-bg: #eaf2f8;\n\t\t\t--pf-card-hover-shadow: 0 1px 3px rgba(52, 152, 219, 0.15);\n\n\t\t\t/* Canvas */\n\t\t\t--pf-canvas-bg: #fafafa;\n\t\t\t--pf-grid-stroke: #e8e8e8;\n\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tmin-height: 400px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-color: var(--pf-canvas-bg);\n\t\t\tborder: 1px solid var(--pf-toolbar-border);\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.pict-flow-svg-container {\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-svg {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-svg.panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-svg.connecting {\n\t\t\tcursor: crosshair;\n\t\t}\n\t\t.pict-flow-grid-pattern line {\n\t\t\tstroke: var(--pf-grid-stroke);\n\t\t\tstroke-width: 0.5;\n\t\t}\n\t\t"}},{key:"getNodeCSS",value:function(){return'\n\t\t.pict-flow-node {\n\t\t\tcursor: pointer;\n\t\t\tfilter: var(--pf-node-shadow);\n\t\t\ttransition: filter 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover {\n\t\t\tfilter: var(--pf-node-shadow-hover);\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node.selected {\n\t\t\tfilter: var(--pf-node-shadow-selected);\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node.dragging {\n\t\t\topacity: 0.9;\n\t\t\tcursor: grabbing;\n\t\t\tfilter: var(--pf-node-shadow-dragging);\n\t\t}\n\t\t.pict-flow-node-body {\n\t\t\tfill: var(--pf-node-body-fill);\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: var(--pf-node-body-stroke-width);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t\ttransition: stroke 0.2s, stroke-width 0.2s;\n\t\t}\n\t\t.pict-flow-node-title-bar {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t}\n\t\t.pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t}\n\t\t.pict-flow-node-title {\n\t\t\tfill: var(--pf-node-title-fill);\n\t\t\tfont-size: var(--pf-node-title-size);\n\t\t\tfont-weight: var(--pf-node-title-weight);\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tletter-spacing: 0.2px;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-type-label {\n\t\t\tfill: var(--pf-node-type-label-fill);\n\t\t\tfont-size: 9.5px;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.3px;\n\t\t\tpointer-events: none;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-type-label {\n\t\t\topacity: 1;\n\t\t}\n\t\t.pict-flow-node-card-code {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-card-code {\n\t\t\topacity: 1;\n\t\t}\n\t\t/* Title-bar icon: invert SVG paths to white for dark title bars */\n\t\t.pict-flow-node-title-icon {\n\t\t\tfilter: brightness(0) invert(1);\n\t\t}\n\t\t'}},{key:"getBodyContentCSS",value:function(){return'\n\t\t.pict-flow-node-body-content {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-body-content-fo {\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.pict-flow-node-body-content-html {\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-node-body-content-canvas {\n\t\t\tdisplay: block;\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t'}},{key:"getNodeVariantCSS",value:function(){return"\n\t\t.pict-flow-node-decision .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-decision-fill);\n\t\t\tstroke: var(--pf-node-decision-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-start .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-start-fill);\n\t\t\tstroke: var(--pf-node-start-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-end .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-end-fill);\n\t\t\tstroke: var(--pf-node-end-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-halt-fill);\n\t\t\tstroke: var(--pf-node-halt-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t"}},{key:"getPortCSS",value:function(){return'\n\t\t.pict-flow-port {\n\t\t\tcursor: crosshair;\n\t\t\ttransition: r 0.15s, filter 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));\n\t\t}\n\t\t.pict-flow-port.input {\n\t\t\tfill: var(--pf-port-input-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port.output {\n\t\t\tfill: var(--pf-port-output-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port:hover {\n\t\t\tr: 7;\n\t\t\tfilter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.20));\n\t\t}\n\t\t/* Port type color overrides */\n\t\t.pict-flow-port.port-type-event-in {\n\t\t\tfill: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-event-out {\n\t\t\tfill: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-setting {\n\t\t\tfill: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-value {\n\t\t\tfill: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-error {\n\t\t\tfill: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-port-label {\n\t\t\tfont-size: 8px;\n\t\t\tfont-weight: 600;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port label badge background */\n\t\t.pict-flow-port-label-bg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port labels on hover: hidden by default, revealed on node hover */\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label-bg {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label-bg {\n\t\t\topacity: 1;\n\t\t}\n\t\t'}},{key:"getConnectionCSS",value:function(){return"\n\t\t.pict-flow-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: pointer;\n\t\t\ttransition: stroke 0.15s;\n\t\t}\n\t\t.pict-flow-connection:hover {\n\t\t\tstroke: var(--pf-connection-stroke-hover);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t.pict-flow-connection.selected {\n\t\t\tstroke: var(--pf-connection-selected-stroke);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t/* Connection type color overrides (based on source port type) */\n\t\t.pict-flow-connection.conn-type-event-in {\n\t\t\tstroke: var(--pf-connection-event-in-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-event-out {\n\t\t\tstroke: var(--pf-connection-event-out-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-setting {\n\t\t\tstroke: var(--pf-connection-setting-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-value {\n\t\t\tstroke: var(--pf-connection-value-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-error {\n\t\t\tstroke: var(--pf-connection-error-stroke);\n\t\t}\n\t\t.pict-flow-connection-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 12;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-drag-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-dasharray: 6 3;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t"}},{key:"getHandleCSS",value:function(){return"\n\t\t.pict-flow-connection-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getTetherCSS",value:function(){return"\n\t\t.pict-flow-tether-line {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t\tstroke-dasharray: 6 4;\n\t\t\tpointer-events: visibleStroke;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-line.selected {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-tether-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 10;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getPanelCSS",value:function(){return'\n\t\t.pict-flow-node-panel-indicator {\n\t\t\tfill: var(--pf-node-selected-stroke);\n\t\t\tstroke: none;\n\t\t\topacity: 0.6;\n\t\t\tcursor: pointer;\n\t\t\ttransition: opacity 0.15s;\n\t\t}\n\t\t.pict-flow-node-panel-indicator:hover {\n\t\t\topacity: 1.0;\n\t\t}\n\t\t.pict-flow-panel-foreign-object {\n\t\t\toverflow: visible;\n\t\t}\n\t\t.pict-flow-panel {\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-panel-border);\n\t\t\tborder-radius: var(--pf-panel-radius);\n\t\t\tbox-shadow: var(--pf-panel-shadow);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-panel-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 8px 12px;\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-panel-titlebar.dragging {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-panel-title-text {\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 12px;\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tletter-spacing: 0.1px;\n\t\t}\n\t\t.pict-flow-panel-close-btn {\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-button-close-color);\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1;\n\t\t\tpadding: 4px;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.pict-flow-panel-close-btn:hover {\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tbackground-color: rgba(231, 76, 60, 0.08);\n\t\t}\n\t\t.pict-flow-panel-content {\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tmin-height: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.pict-flow-panel-tab-pane {\n\t\t\tpadding: 10px 12px;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t'}},{key:"getInfoPanelCSS",value:function(){return'\n\t\t.pict-flow-info-panel {\n\t\t\tpadding: 2px 0;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-info-panel-header {\n\t\t\tfont-size: 13px;\n\t\t\tfont-weight: 600;\n\t\t\tmargin-bottom: 6px;\n\t\t\tcolor: var(--pf-text-heading);\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon {\n\t\t\tfont-size: 14px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-info-panel-description {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-bottom: 10px;\n\t\t\tline-height: 1.45;\n\t\t}\n\t\t.pict-flow-info-panel-badges {\n\t\t\tmargin-bottom: 10px;\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-flow-info-panel-badge {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 2px 8px;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t.pict-flow-info-panel-badge.category {\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tcolor: var(--pf-badge-category-text);\n\t\t}\n\t\t.pict-flow-info-panel-badge.code {\n\t\t\tbackground: var(--pf-badge-code-bg);\n\t\t\tcolor: var(--pf-badge-code-text);\n\t\t\tfont-family: "SF Mono", "Fira Code", monospace;\n\t\t}\n\t\t.pict-flow-info-panel-section {\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.pict-flow-info-panel-section-title {\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tmargin-bottom: 4px;\n\t\t\tpadding-bottom: 2px;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-info-panel-port {\n\t\t\tpadding: 3px 8px;\n\t\t\tbackground: var(--pf-port-item-bg);\n\t\t\tmargin-bottom: 3px;\n\t\t\tfont-size: 11px;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-info-panel-port.input {\n\t\t\tborder-left: 3px solid var(--pf-port-input-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.output {\n\t\t\tborder-left: 3px solid var(--pf-port-output-fill);\n\t\t}\n\t\t/* Info panel port type color overrides */\n\t\t.pict-flow-info-panel-port.port-type-event-in {\n\t\t\tborder-left-color: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-event-out {\n\t\t\tborder-left-color: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-setting {\n\t\t\tborder-left-color: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-value {\n\t\t\tborder-left-color: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-error {\n\t\t\tborder-left-color: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port-constraint {\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t/* Port summary section appended below form panels */\n\t\t.pict-flow-port-summary {\n\t\t\tmargin-top: 12px;\n\t\t\tpadding-top: 8px;\n\t\t\tborder-top: 1px solid var(--pf-divider-medium);\n\t\t}\n\t\t.pict-flow-info-panel-port.event {\n\t\t\tborder-left: 3px solid var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.value {\n\t\t\tborder-left: 3px solid var(--pf-port-value-fill);\n\t\t}\n\t\t'}},{key:"getNodePropsEditorCSS",value:function(){return"\n\t\t.pict-flow-node-props-fields {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-node-props-field {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.pict-flow-node-props-label {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 72px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-node-props-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 11px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-flow-node-props-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-node-props-color {\n\t\t\twidth: 28px;\n\t\t\theight: 24px;\n\t\t\tpadding: 1px;\n\t\t\tcursor: pointer;\n\t\t\tflex: 0 0 28px;\n\t\t}\n\t\t"}},{key:"getPanelTabsCSS",value:function(){return"\n\t\t.pict-flow-panel-resize-handle {\n\t\t\theight: 6px;\n\t\t\tcursor: ns-resize;\n\t\t\tbackground: transparent;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-panel-resize-handle::after {\n\t\t\tcontent: '';\n\t\t\twidth: 24px;\n\t\t\theight: 2px;\n\t\t\tborder-radius: 1px;\n\t\t\tbackground: var(--pf-resize-handle-hover);\n\t\t\ttransition: background-color 0.15s, width 0.15s;\n\t\t}\n\t\t.pict-flow-panel-resize-handle:hover::after {\n\t\t\tbackground: var(--pf-button-hover-border);\n\t\t\twidth: 32px;\n\t\t}\n\t\t.pict-flow-panel-tabbar {\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t}\n\t\t.pict-flow-panel-tab {\n\t\t\tflex: 1;\n\t\t\tpadding: 5px 8px;\n\t\t\tfont-size: 11px;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-tab-text);\n\t\t\tborder-top: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-top-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-panel-tab:hover {\n\t\t\tcolor: var(--pf-tab-text-hover);\n\t\t}\n\t\t.pict-flow-panel-tab.active {\n\t\t\tborder-top-color: var(--pf-node-selected-stroke);\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.pict-flow-panel-help-content {\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-panel-help-content p {\n\t\t\tmargin: 0 0 8px 0;\n\t\t}\n\t\t"}},{key:"getFullscreenCSS",value:function(){return"\n\t\t.pict-flow-fullscreen {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100vw;\n\t\t\theight: 100vh;\n\t\t\tz-index: 9999;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t\tmin-height: 100vh;\n\t\t}\n\t\t.pict-flow-fullscreen .pict-flow-svg {\n\t\t\tmin-height: calc(100vh - 50px);\n\t\t}\n\t\t"}},{key:"getToolbarCSS",value:function(){return"\n\t\t.pict-flow-toolbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-toolbar-border);\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t.pict-flow-toolbar-group {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t\tpadding-right: 0.75em;\n\t\t\tborder-right: 1px solid var(--pf-toolbar-border);\n\t\t}\n\t\t.pict-flow-toolbar-group:last-child {\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.65em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-size: 0.85em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tborder-color: var(--pf-button-hover-border);\n\t\t}\n\t\t.pict-flow-toolbar-btn:active {\n\t\t\tbackground-color: var(--pf-button-active-bg);\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-btn-text {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-toolbar-btn-chevron {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.pict-flow-toolbar-right {\n\t\t\tmargin-left: auto;\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-label {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-right: 0.25em;\n\t\t}\n\t\t.pict-flow-toolbar-select {\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t"}},{key:"getPaletteCSS",value:function(){return"\n\t\t.pict-flow-palette-category {\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.pict-flow-palette-category:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.pict-flow-palette-category-label {\n\t\t\tfont-size: 0.7em;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tmargin-bottom: 0.35em;\n\t\t\tpadding-bottom: 0.2em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-palette-cards {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.35em;\n\t\t}\n\t\t.pict-flow-palette-card {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.6em;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-panel-bg);\n\t\t\tfont-size: 0.8em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-palette-card:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-node-selected-stroke);\n\t\t\tbox-shadow: var(--pf-card-hover-shadow);\n\t\t}\n\t\t.pict-flow-palette-card.disabled {\n\t\t\topacity: 0.45;\n\t\t\tpointer-events: none;\n\t\t\tcursor: default;\n\t\t}\n\t\t.pict-flow-palette-card-icon {\n\t\t\tfont-size: 1.1em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-palette-card-swatch {\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tborder-radius: 2px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-palette-card-title {\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-palette-card-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.pict-flow-toolbar-select.layout-select {\n\t\t\tmin-width: 120px;\n\t\t\tmax-width: 200px;\n\t\t}\n\t\t"}},{key:"getPopupCSS",value:function(){return'\n\t\t.pict-flow-toolbar-popup-anchor {\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-toolbar-popup {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1000;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 6px;\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tmin-width: 240px;\n\t\t\tmax-height: 340px;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 0.35em 0;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.pict-flow-popup-search-wrapper {\n\t\t\tposition: relative;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-popup-search-icon {\n\t\t\tposition: absolute;\n\t\t\tleft: 0.85em;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t\tpointer-events: none;\n\t\t\tline-height: 1;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.pict-flow-popup-search {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em 0.4em 2em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-search:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-list-item {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-list-item:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-list-item-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-list-item-label {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-list-item-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tpadding: 0.1em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-popup-divider {\n\t\t\theight: 1px;\n\t\t\tbackground: var(--pf-divider-light);\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-flow-popup-list-empty {\n\t\t\ttext-align: center;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tpadding: 1.5em 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-flow-popup-layout-save {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-layout-save:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-save-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcursor: pointer;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-name {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-popup-layout-delete {\n\t\t\tdisplay: none;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover .pict-flow-popup-layout-delete {\n\t\t\tdisplay: inline-flex;\n\t\t}\n\t\t.pict-flow-popup-layout-delete:hover {\n\t\t\tbackground-color: var(--pf-button-danger-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-settings-section {\n\t\t\tpadding: 0.5em 0.75em;\n\t\t}\n\t\t.pict-flow-popup-settings-label {\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.8em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tmargin-bottom: 0.35em;\n\t\t}\n\t\t.pict-flow-popup-settings-select {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-settings-select:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-settings-slider-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.pict-flow-popup-settings-slider {\n\t\t\tflex: 1;\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\theight: 4px;\n\t\t\tbackground: var(--pf-input-border);\n\t\t\tborder-radius: 2px;\n\t\t\toutline: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-webkit-slider-thumb {\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-moz-range-thumb {\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t\tborder: none;\n\t\t}\n\t\t.pict-flow-popup-settings-slider-value {\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 2.5em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t'}},{key:"getCollapsedToolbarCSS",value:function(){return"\n\t\t.pict-flow-toolbar-collapsed {\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: 8px;\n\t\t\tz-index: 100;\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-toolbar-collapsed.visible {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn {\n\t\t\twidth: 36px;\n\t\t\theight: 36px;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 2px 6px rgba(0,0,0,0.1);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tbox-shadow: 0 2px 8px rgba(0,0,0,0.15);\n\t\t}\n\t\t"}},{key:"getFloatingToolbarCSS",value:function(){return"\n\t\t.pict-flow-floating-toolbar {\n\t\t\tposition: absolute;\n\t\t\tz-index: 100;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 2px;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 8px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-floating-grip {\n\t\t\tcursor: grab;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-grip:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-grip:active {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-floating-btn {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: transparent;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-floating-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-separator {\n\t\t\theight: 1px;\n\t\t\tbackground-color: var(--pf-divider-light);\n\t\t\tmargin: 2px 4px;\n\t\t}\n\t\t/* Collapsed floating toolbar — grip-only draggable square */\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-btn,\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-separator {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed {\n\t\t\tpadding: 0;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip span {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t"}},{key:"getIconCSS",value:function(){return"\n\t\t.pict-flow-icon-svg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-palette-card-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t\tmargin-right: 4px;\n\t\t}\n\t\t.pict-flow-panel-close-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-panel-close-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-palette-toggle-arrow svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t"}},{key:"getBracketNodeCSS",value:function(){return"\n\t\t/* Bracket outline path */\n\t\t.pict-flow-node-bracket {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\n\t\t/* Bracket fill rects: no stroke, no rounded corners.\n\t\t Uses parent-qualified selectors to beat variant rules\n\t\t (e.g. .pict-flow-node-start .pict-flow-node-body). */\n\t\t.pict-flow-node .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t\trx: 0;\n\t\t\try: 0;\n\t\t}\n\t\t/* Beat hover rule: .pict-flow-node:hover .pict-flow-node-body */\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t/* Beat selected rule: .pict-flow-node.selected .pict-flow-node-body */\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t"}},{key:"generateCSS",value:function(){var t=this.getContainerCSS()+this.getNodeCSS()+this.getBodyContentCSS()+this.getNodeVariantCSS()+this.getPortCSS()+this.getConnectionCSS()+this.getHandleCSS()+this.getTetherCSS()+this.getPanelCSS()+this.getInfoPanelCSS()+this.getNodePropsEditorCSS()+this.getPanelTabsCSS()+this.getBracketNodeCSS()+this.getFullscreenCSS()+this.getToolbarCSS()+this.getPaletteCSS()+this.getPopupCSS()+this.getCollapsedToolbarCSS()+this.getFloatingToolbarCSS()+this.getIconCSS();if(this._FlowView&&this._FlowView._ThemeProvider){var e=this._FlowView._ThemeProvider.getActiveTheme();if(e&&e.CSSVariables&&Object.keys(e.CSSVariables).length>0){var o=".pict-flow-container {\n";for(var i in e.CSSVariables)o+="\t"+i+": "+e.CSSVariables[i]+";\n";t+=o+="}\n"}e&&e.AdditionalCSS&&(t+=e.AdditionalCSS)}return t}},{key:"registerCSS",value:function(){this.fable&&this.fable.CSSMap?(this.fable.CSSMap.removeCSS("PictSectionFlow-CSS"),this.fable.CSSMap.addCSS("PictSectionFlow-CSS",this.generateCSS(),500,"PictProviderFlowCSS"),this.fable.CSSMap.injectCSS()):this.log.warn("PictProviderFlowCSS: CSSMap not available; CSS not registered.")}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],17:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowConnectorShapes",n._FlowView=o&&o.FlowView?o.FlowView:null,n._DefaultShapes={port:{ElementType:"circle",Attributes:{r:"5"},ClassName:"pict-flow-port"},"panel-indicator":{ElementType:"rect",Attributes:{rx:"2",ry:"2"},ClassName:"pict-flow-node-panel-indicator"},"connection-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection"},"connection-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection-hitarea"},"connection-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle"},"connection-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle-midpoint"},"drag-connection":{ElementType:"path",Attributes:{},ClassName:"pict-flow-drag-connection"},"tether-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-line"},"tether-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-hitarea"},"tether-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle"},"tether-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle-midpoint"},"arrowhead-connection":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#95a5a6"},"arrowhead-connection-selected":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#3498db"},"arrowhead-tether":{MarkerWidth:"4",MarkerHeight:"6",RefX:"6",RefY:"3",Points:"0 0, 4 3, 0 6",Fill:"#95a5a6"}},n._OriginalShapes=JSON.parse(JSON.stringify(n._DefaultShapes)),n}return _inherits(e,t),_createClass(e,[{key:"applyThemeOverrides",value:function(t){if(t&&"object"===_typeof(t))for(var e in t)this._DefaultShapes.hasOwnProperty(e)?Object.assign(this._DefaultShapes[e],t[e]):this._DefaultShapes[e]=t[e]}},{key:"resetToDefaults",value:function(){this._DefaultShapes=JSON.parse(JSON.stringify(this._OriginalShapes))}},{key:"getShapeConfig",value:function(t){return this._DefaultShapes.hasOwnProperty(t)?this._DefaultShapes[t]:null}},{key:"setShapeConfig",value:function(t,e){this._DefaultShapes[t]=e}},{key:"getShapeKeys",value:function(){return Object.keys(this._DefaultShapes)}},{key:"createPortElement",value:function(t,e,o){var i=this._DefaultShapes.port,n=this._FlowView._SVGHelperProvider.createSVGElement(i.ElementType),r=i.ClassName+" "+t.Direction;for(var a in t.PortType&&(r+=" port-type-"+t.PortType),n.setAttribute("class",r),n.setAttribute("cx",String(e.x)),n.setAttribute("cy",String(e.y)),i.Attributes)n.setAttribute(a,i.Attributes[a]);return n.setAttribute("data-port-hash",t.Hash),n.setAttribute("data-node-hash",o),n.setAttribute("data-port-direction",t.Direction),t.PortType&&n.setAttribute("data-port-type",t.PortType),n.setAttribute("data-element-type","port"),n}},{key:"createPanelIndicatorElement",value:function(t,e,o,i,n){var r=this._DefaultShapes["panel-indicator"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var s in a.setAttribute("class",r.ClassName),a.setAttribute("x",String(e)),a.setAttribute("y",String(o)),a.setAttribute("width",String(i)),a.setAttribute("height",String(n)),r.Attributes)a.setAttribute(s,r.Attributes[s]);return a.setAttribute("data-node-hash",t),a.setAttribute("data-element-type","panel-indicator"),a}},{key:"createConnectionPathElement",value:function(t,e,o,i){var n=this._DefaultShapes["connection-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(n.ElementType);r.setAttribute("class",n.ClassName+(o?" selected":"")),r.setAttribute("d",t),r.setAttribute("data-connection-hash",e),r.setAttribute("data-element-type","connection");o?this._DefaultShapes["arrowhead-connection-selected"]:this._DefaultShapes["arrowhead-connection"];var a=o?"flow-arrowhead-selected-"+i:"flow-arrowhead-"+i;return r.setAttribute("marker-end","url(#"+a+")"),r}},{key:"createConnectionHitAreaElement",value:function(t,e){var o=this._DefaultShapes["connection-hitarea"],i=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return i.setAttribute("class",o.ClassName),i.setAttribute("d",t),i.setAttribute("data-connection-hash",e),i.setAttribute("data-element-type","connection-hitarea"),i}},{key:"createHandleElement",value:function(t,e,o,i,n){var r=this._DefaultShapes[n]||this._DefaultShapes["connection-handle"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var s in a.setAttribute("class",r.ClassName),a.setAttribute("cx",String(o)),a.setAttribute("cy",String(i)),r.Attributes)a.setAttribute(s,r.Attributes[s]);return a.setAttribute("data-handle-type",e),a}},{key:"createFullHandle",value:function(t,e,o,i,n,r,a,s){var l=this.createHandleElement(e,o,i,n,r);return l.setAttribute("data-element-type",a),l.setAttribute(s,e),t.appendChild(l),l}},{key:"createDragConnectionElement",value:function(t){var e=this._DefaultShapes["drag-connection"],o=this._FlowView._SVGHelperProvider.createSVGElement(e.ElementType);return o.setAttribute("class",e.ClassName),o.setAttribute("d",t),o}},{key:"createTetherPathElement",value:function(t,e,o,i){var n=this._DefaultShapes["tether-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(n.ElementType);return r.setAttribute("class",n.ClassName+(o?" selected":"")),r.setAttribute("d",t),r.setAttribute("marker-end","url(#flow-tether-arrowhead-"+i+")"),r.setAttribute("data-element-type","tether"),r.setAttribute("data-panel-hash",e),r}},{key:"createTetherHitAreaElement",value:function(t,e){var o=this._DefaultShapes["tether-hitarea"],i=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return i.setAttribute("class",o.ClassName),i.setAttribute("d",t),i.setAttribute("data-element-type","tether-hitarea"),i.setAttribute("data-panel-hash",e),i}},{key:"generateMarkerDefs",value:function(t){var e=this._DefaultShapes["arrowhead-connection"],o=this._DefaultShapes["arrowhead-connection-selected"],i=this._DefaultShapes["arrowhead-tether"],n="";n+='<marker id="flow-arrowhead-'+t+'" markerWidth="'+e.MarkerWidth+'" markerHeight="'+e.MarkerHeight+'" refX="'+e.RefX+'" refY="'+e.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+e.Points+'" fill="'+e.Fill+'" /></marker>';var r={"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"};for(var a in r)n+='<marker id="flow-arrowhead-'+a+"-"+t+'" markerWidth="'+e.MarkerWidth+'" markerHeight="'+e.MarkerHeight+'" refX="'+e.RefX+'" refY="'+e.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+e.Points+'" fill="'+r[a]+'" /></marker>';return n+='<marker id="flow-arrowhead-selected-'+t+'" markerWidth="'+o.MarkerWidth+'" markerHeight="'+o.MarkerHeight+'" refX="'+o.RefX+'" refY="'+o.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+o.Points+'" fill="'+o.Fill+'" /></marker>',n+='<marker id="flow-tether-arrowhead-'+t+'" markerWidth="'+i.MarkerWidth+'" markerHeight="'+i.MarkerHeight+'" refX="'+i.RefX+'" refY="'+i.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+i.Points+'" fill="'+i.Fill+'" /></marker>'}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],18:[function(t,e,o){var i=t("pict-provider"),n={ProviderIdentifier:"PictProviderFlowEventHandler"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowEventHandler",r._FlowView=o&&o.FlowView?o.FlowView:null,r._Handlers={},r}return _inherits(e,t),_createClass(e,[{key:"registerHandler",value:function(t,e,o){if("function"!=typeof e)return this.log.warn("PictProviderFlowEventHandler registerHandler: handler for '".concat(t,"' is not a function")),null;this._Handlers[t]||(this._Handlers[t]=[]);var i=o||"handler-".concat(this.fable.getUUID());return this._Handlers[t].push({Hash:i,Handler:e}),this.log.trace("PictProviderFlowEventHandler registered handler '".concat(i,"' for event '").concat(t,"'")),i}},{key:"removeHandler",value:function(t,e){if(!this._Handlers[t])return!1;var o=this._Handlers[t].findIndex(function(t){return t.Hash===e});return o>=0&&(this._Handlers[t].splice(o,1),!0)}},{key:"removeAllHandlers",value:function(t){t?this._Handlers[t]=[]:this._Handlers={}}},{key:"fireEvent",value:function(t,e){if(this.log.trace("PictProviderFlowEventHandler firing event '".concat(t,"'")),this._Handlers[t]&&0!==this._Handlers[t].length)for(var o=0;o<this._Handlers[t].length;o++){var i=this._Handlers[t][o];try{i.Handler(e,this._FlowView)}catch(e){this.log.error("PictProviderFlowEventHandler error in handler '".concat(i.Hash,"' for event '").concat(t,"': ").concat(e.message))}}}},{key:"hasHandlers",value:function(t){return!!(this._Handlers[t]&&this._Handlers[t].length>0)}},{key:"getHandlerCount",value:function(t){return this._Handlers[t]?this._Handlers[t].length:0}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-provider":8}],19:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowGeometry",n}return _inherits(e,t),_createClass(e,[{key:"getEdgeFromSide",value:function(t){switch(t){case"left-top":case"left":case"left-bottom":return"left";case"right-top":case"right":case"right-bottom":default:return"right";case"top-left":case"top":case"top-right":return"top";case"bottom-left":case"bottom":case"bottom-right":return"bottom"}}},{key:"sideDirection",value:function(t){switch(this.getEdgeFromSide(t)){case"left":return{dx:-1,dy:0};case"right":default:return{dx:1,dy:0};case"top":return{dx:0,dy:-1};case"bottom":return{dx:0,dy:1}}}},{key:"getEdgeCenter",value:function(t,e){switch(e){case"left":return{x:t.X,y:t.Y+t.Height/2};case"right":default:return{x:t.X+t.Width,y:t.Y+t.Height/2};case"top":return{x:t.X+t.Width/2,y:t.Y};case"bottom":return{x:t.X+t.Width/2,y:t.Y+t.Height}}}},{key:"getPortLocalPosition",value:function(t,e,o,i,n,r,a){var s=this.getEdgeFromSide(t),l=a?this._computeAdaptiveZone(t,a):this._getZoneFromSide(t),c=this._getZoneFromSide(t),d="start";if(c.start>=.5?d="end":c.start>=.17&&(d="center"),"left"===s||"right"===s){var p="left"===s?0:i,h=n-r-16,u=r+h*l.start,f=h*(l.end-l.start)-16*(o+1);f<0&&(f=0);var w=0;return"end"===d?w=f:"center"===d&&(w=f/2),{x:p,y:u+w+16*(e+1)}}var v="top"===s?0:n,g=i*l.start,y=i*(l.end-l.start)-16*(o+1);y<0&&(y=0);var b=0;return"end"===d?b=y:"center"===d&&(b=y/2),{x:g+b+16*(e+1),y:v}}},{key:"_getZoneFromSide",value:function(t){switch(t){case"left-top":case"right-top":case"top-left":case"bottom-left":return{start:0,end:.333};case"left":case"right":case"top":case"bottom":return{start:.333,end:.667};case"left-bottom":case"right-bottom":case"top-right":case"bottom-right":return{start:.667,end:1};default:return{start:0,end:1}}}},{key:"_getZoneKeysForEdge",value:function(t){switch(t){case"left":return["left-top","left","left-bottom"];case"right":default:return["right-top","right","right-bottom"];case"top":return["top-left","top","top-right"];case"bottom":return["bottom-left","bottom","bottom-right"]}}},{key:"_computeAdaptiveZone",value:function(t,e){for(var o=this.getEdgeFromSide(t),i=this._getZoneKeysForEdge(o),n=0,r={},a=0;a<i.length;a++){var s=i[a],l=e[s]||0,c=l>0?16*(l+1):0;r[s]=c,n+=c}if(0===n)return this._getZoneFromSide(t);for(var d=0,p=0;p<i.length;p++){var h=i[p],u=r[h]/n;if(h===t)return{start:d,end:d+u};d+=u}return this._getZoneFromSide(t)}},{key:"buildPortCountsBySide",value:function(t){var e={};if(!t||!Array.isArray(t))return e;for(var o=0;o<t.length;o++){var i=t[o].Side||("input"===t[o].Direction?"left":"right");e[i]||(e[i]=0),e[i]++}return e}},{key:"computeMinimumNodeHeight",value:function(t,e){if(!t||!Array.isArray(t)||0===t.length)return 0;var o=this.buildPortCountsBySide(t),i={};for(var n in o){var r=this.getEdgeFromSide(n);if("left"===r||"right"===r){var a=16*(o[n]+1);i[r]||(i[r]=0),i[r]+=a}}var s=0;for(var l in i){var c=e+16+i[l];c>s&&(s=c)}return Math.ceil(s)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],20:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowIcons"},r={ITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="6" r="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="6" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="18" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 9v2M9.5 12.5L6 15.5M14.5 12.5L18 15.5" stroke="#2c3e50" stroke-width="2"/></svg>',SW:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M3 12h5M16 12h5M14.8 9.2l3.7-5.2M14.8 14.8l3.7 5.2" stroke="#2c3e50" stroke-width="2"/></svg>',EACH:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',FREAD:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M9 13h6M9 17h4" stroke="#2c3e50" stroke-width="2"/></svg>',FWRITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M12 13v5M9.5 15.5L12 13l2.5 2.5" stroke="#2c3e50" stroke-width="2"/></svg>',LOG:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="7.5" cy="8" r="1" fill="#2c3e50"/><circle cx="7.5" cy="12" r="1" fill="#2c3e50"/><circle cx="7.5" cy="16" r="1" fill="#2c3e50"/><path d="M11 8h5.5M11 12h5.5M11 16h3.5" stroke="#2c3e50" stroke-width="2"/></svg>',GET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="10.5" cy="10.5" r="6.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-5.15-5.15" stroke="#2c3e50" stroke-width="2"/></svg>',SET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4.5 1.5L4 16Z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M14 6l3 3" stroke="#2c3e50" stroke-width="2"/></svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6"/><path d="M9 21H3v-6"/><path d="M21 3l-7 7"/><path d="M3 21l7-7"/></svg>',"exit-fullscreen":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14h6v6"/><path d="M20 10h-6V4"/><path d="M14 10l7-7"/><path d="M3 21l7-7"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',"chevron-down":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/></svg>',cards:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="16" height="12" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M6 7V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-2" stroke="#2c3e50" stroke-width="2"/></svg>',layout:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="3" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="15" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="11" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',collapse:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',expand:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',grip:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="#2c3e50"><circle cx="9" cy="5" r="1.5"/><circle cx="15" cy="5" r="1.5"/><circle cx="9" cy="12" r="1.5"/><circle cx="15" cy="12" r="1.5"/><circle cx="9" cy="19" r="1.5"/><circle cx="15" cy="19" r="1.5"/></svg>',settings:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3" fill="#d5e8f7"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',trash:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M17 21v-8H7v8" stroke="#2c3e50" stroke-width="2"/><path d="M7 3v5h8" stroke="#2c3e50" stroke-width="2"/></svg>',"auto-layout":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="2" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="2" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v4M6 16v-4h12v4" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-in":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M11 8v6M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-out":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-fit":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7V3h4"/><path d="M17 3h4v4"/><path d="M21 17v4h-4"/><path d="M7 21H3v-4"/><rect x="7" y="7" width="10" height="10" rx="1.5" fill="#d5e8f7"/></svg>',dock:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="4" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 20V11M8 14l4-4 4 4" stroke="#2c3e50" stroke-width="2"/></svg>',restore:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/></svg>',"delete-node":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',default:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="12" cy="12" r="2.5" fill="#2c3e50"/></svg>'},a=function(t){function e(t,o,i){var a;if(_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowIcons",a._FlowView=o&&o.FlowView?o.FlowView:null,a._Icons=JSON.parse(JSON.stringify(r)),o&&o.AdditionalIcons&&"object"===_typeof(o.AdditionalIcons))for(var s=Object.keys(o.AdditionalIcons),l=0;l<s.length;l++)a._Icons[s[l]]=o.AdditionalIcons[s[l]];return a}return _inherits(e,t),_createClass(e,[{key:"registerIconTemplates",value:function(){if(this.fable&&this.fable.TemplateProvider)for(var t=Object.keys(this._Icons),e=0;e<t.length;e++){var o="Flow-Icon-"+t[e];this.fable.TemplateProvider.getTemplate(o)||this.fable.TemplateProvider.addTemplate(o,this._Icons[t[e]])}else this.log.warn("PictProviderFlowIcons: TemplateProvider not available; icon templates not registered.")}},{key:"isEmojiIcon",value:function(t){if(!t||"string"!=typeof t)return!1;for(var e=0;e<t.length;e++)if(t.charCodeAt(e)>255)return!0;return!1}},{key:"resolveIconKey",value:function(t){return t?t.Icon&&this._Icons.hasOwnProperty(t.Icon)||t.Icon&&!this.isEmojiIcon(t.Icon)?t.Icon:t.Code&&this._Icons.hasOwnProperty(t.Code)?t.Code:"default":"default"}},{key:"getIconSVGMarkup",value:function(t,e){var o=e||16,i=t||"default";return(this._Icons[i]||this._Icons.default).replace(/\{FlowIconSize\}/g,String(o))}},{key:"renderIconIntoSVGGroup",value:function(t,e,o,i,n){if(!e)return null;var r=(n||16)/24,a=t||"default",s=this._Icons[a]||this._Icons.default;s=s.replace(/\{FlowIconSize\}/g,"24");try{var l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.innerHTML=s;var c=l.querySelector("svg");if(!c)return null;var d=document.createElementNS("http://www.w3.org/2000/svg","g");for(d.setAttribute("transform","translate("+o+","+i+") scale("+r+")"),d.setAttribute("pointer-events","none"),d.setAttribute("class","pict-flow-icon-svg");c.childNodes.length>0;)d.appendChild(c.childNodes[0]);return e.appendChild(d),d}catch(t){return this.log.warn("PictProviderFlowIcons renderIconIntoSVGGroup error: "+t.message),null}}},{key:"getIconKeys",value:function(){return Object.keys(this._Icons)}},{key:"hasIcon",value:function(t){return this._Icons.hasOwnProperty(t)}},{key:"registerIcon",value:function(t,e){return!(!t||!e)&&(this._Icons[t]=e,this.fable&&this.fable.TemplateProvider&&this.fable.TemplateProvider.addTemplate("Flow-Icon-"+t,e),!0)}}])}(i);e.exports=a,e.exports.default_configuration=n,e.exports.DefaultIcons=r},{"fable-serviceproviderbase":4}],21:[function(t,e,o){var i=t("pict-provider"),n={ProviderIdentifier:"PictProviderFlowLayouts"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowLayouts",r._FlowView=o&&o.FlowView?o.FlowView:null,o&&void 0!==o.StorageKey?r._StorageKey=o.StorageKey:r._FlowView&&r._FlowView.options&&r._FlowView.options.ViewIdentifier?r._StorageKey="pict-flow-layouts-".concat(r._FlowView.options.ViewIdentifier):r._StorageKey="pict-flow-layouts",r}return _inherits(e,t),_createClass(e,[{key:"storageWrite",value:function(t,e){if(!1===this._StorageKey)return e(null);try{return"undefined"!=typeof localStorage&&localStorage.setItem(this._StorageKey,JSON.stringify(t)),e(null)}catch(t){return this.log.warn("PictProviderFlowLayouts storageWrite error: ".concat(t.message)),e(t)}}},{key:"storageRead",value:function(t){if(!1===this._StorageKey)return t(null,[]);try{if("undefined"!=typeof localStorage){var e=localStorage.getItem(this._StorageKey);if(e){var o=JSON.parse(e);if(Array.isArray(o))return t(null,o)}}return t(null,[])}catch(e){return this.log.warn("PictProviderFlowLayouts storageRead error: ".concat(e.message)),t(e,[])}}},{key:"storageDelete",value:function(t){if(!1===this._StorageKey)return t(null);try{return"undefined"!=typeof localStorage&&localStorage.removeItem(this._StorageKey),t(null)}catch(e){return this.log.warn("PictProviderFlowLayouts storageDelete error: ".concat(e.message)),t(e)}}},{key:"loadPersistedLayouts",value:function(){var t=this;this.storageRead(function(e,o){if(!e&&Array.isArray(o)&&0!==o.length&&t._FlowView&&t._FlowView._FlowData){for(var i=t._FlowView._FlowData.SavedLayouts,n={},r=0;r<i.length;r++)n[i[r].Hash]=!0;for(var a=0,s=0;s<o.length;s++)n[o[s].Hash]||(i.push(o[s]),a++);a>0&&t.log.trace("PictProviderFlowLayouts loaded ".concat(a," persisted layout(s)"))}})}},{key:"saveLayout",value:function(t){var e=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts saveLayout: no FlowView reference"),null;for(var o=this._FlowView._FlowData,i="layout-".concat(this.fable.getUUID()),n={},r={},a=0;a<o.Nodes.length;a++){var s=o.Nodes[a];n[s.Hash]={X:s.X,Y:s.Y,Width:s.Width,Height:s.Height,Title:s.Title},s.Style&&Object.keys(s.Style).length>0&&(n[s.Hash].Style=JSON.parse(JSON.stringify(s.Style)))}for(var l=0;l<o.OpenPanels.length;l++){var c=o.OpenPanels[l];r[c.NodeHash]={X:c.X,Y:c.Y,Width:c.Width,Height:c.Height}}var d={Hash:i,Name:t||"Untitled Layout",CreatedAt:(new Date).toISOString(),NodePositions:n,PanelPositions:r,ViewState:{PanX:o.ViewState.PanX,PanY:o.ViewState.PanY,Zoom:o.ViewState.Zoom}};return o.SavedLayouts.push(d),this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(t){t&&e.log.warn("PictProviderFlowLayouts: failed to persist after save: ".concat(t.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutSaved",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts saved layout '".concat(d.Name,"' (").concat(d.Hash,")")),d}},{key:"restoreLayout",value:function(t){if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts restoreLayout: no FlowView reference"),!1;var e=this._FlowView._FlowData,o=e.SavedLayouts.find(function(e){return e.Hash===t});if(!o)return this.log.warn("PictProviderFlowLayouts restoreLayout: layout '".concat(t,"' not found")),!1;for(var i=[],n=[],r=0;r<e.Nodes.length;r++){var a=e.Nodes[r],s=o.NodePositions[a.Hash];s?(a.X=s.X,a.Y=s.Y,"number"==typeof s.Width&&(a.Width=s.Width),"number"==typeof s.Height&&(a.Height=s.Height),"string"==typeof s.Title&&(a.Title=s.Title),s.Style&&"object"===_typeof(s.Style)&&(a.Style=JSON.parse(JSON.stringify(s.Style))),i.push(a)):n.push(a)}if(o.PanelPositions)for(var l=0;l<e.OpenPanels.length;l++){var c=e.OpenPanels[l],d=o.PanelPositions[c.NodeHash];d&&(c.X=d.X,c.Y=d.Y,"number"==typeof d.Width&&(c.Width=d.Width),"number"==typeof d.Height&&(c.Height=d.Height))}return n.length>0&&this._FlowView._LayoutService&&this._FlowView._LayoutService.autoLayoutSubset(n,i,e.Connections),o.ViewState&&("number"==typeof o.ViewState.PanX&&(e.ViewState.PanX=o.ViewState.PanX),"number"==typeof o.ViewState.PanY&&(e.ViewState.PanY=o.ViewState.PanY),"number"==typeof o.ViewState.Zoom&&(e.ViewState.Zoom=o.ViewState.Zoom)),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutRestored",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",e)),this.log.trace("PictProviderFlowLayouts restored layout '".concat(o.Name,"' (").concat(o.Hash,")")),!0}},{key:"deleteLayout",value:function(t){var e=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts deleteLayout: no FlowView reference"),!1;var o=this._FlowView._FlowData,i=o.SavedLayouts.findIndex(function(e){return e.Hash===t});if(i<0)return this.log.warn("PictProviderFlowLayouts deleteLayout: layout '".concat(t,"' not found")),!1;var n=o.SavedLayouts.splice(i,1)[0];return this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(t){t&&e.log.warn("PictProviderFlowLayouts: failed to persist after delete: ".concat(t.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutDeleted",n),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts deleted layout '".concat(n.Name,"' (").concat(n.Hash,")")),!0}},{key:"getLayouts",value:function(){return this._FlowView?this._FlowView._FlowData.SavedLayouts:[]}},{key:"getLayout",value:function(t){return this._FlowView&&this._FlowView._FlowData.SavedLayouts.find(function(e){return e.Hash===t})||null}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-provider":8}],22:[function(t,e,o){var i=t("pict-provider"),n={default:{Hash:"default",Label:"Default",DefaultWidth:180,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Out"}],TitleBarColor:"#2c3e50",BodyStyle:{}},start:{Hash:"start",Label:"Start",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"output",Side:"right",Label:"Out"}],TitleBarColor:"#27ae60",BodyStyle:{fill:"#eafaf1",stroke:"#27ae60"}},end:{Hash:"end",Label:"End",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],TitleBarColor:"#1abc9c",BodyStyle:{fill:"#e8f8f5",stroke:"#1abc9c"}},halt:{Hash:"halt",Label:"Halt",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],TitleBarColor:"#e74c3c",BodyStyle:{fill:"#fdedec",stroke:"#e74c3c"}},decision:{Hash:"decision",Label:"Decision",DefaultWidth:200,DefaultHeight:100,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Yes"},{Hash:null,Direction:"output",Side:"bottom",Label:"No"}],TitleBarColor:"#f39c12",BodyStyle:{fill:"#fff9e6",stroke:"#f39c12"}}},r={ProviderIdentifier:"PictProviderFlowNodeTypes"},a=function(t){function e(t,o,i){var a;if(_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},r,o),i])).serviceType="PictProviderFlowNodeTypes",a._FlowView=o&&o.FlowView?o.FlowView:null,o&&!1===o.IncludeDefaultNodeTypes?a._NodeTypes={}:a._NodeTypes=JSON.parse(JSON.stringify(n)),o&&o.AdditionalNodeTypes&&"object"===_typeof(o.AdditionalNodeTypes))for(var s=Object.keys(o.AdditionalNodeTypes),l=0;l<s.length;l++){var c=o.AdditionalNodeTypes[s[l]];a._NodeTypes[s[l]]=Object.assign({},a._NodeTypes[s[l]]||{},JSON.parse(JSON.stringify(c))),c.BodyContent&&"function"==typeof c.BodyContent.RenderCallback&&(a._NodeTypes[s[l]].BodyContent||(a._NodeTypes[s[l]].BodyContent={}),a._NodeTypes[s[l]].BodyContent.RenderCallback=c.BodyContent.RenderCallback)}return a}return _inherits(e,t),_createClass(e,[{key:"getNodeType",value:function(t){return this._NodeTypes[t]||this._NodeTypes.default}},{key:"registerNodeType",value:function(t){return t&&t.Hash?(this._NodeTypes[t.Hash]=Object.assign({},this._NodeTypes[t.Hash]||{},t),!0):(this.log.warn("PictProviderFlowNodeTypes registerNodeType: invalid config (missing Hash)"),!1)}},{key:"removeNodeType",value:function(t){return"default"===t?(this.log.warn("PictProviderFlowNodeTypes: cannot remove the default node type"),!1):!!this._NodeTypes[t]&&(delete this._NodeTypes[t],!0)}},{key:"getNodeTypes",value:function(){return JSON.parse(JSON.stringify(this._NodeTypes))}},{key:"getNodeTypeList",value:function(){return Object.keys(this._NodeTypes)}},{key:"getEnabledCards",value:function(){for(var t=[],e=Object.keys(this._NodeTypes),o=0;o<e.length;o++){var i=this._NodeTypes[e[o]];i.CardMetadata&&!1!==i.CardMetadata.Enabled&&t.push(JSON.parse(JSON.stringify(i)))}return t}},{key:"getCardsByCategory",value:function(){for(var t=this.getEnabledCards(),e={},o=0;o<t.length;o++){var i=t[o].CardMetadata&&t[o].CardMetadata.Category?t[o].CardMetadata.Category:"General";e[i]||(e[i]=[]),e[i].push(t[o])}return e}},{key:"isFlowCard",value:function(t){var e=this._NodeTypes[t];return!(!e||!e.CardMetadata)}}])}(i);e.exports=a,e.exports.default_configuration=r,e.exports.DefaultNodeTypes=n},{"pict-provider":8}],23:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowNoise"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowNoise",r}return _inherits(e,t),_createClass(e,[{key:"hashString",value:function(t){for(var e=5381,o=0;o<t.length;o++)e=(e<<5)+e+t.charCodeAt(o),e&=e;return e>>>0}},{key:"seededRandom",value:function(t){var e=0|t;return function(){e=e+1831565813|0;var t=Math.imul(e^e>>>15,1|e);return(((t=t+Math.imul(t^t>>>7,61|t)^t)^t>>>14)>>>0)/4294967296}}},{key:"jitterPoint",value:function(t,e,o,i){return o<=0?{x:t,y:e}:{x:t+o*(i()-.5)*2,y:e+o*(i()-.5)*2}}},{key:"generateBracketPath",value:function(t,e,o,i,n,r){var a=this,s=this.seededRandom(this.hashString(r||"default")),l=o||18,c=t,d=e,p=function(t,e){return a.jitterPoint(t,e,n,s)},h=p(l,0),u=p(0,0),f=p(0,d),w=p(l,d),v=p(c-l,0),g=p(c,0),y=p(c,d),b=p(c-l,d),m="";return m+="M ".concat(h.x.toFixed(1)," ").concat(h.y.toFixed(1)),m+=" L ".concat(u.x.toFixed(1)," ").concat(u.y.toFixed(1)),m+=" L ".concat(f.x.toFixed(1)," ").concat(f.y.toFixed(1)),m+=" L ".concat(w.x.toFixed(1)," ").concat(w.y.toFixed(1)),m+=" M ".concat(v.x.toFixed(1)," ").concat(v.y.toFixed(1)),m+=" L ".concat(g.x.toFixed(1)," ").concat(g.y.toFixed(1)),m+=" L ".concat(y.x.toFixed(1)," ").concat(y.y.toFixed(1)),m+=" L ".concat(b.x.toFixed(1)," ").concat(b.y.toFixed(1))}},{key:"jitterPath",value:function(t,e,o){if(e<=0||!t)return t;var i=this.seededRandom(this.hashString(o||"path")),n=t.match(/[MLCQZmlcqz]|[-+]?[0-9]*\.?[0-9]+/g);if(!n)return t;for(var r=[],a=0;a<n.length;a++)/^[-+]?[0-9]*\.?[0-9]+$/.test(n[a])&&r.push(a);for(var s=0;s<r.length-1;s+=2){var l=r[s],c=r[s+1],d=e;0===s||s>=r.length-2?d=.15*e:(2===s||s>=r.length-4)&&(d=.5*e);var p=parseFloat(n[l]),h=parseFloat(n[c]),u=this.jitterPoint(p,h,d,i);n[l]=u.x.toFixed(1),n[c]=u.y.toFixed(1)}for(var f="",w=0;w<n.length;w++)w>0&&/^[MLCQZmlcqz]$/.test(n[w])?f+=" "+n[w]:f+=w>0?" "+n[w]:n[w];return f}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],24:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowPanelChrome",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"createPanelForeignObject",value:function(t,e){var o=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");o.setAttribute("class","pict-flow-panel-foreign-object"),o.setAttribute("data-panel-hash",t.Hash),o.setAttribute("data-node-hash",t.NodeHash),o.setAttribute("x",String(t.X)),o.setAttribute("y",String(t.Y)),o.setAttribute("width",String(t.Width)),o.setAttribute("height",String(t.Height));var i=this._FlowView.pict||this._FlowView.fable,n=t.Title||"Properties",r=i.parseTemplateByHash("Flow-PanelChrome-Template",{Hash:t.Hash,Title:n});o.innerHTML=r;var a=o.querySelector(".pict-flow-panel-close-icon");a&&this._FlowView&&this._FlowView._IconProvider?a.innerHTML=this._FlowView._IconProvider.getIconSVGMarkup("close",12):a&&(a.textContent="✕");var s=o.querySelector(".pict-flow-panel-content");s&&(s.addEventListener("pointerdown",function(t){t.stopPropagation()}),s.addEventListener("wheel",function(t){t.stopPropagation()}));var l=o.querySelector(".pict-flow-panel-tabbar");return l&&(l.addEventListener("pointerdown",function(t){t.stopPropagation()}),l.addEventListener("wheel",function(t){t.stopPropagation()})),e.appendChild(o),o.querySelector('.pict-flow-panel-tab-pane[data-tab="properties"]')}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],25:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowSVGHelpers",n}return _inherits(e,t),_createClass(e,[{key:"createSVGElement",value:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],26:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowTheme"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowTheme",r._FlowView=o&&o.FlowView?o.FlowView:null,r._ActiveThemeKey="default",r._NoiseLevel=0,r._Themes={},r._registerBuiltInThemes(),r}return _inherits(e,t),_createClass(e,[{key:"_registerBuiltInThemes",value:function(){this._Themes.default={Key:"default",Label:"Modern",CSSVariables:{},AdditionalCSS:"",NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{}},this._Themes.sketch={Key:"sketch",Label:"Sketch",CSSVariables:{"--pf-node-body-fill":"#fffef5","--pf-node-body-stroke":"#444444","--pf-node-body-stroke-width":"1.5","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"#f0ece0","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#fffef5","--pf-connection-stroke":"#555555","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#fffef5","--pf-grid-stroke":"#e8e4d8","--pf-panel-bg":"#fffef5","--pf-panel-border":"#ccccaa","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.08)","--pf-panel-titlebar-bg":"#f0ece0","--pf-panel-titlebar-border":"#ccccaa","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-panel-title-text,\n\t\t\t\t.pict-flow-panel-node-props-title,\n\t\t\t\t.pict-flow-info-panel {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:20,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.4,MaxJitterPx:4,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#555555"},"arrowhead-connection-selected":{Fill:"#2255aa"}}},this._Themes.blueprint={Key:"blueprint",Label:"Blueprint",CSSVariables:{"--pf-node-body-fill":"rgba(255,255,255,0.05)","--pf-node-body-stroke":"#ffffff","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"rgba(255,255,255,0.1)","--pf-node-type-label-fill":"rgba(255,255,255,0.5)","--pf-node-selected-stroke":"#ffdd44","--pf-port-input-fill":"#88bbff","--pf-port-output-fill":"#88ffbb","--pf-port-stroke":"#1a3a6a","--pf-connection-stroke":"rgba(255,255,255,0.6)","--pf-connection-selected-stroke":"#ffdd44","--pf-canvas-bg":"#1a3a6a","--pf-grid-stroke":"rgba(255,255,255,0.08)","--pf-panel-bg":"#1a3a6a","--pf-panel-border":"rgba(255,255,255,0.3)","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"rgba(255,255,255,0.05)","--pf-panel-titlebar-border":"rgba(255,255,255,0.15)","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 1px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #0d2244;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #142e54;\n\t\t\t\t\tborder-bottom-color: rgba(255,255,255,0.15);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.05);\n\t\t\t\t\tborder-color: rgba(255,255,255,0.2);\n\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.1);\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:18,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:"8 4",StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"rgba(255,255,255,0.6)"},"arrowhead-connection-selected":{Fill:"#ffdd44"}}},this._Themes.mono={Key:"mono",Label:"Monochrome",CSSVariables:{"--pf-node-body-fill":"#ffffff","--pf-node-body-stroke":"#000000","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"#000000","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#444444","--pf-port-input-fill":"#000000","--pf-port-output-fill":"#666666","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#000000","--pf-connection-selected-stroke":"#444444","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#eeeeee","--pf-panel-bg":"#ffffff","--pf-panel-border":"#000000","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"#f0f0f0","--pf-panel-titlebar-border":"#000000","--pf-panel-title-color":"#000000"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title {\n\t\t\t\t\tfont-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#000000"},"arrowhead-connection-selected":{Fill:"#444444"}}},this._Themes["retro-80s"]={Key:"retro-80s",Label:"80s Retro",CSSVariables:{"--pf-node-body-fill":"#1a0a2e","--pf-node-body-stroke":"#ff00ff","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(0 0 8px rgba(255,0,255,0.4))","--pf-node-shadow-hover":"drop-shadow(0 0 12px rgba(255,0,255,0.6))","--pf-node-shadow-selected":"drop-shadow(0 0 16px rgba(0,255,255,0.5))","--pf-node-shadow-dragging":"drop-shadow(0 0 20px rgba(255,0,255,0.7))","--pf-node-title-fill":"#00ffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#2a0a4e","--pf-node-type-label-fill":"#ff66ff","--pf-node-selected-stroke":"#00ffff","--pf-port-input-fill":"#ff00ff","--pf-port-output-fill":"#00ff66","--pf-port-stroke":"#1a0a2e","--pf-connection-stroke":"#ff00ff","--pf-connection-selected-stroke":"#00ffff","--pf-canvas-bg":"#0a0015","--pf-grid-stroke":"#1a0a2e","--pf-panel-bg":"#1a0a2e","--pf-panel-border":"#ff00ff","--pf-panel-radius":"0px","--pf-panel-shadow":"0 0 20px rgba(255,0,255,0.3)","--pf-panel-titlebar-bg":"#2a0a4e","--pf-panel-titlebar-border":"#ff00ff","--pf-panel-title-color":"#00ffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 0.5px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-connection {\n\t\t\t\t\tfilter: drop-shadow(0 0 3px rgba(255,0,255,0.4));\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) hue-rotate(180deg) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-bottom-color: #ff00ff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t\tcolor: #00ffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: #2a0a4e;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#ff00ff"},"arrowhead-connection-selected":{Fill:"#00ffff"}}},this._Themes["retro-90s"]={Key:"retro-90s",Label:"90s Retro",CSSVariables:{"--pf-node-body-fill":"#c0c0c0","--pf-node-body-stroke":"#808080","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(2px 2px 0px #404040)","--pf-node-shadow-hover":"drop-shadow(3px 3px 0px #404040)","--pf-node-shadow-selected":"drop-shadow(2px 2px 0px #008080)","--pf-node-shadow-dragging":"drop-shadow(4px 4px 0px #404040)","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#000080","--pf-node-type-label-fill":"#606060","--pf-node-selected-stroke":"#008080","--pf-port-input-fill":"#000080","--pf-port-output-fill":"#008000","--pf-port-stroke":"#c0c0c0","--pf-connection-stroke":"#808080","--pf-connection-selected-stroke":"#008080","--pf-canvas-bg":"#008080","--pf-grid-stroke":"rgba(0,0,0,0.06)","--pf-panel-bg":"#c0c0c0","--pf-panel-border":"#808080","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px #404040","--pf-panel-titlebar-bg":"#000080","--pf-panel-titlebar-border":"#c0c0c0","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "MS Sans Serif", "Arial", sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder-bottom: 2px solid #808080;\n\t\t\t\t\tborder-top: 1px solid #ffffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t\tcolor: #000000;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: #d0d0d0;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:active {\n\t\t\t\t\tborder-style: inset;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#808080"},"arrowhead-connection-selected":{Fill:"#008080"}}},this._Themes.whiteboard={Key:"whiteboard",Label:"Whiteboard",CSSVariables:{"--pf-node-body-fill":"transparent","--pf-node-body-stroke":"#555555","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"transparent","--pf-node-type-label-fill":"#999999","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#888888","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#f0f0f0","--pf-panel-bg":"#ffffff","--pf-panel-border":"#cccccc","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.06)","--pf-panel-titlebar-bg":"#f8f8f8","--pf-panel-titlebar-border":"#e0e0e0","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t/* Node-type bracket colors — each type gets its own bracket color */\n\t\t\t\t.pict-flow-node-start .pict-flow-node-bracket { stroke: #27ae60; }\n\t\t\t\t.pict-flow-node-end .pict-flow-node-bracket { stroke: #1abc9c; }\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-bracket { stroke: #e74c3c; }\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-bracket { stroke: #f39c12; }\n\t\t\t\t.pict-flow-node-default .pict-flow-node-bracket { stroke: #3498db; }\n\t\t\t\t.pict-flow-node-action .pict-flow-node-bracket { stroke: #2c3e50; }\n\t\t\t\t/* Override variant rules: no fills/strokes on body rects in whiteboard */\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-start .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-end .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\t\t\tfill: transparent;\n\t\t\t\t\tstroke: transparent;\n\t\t\t\t\tstroke-width: 0;\n\t\t\t\t}\n\t\t\t\t/* Title bar fills transparent too */\n\t\t\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\t\t\tfill: transparent !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: none !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:22,TitleSeparator:!1},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.3,MaxJitterPx:3,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#888888"},"arrowhead-connection-selected":{Fill:"#2255aa"}}}}},{key:"getActiveTheme",value:function(){return this._Themes[this._ActiveThemeKey]||this._Themes.default}},{key:"getActiveThemeKey",value:function(){return this._ActiveThemeKey}},{key:"setTheme",value:function(t){if(!this._Themes[t])return this.log.warn("PictProviderFlowTheme: theme '".concat(t,"' not found")),!1;this._ActiveThemeKey=t;var e=this._Themes[t];return e.NoiseConfig&&"number"==typeof e.NoiseConfig.DefaultLevel?this._NoiseLevel=e.NoiseConfig.DefaultLevel:this._NoiseLevel=0,this._FlowView&&this._FlowView._ConnectorShapesProvider&&(this._FlowView._ConnectorShapesProvider.resetToDefaults(),e.ShapeOverrides&&Object.keys(e.ShapeOverrides).length>0&&this._FlowView._ConnectorShapesProvider.applyThemeOverrides(e.ShapeOverrides)),this.log.trace("PictProviderFlowTheme: switched to '".concat(t,"'")),!0}},{key:"getNoiseLevel",value:function(){return this._NoiseLevel}},{key:"setNoiseLevel",value:function(t){this._NoiseLevel=Math.max(0,Math.min(1,t||0))}},{key:"registerTheme",value:function(t,e){t&&e?(e.Key=t,this._Themes[t]=e):this.log.warn("PictProviderFlowTheme: registerTheme requires key and definition")}},{key:"getThemeKeys",value:function(){return Object.keys(this._Themes)}},{key:"processPathString",value:function(t,e){var o=this.getActiveTheme();if(!(o&&o.NoiseConfig&&o.NoiseConfig.Enabled&&o.NoiseConfig.AffectsConnections))return t;var i=this._NoiseLevel*(o.NoiseConfig.MaxJitterPx||3);return i<=0?t:this._FlowView&&this._FlowView._NoiseProvider?this._FlowView._NoiseProvider.jitterPath(t,i,e):t}},{key:"getNodeNoiseAmplitude",value:function(){var t=this.getActiveTheme();return t&&t.NoiseConfig&&t.NoiseConfig.Enabled&&t.NoiseConfig.AffectsNodes?this._NoiseLevel*(t.NoiseConfig.MaxJitterPx||3):0}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],27:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowConnectionHandleManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"updateConnectionHandle",value:function(t,e,o,i){if(this._FlowView){var n=this._FlowView.getConnection(t);if(n){if(n.Data||(n.Data={}),n.Data.HandleCustomized=!0,e&&e.startsWith("bezier-handle-")){var r=parseInt(e.replace("bezier-handle-",""),10);return!isNaN(r)&&Array.isArray(n.Data.BezierHandles)&&r<n.Data.BezierHandles.length&&(n.Data.BezierHandles[r].x=o,n.Data.BezierHandles[r].y=i),void this._FlowView._renderSingleConnection(t)}switch(e){case"bezier-midpoint":Array.isArray(n.Data.BezierHandles)&&0!==n.Data.BezierHandles.length?(n.Data.BezierHandles[0].x=o,n.Data.BezierHandles[0].y=i):n.Data.BezierHandles=[{x:o,y:i}],n.Data.BezierHandleX=o,n.Data.BezierHandleY=i;break;case"ortho-corner1":n.Data.OrthoCorner1X=o,n.Data.OrthoCorner1Y=i;break;case"ortho-corner2":n.Data.OrthoCorner2X=o,n.Data.OrthoCorner2Y=i;break;case"ortho-midpoint":var a=this._FlowView.getPortPosition(n.SourceNodeHash,n.SourcePortHash),s=this._FlowView.getPortPosition(n.TargetNodeHash,n.TargetPortHash);if(a&&s){var l=this._FlowView._ConnectionRenderer._computeDirectionalGeometry(a,s),c=l.startDir;if(Math.abs(c.dx)>Math.abs(c.dy)){var d=(l.departX+l.approachX)/2;n.Data.OrthoMidOffset=o-d}else{var p=(l.departY+l.approachY)/2;n.Data.OrthoMidOffset=i-p}}}this._FlowView._renderSingleConnection(t)}}}},{key:"addConnectionHandle",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getConnection(t);if(i){i.Data||(i.Data={}),Array.isArray(i.Data.BezierHandles)||(i.Data.BezierHandles=[],null!=i.Data.BezierHandleX&&null!=i.Data.BezierHandleY&&i.Data.BezierHandles.push({x:i.Data.BezierHandleX,y:i.Data.BezierHandleY})),i.Data.LineMode="bezier";var n=this._FlowView.getPortPosition(i.SourceNodeHash,i.SourcePortHash),r=this._FlowView.getPortPosition(i.TargetNodeHash,i.TargetPortHash),a=0;n&&r&&this._FlowView._ConnectionRenderer&&(a=this._FlowView._ConnectionRenderer.computeInsertionIndex(i.Data.BezierHandles,{x:e,y:o},n,r)),i.Data.BezierHandles.splice(a,0,{x:e,y:o}),i.Data.HandleCustomized=!0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"removeConnectionHandle",value:function(t,e){if(this._FlowView){var o=this._FlowView.getConnection(t);o&&o.Data&&Array.isArray(o.Data.BezierHandles)&&(e<0||e>=o.Data.BezierHandles.length||(o.Data.BezierHandles.splice(e,1),0===o.Data.BezierHandles.length&&(o.Data.HandleCustomized=!1,o.Data.BezierHandleX=null,o.Data.BezierHandleY=null),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)))}}},{key:"resetHandlesForNode",value:function(t){if(this._FlowView){for(var e=0;e<this._FlowView._FlowData.Connections.length;e++){var o=this._FlowView._FlowData.Connections[e];o.SourceNodeHash!==t&&o.TargetNodeHash!==t||o.Data&&o.Data.HandleCustomized&&(o.Data.HandleCustomized=!1,o.Data.BezierHandles=[],o.Data.BezierHandleX=null,o.Data.BezierHandleY=null,o.Data.OrthoCorner1X=null,o.Data.OrthoCorner1Y=null,o.Data.OrthoCorner2X=null,o.Data.OrthoCorner2Y=null,o.Data.OrthoMidOffset=0)}this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlesForNode(this._FlowView._FlowData.OpenPanels,t)}}},{key:"resetHandlesForPanel",value:function(t){if(this._FlowView){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});e&&this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlePositions(e)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],28:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowConnectionRenderer",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderConnection",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getPortPosition(t.SourceNodeHash,t.SourcePortHash),n=this._FlowView.getPortPosition(t.TargetNodeHash,t.TargetPortHash),r=null,a=this._FlowView.getNode(t.SourceNodeHash);if(a&&a.Ports)for(var s=0;s<a.Ports.length;s++)if(a.Ports[s].Hash===t.SourcePortHash){r=a.Ports[s].PortType||null;break}if(i&&n){var l,c=t.Data||{};if("orthogonal"===(c.LineMode||"bezier")){var d=null;c.HandleCustomized&&null!=c.OrthoCorner1X&&(d={corner1:{x:c.OrthoCorner1X,y:c.OrthoCorner1Y},corner2:{x:c.OrthoCorner2X,y:c.OrthoCorner2Y}}),l=this._generateOrthogonalPath(i,n,d,c.OrthoMidOffset||0)}else{var p=this._getBezierHandles(c);l=p.length>0?this._generateMultiHandleBezierPath(i,n,p):this._generateDirectionalPath(i,n)}this._FlowView._ThemeProvider&&(l=this._FlowView._ThemeProvider.processPathString(l,t.Hash));var h=null;if(this._FlowView._ThemeProvider){var u=this._FlowView._ThemeProvider.getActiveTheme();u&&u.ConnectionConfig&&u.ConnectionConfig.StrokeDashArray&&(h=u.ConnectionConfig.StrokeDashArray)}var f,w=this._FlowView.options.ViewIdentifier,v=r?" conn-type-"+r:"";f=o?"flow-arrowhead-selected-"+w:r?"flow-arrowhead-"+r+"-"+w:"flow-arrowhead-"+w;var g=this._FlowView._ConnectorShapesProvider;if(g){var y=g.createConnectionHitAreaElement(l,t.Hash);e.appendChild(y);var b=g.createConnectionPathElement(l,t.Hash,o,w);v&&b.setAttribute("class",(b.getAttribute("class")||"")+v),b.setAttribute("marker-end","url(#"+f+")"),h&&b.setAttribute("stroke-dasharray",h),e.appendChild(b)}else{var m=this._FlowView._SVGHelperProvider.createSVGElement("path");m.setAttribute("class","pict-flow-connection-hitarea"),m.setAttribute("d",l),m.setAttribute("data-connection-hash",t.Hash),m.setAttribute("data-element-type","connection-hitarea"),e.appendChild(m);var _=this._FlowView._SVGHelperProvider.createSVGElement("path");_.setAttribute("class","pict-flow-connection".concat(v," ").concat(o?"selected":"")),_.setAttribute("d",l),_.setAttribute("data-connection-hash",t.Hash),_.setAttribute("data-element-type","connection"),_.setAttribute("marker-end","url(#"+f+")"),h&&_.setAttribute("stroke-dasharray",h),e.appendChild(_)}o&&this._renderHandles(t,e,i,n)}}}},{key:"_computeDirectionalGeometry",value:function(t,e){return this._FlowView._PathGenerator.computeDirectionalGeometry(t,e)}},{key:"_generateDirectionalPath",value:function(t,e){var o=this._computeDirectionalGeometry(t,e);return this._FlowView._PathGenerator.buildBezierPathString({x:t.x,y:t.y},{x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},{x:e.x,y:e.y})}},{key:"_getBezierHandles",value:function(t){return t&&t.HandleCustomized?Array.isArray(t.BezierHandles)&&t.BezierHandles.length>0?t.BezierHandles:null!=t.BezierHandleX&&null!=t.BezierHandleY?[{x:t.BezierHandleX,y:t.BezierHandleY}]:[]:[]}},{key:"_generateMultiHandleBezierPath",value:function(t,e,o){var i=this._computeDirectionalGeometry(t,e);return this._FlowView._PathGenerator.buildMultiBezierPathString({x:t.x,y:t.y},{x:i.departX,y:i.departY},o,{x:i.approachX,y:i.approachY},{x:e.x,y:e.y},i.startDir,i.endDir)}},{key:"computeInsertionIndex",value:function(t,e,o,i){for(var n=this._computeDirectionalGeometry(o,i),r=[{x:n.departX,y:n.departY}],a=0;a<t.length;a++)r.push(t[a]);r.push({x:n.approachX,y:n.approachY});for(var s=1/0,l=0,c=0;c<r.length-1;c++){var d=this._distanceToSegment(e.x,e.y,r[c].x,r[c].y,r[c+1].x,r[c+1].y);d<s&&(s=d,l=c)}return l}},{key:"_distanceToSegment",value:function(t,e,o,i,n,r){return this._FlowView._PathGenerator.distanceToSegment(t,e,o,i,n,r)}},{key:"getAutoMidpoint",value:function(t,e){return this._FlowView._PathGenerator.getAutoMidpoint(t,e)}},{key:"_generateOrthogonalPath",value:function(t,e,o,i){var n,r,a=this._FlowView._PathGenerator.computeDepartApproach(t,e,20);if(o&&o.corner1&&o.corner2)n=o.corner1,r=o.corner2;else{var s=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a.departX,a.departY,a.approachX,a.approachY,a.fromDir,a.toDir,i||0);n=s.corner1,r=s.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:t.x,y:t.y},{x:a.departX,y:a.departY},n,r,{x:a.approachX,y:a.approachY},{x:e.x,y:e.y})}},{key:"getOrthogonalGeometry",value:function(t,e,o){var i=this._FlowView._PathGenerator.computeDepartApproach(t,e,20);if(o&&o.HandleCustomized&&null!=o.OrthoCorner1X){var n={x:o.OrthoCorner1X,y:o.OrthoCorner1Y},r={x:o.OrthoCorner2X,y:o.OrthoCorner2Y};return{corner1:n,corner2:r,midpoint:{x:(n.x+r.x)/2,y:(n.y+r.y)/2}}}return this._FlowView._PathGenerator.computeAutoOrthogonalCorners(i.departX,i.departY,i.approachX,i.approachY,i.fromDir,i.toDir,o&&o.OrthoMidOffset||0)}},{key:"_renderHandles",value:function(t,e,o,i){var n=t.Data||{};if("orthogonal"===(n.LineMode||"bezier")){var r=this.getOrthogonalGeometry(o,i,n);this._createHandle(e,t.Hash,"ortho-corner1",r.corner1.x,r.corner1.y,"pict-flow-connection-handle"),this._createHandle(e,t.Hash,"ortho-midpoint",r.midpoint.x,r.midpoint.y,"pict-flow-connection-handle-midpoint"),this._createHandle(e,t.Hash,"ortho-corner2",r.corner2.x,r.corner2.y,"pict-flow-connection-handle")}else{var a=this._getBezierHandles(n);if(a.length>0)for(var s=0;s<a.length;s++)this._createHandle(e,t.Hash,"bezier-handle-"+s,a[s].x,a[s].y,"pict-flow-connection-handle");else{var l=this.getAutoMidpoint(o,i);this._createHandle(e,t.Hash,"bezier-midpoint",l.x,l.y,"pict-flow-connection-handle")}}}},{key:"_createHandle",value:function(t,e,o,i,n,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-connection-handle-midpoint"===r?"connection-handle-midpoint":"connection-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(t,e,o,i,n,a,"connection-handle","data-connection-hash")}}},{key:"_generateBezierPath",value:function(t,e){var o={x:t.x,y:t.y,side:t.side||"right"},i={x:e.x,y:e.y,side:e.side||"left"};return this._generateDirectionalPath(o,i)}},{key:"renderDragConnection",value:function(t,e,o,i,n,r){var a,s=this._generateDirectionalPath({x:t,y:e,side:r||"right"},{x:o,y:i,side:"left"}),l=this._FlowView._ConnectorShapesProvider;return l?a=l.createDragConnectionElement(s):((a=this._FlowView._SVGHelperProvider.createSVGElement("path")).setAttribute("class","pict-flow-drag-connection"),a.setAttribute("d",s)),n.appendChild(a),a}},{key:"updateDragConnection",value:function(t,e,o,i,n,r){if(t){var a=this._generateDirectionalPath({x:e,y:o,side:r||"right"},{x:i,y:n,side:"left"});t.setAttribute("d",a)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],29:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowDataManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"marshalToView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var t={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options},e=this._FlowView.fable.manifest.getValueByHash(t,this._FlowView.options.FlowDataAddress);"object"===_typeof(e)&&null!==e&&this.setFlowData(e)}}},{key:"marshalFromView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var t={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options};this._FlowView.fable.manifest.setValueByHash(t,this._FlowView.options.FlowDataAddress,JSON.parse(JSON.stringify(this._FlowView._FlowData)))}}},{key:"getFlowData",value:function(){return this._FlowView?JSON.parse(JSON.stringify(this._FlowView._FlowData)):{}}},{key:"setFlowData",value:function(t){this._FlowView&&("object"===_typeof(t)&&null!==t?(this._FlowView._FlowData={Nodes:Array.isArray(t.Nodes)?t.Nodes:[],Connections:Array.isArray(t.Connections)?t.Connections:[],OpenPanels:Array.isArray(t.OpenPanels)?t.OpenPanels:[],SavedLayouts:Array.isArray(t.SavedLayouts)?t.SavedLayouts:[],ViewState:Object.assign({PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null},t.ViewState||{})},this._FlowView._LayoutProvider&&this._FlowView._LayoutProvider.loadPersistedLayouts(),this._FlowView.initialRenderComplete&&this._FlowView.renderFlow()):this._FlowView.log.warn("PictSectionFlow setFlowData received invalid data"))}},{key:"addNode",value:function(t,e,o,i,n){if(!this._FlowView)return null;for(var r=t||this._FlowView.options.DefaultNodeType,a=this._FlowView._NodeTypeProvider.getNodeType(r),s={Hash:"node-".concat(this._FlowView.fable.getUUID()),Type:r,X:e||100,Y:o||100,Width:a&&a.DefaultWidth||this._FlowView.options.DefaultNodeWidth,Height:a&&a.DefaultHeight||this._FlowView.options.DefaultNodeHeight,Title:i||a&&a.Label||"New Node",Ports:a&&a.DefaultPorts?JSON.parse(JSON.stringify(a.DefaultPorts)):[{Hash:"port-in-".concat(this._FlowView.fable.getUUID()),Direction:"input",Side:"left",Label:"In"},{Hash:"port-out-".concat(this._FlowView.fable.getUUID()),Direction:"output",Side:"right",Label:"Out"}],Data:n||{}},l=0;l<s.Ports.length;l++)s.Ports[l].Hash||(s.Ports[l].Hash="port-".concat(s.Ports[l].Direction,"-").concat(this._FlowView.fable.getUUID()));return this._FlowView._FlowData.Nodes.push(s),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeAdded",s),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),s}},{key:"removeNode",value:function(t){if(!this._FlowView)return!1;var e=this._FlowView._FlowData.Nodes.findIndex(function(e){return e.Hash===t});if(e<0)return this._FlowView.log.warn("PictSectionFlow removeNode: node ".concat(t," not found")),!1;var o=this._FlowView._FlowData.Nodes.splice(e,1)[0];return this._FlowView._FlowData.Connections=this._FlowView._FlowData.Connections.filter(function(e){return e.SourceNodeHash!==t&&e.TargetNodeHash!==t}),this._FlowView.closePanelForNode(t),this._FlowView._FlowData.ViewState.SelectedNodeHash===t&&(this._FlowView._FlowData.ViewState.SelectedNodeHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"addConnection",value:function(t,e,o,i,n){if(!this._FlowView)return!1;var r=this._FlowView._FlowData.Nodes.find(function(e){return e.Hash===t}),a=this._FlowView._FlowData.Nodes.find(function(t){return t.Hash===o});if(!r||!a)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target node not found"),!1;var s=r.Ports.find(function(t){return t.Hash===e}),l=a.Ports.find(function(t){return t.Hash===i});if(!s||!l)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target port not found"),!1;if(t===o)return this._FlowView.log.warn("PictSectionFlow addConnection: cannot connect a node to itself"),!1;if(this._FlowView._FlowData.Connections.find(function(n){return n.SourceNodeHash===t&&n.SourcePortHash===e&&n.TargetNodeHash===o&&n.TargetPortHash===i}))return this._FlowView.log.warn("PictSectionFlow addConnection: duplicate connection"),!1;var c={Hash:"conn-".concat(this._FlowView.fable.getUUID()),SourceNodeHash:t,SourcePortHash:e,TargetNodeHash:o,TargetPortHash:i,Data:n||{}};return this._FlowView._FlowData.Connections.push(c),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionCreated",c),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),c}},{key:"removeConnection",value:function(t){if(!this._FlowView)return!1;var e=this._FlowView._FlowData.Connections.findIndex(function(e){return e.Hash===t});if(e<0)return this._FlowView.log.warn("PictSectionFlow removeConnection: connection ".concat(t," not found")),!1;var o=this._FlowView._FlowData.Connections.splice(e,1)[0];return this._FlowView._FlowData.ViewState.SelectedConnectionHash===t&&(this._FlowView._FlowData.ViewState.SelectedConnectionHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],30:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={IDLE:"idle",DRAGGING_NODE:"dragging-node",DRAGGING_PANEL:"dragging-panel",DRAGGING_HANDLE:"dragging-handle",CONNECTING:"connecting",PANNING:"panning",RESIZING_PANEL:"resizing-panel"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowInteractionManager",r._FlowView=o&&o.FlowView?o.FlowView:null,r._SVGElement=null,r._ViewportElement=null,r._State=n.IDLE,r._DragNodeHash=null,r._DragStartX=0,r._DragStartY=0,r._DragNodeStartX=0,r._DragNodeStartY=0,r._DragPanelHash=null,r._DragPanelStartX=0,r._DragPanelStartY=0,r._DragPanelDataStartX=0,r._DragPanelDataStartY=0,r._DragHandleConnectionHash=null,r._DragHandlePanelHash=null,r._DragHandleType=null,r._DragHandleIsTether=!1,r._PanStartX=0,r._PanStartY=0,r._PanStartPanX=0,r._PanStartPanY=0,r._ConnectSourceNodeHash=null,r._ConnectSourcePortHash=null,r._ConnectDragLine=null,r._LastClickTime=0,r._LastClickNodeHash=null,r._DoubleClickThreshold=400,r._ResizePanelHash=null,r._ResizeStartY=0,r._ResizePanelStartHeight=0,r._LastConnectionClickTime=0,r._LastConnectionClickHash=null,r._LastTetherClickTime=0,r._LastTetherClickHash=null,r._LastHandleClickTime=0,r._LastHandleClickHash=null,r._LastHandleClickType=null,r._boundOnPointerDown=r._onPointerDown.bind(r),r._boundOnPointerMove=r._onPointerMove.bind(r),r._boundOnPointerUp=r._onPointerUp.bind(r),r._boundOnWheel=r._onWheel.bind(r),r._boundOnKeyDown=r._onKeyDown.bind(r),r}return _inherits(e,t),_createClass(e,[{key:"initialize",value:function(t,e){var o=this;this._SVGElement=t,this._ViewportElement=e,this._SVGElement&&(this._SVGElement.addEventListener("pointerdown",this._boundOnPointerDown),this._SVGElement.addEventListener("pointermove",this._boundOnPointerMove),this._SVGElement.addEventListener("pointerup",this._boundOnPointerUp),this._SVGElement.addEventListener("pointerleave",this._boundOnPointerUp),this._SVGElement.addEventListener("wheel",this._boundOnWheel,{passive:!1}),document.addEventListener("keydown",this._boundOnKeyDown),this._SVGElement.addEventListener("contextmenu",function(t){t.preventDefault();var e=t.target;switch(o._getElementType(e)){case"connection":case"connection-hitarea":o._addBezierHandle(e,t);break;case"connection-handle":o._removeBezierHandle(e);break;case"tether":case"tether-hitarea":o._addTetherBezierHandle(e,t);break;case"tether-handle":o._removeTetherBezierHandle(e)}}))}},{key:"destroy",value:function(){this._SVGElement&&(this._SVGElement.removeEventListener("pointerdown",this._boundOnPointerDown),this._SVGElement.removeEventListener("pointermove",this._boundOnPointerMove),this._SVGElement.removeEventListener("pointerup",this._boundOnPointerUp),this._SVGElement.removeEventListener("pointerleave",this._boundOnPointerUp),this._SVGElement.removeEventListener("wheel",this._boundOnWheel)),document.removeEventListener("keydown",this._boundOnKeyDown)}},{key:"_onPointerDown",value:function(t){if(this._FlowView){var e=t.target,o=this._getElementType(e);if(!e.closest||!e.closest(".pict-flow-panel-content"))switch(0===t.button&&this._SVGElement.setPointerCapture(t.pointerId),o){case"port":this._startConnection(t,e);break;case"node":case"node-body":case"panel-indicator":var i=this._getNodeHash(e),n=Date.now();i&&i===this._LastClickNodeHash&&n-this._LastClickTime<this._DoubleClickThreshold?(this._LastClickTime=0,this._LastClickNodeHash=null,this._FlowView.togglePanel(i)):(this._LastClickTime=n,this._LastClickNodeHash=i,this._startNodeDrag(t,e));break;case"panel-titlebar":this._startPanelDrag(t,e);break;case"panel-resize":this._startPanelResize(t,e);break;case"panel-close":var r=this._getPanelHash(e);r&&this._FlowView.closePanel(r);break;case"connection-handle":var a=this._getConnectionHash(e),s=e.getAttribute("data-handle-type"),l=Date.now();a===this._LastHandleClickHash&&s===this._LastHandleClickType&&l-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleConnectionLineMode(a),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=l,this._LastHandleClickHash=a,this._LastHandleClickType=s,this._startHandleDrag(t,a,null,s,!1)),t.stopPropagation();break;case"tether":case"tether-hitarea":var c=this._getPanelHash(e),d=Date.now();c&&c===this._LastTetherClickHash&&d-this._LastTetherClickTime<this._DoubleClickThreshold?(this._LastTetherClickTime=0,this._LastTetherClickHash=null,this._addTetherBezierHandle(e,t)):(this._LastTetherClickTime=d,this._LastTetherClickHash=c,this._selectTether(e));break;case"tether-handle":var p=this._getPanelHash(e),h=e.getAttribute("data-handle-type"),u=Date.now();p===this._LastHandleClickHash&&h===this._LastHandleClickType&&u-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleTetherLineMode(p),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=u,this._LastHandleClickHash=p,this._LastHandleClickType=h,this._startHandleDrag(t,null,p,h,!0)),t.stopPropagation();break;case"connection":case"connection-hitarea":var f=this._getConnectionHash(e),w=Date.now();f&&f===this._LastConnectionClickHash&&w-this._LastConnectionClickTime<this._DoubleClickThreshold?(this._LastConnectionClickTime=0,this._LastConnectionClickHash=null,this._addBezierHandle(e,t)):(this._LastConnectionClickTime=w,this._LastConnectionClickHash=f,this._selectConnection(e));break;default:0===t.button&&this._FlowView.options.EnablePanning&&this._startPanning(t)}}}},{key:"_onPointerMove",value:function(t){if(this._FlowView)switch(this._State){case n.DRAGGING_NODE:this._onNodeDrag(t);break;case n.DRAGGING_PANEL:this._onPanelDrag(t);break;case n.DRAGGING_HANDLE:this._onHandleDrag(t);break;case n.CONNECTING:this._onConnectionDrag(t);break;case n.RESIZING_PANEL:this._onPanelResize(t);break;case n.PANNING:this._onPan(t)}}},{key:"_onPointerUp",value:function(t){if(this._FlowView)switch(this._SVGElement.hasPointerCapture&&this._SVGElement.hasPointerCapture(t.pointerId)&&this._SVGElement.releasePointerCapture(t.pointerId),this._State){case n.DRAGGING_NODE:this._endNodeDrag(t);break;case n.DRAGGING_PANEL:this._endPanelDrag(t);break;case n.DRAGGING_HANDLE:this._endHandleDrag(t);break;case n.RESIZING_PANEL:this._endPanelResize(t);break;case n.CONNECTING:this._endConnection(t);break;case n.PANNING:this._endPanning(t)}}},{key:"_onWheel",value:function(t){if(this._FlowView&&this._FlowView.options.EnableZooming){t.preventDefault();var e=t.deltaY>0?-this._FlowView.options.ZoomStep:this._FlowView.options.ZoomStep,o=this._FlowView.viewState.Zoom+e,i=this._SVGElement.getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;this._FlowView.setZoom(o,n,r)}}},{key:"_onKeyDown",value:function(t){if(this._FlowView)if("Delete"===t.key||"Backspace"===t.key){if(t.target&&("INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName))return;if(t.target&&t.target.closest&&t.target.closest(".pict-flow-panel"))return;this._FlowView.deleteSelected(),t.preventDefault()}else if("Escape"===t.key){if(this._State===n.CONNECTING&&this._cancelConnection(),this._FlowView._IsFullscreen){if(this._FlowView.exitFullscreen(),this._FlowView._ToolbarView){var e=this._FlowView.options.ViewIdentifier,o=this._FlowView.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(e));o.length>0&&(o[0].innerHTML="&#x26F6; Fullscreen")}return void t.preventDefault()}this._FlowView.deselectAll()}}},{key:"_startNodeDrag",value:function(t,e){if(this._FlowView.options.EnableNodeDragging){var o=this._getNodeHash(e);if(o){this._FlowView.selectNode(o);var i=this._FlowView.getNode(o);if(i){this._State=n.DRAGGING_NODE,this._DragNodeHash=o,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._DragNodeStartX=i.X,this._DragNodeStartY=i.Y,this._SVGElement.classList.add("panning");var r=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(o,'"]'));r&&r.classList.add("dragging")}}}}},{key:"_onNodeDrag",value:function(t){if(this._DragNodeHash){var e=this._FlowView.viewState,o=(t.clientX-this._DragStartX)/e.Zoom,i=(t.clientY-this._DragStartY)/e.Zoom,n=this._DragNodeStartX+o,r=this._DragNodeStartY+i;this._FlowView.updateNodePosition(this._DragNodeHash,n,r)}}},{key:"_endNodeDrag",value:function(t){this._SVGElement.classList.remove("panning");var e=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(this._DragNodeHash,'"]'));e&&e.classList.remove("dragging"),this._FlowView.renderFlow(),this._FlowView.marshalFromView();var o=this._FlowView.getNode(this._DragNodeHash);o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=n.IDLE,this._DragNodeHash=null}},{key:"_startPanelDrag",value:function(t,e){var o=this._getPanelHash(e);if(o){var i=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===o});i&&(this._State=n.DRAGGING_PANEL,this._DragPanelHash=o,this._DragPanelStartX=t.clientX,this._DragPanelStartY=t.clientY,this._DragPanelDataStartX=i.X,this._DragPanelDataStartY=i.Y,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelDrag",value:function(t){if(this._DragPanelHash){var e=this._FlowView.viewState,o=(t.clientX-this._DragPanelStartX)/e.Zoom,i=(t.clientY-this._DragPanelStartY)/e.Zoom,n=this._DragPanelDataStartX+o,r=this._DragPanelDataStartY+i;this._FlowView.updatePanelPosition(this._DragPanelHash,n,r)}}},{key:"_endPanelDrag",value:function(t){var e=this;this._SVGElement.classList.remove("panning"),this._FlowView.marshalFromView();var o=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._DragPanelHash});o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=n.IDLE,this._DragPanelHash=null}},{key:"_startPanelResize",value:function(t,e){var o=this._getPanelHash(e);if(o){var i=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===o});i&&(this._State=n.RESIZING_PANEL,this._ResizePanelHash=o,this._ResizeStartY=t.clientY,this._ResizePanelStartHeight=i.Height,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelResize",value:function(t){var e=this;if(this._ResizePanelHash){var o=this._FlowView.viewState,i=(t.clientY-this._ResizeStartY)/o.Zoom,n=Math.max(120,this._ResizePanelStartHeight+i),r=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._ResizePanelHash});if(r&&(r.Height=n),this._FlowView._PanelsLayer){var a=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'+this._ResizePanelHash+'"]');a&&a.setAttribute("height",String(n))}}}},{key:"_endPanelResize",value:function(t){this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._State=n.IDLE,this._ResizePanelHash=null}},{key:"_startHandleDrag",value:function(t,e,o,i,r){this._State=n.DRAGGING_HANDLE,this._DragHandleConnectionHash=e,this._DragHandlePanelHash=o,this._DragHandleType=i,this._DragHandleIsTether=r,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._SVGElement.classList.add("panning")}},{key:"_onHandleDrag",value:function(t){var e=this._FlowView.screenToSVGCoords(t.clientX,t.clientY);this._DragHandleIsTether?this._FlowView.updateTetherHandle(this._DragHandlePanelHash,this._DragHandleType,e.x,e.y):this._FlowView.updateConnectionHandle(this._DragHandleConnectionHash,this._DragHandleType,e.x,e.y)}},{key:"_endHandleDrag",value:function(t){var e=this;if(this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider)if(this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._DragHandleIsTether){var o=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._DragHandlePanelHash});o&&this._FlowView._EventHandlerProvider.fireEvent("onTetherHandleMoved",o)}else{var i=this._FlowView.getConnection(this._DragHandleConnectionHash);i&&this._FlowView._EventHandlerProvider.fireEvent("onConnectionHandleMoved",i)}this._State=n.IDLE,this._DragHandleConnectionHash=null,this._DragHandlePanelHash=null,this._DragHandleType=null,this._DragHandleIsTether=!1}},{key:"_addBezierHandle",value:function(t,e){var o=this._getConnectionHash(t);if(o){this._FlowView.selectConnection(o);var i=this._FlowView.screenToSVGCoords(e.clientX,e.clientY);this._FlowView.addConnectionHandle(o,i.x,i.y)}}},{key:"_removeBezierHandle",value:function(t){var e=this._getConnectionHash(t);if(e){var o=t.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var i=parseInt(o.replace("bezier-handle-",""),10);isNaN(i)||this._FlowView.removeConnectionHandle(e,i)}}}},{key:"_addTetherBezierHandle",value:function(t,e){var o=this._getPanelHash(t);if(o){this._FlowView.selectTether(o);var i=this._FlowView.screenToSVGCoords(e.clientX,e.clientY);this._FlowView.addTetherHandle(o,i.x,i.y)}}},{key:"_removeTetherBezierHandle",value:function(t){var e=this._getPanelHash(t);if(e){var o=t.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var i=parseInt(o.replace("bezier-handle-",""),10);isNaN(i)||this._FlowView.removeTetherHandle(e,i)}}}},{key:"_toggleConnectionLineMode",value:function(t){var e=this._FlowView.getConnection(t);if(e){e.Data||(e.Data={});var o=e.Data.LineMode||"bezier";e.Data.LineMode="bezier"===o?"orthogonal":"bezier",e.Data.HandleCustomized=!1,e.Data.BezierHandles=[],e.Data.BezierHandleX=null,e.Data.BezierHandleY=null,e.Data.OrthoCorner1X=null,e.Data.OrthoCorner1Y=null,e.Data.OrthoCorner2X=null,e.Data.OrthoCorner2Y=null,e.Data.OrthoMidOffset=0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionModeChanged",e),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData))}}},{key:"_toggleTetherLineMode",value:function(t){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});e&&(this._FlowView._TetherService&&this._FlowView._TetherService.toggleLineMode(e),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onTetherModeChanged",e),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)))}},{key:"_selectTether",value:function(t){var e=this._getPanelHash(t);e&&this._FlowView.selectTether(e)}},{key:"_startConnection",value:function(t,e){if(this._FlowView.options.EnableConnectionCreation){var o=e.getAttribute("data-node-hash"),i=e.getAttribute("data-port-hash"),r=e.getAttribute("data-port-direction");if(o&&i&&"output"===r){this._State=n.CONNECTING,this._ConnectSourceNodeHash=o,this._ConnectSourcePortHash=i,this._SVGElement.classList.add("connecting");var a=this._FlowView.getPortPosition(o,i);a&&(this._ConnectDragLine=document.createElementNS("http://www.w3.org/2000/svg","path"),this._ConnectDragLine.setAttribute("class","pict-flow-drag-connection"),this._ConnectDragLine.setAttribute("d","M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(a.y)),this._FlowView._ViewportElement.appendChild(this._ConnectDragLine)),t.stopPropagation()}}}},{key:"_onConnectionDrag",value:function(t){if(this._ConnectDragLine){var e=this._FlowView.getPortPosition(this._ConnectSourceNodeHash,this._ConnectSourcePortHash);if(e){var o=this._FlowView.screenToSVGCoords(t.clientX,t.clientY),i=.5*Math.abs(o.x-e.x),n="M ".concat(e.x," ").concat(e.y," C ").concat(e.x+i," ").concat(e.y,", ").concat(o.x-i," ").concat(o.y,", ").concat(o.x," ").concat(o.y);this._ConnectDragLine.setAttribute("d",n)}}}},{key:"_endConnection",value:function(t){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting");var e=document.elementFromPoint(t.clientX,t.clientY);if(e){var o=e.getAttribute("data-port-hash"),i=e.getAttribute("data-node-hash"),r=e.getAttribute("data-port-direction");o&&i&&"input"===r&&this._FlowView.addConnection(this._ConnectSourceNodeHash,this._ConnectSourcePortHash,i,o)}this._State=n.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_cancelConnection",value:function(){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting"),this._State=n.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_startPanning",value:function(t){this._FlowView.deselectAll(),this._State=n.PANNING,this._PanStartX=t.clientX,this._PanStartY=t.clientY,this._PanStartPanX=this._FlowView.viewState.PanX,this._PanStartPanY=this._FlowView.viewState.PanY,this._SVGElement.classList.add("panning")}},{key:"_onPan",value:function(t){var e=t.clientX-this._PanStartX,o=t.clientY-this._PanStartY;this._FlowView.viewState.PanX=this._PanStartPanX+e,this._FlowView.viewState.PanY=this._PanStartPanY+o,this._FlowView.updateViewportTransform()}},{key:"_endPanning",value:function(t){this._SVGElement.classList.remove("panning"),this._State=n.IDLE}},{key:"_selectConnection",value:function(t){var e=this._getConnectionHash(t);e&&this._FlowView.selectConnection(e)}},{key:"_getElementType",value:function(t){if(!t)return"background";var e=t.getAttribute?t.getAttribute("data-element-type"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-element-type"):null)return e;o=o.parentElement,i++}return"background"}},{key:"_getNodeHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-node-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-node-hash"):null)return e;o=o.parentElement,i++}return null}},{key:"_getPanelHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-panel-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-panel-hash"):null)return e;o=o.parentElement,i++}return null}},{key:"_getConnectionHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-connection-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-connection-hash"):null)return e;o=o.parentElement,i++}return null}}])}(i);e.exports=r,e.exports.INTERACTION_STATES=n},{"fable-serviceproviderbase":4}],31:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowLayout",n._FlowView=o&&o.FlowView?o.FlowView:null,n._HorizontalSpacing=250,n._VerticalSpacing=120,n._StartX=100,n._StartY=100,n}return _inherits(e,t),_createClass(e,[{key:"snapToGrid",value:function(t,e){return!e||e<=0?t:Math.round(t/e)*e}},{key:"autoLayout",value:function(t,e){if(t&&0!==t.length){for(var o={},i={},n={},r=0;r<t.length;r++){var a=t[r];o[a.Hash]=a,i[a.Hash]=0,n[a.Hash]=[]}for(var s=0;s<e.length;s++){var l=e[s];i.hasOwnProperty(l.TargetNodeHash)&&i[l.TargetNodeHash]++,n.hasOwnProperty(l.SourceNodeHash)&&n[l.SourceNodeHash].push(l.TargetNodeHash)}var c=[],d=[],p={};for(var h in i)0===i[h]&&d.push(h);for(;d.length>0;){for(var u=[],f=[],w=0;w<d.length;w++){var v=d[w];if(!p[v]){p[v]=!0,u.push(v);for(var g=n[v]||[],y=0;y<g.length;y++){var b=g[y];i[b]--,i[b]<=0&&!p[b]&&f.push(b)}}}u.length>0&&c.push(u),d=f}for(var m=[],_=0;_<t.length;_++)p[t[_].Hash]||m.push(t[_].Hash);m.length>0&&c.push(m);for(var P=this._StartX,F=0;F<c.length;F++){for(var S=c[F],V=0,C=0;C<S.length;C++){var k=o[S[C]];k&&(k.Height||80,C<S.length-1&&this._VerticalSpacing)}for(var T=this._StartY,D=0;D<S.length;D++){var A=o[S[D]];if(A){A.X=P,A.Y=T;var H=A.Width||180,x=A.Height||80;V=Math.max(V,H),T+=x+this._VerticalSpacing}}P+=V+this._HorizontalSpacing}}}},{key:"autoLayoutSubset",value:function(t,e,o){if(t&&0!==t.length){var i=this._StartX,n=this._StartY;if(e&&e.length>0){for(var r=-1/0,a=0;a<e.length;a++){var s=e[a].X+(e[a].Width||180);s>r&&(r=s)}i=r+this._HorizontalSpacing}for(var l={},c=0;c<t.length;c++)l[t[c].Hash]=!0;for(var d={},p={},h={},u=0;u<t.length;u++){var f=t[u];d[f.Hash]=f,p[f.Hash]=0,h[f.Hash]=[]}for(var w=0;w<o.length;w++){var v=o[w],g=l[v.SourceNodeHash],y=l[v.TargetNodeHash];g&&y&&(p[v.TargetNodeHash]++,h[v.SourceNodeHash].push(v.TargetNodeHash))}var b=[],m=[],_={};for(var P in p)0===p[P]&&m.push(P);for(;m.length>0;){for(var F=[],S=[],V=0;V<m.length;V++){var C=m[V];if(!_[C]){_[C]=!0,F.push(C);for(var k=h[C]||[],T=0;T<k.length;T++){var D=k[T];p[D]--,p[D]<=0&&!_[D]&&S.push(D)}}}F.length>0&&b.push(F),m=S}for(var A=[],H=0;H<t.length;H++)_[t[H].Hash]||A.push(t[H].Hash);A.length>0&&b.push(A);for(var x=i,I=0;I<b.length;I++){for(var M=b[I],N=0,L=n,E=0;E<M.length;E++){var z=d[M[E]];if(z){z.X=x,z.Y=L;var R=z.Width||180,B=z.Height||80;N=Math.max(N,R),L+=B+this._VerticalSpacing}}x+=N+this._HorizontalSpacing}}}},{key:"centerNodes",value:function(t,e,o){if(t&&0!==t.length){for(var i=1/0,n=1/0,r=-1/0,a=-1/0,s=0;s<t.length;s++)i=Math.min(i,t[s].X),n=Math.min(n,t[s].Y),r=Math.max(r,t[s].X+(t[s].Width||180)),a=Math.max(a,t[s].Y+(t[s].Height||80));for(var l=e-(i+r)/2,c=o-(n+a)/2,d=0;d<t.length;d++)t[d].X+=l,t[d].Y+=c}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],32:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPanelManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"openPanel",value:function(t){var e=this._FlowView.getNode(t);if(!e)return!1;var o=this._FlowView._NodeTypeProvider.getNodeType(e.Type);if(!o)return!1;var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.NodeHash===t});if(i)return i;var n,r,a,s,l=o.PropertiesPanel,c="panel-".concat(this.fable.getUUID());l?(n=l.DefaultWidth||300,r=l.DefaultHeight||200,a=l.PanelType||"Base",s=l.Title||o.Label||"Properties"):(n=240,r=180,a="Info",s=o.Label||e.Title||"Node Info");var d={Hash:c,NodeHash:t,PanelType:a,Title:s,X:e.X+e.Width+30,Y:e.Y,Width:n,Height:r};return this._FlowView._FlowData.OpenPanels.push(d),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelOpened",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),d}},{key:"closePanel",value:function(t){var e=this._FlowView._FlowData.OpenPanels.findIndex(function(e){return e.Hash===t});if(e<0)return!1;var o=this._FlowView._FlowData.OpenPanels.splice(e,1)[0];return this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(t),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelClosed",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"closePanelForNode",value:function(t){var e=this._FlowView._FlowData.OpenPanels.filter(function(e){return e.NodeHash===t});if(0===e.length)return!1;for(var o=0;o<e.length;o++){var i=this._FlowView._FlowData.OpenPanels.indexOf(e[o]);i>=0&&this._FlowView._FlowData.OpenPanels.splice(i,1),this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(e[o].Hash)}return!0}},{key:"togglePanel",value:function(t){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.NodeHash===t});return e?(this.closePanel(e.Hash),!1):this.openPanel(t)}},{key:"updatePanelPosition",value:function(t,e,o){var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i){if(i.X=e,i.Y=o,this._FlowView._resetHandlesForPanel(t),this._FlowView._PanelsLayer){var n=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'.concat(t,'"]'));n&&(n.setAttribute("x",String(e)),n.setAttribute("y",String(o)))}this._FlowView._renderTethersForNode(i.NodeHash)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],33:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPathGenerator",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"computeDepartApproach",value:function(t,e,o){var i=this._FlowView._GeometryProvider,n=i.sideDirection(t.side||"right"),r=i.sideDirection(e.side||"left");return{departX:t.x+n.dx*o,departY:t.y+n.dy*o,approachX:e.x+r.dx*o,approachY:e.y+r.dy*o,fromDir:n,toDir:r}}},{key:"computeAutoOrthogonalCorners",value:function(t,e,o,i,n,r,a){var s,l,c,d=a||0,p=Math.abs(n.dx)>0,h=Math.abs(r.dx)>0;if(p&&h){var u=(t+o)/2+d;s={x:u,y:e},l={x:u,y:i},c={x:u,y:(e+i)/2}}else if(p||h)p&&!h?(s={x:o+d,y:e},l={x:o+d,y:i},c={x:o+d,y:(e+i)/2}):(s={x:t,y:i+d},l={x:o,y:i+d},c={x:(t+o)/2,y:i+d});else{var f=(e+i)/2+d;s={x:t,y:f},l={x:o,y:f},c={x:(t+o)/2,y:f}}return{corner1:s,corner2:l,midpoint:c}}},{key:"evaluateCubicBezier",value:function(t,e,o,i,n){var r=1-n,a=r*r,s=a*r,l=n*n,c=l*n;return{x:s*t.x+3*a*n*e.x+3*r*l*o.x+c*i.x,y:s*t.y+3*a*n*e.y+3*r*l*o.y+c*i.y}}},{key:"buildBezierPathString",value:function(t,e,o,i,n,r){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," C ").concat(o.x," ").concat(o.y,", ").concat(i.x," ").concat(i.y,", ").concat(n.x," ").concat(n.y," L ").concat(r.x," ").concat(r.y)}},{key:"buildSplitBezierPathString",value:function(t,e,o,i,n,r,a,s,l){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," C ").concat(o.x," ").concat(o.y,", ").concat(i.x," ").concat(i.y,", ").concat(n.x," ").concat(n.y," C ").concat(r.x," ").concat(r.y,", ").concat(a.x," ").concat(a.y,", ").concat(s.x," ").concat(s.y," L ").concat(l.x," ").concat(l.y)}},{key:"buildMultiBezierPathString",value:function(t,e,o,i,n,r,a){for(var s=[e],l=0;l<o.length;l++)s.push(o[l]);s.push(i);for(var c="M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y),d=0;d<s.length-1;d++){var p=s[d],h=s[d+1],u=h.x-p.x,f=h.y-p.y,w=Math.sqrt(u*u+f*f);w<1&&(w=1);var v=.35*w,g=void 0,y=void 0;if(0===d)g=r.dx,y=r.dy;else{var b=s[d-1],m=s[d+1];g=m.x-b.x,y=m.y-b.y;var _=Math.sqrt(g*g+y*y);_<1&&(_=1),g/=_,y/=_}var P=void 0,F=void 0;if(d===s.length-2)P=-a.dx,F=-a.dy;else{var S=s[d],V=s[d+2];P=V.x-S.x,F=V.y-S.y;var C=Math.sqrt(P*P+F*F);C<1&&(C=1),P/=C,F/=C}var k=p.x+g*v,T=p.y+y*v,D=h.x-P*v,A=h.y-F*v;c+=" C ".concat(k," ").concat(T,", ").concat(D," ").concat(A,", ").concat(h.x," ").concat(h.y)}return c+=" L ".concat(n.x," ").concat(n.y)}},{key:"buildOrthogonalPathString",value:function(t,e,o,i,n,r){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," L ").concat(o.x," ").concat(o.y," L ").concat(i.x," ").concat(i.y," L ").concat(n.x," ").concat(n.y," L ").concat(r.x," ").concat(r.y)}},{key:"computeDirectionalGeometry",value:function(t,e){var o,i=this._FlowView._GeometryProvider.sideDirection(t.side||"right"),n=this._FlowView._GeometryProvider.sideDirection(e.side||"left"),r=t.x+20*i.dx,a=t.y+20*i.dy,s=e.x+20*n.dx,l=e.y+20*n.dy,c=Math.abs(s-r),d=Math.abs(l-a),p=Math.sqrt(c*c+d*d),h=Math.max(Math.min(.4*p,180),30),u=0!==i.dx&&0!==n.dx||0!==i.dy&&0!==n.dy,f=!1;if(u&&(1===i.dx&&-1===n.dx&&e.x>=t.x||-1===i.dx&&1===n.dx&&e.x<=t.x||1===i.dy&&-1===n.dy&&e.y>=t.y||-1===i.dy&&1===n.dy&&e.y<=t.y)&&(f=!0),f){var w=0!==i.dx?c:d;o=Math.max(.35*w,30)}else o=u?Math.max(h,60):Math.max(.8*h,40);return{departX:r,departY:a,approachX:s,approachY:l,cp1X:r+i.dx*o,cp1Y:a+i.dy*o,cp2X:s+n.dx*o,cp2Y:l+n.dy*o,startDir:i,endDir:n}}},{key:"distanceToSegment",value:function(t,e,o,i,n,r){var a=n-o,s=r-i,l=a*a+s*s;if(l<.001){var c=t-o,d=e-i;return Math.sqrt(c*c+d*d)}var p=((t-o)*a+(e-i)*s)/l;p<0&&(p=0),p>1&&(p=1);var h=t-(o+p*a),u=e-(i+p*s);return Math.sqrt(h*h+u*u)}},{key:"getAutoMidpoint",value:function(t,e){var o=this.computeDirectionalGeometry(t,e);return this.evaluateCubicBezier({x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},.5)}},{key:"getAutoMidpointSimple",value:function(t,e,o){var i=this.computeDepartApproach(t,e,o),n=Math.abs(i.approachX-i.departX),r=Math.abs(i.approachY-i.departY),a=.4*Math.max(n,r,40),s={x:i.departX,y:i.departY},l={x:i.departX+i.fromDir.dx*a,y:i.departY+i.fromDir.dy*a},c={x:i.approachX+i.toDir.dx*a,y:i.approachY+i.toDir.dy*a},d={x:i.approachX,y:i.approachY};return this.evaluateCubicBezier(s,l,c,d,.5)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],34:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPortRenderer",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderPorts",value:function(t,e,o,i,n,r){if(this._FlowView&&t.Ports&&Array.isArray(t.Ports)){n&&n.PortLabelsVertical,n&&n.PortLabelPadding,n&&n.PortLabelsOutside;for(var a=this._FlowView._GeometryProvider,s={},l=0;l<t.Ports.length;l++){var c=t.Ports[l],d=c.Side||("input"===c.Direction?"left":"right");s[d]||(s[d]=[]),s[d].push(c)}var p={};for(var h in s)p[h]=s[h].length;for(var u in s)for(var f=s[u],w=a?a.getEdgeFromSide(u):u,v=0;v<f.length;v++){var g=f[v],y=this.getPortLocalPosition(u,v,f.length,o,i,r,p),b=null;if(g.Label){var m=g.PortType&&{"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"}[g.PortType]||"#95a5a6",_=12,P=5*g.Label.length,F=void 0,S=void 0,V=void 0,C=void 0,k=void 0,T=void 0,D=void 0,A=void 0,H=void 0,x=void 0;"left"===w?(C=(F=1)+5+5,k="start",T=F+(V=10+P+5+2)-2,D=S=y.y-6,A=2,H=_,x="M "+F+" "+S+" L "+(F+V)+" "+S+" L "+(F+V)+" "+(S+_)+" L "+F+" "+(S+_)):"right"===w?(C=(F=o-(V=7+P+5+5)-1)+2+5,k="start",T=F,D=S=y.y-6,A=2,H=_,x="M "+(F+V)+" "+S+" L "+F+" "+S+" L "+F+" "+(S+_)+" L "+(F+V)+" "+(S+_)):"top"===w?(V=P+10,F=y.x-V/2,S=1,C=y.x,k="middle",T=F,D=S+_-2,A=V,H=2,x="M "+F+" "+S+" L "+F+" "+(S+_)+" L "+(F+V)+" "+(S+_)+" L "+(F+V)+" "+S):(V=P+10,F=y.x-V/2,S=i-_-1,C=y.x,k="middle",T=F,D=S,A=V,H=2,x="M "+F+" "+(S+_)+" L "+F+" "+S+" L "+(F+V)+" "+S+" L "+(F+V)+" "+(S+_));var I=this._FlowView._SVGHelperProvider.createSVGElement("rect");I.setAttribute("class","pict-flow-port-label-bg"),I.setAttribute("x",String(F)),I.setAttribute("y",String(S)),I.setAttribute("width",String(V)),I.setAttribute("height",String(_)),I.setAttribute("fill","var(--pf-port-label-bg, rgba(255, 253, 240, 0.5))"),e.appendChild(I);var M=this._FlowView._SVGHelperProvider.createSVGElement("path");M.setAttribute("class","pict-flow-port-label-bg"),M.setAttribute("d",x),M.setAttribute("fill","none"),M.setAttribute("stroke",m),M.setAttribute("stroke-width","0.75"),e.appendChild(M);var N=this._FlowView._SVGHelperProvider.createSVGElement("rect");N.setAttribute("class","pict-flow-port-label-bg"),N.setAttribute("x",String(T)),N.setAttribute("y",String(D)),N.setAttribute("width",String(A)),N.setAttribute("height",String(H)),N.setAttribute("fill",m),e.appendChild(N),(b=this._FlowView._SVGHelperProvider.createSVGElement("text")).setAttribute("class","pict-flow-port-label"),b.setAttribute("fill","var(--pf-port-label-text, #2c3e50)"),b.textContent=g.Label,b.setAttribute("x",String(C)),b.setAttribute("y",String(S+6)),b.setAttribute("text-anchor",k),b.setAttribute("dominant-baseline","central")}var L=this._FlowView._ConnectorShapesProvider,E=void 0;if(L)E=L.createPortElement(g,y,t.Hash);else{E=this._FlowView._SVGHelperProvider.createSVGElement("circle");var z="pict-flow-port ".concat(g.Direction);g.PortType&&(z+=" port-type-".concat(g.PortType)),E.setAttribute("class",z),E.setAttribute("cx",String(y.x)),E.setAttribute("cy",String(y.y)),E.setAttribute("r","5"),E.setAttribute("data-port-hash",g.Hash),E.setAttribute("data-node-hash",t.Hash),E.setAttribute("data-port-direction",g.Direction),g.PortType&&E.setAttribute("data-port-type",g.PortType),E.setAttribute("data-element-type","port")}e.appendChild(E),b&&e.appendChild(b)}}}},{key:"getPortLocalPosition",value:function(t,e,o,i,n,r,a){return this._FlowView._GeometryProvider.getPortLocalPosition(t,e,o,i,n,r,a)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],35:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowRenderManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderFlow",value:function(){if(this._FlowView&&this._FlowView._NodesLayer&&this._FlowView._ConnectionsLayer){for(;this._FlowView._NodesLayer.firstChild;)this._FlowView._NodesLayer.removeChild(this._FlowView._NodesLayer.firstChild);for(;this._FlowView._ConnectionsLayer.firstChild;)this._FlowView._ConnectionsLayer.removeChild(this._FlowView._ConnectionsLayer.firstChild);for(var t=0;t<this._FlowView._FlowData.Connections.length;t++){var e=this._FlowView._FlowData.Connections[t],o=this._FlowView._FlowData.ViewState.SelectedConnectionHash===e.Hash;this._FlowView._ConnectionRenderer.renderConnection(e,this._FlowView._ConnectionsLayer,o)}for(var i=0;i<this._FlowView._FlowData.Nodes.length;i++){var n=this._FlowView._FlowData.Nodes[i],r=this._FlowView._FlowData.ViewState.SelectedNodeHash===n.Hash,a=this._FlowView._NodeTypeProvider.getNodeType(n.Type);if(a&&a.DefaultPorts&&n.Ports)for(var s=0;s<n.Ports.length;s++)for(var l=n.Ports[s],c=0;c<a.DefaultPorts.length;c++){var d=a.DefaultPorts[c];if(d.Label===l.Label&&d.Direction===l.Direction){d.PortType&&(l.PortType=d.PortType),d.Side&&(l.Side=d.Side);break}}this._FlowView._NodeView.renderNode(n,this._FlowView._NodesLayer,r,a)}this._FlowView._PropertiesPanelView&&this._FlowView._PanelsLayer&&this._FlowView._TethersLayer&&this._FlowView._PropertiesPanelView.renderPanels(this._FlowView._FlowData.OpenPanels,this._FlowView._PanelsLayer,this._FlowView._TethersLayer,this._FlowView._FlowData.ViewState.SelectedTetherHash),this._FlowView.updateViewportTransform()}}},{key:"renderSingleConnection",value:function(t){if(this._FlowView&&this._FlowView._ConnectionsLayer){for(var e=this._FlowView._ConnectionsLayer.querySelectorAll('[data-connection-hash="'.concat(t,'"]')),o=0;o<e.length;o++)e[o].remove();var i=this._FlowView.getConnection(t);if(i){var n=this._FlowView._FlowData.ViewState.SelectedConnectionHash===t;this._FlowView._ConnectionRenderer.renderConnection(i,this._FlowView._ConnectionsLayer,n)}}}},{key:"renderSingleTether",value:function(t){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){for(var e=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(t,'"]')),o=0;o<e.length;o++)e[o].remove();var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i){var n=this._FlowView.getNode(i.NodeHash);if(n){var r=this._FlowView._FlowData.ViewState.SelectedTetherHash===t;this._FlowView._TetherService.renderTether(i,n,this._FlowView._TethersLayer,r,this._FlowView.options.ViewIdentifier)}}}}},{key:"updateNodePosition",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getNode(t);if(i){this._FlowView.options.EnableGridSnap&&(e=this._FlowView._LayoutService.snapToGrid(e,this._FlowView.options.GridSnapSize),o=this._FlowView._LayoutService.snapToGrid(o,this._FlowView.options.GridSnapSize)),i.X=e,i.Y=o,this._FlowView._resetHandlesForNode(t);var n=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(t,'"]'));n&&n.setAttribute("transform","translate(".concat(e,", ").concat(o,")")),this.renderConnectionsForNode(t),this.renderTethersForNode(t)}}}},{key:"renderConnectionsForNode",value:function(t){if(this._FlowView&&this._FlowView._ConnectionsLayer)for(var e=this._FlowView._FlowData.Connections.filter(function(e){return e.SourceNodeHash===t||e.TargetNodeHash===t}),o=0;o<e.length;o++){for(var i=e[o],n=this._FlowView._FlowData.ViewState.SelectedConnectionHash===i.Hash,r=this._FlowView._ConnectionsLayer.querySelectorAll('[data-connection-hash="'.concat(i.Hash,'"]')),a=0;a<r.length;a++)r[a].remove();this._FlowView._ConnectionRenderer.renderConnection(i,this._FlowView._ConnectionsLayer,n)}}},{key:"renderTethersForNode",value:function(t){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){var e=this._FlowView._FlowData.OpenPanels.filter(function(e){return e.NodeHash===t});if(0!==e.length)for(var o=0;o<e.length;o++){for(var i=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(e[o].Hash,'"]')),n=0;n<i.length;n++)i[n].remove();var r=this._FlowView.getNode(e[o].NodeHash);if(r){var a=this._FlowView._FlowData.ViewState.SelectedTetherHash===e[o].Hash;this._FlowView._TetherService.renderTether(e[o],r,this._FlowView._TethersLayer,a,this._FlowView.options.ViewIdentifier)}}}}},{key:"reinjectMarkerDefs",value:function(){if(this._FlowView&&this._FlowView._ConnectorShapesProvider&&this._FlowView._SVGElement){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView._SVGElement.querySelector("defs");if(e){for(var o=e.querySelectorAll("marker"),i=0;i<o.length;i++)o[i].remove();var n=this._FlowView._ConnectorShapesProvider.generateMarkerDefs(t),r=document.createElementNS("http://www.w3.org/2000/svg","svg");for(r.innerHTML=n;r.firstChild;)e.appendChild(r.firstChild)}}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],36:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowSelectionManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"selectNode",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedNodeHash;if(this._FlowView._FlowData.ViewState.SelectedNodeHash=t,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.Nodes.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onNodeSelected",o)}}},{key:"selectConnection",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedConnectionHash;if(this._FlowView._FlowData.ViewState.SelectedConnectionHash=t,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.Connections.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onConnectionSelected",o)}}},{key:"selectTether",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedTetherHash;if(this._FlowView._FlowData.ViewState.SelectedTetherHash=t,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onTetherSelected",o)}}},{key:"deselectAll",value:function(){this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow()}},{key:"deleteSelected",value:function(){return this._FlowView._FlowData.ViewState.SelectedNodeHash?this._FlowView.removeNode(this._FlowView._FlowData.ViewState.SelectedNodeHash):!!this._FlowView._FlowData.ViewState.SelectedConnectionHash&&this._FlowView.removeConnection(this._FlowView._FlowData.ViewState.SelectedConnectionHash)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],37:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowTether",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"getSmartAnchors",value:function(t,e){var o,i,n=e.X+e.Width/2,r=e.Y+e.Height/2,a=t.X+t.Width/2-n,s=t.Y+t.Height/2-r;Math.abs(a)>=Math.abs(s)?a>=0?(o="right",i="left"):(o="left",i="right"):s>=0?(o="bottom",i="top"):(o="top",i="bottom");var l=this._FlowView._GeometryProvider.getEdgeCenter(e,o),c=this._FlowView._GeometryProvider.getEdgeCenter(t,i);return{nodeAnchor:Object.assign(l,{side:o}),panelAnchor:Object.assign(c,{side:i})}}},{key:"generateBezierPath",value:function(t,e,o,i){var n=this._FlowView._GeometryProvider.sideDirection(t.side),r=this._FlowView._GeometryProvider.sideDirection(e.side),a=t.x+20*n.dx,s=t.y+20*n.dy,l=e.x+20*r.dx,c=e.y+20*r.dy;if(null==o||null==i){var d=Math.abs(l-a),p=Math.abs(c-s),h=.4*Math.max(d,p,40),u=a+n.dx*h,f=s+n.dy*h,w=l+r.dx*h,v=c+r.dy*h;return this._FlowView._PathGenerator.buildBezierPathString({x:t.x,y:t.y},{x:a,y:s},{x:u,y:f},{x:w,y:v},{x:l,y:c},{x:e.x,y:e.y})}var g=a+30*n.dx,y=s+30*n.dy,b=l+30*r.dx,m=c+30*r.dy,_=l-a,P=c-s,F=Math.sqrt(_*_+P*P)||1,S=o-25*(_/=F),V=i-25*(P/=F),C=o+25*_,k=i+25*P;return this._FlowView._PathGenerator.buildSplitBezierPathString({x:t.x,y:t.y},{x:a,y:s},{x:g,y:y},{x:S,y:V},{x:o,y:i},{x:C,y:k},{x:b,y:m},{x:l,y:c},{x:e.x,y:e.y})}},{key:"generateOrthogonalPath",value:function(t,e,o,i){var n,r,a=this._FlowView._GeometryProvider.sideDirection(t.side),s=this._FlowView._GeometryProvider.sideDirection(e.side),l=t.x+20*a.dx,c=t.y+20*a.dy,d=e.x+20*s.dx,p=e.y+20*s.dy;if(o&&o.corner1&&o.corner2)n=o.corner1,r=o.corner2;else{var h=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(l,c,d,p,a,s,i);n=h.corner1,r=h.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:t.x,y:t.y},{x:l,y:c},{x:n.x,y:n.y},{x:r.x,y:r.y},{x:d,y:p},{x:e.x,y:e.y})}},{key:"getAutoMidpoint",value:function(t,e){return this._FlowView._PathGenerator.getAutoMidpointSimple(t,e,20)}},{key:"getOrthoGeometry",value:function(t,e,o){var i,n=this._FlowView._GeometryProvider.sideDirection(t.side),r=this._FlowView._GeometryProvider.sideDirection(e.side),a=t.x+20*n.dx,s=t.y+20*n.dy,l=e.x+20*r.dx,c=e.y+20*r.dy;o.TetherHandleCustomized&&null!=o.TetherOrthoCorner1X?((i=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,s,l,c,n,r,o.TetherOrthoMidOffset||0)).corner1={x:o.TetherOrthoCorner1X,y:o.TetherOrthoCorner1Y},i.corner2={x:o.TetherOrthoCorner2X,y:o.TetherOrthoCorner2Y}):i=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,s,l,c,n,r,o.TetherOrthoMidOffset||0);var d={x:(i.corner1.x+i.corner2.x)/2,y:(i.corner1.y+i.corner2.y)/2};return{corner1:i.corner1,corner2:i.corner2,midpoint:d}}},{key:"generatePath",value:function(t,e,o){if("orthogonal"===(t.TetherLineMode||"bezier")){var i=null;return t.TetherHandleCustomized&&null!=t.TetherOrthoCorner1X&&(i={corner1:{x:t.TetherOrthoCorner1X,y:t.TetherOrthoCorner1Y},corner2:{x:t.TetherOrthoCorner2X,y:t.TetherOrthoCorner2Y}}),this.generateOrthogonalPath(e,o,i,t.TetherOrthoMidOffset||0)}var n=this._getTetherBezierHandles(t);if(n.length>0)return this.generateMultiBezierPath(e,o,n);var r=t.TetherHandleCustomized&&null!=t.TetherBezierHandleX?t.TetherBezierHandleX:null,a=t.TetherHandleCustomized&&null!=t.TetherBezierHandleY?t.TetherBezierHandleY:null;return this.generateBezierPath(e,o,r,a)}},{key:"_getTetherBezierHandles",value:function(t){return t&&t.TetherHandleCustomized?Array.isArray(t.TetherBezierHandles)&&t.TetherBezierHandles.length>0?t.TetherBezierHandles:null!=t.TetherBezierHandleX&&null!=t.TetherBezierHandleY?[{x:t.TetherBezierHandleX,y:t.TetherBezierHandleY}]:[]:[]}},{key:"generateMultiBezierPath",value:function(t,e,o){var i=this._FlowView._GeometryProvider.sideDirection(t.side),n=this._FlowView._GeometryProvider.sideDirection(e.side),r={x:t.x+20*i.dx,y:t.y+20*i.dy},a={x:e.x+20*n.dx,y:e.y+20*n.dy};return this._FlowView._PathGenerator.buildMultiBezierPathString(t,r,t.side,a,e.side,e,o)}},{key:"updateHandlePosition",value:function(t,e,o,i){if(t.TetherHandleCustomized=!0,e&&e.startsWith("bezier-handle-")){var n=parseInt(e.replace("bezier-handle-",""),10);!isNaN(n)&&Array.isArray(t.TetherBezierHandles)&&n<t.TetherBezierHandles.length&&(t.TetherBezierHandles[n].x=o,t.TetherBezierHandles[n].y=i)}else switch(e){case"bezier-midpoint":Array.isArray(t.TetherBezierHandles)&&0!==t.TetherBezierHandles.length?(t.TetherBezierHandles[0].x=o,t.TetherBezierHandles[0].y=i):t.TetherBezierHandles=[{x:o,y:i}],t.TetherBezierHandleX=o,t.TetherBezierHandleY=i;break;case"ortho-corner1":t.TetherOrthoCorner1X=o,t.TetherOrthoCorner1Y=i;break;case"ortho-corner2":t.TetherOrthoCorner2X=o,t.TetherOrthoCorner2Y=i;break;case"ortho-midpoint":t.TetherOrthoMidOffset=t.TetherOrthoMidOffset||0,t._TetherMidDragX=o,t._TetherMidDragY=i}}},{key:"resetHandlePositions",value:function(t){t.TetherHandleCustomized&&(t.TetherHandleCustomized=!1,t.TetherBezierHandles=[],t.TetherBezierHandleX=null,t.TetherBezierHandleY=null,t.TetherOrthoCorner1X=null,t.TetherOrthoCorner1Y=null,t.TetherOrthoCorner2X=null,t.TetherOrthoCorner2Y=null,t.TetherOrthoMidOffset=0)}},{key:"resetHandlesForNode",value:function(t,e){for(var o=0;o<t.length;o++){var i=t[o];i.NodeHash===e&&this.resetHandlePositions(i)}}},{key:"addHandle",value:function(t,e,o,i,n){t.TetherLineMode="bezier",Array.isArray(t.TetherBezierHandles)||(t.TetherBezierHandles=[],null!=t.TetherBezierHandleX&&null!=t.TetherBezierHandleY&&t.TetherBezierHandles.push({x:t.TetherBezierHandleX,y:t.TetherBezierHandleY}));var r=0;this._FlowView._ConnectionRenderer&&i&&n&&(r=this._FlowView._ConnectionRenderer.computeInsertionIndex(t.TetherBezierHandles,{x:e,y:o},i,n)),t.TetherBezierHandles.splice(r,0,{x:e,y:o}),t.TetherHandleCustomized=!0}},{key:"removeHandle",value:function(t,e){Array.isArray(t.TetherBezierHandles)&&(e<0||e>=t.TetherBezierHandles.length||(t.TetherBezierHandles.splice(e,1),0===t.TetherBezierHandles.length&&(t.TetherHandleCustomized=!1,t.TetherBezierHandleX=null,t.TetherBezierHandleY=null)))}},{key:"toggleLineMode",value:function(t){var e=t.TetherLineMode||"bezier";return t.TetherLineMode="bezier"===e?"orthogonal":"bezier",t.TetherHandleCustomized=!1,t.TetherBezierHandles=[],t.TetherBezierHandleX=null,t.TetherBezierHandleY=null,t.TetherOrthoCorner1X=null,t.TetherOrthoCorner1Y=null,t.TetherOrthoCorner2X=null,t.TetherOrthoCorner2Y=null,t.TetherOrthoMidOffset=0,t.TetherLineMode}},{key:"renderTether",value:function(t,e,o,i,n){if(e){var r=this.getSmartAnchors(t,e),a=r.panelAnchor,s=r.nodeAnchor,l=this.generatePath(t,a,s),c=this._FlowView._ConnectorShapesProvider;if(c){var d=c.createTetherHitAreaElement(l,t.Hash);o.appendChild(d);var p=c.createTetherPathElement(l,t.Hash,i,n);o.appendChild(p)}else{var h=this._FlowView._SVGHelperProvider.createSVGElement("path");h.setAttribute("class","pict-flow-tether-hitarea"),h.setAttribute("d",l),h.setAttribute("data-element-type","tether-hitarea"),h.setAttribute("data-panel-hash",t.Hash),o.appendChild(h);var u=this._FlowView._SVGHelperProvider.createSVGElement("path");u.setAttribute("class","pict-flow-tether-line".concat(i?" selected":"")),u.setAttribute("d",l),u.setAttribute("marker-end","url(#flow-tether-arrowhead-".concat(n,")")),u.setAttribute("data-element-type","tether"),u.setAttribute("data-panel-hash",t.Hash),o.appendChild(u)}i&&this._renderHandles(t,o,a,s)}}},{key:"_renderHandles",value:function(t,e,o,i){if("orthogonal"===(t.TetherLineMode||"bezier")){var n=this.getOrthoGeometry(o,i,t);this._createHandle(e,t.Hash,"ortho-corner1",n.corner1.x,n.corner1.y,"pict-flow-tether-handle"),this._createHandle(e,t.Hash,"ortho-midpoint",n.midpoint.x,n.midpoint.y,"pict-flow-tether-handle-midpoint"),this._createHandle(e,t.Hash,"ortho-corner2",n.corner2.x,n.corner2.y,"pict-flow-tether-handle")}else{var r=this._getTetherBezierHandles(t);if(r.length>0)for(var a=0;a<r.length;a++)this._createHandle(e,t.Hash,"bezier-handle-"+a,r[a].x,r[a].y,"pict-flow-tether-handle");else{var s=this.getAutoMidpoint(o,i);this._createHandle(e,t.Hash,"bezier-midpoint",s.x,s.y,"pict-flow-tether-handle-midpoint")}}}},{key:"_createHandle",value:function(t,e,o,i,n,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-tether-handle-midpoint"===r?"tether-handle-midpoint":"tether-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(t,e,o,i,n,a,"tether-handle","data-panel-hash")}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],38:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowViewportManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n._IsFullscreen=!1,n}return _inherits(e,t),_createClass(e,[{key:"updateViewportTransform",value:function(){if(this._FlowView._ViewportElement){var t=this._FlowView._FlowData.ViewState;this._FlowView._ViewportElement.setAttribute("transform","translate(".concat(t.PanX,", ").concat(t.PanY,") scale(").concat(t.Zoom,")"))}}},{key:"setZoom",value:function(t,e,o){var i=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,t)),n=this._FlowView._FlowData.ViewState.Zoom;if("number"==typeof e&&"number"==typeof o){var r=this._FlowView._FlowData.ViewState;r.PanX=e-(e-r.PanX)*(i/n),r.PanY=o-(o-r.PanY)*(i/n)}this._FlowView._FlowData.ViewState.Zoom=i,this.updateViewportTransform()}},{key:"zoomToFit",value:function(){if(0!==this._FlowView._FlowData.Nodes.length&&this._FlowView._SVGElement){for(var t=1/0,e=1/0,o=-1/0,i=-1/0,n=0;n<this._FlowView._FlowData.Nodes.length;n++){var r=this._FlowView._FlowData.Nodes[n];t=Math.min(t,r.X),e=Math.min(e,r.Y),o=Math.max(o,r.X+r.Width),i=Math.max(i,r.Y+r.Height)}var a=o-t+100,s=i-e+100,l=this._FlowView._SVGElement.getBoundingClientRect(),c=l.width/a,d=l.height/s,p=Math.min(c,d,1);p=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,p));var h=(t+o)/2,u=(e+i)/2;this._FlowView._FlowData.ViewState.Zoom=p,this._FlowView._FlowData.ViewState.PanX=l.width/2-h*p,this._FlowView._FlowData.ViewState.PanY=l.height/2-u*p,this.updateViewportTransform()}}},{key:"screenToSVGCoords",value:function(t,e){if(!this._FlowView._SVGElement)return{x:t,y:e};var o=this._FlowView._SVGElement.createSVGPoint();o.x=t,o.y=e;var i=this._FlowView._SVGElement.getScreenCTM();if(i){var n=i.inverse(),r=o.matrixTransform(n),a=this._FlowView._FlowData.ViewState;return{x:(r.x-a.PanX)/a.Zoom,y:(r.y-a.PanY)/a.Zoom}}return{x:t,y:e}}},{key:"toggleFullscreen",value:function(){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(t));if(e.length<1)return this._IsFullscreen;var o=e[0];return this._IsFullscreen=!this._IsFullscreen,this._IsFullscreen?o.classList.add("pict-flow-fullscreen"):o.classList.remove("pict-flow-fullscreen"),this._IsFullscreen}},{key:"exitFullscreen",value:function(){if(this._IsFullscreen){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(t));e.length>0&&e[0].classList.remove("pict-flow-fullscreen"),this._IsFullscreen=!1}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],39:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-FloatingToolbar",DefaultRenderable:"Flow-FloatingToolbar-Content",DefaultDestinationAddress:"#Flow-FloatingToolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",CSS:!1,Templates:[{Hash:"Flow-FloatingToolbar-Template",Template:'\n<div class="pict-flow-floating-toolbar" id="Flow-FloatingToolbar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-floating-grip" id="Flow-FloatingGrip-{~D:Record.FlowViewIdentifier~}" title="Drag to move · Double-click to collapse">\n\t\t<span id="Flow-FloatingIcon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t</div>\n\t<button class="pict-flow-floating-btn" data-flow-action="add-node" title="Add Node">\n\t\t<span id="Flow-FloatingIcon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="cards-popup" title="Cards">\n\t\t<span id="Flow-FloatingIcon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="delete-selected" title="Delete Selected">\n\t\t<span id="Flow-FloatingIcon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-in" title="Zoom In">\n\t\t<span id="Flow-FloatingIcon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-out" title="Zoom Out">\n\t\t<span id="Flow-FloatingIcon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-fit" title="Fit to View">\n\t\t<span id="Flow-FloatingIcon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="auto-layout" title="Auto Layout">\n\t\t<span id="Flow-FloatingIcon-auto-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="layout-popup" title="Layout">\n\t\t<span id="Flow-FloatingIcon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="fullscreen" title="Toggle Fullscreen">\n\t\t<span id="Flow-FloatingIcon-fullscreen-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="dock-toolbar" title="Dock Toolbar">\n\t\t<span id="Flow-FloatingIcon-dock-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-FloatingToolbar-Content",TemplateHash:"Flow-FloatingToolbar-Template",DestinationAddress:"#Flow-FloatingToolbar-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowFloatingToolbar",r._ToolbarView=null,r._FlowView=null,r._IsCollapsed=!1,r._IsDragging=!1,r._DragStartX=0,r._DragStartY=0,r._DragStartLeft=0,r._DragStartTop=0,r._BoundMouseMove=null,r._BoundMouseUp=null,r}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o,i){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"onAfterRender",value:function(t,o,i,n){var r=this,a=this.options.FlowViewIdentifier,s=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(a));s.length>0&&s[0].addEventListener("click",function(t){var e=t.target;if(e){var o=e.closest("[data-flow-action]");if(o){var i=o.getAttribute("data-flow-action");"dock-toolbar"!==i?r._ToolbarView&&r._ToolbarView._handleToolbarAction(i):r._ToolbarView&&r._ToolbarView._setToolbarMode("docked")}}});var l=this.pict.ContentAssignment.getElement("#Flow-FloatingGrip-".concat(a));if(l.length>0&&(l[0].addEventListener("mousedown",function(t){r._startDrag(t)}),l[0].addEventListener("dblclick",function(t){t.preventDefault(),t.stopPropagation(),r._toggleCollapse()})),this._populateIcons(),s.length>0){if(!1===this.options.EnableAddNode){var c=s[0].querySelector('[data-flow-action="add-node"]');c&&c.remove()}if(!1===this.options.EnableCardPalette){var d=s[0].querySelector('[data-flow-action="cards-popup"]');d&&d.remove()}}return _superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"_populateIcons",value:function(){var t=this._FlowView?this._FlowView._IconProvider:null;if(t)for(var e=this.options.FlowViewIdentifier,o={grip:"grip",plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit","auto-layout":"auto-layout",cards:"cards",layout:"layout",fullscreen:"fullscreen",dock:"dock"},i=Object.keys(o),n=0;n<i.length;n++){var r="Flow-FloatingIcon-".concat(i[n],"-").concat(e),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=t.getIconSVGMarkup(o[i[n]],16))}}},{key:"_toggleCollapse",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));e.length<1||(this._IsCollapsed=!this._IsCollapsed,this._IsCollapsed?e[0].classList.add("collapsed"):e[0].classList.remove("collapsed"))}},{key:"_startDrag",value:function(t){var e=this;t.preventDefault();var o=this.options.FlowViewIdentifier,i=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(o));if(!(i.length<1)){var n=i[0];this._IsDragging=!0,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._DragStartLeft=n.offsetLeft,this._DragStartTop=n.offsetTop,this._BoundMouseMove=function(t){e._onDragMove(t)},this._BoundMouseUp=function(){e._onDragEnd()},document.addEventListener("mousemove",this._BoundMouseMove),document.addEventListener("mouseup",this._BoundMouseUp)}}},{key:"_onDragMove",value:function(t){if(this._IsDragging){var e=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(e));if(!(o.length<1)){var i=o[0],n=t.clientX-this._DragStartX,r=t.clientY-this._DragStartY,a=this._DragStartLeft+n,s=this._DragStartTop+r,l=i.parentElement;if(l){var c=l.clientWidth-i.offsetWidth,d=l.clientHeight-i.offsetHeight;a=Math.max(0,Math.min(a,c)),s=Math.max(0,Math.min(s,d))}i.style.left=a+"px",i.style.top=s+"px"}}}},{key:"_onDragEnd",value:function(){if(this._IsDragging=!1,this._BoundMouseMove&&(document.removeEventListener("mousemove",this._BoundMouseMove),this._BoundMouseMove=null),this._BoundMouseUp&&(document.removeEventListener("mouseup",this._BoundMouseUp),this._BoundMouseUp=null),this._ToolbarView){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));e.length>0&&(this._ToolbarView._FloatingPosition.X=e[0].offsetLeft,this._ToolbarView._FloatingPosition.Y=e[0].offsetTop)}}},{key:"show",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(t));e.length>0&&(e[0].style.display="block");var o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));o.length>0&&this._ToolbarView&&(o[0].style.left=this._ToolbarView._FloatingPosition.X+"px",o[0].style.top=this._ToolbarView._FloatingPosition.Y+"px"),this._IsCollapsed&&o.length>0&&(this._IsCollapsed=!1,o[0].classList.remove("collapsed"))}},{key:"hide",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(t));e.length>0&&(e[0].style.display="none")}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],40:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-NodeRenderer",AutoRender:!1,NodeTitleBarHeight:22},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowNode",r._FlowView=null,r}return _inherits(e,t),_createClass(e,[{key:"renderNode",value:function(t,e,o,i){var n=this,r=this._FlowView._SVGHelperProvider.createSVGElement("g"),a="pict-flow-node ".concat(o?"selected":""," pict-flow-node-").concat(t.Type||"default");i&&(i.PortLabelsOnHover&&(a+=" pict-flow-node-port-labels-hover"),i.PortLabelsVertical&&(a+=" pict-flow-node-port-labels-vertical")),r.setAttribute("class",a),r.setAttribute("transform","translate(".concat(t.X,", ").concat(t.Y,")")),r.setAttribute("data-node-hash",t.Hash),r.setAttribute("data-element-type","node");var s=t.Width||180,l=t.Height||80,c=this.options.NodeTitleBarHeight,d=this._FlowView._GeometryProvider;if(d&&t.Ports&&t.Ports.length>0){var p=d.computeMinimumNodeHeight(t.Ports,c);p>l&&(l=p)}t.Width=s,t.Height=l;var h="rect";if(this._FlowView._ThemeProvider){var u=this._FlowView._ThemeProvider.getActiveTheme();u&&u.NodeBodyMode&&(h=u.NodeBodyMode)}"bracket"===h?this._renderBracketNodeBody(r,t,s,l,c,i):this._renderRectNodeBody(r,t,s,l,c,i);var f=!1,w=12;if(i&&i.CardMetadata){var v=i.CardMetadata,g=this._FlowView._IconProvider;(v.Icon||g)&&(f=!0)}var y=this._FlowView._SVGHelperProvider.createSVGElement("text");y.setAttribute("class","pict-flow-node-title"),f?(y.setAttribute("x",String(24)),y.setAttribute("text-anchor","start")):(y.setAttribute("x",String(s/2)),y.setAttribute("text-anchor","middle")),y.setAttribute("y",String(c/2+1)),y.setAttribute("dominant-baseline","central"),y.textContent=t.Title||"Untitled",r.appendChild(y);var b=!i||!1!==i.ShowTypeLabel,m=function(){if(b&&i&&i.Label&&i.Label!==t.Title){var e=n._FlowView._SVGHelperProvider.createSVGElement("text");e.setAttribute("class","pict-flow-node-type-label"),e.setAttribute("x",String(s/2)),e.setAttribute("y",String(c+16)),e.setAttribute("text-anchor","middle"),e.setAttribute("dominant-baseline","central"),e.textContent=i.Label,r.appendChild(e)}if(i&&i.CardMetadata){var o=i.CardMetadata,a=n._FlowView._IconProvider,d=!1,p=(c-w)/2;if(o.Icon&&a&&!a.isEmojiIcon(o.Icon)){var h=a.resolveIconKey(o),u=a.renderIconIntoSVGGroup(h,r,8,p,w);u&&u.setAttribute("class",(u.getAttribute("class")||"")+" pict-flow-node-title-icon"),d=!0}else if(o.Icon&&a&&a.isEmojiIcon(o.Icon)){var f=n._FlowView._SVGHelperProvider.createSVGElement("text");f.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),f.setAttribute("font-size",String(w)),f.setAttribute("text-anchor","middle"),f.setAttribute("dominant-baseline","central"),f.setAttribute("pointer-events","none"),f.setAttribute("x",String(14)),f.setAttribute("y",String(c/2)),f.textContent=o.Icon,r.appendChild(f),d=!0}else if(o.Icon){var v=n._FlowView._SVGHelperProvider.createSVGElement("text");v.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),v.setAttribute("font-size",String(w)),v.setAttribute("text-anchor","middle"),v.setAttribute("dominant-baseline","central"),v.setAttribute("pointer-events","none"),v.setAttribute("x",String(14)),v.setAttribute("y",String(c/2)),v.textContent=o.Icon,r.appendChild(v),d=!0}if(!d&&a){var g=a.renderIconIntoSVGGroup("default",r,8,p,w);g&&g.setAttribute("class",(g.getAttribute("class")||"")+" pict-flow-node-title-icon")}var y=c+(l-c)/2;if(b&&o.Code){var m=n._FlowView._SVGHelperProvider.createSVGElement("text");m.setAttribute("class","pict-flow-node-card-code"),m.setAttribute("font-size","10"),m.setAttribute("font-family","monospace"),m.setAttribute("fill","#7f8c8d"),m.setAttribute("text-anchor","middle"),m.setAttribute("dominant-baseline","central"),m.setAttribute("pointer-events","none"),m.setAttribute("x",String(s/2)),m.setAttribute("y",String(y)),m.textContent=o.Code,r.appendChild(m)}if(o.Tooltip||o.Description){var _=n._FlowView._SVGHelperProvider.createSVGElement("title");_.textContent=o.Tooltip||o.Description,r.appendChild(_)}}};if(!i||!1!==i.LabelsInFront?(this._renderBodyContent(t,r,s,l,i),m(),this._renderPorts(t,r,s,l,i)):(m(),this._renderPorts(t,r,s,l,i),this._renderBodyContent(t,r,s,l,i)),i&&i.PropertiesPanel){var _,P=10,F=s-P-4,S=l-P-4,V=this._FlowView._ConnectorShapesProvider;V?_=V.createPanelIndicatorElement(t.Hash,F,S,P,P):((_=this._FlowView._SVGHelperProvider.createSVGElement("rect")).setAttribute("class","pict-flow-node-panel-indicator"),_.setAttribute("x",String(F)),_.setAttribute("y",String(S)),_.setAttribute("width",String(P)),_.setAttribute("height",String(P)),_.setAttribute("rx","2"),_.setAttribute("ry","2"),_.setAttribute("data-node-hash",t.Hash),_.setAttribute("data-element-type","panel-indicator"));var C=this._FlowView._SVGHelperProvider.createSVGElement("title");C.textContent="Double-click to open properties",_.appendChild(C),r.appendChild(_)}e.appendChild(r)}},{key:"_renderPorts",value:function(t,e,o,i,n){this._FlowView._PortRenderer.renderPorts(t,e,o,i,n,this.options.NodeTitleBarHeight)}},{key:"_renderBodyContent",value:function(t,e,o,i,n){if(n&&n.BodyContent){var r=n.BodyContent,a=r.ContentType;if(a){var s=this.options.NodeTitleBarHeight,l="number"==typeof r.Padding?r.Padding:2,c={x:l,y:s+l,width:o-2*l,height:i-s-2*l},d=this._FlowView.pict||this.pict;if(r.Templates&&Array.isArray(r.Templates)){this._registeredBodyTemplates||(this._registeredBodyTemplates=new Set);for(var p=0;p<r.Templates.length;p++){var h=r.Templates[p];h.Hash&&h.Template&&!this._registeredBodyTemplates.has(h.Hash)&&(d.TemplateProvider.addTemplate(h.Hash,h.Template,"PictViewFlowNode-BodyContent"),this._registeredBodyTemplates.add(h.Hash))}}switch(a){case"svg":this._renderBodyContentSVG(t,e,r,c,n,d);break;case"html":this._renderBodyContentHTML(t,e,r,c,n,d);break;case"canvas":this._renderBodyContentCanvas(t,e,r,c,n);break;default:this.log.warn("PictViewFlowNode _renderBodyContent: unknown ContentType ["+a+"]")}}}}},{key:"_renderBodyContentSVG",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("g");a.setAttribute("class","pict-flow-node-body-content"),a.setAttribute("transform","translate(".concat(i.x,", ").concat(i.y,")"));var s=this._resolveBodyTemplate(o,t,r);if(s){var l=document.createElementNS("http://www.w3.org/2000/svg","svg");for(l.innerHTML=s;l.firstChild;)a.appendChild(l.firstChild)}"function"==typeof o.RenderCallback&&o.RenderCallback(a,t,n,i),e.appendChild(a)}},{key:"_renderBodyContentHTML",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");a.setAttribute("class","pict-flow-node-body-content-fo"),a.setAttribute("x",String(i.x)),a.setAttribute("y",String(i.y)),a.setAttribute("width",String(i.width)),a.setAttribute("height",String(i.height));var s=document.createElement("div");s.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),s.setAttribute("class","pict-flow-node-body-content-html"),s.addEventListener("pointerdown",function(t){t.stopPropagation()}),s.addEventListener("wheel",function(t){t.stopPropagation()});var l=this._resolveBodyTemplate(o,t,r);l&&(s.innerHTML=l),"function"==typeof o.RenderCallback&&o.RenderCallback(s,t,n,i),a.appendChild(s),e.appendChild(a)}},{key:"_renderBodyContentCanvas",value:function(t,e,o,i,n){var r=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");r.setAttribute("class","pict-flow-node-body-content-fo"),r.setAttribute("x",String(i.x)),r.setAttribute("y",String(i.y)),r.setAttribute("width",String(i.width)),r.setAttribute("height",String(i.height));var a=document.createElement("canvas");a.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),a.setAttribute("class","pict-flow-node-body-content-canvas"),a.width=Math.floor(i.width),a.height=Math.floor(i.height),a.style.width="100%",a.style.height="100%",a.addEventListener("pointerdown",function(t){t.stopPropagation()}),a.addEventListener("wheel",function(t){t.stopPropagation()}),"function"==typeof o.RenderCallback&&o.RenderCallback(a,t,n,i),r.appendChild(a),e.appendChild(r)}},{key:"_resolveBodyTemplate",value:function(t,e,o){return t.TemplateHash?o.parseTemplateByHash(t.TemplateHash,e):t.Template?o.parseTemplate(t.Template,e,null,[e]):null}},{key:"_renderRectNodeBody",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(i)),a.setAttribute("data-node-hash",e.Hash),a.setAttribute("data-element-type","node-body"),r&&r.BodyStyle)for(var s in r.BodyStyle)a.setAttribute(s,r.BodyStyle[s]);if(e.Style){var l=[];e.Style.BodyFill&&l.push("fill:"+e.Style.BodyFill),e.Style.BodyStroke&&l.push("stroke:"+e.Style.BodyStroke),e.Style.BodyStrokeWidth&&l.push("stroke-width:"+e.Style.BodyStrokeWidth),l.length>0&&a.setAttribute("style",l.join(";"))}t.appendChild(a);var c=this._FlowView._SVGHelperProvider.createSVGElement("rect");c.setAttribute("class","pict-flow-node-title-bar"),c.setAttribute("x","0"),c.setAttribute("y","0"),c.setAttribute("width",String(o)),c.setAttribute("height",String(n)),c.setAttribute("data-node-hash",e.Hash),c.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&c.setAttribute("fill",r.TitleBarColor),t.appendChild(c);var d=this._FlowView._SVGHelperProvider.createSVGElement("rect");d.setAttribute("class","pict-flow-node-title-bar-bottom"),d.setAttribute("x","0"),d.setAttribute("y",String(n-8)),d.setAttribute("width",String(o)),d.setAttribute("height","8"),d.setAttribute("data-node-hash",e.Hash),d.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&d.setAttribute("fill",r.TitleBarColor),e.Style&&e.Style.TitleBarColor&&(c.setAttribute("style","fill:"+e.Style.TitleBarColor),d.setAttribute("style","fill:"+e.Style.TitleBarColor)),t.appendChild(d)}},{key:"_renderBracketNodeBody",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body pict-flow-node-bracket-fill"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(i)),a.setAttribute("data-node-hash",e.Hash),a.setAttribute("data-element-type","node-body"),e.Style){var s=[];e.Style.BodyFill&&s.push("fill:"+e.Style.BodyFill),s.length>0&&a.setAttribute("style",s.join(";"))}t.appendChild(a);var l=this._FlowView._SVGHelperProvider.createSVGElement("rect");l.setAttribute("class","pict-flow-node-title-bar pict-flow-node-bracket-title-fill"),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(o)),l.setAttribute("height",String(n)),l.setAttribute("data-node-hash",e.Hash),l.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&l.setAttribute("style","fill:"+r.TitleBarColor),e.Style&&e.Style.TitleBarColor&&l.setAttribute("style","fill:"+e.Style.TitleBarColor),t.appendChild(l);var c={SerifLength:6,TitleSeparator:!0};if(this._FlowView._ThemeProvider){var d=this._FlowView._ThemeProvider.getActiveTheme();d&&d.BracketConfig&&(c=Object.assign(c,d.BracketConfig))}var p=0;this._FlowView._ThemeProvider&&(p=this._FlowView._ThemeProvider.getNodeNoiseAmplitude());var h="";this._FlowView._NoiseProvider&&(h=this._FlowView._NoiseProvider.generateBracketPath(o,i,c.SerifLength,c.TitleSeparator?n:0,p,e.Hash));var u=this._FlowView._SVGHelperProvider.createSVGElement("path");if(u.setAttribute("class","pict-flow-node-bracket"),u.setAttribute("d",h),u.setAttribute("data-node-hash",e.Hash),u.setAttribute("data-element-type","node-body"),e.Style){var f=[];e.Style.BodyStroke&&f.push("stroke:"+e.Style.BodyStroke),e.Style.BodyStrokeWidth&&f.push("stroke-width:"+e.Style.BodyStrokeWidth),f.length>0&&u.setAttribute("style",f.join(";"))}t.appendChild(u)}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],41:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-PropertiesPanel",AutoRender:!1,Templates:[{Hash:"Flow-InfoPanel-Wrapper",Template:'<div class="pict-flow-info-panel">{~D:Record.PanelContent~}</div>'},{Hash:"Flow-InfoPanel-Header-Icon",Template:'<div class="pict-flow-info-panel-header with-icon">{~D:Record.Icon~} {~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Header",Template:'<div class="pict-flow-info-panel-header">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Description",Template:'<div class="pict-flow-info-panel-description">{~D:Record.Description~}</div>'},{Hash:"Flow-InfoPanel-Badges",Template:'<div class="pict-flow-info-panel-badges">{~D:Record.BadgesContent~}</div>'},{Hash:"Flow-InfoPanel-Badge-Category",Template:'<span class="pict-flow-info-panel-badge category">{~D:Record.Category~}</span>'},{Hash:"Flow-InfoPanel-Badge-Code",Template:'<span class="pict-flow-info-panel-badge code">{~D:Record.Code~}</span>'},{Hash:"Flow-InfoPanel-Section-Inputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Inputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Section-Outputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Outputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Input",Template:'<div class="pict-flow-info-panel-port input">{~D:Record.Label~}{~D:Record.Constraint~}</div>'},{Hash:"Flow-InfoPanel-Port-Output",Template:'<div class="pict-flow-info-panel-port output">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Constraint",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.ConstraintText~}</span>'},{Hash:"Flow-InfoPanel-Section-Generic",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">{~D:Record.SectionTitle~}</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Event",Template:'<div class="pict-flow-info-panel-port event">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Value",Template:'<div class="pict-flow-info-panel-port value">{~D:Record.Label~}{~D:Record.DataType~}</div>'},{Hash:"Flow-InfoPanel-Port-DataType",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.DataTypeText~}</span>'},{Hash:"Flow-NodeProps-Editor",Template:'<div class="pict-flow-node-props-fields"><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title</label><input type="text" class="pict-flow-node-props-input" data-prop="Title" value="{~D:Record.Title~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Width" value="{~D:Record.Width~}" min="60" step="10" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Height</label><input type="number" class="pict-flow-node-props-input" data-prop="Height" value="{~D:Record.Height~}" min="40" step="10" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Fill</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyFill" value="{~D:Record.BodyFillValue~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Stroke</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyStroke" value="{~D:Record.BodyStrokeValue~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Stroke Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Style.BodyStrokeWidth" value="{~D:Record.BodyStrokeWidthValue~}" min="0" max="10" step="0.5" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title Bar</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.TitleBarColor" value="{~D:Record.TitleBarColorValue~}" /></div></div>'}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowPropertiesPanel",r._FlowView=null,r._PanelInstances={},r}return _inherits(e,t),_createClass(e,[{key:"renderPanels",value:function(t,e,o,i){if(e&&o&&this._FlowView){for(var n=Array.isArray(t)?t:[],r=new Set,a=e.querySelectorAll(".pict-flow-panel-foreign-object"),s=0;s<a.length;s++)r.add(a[s].getAttribute("data-panel-hash"));for(var l=new Set,c=0;c<n.length;c++)l.add(n[c].Hash);for(var d=0;d<a.length;d++){var p=a[d].getAttribute("data-panel-hash");l.has(p)||(a[d].remove(),this._PanelInstances[p]&&(this._PanelInstances[p].destroy(),delete this._PanelInstances[p]))}for(var h=0;h<n.length;h++){var u=n[h];if(r.has(u.Hash)){var f=e.querySelector('[data-panel-hash="'.concat(u.Hash,'"]'));f&&(f.setAttribute("x",String(u.X)),f.setAttribute("y",String(u.Y)),f.setAttribute("width",String(u.Width)),f.setAttribute("height",String(u.Height)))}else this._createPanelForeignObject(u,e)}for(;o.firstChild;)o.removeChild(o.firstChild);for(var w=0;w<n.length;w++){var v=i===n[w].Hash;this._renderTether(n[w],o,v)}}}},{key:"_createPanelForeignObject",value:function(t,e){var o=this._FlowView._PanelChromeProvider;if(o){var i=o.createPanelForeignObject(t,e);i&&this._renderPanelContent(t,i);var n=e.querySelector('[data-panel-hash="'.concat(t.Hash,'"]'));n&&(this._renderAppearanceTab(t,n),this._renderHelpTab(t,n),this._wireTabSwitching(n))}}},{key:"_renderPanelContent",value:function(t,e){var o=this._FlowView.getNode(t.NodeHash);if(o){var i=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(i)if(i.PropertiesPanel){var n=i.PropertiesPanel,r=n.PanelType||"Base",a="PictFlowCardPropertiesPanel-".concat(r),s=null;this._PanelInstances[t.Hash]?s=this._PanelInstances[t.Hash]:(this.fable.servicesMap.hasOwnProperty(a)?s=this.fable.instantiateServiceProviderWithoutRegistration(a,n):this.fable.servicesMap.hasOwnProperty("PictFlowCardPropertiesPanel")&&(s=this.fable.instantiateServiceProviderWithoutRegistration("PictFlowCardPropertiesPanel",n)),s&&(s._FlowView=this._FlowView,this._PanelInstances[t.Hash]=s)),s&&s.render(e,o),this._renderPortSummary(e,i)}else this._renderInfoPanelContent(e,o,i)}}},{key:"_renderInfoPanelContent",value:function(t,e,o){var i=o.CardMetadata||{},n=o.DefaultPorts||[],r=n.filter(function(t){return"input"===t.Direction}),a=n.filter(function(t){return"output"===t.Direction}),s=o.Label||e.Type,l=[],c=this._FlowView._IconProvider;if(i.Icon&&c&&!c.isEmojiIcon(i.Icon)){var d=c.resolveIconKey(i),p=c.getIconSVGMarkup(d,18);l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:p,Label:s}))}else if(i.Icon)l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:i.Icon,Label:s}));else if(c){var h=c.getIconSVGMarkup("default",18);l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:h,Label:s}))}else l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header",{Label:s}));if(i.Description&&l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Description",{Description:i.Description})),i.Category||i.Code){var u="";i.Category&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Category",{Category:i.Category})),i.Code&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Code",{Code:i.Code})),l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Badges",{BadgesContent:u}))}if(r.length>0){for(var f="",w=0;w<r.length;w++){var v=r[w],g=this._getPortConstraintHTML(v);f+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Input",{Label:v.Label||"In",Constraint:g})}l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Inputs",{PortsContent:f}))}if(a.length>0){for(var y="",b=0;b<a.length;b++){var m=a[b];y+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Output",{Label:m.Label||"Out"})}l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Outputs",{PortsContent:y}))}t.innerHTML=this.pict.parseTemplateByHash("Flow-InfoPanel-Wrapper",{PanelContent:l.join("")})}},{key:"_renderPortSummary",value:function(t,e){var o=e.DefaultPorts||[];if(0!==o.length){for(var i=[],n=[],r=[],a=0;a<o.length;a++){var s=o[a],l=s.PortType||"";"event-in"===l?i.push(s):"event-out"===l||"error"===l?n.push(s):"value"===l&&r.push(s)}if(0!==i.length||0!==n.length||0!==r.length){var c=[];if(i.length>0){for(var d="",p=0;p<i.length;p++)d+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:i[p].Label||i[p].Name||"Event In"});c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Inputs",PortsContent:d}))}if(n.length>0){for(var h="",u=0;u<n.length;u++){var f=n[u],w=f.Label||f.Name||"Event Out";"error"===f.PortType&&(w+=" ⚠"),h+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:w})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Outputs",PortsContent:h}))}if(r.length>0){for(var v="",g=0;g<r.length;g++){var y=r[g],b=y.Label||y.Name||"Output",m="";y.DataType&&(m=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-DataType",{DataTypeText:y.DataType})),v+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Value",{Label:b,DataType:m})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"State Outputs",PortsContent:v}))}if(c.length>0){var _=document.createElement("div");_.className="pict-flow-info-panel pict-flow-port-summary",_.innerHTML=c.join(""),t.appendChild(_)}}}}},{key:"_getPortConstraintHTML",value:function(t){var e="number"==typeof t.MinimumInputCount?t.MinimumInputCount:0,o="number"==typeof t.MaximumInputCount?t.MaximumInputCount:-1;if(e>0||o>0){var i="";return i=o<0?"(min ".concat(e,")"):e===o?"(exactly ".concat(e,")"):"(".concat(e,"–").concat(o,")"),this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Constraint",{ConstraintText:i})}return""}},{key:"_renderAppearanceTab",value:function(t,e){var o=this,i=this._FlowView.getNode(t.NodeHash);if(i){var n=e.querySelector('.pict-flow-panel-tab-pane[data-tab="appearance"]');if(n){var r=i.Style||{},a=this._FlowView._NodeTypeProvider.getNodeType(i.Type),s="#2c3e50",l="#ffffff",c="#d0d4d8";a&&(a.TitleBarColor&&(s=a.TitleBarColor),a.BodyStyle&&(a.BodyStyle.fill&&(l=a.BodyStyle.fill),a.BodyStyle.stroke&&(c=a.BodyStyle.stroke)));var d={Title:i.Title||"",Width:i.Width||180,Height:i.Height||80,BodyFillValue:r.BodyFill||l,BodyStrokeValue:r.BodyStroke||c,BodyStrokeWidthValue:r.BodyStrokeWidth||1,TitleBarColorValue:r.TitleBarColor||s};n.innerHTML=this.pict.parseTemplateByHash("Flow-NodeProps-Editor",d);for(var p=n.querySelectorAll(".pict-flow-node-props-input"),h=function(){var e=p[u],i=e.getAttribute("data-prop");e.addEventListener("input",function(n){n.stopPropagation(),o._applyNodePropChange(t.NodeHash,i,e.value,e.type)}),e.addEventListener("pointerdown",function(t){t.stopPropagation()})},u=0;u<p.length;u++)h()}}}},{key:"_renderHelpTab",value:function(t,e){var o=this._FlowView.getNode(t.NodeHash);if(o){var i=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(i){var n=i.CardMetadata&&i.CardMetadata.Help?i.CardMetadata.Help:null;if(n){var r=e.querySelector('.pict-flow-panel-tab[data-tab-target="help"]');r&&(r.style.display="");var a=e.querySelector('.pict-flow-panel-tab-pane[data-tab="help"]');a&&(a.innerHTML='<div class="pict-flow-panel-help-content">'+n+"</div>")}}}}},{key:"_wireTabSwitching",value:function(t){for(var e=t.querySelectorAll(".pict-flow-panel-tab"),o=t.querySelectorAll(".pict-flow-panel-tab-pane"),i=0;i<e.length;i++)e[i].addEventListener("click",function(i){i.stopPropagation();for(var n=i.currentTarget.getAttribute("data-tab-target"),r=0;r<e.length;r++)e[r].classList.remove("active");for(var a=0;a<o.length;a++)o[a].classList.remove("active"),o[a].style.display="none";i.currentTarget.classList.add("active");var s=t.querySelector('.pict-flow-panel-tab-pane[data-tab="'+n+'"]');s&&(s.classList.add("active"),s.style.display="block")})}},{key:"_applyNodePropChange",value:function(t,e,o,i){var n=this._FlowView.getNode(t);if(n){var r=o;if("number"!==i||(r=parseFloat(o),!isNaN(r))){if("Title"===e)n.Title=r;else if("Width"===e)n.Width=r;else if("Height"===e)n.Height=r;else if(e.startsWith("Style.")){n.Style||(n.Style={});var a=e.substring(6);n.Style[a]=r}this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"_renderTether",value:function(t,e,o){var i=this._FlowView._TetherService;if(i){var n=this._FlowView.getNode(t.NodeHash);if(n){var r=this._FlowView.options.ViewIdentifier;i.renderTether(t,n,e,o,r)}}}},{key:"marshalAllFromPanels",value:function(){for(var t in this._PanelInstances){var e=this._PanelInstances[t];e&&e._NodeData&&e.marshalFromPanel(e._NodeData)}}},{key:"destroyPanel",value:function(t){this._PanelInstances[t]&&(this._PanelInstances[t].destroy(),delete this._PanelInstances[t])}},{key:"destroyAllPanels",value:function(){for(var t in this._PanelInstances)this._PanelInstances[t].destroy();this._PanelInstances={}}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],42:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-Toolbar",DefaultRenderable:"Flow-Toolbar-Content",DefaultDestinationAddress:"#Flow-Toolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",EnablePalette:!0,EnableAddNode:!0,EnableCardPalette:!0,CSS:!1,Templates:[{Hash:"Flow-Toolbar-Template",Template:'\n<div class="pict-flow-toolbar" id="Flow-Toolbar-Bar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="add-node" id="Flow-Toolbar-AddNode-{~D:Record.FlowViewIdentifier~}" title="Add Node">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Node</span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="cards-popup" id="Flow-Toolbar-Cards-{~D:Record.FlowViewIdentifier~}" title="Card Palette">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Cards</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-CardsChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="delete-selected" title="Delete Node">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="layout-popup" id="Flow-Toolbar-Layout-{~D:Record.FlowViewIdentifier~}" title="Manage Layouts">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Layout</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-LayoutChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="auto-layout" title="Auto Layout">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-auto-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Auto Layout</span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-in" title="Zoom In">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-out" title="Zoom Out">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-fit" title="Fit to View">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group pict-flow-toolbar-right">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="settings-popup" id="Flow-Toolbar-Settings-{~D:Record.FlowViewIdentifier~}" title="Theme Settings">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-settings-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="fullscreen" id="Flow-Toolbar-Fullscreen-{~D:Record.FlowViewIdentifier~}" title="Toggle Fullscreen">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Fullscreen-Icon-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="toggle-floating" title="Float">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="collapse-toolbar" title="Collapse Toolbar">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-collapse-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n</div>\n<div class="pict-flow-toolbar-collapsed" id="Flow-Toolbar-Collapsed-{~D:Record.FlowViewIdentifier~}">\n\t<button class="pict-flow-toolbar-expand-btn" data-flow-action="expand-toolbar" title="Expand Toolbar" id="Flow-Toolbar-ExpandBtn-{~D:Record.FlowViewIdentifier~}">\n\t\t<span id="Flow-Toolbar-Icon-expand-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n<div class="pict-flow-toolbar-popup-anchor" id="Flow-Toolbar-PopupAnchor-{~D:Record.FlowViewIdentifier~}">\n</div>\n'}],Renderables:[{RenderableHash:"Flow-Toolbar-Content",TemplateHash:"Flow-Toolbar-Template",DestinationAddress:"#Flow-Toolbar-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowToolbar",r._FlowView=null,r._ToolbarMode="docked",r._ActivePopup=null,r._FloatingPosition={X:80,Y:80},r._DocumentClickHandler=null,r._FloatingToolbarView=null,r}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o,i){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"onAfterRender",value:function(t,o,i,n){var r=this,a=this.options.FlowViewIdentifier,s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Bar-".concat(a));s.length>0&&s[0].addEventListener("click",function(t){var e=t.target;if(e){var o=e.closest("[data-flow-action]");if(o){var i=o.getAttribute("data-flow-action");r._handleToolbarAction(i)}}});var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-ExpandBtn-".concat(a));if(l.length>0&&l[0].addEventListener("click",function(){r._setToolbarMode("docked")}),this._populateToolbarIcons(),!1===this.options.EnableAddNode){var c=this.pict.ContentAssignment.getElement("#Flow-Toolbar-AddNode-".concat(a));c.length>0&&c[0].remove()}if(!1===this.options.EnableCardPalette){var d=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Cards-".concat(a));d.length>0&&d[0].remove()}return _superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"_populateToolbarIcons",value:function(){var t=this._FlowView?this._FlowView._IconProvider:null;if(t){for(var e=this.options.FlowViewIdentifier,o={plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit","auto-layout":"auto-layout",cards:"cards",layout:"layout",settings:"settings",grip:"grip",collapse:"collapse",expand:"expand"},i=Object.keys(o),n=0;n<i.length;n++){var r="Flow-Toolbar-Icon-".concat(i[n],"-").concat(e),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=t.getIconSVGMarkup(o[i[n]],14))}var s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(e));s.length>0&&(s[0].innerHTML=t.getIconSVGMarkup("fullscreen",14));var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-CardsChevron-".concat(e));l.length>0&&(l[0].innerHTML=t.getIconSVGMarkup("chevron-down",8));var c=this.pict.ContentAssignment.getElement("#Flow-Toolbar-LayoutChevron-".concat(e));c.length>0&&(c[0].innerHTML=t.getIconSVGMarkup("chevron-down",8))}}},{key:"_openPopup",value:function(t){var e=this;if(this._ActivePopup!==t){this._closePopup();var o=this.options.FlowViewIdentifier,i=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(o));if(!(i.length<1)){var n=document.createElement("div");switch(n.className="pict-flow-toolbar-popup",n.setAttribute("id","Flow-Toolbar-Popup-".concat(o)),t){case"add-node":this._buildAddNodePopup(n);break;case"cards":this._buildCardsPopup(n);break;case"layout":this._buildLayoutPopup(n);break;case"settings":this._buildSettingsPopup(n)}if(i[0].appendChild(n),this._ActivePopup=t,this._positionPopup(n,t),setTimeout(function(){e._DocumentClickHandler=function(o){if(!n.contains(o.target)){var i=o.target.closest("[data-flow-action]");if(i){var r=i.getAttribute("data-flow-action");if(r===t||r===t.replace("-popup","")+"-popup")return}e._closePopup()}},document.addEventListener("click",e._DocumentClickHandler,!0)},0),"add-node"===t){var r=n.querySelector(".pict-flow-popup-search");r&&setTimeout(function(){r.focus()},50)}}}else this._closePopup()}},{key:"_closePopup",value:function(){this._DocumentClickHandler&&(document.removeEventListener("click",this._DocumentClickHandler,!0),this._DocumentClickHandler=null);var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Popup-".concat(t));e.length>0&&e[0].parentNode.removeChild(e[0]),this._ActivePopup=null}},{key:"_positionPopup",value:function(t,e){var o,i=this.options.FlowViewIdentifier;switch(e){case"add-node":o="#Flow-Toolbar-AddNode-".concat(i);break;case"cards":o="#Flow-Toolbar-Cards-".concat(i);break;case"layout":o="#Flow-Toolbar-Layout-".concat(i);break;case"settings":o="#Flow-Toolbar-Settings-".concat(i);break;default:return}var n=this.pict.ContentAssignment.getElement(o);if(!(n.length<1)){var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(i));if(!(r.length<1)){var a=n[0].getBoundingClientRect(),s=r[0].getBoundingClientRect(),l=a.left-s.left;t.style.left=l+"px",t.style.top="0px"}}}},{key:"_buildAddNodePopup",value:function(t){var e=this,o=document.createElement("div");o.className="pict-flow-popup-search-wrapper";var i=document.createElement("span");i.className="pict-flow-popup-search-icon";var n=this._FlowView?this._FlowView._IconProvider:null;n&&(i.innerHTML=n.getIconSVGMarkup("search",12)),o.appendChild(i);var r=document.createElement("input");r.className="pict-flow-popup-search",r.setAttribute("type","text"),r.setAttribute("placeholder","Search node types..."),o.appendChild(r),t.appendChild(o);var a=document.createElement("div");a.className="pict-flow-popup-node-list",t.appendChild(a),this._populateNodeList(a,""),r.addEventListener("input",function(){e._populateNodeList(a,r.value)})}},{key:"_populateNodeList",value:function(t,e){var o=this;if(this._FlowView&&this._FlowView._NodeTypeProvider){for(;t.firstChild;)t.removeChild(t.firstChild);for(var i=this._FlowView._NodeTypeProvider.getNodeTypes(),n=Object.keys(i),r=(e||"").toLowerCase().trim(),a=this._FlowView._IconProvider,s=0,l=function(e){var l=i[n[e]],c=l.CardMetadata||{};if(!1===c.Enabled)return 0;if(r){var d=(l.Label||"").toLowerCase(),p=(c.Code||"").toLowerCase(),h=(c.Category||"").toLowerCase();if(d.indexOf(r)<0&&p.indexOf(r)<0&&h.indexOf(r)<0)return 0}s++;var u=document.createElement("div");u.className="pict-flow-popup-list-item",u.setAttribute("data-node-type",n[e]);var f=document.createElement("span");if(f.className="pict-flow-popup-list-item-icon",a){var w=a.resolveIconKey(c);f.innerHTML=a.getIconSVGMarkup(w,16)}u.appendChild(f);var v=document.createElement("span");if(v.className="pict-flow-popup-list-item-label",v.textContent=l.Label,u.appendChild(v),c.Code){var g=document.createElement("span");g.className="pict-flow-popup-list-item-code",g.textContent=c.Code,u.appendChild(g)}u.addEventListener("click",function(){o._addNodeAtCenter(n[e]),o._closePopup()}),t.appendChild(u)},c=0;c<n.length;c++)l(c);if(0===s){var d=document.createElement("div");d.className="pict-flow-popup-list-empty",d.textContent="No matching node types",t.appendChild(d)}}}},{key:"_buildCardsPopup",value:function(t){var e=this,o=document.createElement("div");o.className="pict-flow-popup-search-wrapper";var i=document.createElement("span");i.className="pict-flow-popup-search-icon";var n=this._FlowView?this._FlowView._IconProvider:null;n&&(i.innerHTML=n.getIconSVGMarkup("search",12)),o.appendChild(i);var r=document.createElement("input");r.className="pict-flow-popup-search",r.setAttribute("type","text"),r.setAttribute("placeholder","Search cards..."),o.appendChild(r),t.appendChild(o);var a=document.createElement("div");a.className="pict-flow-popup-node-list",t.appendChild(a),this._renderPalette(a,""),r.addEventListener("input",function(){e._renderPalette(a,r.value)}),setTimeout(function(){r.focus()},50)}},{key:"_renderPalette",value:function(t,e){var o=this;if(this._FlowView&&this._FlowView._NodeTypeProvider){for(;t.firstChild;)t.removeChild(t.firstChild);for(var i=this._FlowView._NodeTypeProvider.getCardsByCategory(),n=Object.keys(i),r=(e||"").toLowerCase().trim(),a=0,s=0;s<n.length;s++){for(var l=n[s],c=i[l],d=[],p=0;p<c.length;p++){var h=c[p],u=h.CardMetadata||{};if(r){var f=(h.Label||"").toLowerCase(),w=(u.Code||"").toLowerCase(),v=l.toLowerCase();if(f.indexOf(r)<0&&w.indexOf(r)<0&&v.indexOf(r)<0)continue}d.push(h)}if(0!==d.length){a+=d.length;var g=document.createElement("div");g.className="pict-flow-palette-category",g.style.padding="0.35em 0.5em";var y=document.createElement("div");y.className="pict-flow-palette-category-label",y.textContent=l,g.appendChild(y);var b=document.createElement("div");b.className="pict-flow-palette-cards";for(var m=function(){var t=d[_],e=t.CardMetadata||{},i=document.createElement("div");if(i.className="pict-flow-palette-card",!1===e.Enabled&&i.classList.add("disabled"),i.setAttribute("data-card-type",t.Hash),e.Tooltip?i.setAttribute("title",e.Tooltip):e.Description&&i.setAttribute("title",e.Description),e.Icon){var n=document.createElement("span");n.className="pict-flow-palette-card-icon";var r=o._FlowView._IconProvider;if(r&&!r.isEmojiIcon(e.Icon)){var a=r.resolveIconKey(e);n.innerHTML=r.getIconSVGMarkup(a,14)}else n.textContent=e.Icon;i.appendChild(n)}else if(o._FlowView._IconProvider){var s=document.createElement("span");s.className="pict-flow-palette-card-icon",s.innerHTML=o._FlowView._IconProvider.getIconSVGMarkup("default",14),i.appendChild(s)}else if(t.TitleBarColor){var l=document.createElement("span");l.className="pict-flow-palette-card-swatch",l.style.backgroundColor=t.TitleBarColor,i.appendChild(l)}var c=document.createElement("span");if(c.className="pict-flow-palette-card-title",c.textContent=t.Label,i.appendChild(c),e.Code){var p=document.createElement("span");p.className="pict-flow-palette-card-code",p.textContent=e.Code,i.appendChild(p)}i.addEventListener("click",function(){o._addCardFromPalette(t.Hash),o._closePopup()}),b.appendChild(i)},_=0;_<d.length;_++)m();g.appendChild(b),t.appendChild(g)}}if(0===a){var P=document.createElement("div");P.className="pict-flow-popup-list-empty",P.textContent=r?"No matching cards":"No card types available",t.appendChild(P)}}}},{key:"_buildLayoutPopup",value:function(t){var e=this,o=this._FlowView?this._FlowView._IconProvider:null,i=document.createElement("div");i.className="pict-flow-popup-layout-save-section";var n=document.createElement("div");n.className="pict-flow-popup-layout-save-input-row",n.style.display="none";var r=document.createElement("input");r.className="pict-flow-popup-layout-save-input",r.setAttribute("type","text"),r.setAttribute("placeholder","Layout name..."),n.appendChild(r);var a=document.createElement("button");a.className="pict-flow-popup-layout-save-confirm",a.title="Save",o?a.innerHTML=o.getIconSVGMarkup("save",14):a.textContent="✓",n.appendChild(a);var s=document.createElement("div");s.className="pict-flow-popup-layout-save";var l=document.createElement("span");l.className="pict-flow-popup-layout-save-icon",o&&(l.innerHTML=o.getIconSVGMarkup("save",14)),s.appendChild(l);var c=document.createElement("span");c.textContent="Save Current Layout",s.appendChild(c),s.addEventListener("click",function(){s.style.display="none",n.style.display="",r.value="",setTimeout(function(){r.focus()},50)});var d=function(){var o=r.value.trim();if(""!==o){for(e._FlowView._LayoutProvider.saveLayout(o);t.firstChild;)t.removeChild(t.firstChild);e._buildLayoutPopup(t)}};a.addEventListener("click",d),r.addEventListener("keydown",function(t){"Enter"===t.key?(t.preventDefault(),d()):"Escape"===t.key&&(n.style.display="none",s.style.display="")}),r.addEventListener("click",function(t){t.stopPropagation()}),i.appendChild(s),i.appendChild(n),t.appendChild(i);var p=document.createElement("div");if(p.className="pict-flow-popup-divider",t.appendChild(p),!this._FlowView||!this._FlowView._LayoutProvider){var h=document.createElement("div");return h.className="pict-flow-popup-list-empty",h.textContent="No saved layouts",void t.appendChild(h)}var u=this._FlowView._LayoutProvider.getLayouts();if(0===u.length){var f=document.createElement("div");return f.className="pict-flow-popup-list-empty",f.textContent="No saved layouts",void t.appendChild(f)}for(var w=function(){var i=u[v],n=document.createElement("div");n.className="pict-flow-popup-layout-row";var r=document.createElement("span");r.className="pict-flow-popup-layout-name",r.textContent=i.Name,n.appendChild(r);var a=document.createElement("button");a.className="pict-flow-popup-layout-delete",a.title="Delete layout",o?a.innerHTML=o.getIconSVGMarkup("trash",12):a.textContent="×",n.appendChild(a),n.addEventListener("click",function(t){t.target.closest(".pict-flow-popup-layout-delete")||(e._FlowView._LayoutProvider.restoreLayout(i.Hash),e._closePopup())}),a.addEventListener("click",function(o){for(o.stopPropagation(),e._FlowView._LayoutProvider.deleteLayout(i.Hash);t.firstChild;)t.removeChild(t.firstChild);e._buildLayoutPopup(t)}),t.appendChild(n)},v=0;v<u.length;v++)w()}},{key:"_buildSettingsPopup",value:function(t){var e=this;if(this._FlowView&&this._FlowView._ThemeProvider){var o=this._FlowView._ThemeProvider,i=document.createElement("div");i.className="pict-flow-popup-settings-section";var n=document.createElement("label");n.className="pict-flow-popup-settings-label",n.textContent="Theme",i.appendChild(n);var r=document.createElement("select");r.className="pict-flow-popup-settings-select";for(var a=o.getThemeKeys(),s=o.getActiveThemeKey(),l=0;l<a.length;l++){var c=document.createElement("option");c.value=a[l];var d=o._Themes[a[l]];c.textContent=d.Label||a[l],a[l]===s&&(c.selected=!0),r.appendChild(c)}r.addEventListener("change",function(){e._FlowView.setTheme(r.value),e._refreshNoiseSlider(t)}),r.addEventListener("click",function(t){t.stopPropagation()}),i.appendChild(r),t.appendChild(i);var p=document.createElement("div");p.className="pict-flow-popup-divider",t.appendChild(p);var h=document.createElement("div");h.className="pict-flow-popup-settings-section pict-flow-popup-settings-noise",h.setAttribute("data-settings-type","noise");var u=document.createElement("label");u.className="pict-flow-popup-settings-label",u.textContent="Noise",h.appendChild(u);var f=document.createElement("div");f.className="pict-flow-popup-settings-slider-row";var w=document.createElement("input");w.type="range",w.className="pict-flow-popup-settings-slider",w.min="0",w.max="100",w.value=String(Math.round(100*o.getNoiseLevel()));var v=document.createElement("span");v.className="pict-flow-popup-settings-slider-value",v.textContent=w.value+"%",w.addEventListener("input",function(){var t=parseInt(w.value,10)/100;v.textContent=w.value+"%",e._FlowView.setNoiseLevel(t)}),w.addEventListener("click",function(t){t.stopPropagation()}),w.addEventListener("pointerdown",function(t){t.stopPropagation()}),f.appendChild(w),f.appendChild(v),h.appendChild(f),t.appendChild(h),this._refreshNoiseSlider(t)}}},{key:"_refreshNoiseSlider",value:function(t){var e=t.querySelector('[data-settings-type="noise"]');if(e){var o=this._FlowView._ThemeProvider.getActiveTheme();if(o&&o.NoiseConfig&&o.NoiseConfig.Enabled){e.style.display="";var i=e.querySelector(".pict-flow-popup-settings-slider"),n=e.querySelector(".pict-flow-popup-settings-slider-value");if(i){var r=Math.round(100*this._FlowView._ThemeProvider.getNoiseLevel());i.value=String(r),n&&(n.textContent=r+"%")}}else e.style.display="none"}}},{key:"_setToolbarMode",value:function(t){this._closePopup();var e=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Bar-".concat(e)),i=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Collapsed-".concat(e));switch(t){case"docked":o.length>0&&(o[0].style.display=""),i.length>0&&i[0].classList.remove("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide();break;case"floating":o.length>0&&(o[0].style.display="none"),i.length>0&&i[0].classList.remove("visible"),this._showFloatingToolbar();break;case"collapsed":o.length>0&&(o[0].style.display="none"),i.length>0&&i[0].classList.add("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide()}this._ToolbarMode=t}},{key:"_showFloatingToolbar",value:function(){if(this._FlowView){if(!this._FloatingToolbarView){var t=this.options.FlowViewIdentifier;this._FloatingToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowFloatingToolbar",{FlowViewIdentifier:t,DefaultDestinationAddress:"#Flow-FloatingToolbar-Container-".concat(t),EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette}),this._FloatingToolbarView._ToolbarView=this,this._FloatingToolbarView._FlowView=this._FlowView,this._FloatingToolbarView.render()}this._FloatingToolbarView.show()}}},{key:"_addNodeAtCenter",value:function(t){if(this._FlowView){var e=this._FlowView.viewState,o=this._FlowView._SVGElement,i=o?o.clientWidth:600,n=o?o.clientHeight:400,r=(-e.PanX+i/2)/e.Zoom,a=(-e.PanY+n/2)/e.Zoom,s=this._FlowView.flowData.Nodes.length;r+=s%5*30,a+=s%5*30,this._FlowView.addNode(t,r,a)}}},{key:"_addCardFromPalette",value:function(t){if(this._FlowView){var e=this._FlowView.viewState,o=(200-e.PanX)/e.Zoom,i=(200-e.PanY)/e.Zoom,n=this._FlowView.flowData.Nodes.length;o+=n%5*40,i+=n%5*40,this._FlowView.addNode(t,o,i)}}},{key:"_handleToolbarAction",value:function(t){if(this._FlowView){var e=this.options.FlowViewIdentifier;switch(t){case"add-node":this._openPopup("add-node");break;case"delete-selected":this._FlowView.deleteSelected();break;case"zoom-in":this._FlowView.setZoom(this._FlowView.viewState.Zoom+this._FlowView.options.ZoomStep);break;case"zoom-out":this._FlowView.setZoom(this._FlowView.viewState.Zoom-this._FlowView.options.ZoomStep);break;case"zoom-fit":this._FlowView.zoomToFit();break;case"auto-layout":this._FlowView.autoLayout();break;case"cards-popup":this._openPopup("cards");break;case"layout-popup":this._openPopup("layout");break;case"settings-popup":this._openPopup("settings");break;case"toggle-floating":"floating"===this._ToolbarMode?this._setToolbarMode("docked"):this._setToolbarMode("floating");break;case"collapse-toolbar":this._setToolbarMode("collapsed");break;case"expand-toolbar":this._setToolbarMode("docked");break;case"fullscreen":var o=this._FlowView.toggleFullscreen(),i=this._FlowView._IconProvider,n=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(e));n.length>0&&i&&(n[0].innerHTML=i.getIconSVGMarkup(o?"exit-fullscreen":"fullscreen",14));var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(e));r.length>0&&r[0].setAttribute("title",o?"Exit Fullscreen":"Toggle Fullscreen");break;default:this.log.warn("PictViewFlowToolbar: unknown action '".concat(t,"'"))}}}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],43:[function(t,e,o){var i=t("pict-view"),n=t("../services/PictService-Flow-InteractionManager.js"),r=t("../services/PictService-Flow-ConnectionRenderer.js"),a=t("../services/PictService-Flow-Tether.js"),s=t("../services/PictService-Flow-Layout.js"),l=t("../services/PictService-Flow-PathGenerator.js"),c=t("../services/PictService-Flow-ViewportManager.js"),d=t("../services/PictService-Flow-SelectionManager.js"),p=t("../services/PictService-Flow-PanelManager.js"),h=t("../services/PictService-Flow-DataManager.js"),u=t("../services/PictService-Flow-ConnectionHandleManager.js"),f=t("../services/PictService-Flow-RenderManager.js"),w=t("../services/PictService-Flow-PortRenderer.js"),v=t("../providers/PictProvider-Flow-NodeTypes.js"),g=t("../providers/PictProvider-Flow-EventHandler.js"),y=t("../providers/PictProvider-Flow-Layouts.js"),b=t("../providers/PictProvider-Flow-SVGHelpers.js"),m=t("../providers/PictProvider-Flow-Geometry.js"),_=t("../providers/PictProvider-Flow-PanelChrome.js"),P=t("../providers/PictProvider-Flow-CSS.js"),F=t("../providers/PictProvider-Flow-Icons.js"),S=t("../providers/PictProvider-Flow-ConnectorShapes.js"),V=t("../providers/PictProvider-Flow-Theme.js"),C=t("../providers/PictProvider-Flow-Noise.js"),k=t("./PictView-Flow-Node.js"),T=t("./PictView-Flow-Toolbar.js"),D=t("./PictView-Flow-FloatingToolbar.js"),A=t("./PictView-Flow-PropertiesPanel.js"),H=t("../PictFlowCardPropertiesPanel.js"),x=t("../panels/FlowCardPropertiesPanel-Template.js"),I=t("../panels/FlowCardPropertiesPanel-Markdown.js"),M=t("../panels/FlowCardPropertiesPanel-Form.js"),N=t("../panels/FlowCardPropertiesPanel-View.js"),L={ViewIdentifier:"Pict-Flow",DefaultRenderable:"Flow-Container",DefaultDestinationAddress:"#Flow-Container",AutoRender:!1,FlowDataAddress:!1,TargetElementAddress:"#Flow-SVG-Container",EnableToolbar:!0,EnableAddNode:!0,EnableCardPalette:!0,IncludeDefaultNodeTypes:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0,EnableGridSnap:!1,GridSnapSize:20,MinZoom:.1,MaxZoom:5,ZoomStep:.1,DefaultNodeType:"default",DefaultNodeWidth:180,DefaultNodeHeight:80,CSS:!1,Templates:[{Hash:"Flow-PanelChrome-Template",Template:'<div class="pict-flow-panel" xmlns="http://www.w3.org/1999/xhtml"><div class="pict-flow-panel-titlebar" data-element-type="panel-titlebar" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-title-text">{~D:Record.Title~}</span><span class="pict-flow-panel-close-btn" data-element-type="panel-close" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-close-icon"></span></span></div><div class="pict-flow-panel-content" data-panel-hash="{~D:Record.Hash~}"><div class="pict-flow-panel-tab-pane active" data-tab="properties" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tab-pane" data-tab="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div><div class="pict-flow-panel-tab-pane" data-tab="appearance" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div></div><div class="pict-flow-panel-resize-handle" data-element-type="panel-resize" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tabbar" data-panel-hash="{~D:Record.Hash~}"><div class="pict-flow-panel-tab active" data-tab-target="properties" data-panel-hash="{~D:Record.Hash~}">Properties</div><div class="pict-flow-panel-tab" data-tab-target="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;">Help</div><div class="pict-flow-panel-tab" data-tab-target="appearance" data-panel-hash="{~D:Record.Hash~}">Appearance</div></div></div>'},{Hash:"Flow-Container-Template",Template:'\n<div class="pict-flow-container" id="Flow-Wrapper-{~D:Record.ViewIdentifier~}">\n\t<div id="Flow-Toolbar-{~D:Record.ViewIdentifier~}"></div>\n\t<div id="Flow-FloatingToolbar-Container-{~D:Record.ViewIdentifier~}" style="display:none;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100;"></div>\n\t<div class="pict-flow-svg-container" id="Flow-SVG-Container-{~D:Record.ViewIdentifier~}">\n\t\t<svg class="pict-flow-svg"\n\t\t\tid="Flow-SVG-{~D:Record.ViewIdentifier~}"\n\t\t\txmlns="http://www.w3.org/2000/svg">\n\t\t\t<defs>\n\t\t\t\t<pattern id="flow-grid-{~D:Record.ViewIdentifier~}"\n\t\t\t\t\twidth="20" height="20" patternUnits="userSpaceOnUse">\n\t\t\t\t\t<line x1="20" y1="0" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t\t<line x1="0" y1="20" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t</pattern>\n\t\t\t</defs>\n\t\t\t<rect width="10000" height="10000" x="-5000" y="-5000"\n\t\t\t\tfill="url(#flow-grid-{~D:Record.ViewIdentifier~})"\n\t\t\t\tclass="pict-flow-grid-background" />\n\t\t\t<g class="pict-flow-viewport" id="Flow-Viewport-{~D:Record.ViewIdentifier~}">\n\t\t\t\t<g class="pict-flow-connections-layer" id="Flow-Connections-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-nodes-layer" id="Flow-Nodes-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-tethers-layer" id="Flow-Tethers-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-panels-layer" id="Flow-Panels-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t</g>\n\t\t</svg>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-Container",TemplateHash:"Flow-Container-Template",DestinationAddress:"#Flow-Container",RenderMethod:"replace"}]},E=function(t){function e(t,o,i){var E;_classCallCheck(this,e);var z=Object.assign({},JSON.parse(JSON.stringify(L)),o);return(E=_callSuper(this,e,[t,z,i])).serviceType="PictSectionFlow",E._ServiceRegistry=[{ServiceType:"PictProviderFlowSVGHelpers",Library:b,Property:"_SVGHelperProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowGeometry",Library:m,Property:"_GeometryProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowNoise",Library:C,Property:"_NoiseProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowTheme",Library:V,Property:"_ThemeProvider"},{ServiceType:"PictProviderFlowCSS",Library:P,Property:"_CSSProvider",PostInit:"registerCSS"},{ServiceType:"PictProviderFlowIcons",Library:F,Property:"_IconProvider",PostInit:"registerIconTemplates"},{ServiceType:"PictProviderFlowConnectorShapes",Library:S,Property:"_ConnectorShapesProvider"},{ServiceType:"PictProviderFlowPanelChrome",Library:_,Property:"_PanelChromeProvider"},{ServiceType:"PictProviderFlowNodeTypes",Library:v,Property:"_NodeTypeProvider",ExtraOptions:function(){return{AdditionalNodeTypes:E.options.NodeTypes,IncludeDefaultNodeTypes:E.options.IncludeDefaultNodeTypes}}},{ServiceType:"PictProviderFlowEventHandler",Library:g,Property:"_EventHandlerProvider"},{ServiceType:"PictProviderFlowLayouts",Library:y,Property:"_LayoutProvider",PostInit:"loadPersistedLayouts"},{ServiceType:"PictServiceFlowPathGenerator",Library:l,Property:"_PathGenerator"},{ServiceType:"PictServiceFlowDataManager",Library:h,Property:"_DataManager"},{ServiceType:"PictServiceFlowConnectionHandleManager",Library:u,Property:"_ConnectionHandleManager"},{ServiceType:"PictServiceFlowRenderManager",Library:f,Property:"_RenderManager"},{ServiceType:"PictServiceFlowPortRenderer",Library:w,Property:"_PortRenderer"},{ServiceType:"PictServiceFlowInteractionManager",Library:n,Property:"_InteractionManager"},{ServiceType:"PictServiceFlowConnectionRenderer",Library:r,Property:"_ConnectionRenderer"},{ServiceType:"PictServiceFlowTether",Library:a,Property:"_TetherService"},{ServiceType:"PictServiceFlowLayout",Library:s,Property:"_LayoutService"},{ServiceType:"PictServiceFlowViewportManager",Library:c,Property:"_ViewportManager"},{ServiceType:"PictServiceFlowSelectionManager",Library:d,Property:"_SelectionManager"},{ServiceType:"PictServiceFlowPanelManager",Library:p,Property:"_PanelManager"},{ServiceType:"PictViewFlowNode",Library:k,RegisterOnly:!0},{ServiceType:"PictViewFlowToolbar",Library:T,RegisterOnly:!0},{ServiceType:"PictViewFlowFloatingToolbar",Library:D,RegisterOnly:!0},{ServiceType:"PictViewFlowPropertiesPanel",Library:A,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel",Library:H,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Template",Library:x,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Markdown",Library:I,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Form",Library:M,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-View",Library:N,RegisterOnly:!0}],E._registerServiceTypes(),E._FlowData={Nodes:[],Connections:[],OpenPanels:[],SavedLayouts:[],ViewState:{PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null}},E._SVGElement=null,E._ViewportElement=null,E._NodesLayer=null,E._ConnectionsLayer=null,E._TethersLayer=null,E._PanelsLayer=null,E._DataManager=null,E._ConnectionHandleManager=null,E._RenderManager=null,E._PortRenderer=null,E._InteractionManager=null,E._ConnectionRenderer=null,E._TetherService=null,E._LayoutService=null,E._PathGenerator=null,E._ViewportManager=null,E._SelectionManager=null,E._PanelManager=null,E._CSSProvider=null,E._IconProvider=null,E._ConnectorShapesProvider=null,E._ThemeProvider=null,E._NoiseProvider=null,E._SVGHelperProvider=null,E._GeometryProvider=null,E._PanelChromeProvider=null,E._NodeTypeProvider=null,E._LayoutProvider=null,E._EventHandlerProvider=null,E._NodeView=null,E._ToolbarView=null,E._PropertiesPanelView=null,E.initialRenderComplete=!1,E}return _inherits(e,t),_createClass(e,[{key:"_registerServiceTypes",value:function(){for(var t=0;t<this._ServiceRegistry.length;t++){var e=this._ServiceRegistry[t];this.fable.servicesMap.hasOwnProperty(e.ServiceType)||this.fable.addServiceType(e.ServiceType,e.Library)}}},{key:"_instantiateServices",value:function(){for(var t=0;t<this._ServiceRegistry.length;t++){var e=this._ServiceRegistry[t];if(!e.RegisterOnly&&!this[e.Property]){var o=e.NoFlowView?{}:{FlowView:this};"function"==typeof e.ExtraOptions&&Object.assign(o,e.ExtraOptions()),this[e.Property]=this.fable.instantiateServiceProviderWithoutRegistration(e.ServiceType,o),e.PostInit&&"function"==typeof this[e.Property][e.PostInit]&&this[e.Property][e.PostInit]()}}}},{key:"flowData",get:function(){return this._FlowData}},{key:"viewState",get:function(){return this._FlowData.ViewState}},{key:"_IsFullscreen",get:function(){return!!this._ViewportManager&&this._ViewportManager._IsFullscreen}},{key:"render",value:function(t,o){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"renderAsync",value:function(t,o,i,n,r){return"function"==typeof i||void 0===i?_superPropGet(e,"renderAsync",this,3)([t,o,this.options,n,i||r]):_superPropGet(e,"renderAsync",this,3)([t,o,i,n,r])}},{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this._ThemeProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowTheme",{FlowView:this}),this._NoiseProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowNoise"),this.options.Theme&&this._ThemeProvider.setTheme(this.options.Theme),"number"==typeof this.options.NoiseLevel&&this._ThemeProvider.setNoiseLevel(this.options.NoiseLevel),this._instantiateServices(),_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"onAfterRender",value:function(t,o,i,n){return this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"onAfterInitialRender",value:function(){var t=this.options.ViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-SVG-".concat(t));if(e.length<1)return this.log.error("PictSectionFlow could not find SVG element #Flow-SVG-".concat(t)),!1;this._SVGElement=e[0];var o=this.pict.ContentAssignment.getElement("#Flow-Viewport-".concat(t));o.length>0&&(this._ViewportElement=o[0]);var i=this.pict.ContentAssignment.getElement("#Flow-Nodes-".concat(t));i.length>0&&(this._NodesLayer=i[0]);var n=this.pict.ContentAssignment.getElement("#Flow-Connections-".concat(t));n.length>0&&(this._ConnectionsLayer=n[0]);var r=this.pict.ContentAssignment.getElement("#Flow-Tethers-".concat(t));r.length>0&&(this._TethersLayer=r[0]);var a=this.pict.ContentAssignment.getElement("#Flow-Panels-".concat(t));if(a.length>0&&(this._PanelsLayer=a[0]),this._instantiateServices(),this._ConnectorShapesProvider&&this._SVGElement){var s=this._SVGElement.querySelector("defs");if(s){var l=this._ConnectorShapesProvider.generateMarkerDefs(t),c=document.createElementNS("http://www.w3.org/2000/svg","svg");for(c.innerHTML=l;c.firstChild;)s.appendChild(c.firstChild)}}this.options.EnableToolbar&&(this._ToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowToolbar",Object.assign({},T.default_configuration,{ViewIdentifier:"Flow-Toolbar-".concat(t),DefaultDestinationAddress:"#Flow-Toolbar-".concat(t),FlowViewIdentifier:t,EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette})),this._ToolbarView&&"function"==typeof this._ToolbarView.render&&(this._ToolbarView._FlowView=this,this._ToolbarView.render())),this._NodeView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowNode",Object.assign({},k.default_configuration,{ViewIdentifier:"Flow-NodeRenderer-".concat(t),AutoRender:!1})),this._NodeView._FlowView=this,this._PropertiesPanelView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowPropertiesPanel",Object.assign({},A.default_configuration,{ViewIdentifier:"Flow-PropertiesPanel-".concat(t),AutoRender:!1})),this._PropertiesPanelView._FlowView=this,this._InteractionManager.initialize(this._SVGElement,this._ViewportElement),this.options.FlowDataAddress&&this.marshalToView(),this.renderFlow()}},{key:"marshalToView",value:function(){return this._DataManager.marshalToView()}},{key:"marshalFromView",value:function(){return this._DataManager.marshalFromView()}},{key:"getFlowData",value:function(){return this._DataManager.getFlowData()}},{key:"setFlowData",value:function(t){return this._DataManager.setFlowData(t)}},{key:"addNode",value:function(t,e,o,i,n){return this._DataManager.addNode(t,e,o,i,n)}},{key:"removeNode",value:function(t){return this._DataManager.removeNode(t)}},{key:"addConnection",value:function(t,e,o,i,n){return this._DataManager.addConnection(t,e,o,i,n)}},{key:"removeConnection",value:function(t){return this._DataManager.removeConnection(t)}},{key:"selectNode",value:function(t){return this._SelectionManager.selectNode(t)}},{key:"selectConnection",value:function(t){return this._SelectionManager.selectConnection(t)}},{key:"deselectAll",value:function(){return this._SelectionManager.deselectAll()}},{key:"deleteSelected",value:function(){return this._SelectionManager.deleteSelected()}},{key:"updateViewportTransform",value:function(){return this._ViewportManager.updateViewportTransform()}},{key:"setZoom",value:function(t,e,o){return this._ViewportManager.setZoom(t,e,o)}},{key:"zoomToFit",value:function(){return this._ViewportManager.zoomToFit()}},{key:"autoLayout",value:function(){this._LayoutService&&(this._LayoutService.autoLayout(this._FlowData.Nodes,this._FlowData.Connections),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData))}},{key:"toggleFullscreen",value:function(){return this._ViewportManager.toggleFullscreen()}},{key:"exitFullscreen",value:function(){return this._ViewportManager.exitFullscreen()}},{key:"setTheme",value:function(t){this._ThemeProvider?this._ThemeProvider.setTheme(t)&&(this._CSSProvider&&this._CSSProvider.registerCSS(),this._reinjectMarkerDefs(),this.initialRenderComplete&&this.renderFlow(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onThemeChanged",t)):this.log.warn("PictSectionFlow setTheme: ThemeProvider not available")}},{key:"setNoiseLevel",value:function(t){this._ThemeProvider?(this._ThemeProvider.setNoiseLevel(t),this.initialRenderComplete&&this.renderFlow()):this.log.warn("PictSectionFlow setNoiseLevel: ThemeProvider not available")}},{key:"getNoiseLevel",value:function(){return this._ThemeProvider?this._ThemeProvider.getNoiseLevel():0}},{key:"getThemeKey",value:function(){return this._ThemeProvider?this._ThemeProvider.getActiveThemeKey():"default"}},{key:"_reinjectMarkerDefs",value:function(){return this._RenderManager.reinjectMarkerDefs()}},{key:"getNode",value:function(t){return this._FlowData.Nodes.find(function(e){return e.Hash===t})||null}},{key:"getConnection",value:function(t){return this._FlowData.Connections.find(function(e){return e.Hash===t})||null}},{key:"selectTether",value:function(t){return this._SelectionManager.selectTether(t)}},{key:"updateConnectionHandle",value:function(t,e,o,i){return this._ConnectionHandleManager.updateConnectionHandle(t,e,o,i)}},{key:"addConnectionHandle",value:function(t,e,o){return this._ConnectionHandleManager.addConnectionHandle(t,e,o)}},{key:"removeConnectionHandle",value:function(t,e){return this._ConnectionHandleManager.removeConnectionHandle(t,e)}},{key:"_resetHandlesForNode",value:function(t){return this._ConnectionHandleManager.resetHandlesForNode(t)}},{key:"_resetHandlesForPanel",value:function(t){return this._ConnectionHandleManager.resetHandlesForPanel(t)}},{key:"addTetherHandle",value:function(t,e,o){var i=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i&&this._TetherService){var n=this.getNode(i.NodeHash);if(n){var r=this._TetherService.getSmartAnchors(i,n);this._TetherService.addHandle(i,e,o,r.panelAnchor,r.nodeAnchor),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData)}}}},{key:"removeTetherHandle",value:function(t,e){var o=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});o&&this._TetherService&&(this._TetherService.removeHandle(o,e),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData))}},{key:"updateTetherHandle",value:function(t,e,o,i){var n=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});n&&(this._TetherService&&this._TetherService.updateHandlePosition(n,e,o,i),this._renderSingleTether(t))}},{key:"getPortPosition",value:function(t,e){var o=this.getNode(t);if(!o)return null;var i=o.Ports.find(function(t){return t.Hash===e});if(!i)return null;var n=o.Ports.filter(function(t){return t.Side===i.Side}),r=n.indexOf(i),a=n.length,s=this._NodeView&&this._NodeView.options.NodeTitleBarHeight||28,l=o.Height||80;if(this._GeometryProvider&&o.Ports&&o.Ports.length>0){var c=this._GeometryProvider.computeMinimumNodeHeight(o.Ports,s);c>l&&(l=c)}var d=this._GeometryProvider.buildPortCountsBySide(o.Ports),p=this._GeometryProvider.getPortLocalPosition(i.Side,r,a,o.Width,l,s,d);return{x:o.X+p.x,y:o.Y+p.y,side:i.Side||"right"}}},{key:"screenToSVGCoords",value:function(t,e){return this._ViewportManager.screenToSVGCoords(t,e)}},{key:"renderFlow",value:function(){return this._RenderManager.renderFlow()}},{key:"_renderSingleConnection",value:function(t){return this._RenderManager.renderSingleConnection(t)}},{key:"_renderSingleTether",value:function(t){return this._RenderManager.renderSingleTether(t)}},{key:"updateNodePosition",value:function(t,e,o){return this._RenderManager.updateNodePosition(t,e,o)}},{key:"_renderConnectionsForNode",value:function(t){return this._RenderManager.renderConnectionsForNode(t)}},{key:"_renderTethersForNode",value:function(t){return this._RenderManager.renderTethersForNode(t)}},{key:"openPanel",value:function(t){return this._PanelManager.openPanel(t)}},{key:"closePanel",value:function(t){return this._PanelManager.closePanel(t)}},{key:"closePanelForNode",value:function(t){return this._PanelManager.closePanelForNode(t)}},{key:"togglePanel",value:function(t){return this._PanelManager.togglePanel(t)}},{key:"updatePanelPosition",value:function(t,e,o){return this._PanelManager.updatePanelPosition(t,e,o)}}])}(i);e.exports=E,e.exports.default_configuration=L},{"../PictFlowCardPropertiesPanel.js":11,"../panels/FlowCardPropertiesPanel-Form.js":12,"../panels/FlowCardPropertiesPanel-Markdown.js":13,"../panels/FlowCardPropertiesPanel-Template.js":14,"../panels/FlowCardPropertiesPanel-View.js":15,"../providers/PictProvider-Flow-CSS.js":16,"../providers/PictProvider-Flow-ConnectorShapes.js":17,"../providers/PictProvider-Flow-EventHandler.js":18,"../providers/PictProvider-Flow-Geometry.js":19,"../providers/PictProvider-Flow-Icons.js":20,"../providers/PictProvider-Flow-Layouts.js":21,"../providers/PictProvider-Flow-NodeTypes.js":22,"../providers/PictProvider-Flow-Noise.js":23,"../providers/PictProvider-Flow-PanelChrome.js":24,"../providers/PictProvider-Flow-SVGHelpers.js":25,"../providers/PictProvider-Flow-Theme.js":26,"../services/PictService-Flow-ConnectionHandleManager.js":27,"../services/PictService-Flow-ConnectionRenderer.js":28,"../services/PictService-Flow-DataManager.js":29,"../services/PictService-Flow-InteractionManager.js":30,"../services/PictService-Flow-Layout.js":31,"../services/PictService-Flow-PanelManager.js":32,"../services/PictService-Flow-PathGenerator.js":33,"../services/PictService-Flow-PortRenderer.js":34,"../services/PictService-Flow-RenderManager.js":35,"../services/PictService-Flow-SelectionManager.js":36,"../services/PictService-Flow-Tether.js":37,"../services/PictService-Flow-ViewportManager.js":38,"./PictView-Flow-FloatingToolbar.js":39,"./PictView-Flow-Node.js":40,"./PictView-Flow-PropertiesPanel.js":41,"./PictView-Flow-Toolbar.js":42,"pict-view":45}],44:[function(t,e,o){e.exports={name:"pict-view",version:"1.0.67",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.63","fable-serviceproviderbase":"^3.0.19"}}},{}],45:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),o),i])).fable,a.options,a.UUID,a.Hash,a.log;var s=a.Hash===a.UUID;a.UUID="V-".concat(a.UUID),s&&(a.Hash=a.UUID),a.options.ViewIdentifier||(a.options.ViewIdentifier="AutoViewID-".concat(a.fable.getUUID())),a.serviceType="PictView",a._Package=n,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1,a.lastRenderedTimestamp=!1,a.lastMarshalFromViewTimestamp=!1,a.lastMarshalToViewTimestamp=!1,a.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(var l=0;l<a.options.Templates.length;l++){var c=a.options.Templates[l];"Hash"in c&&"Template"in c?(c.Source||(c.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addTemplate(c.Hash,c.Template,c.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Template ").concat(l," in the options array."),c)}for(var d=0;d<a.options.DefaultTemplates.length;d++){var p=a.options.DefaultTemplates[d];"Postfix"in p&&"Template"in p?(p.Source||(p.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(p.Prefix,p.Postfix,p.Template,p.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Default Template ").concat(d," in the options array."),p)}if(a.options.CSS){var h=a.options.CSSHash?a.options.CSSHash:"View-".concat(a.options.ViewIdentifier),u=a.options.CSSProvider?a.options.CSSProvider:h;a.pict.CSSMap.addCSS(h,a.options.CSS,u,a.options.CSSPriority)}a.renderables={};for(var f=0;f<a.options.Renderables.length;f++){var w=a.options.Renderables[f];a.addRenderable(w)}return a}return _inherits(e,t),_createClass(e,[{key:"addRenderable",value:function(t,e,o,i,n){var r;"object"==_typeof(t)?r=t:r={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:o,ContentDestinationAddress:i,RenderMethod:"string"!=typeof n?n:"replace"};"string"!=typeof r.RenderableHash||"string"!=typeof r.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),r):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(r.RenderableHash,"] pointed to template ").concat(r.TemplateHash,".")),this.renderables[r.RenderableHash]=r)}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return o&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization failed: ").concat(o.message||o),{stack:o.stack}),e.initializeTimestamp=e.pict.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.info("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onBeforeRender",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t,e){return this.onBeforeRender(e),t()}},{key:"onBeforeProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}},{key:"onBeforeProjectAsync",value:function(t,e){return this.onBeforeProject(e),t()}},{key:"buildRenderOptions",value:function(t,e,o){var i={Valid:!0};return i.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,i.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(i.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),i.Valid=!1),i.Renderable=this.renderables[i.RenderableHash],i.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not exist.")),i.Valid=!1),i.DestinationAddress="string"==typeof e?e:"string"==typeof i.Renderable.ContentDestinationAddress?i.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,i.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),i.Valid=!1),"object"===_typeof(o)?(i.RecordAddress="Passed in as object",i.Record=o):(i.RecordAddress="string"==typeof o?o:"string"==typeof i.Renderable.DefaultTemplateRecordAddress?i.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,i.Record="string"==typeof i.RecordAddress?this.pict.DataProvider.getDataByAddress(i.RecordAddress):void 0),i}},{key:"assignRenderContent",value:function(t,e,o){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,o,t.TestAddress)}},{key:"render",value:function(t,e,o,i){return this.renderWithScope(this,t,e,o,i)}},{key:"renderWithScope",value:function(t,e,o,i,n){var r,a,s,l="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return l?("__Virtual"==l?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&n.TransactionHash,RootRenderableViewHash:n&&n.RootRenderableViewHash}:(r=Object.assign({},this.renderables[l])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),r?r.ContentDestinationAddress?("object"===_typeof(i)?(s=i,a="Passed in as object"):s="string"==typeof(a="string"==typeof i?i:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress)?this.pict.DataProvider.getDataByAddress(a):void 0,this.onBeforeRender(r),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(l,"] to Destination [").concat(r.ContentDestinationAddress,"]...")),r.Content=this.pict.parseTemplateByHash(r.TemplateHash,s,null,[this],t,{RootRenderable:"object"===_typeof(n)?n:r}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(l,"] content length ").concat(r.Content.length," to Destination [").concat(r.ContentDestinationAddress,"] using render method [").concat(r.RenderMethod,"].")),this.onBeforeProject(r),this.onProject(r),"virtual-assignment"!==r.RenderMethod&&(this.onAfterProject(r),this.onAfterRender(r)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it is not a valid renderable.")),!1)}},{key:"renderAsync",value:function(t,e,o,i,n){return this.renderWithScopeAsync(this,t,e,o,i,n)}},{key:"renderWithScopeAsync",value:function(t,e,o,i,n,r){var a,s,l,c=this,d="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,p="function"==typeof r?r:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof n?n:null;if(p||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),p=function(t){t&&c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!d)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==d?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&"function"!=typeof n&&n.TransactionHash,RootRenderableViewHash:n&&"function"!=typeof n&&n.RootRenderableViewHash}:(a=Object.assign({},this.renderables[d])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(d,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not have a valid destination address.")),p(new Error("Could not render ".concat(d)));"object"===_typeof(i)?(l=i,s="Passed in as object"):(s="string"==typeof i?i:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,l="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(d,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));var h=this.fable.newAnticipate();h.anticipate(function(t){c.onBeforeRenderAsync(t,a)}),h.anticipate(function(o){c.pict.parseTemplateByHash(a.TemplateHash,l,function(t,i){return t?(c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.ViewIdentifier," could not render (asynchronously) ").concat(d," (param ").concat(e,") because it did not parse the template."),t),o(t)):(a.Content=i,o())},[c],t,{RootRenderable:"object"===_typeof(n)?n:a})}),h.anticipate(function(t){c.onBeforeProjectAsync(t,a)}),h.anticipate(function(t){c.onProjectAsync(t,a)}),"virtual-assignment"!==a.RenderMethod&&(h.anticipate(function(t){c.onAfterProjectAsync(t,a)}),h.anticipate(function(t){c.onAfterRenderAsync(t,a)})),h.wait(p)}},{key:"renderDefaultAsync",value:function(t){this.renderAsync(t)}},{key:"basicRender",value:function(t,e,o){return this.basicRenderWithScope(this,t,e,o)}},{key:"basicRenderWithScope",value:function(t,e,o,i){var n=this.buildRenderOptions(e,o,i);return n.Valid?(this.assignRenderContent(n.Renderable,n.DestinationAddress,this.pict.parseTemplateByHash(n.Renderable.TemplateHash,n.Record,null,[this],t,{RootRenderable:n.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(n.RenderableHash," because it is not valid.")),!1)}},{key:"basicRenderAsync",value:function(t,e,o,i){return this.basicRenderWithScopeAsync(this,t,e,o,i)}},{key:"basicRenderWithScopeAsync",value:function(t,e,o,i,n){var r=this,a="function"==typeof n?n:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:null;a||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),a=function(t){t&&r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});var s=this.buildRenderOptions(e,o,i);if(!s.Valid){var l="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(s.RenderableHash," because it is not valid.");return this.log.error(l),a(new Error(l))}this.pict.parseTemplateByHash(s.Renderable.TemplateHash,s.Record,function(t,e){return t?(r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.ViewIdentifier," could not render (asynchronously) ").concat(s.RenderableHash," because it did not parse the template."),t),a(t)):(r.assignRenderContent(s.Renderable,s.DestinationAddress,e),a())},[this],t,{RootRenderable:s.Renderable})}},{key:"onProject",value:function(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}},{key:"onProjectAsync",value:function(t,e){return this.onProject(e),t()}},{key:"onAfterRender",value:function(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){var e,o=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[]);try{for(o.s();!(e=o.n()).done;){var i=e.value,n=this.pict.views[i.Data.ViewHash];n?(n.onAfterProject(),n.onAfterRender(i.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}catch(t){o.e(t)}finally{o.f()}}return!0}},{key:"onAfterRenderAsync",value:function(t,e){var o=this;this.onAfterRender(e);var i=this.fable.newAnticipate();if(e&&e.RootRenderableViewHash===this.Hash){var n,r=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[]);try{var a=function(){var t=n.value,r=o.pict.views[t.Data.ViewHash];if(!r)return o.log.error("PictView [".concat(o.UUID,"]::[").concat(o.Hash,"] ").concat(o.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(t.Data.ViewHash,".")),1;i.anticipate(r.onAfterProjectAsync.bind(r)),i.anticipate(function(e){r.onAfterRenderAsync(e,t.Data.Renderable)})};for(r.s();!(n=r.n()).done;)a()}catch(t){r.e(t)}finally{r.f()}}return i.wait(t)}},{key:"onAfterProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}},{key:"onAfterProjectAsync",value:function(t,e){return t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeSolveAsync.bind(this)),o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," solveAsync() complete.")),e.lastSolvedTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}},{key:"onBeforeMarshalFromViewAsync",value:function(t){return this.onBeforeMarshalFromView(),t()}},{key:"onMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}},{key:"onMarshalFromViewAsync",value:function(t){return this.onMarshalFromView(),t()}},{key:"marshalFromView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalFromViewAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),o.anticipate(this.onMarshalFromViewAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalFromViewAsync() complete.")),e.lastMarshalFromViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}},{key:"onAfterMarshalFromViewAsync",value:function(t){return this.onAfterMarshalFromView(),t()}},{key:"onBeforeMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}},{key:"onBeforeMarshalToViewAsync",value:function(t){return this.onBeforeMarshalToView(),t()}},{key:"onMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}},{key:"onMarshalToViewAsync",value:function(t){return this.onMarshalToView(),t()}},{key:"marshalToView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalToViewAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),o.anticipate(this.onMarshalToViewAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalToViewAsync() complete.")),e.lastMarshalToViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}},{key:"onAfterMarshalToViewAsync",value:function(t){return this.onAfterMarshalToView(),t()}},{key:"isPictView",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":44,"fable-serviceproviderbase":4}],46:[function(t,e,o){var i={"@":{DataType:"AutoIdentity",Label:"Auto ID",HasSize:!1},"%":{DataType:"GUID",Label:"GUID",HasSize:!1},$:{DataType:"String",Label:"String",HasSize:!0},"*":{DataType:"Text",Label:"Text",HasSize:!1},"#":{DataType:"Numeric",Label:"Numeric",HasSize:!1},".":{DataType:"Decimal",Label:"Decimal",HasSize:!0},"&":{DataType:"DateTime",Label:"Date/Time",HasSize:!1},"^":{DataType:"Boolean",Label:"Boolean",HasSize:!1}},n={};for(var r in i)n[i[r].DataType]=r;e.exports={MICRODDL_TYPE_MAP:i,DATATYPE_TO_SYMBOL:n,columnsToMicroDDL:function(t,e){for(var o=["!"+(e||"Untitled").replace(/[^a-zA-Z0-9_]/g,"")],r=0;r<t.length;r++){var a=t[r],s=n[a.DataType]||"$",l=s+(a.Name||"Column"+r);i[s].HasSize&&a.Size&&(l+=" "+a.Size),o.push(l)}return o.join("\n")},microDDLToColumns:function(t){for(var e=t.split("\n"),o=[],n=0;n<e.length;n++){var r=e[n].trim();if(!(!r||r.startsWith("!")||r.startsWith("//")||r.startsWith("--")||r.startsWith("->"))){var a=r.charAt(0);if(i.hasOwnProperty(a)){var s=r.substring(1).trim().split(/\s+/);o.push({Name:s[0]||"",DataType:i[a].DataType,Size:s[1]||""})}}}return o}}},{}],47:[function(t,e,o){var i=t("pict-view"),n=t("./MappingEditor-SchemaUtils.js"),r=function(e){function o(t,e,i){var n;return _classCallCheck(this,o),(n=_callSuper(this,o,[t,e,i]))._EditingContextID=0,n._EditingName="",n._CurrentMappings=[],n._SelectedMappingID=0,n._DiscoveredFields={},n._FlowView=null,n._MapEditorMode="flow",n._MappingSources=[],n._MappingStores=[],n._CurrentTargetSchema=null,n}return _inherits(o,e),_createClass(o,[{key:"_doLoadMappings",value:function(t){return Promise.resolve({Mappings:[]})}},{key:"_doLoadSources",value:function(){return Promise.resolve([])}},{key:"_doLoadStores",value:function(t){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(t){return Promise.resolve({SchemaDefinition:""})}},{key:"_doLoadMapping",value:function(t){return Promise.resolve({Mapping:null})}},{key:"_doDeleteMapping",value:function(t){return Promise.resolve({})}},{key:"_doDiscoverSourceFields",value:function(t,e,o){return Promise.resolve({Headers:[],SampleSize:0})}},{key:"_doCreateMapping",value:function(t,e){return Promise.resolve({Mapping:{}})}},{key:"_doUpdateMapping",value:function(t,e){return Promise.resolve({Mapping:{}})}},{key:"_onClose",value:function(){}},{key:"_doToast",value:function(t,e){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];o&&"function"==typeof o.toast?o.toast(t,e):this.log.info("[MeadowMappingEditor] "+t)}},{key:"_doConfirm",value:function(t,e){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];return o&&"function"==typeof o.confirm?o.confirm(t,e):Promise.resolve("undefined"!=typeof window&&window.confirm(t))}},{key:"editMappings",value:function(t,e){var o=this;this._EditingContextID=t,this._EditingName=e||"",this.render();var i=document.getElementById("MeadowMap-Editor"),n=document.getElementById("MeadowMap-Title");i&&(i.classList.add("active"),i.scrollIntoView({behavior:"smooth",block:"nearest"})),n&&(n.textContent="Mappings: "+(e||"Untitled"));var r=document.getElementById("MeadowMap-List-Wrap"),a=document.getElementById("MeadowMap-Detail");r&&(r.style.display=""),a&&(a.style.display="none"),Promise.all([this._doLoadMappings(t),this._doLoadSources(),this._doLoadStores(t),this._doLoadTargetSchema(t)]).then(function(t){o._CurrentMappings=t[0]&&t[0].Mappings?t[0].Mappings:[],o._MappingSources=Array.isArray(t[1])?t[1]:[],o._MappingStores=t[2]&&t[2].Stores?t[2].Stores:[];for(var e=0;e<o._MappingSources.length;e++){var i=o._MappingSources[e];Array.isArray(i.Columns)&&i.Columns.length>0&&(o._DiscoveredFields[i.IDSource]=i.Columns)}var n=t[3];n&&n.SchemaDefinition&&(o._CurrentTargetSchema=n.SchemaDefinition),o.refreshMappingList()})}},{key:"closeMappingEditor",value:function(){this._FlowView&&(this._FlowView=null),this._SelectedMappingID=0,this._onClose()}},{key:"refreshMappingList",value:function(){var t=document.getElementById("MeadowMap-List");if(t)if(0!==this._CurrentMappings.length){var e=this.options.ViewIdentifier,o='<table class="meadow-mapping-list-table"><thead><tr>';o+="<th>ID</th><th>Name</th><th>Source</th><th>Active</th><th>Actions</th>",o+="</tr></thead><tbody>";for(var i=0;i<this._CurrentMappings.length;i++){for(var n=this._CurrentMappings[i],r="—",a=0;a<this._MappingSources.length;a++)if(this._MappingSources[a].IDSource===n.IDSource){r=this._MappingSources[a].Name||"Source "+n.IDSource;break}o+="<tr>",o+="<td>"+n.IDProjectionMapping+"</td>",o+="<td><strong>"+(n.Name||"—")+"</strong></td>",o+="<td>"+r+"</td>",o+="<td>"+(n.Active?"✓":"✗")+"</td>",o+="<td>",o+='<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="window._Pict.views[\''+e+"'].openMappingDetail("+n.IDProjectionMapping+')">Edit</button> ',o+='<button class="meadow-mapping-btn meadow-mapping-btn-danger meadow-mapping-btn-small" onclick="window._Pict.views[\''+e+"'].deleteMapping("+n.IDProjectionMapping+')">Delete</button>',o+="</td>",o+="</tr>"}o+="</tbody></table>",t.innerHTML=o}else t.innerHTML='<div style="text-align:center; padding:1.5em; color:var(--facto-text-tertiary, #a09070);">No mappings yet. Create one to map source fields to target columns.</div>'}},{key:"newMapping",value:function(){var t=this;this._SelectedMappingID=0;var e=document.getElementById("MeadowMap-List-Wrap"),o=document.getElementById("MeadowMap-Detail");e&&(e.style.display="none"),o&&(o.style.display="");var i=document.getElementById("MeadowMap-Name");i&&(i.value="");var n=this._MappingSources.length>0?this._MappingSources[0].IDSource:void 0;this._populateSourceDropdown(n),this._populateStoreChecklist();var r=document.getElementById("MeadowMap-JSON");if(r){var a=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),s="GUID"+a,l="ID"+a,c={};c[s]="{~D:Record.IDRecord~}",c[l]="{~D:Record.IDRecord~}",r.value=JSON.stringify({Entity:a,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:s,Mappings:c,Solvers:[],ManyfestAddresses:!1},null,"\t")}var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),this._FlowView=null,this.switchMapMode("flow"),this.initFlowView(),this._doLoadTargetSchema(this._EditingContextID).then(function(e){e&&e.SchemaDefinition&&(t._CurrentTargetSchema=e.SchemaDefinition),t._rebuildFlowNodes()})}},{key:"openMappingDetail",value:function(t){var e=this;this._SelectedMappingID=t,this._doLoadMapping(t).then(function(t){if(t&&t.Mapping){var o=t.Mapping,i=document.getElementById("MeadowMap-List-Wrap"),n=document.getElementById("MeadowMap-Detail");i&&(i.style.display="none"),n&&(n.style.display="");var r=document.getElementById("MeadowMap-Name");r&&(r.value=o.Name||""),e._populateSourceDropdown(o.IDSource);var a=null;try{var s=JSON.parse(o.MappingConfiguration||"{}");Array.isArray(s.TargetStores)&&s.TargetStores.length>0&&(a=s.TargetStores)}catch(t){}!a&&o.IDProjectionStore&&(a=[o.IDProjectionStore]),e._populateStoreChecklist(a);var l={};try{l=JSON.parse(o.MappingConfiguration||"{}")}catch(t){}Array.isArray(l.sourceColumns)&&l.sourceColumns.length>0&&(e._DiscoveredFields[o.IDSource]=l.sourceColumns);var c=document.getElementById("MeadowMap-JSON");c&&(c.value=JSON.stringify(l,null,"\t"));var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),e._FlowView=null,e.switchMapMode("flow"),e.initFlowView(),e._doLoadTargetSchema(e._EditingContextID).then(function(t){if(t&&t.SchemaDefinition&&(e._CurrentTargetSchema=t.SchemaDefinition),e._FlowView){var i=null;try{i=JSON.parse(o.FlowDiagramState||"null")}catch(t){}i&&i.Nodes&&i.Nodes.length>0&&"function"==typeof e._FlowView.setFlowData&&e._FlowView.setFlowData(i)}e._rebuildFlowNodes()})}else e._doToast("Mapping not found.","error")})}},{key:"deleteMapping",value:(i=_asyncToGenerator(_regenerator().m(function t(e){var o=this;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._doConfirm("Delete this mapping?",{title:"Delete Mapping",confirmLabel:"Delete",dangerous:!0});case 1:if(t.v){t.n=2;break}return t.a(2);case 2:this._doDeleteMapping(e).then(function(){o._doLoadMappings(o._EditingContextID).then(function(t){o._CurrentMappings=t&&t.Mappings?t.Mappings:[],o.refreshMappingList()})});case 3:return t.a(2)}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"switchMapMode",value:function(t){this._MapEditorMode=t;var e=document.getElementById("MeadowMap-Flow-Wrap"),o=document.getElementById("MeadowMap-JSON-Wrap"),i=document.getElementById("MeadowMap-Mode-Flow"),n=document.getElementById("MeadowMap-Mode-JSON");if("flow"===t)e&&(e.style.display=""),o&&(o.style.display="none"),i&&i.classList.add("active"),n&&n.classList.remove("active");else if(e&&(e.style.display="none"),o&&(o.style.display=""),i&&i.classList.remove("active"),n&&n.classList.add("active"),this._FlowView&&"function"==typeof this._FlowView.getFlowData){var r=this.flowToMappingConfig(),a=document.getElementById("MeadowMap-JSON");a&&(a.value=JSON.stringify(r,null,"\t"))}}},{key:"_populateSourceDropdown",value:function(t){var e=document.getElementById("MeadowMap-Source");if(e){for(var o='<option value="0">Select a source...</option>',i=0;i<this._MappingSources.length;i++){var n=this._MappingSources[i],r=n.IDSource===t?" selected":"";o+='<option value="'+n.IDSource+'"'+r+">"+(n.Name||"Source "+n.IDSource)+"</option>"}e.innerHTML=o}}},{key:"_populateStoreChecklist",value:function(t){var e=document.getElementById("MeadowMap-Stores");if(e){var o={};if(Array.isArray(t))for(var i=0;i<t.length;i++)o[t[i]]=!0;else t&&(o[t]=!0);if(0!==this._MappingStores.length){for(var n="",r=0;r<this._MappingStores.length;r++){var a=this._MappingStores[r],s=o[a.IDProjectionStore]?" checked":"",l=(a.TargetTableName||"Store "+a.IDProjectionStore)+" ("+(a.Status||"Unknown")+")";n+="<label>",n+='<input type="checkbox" value="'+a.IDProjectionStore+'"'+s+">",n+=" "+l,n+="</label>"}e.innerHTML=n}else e.innerHTML='<div style="font-size:0.82em; color:var(--facto-text-tertiary, #a09070);">No stores configured yet.</div>'}}},{key:"_getCheckedStoreIDs",value:function(){var t=document.getElementById("MeadowMap-Stores");if(!t)return[];for(var e=t.querySelectorAll('input[type="checkbox"]:checked'),o=[],i=0;i<e.length;i++)o.push(parseInt(e[i].value,10));return o}},{key:"discoverSourceFields",value:function(){var t=this,e=document.getElementById("MeadowMap-Source"),o=e?parseInt(e.value,10):0;o?this._doDiscoverSourceFields(this._EditingContextID,o,50).then(function(e){if(e&&e.Error)t._doToast("Error: "+e.Error,{type:"error"});else{var i=e&&e.Headers?e.Headers:[];t._DiscoveredFields[o]=i,t._doToast("Discovered "+i.length+" fields from "+(e.SampleSize||0)+" records: "+i.join(", "),{type:"success",duration:6e3}),t._rebuildFlowNodes()}}):this._doToast("Select a source first.",{type:"warning"})}},{key:"_rebuildFlowNodes",value:function(){var t=document.getElementById("MeadowMap-Source"),e=t?parseInt(t.value,10):0,o=this._DiscoveredFields[e]||[],i=this._getSchemaColumns();if(this.initFlowView(),this._FlowView){for(var n="Source: "+(t&&t.selectedIndex>=0?t.options[t.selectedIndex].text:"Source"),r="Target: "+(this._EditingName||"Target"),a=[{Hash:"src-whole-record",Direction:"output",Side:"right",Label:"Whole Record"}],s=0;s<o.length;s++)a.push({Hash:"src-field-"+o[s].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"output",Side:"right",Label:o[s]});for(var l=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),c="GUID"+l,d="ID"+l,p=[{Hash:"tgt-col-"+c,Direction:"input",Side:"left",Label:c},{Hash:"tgt-col-"+d,Direction:"input",Side:"left",Label:d}],h=0;h<i.length;h++)i[h]!==c&&i[h]!==d&&p.push({Hash:"tgt-col-"+i[h].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"input",Side:"left",Label:i[h]});for(var u=this._FlowView.getFlowData(),f=null,w=null,v=0;v<u.Nodes.length;v++)"SRC"===u.Nodes[v].Type&&(f=u.Nodes[v]),"TGT"===u.Nodes[v].Type&&(w=u.Nodes[v]);if(f){for(var g=a.slice(),y={},b=0;b<g.length;b++)y[g[b].Hash]=!0;for(var m=f.Ports||[],_=0;_<m.length;_++)y[m[_].Hash]||g.push(m[_]);for(var P=this._FlowView._FlowData.Nodes,F=0;F<P.length;F++)if(P[F].Hash===f.Hash){P[F].Ports=g,P[F].Title=n;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-src-"+this.fable.getUUID(),Type:"SRC",X:50,Y:50,Width:200,Height:100,Title:n,Ports:a,Data:{}});if(w){for(var S=p.slice(),V={},C=0;C<S.length;C++)V[S[C].Hash]=!0;for(var k=w.Ports||[],T=0;T<k.length;T++)V[k[T].Hash]||S.push(k[T]);for(var D=this._FlowView._FlowData.Nodes,A=0;A<D.length;A++)if(D[A].Hash===w.Hash){D[A].Ports=S,D[A].Title=r;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-tgt-"+this.fable.getUUID(),Type:"TGT",X:550,Y:50,Width:200,Height:100,Title:r,Ports:p,Data:{}});"function"==typeof this._FlowView.renderFlow?this._FlowView.renderFlow():"function"==typeof this._FlowView.render&&this._FlowView.render()}}},{key:"_getSchemaColumns",value:function(){var t=[],e=this._CurrentTargetSchema||"";if(e)for(var o=n.microDDLToColumns(e),i=0;i<o.length;i++)t.push(o[i].Name);return t}},{key:"initFlowView",value:function(){if(!this._FlowView){var e=document.getElementById("MeadowMap-Flow-Container");if(e)try{var o=t("pict-section-flow");this._FlowView=this.pict.addView("MeadowMapping-Flow",{ViewIdentifier:"MeadowMapping-Flow",DefaultDestinationAddress:"#MeadowMap-Flow-Container",EnableToolbar:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0},o);var i=t("./flow-cards/FlowCard-MappingSource.js"),n=t("./flow-cards/FlowCard-MappingTarget.js"),r=t("./flow-cards/FlowCard-TemplateExpression.js"),a=t("./flow-cards/FlowCard-SolverExpression.js");this.pict.addServiceType("FlowCardMappingSource",i),this.pict.addServiceType("FlowCardMappingTarget",n),this.pict.addServiceType("FlowCardTemplateExpression",r),this.pict.addServiceType("FlowCardSolverExpression",a),"function"==typeof this._FlowView.render&&this._FlowView.render();var s=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingSource",{}),l=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingTarget",{}),c=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardTemplateExpression",{}),d=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardSolverExpression",{});s.registerWithFlowView(this._FlowView),l.registerWithFlowView(this._FlowView),c.registerWithFlowView(this._FlowView),d.registerWithFlowView(this._FlowView)}catch(t){this.log.error("Failed to initialize flow view: "+t.message),e.innerHTML='<div style="padding:2em; text-align:center; color:var(--facto-text-tertiary, #a09070);">Flow editor could not be loaded. Use JSON Config mode instead.</div>'}}}},{key:"flowToMappingConfig",value:function(){var t=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),e="GUID"+t,o="ID"+t,i={Entity:t,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:e,Mappings:{},Solvers:[],ManyfestAddresses:!1};if(!this._FlowView||"function"!=typeof this._FlowView.getFlowData)return i;var n=this._FlowView.getFlowData();if(!n||!n.Connections)return i;var r={},a={};if(n.Nodes)for(var s=0;s<n.Nodes.length;s++){var l=n.Nodes[s];if(r[l.Hash]=l,l.Ports)for(var c=0;c<l.Ports.length;c++)a[l.Ports[c].Hash]={Label:l.Ports[c].Label,NodeHash:l.Hash,NodeType:l.Type}}for(var d={},p=0;p<n.Connections.length;p++){var h=n.Connections[p],u=a[h.SourcePortHash],f=a[h.TargetPortHash];if(u&&f&&"TGT"===f.NodeType){var w=f.Label;if(w){var v=r[u.NodeHash];if(v)if("SRC"===v.Type){var g=u.Label;if("Whole Record"===g)continue;var y=h.Data&&h.Data.Template?h.Data.Template:"{~D:Record."+g+"~}";w===e&&(i.GUIDTemplate=y),i.Mappings[w]=y}else if("TPL"===v.Type){var b=v.Data&&v.Data.TemplateExpression?v.Data.TemplateExpression:"";b&&(w===e&&(i.GUIDTemplate=b),i.Mappings[w]=b)}else if("SOL"===v.Type){var m=v.Data&&v.Data.SolverExpression?v.Data.SolverExpression:"";m&&(d[v.Hash]||(d[v.Hash]={expression:m,outputs:{}}),d[v.Hash].outputs[w]=!0)}}}}i.Mappings.hasOwnProperty(e)||(i.Mappings[e]=i.GUIDTemplate),i.Mappings.hasOwnProperty(o)||(i.Mappings[o]="{~D:Record.IDRecord~}");for(var _=Object.keys(d),P=0;P<_.length;P++)i.Solvers.push(d[_[P]]);return i}},{key:"saveMapping",value:function(){var t=this,e=document.getElementById("MeadowMap-Name"),o=document.getElementById("MeadowMap-Source"),i=e?e.value.trim():"",n=o?parseInt(o.value,10):0,r=this._getCheckedStoreIDs(),a=r.length>0?r[0]:0;if(i){var s;if("json"===this._MapEditorMode){var l=document.getElementById("MeadowMap-JSON"),c=l?l.value:"{}";try{s=JSON.parse(c)}catch(t){return void this._doToast("Invalid JSON: "+t.message,{type:"error"})}}else s=this.flowToMappingConfig();s.TargetStores=r;var d=this._DiscoveredFields[n];Array.isArray(d)&&d.length>0&&(s.sourceColumns=d);var p={};this._FlowView&&"function"==typeof this._FlowView.getFlowData&&(p=this._FlowView.getFlowData());var h={Name:i,IDSource:n,IDProjectionStore:a,MappingConfiguration:JSON.stringify(s),FlowDiagramState:JSON.stringify(p),Active:1};(this._SelectedMappingID?this._doUpdateMapping(this._SelectedMappingID,h):this._doCreateMapping(this._EditingContextID,h)).then(function(e){e&&e.Error?t._doToast("Error: "+e.Error,{type:"error"}):(e&&e.Mapping&&e.Mapping.IDProjectionMapping&&(t._SelectedMappingID=e.Mapping.IDProjectionMapping),t._doToast("Mapping saved.",{type:"success"}),t._doLoadMappings(t._EditingContextID).then(function(e){t._CurrentMappings=e&&e.Mappings?e.Mappings:[]}))})}else this._doToast("Enter a mapping name.",{type:"warning"})}}]);var i}(i);e.exports=r,e.exports.default_configuration={ViewIdentifier:"MeadowMappingEditor",DefaultRenderable:"MeadowMappingEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:"\n\t\t/* Meadow Mapping Editor */\n\t\t.meadow-mapping-editor {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.meadow-mapping-editor.active {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.meadow-mapping-header {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 1em;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-header h3 {\n\t\t\tmargin: 0;\n\t\t\tflex: 1;\n\t\t}\n\t\t.meadow-mapping-list-table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-list-table th {\n\t\t\ttext-align: left;\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--facto-text-tertiary, #a09070);\n\t\t\tpadding: 0.5em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--facto-border, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-list-table td {\n\t\t\tpadding: 0.35em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--facto-border-subtle, #e8ddc8);\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.meadow-flow-container {\n\t\t\twidth: 100%;\n\t\t\theight: 500px;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--facto-bg-surface, #fcf8f0);\n\t\t\tmargin-bottom: 0.75em;\n\t\t}\n\t\t.meadow-mapping-json-editor {\n\t\t\twidth: 100%;\n\t\t\tmin-height: 300px;\n\t\t\tfont-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.75em;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t\tresize: vertical;\n\t\t\ttab-size: 4;\n\t\t}\n\t\t.meadow-mapping-store-checklist {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.5em;\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.meadow-mapping-store-checklist label {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--facto-border-subtle, #e8ddc8);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t}\n\t\t.meadow-mapping-store-checklist label:has(input:checked) {\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t\tbackground: var(--facto-brand-a12, rgba(24,165,160,0.12));\n\t\t}\n\t\t.meadow-mapping-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 0.35em 0.9em;\n\t\t\tfont-size: 0.82em;\n\t\t\tfont-weight: 500;\n\t\t\tborder-radius: 4px;\n\t\t\tborder: 1px solid transparent;\n\t\t\tcursor: pointer;\n\t\t\ttext-decoration: none;\n\t\t\tline-height: 1.4;\n\t\t}\n\t\t.meadow-mapping-btn-primary {\n\t\t\tbackground: var(--facto-brand, #18a5a0);\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t}\n\t\t.meadow-mapping-btn-primary:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-secondary {\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t\tborder-color: var(--facto-border, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-btn-secondary:hover {\n\t\t\tbackground: var(--facto-border-subtle, #e8ddc8);\n\t\t}\n\t\t.meadow-mapping-btn-danger {\n\t\t\tbackground: #e74c3c;\n\t\t\tcolor: #fff;\n\t\t\tborder-color: #e74c3c;\n\t\t}\n\t\t.meadow-mapping-btn-danger:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-small {\n\t\t\tpadding: 0.2em 0.6em;\n\t\t\tfont-size: 0.78em;\n\t\t}\n\t\t.meadow-schema-mode-tabs {\n\t\t\tdisplay: flex;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.meadow-schema-mode-tab {\n\t\t\tpadding: 0.25em 0.75em;\n\t\t\tfont-size: 0.8em;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t}\n\t\t.meadow-schema-mode-tab.active {\n\t\t\tbackground: var(--facto-brand, #18a5a0);\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t}\n\t\t.meadow-section-title {\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--facto-text-tertiary, #a09070);\n\t\t}\n\t",Templates:[{Hash:"MeadowMappingEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--facto-border); border-radius:4px; background:var(--facto-bg-input); color:var(--facto-text);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--facto-border); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"MyTable","GUIDTemplate":"{~D:Record.IDRecord~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--facto-text-tertiary); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MeadowMappingEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MeadowMappingEditor-Content",TemplateHash:"MeadowMappingEditor-Template",DestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]}},{"./MappingEditor-SchemaUtils.js":46,"./flow-cards/FlowCard-MappingSource.js":48,"./flow-cards/FlowCard-MappingTarget.js":49,"./flow-cards/FlowCard-SolverExpression.js":50,"./flow-cards/FlowCard-TemplateExpression.js":51,"pict-section-flow":9,"pict-view":45}],48:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Mapping Source",Name:"Mapping Source",Code:"SRC",Category:"Data Source",Description:"Source dataset with discovered record fields",TitleBarColor:"#2980b9",Width:200,Height:100,Inputs:[],Outputs:[{Name:"Whole Record",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),i])).serviceType="FlowCardMappingSource",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Mapping Source",Code:"SRC",Category:"Data Source",TitleBarColor:"#2980b9",Width:200,Height:100}},{"pict-section-flow":9}],49:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Mapping Target",Name:"Mapping Target",Code:"TGT",Category:"Data Target",Description:"Mapping target table with schema columns",TitleBarColor:"#27ae60",Width:200,Height:100,Inputs:[],Outputs:[],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),i])).serviceType="FlowCardMappingTarget",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Mapping Target",Code:"TGT",Category:"Data Target",TitleBarColor:"#27ae60",Width:200,Height:100}},{"pict-section-flow":9}],50:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Solver Expression",Name:"Solver Expression",Code:"SOL",Category:"Transform",Description:"Apply a Fable solver expression for conditional logic and computed values",TitleBarColor:"#d35400",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:#ccc; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.SolverExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Solver Expression",Configuration:{Template:"<div style=\"padding:8px;\"><label style=\"display:block; margin-bottom:4px; font-weight:bold; font-size:12px;\">Solver Expression</label><textarea id=\"FlowCard-SOL-{~D:Record.Hash~}\" style=\"width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:#e0e0e0; border:1px solid #444; border-radius:4px; padding:6px;\" onchange=\"(function(el){var n=pict.views['MeadowMapping-Flow'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash==='{~D:Record.Hash~}'){n._FlowData.Nodes[i].Data.SolverExpression=el.value;if(typeof n.renderFlow==='function')n.renderFlow();break;}}}})(this)\">{~D:Record.Data.SolverExpression~}</textarea><div style=\"font-size:10px; color:#888; margin-top:4px;\">Example: IF(IncomingRecord.Type == 'Premium', 'GOLD', 'SILVER')</div></div>"}}},o),i])).serviceType="FlowCardSolverExpression",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Solver Expression",Code:"SOL",Category:"Transform",TitleBarColor:"#d35400",Width:220,Height:90}},{"pict-section-flow":9}],51:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Template Expression",Name:"Template Expression",Code:"TPL",Category:"Transform",Description:"Apply a Manyfest template expression to map source fields to a target column",TitleBarColor:"#8e44ad",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:#ccc; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.TemplateExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Template Expression",Configuration:{Template:'<div style="padding:8px;"><label style="display:block; margin-bottom:4px; font-weight:bold; font-size:12px;">Template Expression</label><textarea id="FlowCard-TPL-{~D:Record.Hash~}" style="width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:#e0e0e0; border:1px solid #444; border-radius:4px; padding:6px;" onchange="(function(el){var n=pict.views[\'MeadowMapping-Flow\'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash===\'{~D:Record.Hash~}\'){n._FlowData.Nodes[i].Data.TemplateExpression=el.value;if(typeof n.renderFlow===\'function\')n.renderFlow();break;}}}})(this)">{~D:Record.Data.TemplateExpression~}</textarea><div style="font-size:10px; color:#888; margin-top:4px;">Use {~D:Record.FieldName~} syntax. Example: {~D:Record.Name~} in {~D:Record.City~}</div></div>'}}},o),i])).serviceType="FlowCardTemplateExpression",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Template Expression",Code:"TPL",Category:"Transform",TitleBarColor:"#8e44ad",Width:220,Height:90}},{"pict-section-flow":9}]},{},[1])(1)});
1
+ "use strict";function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function r(o,i,n,r){var l=i&&i.prototype instanceof s?i:s,c=Object.create(l.prototype);return _regeneratorDefine2(c,"_invoke",function(o,i,n){var r,s,l,c=0,d=n||[],p=!1,h={p:0,n:0,v:t,a:u,f:u.bind(t,4),d:function(e,o){return r=e,s=0,l=t,h.n=o,a}};function u(o,i){for(s=o,l=i,e=0;!p&&c&&!n&&e<d.length;e++){var n,r=d[e],u=h.p,f=r[2];o>3?(n=f===i)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=u&&((n=o<2&&u<r[1])?(s=0,h.v=i,h.n=r[1]):u<f&&(n=o<3||r[0]>i||i>f)&&(r[4]=o,r[5]=i,h.n=f,s=0))}if(n||o>1)return a;throw p=!0,i}return function(n,d,f){if(c>1)throw TypeError("Generator is already running");for(p&&1===d&&u(d,f),s=d,l=f;(e=s<2?t:l)||!p;){r||(s?s<3?(s>1&&(h.n=-1),u(s,l)):h.n=l:h.v=l);try{if(c=2,r){if(s||(n="next"),e=r[n]){if(!(e=e.call(r,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=r.return)&&e.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);r=t}else if((e=(p=h.n<0)?l:o.call(i,h))!==a)break}catch(e){r=t,s=1,l=e}finally{c=1}}return{value:e,done:p}}}(o,n,r),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var d=[][i]?e(e([][i]())):(_regeneratorDefine2(e={},i,function(){return this}),e),p=c.prototype=s.prototype=Object.create(d);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_regeneratorDefine2(t,n,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=c,_regeneratorDefine2(p,"constructor",c),_regeneratorDefine2(c,"constructor",l),l.displayName="GeneratorFunction",_regeneratorDefine2(c,n,"GeneratorFunction"),_regeneratorDefine2(p),_regeneratorDefine2(p,n,"Generator"),_regeneratorDefine2(p,i,function(){return this}),_regeneratorDefine2(p,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:r,m:h}})()}function _regeneratorDefine2(t,e,o,i){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}_regeneratorDefine2=function(t,e,o,i){function r(e,o){_regeneratorDefine2(t,e,function(t){return this._invoke(e,o,t)})}e?n?n(t,e,{value:o,enumerable:!i,configurable:!i,writable:!i}):t[e]=o:(r("next",0),r("throw",1),r("return",2))},_regeneratorDefine2(t,e,o,i)}function asyncGeneratorStep(t,e,o,i,n,r,a){try{var s=t[r](a),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(i,n)}function _asyncToGenerator(t){return function(){var e=this,o=arguments;return new Promise(function(i,n){var r=t.apply(e,o);function a(t){asyncGeneratorStep(r,i,n,a,s,"next",t)}function s(t){asyncGeneratorStep(r,i,n,a,s,"throw",t)}a(void 0)})}}function _createForOfIteratorHelper(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=Array(e);o<e;o++)i[o]=t[o];return i}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,e,o){return e&&_defineProperties(t.prototype,e),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _callSuper(t,e,o){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,o||[],_getPrototypeOf(t).constructor):e.apply(t,o))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _superPropGet(t,e,o,i){var n=_get(_getPrototypeOf(1&i?t.prototype:t),e,o);return 2&i&&"function"==typeof n?function(t){return n.apply(o,t)}:n}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=_superPropBase(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}},_get.apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).MappingDemoApplication=t()}}(function(){return function t(e,o,i){function n(a,s){if(!o[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[a]={exports:{}};e[a][0].call(d.exports,function(t){return n(e[a][1][t]||t)},d,d.exports,t,e,o,i)}return o[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)n(i[a]);return n}({1:[function(t,e,o){var i=t("pict-application"),n=t("./views/MappingDemoEditorView.js"),r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,o,i])).pict.addView("MappingDemoEditor",n.default_configuration,n),r}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){return window.openMappingEditor=function(){var t=document.getElementById("mapping-editor-placeholder");t&&(t.style.display="none"),window._Pict.views.MappingDemoEditor.editMappings(1,"Book")},_superPropGet(e,"onAfterInitializeAsync",this,3)([t])}}])}(i);e.exports=r,e.exports.default_configuration={Name:"MappingDemoApp",Hash:"MappingDemo",AutoSolveAfterInitialize:!0}},{"./views/MappingDemoEditorView.js":2,"pict-application":6}],2:[function(t,e,o){var i=t("../../../../source/views/PictView-MeadowMappingEditor.js"),n={ViewIdentifier:"MappingDemoEditor",DefaultRenderable:"MappingDemoEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:i.default_configuration.CSS,Templates:[{Hash:"MappingDemoEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MappingDemoEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px; background:var(--bg-card); color:var(--text);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--border); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MappingDemoEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"Book","GUIDTemplate":"{~D:Record.id~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-dim); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MappingDemoEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MappingDemoEditor-Content",TemplateHash:"MappingDemoEditor-Template",ContentDestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){return _classCallCheck(this,e),_callSuper(this,e,[t,o,i])}return _inherits(e,t),_createClass(e,[{key:"_doLoadMappings",value:function(t){return fetch("/1.0/Demo/VisualMapping").then(function(t){return t.json()})}},{key:"_doLoadSources",value:function(){return fetch("/1.0/Demo/Sources").then(function(t){return t.json()})}},{key:"_doLoadStores",value:function(t){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(t){return fetch("/1.0/Demo/TargetSchema").then(function(t){return t.json()})}},{key:"_doLoadMapping",value:function(t){return fetch("/1.0/Demo/VisualMapping/"+t).then(function(t){return t.json()})}},{key:"_doDeleteMapping",value:function(t){return fetch("/1.0/Demo/VisualMapping/"+t,{method:"DELETE"}).then(function(t){return t.json()})}},{key:"_doDiscoverSourceFields",value:function(t,e,o){return fetch("/1.0/Demo/SourceSchema").then(function(t){return t.json()})}},{key:"_doCreateMapping",value:function(t,e){return fetch("/1.0/Demo/VisualMapping",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(function(t){return t.json()})}},{key:"_doUpdateMapping",value:function(t,e){return fetch("/1.0/Demo/VisualMapping/"+t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(function(t){return t.json()})}},{key:"_onClose",value:function(){var t=document.getElementById("MeadowMap-Editor");t&&t.classList.remove("active");var e=document.getElementById("mapping-editor-placeholder");e&&(e.style.display=""),document.dispatchEvent(new CustomEvent("mapping-editor-closed"))}}])}(i);e.exports=r,e.exports.default_configuration=n},{"../../../../source/views/PictView-MeadowMappingEditor.js":47}],3:[function(t,e,o){e.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],4:[function(t,e,o){var i=t("../package.json"),n=function(){return _createClass(function t(e,o,n){_classCallCheck(this,t),this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"===_typeof(e)&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=i,this.fable?(this.UUID=e.getUUID(),this.options="object"===_typeof(o)?o:{}):(this.options="object"!==_typeof(e)||e.isFable?"object"===_typeof(o)?o:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof n?n:this.fable||"string"!=typeof o?"".concat(this.UUID):o},[{key:"connectFable",value:function(t){if("object"!==_typeof(t)||!t.isFable){var e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(t),"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}])}();_defineProperty(n,"isFableService",!0),e.exports=n,e.exports.CoreServiceProviderBase=n},{"../package.json":3}],5:[function(t,e,o){e.exports={name:"pict-application",version:"1.0.33",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],6:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e);var s="object"===_typeof(t.settings.PictApplicationConfiguration)?t.settings.PictApplicationConfiguration:{};(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),s,o),i])).options,a.log,a.fable,a.UUID,a.Hash,a.servicesMap,a.serviceType="PictApplication",a._Package=n,a.pict=a.fable,a.AppData=a.fable.AppData,a.Bundle=a.fable.Bundle,a.initializeTimestamp,a.lastSolvedTimestamp,a.lastLoginTimestamp,a.lastMarshalFromViewsTimestamp,a.lastMarshalToViewsTimestamp,a.lastAutoRenderTimestamp,a.lastLoadDataTimestamp;var l=Object.keys(a.options.Manifests);if(l.length>0)for(var c=0;c<l.length;c++){var d=l[c];a.fable.instantiateServiceProvider("Manifest",a.options.Manifests[d],d)}return a}return _inherits(e,t),_createClass(e,[{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));for(var t=Object.keys(this.pict.providers),e=[],o=0;o<t.length;o++){var i=this.pict.providers[t[o]];i.options.AutoSolveWithApp&&e.push(i)}e.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var n=0;n<e.length;n++)e[n].solve(e[n]);this.onBeforeSolve();for(var r=Object.keys(this.pict.views),a=[],s=0;s<r.length;s++){var l=this.pict.views[r[s]];l.options.AutoInitialize&&a.push(l)}a.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var c=0;c<a.length;c++)a[c].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");o.anticipate(this.onBeforeSolveAsync.bind(this));var i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoSolveWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var l=0;l<r.length;l++)o.anticipate(r[l].solveAsync.bind(r[l]));for(var c=Object.keys(this.pict.views),d=[],p=0;p<c.length;p++){var h=this.pict.views[c[p]];h.options.AutoSolveWithApp&&d.push(h)}d.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var u=0;u<d.length;u++)o.anticipate(d[u].solveAsync.bind(d[u]));o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync() complete.")),e.lastSolvedTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}},{key:"onLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}},{key:"loginAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeLoginAsync.bind(this)),o.anticipate(this.onLoginAsync.bind(this)),o.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&o.anticipate(function(t){if(!e.isLoggedIn())return t();e.pict.LogNoisiness>1&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," auto loading data after login...")),e.loadDataAsync(function(e){t(e)})}),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync() complete.")),e.lastLoginTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"isLoggedIn",value:function(){return!0}},{key:"onAfterLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}},{key:"loadDataAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeLoadDataAsync.bind(this));for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoLoadDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];o.anticipate(d.onBeforeLoadDataAsync.bind(d))}o.anticipate(this.onLoadDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onLoadDataAsync.bind(u))}o.anticipate(this.onAfterLoadDataAsync.bind(this));for(var f=0,w=r;f<w.length;f++){var v=w[f];o.anticipate(v.onAfterLoadDataAsync.bind(v))}o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync() complete.")),e.lastLoadDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}},{key:"onBeforeSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}},{key:"saveDataAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeSaveDataAsync.bind(this));for(var n=Object.keys(this.pict.providers),r=[],a=0;a<n.length;a++){var s=this.pict.providers[n[a]];s.options.AutoSaveDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];o.anticipate(d.onBeforeSaveDataAsync.bind(d))}o.anticipate(this.onSaveDataAsync.bind(this));for(var p=0,h=r;p<h.length;p++){var u=h[p];o.anticipate(u.onSaveDataAsync.bind(u))}o.anticipate(this.onAfterSaveDataAsync.bind(this));for(var f=0,w=r;f<w.length;f++){var v=w[f];o.anticipate(v.onAfterSaveDataAsync.bind(v))}o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync() complete.")),e.lastSaveDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(var t=0;t<this.options.ConfigurationOnlyViews.length;t++){var e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();for(var o=Object.keys(this.pict.providers),i=[],n=0;n<o.length;n++){var r=this.pict.providers[o[n]];r.options.AutoInitialize&&i.push(r)}i.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var a=0;a<i.length;a++)i[a].initialize();for(var s=Object.keys(this.pict.views),l=[],c=0;c<s.length;c++){var d=this.pict.views[s[c]];d.options.AutoInitialize&&l.push(d)}l.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var p=0;p<l.length;p++)l[p].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}},{key:"initializeAsync",value:function(t){var e=this;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));var o="function"==typeof t&&t;if(o||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),o=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(o);var i=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(var n=0;n<this.options.ConfigurationOnlyViews.length;n++){var r=void 0===this.options.ConfigurationOnlyViews[n].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[n].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(r)),this.pict.addView(r,this.options.ConfigurationOnlyViews[n])}i.anticipate(this.onBeforeInitializeAsync.bind(this)),i.anticipate(this.onInitializeAsync.bind(this));for(var a=Object.keys(this.pict.providers),s=[],l=0;l<a.length;l++){var c=this.pict.providers[a[l]];c.options.AutoInitialize&&s.push(c)}s.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var d=0;d<s.length;d++)i.anticipate(s[d].initializeAsync.bind(s[d]));for(var p=Object.keys(this.pict.views),h=[],u=0;u<p.length;u++){var f=this.pict.views[p[u]];f.options.AutoInitialize&&h.push(f)}h.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var w=0;w<h.length;w++){var v=h[w];i.anticipate(v.initializeAsync.bind(v))}i.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),i.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),i.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),i.anticipate(this.renderMainViewportAsync.bind(this))),i.wait(function(t){return t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),e.initializeTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initialization complete.")),o()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onCompletionOfInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}},{key:"onCompletionOfInitializeAsync",value:function(t){return this.onCompletionOfInitialize(),t()}},{key:"onBeforeMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}},{key:"onBeforeMarshalFromViewsAsync",value:function(t){return this.onBeforeMarshalFromViews(),t()}},{key:"onMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}},{key:"onMarshalFromViewsAsync",value:function(t){return this.onMarshalFromViews(),t()}},{key:"marshalFromViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();for(var t=Object.keys(this.pict.views),e=[],o=0;o<t.length;o++){var i=this.pict.views[t[o]];e.push(i)}for(var n=0;n<e.length;n++)e[n].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalFromViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));for(var n=Object.keys(this.pict.views),r=[],a=0;a<n.length;a++){var s=this.pict.views[n[a]];r.push(s)}for(var l=0;l<r.length;l++)o.anticipate(r[l].marshalFromViewAsync.bind(r[l]));o.anticipate(this.onMarshalFromViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync() complete.")),e.lastMarshalFromViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}},{key:"onAfterMarshalFromViewsAsync",value:function(t){return this.onAfterMarshalFromViews(),t()}},{key:"onBeforeMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}},{key:"onBeforeMarshalToViewsAsync",value:function(t){return this.onBeforeMarshalToViews(),t()}},{key:"onMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}},{key:"onMarshalToViewsAsync",value:function(t){return this.onMarshalToViews(),t()}},{key:"marshalToViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();for(var t=Object.keys(this.pict.views),e=[],o=0;o<t.length;o++){var i=this.pict.views[t[o]];e.push(i)}for(var n=0;n<e.length;n++)e[n].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalToViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));for(var n=Object.keys(this.pict.views),r=[],a=0;a<n.length;a++){var s=this.pict.views[n[a]];r.push(s)}for(var l=0;l<r.length;l++)o.anticipate(r[l].marshalToViewAsync.bind(r[l]));o.anticipate(this.onMarshalToViewsAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync() complete.")),e.lastMarshalToViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}},{key:"onAfterMarshalToViewsAsync",value:function(t){return this.onAfterMarshalToViews(),t()}},{key:"onBeforeRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t){return this.onBeforeRender(),t()}},{key:"render",value:function(t,e,o,i){var n="string"!=typeof t?this.options.MainViewportViewIdentifier:t,r="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof o?this.options.MainViewportDestinationAddress:o,s="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();var l="string"==typeof n&&this.servicesMap.PictView[n];return l?(this.onRender(),l.render(r,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(n," because it is not a valid view.")),!1)}},{key:"onRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}},{key:"onRenderAsync",value:function(t){return this.onRender(),t()}},{key:"renderAsync",value:function(t,e,o,i,n){var r=this,a="string"!=typeof t?this.options.MainViewportViewIdentifier:t,s="string"!=typeof e?this.options.MainViewportRenderableHash:e,l="string"!=typeof o?this.options.MainViewportDestinationAddress:o,c="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i,d="function"==typeof n?n:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof t&&t;d||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=function(t){t&&r.log.error("PictApp [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(l,"] TemplateDataAddress[").concat(c,"] renderAsync:"));var p=this.fable.newAnticipate();p.anticipate(this.onBeforeRenderAsync.bind(this));var h="string"==typeof a&&this.servicesMap.PictView[a];if(!h){var u="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(a," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(u),d(new Error(u))}return p.anticipate(this.onRenderAsync.bind(this)),p.anticipate(function(t){h.renderAsync.call(h,s,l,c,t)}),p.anticipate(this.onAfterRenderAsync.bind(this)),p.wait(d)}},{key:"onAfterRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}},{key:"onAfterRenderAsync",value:function(t){return this.onAfterRender(),t()}},{key:"renderMainViewport",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}},{key:"renderMainViewportAsync",value:function(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}},{key:"renderAutoViews",value:function(){var t=this;this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));var e=Object.keys(this.pict.views);e.sort(function(e,o){return t.pict.views[e].options.AutoRenderOrdinal-t.pict.views[o].options.AutoRenderOrdinal});for(var o=0;o<e.length;o++){var i=this.pict.views[e[o]];i.options.AutoRender&&i.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}},{key:"renderAutoViewsAsync",value:function(t){var e=this,o=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));var n=Object.keys(this.pict.views);n.sort(function(t,o){return e.pict.views[t].options.AutoRenderOrdinal-e.pict.views[o].options.AutoRenderOrdinal});for(var r=0;r<n.length;r++){var a=this.pict.views[n[r]];a.options.AutoRender&&o.anticipate(a.renderAsync.bind(a))}o.wait(function(t){return e.lastAutoRenderTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync complete.")),i(t)})}},{key:"isPictApplication",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":5,"fable-serviceproviderbase":4}],7:[function(t,e,o){e.exports={name:"pict-provider",version:"1.0.12",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351",quackage:"^1.0.58",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],8:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),o),i])).fable,a.pict,a.log,a.options,a.UUID,a.Hash,a.options.ProviderIdentifier||(a.options.ProviderIdentifier="AutoProviderID-".concat(a.fable.getUUID())),a.serviceType="PictProvider",a._Package=n,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1;for(var s=0;s<a.options.Templates.length;s++){var l=a.options.Templates[s];l.hasOwnProperty("Postfix")&&l.hasOwnProperty("Template")?(l.Source||(l.Source="PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(l.Prefix,l.Postfix,l.Template,l.Source)):a.log.error("PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," could not load Default Template ").concat(s," in the options array."),l)}return a}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return e.initializeTimestamp=e.pict.log.getTimeStamp(),o?e.log.error("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization failed: ").concat(o.message||o),{Stack:o.stack}):e.pict.LogNoisiness>0&&e.log.info("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onPreRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}},{key:"onPreRenderAsync",value:function(t){return this.onPreRender(),t()}},{key:"render",value:function(){return this.onPreRender()}},{key:"renderAsync",value:function(t){return this.onPreRender(),t()}},{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"solve",value:function(){return this.onPreSolve()}},{key:"solveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}},{key:"onAfterLoadDataAsync",value:function(t){return t()}},{key:"onBeforeSaveDataAsync",value:function(t){return t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}},{key:"onAfterSaveDataAsync",value:function(t){return t()}}])}(i);e.exports=a},{"../package.json":7,"fable-serviceproviderbase":4}],9:[function(t,e,o){e.exports=t("./views/PictView-Flow.js"),e.exports.PictViewFlowNode=t("./views/PictView-Flow-Node.js"),e.exports.PictViewFlowToolbar=t("./views/PictView-Flow-Toolbar.js"),e.exports.PictViewFlowFloatingToolbar=t("./views/PictView-Flow-FloatingToolbar.js"),e.exports.PictServiceFlowInteractionManager=t("./services/PictService-Flow-InteractionManager.js"),e.exports.PictServiceFlowConnectionRenderer=t("./services/PictService-Flow-ConnectionRenderer.js"),e.exports.PictServiceFlowTether=t("./services/PictService-Flow-Tether.js"),e.exports.PictServiceFlowLayout=t("./services/PictService-Flow-Layout.js"),e.exports.PictServiceFlowPathGenerator=t("./services/PictService-Flow-PathGenerator.js"),e.exports.PictServiceFlowViewportManager=t("./services/PictService-Flow-ViewportManager.js"),e.exports.PictServiceFlowSelectionManager=t("./services/PictService-Flow-SelectionManager.js"),e.exports.PictServiceFlowPanelManager=t("./services/PictService-Flow-PanelManager.js"),e.exports.PictServiceFlowDataManager=t("./services/PictService-Flow-DataManager.js"),e.exports.PictServiceFlowConnectionHandleManager=t("./services/PictService-Flow-ConnectionHandleManager.js"),e.exports.PictServiceFlowRenderManager=t("./services/PictService-Flow-RenderManager.js"),e.exports.PictServiceFlowPortRenderer=t("./services/PictService-Flow-PortRenderer.js"),e.exports.PictProviderFlowNodeTypes=t("./providers/PictProvider-Flow-NodeTypes.js"),e.exports.PictProviderFlowEventHandler=t("./providers/PictProvider-Flow-EventHandler.js"),e.exports.PictProviderFlowLayouts=t("./providers/PictProvider-Flow-Layouts.js"),e.exports.PictProviderFlowSVGHelpers=t("./providers/PictProvider-Flow-SVGHelpers.js"),e.exports.PictProviderFlowGeometry=t("./providers/PictProvider-Flow-Geometry.js"),e.exports.PictProviderFlowPanelChrome=t("./providers/PictProvider-Flow-PanelChrome.js"),e.exports.PictProviderFlowCSS=t("./providers/PictProvider-Flow-CSS.js"),e.exports.PictProviderFlowIcons=t("./providers/PictProvider-Flow-Icons.js"),e.exports.PictProviderFlowConnectorShapes=t("./providers/PictProvider-Flow-ConnectorShapes.js"),e.exports.PictFlowCard=t("./PictFlowCard.js"),e.exports.PictFlowCardPropertiesPanel=t("./PictFlowCardPropertiesPanel.js"),e.exports.FlowCardPropertiesPanelTemplate=t("./panels/FlowCardPropertiesPanel-Template.js"),e.exports.FlowCardPropertiesPanelMarkdown=t("./panels/FlowCardPropertiesPanel-Markdown.js"),e.exports.FlowCardPropertiesPanelForm=t("./panels/FlowCardPropertiesPanel-Form.js"),e.exports.FlowCardPropertiesPanelView=t("./panels/FlowCardPropertiesPanel-View.js"),e.exports.PictViewFlowPropertiesPanel=t("./views/PictView-Flow-PropertiesPanel.js")},{"./PictFlowCard.js":10,"./PictFlowCardPropertiesPanel.js":11,"./panels/FlowCardPropertiesPanel-Form.js":12,"./panels/FlowCardPropertiesPanel-Markdown.js":13,"./panels/FlowCardPropertiesPanel-Template.js":14,"./panels/FlowCardPropertiesPanel-View.js":15,"./providers/PictProvider-Flow-CSS.js":16,"./providers/PictProvider-Flow-ConnectorShapes.js":17,"./providers/PictProvider-Flow-EventHandler.js":18,"./providers/PictProvider-Flow-Geometry.js":19,"./providers/PictProvider-Flow-Icons.js":20,"./providers/PictProvider-Flow-Layouts.js":21,"./providers/PictProvider-Flow-NodeTypes.js":22,"./providers/PictProvider-Flow-PanelChrome.js":24,"./providers/PictProvider-Flow-SVGHelpers.js":25,"./services/PictService-Flow-ConnectionHandleManager.js":27,"./services/PictService-Flow-ConnectionRenderer.js":28,"./services/PictService-Flow-DataManager.js":29,"./services/PictService-Flow-InteractionManager.js":30,"./services/PictService-Flow-Layout.js":31,"./services/PictService-Flow-PanelManager.js":32,"./services/PictService-Flow-PathGenerator.js":33,"./services/PictService-Flow-PortRenderer.js":34,"./services/PictService-Flow-RenderManager.js":35,"./services/PictService-Flow-SelectionManager.js":36,"./services/PictService-Flow-Tether.js":37,"./services/PictService-Flow-ViewportManager.js":38,"./views/PictView-Flow-FloatingToolbar.js":39,"./views/PictView-Flow-Node.js":40,"./views/PictView-Flow-PropertiesPanel.js":41,"./views/PictView-Flow-Toolbar.js":42,"./views/PictView-Flow.js":43}],10:[function(t,e,o){var i=function(t){function e(t,o,i){var n;_classCallCheck(this,e);var r=Object.assign({},e.default_configuration,o);return(n=_callSuper(this,e,[t,r,i])).serviceType="PictFlowCard",n.cardTitle=r.Title?r.Title:"Card",n.cardName=!!r.Name&&r.Name,n.cardCode=r.Code?r.Code:"",n.cardDescription=!!r.Description&&r.Description,n.cardIcon=!!r.Icon&&r.Icon,n.cardPreviewImage=!!r.PreviewImage&&r.PreviewImage,n.cardDocumentation=!!r.Documentation&&r.Documentation,n.cardTooltip=!!r.Tooltip&&r.Tooltip,n.cardHelp=!!r.Help&&r.Help,n.cardEnabled="boolean"!=typeof r.Enabled||r.Enabled,n.cardTitleBarColor=r.TitleBarColor?r.TitleBarColor:"#2c3e50",n.cardBodyStyle=r.BodyStyle?r.BodyStyle:{},n.cardWidth="number"==typeof r.Width?r.Width:180,n.cardHeight="number"==typeof r.Height?r.Height:80,n.cardCategory=r.Category?r.Category:"General",n.cardInputs=Array.isArray(r.Inputs)?r.Inputs:[],n.cardOutputs=Array.isArray(r.Outputs)?r.Outputs:[],n.cardPropertiesPanel=r.PropertiesPanel&&"object"===_typeof(r.PropertiesPanel)?r.PropertiesPanel:null,n.cardBodyContent=r.BodyContent&&"object"===_typeof(r.BodyContent)?r.BodyContent:null,n.cardShowTypeLabel="boolean"!=typeof r.ShowTypeLabel||r.ShowTypeLabel,n.cardPortLabelsOnHover="boolean"==typeof r.PortLabelsOnHover&&r.PortLabelsOnHover,n.cardPortLabelsVertical="boolean"==typeof r.PortLabelsVertical&&r.PortLabelsVertical,n.cardPortLabelPadding="boolean"==typeof r.PortLabelPadding&&r.PortLabelPadding,n.cardPortLabelsOutside="boolean"==typeof r.PortLabelsOutside&&r.PortLabelsOutside,n.cardLabelsInFront="boolean"!=typeof r.LabelsInFront||r.LabelsInFront,n}return _inherits(e,t),_createClass(e,[{key:"getNodeTypeConfiguration",value:function(){for(var t=[],e=0;e<this.cardInputs.length;e++){var o=this.cardInputs[e],i={Hash:null,Direction:"input",Side:o.Side||"left",Label:o.Name||"In ".concat(e+1),MinimumInputCount:"number"==typeof o.MinimumInputCount?o.MinimumInputCount:0,MaximumInputCount:"number"==typeof o.MaximumInputCount?o.MaximumInputCount:-1};o.PortType&&(i.PortType=o.PortType),o.DataType&&(i.DataType=o.DataType),t.push(i)}for(var n=0;n<this.cardOutputs.length;n++){var r=this.cardOutputs[n],a={Hash:null,Direction:"output",Side:r.Side||"right",Label:r.Name||"Out ".concat(n+1)};r.PortType&&(a.PortType=r.PortType),r.DataType&&(a.DataType=r.DataType),t.push(a)}0===t.length&&(t.push({Hash:null,Direction:"input",Side:"left",Label:"In"}),t.push({Hash:null,Direction:"output",Side:"right",Label:"Out"}));var s={Hash:this.cardCode,Label:this.cardTitle,DefaultWidth:this.cardWidth,DefaultHeight:this.cardHeight,DefaultPorts:t,TitleBarColor:this.cardTitleBarColor,BodyStyle:JSON.parse(JSON.stringify(this.cardBodyStyle)),CardMetadata:{Name:this.cardName,Code:this.cardCode,Description:this.cardDescription,Icon:this.cardIcon,PreviewImage:this.cardPreviewImage,Documentation:this.cardDocumentation,Tooltip:this.cardTooltip,Enabled:this.cardEnabled,Category:this.cardCategory,Help:this.cardHelp}};return s.ShowTypeLabel=this.cardShowTypeLabel,s.PortLabelsOnHover=this.cardPortLabelsOnHover,s.PortLabelsVertical=this.cardPortLabelsVertical,s.PortLabelPadding=this.cardPortLabelPadding,s.PortLabelsOutside=this.cardPortLabelsOutside,s.LabelsInFront=this.cardLabelsInFront,this.cardPropertiesPanel&&(s.PropertiesPanel=JSON.parse(JSON.stringify(this.cardPropertiesPanel))),this.cardBodyContent&&(s.BodyContent=JSON.parse(JSON.stringify(this.cardBodyContent)),"function"==typeof this.options.BodyContent.RenderCallback&&(s.BodyContent.RenderCallback=this.options.BodyContent.RenderCallback)),s}},{key:"registerWithFlowView",value:function(t){if(!t||!t._NodeTypeProvider)return this.log.warn("PictFlowCard registerWithFlowView: no valid FlowView or NodeTypeProvider"),!1;var e=this.getNodeTypeConfiguration();return t._NodeTypeProvider.registerNodeType(e)}}])}(t("fable-serviceproviderbase"));e.exports=i,e.exports.default_configuration={Title:"Card",Name:!1,Code:"",Description:!1,Icon:!1,PreviewImage:!1,Documentation:!1,Tooltip:!1,Inputs:[],Outputs:[],Enabled:!0,TitleBarColor:"#2c3e50",BodyStyle:{},Width:180,Height:80,Category:"General",PropertiesPanel:null,BodyContent:null,ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsVertical:!1,PortLabelPadding:!1,PortLabelsOutside:!1,LabelsInFront:!0}},{"fable-serviceproviderbase":4}],11:[function(t,e,o){var i=function(t){function e(t,o,i){var n;_classCallCheck(this,e);var r=Object.assign({},e.default_configuration,o);return(n=_callSuper(this,e,[t,r,i])).serviceType="PictFlowCardPropertiesPanel",n.panelType=r.PanelType||"Base",n.panelTitle=r.Title||"Properties",n.panelWidth="number"==typeof r.Width?r.Width:300,n.panelHeight="number"==typeof r.Height?r.Height:200,n._FlowView=null,n._NodeData=null,n._ContentContainer=null,n._Configuration=r.Configuration||{},n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,e){this._ContentContainer=t,this._NodeData=e}},{key:"marshalToPanel",value:function(t){this._NodeData=t}},{key:"marshalFromPanel",value:function(t){}},{key:"destroy",value:function(){this._ContentContainer=null,this._NodeData=null}}])}(t("fable-serviceproviderbase"));e.exports=i,e.exports.default_configuration={PanelType:"Base",Title:"Properties",Width:300,Height:200,Configuration:{}}},{"fable-serviceproviderbase":4}],12:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Form",n._Metacontroller=null,n._InjectedSectionHash=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.Manifest){var i="pict-flow-panel-form-".concat(o.Hash);t.innerHTML='<div id="'.concat(i,'"></div>'),this.fable.AppData.Record=o;try{if(!this._Metacontroller){var n=null;this.fable.servicesMap.hasOwnProperty("PictFormMetacontroller")?n="PictFormMetacontroller":this.fable.servicesMap.hasOwnProperty("PictViewFormMetacontroller")&&(n="PictViewFormMetacontroller"),n&&(this._Metacontroller=this.fable.instantiateServiceProviderWithoutRegistration(n,{ViewIdentifier:"FlowPanelForm-".concat(o.Hash),DefaultDestinationAddress:"#".concat(i),AutoRender:!1,AutoPopulateAfterRender:!0,AutoSolveBeforeRender:!1}))}if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifestAndRender){var r="Pict-".concat(this._Metacontroller.UUID,"-FormContainer"),a=t.querySelector("#".concat(i));a&&(a.innerHTML='<div id="'.concat(r,'" class="pict-form"></div>'));var s=JSON.parse(JSON.stringify(this._Configuration.Manifest));this._InjectedSectionHash=s.Hash||null,this._Metacontroller.injectManifestAndRender(s)}else if(this._Metacontroller&&"function"==typeof this._Metacontroller.injectManifest){var l=JSON.parse(JSON.stringify(this._Configuration.Manifest)),c=this._Metacontroller.injectManifest(l);this._InjectedSectionHash=l.Hash||null;var d=t.querySelector("#".concat(i));if(d&&c.length>0){for(var p="",h=0;h<c.length;h++){var u=c[h].options.DefaultDestinationAddress;u&&"#"===u.charAt(0)&&(u=u.substring(1)),p+='<div id="'.concat(u,'" class="pict-form-view"></div>')}d.innerHTML=p;for(var f=0;f<c.length;f++)c[f].render()}}else t.innerHTML="<em>pict-section-form is not available. Install it in your application to use Form panels.</em>"}catch(e){this.log.warn("FlowCardPropertiesPanel-Form render error: ".concat(e.message)),t.innerHTML="<em>Form render error: ".concat(e.message,"</em>")}}else t.innerHTML="<em>No form manifest configured</em>"}},{key:"marshalFromPanel",value:function(t){this._Metacontroller&&"function"==typeof this._Metacontroller.marshalFromView&&this._Metacontroller.marshalFromView()}},{key:"destroy",value:function(){this._Metacontroller=null,this._InjectedSectionHash=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Form",Configuration:{Manifest:null}})},{"../PictFlowCardPropertiesPanel.js":11}],13:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Markdown",n._ContentProvider=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){_superPropGet(e,"render",this,3)([t,o]),this._renderMarkdown()}},{key:"marshalToPanel",value:function(t){_superPropGet(e,"marshalToPanel",this,3)([t]),this._renderMarkdown()}},{key:"_renderMarkdown",value:function(){if(this._ContentContainer&&this._Configuration){var t="";if(this._Configuration.MarkdownAddress&&this._NodeData?t=this.fable.manifest.getValueByHash(this._NodeData,this._Configuration.MarkdownAddress)||"":this._Configuration.Markdown&&(t=this._Configuration.Markdown),t)try{if(this._ContentProvider||this.fable.servicesMap.hasOwnProperty("PictContentProvider")&&(this._ContentProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictContentProvider",{})),this._ContentProvider&&"function"==typeof this._ContentProvider.parseMarkdown){var e=this._ContentProvider.parseMarkdown(t);this._ContentContainer.innerHTML=e,"function"==typeof this._ContentProvider.renderKaTeXEquations&&this._ContentProvider.renderKaTeXEquations(this._ContentContainer),"function"==typeof this._ContentProvider.renderMermaidDiagrams&&this._ContentProvider.renderMermaidDiagrams(this._ContentContainer)}else this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(t),"</pre>")}catch(e){this.log.warn("FlowCardPropertiesPanel-Markdown render error: ".concat(e.message)),this._ContentContainer.innerHTML='<pre style="white-space: pre-wrap; font-family: inherit;">'.concat(this._escapeHTML(t),"</pre>")}else this._ContentContainer.innerHTML="<em>No content</em>"}}},{key:"_escapeHTML",value:function(t){var e=document.createElement("div");return e.textContent=t,e.innerHTML}},{key:"destroy",value:function(){this._ContentProvider=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Markdown",Configuration:{Markdown:"",MarkdownAddress:""}})},{"../PictFlowCardPropertiesPanel.js":11}],14:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-Template",n._TemplatesRegistered=!1,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.Templates){if(!this._TemplatesRegistered){for(var i=this._Configuration.Templates,n=0;n<i.length;n++)i[n].Hash&&i[n].Template&&this.fable.TemplateProvider.addTemplate(i[n].Hash,i[n].Template);this._TemplatesRegistered=!0}this._renderTemplate()}}},{key:"marshalToPanel",value:function(t){_superPropGet(e,"marshalToPanel",this,3)([t]),this._renderTemplate()}},{key:"_renderTemplate",value:function(){if(this._ContentContainer&&this._NodeData){var t=this._Configuration.TemplateHash;if(t){var e=this._NodeData,o=this.fable.parseTemplateByHash(t,e,null,[e]);this._ContentContainer.innerHTML=o}}}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"Template",Configuration:{Templates:[],TemplateHash:""}})},{"../PictFlowCardPropertiesPanel.js":11}],15:[function(t,e,o){var i=t("../PictFlowCardPropertiesPanel.js"),n=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictFlowCardPropertiesPanel-View",n._OriginalDestination=null,n._ViewInstance=null,n}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o){if(_superPropGet(e,"render",this,3)([t,o]),this._Configuration&&this._Configuration.ViewHash){var i=this._Configuration.ViewHash,n="pict-flow-panel-view-".concat(o.Hash);t.innerHTML='<div id="'.concat(n,'"></div>');try{var r=this.pict||this.fable;r.views&&r.views[i]?(this._ViewInstance=r.views[i],this._OriginalDestination=this._ViewInstance.options.DefaultDestinationAddress,this._ViewInstance.options.DefaultDestinationAddress="#".concat(n),"function"==typeof this._ViewInstance.render&&this._ViewInstance.render()):t.innerHTML='<em>View "'.concat(i,'" not found</em>')}catch(e){this.log.warn("FlowCardPropertiesPanel-View render error: ".concat(e.message)),t.innerHTML="<em>View render error: ".concat(e.message,"</em>")}}else t.innerHTML="<em>No ViewHash configured</em>"}},{key:"marshalFromPanel",value:function(t){this._ViewInstance&&"function"==typeof this._ViewInstance.marshalFromView&&this._ViewInstance.marshalFromView()}},{key:"destroy",value:function(){this._ViewInstance&&this._OriginalDestination&&(this._ViewInstance.options.DefaultDestinationAddress=this._OriginalDestination),this._ViewInstance=null,this._OriginalDestination=null,_superPropGet(e,"destroy",this,3)([])}}])}(i);e.exports=n,e.exports.default_configuration=Object.assign({},i.default_configuration,{PanelType:"View",Configuration:{ViewHash:""}})},{"../PictFlowCardPropertiesPanel.js":11}],16:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowCSS"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowCSS",r._FlowView=o&&o.FlowView?o.FlowView:null,r}return _inherits(e,t),_createClass(e,[{key:"getContainerCSS",value:function(){return"\n\t\t.pict-flow-container {\n\t\t\t/* ── Design Tokens ─────────────────────────────────────\n\t\t\t Override these custom properties to theme the flow diagram.\n\t\t\t Node-type classes (.pict-flow-node-{type}) can scope-override\n\t\t\t any variable for per-type variation. */\n\n\t\t\t/* Text */\n\t\t\t--pf-text-primary: #2c3e50;\n\t\t\t--pf-text-heading: #1a252f;\n\t\t\t--pf-text-secondary: #7f8c8d;\n\t\t\t--pf-text-tertiary: #8e99a4;\n\t\t\t--pf-text-placeholder: #95a5a6;\n\n\t\t\t/* Node */\n\t\t\t--pf-node-body-fill: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-node-body-stroke: #d0d4d8;\n\t\t\t--pf-node-body-stroke-hover: #b0b8c0;\n\t\t\t--pf-node-body-stroke-width: 1;\n\t\t\t--pf-node-body-radius: 8px;\n\t\t\t--pf-node-shadow: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.10));\n\t\t\t--pf-node-shadow-hover: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));\n\t\t\t--pf-node-shadow-selected: drop-shadow(0 2px 8px rgba(52, 152, 219, 0.25));\n\t\t\t--pf-node-shadow-dragging: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.20));\n\t\t\t--pf-node-title-fill: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-node-title-size: 11.5px;\n\t\t\t--pf-node-title-weight: 600;\n\t\t\t--pf-node-title-bar-color: #2c3e50;\n\t\t\t--pf-node-type-label-fill: #a0a8b0;\n\t\t\t--pf-node-selected-stroke: #3498db;\n\n\t\t\t/* Node Variants */\n\t\t\t--pf-node-start-fill: #eafaf1;\n\t\t\t--pf-node-start-stroke: var(--theme-color-status-success, #27ae60);\n\t\t\t--pf-node-end-fill: #e8f8f5;\n\t\t\t--pf-node-end-stroke: #1abc9c;\n\t\t\t--pf-node-halt-fill: #fdedec;\n\t\t\t--pf-node-halt-stroke: var(--theme-color-status-error, #e74c3c);\n\t\t\t--pf-node-decision-fill: #fff9e6;\n\t\t\t--pf-node-decision-stroke: var(--theme-color-status-warning, #f39c12);\n\n\t\t\t/* Ports */\n\t\t\t--pf-port-input-fill: #3498db;\n\t\t\t--pf-port-output-fill: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-port-stroke: var(--theme-color-background-panel, #ffffff);\n\t\t\t--pf-port-stroke-width: 2;\n\t\t\t--pf-port-label-bg: rgba(255, 253, 240, 0.5);\n\t\t\t--pf-port-label-text: #2c3e50;\n\n\t\t\t/* Port Type Colors */\n\t\t\t--pf-port-event-in-fill: #3498db;\n\t\t\t--pf-port-event-out-fill: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-port-setting-fill: #e67e22;\n\t\t\t--pf-port-value-fill: #f1c40f;\n\t\t\t--pf-port-error-fill: var(--theme-color-status-error, #e74c3c);\n\n\t\t\t/* Connection Type Colors (match source port) */\n\t\t\t--pf-connection-event-in-stroke: #3498db;\n\t\t\t--pf-connection-event-out-stroke: var(--theme-color-status-success, #2ecc71);\n\t\t\t--pf-connection-setting-stroke: #e67e22;\n\t\t\t--pf-connection-value-stroke: #f1c40f;\n\t\t\t--pf-connection-error-stroke: var(--theme-color-status-error, #e74c3c);\n\n\t\t\t/* Connections */\n\t\t\t--pf-connection-stroke: #95a5a6;\n\t\t\t--pf-connection-stroke-hover: #7f8c8d;\n\t\t\t--pf-connection-selected-stroke: #3498db;\n\n\t\t\t/* Panels */\n\t\t\t--pf-panel-bg: #ffffff;\n\t\t\t--pf-panel-border: #d0d4d8;\n\t\t\t--pf-panel-radius: 8px;\n\t\t\t--pf-panel-shadow: 0 4px 12px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);\n\t\t\t--pf-panel-titlebar-bg: #f7f8fa;\n\t\t\t--pf-panel-titlebar-border: #e8eaed;\n\t\t\t--pf-panel-title-color: #2c3e50;\n\n\t\t\t/* Tabs */\n\t\t\t--pf-tab-text: #8e99a4;\n\t\t\t--pf-tab-text-hover: #5a6a7a;\n\t\t\t--pf-tab-active-border: var(--pf-node-selected-stroke);\n\t\t\t--pf-resize-handle-hover: #e0e3e6;\n\n\t\t\t/* Forms & Inputs */\n\t\t\t--pf-input-border: #d5d8dc;\n\t\t\t--pf-input-border-focus: #3498db;\n\t\t\t--pf-divider-light: #ecf0f1;\n\t\t\t--pf-divider-medium: #e8eaed;\n\n\t\t\t/* Buttons */\n\t\t\t--pf-button-border: #bdc3c7;\n\t\t\t--pf-button-hover-border: #95a5a6;\n\t\t\t--pf-button-hover-bg: #ecf0f1;\n\t\t\t--pf-button-active-bg: #d5dbdb;\n\t\t\t--pf-button-danger-text: #e74c3c;\n\t\t\t--pf-button-danger-hover-bg: #fdedec;\n\t\t\t--pf-button-close-color: #b0b8c0;\n\n\t\t\t/* Badges */\n\t\t\t--pf-badge-category-bg: #f0f2f4;\n\t\t\t--pf-badge-category-text: #6b7b8d;\n\t\t\t--pf-badge-code-bg: #eaf2f8;\n\t\t\t--pf-badge-code-text: #2980b9;\n\n\t\t\t/* Info Panel */\n\t\t\t--pf-port-item-bg: #f8f9fa;\n\n\t\t\t/* Toolbar */\n\t\t\t--pf-toolbar-bg: #ffffff;\n\t\t\t--pf-toolbar-border: var(--theme-color-border-default, #e0e0e0);\n\n\t\t\t/* Palette Cards */\n\t\t\t--pf-card-border: #d5d8dc;\n\t\t\t--pf-card-hover-bg: #eaf2f8;\n\t\t\t--pf-card-hover-shadow: 0 1px 3px rgba(52, 152, 219, 0.15);\n\n\t\t\t/* Canvas */\n\t\t\t--pf-canvas-bg: #fafafa;\n\t\t\t--pf-grid-stroke: var(--theme-color-border-light, #e8e8e8);\n\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tmin-height: 400px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-color: var(--pf-canvas-bg);\n\t\t\tborder: 1px solid var(--pf-toolbar-border);\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.pict-flow-svg-container {\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-svg {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-svg.panning {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-svg.connecting {\n\t\t\tcursor: crosshair;\n\t\t}\n\t\t.pict-flow-grid-pattern line {\n\t\t\tstroke: var(--pf-grid-stroke);\n\t\t\tstroke-width: 0.5;\n\t\t}\n\t\t"}},{key:"getNodeCSS",value:function(){return'\n\t\t.pict-flow-node {\n\t\t\tcursor: pointer;\n\t\t\tfilter: var(--pf-node-shadow);\n\t\t\ttransition: filter 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover {\n\t\t\tfilter: var(--pf-node-shadow-hover);\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node.selected {\n\t\t\tfilter: var(--pf-node-shadow-selected);\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-body {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node.dragging {\n\t\t\topacity: 0.9;\n\t\t\tcursor: grabbing;\n\t\t\tfilter: var(--pf-node-shadow-dragging);\n\t\t}\n\t\t.pict-flow-node-body {\n\t\t\tfill: var(--pf-node-body-fill);\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: var(--pf-node-body-stroke-width);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t\ttransition: stroke 0.2s, stroke-width 0.2s;\n\t\t}\n\t\t.pict-flow-node-title-bar {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t\trx: var(--pf-node-body-radius);\n\t\t\try: var(--pf-node-body-radius);\n\t\t}\n\t\t.pict-flow-node-title-bar-bottom {\n\t\t\tfill: var(--pf-node-title-bar-color);\n\t\t}\n\t\t.pict-flow-node-title {\n\t\t\tfill: var(--pf-node-title-fill);\n\t\t\tfont-size: var(--pf-node-title-size);\n\t\t\tfont-weight: var(--pf-node-title-weight);\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tletter-spacing: 0.2px;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-type-label {\n\t\t\tfill: var(--pf-node-type-label-fill);\n\t\t\tfont-size: 9.5px;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.3px;\n\t\t\tpointer-events: none;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-type-label {\n\t\t\topacity: 1;\n\t\t}\n\t\t.pict-flow-node-card-code {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-card-code {\n\t\t\topacity: 1;\n\t\t}\n\t\t/* Title-bar icon: invert SVG paths to white for dark title bars */\n\t\t.pict-flow-node-title-icon {\n\t\t\tfilter: brightness(0) invert(1);\n\t\t}\n\t\t'}},{key:"getBodyContentCSS",value:function(){return'\n\t\t.pict-flow-node-body-content {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-node-body-content-fo {\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.pict-flow-node-body-content-html {\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-node-body-content-canvas {\n\t\t\tdisplay: block;\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t'}},{key:"getNodeVariantCSS",value:function(){return"\n\t\t.pict-flow-node-decision .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-decision-fill);\n\t\t\tstroke: var(--pf-node-decision-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-start .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-start-fill);\n\t\t\tstroke: var(--pf-node-start-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-end .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-end-fill);\n\t\t\tstroke: var(--pf-node-end-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\tfill: var(--pf-node-halt-fill);\n\t\t\tstroke: var(--pf-node-halt-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\t\t"}},{key:"getPortCSS",value:function(){return'\n\t\t.pict-flow-port {\n\t\t\tcursor: crosshair;\n\t\t\ttransition: r 0.15s, filter 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));\n\t\t}\n\t\t.pict-flow-port.input {\n\t\t\tfill: var(--pf-port-input-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port.output {\n\t\t\tfill: var(--pf-port-output-fill);\n\t\t\tstroke: var(--pf-port-stroke);\n\t\t\tstroke-width: var(--pf-port-stroke-width);\n\t\t}\n\t\t.pict-flow-port:hover {\n\t\t\tr: 7;\n\t\t\tfilter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.20));\n\t\t}\n\t\t/* Port type color overrides */\n\t\t.pict-flow-port.port-type-event-in {\n\t\t\tfill: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-event-out {\n\t\t\tfill: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-setting {\n\t\t\tfill: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-value {\n\t\t\tfill: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-port.port-type-error {\n\t\t\tfill: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-port-label {\n\t\t\tfont-size: 8px;\n\t\t\tfont-weight: 600;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port label badge background */\n\t\t.pict-flow-port-label-bg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t/* Port labels on hover: hidden by default, revealed on node hover */\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover .pict-flow-port-label-bg {\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.2s;\n\t\t}\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label,\n\t\t.pict-flow-node-port-labels-hover:hover .pict-flow-port-label-bg {\n\t\t\topacity: 1;\n\t\t}\n\t\t'}},{key:"getConnectionCSS",value:function(){return"\n\t\t.pict-flow-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: pointer;\n\t\t\ttransition: stroke 0.15s;\n\t\t}\n\t\t.pict-flow-connection:hover {\n\t\t\tstroke: var(--pf-connection-stroke-hover);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t.pict-flow-connection.selected {\n\t\t\tstroke: var(--pf-connection-selected-stroke);\n\t\t\tstroke-width: 3;\n\t\t}\n\t\t/* Connection type color overrides (based on source port type) */\n\t\t.pict-flow-connection.conn-type-event-in {\n\t\t\tstroke: var(--pf-connection-event-in-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-event-out {\n\t\t\tstroke: var(--pf-connection-event-out-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-setting {\n\t\t\tstroke: var(--pf-connection-setting-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-value {\n\t\t\tstroke: var(--pf-connection-value-stroke);\n\t\t}\n\t\t.pict-flow-connection.conn-type-error {\n\t\t\tstroke: var(--pf-connection-error-stroke);\n\t\t}\n\t\t.pict-flow-connection-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 12;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-drag-connection {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-dasharray: 6 3;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t"}},{key:"getHandleCSS",value:function(){return"\n\t\t.pict-flow-connection-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-connection-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getTetherCSS",value:function(){return"\n\t\t.pict-flow-tether-line {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-connection-stroke);\n\t\t\tstroke-width: 1.5;\n\t\t\tstroke-dasharray: 6 4;\n\t\t\tpointer-events: visibleStroke;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-line.selected {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-tether-hitarea {\n\t\t\tfill: none;\n\t\t\tstroke: transparent;\n\t\t\tstroke-width: 10;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-tether-handle {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint {\n\t\t\tfill: var(--pf-panel-bg);\n\t\t\tstroke: var(--pf-port-setting-fill);\n\t\t\tstroke-width: 2;\n\t\t\tcursor: grab;\n\t\t\ttransition: r 0.15s;\n\t\t\tfilter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));\n\t\t}\n\t\t.pict-flow-tether-handle-midpoint:hover {\n\t\t\tr: 8;\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t\t"}},{key:"getPanelCSS",value:function(){return'\n\t\t.pict-flow-node-panel-indicator {\n\t\t\tfill: var(--pf-node-selected-stroke);\n\t\t\tstroke: none;\n\t\t\topacity: 0.6;\n\t\t\tcursor: pointer;\n\t\t\ttransition: opacity 0.15s;\n\t\t}\n\t\t.pict-flow-node-panel-indicator:hover {\n\t\t\topacity: 1.0;\n\t\t}\n\t\t.pict-flow-panel-foreign-object {\n\t\t\toverflow: visible;\n\t\t}\n\t\t.pict-flow-panel {\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-panel-border);\n\t\t\tborder-radius: var(--pf-panel-radius);\n\t\t\tbox-shadow: var(--pf-panel-shadow);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t\toverflow: hidden;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-panel-titlebar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 8px 12px;\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tcursor: grab;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-panel-titlebar.dragging {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-panel-title-text {\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 12px;\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tletter-spacing: 0.1px;\n\t\t}\n\t\t.pict-flow-panel-close-btn {\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-button-close-color);\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1;\n\t\t\tpadding: 4px;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.pict-flow-panel-close-btn:hover {\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tbackground-color: rgba(231, 76, 60, 0.08);\n\t\t}\n\t\t.pict-flow-panel-content {\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tmin-height: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.pict-flow-panel-tab-pane {\n\t\t\tpadding: 10px 12px;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t'}},{key:"getInfoPanelCSS",value:function(){return'\n\t\t.pict-flow-info-panel {\n\t\t\tpadding: 2px 0;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-info-panel-header {\n\t\t\tfont-size: 13px;\n\t\t\tfont-weight: 600;\n\t\t\tmargin-bottom: 6px;\n\t\t\tcolor: var(--pf-text-heading);\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon {\n\t\t\tfont-size: 14px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-info-panel-description {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-bottom: 10px;\n\t\t\tline-height: 1.45;\n\t\t}\n\t\t.pict-flow-info-panel-badges {\n\t\t\tmargin-bottom: 10px;\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.pict-flow-info-panel-badge {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 2px 8px;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t.pict-flow-info-panel-badge.category {\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tcolor: var(--pf-badge-category-text);\n\t\t}\n\t\t.pict-flow-info-panel-badge.code {\n\t\t\tbackground: var(--pf-badge-code-bg);\n\t\t\tcolor: var(--pf-badge-code-text);\n\t\t\tfont-family: "SF Mono", "Fira Code", monospace;\n\t\t}\n\t\t.pict-flow-info-panel-section {\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.pict-flow-info-panel-section-title {\n\t\t\tfont-size: 10px;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tmargin-bottom: 4px;\n\t\t\tpadding-bottom: 2px;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-info-panel-port {\n\t\t\tpadding: 3px 8px;\n\t\t\tbackground: var(--pf-port-item-bg);\n\t\t\tmargin-bottom: 3px;\n\t\t\tfont-size: 11px;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-info-panel-port.input {\n\t\t\tborder-left: 3px solid var(--pf-port-input-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.output {\n\t\t\tborder-left: 3px solid var(--pf-port-output-fill);\n\t\t}\n\t\t/* Info panel port type color overrides */\n\t\t.pict-flow-info-panel-port.port-type-event-in {\n\t\t\tborder-left-color: var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-event-out {\n\t\t\tborder-left-color: var(--pf-port-event-out-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-setting {\n\t\t\tborder-left-color: var(--pf-port-setting-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-value {\n\t\t\tborder-left-color: var(--pf-port-value-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.port-type-error {\n\t\t\tborder-left-color: var(--pf-port-error-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port-constraint {\n\t\t\tcolor: var(--pf-text-tertiary);\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t/* Port summary section appended below form panels */\n\t\t.pict-flow-port-summary {\n\t\t\tmargin-top: 12px;\n\t\t\tpadding-top: 8px;\n\t\t\tborder-top: 1px solid var(--pf-divider-medium);\n\t\t}\n\t\t.pict-flow-info-panel-port.event {\n\t\t\tborder-left: 3px solid var(--pf-port-event-in-fill);\n\t\t}\n\t\t.pict-flow-info-panel-port.value {\n\t\t\tborder-left: 3px solid var(--pf-port-value-fill);\n\t\t}\n\t\t'}},{key:"getNodePropsEditorCSS",value:function(){return"\n\t\t.pict-flow-node-props-fields {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.pict-flow-node-props-field {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.pict-flow-node-props-label {\n\t\t\tfont-size: 11px;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 72px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-node-props-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 11px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-flow-node-props-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-node-props-color {\n\t\t\twidth: 28px;\n\t\t\theight: 24px;\n\t\t\tpadding: 1px;\n\t\t\tcursor: pointer;\n\t\t\tflex: 0 0 28px;\n\t\t}\n\t\t"}},{key:"getPanelTabsCSS",value:function(){return"\n\t\t.pict-flow-panel-resize-handle {\n\t\t\theight: 6px;\n\t\t\tcursor: ns-resize;\n\t\t\tbackground: transparent;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-panel-resize-handle::after {\n\t\t\tcontent: '';\n\t\t\twidth: 24px;\n\t\t\theight: 2px;\n\t\t\tborder-radius: 1px;\n\t\t\tbackground: var(--pf-resize-handle-hover);\n\t\t\ttransition: background-color 0.15s, width 0.15s;\n\t\t}\n\t\t.pict-flow-panel-resize-handle:hover::after {\n\t\t\tbackground: var(--pf-button-hover-border);\n\t\t\twidth: 32px;\n\t\t}\n\t\t.pict-flow-panel-tabbar {\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-top: 1px solid var(--pf-panel-titlebar-border);\n\t\t\tbackground: var(--pf-panel-titlebar-bg);\n\t\t}\n\t\t.pict-flow-panel-tab {\n\t\t\tflex: 1;\n\t\t\tpadding: 5px 8px;\n\t\t\tfont-size: 11px;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--pf-tab-text);\n\t\t\tborder-top: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-top-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-panel-tab:hover {\n\t\t\tcolor: var(--pf-tab-text-hover);\n\t\t}\n\t\t.pict-flow-panel-tab.active {\n\t\t\tborder-top-color: var(--pf-node-selected-stroke);\n\t\t\tcolor: var(--pf-panel-title-color);\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.pict-flow-panel-help-content {\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 1.5;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-panel-help-content p {\n\t\t\tmargin: 0 0 8px 0;\n\t\t}\n\t\t"}},{key:"getFullscreenCSS",value:function(){return"\n\t\t.pict-flow-fullscreen {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100vw;\n\t\t\theight: 100vh;\n\t\t\tz-index: 9999;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t\tmin-height: 100vh;\n\t\t}\n\t\t.pict-flow-fullscreen .pict-flow-svg {\n\t\t\tmin-height: calc(100vh - 50px);\n\t\t}\n\t\t"}},{key:"getToolbarCSS",value:function(){return"\n\t\t.pict-flow-toolbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tborder-bottom: 1px solid var(--pf-toolbar-border);\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t.pict-flow-toolbar-group {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t\tpadding-right: 0.75em;\n\t\t\tborder-right: 1px solid var(--pf-toolbar-border);\n\t\t}\n\t\t.pict-flow-toolbar-group:last-child {\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.65em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-size: 0.85em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-toolbar-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tborder-color: var(--pf-button-hover-border);\n\t\t}\n\t\t.pict-flow-toolbar-btn:active {\n\t\t\tbackground-color: var(--pf-button-active-bg);\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-btn-text {\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-toolbar-btn-chevron {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.pict-flow-toolbar-right {\n\t\t\tmargin-left: auto;\n\t\t\tborder-right: none;\n\t\t\tpadding-right: 0;\n\t\t}\n\t\t.pict-flow-toolbar-label {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmargin-right: 0.25em;\n\t\t}\n\t\t.pict-flow-toolbar-select {\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--pf-button-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t"}},{key:"getPaletteCSS",value:function(){return"\n\t\t.pict-flow-palette-category {\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.pict-flow-palette-category:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.pict-flow-palette-category-label {\n\t\t\tfont-size: 0.7em;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tmargin-bottom: 0.35em;\n\t\t\tpadding-bottom: 0.2em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-palette-cards {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.35em;\n\t\t}\n\t\t.pict-flow-palette-card {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.6em;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: var(--pf-panel-bg);\n\t\t\tfont-size: 0.8em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;\n\t\t\tuser-select: none;\n\t\t\t-webkit-user-select: none;\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-palette-card:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-node-selected-stroke);\n\t\t\tbox-shadow: var(--pf-card-hover-shadow);\n\t\t}\n\t\t.pict-flow-palette-card.disabled {\n\t\t\topacity: 0.45;\n\t\t\tpointer-events: none;\n\t\t\tcursor: default;\n\t\t}\n\t\t.pict-flow-palette-card-icon {\n\t\t\tfont-size: 1.1em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-palette-card-swatch {\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tborder-radius: 2px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-flow-palette-card-title {\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-flow-palette-card-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.pict-flow-toolbar-select.layout-select {\n\t\t\tmin-width: 120px;\n\t\t\tmax-width: 200px;\n\t\t}\n\t\t"}},{key:"getPopupCSS",value:function(){return'\n\t\t.pict-flow-toolbar-popup-anchor {\n\t\t\tposition: relative;\n\t\t}\n\t\t.pict-flow-toolbar-popup {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1000;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tborder-radius: 6px;\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tmin-width: 240px;\n\t\t\tmax-height: 340px;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 0.35em 0;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.pict-flow-popup-search-wrapper {\n\t\t\tposition: relative;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder-bottom: 1px solid var(--pf-divider-light);\n\t\t}\n\t\t.pict-flow-popup-search-icon {\n\t\t\tposition: absolute;\n\t\t\tleft: 0.85em;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t\tpointer-events: none;\n\t\t\tline-height: 1;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.pict-flow-popup-search {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em 0.4em 2em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-search:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-list-item {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-list-item:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-list-item-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-list-item-label {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-list-item-code {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tfont-family: monospace;\n\t\t\tbackground: var(--pf-badge-category-bg);\n\t\t\tpadding: 0.1em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-flow-popup-divider {\n\t\t\theight: 1px;\n\t\t\tbackground: var(--pf-divider-light);\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-flow-popup-list-empty {\n\t\t\ttext-align: center;\n\t\t\tcolor: var(--pf-text-placeholder);\n\t\t\tpadding: 1.5em 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-flow-popup-layout-save {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-flow-popup-layout-save:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-save-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tflex-shrink: 0;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input {\n\t\t\tflex: 1;\n\t\t\tpadding: 0.35em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-layout-save-input:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 28px;\n\t\t\theight: 28px;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcursor: pointer;\n\t\t\tflex-shrink: 0;\n\t\t\ttransition: background-color 0.15s, border-color 0.15s;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-save-confirm:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-layout-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 0.45em 0.75em;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background-color 0.1s;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover {\n\t\t\tbackground-color: var(--pf-card-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-layout-name {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--pf-text-primary);\n\t\t}\n\t\t.pict-flow-popup-layout-delete {\n\t\t\tdisplay: none;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder: none;\n\t\t\tbackground: none;\n\t\t\tcolor: var(--pf-button-danger-text);\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-popup-layout-row:hover .pict-flow-popup-layout-delete {\n\t\t\tdisplay: inline-flex;\n\t\t}\n\t\t.pict-flow-popup-layout-delete:hover {\n\t\t\tbackground-color: var(--pf-button-danger-hover-bg);\n\t\t}\n\t\t.pict-flow-popup-settings-section {\n\t\t\tpadding: 0.5em 0.75em;\n\t\t}\n\t\t.pict-flow-popup-settings-label {\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.8em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.05em;\n\t\t\tmargin-bottom: 0.35em;\n\t\t}\n\t\t.pict-flow-popup-settings-select {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tborder: 1px solid var(--pf-input-border);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\tbackground: var(--pf-panel-bg);\n\t\t\tcolor: var(--pf-text-primary);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-flow-popup-settings-select:focus {\n\t\t\tborder-color: var(--pf-input-border-focus);\n\t\t}\n\t\t.pict-flow-popup-settings-slider-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.pict-flow-popup-settings-slider {\n\t\t\tflex: 1;\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\theight: 4px;\n\t\t\tbackground: var(--pf-input-border);\n\t\t\tborder-radius: 2px;\n\t\t\toutline: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-webkit-slider-thumb {\n\t\t\t-webkit-appearance: none;\n\t\t\tappearance: none;\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-flow-popup-settings-slider::-moz-range-thumb {\n\t\t\twidth: 14px;\n\t\t\theight: 14px;\n\t\t\tbackground: var(--pf-node-selected-stroke);\n\t\t\tborder-radius: 50%;\n\t\t\tcursor: pointer;\n\t\t\tborder: none;\n\t\t}\n\t\t.pict-flow-popup-settings-slider-value {\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: var(--pf-text-secondary);\n\t\t\tmin-width: 2.5em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t'}},{key:"getCollapsedToolbarCSS",value:function(){return"\n\t\t.pict-flow-toolbar-collapsed {\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: 8px;\n\t\t\tz-index: 100;\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-toolbar-collapsed.visible {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn {\n\t\t\twidth: 36px;\n\t\t\theight: 36px;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 2px 6px rgba(0,0,0,0.1);\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.pict-flow-toolbar-expand-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t\tbox-shadow: 0 2px 8px rgba(0,0,0,0.15);\n\t\t}\n\t\t"}},{key:"getFloatingToolbarCSS",value:function(){return"\n\t\t.pict-flow-floating-toolbar {\n\t\t\tposition: absolute;\n\t\t\tz-index: 100;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 2px;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 8px;\n\t\t\tborder: 1px solid var(--pf-card-border);\n\t\t\tbackground-color: var(--pf-toolbar-bg);\n\t\t\tbox-shadow: 0 4px 16px rgba(0,0,0,0.12);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t.pict-flow-floating-grip {\n\t\t\tcursor: grab;\n\t\t\tpadding: 4px;\n\t\t\tborder-radius: 4px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-grip:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-grip:active {\n\t\t\tcursor: grabbing;\n\t\t}\n\t\t.pict-flow-floating-btn {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: transparent;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\ttransition: background-color 0.15s;\n\t\t}\n\t\t.pict-flow-floating-btn:focus {\n\t\t\toutline: none;\n\t\t}\n\t\t.pict-flow-floating-btn:hover {\n\t\t\tbackground-color: var(--pf-button-hover-bg);\n\t\t}\n\t\t.pict-flow-floating-separator {\n\t\t\theight: 1px;\n\t\t\tbackground-color: var(--pf-divider-light);\n\t\t\tmargin: 2px 4px;\n\t\t}\n\t\t/* Collapsed floating toolbar — grip-only draggable square */\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-btn,\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-separator {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed {\n\t\t\tpadding: 0;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip {\n\t\t\twidth: 32px;\n\t\t\theight: 32px;\n\t\t\tpadding: 0;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.pict-flow-floating-toolbar.collapsed .pict-flow-floating-grip span {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t"}},{key:"getIconCSS",value:function(){return"\n\t\t.pict-flow-icon-svg {\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.pict-flow-palette-card-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-toolbar-btn-icon svg {\n\t\t\tdisplay: block;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pict-flow-info-panel-header.with-icon svg {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t\tmargin-right: 4px;\n\t\t}\n\t\t.pict-flow-panel-close-icon {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.pict-flow-panel-close-icon svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.pict-flow-palette-toggle-arrow svg {\n\t\t\tdisplay: block;\n\t\t}\n\t\t"}},{key:"getBracketNodeCSS",value:function(){return"\n\t\t/* Bracket outline path */\n\t\t.pict-flow-node-bracket {\n\t\t\tfill: none;\n\t\t\tstroke: var(--pf-node-body-stroke);\n\t\t\tstroke-width: 2;\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-linejoin: round;\n\t\t}\n\t\t.pict-flow-node.selected .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-selected-stroke);\n\t\t\tstroke-width: 2;\n\t\t}\n\t\t.pict-flow-node:hover .pict-flow-node-bracket {\n\t\t\tstroke: var(--pf-node-body-stroke-hover);\n\t\t\tstroke-width: 1.5;\n\t\t}\n\n\t\t/* Bracket fill rects: no stroke, no rounded corners.\n\t\t Uses parent-qualified selectors to beat variant rules\n\t\t (e.g. .pict-flow-node-start .pict-flow-node-body). */\n\t\t.pict-flow-node .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t\trx: 0;\n\t\t\try: 0;\n\t\t}\n\t\t/* Beat hover rule: .pict-flow-node:hover .pict-flow-node-body */\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node:hover .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t/* Beat selected rule: .pict-flow-node.selected .pict-flow-node-body */\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-fill,\n\t\t.pict-flow-node.selected .pict-flow-node-bracket-title-fill {\n\t\t\tstroke: none;\n\t\t\tstroke-width: 0;\n\t\t}\n\t\t"}},{key:"generateCSS",value:function(){var t=this.getContainerCSS()+this.getNodeCSS()+this.getBodyContentCSS()+this.getNodeVariantCSS()+this.getPortCSS()+this.getConnectionCSS()+this.getHandleCSS()+this.getTetherCSS()+this.getPanelCSS()+this.getInfoPanelCSS()+this.getNodePropsEditorCSS()+this.getPanelTabsCSS()+this.getBracketNodeCSS()+this.getFullscreenCSS()+this.getToolbarCSS()+this.getPaletteCSS()+this.getPopupCSS()+this.getCollapsedToolbarCSS()+this.getFloatingToolbarCSS()+this.getIconCSS();if(this._FlowView&&this._FlowView._ThemeProvider){var e=this._FlowView._ThemeProvider.getActiveTheme();if(e&&e.CSSVariables&&Object.keys(e.CSSVariables).length>0){var o=".pict-flow-container {\n";for(var i in e.CSSVariables)o+="\t"+i+": "+e.CSSVariables[i]+";\n";t+=o+="}\n"}e&&e.AdditionalCSS&&(t+=e.AdditionalCSS)}return t}},{key:"registerCSS",value:function(){this.fable&&this.fable.CSSMap?(this.fable.CSSMap.removeCSS("PictSectionFlow-CSS"),this.fable.CSSMap.addCSS("PictSectionFlow-CSS",this.generateCSS(),500,"PictProviderFlowCSS"),this.fable.CSSMap.injectCSS()):this.log.warn("PictProviderFlowCSS: CSSMap not available; CSS not registered.")}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],17:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowConnectorShapes",n._FlowView=o&&o.FlowView?o.FlowView:null,n._DefaultShapes={port:{ElementType:"circle",Attributes:{r:"5"},ClassName:"pict-flow-port"},"panel-indicator":{ElementType:"rect",Attributes:{rx:"2",ry:"2"},ClassName:"pict-flow-node-panel-indicator"},"connection-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection"},"connection-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-connection-hitarea"},"connection-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle"},"connection-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-connection-handle-midpoint"},"drag-connection":{ElementType:"path",Attributes:{},ClassName:"pict-flow-drag-connection"},"tether-path":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-line"},"tether-hitarea":{ElementType:"path",Attributes:{},ClassName:"pict-flow-tether-hitarea"},"tether-handle":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle"},"tether-handle-midpoint":{ElementType:"circle",Attributes:{r:"6"},ClassName:"pict-flow-tether-handle-midpoint"},"arrowhead-connection":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#95a5a6"},"arrowhead-connection-selected":{MarkerWidth:"5",MarkerHeight:"7",RefX:"7.5",RefY:"3.5",Points:"0 0, 5 3.5, 0 7",Fill:"#3498db"},"arrowhead-tether":{MarkerWidth:"4",MarkerHeight:"6",RefX:"6",RefY:"3",Points:"0 0, 4 3, 0 6",Fill:"#95a5a6"}},n._OriginalShapes=JSON.parse(JSON.stringify(n._DefaultShapes)),n}return _inherits(e,t),_createClass(e,[{key:"applyThemeOverrides",value:function(t){if(t&&"object"===_typeof(t))for(var e in t)this._DefaultShapes.hasOwnProperty(e)?Object.assign(this._DefaultShapes[e],t[e]):this._DefaultShapes[e]=t[e]}},{key:"resetToDefaults",value:function(){this._DefaultShapes=JSON.parse(JSON.stringify(this._OriginalShapes))}},{key:"getShapeConfig",value:function(t){return this._DefaultShapes.hasOwnProperty(t)?this._DefaultShapes[t]:null}},{key:"setShapeConfig",value:function(t,e){this._DefaultShapes[t]=e}},{key:"getShapeKeys",value:function(){return Object.keys(this._DefaultShapes)}},{key:"createPortElement",value:function(t,e,o){var i=this._DefaultShapes.port,n=this._FlowView._SVGHelperProvider.createSVGElement(i.ElementType),r=i.ClassName+" "+t.Direction;for(var a in t.PortType&&(r+=" port-type-"+t.PortType),n.setAttribute("class",r),n.setAttribute("cx",String(e.x)),n.setAttribute("cy",String(e.y)),i.Attributes)n.setAttribute(a,i.Attributes[a]);return n.setAttribute("data-port-hash",t.Hash),n.setAttribute("data-node-hash",o),n.setAttribute("data-port-direction",t.Direction),t.PortType&&n.setAttribute("data-port-type",t.PortType),n.setAttribute("data-element-type","port"),n}},{key:"createPanelIndicatorElement",value:function(t,e,o,i,n){var r=this._DefaultShapes["panel-indicator"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var s in a.setAttribute("class",r.ClassName),a.setAttribute("x",String(e)),a.setAttribute("y",String(o)),a.setAttribute("width",String(i)),a.setAttribute("height",String(n)),r.Attributes)a.setAttribute(s,r.Attributes[s]);return a.setAttribute("data-node-hash",t),a.setAttribute("data-element-type","panel-indicator"),a}},{key:"createConnectionPathElement",value:function(t,e,o,i){var n=this._DefaultShapes["connection-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(n.ElementType);r.setAttribute("class",n.ClassName+(o?" selected":"")),r.setAttribute("d",t),r.setAttribute("data-connection-hash",e),r.setAttribute("data-element-type","connection");o?this._DefaultShapes["arrowhead-connection-selected"]:this._DefaultShapes["arrowhead-connection"];var a=o?"flow-arrowhead-selected-"+i:"flow-arrowhead-"+i;return r.setAttribute("marker-end","url(#"+a+")"),r}},{key:"createConnectionHitAreaElement",value:function(t,e){var o=this._DefaultShapes["connection-hitarea"],i=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return i.setAttribute("class",o.ClassName),i.setAttribute("d",t),i.setAttribute("data-connection-hash",e),i.setAttribute("data-element-type","connection-hitarea"),i}},{key:"createHandleElement",value:function(t,e,o,i,n){var r=this._DefaultShapes[n]||this._DefaultShapes["connection-handle"],a=this._FlowView._SVGHelperProvider.createSVGElement(r.ElementType);for(var s in a.setAttribute("class",r.ClassName),a.setAttribute("cx",String(o)),a.setAttribute("cy",String(i)),r.Attributes)a.setAttribute(s,r.Attributes[s]);return a.setAttribute("data-handle-type",e),a}},{key:"createFullHandle",value:function(t,e,o,i,n,r,a,s){var l=this.createHandleElement(e,o,i,n,r);return l.setAttribute("data-element-type",a),l.setAttribute(s,e),t.appendChild(l),l}},{key:"createDragConnectionElement",value:function(t){var e=this._DefaultShapes["drag-connection"],o=this._FlowView._SVGHelperProvider.createSVGElement(e.ElementType);return o.setAttribute("class",e.ClassName),o.setAttribute("d",t),o}},{key:"createTetherPathElement",value:function(t,e,o,i){var n=this._DefaultShapes["tether-path"],r=this._FlowView._SVGHelperProvider.createSVGElement(n.ElementType);return r.setAttribute("class",n.ClassName+(o?" selected":"")),r.setAttribute("d",t),r.setAttribute("marker-end","url(#flow-tether-arrowhead-"+i+")"),r.setAttribute("data-element-type","tether"),r.setAttribute("data-panel-hash",e),r}},{key:"createTetherHitAreaElement",value:function(t,e){var o=this._DefaultShapes["tether-hitarea"],i=this._FlowView._SVGHelperProvider.createSVGElement(o.ElementType);return i.setAttribute("class",o.ClassName),i.setAttribute("d",t),i.setAttribute("data-element-type","tether-hitarea"),i.setAttribute("data-panel-hash",e),i}},{key:"generateMarkerDefs",value:function(t){var e=this._DefaultShapes["arrowhead-connection"],o=this._DefaultShapes["arrowhead-connection-selected"],i=this._DefaultShapes["arrowhead-tether"],n="";n+='<marker id="flow-arrowhead-'+t+'" markerWidth="'+e.MarkerWidth+'" markerHeight="'+e.MarkerHeight+'" refX="'+e.RefX+'" refY="'+e.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+e.Points+'" fill="'+e.Fill+'" /></marker>';var r={"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"};for(var a in r)n+='<marker id="flow-arrowhead-'+a+"-"+t+'" markerWidth="'+e.MarkerWidth+'" markerHeight="'+e.MarkerHeight+'" refX="'+e.RefX+'" refY="'+e.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+e.Points+'" fill="'+r[a]+'" /></marker>';return n+='<marker id="flow-arrowhead-selected-'+t+'" markerWidth="'+o.MarkerWidth+'" markerHeight="'+o.MarkerHeight+'" refX="'+o.RefX+'" refY="'+o.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+o.Points+'" fill="'+o.Fill+'" /></marker>',n+='<marker id="flow-tether-arrowhead-'+t+'" markerWidth="'+i.MarkerWidth+'" markerHeight="'+i.MarkerHeight+'" refX="'+i.RefX+'" refY="'+i.RefY+'" orient="auto" markerUnits="strokeWidth"><polygon points="'+i.Points+'" fill="'+i.Fill+'" /></marker>'}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],18:[function(t,e,o){var i=t("pict-provider"),n={ProviderIdentifier:"PictProviderFlowEventHandler"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowEventHandler",r._FlowView=o&&o.FlowView?o.FlowView:null,r._Handlers={},r}return _inherits(e,t),_createClass(e,[{key:"registerHandler",value:function(t,e,o){if("function"!=typeof e)return this.log.warn("PictProviderFlowEventHandler registerHandler: handler for '".concat(t,"' is not a function")),null;this._Handlers[t]||(this._Handlers[t]=[]);var i=o||"handler-".concat(this.fable.getUUID());return this._Handlers[t].push({Hash:i,Handler:e}),this.log.trace("PictProviderFlowEventHandler registered handler '".concat(i,"' for event '").concat(t,"'")),i}},{key:"removeHandler",value:function(t,e){if(!this._Handlers[t])return!1;var o=this._Handlers[t].findIndex(function(t){return t.Hash===e});return o>=0&&(this._Handlers[t].splice(o,1),!0)}},{key:"removeAllHandlers",value:function(t){t?this._Handlers[t]=[]:this._Handlers={}}},{key:"fireEvent",value:function(t,e){if(this.log.trace("PictProviderFlowEventHandler firing event '".concat(t,"'")),this._Handlers[t]&&0!==this._Handlers[t].length)for(var o=0;o<this._Handlers[t].length;o++){var i=this._Handlers[t][o];try{i.Handler(e,this._FlowView)}catch(e){this.log.error("PictProviderFlowEventHandler error in handler '".concat(i.Hash,"' for event '").concat(t,"': ").concat(e.message))}}}},{key:"hasHandlers",value:function(t){return!!(this._Handlers[t]&&this._Handlers[t].length>0)}},{key:"getHandlerCount",value:function(t){return this._Handlers[t]?this._Handlers[t].length:0}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-provider":8}],19:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowGeometry",n}return _inherits(e,t),_createClass(e,[{key:"getEdgeFromSide",value:function(t){switch(t){case"left-top":case"left":case"left-bottom":return"left";case"right-top":case"right":case"right-bottom":default:return"right";case"top-left":case"top":case"top-right":return"top";case"bottom-left":case"bottom":case"bottom-right":return"bottom"}}},{key:"sideDirection",value:function(t){switch(this.getEdgeFromSide(t)){case"left":return{dx:-1,dy:0};case"right":default:return{dx:1,dy:0};case"top":return{dx:0,dy:-1};case"bottom":return{dx:0,dy:1}}}},{key:"getEdgeCenter",value:function(t,e){switch(e){case"left":return{x:t.X,y:t.Y+t.Height/2};case"right":default:return{x:t.X+t.Width,y:t.Y+t.Height/2};case"top":return{x:t.X+t.Width/2,y:t.Y};case"bottom":return{x:t.X+t.Width/2,y:t.Y+t.Height}}}},{key:"getPortLocalPosition",value:function(t,e,o,i,n,r,a){var s=this.getEdgeFromSide(t),l=a?this._computeAdaptiveZone(t,a):this._getZoneFromSide(t),c=this._getZoneFromSide(t),d="start";if(c.start>=.5?d="end":c.start>=.17&&(d="center"),"left"===s||"right"===s){var p="left"===s?0:i,h=n-r-16,u=r+h*l.start,f=h*(l.end-l.start)-16*(o+1);f<0&&(f=0);var w=0;return"end"===d?w=f:"center"===d&&(w=f/2),{x:p,y:u+w+16*(e+1)}}var v="top"===s?0:n,g=i*l.start,y=i*(l.end-l.start)-16*(o+1);y<0&&(y=0);var b=0;return"end"===d?b=y:"center"===d&&(b=y/2),{x:g+b+16*(e+1),y:v}}},{key:"_getZoneFromSide",value:function(t){switch(t){case"left-top":case"right-top":case"top-left":case"bottom-left":return{start:0,end:.333};case"left":case"right":case"top":case"bottom":return{start:.333,end:.667};case"left-bottom":case"right-bottom":case"top-right":case"bottom-right":return{start:.667,end:1};default:return{start:0,end:1}}}},{key:"_getZoneKeysForEdge",value:function(t){switch(t){case"left":return["left-top","left","left-bottom"];case"right":default:return["right-top","right","right-bottom"];case"top":return["top-left","top","top-right"];case"bottom":return["bottom-left","bottom","bottom-right"]}}},{key:"_computeAdaptiveZone",value:function(t,e){for(var o=this.getEdgeFromSide(t),i=this._getZoneKeysForEdge(o),n=0,r={},a=0;a<i.length;a++){var s=i[a],l=e[s]||0,c=l>0?16*(l+1):0;r[s]=c,n+=c}if(0===n)return this._getZoneFromSide(t);for(var d=0,p=0;p<i.length;p++){var h=i[p],u=r[h]/n;if(h===t)return{start:d,end:d+u};d+=u}return this._getZoneFromSide(t)}},{key:"buildPortCountsBySide",value:function(t){var e={};if(!t||!Array.isArray(t))return e;for(var o=0;o<t.length;o++){var i=t[o].Side||("input"===t[o].Direction?"left":"right");e[i]||(e[i]=0),e[i]++}return e}},{key:"computeMinimumNodeHeight",value:function(t,e){if(!t||!Array.isArray(t)||0===t.length)return 0;var o=this.buildPortCountsBySide(t),i={};for(var n in o){var r=this.getEdgeFromSide(n);if("left"===r||"right"===r){var a=16*(o[n]+1);i[r]||(i[r]=0),i[r]+=a}}var s=0;for(var l in i){var c=e+16+i[l];c>s&&(s=c)}return Math.ceil(s)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],20:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowIcons"},r={ITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="6" r="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="6" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="18" cy="18" r="2.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 9v2M9.5 12.5L6 15.5M14.5 12.5L18 15.5" stroke="#2c3e50" stroke-width="2"/></svg>',SW:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M3 12h5M16 12h5M14.8 9.2l3.7-5.2M14.8 14.8l3.7 5.2" stroke="#2c3e50" stroke-width="2"/></svg>',EACH:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="3" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="14" width="7" height="7" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',FREAD:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M9 13h6M9 17h4" stroke="#2c3e50" stroke-width="2"/></svg>',FWRITE:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-7-7z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M13 2v7h7" stroke="#2c3e50" stroke-width="2"/><path d="M12 13v5M9.5 15.5L12 13l2.5 2.5" stroke="#2c3e50" stroke-width="2"/></svg>',LOG:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="7.5" cy="8" r="1" fill="#2c3e50"/><circle cx="7.5" cy="12" r="1" fill="#2c3e50"/><circle cx="7.5" cy="16" r="1" fill="#2c3e50"/><path d="M11 8h5.5M11 12h5.5M11 16h3.5" stroke="#2c3e50" stroke-width="2"/></svg>',GET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="10.5" cy="10.5" r="6.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-5.15-5.15" stroke="#2c3e50" stroke-width="2"/></svg>',SET:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4.5 1.5L4 16Z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M14 6l3 3" stroke="#2c3e50" stroke-width="2"/></svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6"/><path d="M9 21H3v-6"/><path d="M21 3l-7 7"/><path d="M3 21l7-7"/></svg>',"exit-fullscreen":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14h6v6"/><path d="M20 10h-6V4"/><path d="M14 10l7-7"/><path d="M3 21l7-7"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',"chevron-down":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/></svg>',cards:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="16" height="12" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M6 7V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-2" stroke="#2c3e50" stroke-width="2"/></svg>',layout:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="3" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="3" y="15" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="13" y="11" width="8" height="10" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/></svg>',collapse:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',expand:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="3" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',grip:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="#2c3e50"><circle cx="9" cy="5" r="1.5"/><circle cx="15" cy="5" r="1.5"/><circle cx="9" cy="12" r="1.5"/><circle cx="15" cy="12" r="1.5"/><circle cx="9" cy="19" r="1.5"/><circle cx="15" cy="19" r="1.5"/></svg>',settings:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3" fill="#d5e8f7"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v8M8 12h8" stroke="#2c3e50" stroke-width="2"/></svg>',trash:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M17 21v-8H7v8" stroke="#2c3e50" stroke-width="2"/><path d="M7 3v5h8" stroke="#2c3e50" stroke-width="2"/></svg>',"auto-layout":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="2" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="2" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><rect x="14" y="16" width="8" height="6" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 8v4M6 16v-4h12v4" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-in":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M11 8v6M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-out":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M21 21l-4.35-4.35" stroke="#2c3e50" stroke-width="2"/><path d="M8 11h6" stroke="#2c3e50" stroke-width="2"/></svg>',"zoom-fit":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7V3h4"/><path d="M17 3h4v4"/><path d="M21 17v4h-4"/><path d="M7 21H3v-4"/><rect x="7" y="7" width="10" height="10" rx="1.5" fill="#d5e8f7"/></svg>',dock:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="4" rx="1.5" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M12 20V11M8 14l4-4 4 4" stroke="#2c3e50" stroke-width="2"/></svg>',restore:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke="#2c3e50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/></svg>',"delete-node":'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" stroke="#2c3e50" stroke-width="2"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="#2c3e50" stroke-width="2"/><rect x="5" y="6" width="14" height="14" rx="2" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><path d="M10 11v6M14 11v6" stroke="#2c3e50" stroke-width="2"/></svg>',default:'<svg xmlns="http://www.w3.org/2000/svg" width="{FlowIconSize}" height="{FlowIconSize}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="4" fill="#d5e8f7" stroke="#2c3e50" stroke-width="2"/><circle cx="12" cy="12" r="2.5" fill="#2c3e50"/></svg>'},a=function(t){function e(t,o,i){var a;if(_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowIcons",a._FlowView=o&&o.FlowView?o.FlowView:null,a._Icons=JSON.parse(JSON.stringify(r)),o&&o.AdditionalIcons&&"object"===_typeof(o.AdditionalIcons))for(var s=Object.keys(o.AdditionalIcons),l=0;l<s.length;l++)a._Icons[s[l]]=o.AdditionalIcons[s[l]];return a}return _inherits(e,t),_createClass(e,[{key:"registerIconTemplates",value:function(){if(this.fable&&this.fable.TemplateProvider)for(var t=Object.keys(this._Icons),e=0;e<t.length;e++){var o="Flow-Icon-"+t[e];this.fable.TemplateProvider.getTemplate(o)||this.fable.TemplateProvider.addTemplate(o,this._Icons[t[e]])}else this.log.warn("PictProviderFlowIcons: TemplateProvider not available; icon templates not registered.")}},{key:"isEmojiIcon",value:function(t){if(!t||"string"!=typeof t)return!1;for(var e=0;e<t.length;e++)if(t.charCodeAt(e)>255)return!0;return!1}},{key:"resolveIconKey",value:function(t){return t?t.Icon&&this._Icons.hasOwnProperty(t.Icon)||t.Icon&&!this.isEmojiIcon(t.Icon)?t.Icon:t.Code&&this._Icons.hasOwnProperty(t.Code)?t.Code:"default":"default"}},{key:"getIconSVGMarkup",value:function(t,e){var o=e||16,i=t||"default";return(this._Icons[i]||this._Icons.default).replace(/\{FlowIconSize\}/g,String(o))}},{key:"renderIconIntoSVGGroup",value:function(t,e,o,i,n){if(!e)return null;var r=(n||16)/24,a=t||"default",s=this._Icons[a]||this._Icons.default;s=s.replace(/\{FlowIconSize\}/g,"24");try{var l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.innerHTML=s;var c=l.querySelector("svg");if(!c)return null;var d=document.createElementNS("http://www.w3.org/2000/svg","g");for(d.setAttribute("transform","translate("+o+","+i+") scale("+r+")"),d.setAttribute("pointer-events","none"),d.setAttribute("class","pict-flow-icon-svg");c.childNodes.length>0;)d.appendChild(c.childNodes[0]);return e.appendChild(d),d}catch(t){return this.log.warn("PictProviderFlowIcons renderIconIntoSVGGroup error: "+t.message),null}}},{key:"getIconKeys",value:function(){return Object.keys(this._Icons)}},{key:"hasIcon",value:function(t){return this._Icons.hasOwnProperty(t)}},{key:"registerIcon",value:function(t,e){return!(!t||!e)&&(this._Icons[t]=e,this.fable&&this.fable.TemplateProvider&&this.fable.TemplateProvider.addTemplate("Flow-Icon-"+t,e),!0)}}])}(i);e.exports=a,e.exports.default_configuration=n,e.exports.DefaultIcons=r},{"fable-serviceproviderbase":4}],21:[function(t,e,o){var i=t("pict-provider"),n={ProviderIdentifier:"PictProviderFlowLayouts"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowLayouts",r._FlowView=o&&o.FlowView?o.FlowView:null,o&&void 0!==o.StorageKey?r._StorageKey=o.StorageKey:r._FlowView&&r._FlowView.options&&r._FlowView.options.ViewIdentifier?r._StorageKey="pict-flow-layouts-".concat(r._FlowView.options.ViewIdentifier):r._StorageKey="pict-flow-layouts",r}return _inherits(e,t),_createClass(e,[{key:"storageWrite",value:function(t,e){if(!1===this._StorageKey)return e(null);try{return"undefined"!=typeof localStorage&&localStorage.setItem(this._StorageKey,JSON.stringify(t)),e(null)}catch(t){return this.log.warn("PictProviderFlowLayouts storageWrite error: ".concat(t.message)),e(t)}}},{key:"storageRead",value:function(t){if(!1===this._StorageKey)return t(null,[]);try{if("undefined"!=typeof localStorage){var e=localStorage.getItem(this._StorageKey);if(e){var o=JSON.parse(e);if(Array.isArray(o))return t(null,o)}}return t(null,[])}catch(e){return this.log.warn("PictProviderFlowLayouts storageRead error: ".concat(e.message)),t(e,[])}}},{key:"storageDelete",value:function(t){if(!1===this._StorageKey)return t(null);try{return"undefined"!=typeof localStorage&&localStorage.removeItem(this._StorageKey),t(null)}catch(e){return this.log.warn("PictProviderFlowLayouts storageDelete error: ".concat(e.message)),t(e)}}},{key:"loadPersistedLayouts",value:function(){var t=this;this.storageRead(function(e,o){if(!e&&Array.isArray(o)&&0!==o.length&&t._FlowView&&t._FlowView._FlowData){for(var i=t._FlowView._FlowData.SavedLayouts,n={},r=0;r<i.length;r++)n[i[r].Hash]=!0;for(var a=0,s=0;s<o.length;s++)n[o[s].Hash]||(i.push(o[s]),a++);a>0&&t.log.trace("PictProviderFlowLayouts loaded ".concat(a," persisted layout(s)"))}})}},{key:"saveLayout",value:function(t){var e=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts saveLayout: no FlowView reference"),null;for(var o=this._FlowView._FlowData,i="layout-".concat(this.fable.getUUID()),n={},r={},a=0;a<o.Nodes.length;a++){var s=o.Nodes[a];n[s.Hash]={X:s.X,Y:s.Y,Width:s.Width,Height:s.Height,Title:s.Title},s.Style&&Object.keys(s.Style).length>0&&(n[s.Hash].Style=JSON.parse(JSON.stringify(s.Style)))}for(var l=0;l<o.OpenPanels.length;l++){var c=o.OpenPanels[l];r[c.NodeHash]={X:c.X,Y:c.Y,Width:c.Width,Height:c.Height}}var d={Hash:i,Name:t||"Untitled Layout",CreatedAt:(new Date).toISOString(),NodePositions:n,PanelPositions:r,ViewState:{PanX:o.ViewState.PanX,PanY:o.ViewState.PanY,Zoom:o.ViewState.Zoom}};return o.SavedLayouts.push(d),this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(t){t&&e.log.warn("PictProviderFlowLayouts: failed to persist after save: ".concat(t.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutSaved",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts saved layout '".concat(d.Name,"' (").concat(d.Hash,")")),d}},{key:"restoreLayout",value:function(t){if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts restoreLayout: no FlowView reference"),!1;var e=this._FlowView._FlowData,o=e.SavedLayouts.find(function(e){return e.Hash===t});if(!o)return this.log.warn("PictProviderFlowLayouts restoreLayout: layout '".concat(t,"' not found")),!1;for(var i=[],n=[],r=0;r<e.Nodes.length;r++){var a=e.Nodes[r],s=o.NodePositions[a.Hash];s?(a.X=s.X,a.Y=s.Y,"number"==typeof s.Width&&(a.Width=s.Width),"number"==typeof s.Height&&(a.Height=s.Height),"string"==typeof s.Title&&(a.Title=s.Title),s.Style&&"object"===_typeof(s.Style)&&(a.Style=JSON.parse(JSON.stringify(s.Style))),i.push(a)):n.push(a)}if(o.PanelPositions)for(var l=0;l<e.OpenPanels.length;l++){var c=e.OpenPanels[l],d=o.PanelPositions[c.NodeHash];d&&(c.X=d.X,c.Y=d.Y,"number"==typeof d.Width&&(c.Width=d.Width),"number"==typeof d.Height&&(c.Height=d.Height))}return n.length>0&&this._FlowView._LayoutService&&this._FlowView._LayoutService.autoLayoutSubset(n,i,e.Connections),o.ViewState&&("number"==typeof o.ViewState.PanX&&(e.ViewState.PanX=o.ViewState.PanX),"number"==typeof o.ViewState.PanY&&(e.ViewState.PanY=o.ViewState.PanY),"number"==typeof o.ViewState.Zoom&&(e.ViewState.Zoom=o.ViewState.Zoom)),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutRestored",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",e)),this.log.trace("PictProviderFlowLayouts restored layout '".concat(o.Name,"' (").concat(o.Hash,")")),!0}},{key:"deleteLayout",value:function(t){var e=this;if(!this._FlowView)return this.log.warn("PictProviderFlowLayouts deleteLayout: no FlowView reference"),!1;var o=this._FlowView._FlowData,i=o.SavedLayouts.findIndex(function(e){return e.Hash===t});if(i<0)return this.log.warn("PictProviderFlowLayouts deleteLayout: layout '".concat(t,"' not found")),!1;var n=o.SavedLayouts.splice(i,1)[0];return this._FlowView.marshalFromView(),this.storageWrite(o.SavedLayouts,function(t){t&&e.log.warn("PictProviderFlowLayouts: failed to persist after delete: ".concat(t.message))}),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onLayoutDeleted",n),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",o)),this.log.trace("PictProviderFlowLayouts deleted layout '".concat(n.Name,"' (").concat(n.Hash,")")),!0}},{key:"getLayouts",value:function(){return this._FlowView?this._FlowView._FlowData.SavedLayouts:[]}},{key:"getLayout",value:function(t){return this._FlowView&&this._FlowView._FlowData.SavedLayouts.find(function(e){return e.Hash===t})||null}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-provider":8}],22:[function(t,e,o){var i=t("pict-provider"),n={default:{Hash:"default",Label:"Default",DefaultWidth:180,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Out"}],TitleBarColor:"#2c3e50",BodyStyle:{}},start:{Hash:"start",Label:"Start",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"output",Side:"right",Label:"Out"}],TitleBarColor:"#27ae60",BodyStyle:{fill:"#eafaf1",stroke:"#27ae60"}},end:{Hash:"end",Label:"End",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],TitleBarColor:"#1abc9c",BodyStyle:{fill:"#e8f8f5",stroke:"#1abc9c"}},halt:{Hash:"halt",Label:"Halt",DefaultWidth:140,DefaultHeight:80,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"}],TitleBarColor:"#e74c3c",BodyStyle:{fill:"#fdedec",stroke:"#e74c3c"}},decision:{Hash:"decision",Label:"Decision",DefaultWidth:200,DefaultHeight:100,DefaultPorts:[{Hash:null,Direction:"input",Side:"left",Label:"In"},{Hash:null,Direction:"output",Side:"right",Label:"Yes"},{Hash:null,Direction:"output",Side:"bottom",Label:"No"}],TitleBarColor:"#f39c12",BodyStyle:{fill:"#fff9e6",stroke:"#f39c12"}}},r={ProviderIdentifier:"PictProviderFlowNodeTypes"},a=function(t){function e(t,o,i){var a;if(_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},r,o),i])).serviceType="PictProviderFlowNodeTypes",a._FlowView=o&&o.FlowView?o.FlowView:null,o&&!1===o.IncludeDefaultNodeTypes?a._NodeTypes={}:a._NodeTypes=JSON.parse(JSON.stringify(n)),o&&o.AdditionalNodeTypes&&"object"===_typeof(o.AdditionalNodeTypes))for(var s=Object.keys(o.AdditionalNodeTypes),l=0;l<s.length;l++){var c=o.AdditionalNodeTypes[s[l]];a._NodeTypes[s[l]]=Object.assign({},a._NodeTypes[s[l]]||{},JSON.parse(JSON.stringify(c))),c.BodyContent&&"function"==typeof c.BodyContent.RenderCallback&&(a._NodeTypes[s[l]].BodyContent||(a._NodeTypes[s[l]].BodyContent={}),a._NodeTypes[s[l]].BodyContent.RenderCallback=c.BodyContent.RenderCallback)}return a}return _inherits(e,t),_createClass(e,[{key:"getNodeType",value:function(t){return this._NodeTypes[t]||this._NodeTypes.default}},{key:"registerNodeType",value:function(t){return t&&t.Hash?(this._NodeTypes[t.Hash]=Object.assign({},this._NodeTypes[t.Hash]||{},t),!0):(this.log.warn("PictProviderFlowNodeTypes registerNodeType: invalid config (missing Hash)"),!1)}},{key:"removeNodeType",value:function(t){return"default"===t?(this.log.warn("PictProviderFlowNodeTypes: cannot remove the default node type"),!1):!!this._NodeTypes[t]&&(delete this._NodeTypes[t],!0)}},{key:"getNodeTypes",value:function(){return JSON.parse(JSON.stringify(this._NodeTypes))}},{key:"getNodeTypeList",value:function(){return Object.keys(this._NodeTypes)}},{key:"getEnabledCards",value:function(){for(var t=[],e=Object.keys(this._NodeTypes),o=0;o<e.length;o++){var i=this._NodeTypes[e[o]];i.CardMetadata&&!1!==i.CardMetadata.Enabled&&t.push(JSON.parse(JSON.stringify(i)))}return t}},{key:"getCardsByCategory",value:function(){for(var t=this.getEnabledCards(),e={},o=0;o<t.length;o++){var i=t[o].CardMetadata&&t[o].CardMetadata.Category?t[o].CardMetadata.Category:"General";e[i]||(e[i]=[]),e[i].push(t[o])}return e}},{key:"isFlowCard",value:function(t){var e=this._NodeTypes[t];return!(!e||!e.CardMetadata)}}])}(i);e.exports=a,e.exports.default_configuration=r,e.exports.DefaultNodeTypes=n},{"pict-provider":8}],23:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowNoise"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowNoise",r}return _inherits(e,t),_createClass(e,[{key:"hashString",value:function(t){for(var e=5381,o=0;o<t.length;o++)e=(e<<5)+e+t.charCodeAt(o),e&=e;return e>>>0}},{key:"seededRandom",value:function(t){var e=0|t;return function(){e=e+1831565813|0;var t=Math.imul(e^e>>>15,1|e);return(((t=t+Math.imul(t^t>>>7,61|t)^t)^t>>>14)>>>0)/4294967296}}},{key:"jitterPoint",value:function(t,e,o,i){return o<=0?{x:t,y:e}:{x:t+o*(i()-.5)*2,y:e+o*(i()-.5)*2}}},{key:"generateBracketPath",value:function(t,e,o,i,n,r){var a=this,s=this.seededRandom(this.hashString(r||"default")),l=o||18,c=t,d=e,p=function(t,e){return a.jitterPoint(t,e,n,s)},h=p(l,0),u=p(0,0),f=p(0,d),w=p(l,d),v=p(c-l,0),g=p(c,0),y=p(c,d),b=p(c-l,d),m="";return m+="M ".concat(h.x.toFixed(1)," ").concat(h.y.toFixed(1)),m+=" L ".concat(u.x.toFixed(1)," ").concat(u.y.toFixed(1)),m+=" L ".concat(f.x.toFixed(1)," ").concat(f.y.toFixed(1)),m+=" L ".concat(w.x.toFixed(1)," ").concat(w.y.toFixed(1)),m+=" M ".concat(v.x.toFixed(1)," ").concat(v.y.toFixed(1)),m+=" L ".concat(g.x.toFixed(1)," ").concat(g.y.toFixed(1)),m+=" L ".concat(y.x.toFixed(1)," ").concat(y.y.toFixed(1)),m+=" L ".concat(b.x.toFixed(1)," ").concat(b.y.toFixed(1))}},{key:"jitterPath",value:function(t,e,o){if(e<=0||!t)return t;var i=this.seededRandom(this.hashString(o||"path")),n=t.match(/[MLCQZmlcqz]|[-+]?[0-9]*\.?[0-9]+/g);if(!n)return t;for(var r=[],a=0;a<n.length;a++)/^[-+]?[0-9]*\.?[0-9]+$/.test(n[a])&&r.push(a);for(var s=0;s<r.length-1;s+=2){var l=r[s],c=r[s+1],d=e;0===s||s>=r.length-2?d=.15*e:(2===s||s>=r.length-4)&&(d=.5*e);var p=parseFloat(n[l]),h=parseFloat(n[c]),u=this.jitterPoint(p,h,d,i);n[l]=u.x.toFixed(1),n[c]=u.y.toFixed(1)}for(var f="",w=0;w<n.length;w++)w>0&&/^[MLCQZmlcqz]$/.test(n[w])?f+=" "+n[w]:f+=w>0?" "+n[w]:n[w];return f}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],24:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowPanelChrome",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"createPanelForeignObject",value:function(t,e){var o=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");o.setAttribute("class","pict-flow-panel-foreign-object"),o.setAttribute("data-panel-hash",t.Hash),o.setAttribute("data-node-hash",t.NodeHash),o.setAttribute("x",String(t.X)),o.setAttribute("y",String(t.Y)),o.setAttribute("width",String(t.Width)),o.setAttribute("height",String(t.Height));var i=this._FlowView.pict||this._FlowView.fable,n=t.Title||"Properties",r=i.parseTemplateByHash("Flow-PanelChrome-Template",{Hash:t.Hash,Title:n});o.innerHTML=r;var a=o.querySelector(".pict-flow-panel-close-icon");a&&this._FlowView&&this._FlowView._IconProvider?a.innerHTML=this._FlowView._IconProvider.getIconSVGMarkup("close",12):a&&(a.textContent="✕");var s=o.querySelector(".pict-flow-panel-content");s&&(s.addEventListener("pointerdown",function(t){t.stopPropagation()}),s.addEventListener("wheel",function(t){t.stopPropagation()}));var l=o.querySelector(".pict-flow-panel-tabbar");return l&&(l.addEventListener("pointerdown",function(t){t.stopPropagation()}),l.addEventListener("wheel",function(t){t.stopPropagation()})),e.appendChild(o),o.querySelector('.pict-flow-panel-tab-pane[data-tab="properties"]')}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],25:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictProviderFlowSVGHelpers",n}return _inherits(e,t),_createClass(e,[{key:"createSVGElement",value:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],26:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={ProviderIdentifier:"PictProviderFlowTheme"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},n,o),i])).serviceType="PictProviderFlowTheme",r._FlowView=o&&o.FlowView?o.FlowView:null,r._ActiveThemeKey="default",r._NoiseLevel=0,r._Themes={},r._registerBuiltInThemes(),r}return _inherits(e,t),_createClass(e,[{key:"_registerBuiltInThemes",value:function(){this._Themes.default={Key:"default",Label:"Modern",CSSVariables:{},AdditionalCSS:"",NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{}},this._Themes.sketch={Key:"sketch",Label:"Sketch",CSSVariables:{"--pf-node-body-fill":"#fffef5","--pf-node-body-stroke":"#444444","--pf-node-body-stroke-width":"1.5","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"#f0ece0","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#fffef5","--pf-connection-stroke":"#555555","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#fffef5","--pf-grid-stroke":"#e8e4d8","--pf-panel-bg":"#fffef5","--pf-panel-border":"#ccccaa","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.08)","--pf-panel-titlebar-bg":"#f0ece0","--pf-panel-titlebar-border":"#ccccaa","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-panel-title-text,\n\t\t\t\t.pict-flow-panel-node-props-title,\n\t\t\t\t.pict-flow-info-panel {\n\t\t\t\t\tfont-family: "Courier New", "Courier", monospace !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:20,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.4,MaxJitterPx:4,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#555555"},"arrowhead-connection-selected":{Fill:"#2255aa"}}},this._Themes.blueprint={Key:"blueprint",Label:"Blueprint",CSSVariables:{"--pf-node-body-fill":"rgba(255,255,255,0.05)","--pf-node-body-stroke":"#ffffff","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"400","--pf-node-title-bar-color":"rgba(255,255,255,0.1)","--pf-node-type-label-fill":"rgba(255,255,255,0.5)","--pf-node-selected-stroke":"#ffdd44","--pf-port-input-fill":"#88bbff","--pf-port-output-fill":"#88ffbb","--pf-port-stroke":"#1a3a6a","--pf-connection-stroke":"rgba(255,255,255,0.6)","--pf-connection-selected-stroke":"#ffdd44","--pf-canvas-bg":"#1a3a6a","--pf-grid-stroke":"rgba(255,255,255,0.08)","--pf-panel-bg":"#1a3a6a","--pf-panel-border":"rgba(255,255,255,0.3)","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"rgba(255,255,255,0.05)","--pf-panel-titlebar-border":"rgba(255,255,255,0.15)","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 1px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #0d2244;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #142e54;\n\t\t\t\t\tborder-bottom-color: rgba(255,255,255,0.15);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.05);\n\t\t\t\t\tborder-color: rgba(255,255,255,0.2);\n\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: rgba(255,255,255,0.1);\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:18,TitleSeparator:!0},ConnectionConfig:{StrokeDashArray:"8 4",StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"rgba(255,255,255,0.6)"},"arrowhead-connection-selected":{Fill:"#ffdd44"}}},this._Themes.mono={Key:"mono",Label:"Monochrome",CSSVariables:{"--pf-node-body-fill":"#ffffff","--pf-node-body-stroke":"#000000","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"#000000","--pf-node-type-label-fill":"#888888","--pf-node-selected-stroke":"#444444","--pf-port-input-fill":"#000000","--pf-port-output-fill":"#666666","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#000000","--pf-connection-selected-stroke":"#444444","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#eeeeee","--pf-panel-bg":"#ffffff","--pf-panel-border":"#000000","--pf-panel-radius":"0px","--pf-panel-shadow":"none","--pf-panel-titlebar-bg":"#f0f0f0","--pf-panel-titlebar-border":"#000000","--pf-panel-title-color":"#000000"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title {\n\t\t\t\t\tfont-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#000000"},"arrowhead-connection-selected":{Fill:"#444444"}}},this._Themes["retro-80s"]={Key:"retro-80s",Label:"80s Retro",CSSVariables:{"--pf-node-body-fill":"#1a0a2e","--pf-node-body-stroke":"#ff00ff","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(0 0 8px rgba(255,0,255,0.4))","--pf-node-shadow-hover":"drop-shadow(0 0 12px rgba(255,0,255,0.6))","--pf-node-shadow-selected":"drop-shadow(0 0 16px rgba(0,255,255,0.5))","--pf-node-shadow-dragging":"drop-shadow(0 0 20px rgba(255,0,255,0.7))","--pf-node-title-fill":"#00ffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#2a0a4e","--pf-node-type-label-fill":"#ff66ff","--pf-node-selected-stroke":"#00ffff","--pf-port-input-fill":"#ff00ff","--pf-port-output-fill":"#00ff66","--pf-port-stroke":"#1a0a2e","--pf-connection-stroke":"#ff00ff","--pf-connection-selected-stroke":"#00ffff","--pf-canvas-bg":"#0a0015","--pf-grid-stroke":"#1a0a2e","--pf-panel-bg":"#1a0a2e","--pf-panel-border":"#ff00ff","--pf-panel-radius":"0px","--pf-panel-shadow":"0 0 20px rgba(255,0,255,0.3)","--pf-panel-titlebar-bg":"#2a0a4e","--pf-panel-titlebar-border":"#ff00ff","--pf-panel-title-color":"#00ffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "Courier New", monospace !important;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tletter-spacing: 0.5px;\n\t\t\t\t}\n\t\t\t\t.pict-flow-connection {\n\t\t\t\t\tfilter: drop-shadow(0 0 3px rgba(255,0,255,0.4));\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) hue-rotate(180deg) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-bottom-color: #ff00ff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #1a0a2e;\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t\tcolor: #00ffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: #2a0a4e;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder-color: #ff00ff;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#ff00ff"},"arrowhead-connection-selected":{Fill:"#00ffff"}}},this._Themes["retro-90s"]={Key:"retro-90s",Label:"90s Retro",CSSVariables:{"--pf-node-body-fill":"#c0c0c0","--pf-node-body-stroke":"#808080","--pf-node-body-stroke-width":"1","--pf-node-body-radius":"0px","--pf-node-shadow":"drop-shadow(2px 2px 0px #404040)","--pf-node-shadow-hover":"drop-shadow(3px 3px 0px #404040)","--pf-node-shadow-selected":"drop-shadow(2px 2px 0px #008080)","--pf-node-shadow-dragging":"drop-shadow(4px 4px 0px #404040)","--pf-node-title-fill":"#ffffff","--pf-node-title-size":"11px","--pf-node-title-weight":"700","--pf-node-title-bar-color":"#000080","--pf-node-type-label-fill":"#606060","--pf-node-selected-stroke":"#008080","--pf-port-input-fill":"#000080","--pf-port-output-fill":"#008000","--pf-port-stroke":"#c0c0c0","--pf-connection-stroke":"#808080","--pf-connection-selected-stroke":"#008080","--pf-canvas-bg":"#008080","--pf-grid-stroke":"rgba(0,0,0,0.06)","--pf-panel-bg":"#c0c0c0","--pf-panel-border":"#808080","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px #404040","--pf-panel-titlebar-bg":"#000080","--pf-panel-titlebar-border":"#c0c0c0","--pf-panel-title-color":"#ffffff"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: "MS Sans Serif", "Arial", sans-serif !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: brightness(0) invert(1) !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder-bottom: 2px solid #808080;\n\t\t\t\t\tborder-top: 1px solid #ffffff;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn {\n\t\t\t\t\tbackground-color: #c0c0c0;\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t\tcolor: #000000;\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:hover {\n\t\t\t\t\tbackground-color: var(--theme-color-border-default, #d0d0d0);\n\t\t\t\t}\n\t\t\t\t.pict-flow-toolbar-btn:active {\n\t\t\t\t\tborder-style: inset;\n\t\t\t\t}\n\t\t\t\t.pict-flow-container {\n\t\t\t\t\tborder: 2px outset #c0c0c0;\n\t\t\t\t\tborder-radius: 0;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"rect",BracketConfig:null,ConnectionConfig:{StrokeDashArray:null,StrokeWidth:2,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!1,DefaultLevel:0,MaxJitterPx:0,AffectsNodes:!1,AffectsConnections:!1},ShapeOverrides:{"arrowhead-connection":{Fill:"#808080"},"arrowhead-connection-selected":{Fill:"#008080"}}},this._Themes.whiteboard={Key:"whiteboard",Label:"Whiteboard",CSSVariables:{"--pf-node-body-fill":"transparent","--pf-node-body-stroke":"#555555","--pf-node-body-stroke-width":"2","--pf-node-body-radius":"0px","--pf-node-shadow":"none","--pf-node-shadow-hover":"none","--pf-node-shadow-selected":"none","--pf-node-shadow-dragging":"none","--pf-node-title-fill":"#333333","--pf-node-title-size":"12px","--pf-node-title-weight":"600","--pf-node-title-bar-color":"transparent","--pf-node-type-label-fill":"#999999","--pf-node-selected-stroke":"#2255aa","--pf-port-input-fill":"#5577bb","--pf-port-output-fill":"#55aa77","--pf-port-stroke":"#ffffff","--pf-connection-stroke":"#888888","--pf-connection-selected-stroke":"#2255aa","--pf-canvas-bg":"#ffffff","--pf-grid-stroke":"#f0f0f0","--pf-panel-bg":"#ffffff","--pf-panel-border":"#cccccc","--pf-panel-radius":"0px","--pf-panel-shadow":"2px 2px 0px rgba(0,0,0,0.06)","--pf-panel-titlebar-bg":"#f8f8f8","--pf-panel-titlebar-border":"#e0e0e0","--pf-panel-title-color":"#333333"},AdditionalCSS:'\n\t\t\t\t.pict-flow-node-title,\n\t\t\t\t.pict-flow-node-type-label,\n\t\t\t\t.pict-flow-port-label,\n\t\t\t\t.pict-flow-node-card-code {\n\t\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;\n\t\t\t\t}\n\t\t\t\t/* Node-type bracket colors — each type gets its own bracket color */\n\t\t\t\t.pict-flow-node-start .pict-flow-node-bracket { stroke: var(--theme-color-status-success, #27ae60); }\n\t\t\t\t.pict-flow-node-end .pict-flow-node-bracket { stroke: #1abc9c; }\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-bracket { stroke: var(--theme-color-status-error, #e74c3c); }\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-bracket { stroke: var(--theme-color-status-warning, #f39c12); }\n\t\t\t\t.pict-flow-node-default .pict-flow-node-bracket { stroke: #3498db; }\n\t\t\t\t.pict-flow-node-action .pict-flow-node-bracket { stroke: #2c3e50; }\n\t\t\t\t/* Override variant rules: no fills/strokes on body rects in whiteboard */\n\t\t\t\t.pict-flow-node-decision .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-start .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-end .pict-flow-node-body,\n\t\t\t\t.pict-flow-node-halt .pict-flow-node-body {\n\t\t\t\t\tfill: transparent;\n\t\t\t\t\tstroke: transparent;\n\t\t\t\t\tstroke-width: 0;\n\t\t\t\t}\n\t\t\t\t/* Title bar fills transparent too */\n\t\t\t\t.pict-flow-node .pict-flow-node-bracket-title-fill {\n\t\t\t\t\tfill: transparent !important;\n\t\t\t\t}\n\t\t\t\t.pict-flow-node-title-icon {\n\t\t\t\t\tfilter: none !important;\n\t\t\t\t}\n\t\t\t',NodeBodyMode:"bracket",BracketConfig:{SerifLength:22,TitleSeparator:!1},ConnectionConfig:{StrokeDashArray:null,StrokeWidth:1.5,ArrowheadStyle:"triangle"},NoiseConfig:{Enabled:!0,DefaultLevel:.3,MaxJitterPx:3,AffectsNodes:!0,AffectsConnections:!0},ShapeOverrides:{"arrowhead-connection":{Fill:"#888888"},"arrowhead-connection-selected":{Fill:"#2255aa"}}}}},{key:"getActiveTheme",value:function(){return this._Themes[this._ActiveThemeKey]||this._Themes.default}},{key:"getActiveThemeKey",value:function(){return this._ActiveThemeKey}},{key:"setTheme",value:function(t){if(!this._Themes[t])return this.log.warn("PictProviderFlowTheme: theme '".concat(t,"' not found")),!1;this._ActiveThemeKey=t;var e=this._Themes[t];return e.NoiseConfig&&"number"==typeof e.NoiseConfig.DefaultLevel?this._NoiseLevel=e.NoiseConfig.DefaultLevel:this._NoiseLevel=0,this._FlowView&&this._FlowView._ConnectorShapesProvider&&(this._FlowView._ConnectorShapesProvider.resetToDefaults(),e.ShapeOverrides&&Object.keys(e.ShapeOverrides).length>0&&this._FlowView._ConnectorShapesProvider.applyThemeOverrides(e.ShapeOverrides)),this.log.trace("PictProviderFlowTheme: switched to '".concat(t,"'")),!0}},{key:"getNoiseLevel",value:function(){return this._NoiseLevel}},{key:"setNoiseLevel",value:function(t){this._NoiseLevel=Math.max(0,Math.min(1,t||0))}},{key:"registerTheme",value:function(t,e){t&&e?(e.Key=t,this._Themes[t]=e):this.log.warn("PictProviderFlowTheme: registerTheme requires key and definition")}},{key:"getThemeKeys",value:function(){return Object.keys(this._Themes)}},{key:"processPathString",value:function(t,e){var o=this.getActiveTheme();if(!(o&&o.NoiseConfig&&o.NoiseConfig.Enabled&&o.NoiseConfig.AffectsConnections))return t;var i=this._NoiseLevel*(o.NoiseConfig.MaxJitterPx||3);return i<=0?t:this._FlowView&&this._FlowView._NoiseProvider?this._FlowView._NoiseProvider.jitterPath(t,i,e):t}},{key:"getNodeNoiseAmplitude",value:function(){var t=this.getActiveTheme();return t&&t.NoiseConfig&&t.NoiseConfig.Enabled&&t.NoiseConfig.AffectsNodes?this._NoiseLevel*(t.NoiseConfig.MaxJitterPx||3):0}}])}(i);e.exports=r,e.exports.default_configuration=n},{"fable-serviceproviderbase":4}],27:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowConnectionHandleManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"updateConnectionHandle",value:function(t,e,o,i){if(this._FlowView){var n=this._FlowView.getConnection(t);if(n){if(n.Data||(n.Data={}),n.Data.HandleCustomized=!0,e&&e.startsWith("bezier-handle-")){var r=parseInt(e.replace("bezier-handle-",""),10);return!isNaN(r)&&Array.isArray(n.Data.BezierHandles)&&r<n.Data.BezierHandles.length&&(n.Data.BezierHandles[r].x=o,n.Data.BezierHandles[r].y=i),void this._FlowView._renderSingleConnection(t)}switch(e){case"bezier-midpoint":Array.isArray(n.Data.BezierHandles)&&0!==n.Data.BezierHandles.length?(n.Data.BezierHandles[0].x=o,n.Data.BezierHandles[0].y=i):n.Data.BezierHandles=[{x:o,y:i}],n.Data.BezierHandleX=o,n.Data.BezierHandleY=i;break;case"ortho-corner1":n.Data.OrthoCorner1X=o,n.Data.OrthoCorner1Y=i;break;case"ortho-corner2":n.Data.OrthoCorner2X=o,n.Data.OrthoCorner2Y=i;break;case"ortho-midpoint":var a=this._FlowView.getPortPosition(n.SourceNodeHash,n.SourcePortHash),s=this._FlowView.getPortPosition(n.TargetNodeHash,n.TargetPortHash);if(a&&s){var l=this._FlowView._ConnectionRenderer._computeDirectionalGeometry(a,s),c=l.startDir;if(Math.abs(c.dx)>Math.abs(c.dy)){var d=(l.departX+l.approachX)/2;n.Data.OrthoMidOffset=o-d}else{var p=(l.departY+l.approachY)/2;n.Data.OrthoMidOffset=i-p}}}this._FlowView._renderSingleConnection(t)}}}},{key:"addConnectionHandle",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getConnection(t);if(i){i.Data||(i.Data={}),Array.isArray(i.Data.BezierHandles)||(i.Data.BezierHandles=[],null!=i.Data.BezierHandleX&&null!=i.Data.BezierHandleY&&i.Data.BezierHandles.push({x:i.Data.BezierHandleX,y:i.Data.BezierHandleY})),i.Data.LineMode="bezier";var n=this._FlowView.getPortPosition(i.SourceNodeHash,i.SourcePortHash),r=this._FlowView.getPortPosition(i.TargetNodeHash,i.TargetPortHash),a=0;n&&r&&this._FlowView._ConnectionRenderer&&(a=this._FlowView._ConnectionRenderer.computeInsertionIndex(i.Data.BezierHandles,{x:e,y:o},n,r)),i.Data.BezierHandles.splice(a,0,{x:e,y:o}),i.Data.HandleCustomized=!0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"removeConnectionHandle",value:function(t,e){if(this._FlowView){var o=this._FlowView.getConnection(t);o&&o.Data&&Array.isArray(o.Data.BezierHandles)&&(e<0||e>=o.Data.BezierHandles.length||(o.Data.BezierHandles.splice(e,1),0===o.Data.BezierHandles.length&&(o.Data.HandleCustomized=!1,o.Data.BezierHandleX=null,o.Data.BezierHandleY=null),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)))}}},{key:"resetHandlesForNode",value:function(t){if(this._FlowView){for(var e=0;e<this._FlowView._FlowData.Connections.length;e++){var o=this._FlowView._FlowData.Connections[e];o.SourceNodeHash!==t&&o.TargetNodeHash!==t||o.Data&&o.Data.HandleCustomized&&(o.Data.HandleCustomized=!1,o.Data.BezierHandles=[],o.Data.BezierHandleX=null,o.Data.BezierHandleY=null,o.Data.OrthoCorner1X=null,o.Data.OrthoCorner1Y=null,o.Data.OrthoCorner2X=null,o.Data.OrthoCorner2Y=null,o.Data.OrthoMidOffset=0)}this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlesForNode(this._FlowView._FlowData.OpenPanels,t)}}},{key:"resetHandlesForPanel",value:function(t){if(this._FlowView){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});e&&this._FlowView._TetherService&&this._FlowView._TetherService.resetHandlePositions(e)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],28:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowConnectionRenderer",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderConnection",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getPortPosition(t.SourceNodeHash,t.SourcePortHash),n=this._FlowView.getPortPosition(t.TargetNodeHash,t.TargetPortHash),r=null,a=this._FlowView.getNode(t.SourceNodeHash);if(a&&a.Ports)for(var s=0;s<a.Ports.length;s++)if(a.Ports[s].Hash===t.SourcePortHash){r=a.Ports[s].PortType||null;break}if(i&&n){var l,c=t.Data||{};if("orthogonal"===(c.LineMode||"bezier")){var d=null;c.HandleCustomized&&null!=c.OrthoCorner1X&&(d={corner1:{x:c.OrthoCorner1X,y:c.OrthoCorner1Y},corner2:{x:c.OrthoCorner2X,y:c.OrthoCorner2Y}}),l=this._generateOrthogonalPath(i,n,d,c.OrthoMidOffset||0)}else{var p=this._getBezierHandles(c);l=p.length>0?this._generateMultiHandleBezierPath(i,n,p):this._generateDirectionalPath(i,n)}this._FlowView._ThemeProvider&&(l=this._FlowView._ThemeProvider.processPathString(l,t.Hash));var h=null;if(this._FlowView._ThemeProvider){var u=this._FlowView._ThemeProvider.getActiveTheme();u&&u.ConnectionConfig&&u.ConnectionConfig.StrokeDashArray&&(h=u.ConnectionConfig.StrokeDashArray)}var f,w=this._FlowView.options.ViewIdentifier,v=r?" conn-type-"+r:"";f=o?"flow-arrowhead-selected-"+w:r?"flow-arrowhead-"+r+"-"+w:"flow-arrowhead-"+w;var g=this._FlowView._ConnectorShapesProvider;if(g){var y=g.createConnectionHitAreaElement(l,t.Hash);e.appendChild(y);var b=g.createConnectionPathElement(l,t.Hash,o,w);v&&b.setAttribute("class",(b.getAttribute("class")||"")+v),b.setAttribute("marker-end","url(#"+f+")"),h&&b.setAttribute("stroke-dasharray",h),e.appendChild(b)}else{var m=this._FlowView._SVGHelperProvider.createSVGElement("path");m.setAttribute("class","pict-flow-connection-hitarea"),m.setAttribute("d",l),m.setAttribute("data-connection-hash",t.Hash),m.setAttribute("data-element-type","connection-hitarea"),e.appendChild(m);var _=this._FlowView._SVGHelperProvider.createSVGElement("path");_.setAttribute("class","pict-flow-connection".concat(v," ").concat(o?"selected":"")),_.setAttribute("d",l),_.setAttribute("data-connection-hash",t.Hash),_.setAttribute("data-element-type","connection"),_.setAttribute("marker-end","url(#"+f+")"),h&&_.setAttribute("stroke-dasharray",h),e.appendChild(_)}o&&this._renderHandles(t,e,i,n)}}}},{key:"_computeDirectionalGeometry",value:function(t,e){return this._FlowView._PathGenerator.computeDirectionalGeometry(t,e)}},{key:"_generateDirectionalPath",value:function(t,e){var o=this._computeDirectionalGeometry(t,e);return this._FlowView._PathGenerator.buildBezierPathString({x:t.x,y:t.y},{x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},{x:e.x,y:e.y})}},{key:"_getBezierHandles",value:function(t){return t&&t.HandleCustomized?Array.isArray(t.BezierHandles)&&t.BezierHandles.length>0?t.BezierHandles:null!=t.BezierHandleX&&null!=t.BezierHandleY?[{x:t.BezierHandleX,y:t.BezierHandleY}]:[]:[]}},{key:"_generateMultiHandleBezierPath",value:function(t,e,o){var i=this._computeDirectionalGeometry(t,e);return this._FlowView._PathGenerator.buildMultiBezierPathString({x:t.x,y:t.y},{x:i.departX,y:i.departY},o,{x:i.approachX,y:i.approachY},{x:e.x,y:e.y},i.startDir,i.endDir)}},{key:"computeInsertionIndex",value:function(t,e,o,i){for(var n=this._computeDirectionalGeometry(o,i),r=[{x:n.departX,y:n.departY}],a=0;a<t.length;a++)r.push(t[a]);r.push({x:n.approachX,y:n.approachY});for(var s=1/0,l=0,c=0;c<r.length-1;c++){var d=this._distanceToSegment(e.x,e.y,r[c].x,r[c].y,r[c+1].x,r[c+1].y);d<s&&(s=d,l=c)}return l}},{key:"_distanceToSegment",value:function(t,e,o,i,n,r){return this._FlowView._PathGenerator.distanceToSegment(t,e,o,i,n,r)}},{key:"getAutoMidpoint",value:function(t,e){return this._FlowView._PathGenerator.getAutoMidpoint(t,e)}},{key:"_generateOrthogonalPath",value:function(t,e,o,i){var n,r,a=this._FlowView._PathGenerator.computeDepartApproach(t,e,20);if(o&&o.corner1&&o.corner2)n=o.corner1,r=o.corner2;else{var s=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a.departX,a.departY,a.approachX,a.approachY,a.fromDir,a.toDir,i||0);n=s.corner1,r=s.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:t.x,y:t.y},{x:a.departX,y:a.departY},n,r,{x:a.approachX,y:a.approachY},{x:e.x,y:e.y})}},{key:"getOrthogonalGeometry",value:function(t,e,o){var i=this._FlowView._PathGenerator.computeDepartApproach(t,e,20);if(o&&o.HandleCustomized&&null!=o.OrthoCorner1X){var n={x:o.OrthoCorner1X,y:o.OrthoCorner1Y},r={x:o.OrthoCorner2X,y:o.OrthoCorner2Y};return{corner1:n,corner2:r,midpoint:{x:(n.x+r.x)/2,y:(n.y+r.y)/2}}}return this._FlowView._PathGenerator.computeAutoOrthogonalCorners(i.departX,i.departY,i.approachX,i.approachY,i.fromDir,i.toDir,o&&o.OrthoMidOffset||0)}},{key:"_renderHandles",value:function(t,e,o,i){var n=t.Data||{};if("orthogonal"===(n.LineMode||"bezier")){var r=this.getOrthogonalGeometry(o,i,n);this._createHandle(e,t.Hash,"ortho-corner1",r.corner1.x,r.corner1.y,"pict-flow-connection-handle"),this._createHandle(e,t.Hash,"ortho-midpoint",r.midpoint.x,r.midpoint.y,"pict-flow-connection-handle-midpoint"),this._createHandle(e,t.Hash,"ortho-corner2",r.corner2.x,r.corner2.y,"pict-flow-connection-handle")}else{var a=this._getBezierHandles(n);if(a.length>0)for(var s=0;s<a.length;s++)this._createHandle(e,t.Hash,"bezier-handle-"+s,a[s].x,a[s].y,"pict-flow-connection-handle");else{var l=this.getAutoMidpoint(o,i);this._createHandle(e,t.Hash,"bezier-midpoint",l.x,l.y,"pict-flow-connection-handle")}}}},{key:"_createHandle",value:function(t,e,o,i,n,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-connection-handle-midpoint"===r?"connection-handle-midpoint":"connection-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(t,e,o,i,n,a,"connection-handle","data-connection-hash")}}},{key:"_generateBezierPath",value:function(t,e){var o={x:t.x,y:t.y,side:t.side||"right"},i={x:e.x,y:e.y,side:e.side||"left"};return this._generateDirectionalPath(o,i)}},{key:"renderDragConnection",value:function(t,e,o,i,n,r){var a,s=this._generateDirectionalPath({x:t,y:e,side:r||"right"},{x:o,y:i,side:"left"}),l=this._FlowView._ConnectorShapesProvider;return l?a=l.createDragConnectionElement(s):((a=this._FlowView._SVGHelperProvider.createSVGElement("path")).setAttribute("class","pict-flow-drag-connection"),a.setAttribute("d",s)),n.appendChild(a),a}},{key:"updateDragConnection",value:function(t,e,o,i,n,r){if(t){var a=this._generateDirectionalPath({x:e,y:o,side:r||"right"},{x:i,y:n,side:"left"});t.setAttribute("d",a)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],29:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowDataManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"marshalToView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var t={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options},e=this._FlowView.fable.manifest.getValueByHash(t,this._FlowView.options.FlowDataAddress);"object"===_typeof(e)&&null!==e&&this.setFlowData(e)}}},{key:"marshalFromView",value:function(){if(this._FlowView&&this._FlowView.options.FlowDataAddress){var t={Fable:this._FlowView.fable,Pict:this._FlowView.pict||this._FlowView.fable,AppData:this._FlowView.pict?this._FlowView.pict.AppData:this._FlowView.fable.AppData,Bundle:this._FlowView.Bundle,Options:this._FlowView.options};this._FlowView.fable.manifest.setValueByHash(t,this._FlowView.options.FlowDataAddress,JSON.parse(JSON.stringify(this._FlowView._FlowData)))}}},{key:"getFlowData",value:function(){return this._FlowView?JSON.parse(JSON.stringify(this._FlowView._FlowData)):{}}},{key:"setFlowData",value:function(t){this._FlowView&&("object"===_typeof(t)&&null!==t?(this._FlowView._FlowData={Nodes:Array.isArray(t.Nodes)?t.Nodes:[],Connections:Array.isArray(t.Connections)?t.Connections:[],OpenPanels:Array.isArray(t.OpenPanels)?t.OpenPanels:[],SavedLayouts:Array.isArray(t.SavedLayouts)?t.SavedLayouts:[],ViewState:Object.assign({PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null},t.ViewState||{})},this._FlowView._LayoutProvider&&this._FlowView._LayoutProvider.loadPersistedLayouts(),this._FlowView.initialRenderComplete&&this._FlowView.renderFlow()):this._FlowView.log.warn("PictSectionFlow setFlowData received invalid data"))}},{key:"addNode",value:function(t,e,o,i,n){if(!this._FlowView)return null;for(var r=t||this._FlowView.options.DefaultNodeType,a=this._FlowView._NodeTypeProvider.getNodeType(r),s={Hash:"node-".concat(this._FlowView.fable.getUUID()),Type:r,X:e||100,Y:o||100,Width:a&&a.DefaultWidth||this._FlowView.options.DefaultNodeWidth,Height:a&&a.DefaultHeight||this._FlowView.options.DefaultNodeHeight,Title:i||a&&a.Label||"New Node",Ports:a&&a.DefaultPorts?JSON.parse(JSON.stringify(a.DefaultPorts)):[{Hash:"port-in-".concat(this._FlowView.fable.getUUID()),Direction:"input",Side:"left",Label:"In"},{Hash:"port-out-".concat(this._FlowView.fable.getUUID()),Direction:"output",Side:"right",Label:"Out"}],Data:n||{}},l=0;l<s.Ports.length;l++)s.Ports[l].Hash||(s.Ports[l].Hash="port-".concat(s.Ports[l].Direction,"-").concat(this._FlowView.fable.getUUID()));return this._FlowView._FlowData.Nodes.push(s),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeAdded",s),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),s}},{key:"removeNode",value:function(t){if(!this._FlowView)return!1;var e=this._FlowView._FlowData.Nodes.findIndex(function(e){return e.Hash===t});if(e<0)return this._FlowView.log.warn("PictSectionFlow removeNode: node ".concat(t," not found")),!1;var o=this._FlowView._FlowData.Nodes.splice(e,1)[0];return this._FlowView._FlowData.Connections=this._FlowView._FlowData.Connections.filter(function(e){return e.SourceNodeHash!==t&&e.TargetNodeHash!==t}),this._FlowView.closePanelForNode(t),this._FlowView._FlowData.ViewState.SelectedNodeHash===t&&(this._FlowView._FlowData.ViewState.SelectedNodeHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"addConnection",value:function(t,e,o,i,n){if(!this._FlowView)return!1;var r=this._FlowView._FlowData.Nodes.find(function(e){return e.Hash===t}),a=this._FlowView._FlowData.Nodes.find(function(t){return t.Hash===o});if(!r||!a)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target node not found"),!1;var s=r.Ports.find(function(t){return t.Hash===e}),l=a.Ports.find(function(t){return t.Hash===i});if(!s||!l)return this._FlowView.log.warn("PictSectionFlow addConnection: source or target port not found"),!1;if(t===o)return this._FlowView.log.warn("PictSectionFlow addConnection: cannot connect a node to itself"),!1;if(this._FlowView._FlowData.Connections.find(function(n){return n.SourceNodeHash===t&&n.SourcePortHash===e&&n.TargetNodeHash===o&&n.TargetPortHash===i}))return this._FlowView.log.warn("PictSectionFlow addConnection: duplicate connection"),!1;var c={Hash:"conn-".concat(this._FlowView.fable.getUUID()),SourceNodeHash:t,SourcePortHash:e,TargetNodeHash:o,TargetPortHash:i,Data:n||{}};return this._FlowView._FlowData.Connections.push(c),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionCreated",c),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),c}},{key:"removeConnection",value:function(t){if(!this._FlowView)return!1;var e=this._FlowView._FlowData.Connections.findIndex(function(e){return e.Hash===t});if(e<0)return this._FlowView.log.warn("PictSectionFlow removeConnection: connection ".concat(t," not found")),!1;var o=this._FlowView._FlowData.Connections.splice(e,1)[0];return this._FlowView._FlowData.ViewState.SelectedConnectionHash===t&&(this._FlowView._FlowData.ViewState.SelectedConnectionHash=null),this._FlowView.renderFlow(),this.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionRemoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],30:[function(t,e,o){var i=t("fable-serviceproviderbase"),n={IDLE:"idle",DRAGGING_NODE:"dragging-node",DRAGGING_PANEL:"dragging-panel",DRAGGING_HANDLE:"dragging-handle",CONNECTING:"connecting",PANNING:"panning",RESIZING_PANEL:"resizing-panel"},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowInteractionManager",r._FlowView=o&&o.FlowView?o.FlowView:null,r._SVGElement=null,r._ViewportElement=null,r._State=n.IDLE,r._DragNodeHash=null,r._DragStartX=0,r._DragStartY=0,r._DragNodeStartX=0,r._DragNodeStartY=0,r._DragPanelHash=null,r._DragPanelStartX=0,r._DragPanelStartY=0,r._DragPanelDataStartX=0,r._DragPanelDataStartY=0,r._DragHandleConnectionHash=null,r._DragHandlePanelHash=null,r._DragHandleType=null,r._DragHandleIsTether=!1,r._PanStartX=0,r._PanStartY=0,r._PanStartPanX=0,r._PanStartPanY=0,r._ConnectSourceNodeHash=null,r._ConnectSourcePortHash=null,r._ConnectDragLine=null,r._LastClickTime=0,r._LastClickNodeHash=null,r._DoubleClickThreshold=400,r._ResizePanelHash=null,r._ResizeStartY=0,r._ResizePanelStartHeight=0,r._LastConnectionClickTime=0,r._LastConnectionClickHash=null,r._LastTetherClickTime=0,r._LastTetherClickHash=null,r._LastHandleClickTime=0,r._LastHandleClickHash=null,r._LastHandleClickType=null,r._boundOnPointerDown=r._onPointerDown.bind(r),r._boundOnPointerMove=r._onPointerMove.bind(r),r._boundOnPointerUp=r._onPointerUp.bind(r),r._boundOnWheel=r._onWheel.bind(r),r._boundOnKeyDown=r._onKeyDown.bind(r),r}return _inherits(e,t),_createClass(e,[{key:"initialize",value:function(t,e){var o=this;this._SVGElement=t,this._ViewportElement=e,this._SVGElement&&(this._SVGElement.addEventListener("pointerdown",this._boundOnPointerDown),this._SVGElement.addEventListener("pointermove",this._boundOnPointerMove),this._SVGElement.addEventListener("pointerup",this._boundOnPointerUp),this._SVGElement.addEventListener("pointerleave",this._boundOnPointerUp),this._SVGElement.addEventListener("wheel",this._boundOnWheel,{passive:!1}),document.addEventListener("keydown",this._boundOnKeyDown),this._SVGElement.addEventListener("contextmenu",function(t){t.preventDefault();var e=t.target;switch(o._getElementType(e)){case"connection":case"connection-hitarea":o._addBezierHandle(e,t);break;case"connection-handle":o._removeBezierHandle(e);break;case"tether":case"tether-hitarea":o._addTetherBezierHandle(e,t);break;case"tether-handle":o._removeTetherBezierHandle(e)}}))}},{key:"destroy",value:function(){this._SVGElement&&(this._SVGElement.removeEventListener("pointerdown",this._boundOnPointerDown),this._SVGElement.removeEventListener("pointermove",this._boundOnPointerMove),this._SVGElement.removeEventListener("pointerup",this._boundOnPointerUp),this._SVGElement.removeEventListener("pointerleave",this._boundOnPointerUp),this._SVGElement.removeEventListener("wheel",this._boundOnWheel)),document.removeEventListener("keydown",this._boundOnKeyDown)}},{key:"_onPointerDown",value:function(t){if(this._FlowView){var e=t.target,o=this._getElementType(e);if(!e.closest||!e.closest(".pict-flow-panel-content"))switch(0===t.button&&this._SVGElement.setPointerCapture(t.pointerId),o){case"port":this._startConnection(t,e);break;case"node":case"node-body":case"panel-indicator":var i=this._getNodeHash(e),n=Date.now();i&&i===this._LastClickNodeHash&&n-this._LastClickTime<this._DoubleClickThreshold?(this._LastClickTime=0,this._LastClickNodeHash=null,this._FlowView.togglePanel(i)):(this._LastClickTime=n,this._LastClickNodeHash=i,this._startNodeDrag(t,e));break;case"panel-titlebar":this._startPanelDrag(t,e);break;case"panel-resize":this._startPanelResize(t,e);break;case"panel-close":var r=this._getPanelHash(e);r&&this._FlowView.closePanel(r);break;case"connection-handle":var a=this._getConnectionHash(e),s=e.getAttribute("data-handle-type"),l=Date.now();a===this._LastHandleClickHash&&s===this._LastHandleClickType&&l-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleConnectionLineMode(a),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=l,this._LastHandleClickHash=a,this._LastHandleClickType=s,this._startHandleDrag(t,a,null,s,!1)),t.stopPropagation();break;case"tether":case"tether-hitarea":var c=this._getPanelHash(e),d=Date.now();c&&c===this._LastTetherClickHash&&d-this._LastTetherClickTime<this._DoubleClickThreshold?(this._LastTetherClickTime=0,this._LastTetherClickHash=null,this._addTetherBezierHandle(e,t)):(this._LastTetherClickTime=d,this._LastTetherClickHash=c,this._selectTether(e));break;case"tether-handle":var p=this._getPanelHash(e),h=e.getAttribute("data-handle-type"),u=Date.now();p===this._LastHandleClickHash&&h===this._LastHandleClickType&&u-this._LastHandleClickTime<this._DoubleClickThreshold?(this._toggleTetherLineMode(p),this._LastHandleClickTime=0,this._LastHandleClickHash=null,this._LastHandleClickType=null):(this._LastHandleClickTime=u,this._LastHandleClickHash=p,this._LastHandleClickType=h,this._startHandleDrag(t,null,p,h,!0)),t.stopPropagation();break;case"connection":case"connection-hitarea":var f=this._getConnectionHash(e),w=Date.now();f&&f===this._LastConnectionClickHash&&w-this._LastConnectionClickTime<this._DoubleClickThreshold?(this._LastConnectionClickTime=0,this._LastConnectionClickHash=null,this._addBezierHandle(e,t)):(this._LastConnectionClickTime=w,this._LastConnectionClickHash=f,this._selectConnection(e));break;default:0===t.button&&this._FlowView.options.EnablePanning&&this._startPanning(t)}}}},{key:"_onPointerMove",value:function(t){if(this._FlowView)switch(this._State){case n.DRAGGING_NODE:this._onNodeDrag(t);break;case n.DRAGGING_PANEL:this._onPanelDrag(t);break;case n.DRAGGING_HANDLE:this._onHandleDrag(t);break;case n.CONNECTING:this._onConnectionDrag(t);break;case n.RESIZING_PANEL:this._onPanelResize(t);break;case n.PANNING:this._onPan(t)}}},{key:"_onPointerUp",value:function(t){if(this._FlowView)switch(this._SVGElement.hasPointerCapture&&this._SVGElement.hasPointerCapture(t.pointerId)&&this._SVGElement.releasePointerCapture(t.pointerId),this._State){case n.DRAGGING_NODE:this._endNodeDrag(t);break;case n.DRAGGING_PANEL:this._endPanelDrag(t);break;case n.DRAGGING_HANDLE:this._endHandleDrag(t);break;case n.RESIZING_PANEL:this._endPanelResize(t);break;case n.CONNECTING:this._endConnection(t);break;case n.PANNING:this._endPanning(t)}}},{key:"_onWheel",value:function(t){if(this._FlowView&&this._FlowView.options.EnableZooming){t.preventDefault();var e=t.deltaY>0?-this._FlowView.options.ZoomStep:this._FlowView.options.ZoomStep,o=this._FlowView.viewState.Zoom+e,i=this._SVGElement.getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;this._FlowView.setZoom(o,n,r)}}},{key:"_onKeyDown",value:function(t){if(this._FlowView)if("Delete"===t.key||"Backspace"===t.key){if(t.target&&("INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||"SELECT"===t.target.tagName))return;if(t.target&&t.target.closest&&t.target.closest(".pict-flow-panel"))return;this._FlowView.deleteSelected(),t.preventDefault()}else if("Escape"===t.key){if(this._State===n.CONNECTING&&this._cancelConnection(),this._FlowView._IsFullscreen){if(this._FlowView.exitFullscreen(),this._FlowView._ToolbarView){var e=this._FlowView.options.ViewIdentifier,o=this._FlowView.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(e));o.length>0&&(o[0].innerHTML="&#x26F6; Fullscreen")}return void t.preventDefault()}this._FlowView.deselectAll()}}},{key:"_startNodeDrag",value:function(t,e){if(this._FlowView.options.EnableNodeDragging){var o=this._getNodeHash(e);if(o){this._FlowView.selectNode(o);var i=this._FlowView.getNode(o);if(i){this._State=n.DRAGGING_NODE,this._DragNodeHash=o,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._DragNodeStartX=i.X,this._DragNodeStartY=i.Y,this._SVGElement.classList.add("panning");var r=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(o,'"]'));r&&r.classList.add("dragging")}}}}},{key:"_onNodeDrag",value:function(t){if(this._DragNodeHash){var e=this._FlowView.viewState,o=(t.clientX-this._DragStartX)/e.Zoom,i=(t.clientY-this._DragStartY)/e.Zoom,n=this._DragNodeStartX+o,r=this._DragNodeStartY+i;this._FlowView.updateNodePosition(this._DragNodeHash,n,r)}}},{key:"_endNodeDrag",value:function(t){this._SVGElement.classList.remove("panning");var e=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(this._DragNodeHash,'"]'));e&&e.classList.remove("dragging"),this._FlowView.renderFlow(),this._FlowView.marshalFromView();var o=this._FlowView.getNode(this._DragNodeHash);o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onNodeMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=n.IDLE,this._DragNodeHash=null}},{key:"_startPanelDrag",value:function(t,e){var o=this._getPanelHash(e);if(o){var i=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===o});i&&(this._State=n.DRAGGING_PANEL,this._DragPanelHash=o,this._DragPanelStartX=t.clientX,this._DragPanelStartY=t.clientY,this._DragPanelDataStartX=i.X,this._DragPanelDataStartY=i.Y,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelDrag",value:function(t){if(this._DragPanelHash){var e=this._FlowView.viewState,o=(t.clientX-this._DragPanelStartX)/e.Zoom,i=(t.clientY-this._DragPanelStartY)/e.Zoom,n=this._DragPanelDataStartX+o,r=this._DragPanelDataStartY+i;this._FlowView.updatePanelPosition(this._DragPanelHash,n,r)}}},{key:"_endPanelDrag",value:function(t){var e=this;this._SVGElement.classList.remove("panning"),this._FlowView.marshalFromView();var o=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._DragPanelHash});o&&this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelMoved",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)),this._State=n.IDLE,this._DragPanelHash=null}},{key:"_startPanelResize",value:function(t,e){var o=this._getPanelHash(e);if(o){var i=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===o});i&&(this._State=n.RESIZING_PANEL,this._ResizePanelHash=o,this._ResizeStartY=t.clientY,this._ResizePanelStartHeight=i.Height,this._SVGElement.classList.add("panning"))}}},{key:"_onPanelResize",value:function(t){var e=this;if(this._ResizePanelHash){var o=this._FlowView.viewState,i=(t.clientY-this._ResizeStartY)/o.Zoom,n=Math.max(120,this._ResizePanelStartHeight+i),r=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._ResizePanelHash});if(r&&(r.Height=n),this._FlowView._PanelsLayer){var a=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'+this._ResizePanelHash+'"]');a&&a.setAttribute("height",String(n))}}}},{key:"_endPanelResize",value:function(t){this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._State=n.IDLE,this._ResizePanelHash=null}},{key:"_startHandleDrag",value:function(t,e,o,i,r){this._State=n.DRAGGING_HANDLE,this._DragHandleConnectionHash=e,this._DragHandlePanelHash=o,this._DragHandleType=i,this._DragHandleIsTether=r,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._SVGElement.classList.add("panning")}},{key:"_onHandleDrag",value:function(t){var e=this._FlowView.screenToSVGCoords(t.clientX,t.clientY);this._DragHandleIsTether?this._FlowView.updateTetherHandle(this._DragHandlePanelHash,this._DragHandleType,e.x,e.y):this._FlowView.updateConnectionHandle(this._DragHandleConnectionHash,this._DragHandleType,e.x,e.y)}},{key:"_endHandleDrag",value:function(t){var e=this;if(this._SVGElement.classList.remove("panning"),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider)if(this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData),this._DragHandleIsTether){var o=this._FlowView._FlowData.OpenPanels.find(function(t){return t.Hash===e._DragHandlePanelHash});o&&this._FlowView._EventHandlerProvider.fireEvent("onTetherHandleMoved",o)}else{var i=this._FlowView.getConnection(this._DragHandleConnectionHash);i&&this._FlowView._EventHandlerProvider.fireEvent("onConnectionHandleMoved",i)}this._State=n.IDLE,this._DragHandleConnectionHash=null,this._DragHandlePanelHash=null,this._DragHandleType=null,this._DragHandleIsTether=!1}},{key:"_addBezierHandle",value:function(t,e){var o=this._getConnectionHash(t);if(o){this._FlowView.selectConnection(o);var i=this._FlowView.screenToSVGCoords(e.clientX,e.clientY);this._FlowView.addConnectionHandle(o,i.x,i.y)}}},{key:"_removeBezierHandle",value:function(t){var e=this._getConnectionHash(t);if(e){var o=t.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var i=parseInt(o.replace("bezier-handle-",""),10);isNaN(i)||this._FlowView.removeConnectionHandle(e,i)}}}},{key:"_addTetherBezierHandle",value:function(t,e){var o=this._getPanelHash(t);if(o){this._FlowView.selectTether(o);var i=this._FlowView.screenToSVGCoords(e.clientX,e.clientY);this._FlowView.addTetherHandle(o,i.x,i.y)}}},{key:"_removeTetherBezierHandle",value:function(t){var e=this._getPanelHash(t);if(e){var o=t.getAttribute("data-handle-type");if(o&&o.startsWith("bezier-handle-")){var i=parseInt(o.replace("bezier-handle-",""),10);isNaN(i)||this._FlowView.removeTetherHandle(e,i)}}}},{key:"_toggleConnectionLineMode",value:function(t){var e=this._FlowView.getConnection(t);if(e){e.Data||(e.Data={});var o=e.Data.LineMode||"bezier";e.Data.LineMode="bezier"===o?"orthogonal":"bezier",e.Data.HandleCustomized=!1,e.Data.BezierHandles=[],e.Data.BezierHandleX=null,e.Data.BezierHandleY=null,e.Data.OrthoCorner1X=null,e.Data.OrthoCorner1Y=null,e.Data.OrthoCorner2X=null,e.Data.OrthoCorner2Y=null,e.Data.OrthoMidOffset=0,this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onConnectionModeChanged",e),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData))}}},{key:"_toggleTetherLineMode",value:function(t){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});e&&(this._FlowView._TetherService&&this._FlowView._TetherService.toggleLineMode(e),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onTetherModeChanged",e),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView.flowData)))}},{key:"_selectTether",value:function(t){var e=this._getPanelHash(t);e&&this._FlowView.selectTether(e)}},{key:"_startConnection",value:function(t,e){if(this._FlowView.options.EnableConnectionCreation){var o=e.getAttribute("data-node-hash"),i=e.getAttribute("data-port-hash"),r=e.getAttribute("data-port-direction");if(o&&i&&"output"===r){this._State=n.CONNECTING,this._ConnectSourceNodeHash=o,this._ConnectSourcePortHash=i,this._SVGElement.classList.add("connecting");var a=this._FlowView.getPortPosition(o,i);a&&(this._ConnectDragLine=document.createElementNS("http://www.w3.org/2000/svg","path"),this._ConnectDragLine.setAttribute("class","pict-flow-drag-connection"),this._ConnectDragLine.setAttribute("d","M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(a.y)),this._FlowView._ViewportElement.appendChild(this._ConnectDragLine)),t.stopPropagation()}}}},{key:"_onConnectionDrag",value:function(t){if(this._ConnectDragLine){var e=this._FlowView.getPortPosition(this._ConnectSourceNodeHash,this._ConnectSourcePortHash);if(e){var o=this._FlowView.screenToSVGCoords(t.clientX,t.clientY),i=.5*Math.abs(o.x-e.x),n="M ".concat(e.x," ").concat(e.y," C ").concat(e.x+i," ").concat(e.y,", ").concat(o.x-i," ").concat(o.y,", ").concat(o.x," ").concat(o.y);this._ConnectDragLine.setAttribute("d",n)}}}},{key:"_endConnection",value:function(t){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting");var e=document.elementFromPoint(t.clientX,t.clientY);if(e){var o=e.getAttribute("data-port-hash"),i=e.getAttribute("data-node-hash"),r=e.getAttribute("data-port-direction");o&&i&&"input"===r&&this._FlowView.addConnection(this._ConnectSourceNodeHash,this._ConnectSourcePortHash,i,o)}this._State=n.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_cancelConnection",value:function(){this._ConnectDragLine&&this._ConnectDragLine.parentNode&&this._ConnectDragLine.parentNode.removeChild(this._ConnectDragLine),this._ConnectDragLine=null,this._SVGElement.classList.remove("connecting"),this._State=n.IDLE,this._ConnectSourceNodeHash=null,this._ConnectSourcePortHash=null}},{key:"_startPanning",value:function(t){this._FlowView.deselectAll(),this._State=n.PANNING,this._PanStartX=t.clientX,this._PanStartY=t.clientY,this._PanStartPanX=this._FlowView.viewState.PanX,this._PanStartPanY=this._FlowView.viewState.PanY,this._SVGElement.classList.add("panning")}},{key:"_onPan",value:function(t){var e=t.clientX-this._PanStartX,o=t.clientY-this._PanStartY;this._FlowView.viewState.PanX=this._PanStartPanX+e,this._FlowView.viewState.PanY=this._PanStartPanY+o,this._FlowView.updateViewportTransform()}},{key:"_endPanning",value:function(t){this._SVGElement.classList.remove("panning"),this._State=n.IDLE}},{key:"_selectConnection",value:function(t){var e=this._getConnectionHash(t);e&&this._FlowView.selectConnection(e)}},{key:"_getElementType",value:function(t){if(!t)return"background";var e=t.getAttribute?t.getAttribute("data-element-type"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-element-type"):null)return e;o=o.parentElement,i++}return"background"}},{key:"_getNodeHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-node-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-node-hash"):null)return e;o=o.parentElement,i++}return null}},{key:"_getPanelHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-panel-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-panel-hash"):null)return e;o=o.parentElement,i++}return null}},{key:"_getConnectionHash",value:function(t){if(!t)return null;var e=t.getAttribute?t.getAttribute("data-connection-hash"):null;if(e)return e;for(var o=t.parentElement,i=0;o&&i<5;){if(e=o.getAttribute?o.getAttribute("data-connection-hash"):null)return e;o=o.parentElement,i++}return null}}])}(i);e.exports=r,e.exports.INTERACTION_STATES=n},{"fable-serviceproviderbase":4}],31:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowLayout",n._FlowView=o&&o.FlowView?o.FlowView:null,n._HorizontalSpacing=250,n._VerticalSpacing=120,n._StartX=100,n._StartY=100,n}return _inherits(e,t),_createClass(e,[{key:"snapToGrid",value:function(t,e){return!e||e<=0?t:Math.round(t/e)*e}},{key:"autoLayout",value:function(t,e){if(t&&0!==t.length){for(var o={},i={},n={},r=0;r<t.length;r++){var a=t[r];o[a.Hash]=a,i[a.Hash]=0,n[a.Hash]=[]}for(var s=0;s<e.length;s++){var l=e[s];i.hasOwnProperty(l.TargetNodeHash)&&i[l.TargetNodeHash]++,n.hasOwnProperty(l.SourceNodeHash)&&n[l.SourceNodeHash].push(l.TargetNodeHash)}var c=[],d=[],p={};for(var h in i)0===i[h]&&d.push(h);for(;d.length>0;){for(var u=[],f=[],w=0;w<d.length;w++){var v=d[w];if(!p[v]){p[v]=!0,u.push(v);for(var g=n[v]||[],y=0;y<g.length;y++){var b=g[y];i[b]--,i[b]<=0&&!p[b]&&f.push(b)}}}u.length>0&&c.push(u),d=f}for(var m=[],_=0;_<t.length;_++)p[t[_].Hash]||m.push(t[_].Hash);m.length>0&&c.push(m);for(var P=this._StartX,F=0;F<c.length;F++){for(var S=c[F],V=0,C=0;C<S.length;C++){var k=o[S[C]];k&&(k.Height||80,C<S.length-1&&this._VerticalSpacing)}for(var T=this._StartY,D=0;D<S.length;D++){var A=o[S[D]];if(A){A.X=P,A.Y=T;var H=A.Width||180,x=A.Height||80;V=Math.max(V,H),T+=x+this._VerticalSpacing}}P+=V+this._HorizontalSpacing}}}},{key:"autoLayoutSubset",value:function(t,e,o){if(t&&0!==t.length){var i=this._StartX,n=this._StartY;if(e&&e.length>0){for(var r=-1/0,a=0;a<e.length;a++){var s=e[a].X+(e[a].Width||180);s>r&&(r=s)}i=r+this._HorizontalSpacing}for(var l={},c=0;c<t.length;c++)l[t[c].Hash]=!0;for(var d={},p={},h={},u=0;u<t.length;u++){var f=t[u];d[f.Hash]=f,p[f.Hash]=0,h[f.Hash]=[]}for(var w=0;w<o.length;w++){var v=o[w],g=l[v.SourceNodeHash],y=l[v.TargetNodeHash];g&&y&&(p[v.TargetNodeHash]++,h[v.SourceNodeHash].push(v.TargetNodeHash))}var b=[],m=[],_={};for(var P in p)0===p[P]&&m.push(P);for(;m.length>0;){for(var F=[],S=[],V=0;V<m.length;V++){var C=m[V];if(!_[C]){_[C]=!0,F.push(C);for(var k=h[C]||[],T=0;T<k.length;T++){var D=k[T];p[D]--,p[D]<=0&&!_[D]&&S.push(D)}}}F.length>0&&b.push(F),m=S}for(var A=[],H=0;H<t.length;H++)_[t[H].Hash]||A.push(t[H].Hash);A.length>0&&b.push(A);for(var x=i,I=0;I<b.length;I++){for(var M=b[I],N=0,L=n,E=0;E<M.length;E++){var z=d[M[E]];if(z){z.X=x,z.Y=L;var R=z.Width||180,B=z.Height||80;N=Math.max(N,R),L+=B+this._VerticalSpacing}}x+=N+this._HorizontalSpacing}}}},{key:"centerNodes",value:function(t,e,o){if(t&&0!==t.length){for(var i=1/0,n=1/0,r=-1/0,a=-1/0,s=0;s<t.length;s++)i=Math.min(i,t[s].X),n=Math.min(n,t[s].Y),r=Math.max(r,t[s].X+(t[s].Width||180)),a=Math.max(a,t[s].Y+(t[s].Height||80));for(var l=e-(i+r)/2,c=o-(n+a)/2,d=0;d<t.length;d++)t[d].X+=l,t[d].Y+=c}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],32:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPanelManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"openPanel",value:function(t){var e=this._FlowView.getNode(t);if(!e)return!1;var o=this._FlowView._NodeTypeProvider.getNodeType(e.Type);if(!o)return!1;var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.NodeHash===t});if(i)return i;var n,r,a,s,l=o.PropertiesPanel,c="panel-".concat(this.fable.getUUID());l?(n=l.DefaultWidth||300,r=l.DefaultHeight||200,a=l.PanelType||"Base",s=l.Title||o.Label||"Properties"):(n=240,r=180,a="Info",s=o.Label||e.Title||"Node Info");var d={Hash:c,NodeHash:t,PanelType:a,Title:s,X:e.X+e.Width+30,Y:e.Y,Width:n,Height:r};return this._FlowView._FlowData.OpenPanels.push(d),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelOpened",d),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),d}},{key:"closePanel",value:function(t){var e=this._FlowView._FlowData.OpenPanels.findIndex(function(e){return e.Hash===t});if(e<0)return!1;var o=this._FlowView._FlowData.OpenPanels.splice(e,1)[0];return this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(t),this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&(this._FlowView._EventHandlerProvider.fireEvent("onPanelClosed",o),this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)),!0}},{key:"closePanelForNode",value:function(t){var e=this._FlowView._FlowData.OpenPanels.filter(function(e){return e.NodeHash===t});if(0===e.length)return!1;for(var o=0;o<e.length;o++){var i=this._FlowView._FlowData.OpenPanels.indexOf(e[o]);i>=0&&this._FlowView._FlowData.OpenPanels.splice(i,1),this._FlowView._PropertiesPanelView&&this._FlowView._PropertiesPanelView.destroyPanel(e[o].Hash)}return!0}},{key:"togglePanel",value:function(t){var e=this._FlowView._FlowData.OpenPanels.find(function(e){return e.NodeHash===t});return e?(this.closePanel(e.Hash),!1):this.openPanel(t)}},{key:"updatePanelPosition",value:function(t,e,o){var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i){if(i.X=e,i.Y=o,this._FlowView._resetHandlesForPanel(t),this._FlowView._PanelsLayer){var n=this._FlowView._PanelsLayer.querySelector('[data-panel-hash="'.concat(t,'"]'));n&&(n.setAttribute("x",String(e)),n.setAttribute("y",String(o)))}this._FlowView._renderTethersForNode(i.NodeHash)}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],33:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPathGenerator",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"computeDepartApproach",value:function(t,e,o){var i=this._FlowView._GeometryProvider,n=i.sideDirection(t.side||"right"),r=i.sideDirection(e.side||"left");return{departX:t.x+n.dx*o,departY:t.y+n.dy*o,approachX:e.x+r.dx*o,approachY:e.y+r.dy*o,fromDir:n,toDir:r}}},{key:"computeAutoOrthogonalCorners",value:function(t,e,o,i,n,r,a){var s,l,c,d=a||0,p=Math.abs(n.dx)>0,h=Math.abs(r.dx)>0;if(p&&h){var u=(t+o)/2+d;s={x:u,y:e},l={x:u,y:i},c={x:u,y:(e+i)/2}}else if(p||h)p&&!h?(s={x:o+d,y:e},l={x:o+d,y:i},c={x:o+d,y:(e+i)/2}):(s={x:t,y:i+d},l={x:o,y:i+d},c={x:(t+o)/2,y:i+d});else{var f=(e+i)/2+d;s={x:t,y:f},l={x:o,y:f},c={x:(t+o)/2,y:f}}return{corner1:s,corner2:l,midpoint:c}}},{key:"evaluateCubicBezier",value:function(t,e,o,i,n){var r=1-n,a=r*r,s=a*r,l=n*n,c=l*n;return{x:s*t.x+3*a*n*e.x+3*r*l*o.x+c*i.x,y:s*t.y+3*a*n*e.y+3*r*l*o.y+c*i.y}}},{key:"buildBezierPathString",value:function(t,e,o,i,n,r){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," C ").concat(o.x," ").concat(o.y,", ").concat(i.x," ").concat(i.y,", ").concat(n.x," ").concat(n.y," L ").concat(r.x," ").concat(r.y)}},{key:"buildSplitBezierPathString",value:function(t,e,o,i,n,r,a,s,l){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," C ").concat(o.x," ").concat(o.y,", ").concat(i.x," ").concat(i.y,", ").concat(n.x," ").concat(n.y," C ").concat(r.x," ").concat(r.y,", ").concat(a.x," ").concat(a.y,", ").concat(s.x," ").concat(s.y," L ").concat(l.x," ").concat(l.y)}},{key:"buildMultiBezierPathString",value:function(t,e,o,i,n,r,a){for(var s=[e],l=0;l<o.length;l++)s.push(o[l]);s.push(i);for(var c="M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y),d=0;d<s.length-1;d++){var p=s[d],h=s[d+1],u=h.x-p.x,f=h.y-p.y,w=Math.sqrt(u*u+f*f);w<1&&(w=1);var v=.35*w,g=void 0,y=void 0;if(0===d)g=r.dx,y=r.dy;else{var b=s[d-1],m=s[d+1];g=m.x-b.x,y=m.y-b.y;var _=Math.sqrt(g*g+y*y);_<1&&(_=1),g/=_,y/=_}var P=void 0,F=void 0;if(d===s.length-2)P=-a.dx,F=-a.dy;else{var S=s[d],V=s[d+2];P=V.x-S.x,F=V.y-S.y;var C=Math.sqrt(P*P+F*F);C<1&&(C=1),P/=C,F/=C}var k=p.x+g*v,T=p.y+y*v,D=h.x-P*v,A=h.y-F*v;c+=" C ".concat(k," ").concat(T,", ").concat(D," ").concat(A,", ").concat(h.x," ").concat(h.y)}return c+=" L ".concat(n.x," ").concat(n.y)}},{key:"buildOrthogonalPathString",value:function(t,e,o,i,n,r){return"M ".concat(t.x," ").concat(t.y," L ").concat(e.x," ").concat(e.y," L ").concat(o.x," ").concat(o.y," L ").concat(i.x," ").concat(i.y," L ").concat(n.x," ").concat(n.y," L ").concat(r.x," ").concat(r.y)}},{key:"computeDirectionalGeometry",value:function(t,e){var o,i=this._FlowView._GeometryProvider.sideDirection(t.side||"right"),n=this._FlowView._GeometryProvider.sideDirection(e.side||"left"),r=t.x+20*i.dx,a=t.y+20*i.dy,s=e.x+20*n.dx,l=e.y+20*n.dy,c=Math.abs(s-r),d=Math.abs(l-a),p=Math.sqrt(c*c+d*d),h=Math.max(Math.min(.4*p,180),30),u=0!==i.dx&&0!==n.dx||0!==i.dy&&0!==n.dy,f=!1;if(u&&(1===i.dx&&-1===n.dx&&e.x>=t.x||-1===i.dx&&1===n.dx&&e.x<=t.x||1===i.dy&&-1===n.dy&&e.y>=t.y||-1===i.dy&&1===n.dy&&e.y<=t.y)&&(f=!0),f){var w=0!==i.dx?c:d;o=Math.max(.35*w,30)}else o=u?Math.max(h,60):Math.max(.8*h,40);return{departX:r,departY:a,approachX:s,approachY:l,cp1X:r+i.dx*o,cp1Y:a+i.dy*o,cp2X:s+n.dx*o,cp2Y:l+n.dy*o,startDir:i,endDir:n}}},{key:"distanceToSegment",value:function(t,e,o,i,n,r){var a=n-o,s=r-i,l=a*a+s*s;if(l<.001){var c=t-o,d=e-i;return Math.sqrt(c*c+d*d)}var p=((t-o)*a+(e-i)*s)/l;p<0&&(p=0),p>1&&(p=1);var h=t-(o+p*a),u=e-(i+p*s);return Math.sqrt(h*h+u*u)}},{key:"getAutoMidpoint",value:function(t,e){var o=this.computeDirectionalGeometry(t,e);return this.evaluateCubicBezier({x:o.departX,y:o.departY},{x:o.cp1X,y:o.cp1Y},{x:o.cp2X,y:o.cp2Y},{x:o.approachX,y:o.approachY},.5)}},{key:"getAutoMidpointSimple",value:function(t,e,o){var i=this.computeDepartApproach(t,e,o),n=Math.abs(i.approachX-i.departX),r=Math.abs(i.approachY-i.departY),a=.4*Math.max(n,r,40),s={x:i.departX,y:i.departY},l={x:i.departX+i.fromDir.dx*a,y:i.departY+i.fromDir.dy*a},c={x:i.approachX+i.toDir.dx*a,y:i.approachY+i.toDir.dy*a},d={x:i.approachX,y:i.approachY};return this.evaluateCubicBezier(s,l,c,d,.5)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],34:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowPortRenderer",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderPorts",value:function(t,e,o,i,n,r){if(this._FlowView&&t.Ports&&Array.isArray(t.Ports)){n&&n.PortLabelsVertical,n&&n.PortLabelPadding,n&&n.PortLabelsOutside;for(var a=this._FlowView._GeometryProvider,s={},l=0;l<t.Ports.length;l++){var c=t.Ports[l],d=c.Side||("input"===c.Direction?"left":"right");s[d]||(s[d]=[]),s[d].push(c)}var p={};for(var h in s)p[h]=s[h].length;for(var u in s)for(var f=s[u],w=a?a.getEdgeFromSide(u):u,v=0;v<f.length;v++){var g=f[v],y=this.getPortLocalPosition(u,v,f.length,o,i,r,p),b=null;if(g.Label){var m=g.PortType&&{"event-in":"#3498db","event-out":"#2ecc71",setting:"#e67e22",value:"#f1c40f",error:"#e74c3c"}[g.PortType]||"#95a5a6",_=12,P=5*g.Label.length,F=void 0,S=void 0,V=void 0,C=void 0,k=void 0,T=void 0,D=void 0,A=void 0,H=void 0,x=void 0;"left"===w?(C=(F=1)+5+5,k="start",T=F+(V=10+P+5+2)-2,D=S=y.y-6,A=2,H=_,x="M "+F+" "+S+" L "+(F+V)+" "+S+" L "+(F+V)+" "+(S+_)+" L "+F+" "+(S+_)):"right"===w?(C=(F=o-(V=7+P+5+5)-1)+2+5,k="start",T=F,D=S=y.y-6,A=2,H=_,x="M "+(F+V)+" "+S+" L "+F+" "+S+" L "+F+" "+(S+_)+" L "+(F+V)+" "+(S+_)):"top"===w?(V=P+10,F=y.x-V/2,S=1,C=y.x,k="middle",T=F,D=S+_-2,A=V,H=2,x="M "+F+" "+S+" L "+F+" "+(S+_)+" L "+(F+V)+" "+(S+_)+" L "+(F+V)+" "+S):(V=P+10,F=y.x-V/2,S=i-_-1,C=y.x,k="middle",T=F,D=S,A=V,H=2,x="M "+F+" "+(S+_)+" L "+F+" "+S+" L "+(F+V)+" "+S+" L "+(F+V)+" "+(S+_));var I=this._FlowView._SVGHelperProvider.createSVGElement("rect");I.setAttribute("class","pict-flow-port-label-bg"),I.setAttribute("x",String(F)),I.setAttribute("y",String(S)),I.setAttribute("width",String(V)),I.setAttribute("height",String(_)),I.setAttribute("fill","var(--pf-port-label-bg, rgba(255, 253, 240, 0.5))"),e.appendChild(I);var M=this._FlowView._SVGHelperProvider.createSVGElement("path");M.setAttribute("class","pict-flow-port-label-bg"),M.setAttribute("d",x),M.setAttribute("fill","none"),M.setAttribute("stroke",m),M.setAttribute("stroke-width","0.75"),e.appendChild(M);var N=this._FlowView._SVGHelperProvider.createSVGElement("rect");N.setAttribute("class","pict-flow-port-label-bg"),N.setAttribute("x",String(T)),N.setAttribute("y",String(D)),N.setAttribute("width",String(A)),N.setAttribute("height",String(H)),N.setAttribute("fill",m),e.appendChild(N),(b=this._FlowView._SVGHelperProvider.createSVGElement("text")).setAttribute("class","pict-flow-port-label"),b.setAttribute("fill","var(--pf-port-label-text, #2c3e50)"),b.textContent=g.Label,b.setAttribute("x",String(C)),b.setAttribute("y",String(S+6)),b.setAttribute("text-anchor",k),b.setAttribute("dominant-baseline","central")}var L=this._FlowView._ConnectorShapesProvider,E=void 0;if(L)E=L.createPortElement(g,y,t.Hash);else{E=this._FlowView._SVGHelperProvider.createSVGElement("circle");var z="pict-flow-port ".concat(g.Direction);g.PortType&&(z+=" port-type-".concat(g.PortType)),E.setAttribute("class",z),E.setAttribute("cx",String(y.x)),E.setAttribute("cy",String(y.y)),E.setAttribute("r","5"),E.setAttribute("data-port-hash",g.Hash),E.setAttribute("data-node-hash",t.Hash),E.setAttribute("data-port-direction",g.Direction),g.PortType&&E.setAttribute("data-port-type",g.PortType),E.setAttribute("data-element-type","port")}e.appendChild(E),b&&e.appendChild(b)}}}},{key:"getPortLocalPosition",value:function(t,e,o,i,n,r,a){return this._FlowView._GeometryProvider.getPortLocalPosition(t,e,o,i,n,r,a)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],35:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowRenderManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"renderFlow",value:function(){if(this._FlowView&&this._FlowView._NodesLayer&&this._FlowView._ConnectionsLayer){for(;this._FlowView._NodesLayer.firstChild;)this._FlowView._NodesLayer.removeChild(this._FlowView._NodesLayer.firstChild);for(;this._FlowView._ConnectionsLayer.firstChild;)this._FlowView._ConnectionsLayer.removeChild(this._FlowView._ConnectionsLayer.firstChild);for(var t=0;t<this._FlowView._FlowData.Connections.length;t++){var e=this._FlowView._FlowData.Connections[t],o=this._FlowView._FlowData.ViewState.SelectedConnectionHash===e.Hash;this._FlowView._ConnectionRenderer.renderConnection(e,this._FlowView._ConnectionsLayer,o)}for(var i=0;i<this._FlowView._FlowData.Nodes.length;i++){var n=this._FlowView._FlowData.Nodes[i],r=this._FlowView._FlowData.ViewState.SelectedNodeHash===n.Hash,a=this._FlowView._NodeTypeProvider.getNodeType(n.Type);if(a&&a.DefaultPorts&&n.Ports)for(var s=0;s<n.Ports.length;s++)for(var l=n.Ports[s],c=0;c<a.DefaultPorts.length;c++){var d=a.DefaultPorts[c];if(d.Label===l.Label&&d.Direction===l.Direction){d.PortType&&(l.PortType=d.PortType),d.Side&&(l.Side=d.Side);break}}this._FlowView._NodeView.renderNode(n,this._FlowView._NodesLayer,r,a)}this._FlowView._PropertiesPanelView&&this._FlowView._PanelsLayer&&this._FlowView._TethersLayer&&this._FlowView._PropertiesPanelView.renderPanels(this._FlowView._FlowData.OpenPanels,this._FlowView._PanelsLayer,this._FlowView._TethersLayer,this._FlowView._FlowData.ViewState.SelectedTetherHash),this._FlowView.updateViewportTransform()}}},{key:"renderSingleConnection",value:function(t){if(this._FlowView&&this._FlowView._ConnectionsLayer){for(var e=this._FlowView._ConnectionsLayer.querySelectorAll('[data-connection-hash="'.concat(t,'"]')),o=0;o<e.length;o++)e[o].remove();var i=this._FlowView.getConnection(t);if(i){var n=this._FlowView._FlowData.ViewState.SelectedConnectionHash===t;this._FlowView._ConnectionRenderer.renderConnection(i,this._FlowView._ConnectionsLayer,n)}}}},{key:"renderSingleTether",value:function(t){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){for(var e=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(t,'"]')),o=0;o<e.length;o++)e[o].remove();var i=this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i){var n=this._FlowView.getNode(i.NodeHash);if(n){var r=this._FlowView._FlowData.ViewState.SelectedTetherHash===t;this._FlowView._TetherService.renderTether(i,n,this._FlowView._TethersLayer,r,this._FlowView.options.ViewIdentifier)}}}}},{key:"updateNodePosition",value:function(t,e,o){if(this._FlowView){var i=this._FlowView.getNode(t);if(i){this._FlowView.options.EnableGridSnap&&(e=this._FlowView._LayoutService.snapToGrid(e,this._FlowView.options.GridSnapSize),o=this._FlowView._LayoutService.snapToGrid(o,this._FlowView.options.GridSnapSize)),i.X=e,i.Y=o,this._FlowView._resetHandlesForNode(t);var n=this._FlowView._NodesLayer.querySelector('[data-node-hash="'.concat(t,'"]'));n&&n.setAttribute("transform","translate(".concat(e,", ").concat(o,")")),this.renderConnectionsForNode(t),this.renderTethersForNode(t)}}}},{key:"renderConnectionsForNode",value:function(t){if(this._FlowView&&this._FlowView._ConnectionsLayer)for(var e=this._FlowView._FlowData.Connections.filter(function(e){return e.SourceNodeHash===t||e.TargetNodeHash===t}),o=0;o<e.length;o++){for(var i=e[o],n=this._FlowView._FlowData.ViewState.SelectedConnectionHash===i.Hash,r=this._FlowView._ConnectionsLayer.querySelectorAll('[data-connection-hash="'.concat(i.Hash,'"]')),a=0;a<r.length;a++)r[a].remove();this._FlowView._ConnectionRenderer.renderConnection(i,this._FlowView._ConnectionsLayer,n)}}},{key:"renderTethersForNode",value:function(t){if(this._FlowView&&this._FlowView._TethersLayer&&this._FlowView._TetherService){var e=this._FlowView._FlowData.OpenPanels.filter(function(e){return e.NodeHash===t});if(0!==e.length)for(var o=0;o<e.length;o++){for(var i=this._FlowView._TethersLayer.querySelectorAll('[data-panel-hash="'.concat(e[o].Hash,'"]')),n=0;n<i.length;n++)i[n].remove();var r=this._FlowView.getNode(e[o].NodeHash);if(r){var a=this._FlowView._FlowData.ViewState.SelectedTetherHash===e[o].Hash;this._FlowView._TetherService.renderTether(e[o],r,this._FlowView._TethersLayer,a,this._FlowView.options.ViewIdentifier)}}}}},{key:"reinjectMarkerDefs",value:function(){if(this._FlowView&&this._FlowView._ConnectorShapesProvider&&this._FlowView._SVGElement){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView._SVGElement.querySelector("defs");if(e){for(var o=e.querySelectorAll("marker"),i=0;i<o.length;i++)o[i].remove();var n=this._FlowView._ConnectorShapesProvider.generateMarkerDefs(t),r=document.createElementNS("http://www.w3.org/2000/svg","svg");for(r.innerHTML=n;r.firstChild;)e.appendChild(r.firstChild)}}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],36:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowSelectionManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"selectNode",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedNodeHash;if(this._FlowView._FlowData.ViewState.SelectedNodeHash=t,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.Nodes.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onNodeSelected",o)}}},{key:"selectConnection",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedConnectionHash;if(this._FlowView._FlowData.ViewState.SelectedConnectionHash=t,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.Connections.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onConnectionSelected",o)}}},{key:"selectTether",value:function(t){var e=this._FlowView._FlowData.ViewState.SelectedTetherHash;if(this._FlowView._FlowData.ViewState.SelectedTetherHash=t,this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView.renderFlow(),this._FlowView._EventHandlerProvider&&t!==e){var o=t?this._FlowView._FlowData.OpenPanels.find(function(e){return e.Hash===t}):null;this._FlowView._EventHandlerProvider.fireEvent("onTetherSelected",o)}}},{key:"deselectAll",value:function(){this._FlowView._FlowData.ViewState.SelectedNodeHash=null,this._FlowView._FlowData.ViewState.SelectedConnectionHash=null,this._FlowView._FlowData.ViewState.SelectedTetherHash=null,this._FlowView.renderFlow()}},{key:"deleteSelected",value:function(){return this._FlowView._FlowData.ViewState.SelectedNodeHash?this._FlowView.removeNode(this._FlowView._FlowData.ViewState.SelectedNodeHash):!!this._FlowView._FlowData.ViewState.SelectedConnectionHash&&this._FlowView.removeConnection(this._FlowView._FlowData.ViewState.SelectedConnectionHash)}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],37:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowTether",n._FlowView=o&&o.FlowView?o.FlowView:null,n}return _inherits(e,t),_createClass(e,[{key:"getSmartAnchors",value:function(t,e){var o,i,n=e.X+e.Width/2,r=e.Y+e.Height/2,a=t.X+t.Width/2-n,s=t.Y+t.Height/2-r;Math.abs(a)>=Math.abs(s)?a>=0?(o="right",i="left"):(o="left",i="right"):s>=0?(o="bottom",i="top"):(o="top",i="bottom");var l=this._FlowView._GeometryProvider.getEdgeCenter(e,o),c=this._FlowView._GeometryProvider.getEdgeCenter(t,i);return{nodeAnchor:Object.assign(l,{side:o}),panelAnchor:Object.assign(c,{side:i})}}},{key:"generateBezierPath",value:function(t,e,o,i){var n=this._FlowView._GeometryProvider.sideDirection(t.side),r=this._FlowView._GeometryProvider.sideDirection(e.side),a=t.x+20*n.dx,s=t.y+20*n.dy,l=e.x+20*r.dx,c=e.y+20*r.dy;if(null==o||null==i){var d=Math.abs(l-a),p=Math.abs(c-s),h=.4*Math.max(d,p,40),u=a+n.dx*h,f=s+n.dy*h,w=l+r.dx*h,v=c+r.dy*h;return this._FlowView._PathGenerator.buildBezierPathString({x:t.x,y:t.y},{x:a,y:s},{x:u,y:f},{x:w,y:v},{x:l,y:c},{x:e.x,y:e.y})}var g=a+30*n.dx,y=s+30*n.dy,b=l+30*r.dx,m=c+30*r.dy,_=l-a,P=c-s,F=Math.sqrt(_*_+P*P)||1,S=o-25*(_/=F),V=i-25*(P/=F),C=o+25*_,k=i+25*P;return this._FlowView._PathGenerator.buildSplitBezierPathString({x:t.x,y:t.y},{x:a,y:s},{x:g,y:y},{x:S,y:V},{x:o,y:i},{x:C,y:k},{x:b,y:m},{x:l,y:c},{x:e.x,y:e.y})}},{key:"generateOrthogonalPath",value:function(t,e,o,i){var n,r,a=this._FlowView._GeometryProvider.sideDirection(t.side),s=this._FlowView._GeometryProvider.sideDirection(e.side),l=t.x+20*a.dx,c=t.y+20*a.dy,d=e.x+20*s.dx,p=e.y+20*s.dy;if(o&&o.corner1&&o.corner2)n=o.corner1,r=o.corner2;else{var h=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(l,c,d,p,a,s,i);n=h.corner1,r=h.corner2}return this._FlowView._PathGenerator.buildOrthogonalPathString({x:t.x,y:t.y},{x:l,y:c},{x:n.x,y:n.y},{x:r.x,y:r.y},{x:d,y:p},{x:e.x,y:e.y})}},{key:"getAutoMidpoint",value:function(t,e){return this._FlowView._PathGenerator.getAutoMidpointSimple(t,e,20)}},{key:"getOrthoGeometry",value:function(t,e,o){var i,n=this._FlowView._GeometryProvider.sideDirection(t.side),r=this._FlowView._GeometryProvider.sideDirection(e.side),a=t.x+20*n.dx,s=t.y+20*n.dy,l=e.x+20*r.dx,c=e.y+20*r.dy;o.TetherHandleCustomized&&null!=o.TetherOrthoCorner1X?((i=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,s,l,c,n,r,o.TetherOrthoMidOffset||0)).corner1={x:o.TetherOrthoCorner1X,y:o.TetherOrthoCorner1Y},i.corner2={x:o.TetherOrthoCorner2X,y:o.TetherOrthoCorner2Y}):i=this._FlowView._PathGenerator.computeAutoOrthogonalCorners(a,s,l,c,n,r,o.TetherOrthoMidOffset||0);var d={x:(i.corner1.x+i.corner2.x)/2,y:(i.corner1.y+i.corner2.y)/2};return{corner1:i.corner1,corner2:i.corner2,midpoint:d}}},{key:"generatePath",value:function(t,e,o){if("orthogonal"===(t.TetherLineMode||"bezier")){var i=null;return t.TetherHandleCustomized&&null!=t.TetherOrthoCorner1X&&(i={corner1:{x:t.TetherOrthoCorner1X,y:t.TetherOrthoCorner1Y},corner2:{x:t.TetherOrthoCorner2X,y:t.TetherOrthoCorner2Y}}),this.generateOrthogonalPath(e,o,i,t.TetherOrthoMidOffset||0)}var n=this._getTetherBezierHandles(t);if(n.length>0)return this.generateMultiBezierPath(e,o,n);var r=t.TetherHandleCustomized&&null!=t.TetherBezierHandleX?t.TetherBezierHandleX:null,a=t.TetherHandleCustomized&&null!=t.TetherBezierHandleY?t.TetherBezierHandleY:null;return this.generateBezierPath(e,o,r,a)}},{key:"_getTetherBezierHandles",value:function(t){return t&&t.TetherHandleCustomized?Array.isArray(t.TetherBezierHandles)&&t.TetherBezierHandles.length>0?t.TetherBezierHandles:null!=t.TetherBezierHandleX&&null!=t.TetherBezierHandleY?[{x:t.TetherBezierHandleX,y:t.TetherBezierHandleY}]:[]:[]}},{key:"generateMultiBezierPath",value:function(t,e,o){var i=this._FlowView._GeometryProvider.sideDirection(t.side),n=this._FlowView._GeometryProvider.sideDirection(e.side),r={x:t.x+20*i.dx,y:t.y+20*i.dy},a={x:e.x+20*n.dx,y:e.y+20*n.dy};return this._FlowView._PathGenerator.buildMultiBezierPathString(t,r,t.side,a,e.side,e,o)}},{key:"updateHandlePosition",value:function(t,e,o,i){if(t.TetherHandleCustomized=!0,e&&e.startsWith("bezier-handle-")){var n=parseInt(e.replace("bezier-handle-",""),10);!isNaN(n)&&Array.isArray(t.TetherBezierHandles)&&n<t.TetherBezierHandles.length&&(t.TetherBezierHandles[n].x=o,t.TetherBezierHandles[n].y=i)}else switch(e){case"bezier-midpoint":Array.isArray(t.TetherBezierHandles)&&0!==t.TetherBezierHandles.length?(t.TetherBezierHandles[0].x=o,t.TetherBezierHandles[0].y=i):t.TetherBezierHandles=[{x:o,y:i}],t.TetherBezierHandleX=o,t.TetherBezierHandleY=i;break;case"ortho-corner1":t.TetherOrthoCorner1X=o,t.TetherOrthoCorner1Y=i;break;case"ortho-corner2":t.TetherOrthoCorner2X=o,t.TetherOrthoCorner2Y=i;break;case"ortho-midpoint":t.TetherOrthoMidOffset=t.TetherOrthoMidOffset||0,t._TetherMidDragX=o,t._TetherMidDragY=i}}},{key:"resetHandlePositions",value:function(t){t.TetherHandleCustomized&&(t.TetherHandleCustomized=!1,t.TetherBezierHandles=[],t.TetherBezierHandleX=null,t.TetherBezierHandleY=null,t.TetherOrthoCorner1X=null,t.TetherOrthoCorner1Y=null,t.TetherOrthoCorner2X=null,t.TetherOrthoCorner2Y=null,t.TetherOrthoMidOffset=0)}},{key:"resetHandlesForNode",value:function(t,e){for(var o=0;o<t.length;o++){var i=t[o];i.NodeHash===e&&this.resetHandlePositions(i)}}},{key:"addHandle",value:function(t,e,o,i,n){t.TetherLineMode="bezier",Array.isArray(t.TetherBezierHandles)||(t.TetherBezierHandles=[],null!=t.TetherBezierHandleX&&null!=t.TetherBezierHandleY&&t.TetherBezierHandles.push({x:t.TetherBezierHandleX,y:t.TetherBezierHandleY}));var r=0;this._FlowView._ConnectionRenderer&&i&&n&&(r=this._FlowView._ConnectionRenderer.computeInsertionIndex(t.TetherBezierHandles,{x:e,y:o},i,n)),t.TetherBezierHandles.splice(r,0,{x:e,y:o}),t.TetherHandleCustomized=!0}},{key:"removeHandle",value:function(t,e){Array.isArray(t.TetherBezierHandles)&&(e<0||e>=t.TetherBezierHandles.length||(t.TetherBezierHandles.splice(e,1),0===t.TetherBezierHandles.length&&(t.TetherHandleCustomized=!1,t.TetherBezierHandleX=null,t.TetherBezierHandleY=null)))}},{key:"toggleLineMode",value:function(t){var e=t.TetherLineMode||"bezier";return t.TetherLineMode="bezier"===e?"orthogonal":"bezier",t.TetherHandleCustomized=!1,t.TetherBezierHandles=[],t.TetherBezierHandleX=null,t.TetherBezierHandleY=null,t.TetherOrthoCorner1X=null,t.TetherOrthoCorner1Y=null,t.TetherOrthoCorner2X=null,t.TetherOrthoCorner2Y=null,t.TetherOrthoMidOffset=0,t.TetherLineMode}},{key:"renderTether",value:function(t,e,o,i,n){if(e){var r=this.getSmartAnchors(t,e),a=r.panelAnchor,s=r.nodeAnchor,l=this.generatePath(t,a,s),c=this._FlowView._ConnectorShapesProvider;if(c){var d=c.createTetherHitAreaElement(l,t.Hash);o.appendChild(d);var p=c.createTetherPathElement(l,t.Hash,i,n);o.appendChild(p)}else{var h=this._FlowView._SVGHelperProvider.createSVGElement("path");h.setAttribute("class","pict-flow-tether-hitarea"),h.setAttribute("d",l),h.setAttribute("data-element-type","tether-hitarea"),h.setAttribute("data-panel-hash",t.Hash),o.appendChild(h);var u=this._FlowView._SVGHelperProvider.createSVGElement("path");u.setAttribute("class","pict-flow-tether-line".concat(i?" selected":"")),u.setAttribute("d",l),u.setAttribute("marker-end","url(#flow-tether-arrowhead-".concat(n,")")),u.setAttribute("data-element-type","tether"),u.setAttribute("data-panel-hash",t.Hash),o.appendChild(u)}i&&this._renderHandles(t,o,a,s)}}},{key:"_renderHandles",value:function(t,e,o,i){if("orthogonal"===(t.TetherLineMode||"bezier")){var n=this.getOrthoGeometry(o,i,t);this._createHandle(e,t.Hash,"ortho-corner1",n.corner1.x,n.corner1.y,"pict-flow-tether-handle"),this._createHandle(e,t.Hash,"ortho-midpoint",n.midpoint.x,n.midpoint.y,"pict-flow-tether-handle-midpoint"),this._createHandle(e,t.Hash,"ortho-corner2",n.corner2.x,n.corner2.y,"pict-flow-tether-handle")}else{var r=this._getTetherBezierHandles(t);if(r.length>0)for(var a=0;a<r.length;a++)this._createHandle(e,t.Hash,"bezier-handle-"+a,r[a].x,r[a].y,"pict-flow-tether-handle");else{var s=this.getAutoMidpoint(o,i);this._createHandle(e,t.Hash,"bezier-midpoint",s.x,s.y,"pict-flow-tether-handle-midpoint")}}}},{key:"_createHandle",value:function(t,e,o,i,n,r){if(this._FlowView._ConnectorShapesProvider){var a="pict-flow-tether-handle-midpoint"===r?"tether-handle-midpoint":"tether-handle";this._FlowView._ConnectorShapesProvider.createFullHandle(t,e,o,i,n,a,"tether-handle","data-panel-hash")}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],38:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,o,i])).serviceType="PictServiceFlowViewportManager",n._FlowView=o&&o.FlowView?o.FlowView:null,n._IsFullscreen=!1,n}return _inherits(e,t),_createClass(e,[{key:"updateViewportTransform",value:function(){if(this._FlowView._ViewportElement){var t=this._FlowView._FlowData.ViewState;this._FlowView._ViewportElement.setAttribute("transform","translate(".concat(t.PanX,", ").concat(t.PanY,") scale(").concat(t.Zoom,")"))}}},{key:"setZoom",value:function(t,e,o){var i=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,t)),n=this._FlowView._FlowData.ViewState.Zoom;if("number"==typeof e&&"number"==typeof o){var r=this._FlowView._FlowData.ViewState;r.PanX=e-(e-r.PanX)*(i/n),r.PanY=o-(o-r.PanY)*(i/n)}this._FlowView._FlowData.ViewState.Zoom=i,this.updateViewportTransform()}},{key:"zoomToFit",value:function(){if(0!==this._FlowView._FlowData.Nodes.length&&this._FlowView._SVGElement){for(var t=1/0,e=1/0,o=-1/0,i=-1/0,n=0;n<this._FlowView._FlowData.Nodes.length;n++){var r=this._FlowView._FlowData.Nodes[n];t=Math.min(t,r.X),e=Math.min(e,r.Y),o=Math.max(o,r.X+r.Width),i=Math.max(i,r.Y+r.Height)}var a=o-t+100,s=i-e+100,l=this._FlowView._SVGElement.getBoundingClientRect(),c=l.width/a,d=l.height/s,p=Math.min(c,d,1);p=Math.max(this._FlowView.options.MinZoom,Math.min(this._FlowView.options.MaxZoom,p));var h=(t+o)/2,u=(e+i)/2;this._FlowView._FlowData.ViewState.Zoom=p,this._FlowView._FlowData.ViewState.PanX=l.width/2-h*p,this._FlowView._FlowData.ViewState.PanY=l.height/2-u*p,this.updateViewportTransform()}}},{key:"screenToSVGCoords",value:function(t,e){if(!this._FlowView._SVGElement)return{x:t,y:e};var o=this._FlowView._SVGElement.createSVGPoint();o.x=t,o.y=e;var i=this._FlowView._SVGElement.getScreenCTM();if(i){var n=i.inverse(),r=o.matrixTransform(n),a=this._FlowView._FlowData.ViewState;return{x:(r.x-a.PanX)/a.Zoom,y:(r.y-a.PanY)/a.Zoom}}return{x:t,y:e}}},{key:"toggleFullscreen",value:function(){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(t));if(e.length<1)return this._IsFullscreen;var o=e[0];return this._IsFullscreen=!this._IsFullscreen,this._IsFullscreen?o.classList.add("pict-flow-fullscreen"):o.classList.remove("pict-flow-fullscreen"),this._IsFullscreen}},{key:"exitFullscreen",value:function(){if(this._IsFullscreen){var t=this._FlowView.options.ViewIdentifier,e=this._FlowView.pict.ContentAssignment.getElement("#Flow-Wrapper-".concat(t));e.length>0&&e[0].classList.remove("pict-flow-fullscreen"),this._IsFullscreen=!1}}}])}(t("fable-serviceproviderbase"));e.exports=i},{"fable-serviceproviderbase":4}],39:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-FloatingToolbar",DefaultRenderable:"Flow-FloatingToolbar-Content",DefaultDestinationAddress:"#Flow-FloatingToolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",CSS:!1,Templates:[{Hash:"Flow-FloatingToolbar-Template",Template:'\n<div class="pict-flow-floating-toolbar" id="Flow-FloatingToolbar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-floating-grip" id="Flow-FloatingGrip-{~D:Record.FlowViewIdentifier~}" title="Drag to move · Double-click to collapse">\n\t\t<span id="Flow-FloatingIcon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t</div>\n\t<button class="pict-flow-floating-btn" data-flow-action="add-node" title="Add Node">\n\t\t<span id="Flow-FloatingIcon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="cards-popup" title="Cards">\n\t\t<span id="Flow-FloatingIcon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="delete-selected" title="Delete Selected">\n\t\t<span id="Flow-FloatingIcon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-in" title="Zoom In">\n\t\t<span id="Flow-FloatingIcon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-out" title="Zoom Out">\n\t\t<span id="Flow-FloatingIcon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="zoom-fit" title="Fit to View">\n\t\t<span id="Flow-FloatingIcon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="auto-layout" title="Auto Layout">\n\t\t<span id="Flow-FloatingIcon-auto-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="layout-popup" title="Layout">\n\t\t<span id="Flow-FloatingIcon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<button class="pict-flow-floating-btn" data-flow-action="fullscreen" title="Toggle Fullscreen">\n\t\t<span id="Flow-FloatingIcon-fullscreen-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n\t<div class="pict-flow-floating-separator"></div>\n\t<button class="pict-flow-floating-btn" data-flow-action="dock-toolbar" title="Dock Toolbar">\n\t\t<span id="Flow-FloatingIcon-dock-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-FloatingToolbar-Content",TemplateHash:"Flow-FloatingToolbar-Template",DestinationAddress:"#Flow-FloatingToolbar-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowFloatingToolbar",r._ToolbarView=null,r._FlowView=null,r._IsCollapsed=!1,r._IsDragging=!1,r._DragStartX=0,r._DragStartY=0,r._DragStartLeft=0,r._DragStartTop=0,r._BoundMouseMove=null,r._BoundMouseUp=null,r}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o,i){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"onAfterRender",value:function(t,o,i,n){var r=this,a=this.options.FlowViewIdentifier,s=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(a));s.length>0&&s[0].addEventListener("click",function(t){var e=t.target;if(e){var o=e.closest("[data-flow-action]");if(o){var i=o.getAttribute("data-flow-action");"dock-toolbar"!==i?r._ToolbarView&&r._ToolbarView._handleToolbarAction(i):r._ToolbarView&&r._ToolbarView._setToolbarMode("docked")}}});var l=this.pict.ContentAssignment.getElement("#Flow-FloatingGrip-".concat(a));if(l.length>0&&(l[0].addEventListener("mousedown",function(t){r._startDrag(t)}),l[0].addEventListener("dblclick",function(t){t.preventDefault(),t.stopPropagation(),r._toggleCollapse()})),this._populateIcons(),s.length>0){if(!1===this.options.EnableAddNode){var c=s[0].querySelector('[data-flow-action="add-node"]');c&&c.remove()}if(!1===this.options.EnableCardPalette){var d=s[0].querySelector('[data-flow-action="cards-popup"]');d&&d.remove()}}return _superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"_populateIcons",value:function(){var t=this._FlowView?this._FlowView._IconProvider:null;if(t)for(var e=this.options.FlowViewIdentifier,o={grip:"grip",plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit","auto-layout":"auto-layout",cards:"cards",layout:"layout",fullscreen:"fullscreen",dock:"dock"},i=Object.keys(o),n=0;n<i.length;n++){var r="Flow-FloatingIcon-".concat(i[n],"-").concat(e),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=t.getIconSVGMarkup(o[i[n]],16))}}},{key:"_toggleCollapse",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));e.length<1||(this._IsCollapsed=!this._IsCollapsed,this._IsCollapsed?e[0].classList.add("collapsed"):e[0].classList.remove("collapsed"))}},{key:"_startDrag",value:function(t){var e=this;t.preventDefault();var o=this.options.FlowViewIdentifier,i=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(o));if(!(i.length<1)){var n=i[0];this._IsDragging=!0,this._DragStartX=t.clientX,this._DragStartY=t.clientY,this._DragStartLeft=n.offsetLeft,this._DragStartTop=n.offsetTop,this._BoundMouseMove=function(t){e._onDragMove(t)},this._BoundMouseUp=function(){e._onDragEnd()},document.addEventListener("mousemove",this._BoundMouseMove),document.addEventListener("mouseup",this._BoundMouseUp)}}},{key:"_onDragMove",value:function(t){if(this._IsDragging){var e=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(e));if(!(o.length<1)){var i=o[0],n=t.clientX-this._DragStartX,r=t.clientY-this._DragStartY,a=this._DragStartLeft+n,s=this._DragStartTop+r,l=i.parentElement;if(l){var c=l.clientWidth-i.offsetWidth,d=l.clientHeight-i.offsetHeight;a=Math.max(0,Math.min(a,c)),s=Math.max(0,Math.min(s,d))}i.style.left=a+"px",i.style.top=s+"px"}}}},{key:"_onDragEnd",value:function(){if(this._IsDragging=!1,this._BoundMouseMove&&(document.removeEventListener("mousemove",this._BoundMouseMove),this._BoundMouseMove=null),this._BoundMouseUp&&(document.removeEventListener("mouseup",this._BoundMouseUp),this._BoundMouseUp=null),this._ToolbarView){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));e.length>0&&(this._ToolbarView._FloatingPosition.X=e[0].offsetLeft,this._ToolbarView._FloatingPosition.Y=e[0].offsetTop)}}},{key:"show",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(t));e.length>0&&(e[0].style.display="block");var o=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-".concat(t));o.length>0&&this._ToolbarView&&(o[0].style.left=this._ToolbarView._FloatingPosition.X+"px",o[0].style.top=this._ToolbarView._FloatingPosition.Y+"px"),this._IsCollapsed&&o.length>0&&(this._IsCollapsed=!1,o[0].classList.remove("collapsed"))}},{key:"hide",value:function(){var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-FloatingToolbar-Container-".concat(t));e.length>0&&(e[0].style.display="none")}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],40:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-NodeRenderer",AutoRender:!1,NodeTitleBarHeight:22},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowNode",r._FlowView=null,r}return _inherits(e,t),_createClass(e,[{key:"renderNode",value:function(t,e,o,i){var n=this,r=this._FlowView._SVGHelperProvider.createSVGElement("g"),a="pict-flow-node ".concat(o?"selected":""," pict-flow-node-").concat(t.Type||"default");i&&(i.PortLabelsOnHover&&(a+=" pict-flow-node-port-labels-hover"),i.PortLabelsVertical&&(a+=" pict-flow-node-port-labels-vertical")),r.setAttribute("class",a),r.setAttribute("transform","translate(".concat(t.X,", ").concat(t.Y,")")),r.setAttribute("data-node-hash",t.Hash),r.setAttribute("data-element-type","node");var s=t.Width||180,l=t.Height||80,c=this.options.NodeTitleBarHeight,d=this._FlowView._GeometryProvider;if(d&&t.Ports&&t.Ports.length>0){var p=d.computeMinimumNodeHeight(t.Ports,c);p>l&&(l=p)}t.Width=s,t.Height=l;var h="rect";if(this._FlowView._ThemeProvider){var u=this._FlowView._ThemeProvider.getActiveTheme();u&&u.NodeBodyMode&&(h=u.NodeBodyMode)}"bracket"===h?this._renderBracketNodeBody(r,t,s,l,c,i):this._renderRectNodeBody(r,t,s,l,c,i);var f=!1,w=12;if(i&&i.CardMetadata){var v=i.CardMetadata,g=this._FlowView._IconProvider;(v.Icon||g)&&(f=!0)}var y=this._FlowView._SVGHelperProvider.createSVGElement("text");y.setAttribute("class","pict-flow-node-title"),f?(y.setAttribute("x",String(24)),y.setAttribute("text-anchor","start")):(y.setAttribute("x",String(s/2)),y.setAttribute("text-anchor","middle")),y.setAttribute("y",String(c/2+1)),y.setAttribute("dominant-baseline","central"),y.textContent=t.Title||"Untitled",r.appendChild(y);var b=!i||!1!==i.ShowTypeLabel,m=function(){if(b&&i&&i.Label&&i.Label!==t.Title){var e=n._FlowView._SVGHelperProvider.createSVGElement("text");e.setAttribute("class","pict-flow-node-type-label"),e.setAttribute("x",String(s/2)),e.setAttribute("y",String(c+16)),e.setAttribute("text-anchor","middle"),e.setAttribute("dominant-baseline","central"),e.textContent=i.Label,r.appendChild(e)}if(i&&i.CardMetadata){var o=i.CardMetadata,a=n._FlowView._IconProvider,d=!1,p=(c-w)/2;if(o.Icon&&a&&!a.isEmojiIcon(o.Icon)){var h=a.resolveIconKey(o),u=a.renderIconIntoSVGGroup(h,r,8,p,w);u&&u.setAttribute("class",(u.getAttribute("class")||"")+" pict-flow-node-title-icon"),d=!0}else if(o.Icon&&a&&a.isEmojiIcon(o.Icon)){var f=n._FlowView._SVGHelperProvider.createSVGElement("text");f.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),f.setAttribute("font-size",String(w)),f.setAttribute("text-anchor","middle"),f.setAttribute("dominant-baseline","central"),f.setAttribute("pointer-events","none"),f.setAttribute("x",String(14)),f.setAttribute("y",String(c/2)),f.textContent=o.Icon,r.appendChild(f),d=!0}else if(o.Icon){var v=n._FlowView._SVGHelperProvider.createSVGElement("text");v.setAttribute("class","pict-flow-node-card-icon pict-flow-node-title-icon-emoji"),v.setAttribute("font-size",String(w)),v.setAttribute("text-anchor","middle"),v.setAttribute("dominant-baseline","central"),v.setAttribute("pointer-events","none"),v.setAttribute("x",String(14)),v.setAttribute("y",String(c/2)),v.textContent=o.Icon,r.appendChild(v),d=!0}if(!d&&a){var g=a.renderIconIntoSVGGroup("default",r,8,p,w);g&&g.setAttribute("class",(g.getAttribute("class")||"")+" pict-flow-node-title-icon")}var y=c+(l-c)/2;if(b&&o.Code){var m=n._FlowView._SVGHelperProvider.createSVGElement("text");m.setAttribute("class","pict-flow-node-card-code"),m.setAttribute("font-size","10"),m.setAttribute("font-family","monospace"),m.setAttribute("fill","#7f8c8d"),m.setAttribute("text-anchor","middle"),m.setAttribute("dominant-baseline","central"),m.setAttribute("pointer-events","none"),m.setAttribute("x",String(s/2)),m.setAttribute("y",String(y)),m.textContent=o.Code,r.appendChild(m)}if(o.Tooltip||o.Description){var _=n._FlowView._SVGHelperProvider.createSVGElement("title");_.textContent=o.Tooltip||o.Description,r.appendChild(_)}}};if(!i||!1!==i.LabelsInFront?(this._renderBodyContent(t,r,s,l,i),m(),this._renderPorts(t,r,s,l,i)):(m(),this._renderPorts(t,r,s,l,i),this._renderBodyContent(t,r,s,l,i)),i&&i.PropertiesPanel){var _,P=10,F=s-P-4,S=l-P-4,V=this._FlowView._ConnectorShapesProvider;V?_=V.createPanelIndicatorElement(t.Hash,F,S,P,P):((_=this._FlowView._SVGHelperProvider.createSVGElement("rect")).setAttribute("class","pict-flow-node-panel-indicator"),_.setAttribute("x",String(F)),_.setAttribute("y",String(S)),_.setAttribute("width",String(P)),_.setAttribute("height",String(P)),_.setAttribute("rx","2"),_.setAttribute("ry","2"),_.setAttribute("data-node-hash",t.Hash),_.setAttribute("data-element-type","panel-indicator"));var C=this._FlowView._SVGHelperProvider.createSVGElement("title");C.textContent="Double-click to open properties",_.appendChild(C),r.appendChild(_)}e.appendChild(r)}},{key:"_renderPorts",value:function(t,e,o,i,n){this._FlowView._PortRenderer.renderPorts(t,e,o,i,n,this.options.NodeTitleBarHeight)}},{key:"_renderBodyContent",value:function(t,e,o,i,n){if(n&&n.BodyContent){var r=n.BodyContent,a=r.ContentType;if(a){var s=this.options.NodeTitleBarHeight,l="number"==typeof r.Padding?r.Padding:2,c={x:l,y:s+l,width:o-2*l,height:i-s-2*l},d=this._FlowView.pict||this.pict;if(r.Templates&&Array.isArray(r.Templates)){this._registeredBodyTemplates||(this._registeredBodyTemplates=new Set);for(var p=0;p<r.Templates.length;p++){var h=r.Templates[p];h.Hash&&h.Template&&!this._registeredBodyTemplates.has(h.Hash)&&(d.TemplateProvider.addTemplate(h.Hash,h.Template,"PictViewFlowNode-BodyContent"),this._registeredBodyTemplates.add(h.Hash))}}switch(a){case"svg":this._renderBodyContentSVG(t,e,r,c,n,d);break;case"html":this._renderBodyContentHTML(t,e,r,c,n,d);break;case"canvas":this._renderBodyContentCanvas(t,e,r,c,n);break;default:this.log.warn("PictViewFlowNode _renderBodyContent: unknown ContentType ["+a+"]")}}}}},{key:"_renderBodyContentSVG",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("g");a.setAttribute("class","pict-flow-node-body-content"),a.setAttribute("transform","translate(".concat(i.x,", ").concat(i.y,")"));var s=this._resolveBodyTemplate(o,t,r);if(s){var l=document.createElementNS("http://www.w3.org/2000/svg","svg");for(l.innerHTML=s;l.firstChild;)a.appendChild(l.firstChild)}"function"==typeof o.RenderCallback&&o.RenderCallback(a,t,n,i),e.appendChild(a)}},{key:"_renderBodyContentHTML",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");a.setAttribute("class","pict-flow-node-body-content-fo"),a.setAttribute("x",String(i.x)),a.setAttribute("y",String(i.y)),a.setAttribute("width",String(i.width)),a.setAttribute("height",String(i.height));var s=document.createElement("div");s.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),s.setAttribute("class","pict-flow-node-body-content-html"),s.addEventListener("pointerdown",function(t){t.stopPropagation()}),s.addEventListener("wheel",function(t){t.stopPropagation()});var l=this._resolveBodyTemplate(o,t,r);l&&(s.innerHTML=l),"function"==typeof o.RenderCallback&&o.RenderCallback(s,t,n,i),a.appendChild(s),e.appendChild(a)}},{key:"_renderBodyContentCanvas",value:function(t,e,o,i,n){var r=this._FlowView._SVGHelperProvider.createSVGElement("foreignObject");r.setAttribute("class","pict-flow-node-body-content-fo"),r.setAttribute("x",String(i.x)),r.setAttribute("y",String(i.y)),r.setAttribute("width",String(i.width)),r.setAttribute("height",String(i.height));var a=document.createElement("canvas");a.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),a.setAttribute("class","pict-flow-node-body-content-canvas"),a.width=Math.floor(i.width),a.height=Math.floor(i.height),a.style.width="100%",a.style.height="100%",a.addEventListener("pointerdown",function(t){t.stopPropagation()}),a.addEventListener("wheel",function(t){t.stopPropagation()}),"function"==typeof o.RenderCallback&&o.RenderCallback(a,t,n,i),r.appendChild(a),e.appendChild(r)}},{key:"_resolveBodyTemplate",value:function(t,e,o){return t.TemplateHash?o.parseTemplateByHash(t.TemplateHash,e):t.Template?o.parseTemplate(t.Template,e,null,[e]):null}},{key:"_renderRectNodeBody",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(i)),a.setAttribute("data-node-hash",e.Hash),a.setAttribute("data-element-type","node-body"),r&&r.BodyStyle)for(var s in r.BodyStyle)a.setAttribute(s,r.BodyStyle[s]);if(e.Style){var l=[];e.Style.BodyFill&&l.push("fill:"+e.Style.BodyFill),e.Style.BodyStroke&&l.push("stroke:"+e.Style.BodyStroke),e.Style.BodyStrokeWidth&&l.push("stroke-width:"+e.Style.BodyStrokeWidth),l.length>0&&a.setAttribute("style",l.join(";"))}t.appendChild(a);var c=this._FlowView._SVGHelperProvider.createSVGElement("rect");c.setAttribute("class","pict-flow-node-title-bar"),c.setAttribute("x","0"),c.setAttribute("y","0"),c.setAttribute("width",String(o)),c.setAttribute("height",String(n)),c.setAttribute("data-node-hash",e.Hash),c.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&c.setAttribute("fill",r.TitleBarColor),t.appendChild(c);var d=this._FlowView._SVGHelperProvider.createSVGElement("rect");d.setAttribute("class","pict-flow-node-title-bar-bottom"),d.setAttribute("x","0"),d.setAttribute("y",String(n-8)),d.setAttribute("width",String(o)),d.setAttribute("height","8"),d.setAttribute("data-node-hash",e.Hash),d.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&d.setAttribute("fill",r.TitleBarColor),e.Style&&e.Style.TitleBarColor&&(c.setAttribute("style","fill:"+e.Style.TitleBarColor),d.setAttribute("style","fill:"+e.Style.TitleBarColor)),t.appendChild(d)}},{key:"_renderBracketNodeBody",value:function(t,e,o,i,n,r){var a=this._FlowView._SVGHelperProvider.createSVGElement("rect");if(a.setAttribute("class","pict-flow-node-body pict-flow-node-bracket-fill"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("width",String(o)),a.setAttribute("height",String(i)),a.setAttribute("data-node-hash",e.Hash),a.setAttribute("data-element-type","node-body"),e.Style){var s=[];e.Style.BodyFill&&s.push("fill:"+e.Style.BodyFill),s.length>0&&a.setAttribute("style",s.join(";"))}t.appendChild(a);var l=this._FlowView._SVGHelperProvider.createSVGElement("rect");l.setAttribute("class","pict-flow-node-title-bar pict-flow-node-bracket-title-fill"),l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(o)),l.setAttribute("height",String(n)),l.setAttribute("data-node-hash",e.Hash),l.setAttribute("data-element-type","node-body"),r&&r.TitleBarColor&&l.setAttribute("style","fill:"+r.TitleBarColor),e.Style&&e.Style.TitleBarColor&&l.setAttribute("style","fill:"+e.Style.TitleBarColor),t.appendChild(l);var c={SerifLength:6,TitleSeparator:!0};if(this._FlowView._ThemeProvider){var d=this._FlowView._ThemeProvider.getActiveTheme();d&&d.BracketConfig&&(c=Object.assign(c,d.BracketConfig))}var p=0;this._FlowView._ThemeProvider&&(p=this._FlowView._ThemeProvider.getNodeNoiseAmplitude());var h="";this._FlowView._NoiseProvider&&(h=this._FlowView._NoiseProvider.generateBracketPath(o,i,c.SerifLength,c.TitleSeparator?n:0,p,e.Hash));var u=this._FlowView._SVGHelperProvider.createSVGElement("path");if(u.setAttribute("class","pict-flow-node-bracket"),u.setAttribute("d",h),u.setAttribute("data-node-hash",e.Hash),u.setAttribute("data-element-type","node-body"),e.Style){var f=[];e.Style.BodyStroke&&f.push("stroke:"+e.Style.BodyStroke),e.Style.BodyStrokeWidth&&f.push("stroke-width:"+e.Style.BodyStrokeWidth),f.length>0&&u.setAttribute("style",f.join(";"))}t.appendChild(u)}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],41:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-PropertiesPanel",AutoRender:!1,Templates:[{Hash:"Flow-InfoPanel-Wrapper",Template:'<div class="pict-flow-info-panel">{~D:Record.PanelContent~}</div>'},{Hash:"Flow-InfoPanel-Header-Icon",Template:'<div class="pict-flow-info-panel-header with-icon">{~D:Record.Icon~} {~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Header",Template:'<div class="pict-flow-info-panel-header">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Description",Template:'<div class="pict-flow-info-panel-description">{~D:Record.Description~}</div>'},{Hash:"Flow-InfoPanel-Badges",Template:'<div class="pict-flow-info-panel-badges">{~D:Record.BadgesContent~}</div>'},{Hash:"Flow-InfoPanel-Badge-Category",Template:'<span class="pict-flow-info-panel-badge category">{~D:Record.Category~}</span>'},{Hash:"Flow-InfoPanel-Badge-Code",Template:'<span class="pict-flow-info-panel-badge code">{~D:Record.Code~}</span>'},{Hash:"Flow-InfoPanel-Section-Inputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Inputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Section-Outputs",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">Outputs</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Input",Template:'<div class="pict-flow-info-panel-port input">{~D:Record.Label~}{~D:Record.Constraint~}</div>'},{Hash:"Flow-InfoPanel-Port-Output",Template:'<div class="pict-flow-info-panel-port output">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Constraint",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.ConstraintText~}</span>'},{Hash:"Flow-InfoPanel-Section-Generic",Template:'<div class="pict-flow-info-panel-section"><div class="pict-flow-info-panel-section-title">{~D:Record.SectionTitle~}</div>{~D:Record.PortsContent~}</div>'},{Hash:"Flow-InfoPanel-Port-Event",Template:'<div class="pict-flow-info-panel-port event">{~D:Record.Label~}</div>'},{Hash:"Flow-InfoPanel-Port-Value",Template:'<div class="pict-flow-info-panel-port value">{~D:Record.Label~}{~D:Record.DataType~}</div>'},{Hash:"Flow-InfoPanel-Port-DataType",Template:' <span class="pict-flow-info-panel-port-constraint">{~D:Record.DataTypeText~}</span>'},{Hash:"Flow-NodeProps-Editor",Template:'<div class="pict-flow-node-props-fields"><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title</label><input type="text" class="pict-flow-node-props-input" data-prop="Title" value="{~D:Record.Title~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Width" value="{~D:Record.Width~}" min="60" step="10" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Height</label><input type="number" class="pict-flow-node-props-input" data-prop="Height" value="{~D:Record.Height~}" min="40" step="10" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Fill</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyFill" value="{~D:Record.BodyFillValue~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Body Stroke</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.BodyStroke" value="{~D:Record.BodyStrokeValue~}" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Stroke Width</label><input type="number" class="pict-flow-node-props-input" data-prop="Style.BodyStrokeWidth" value="{~D:Record.BodyStrokeWidthValue~}" min="0" max="10" step="0.5" /></div><div class="pict-flow-node-props-field"><label class="pict-flow-node-props-label">Title Bar</label><input type="color" class="pict-flow-node-props-input pict-flow-node-props-color" data-prop="Style.TitleBarColor" value="{~D:Record.TitleBarColorValue~}" /></div></div>'}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowPropertiesPanel",r._FlowView=null,r._PanelInstances={},r}return _inherits(e,t),_createClass(e,[{key:"renderPanels",value:function(t,e,o,i){if(e&&o&&this._FlowView){for(var n=Array.isArray(t)?t:[],r=new Set,a=e.querySelectorAll(".pict-flow-panel-foreign-object"),s=0;s<a.length;s++)r.add(a[s].getAttribute("data-panel-hash"));for(var l=new Set,c=0;c<n.length;c++)l.add(n[c].Hash);for(var d=0;d<a.length;d++){var p=a[d].getAttribute("data-panel-hash");l.has(p)||(a[d].remove(),this._PanelInstances[p]&&(this._PanelInstances[p].destroy(),delete this._PanelInstances[p]))}for(var h=0;h<n.length;h++){var u=n[h];if(r.has(u.Hash)){var f=e.querySelector('[data-panel-hash="'.concat(u.Hash,'"]'));f&&(f.setAttribute("x",String(u.X)),f.setAttribute("y",String(u.Y)),f.setAttribute("width",String(u.Width)),f.setAttribute("height",String(u.Height)))}else this._createPanelForeignObject(u,e)}for(;o.firstChild;)o.removeChild(o.firstChild);for(var w=0;w<n.length;w++){var v=i===n[w].Hash;this._renderTether(n[w],o,v)}}}},{key:"_createPanelForeignObject",value:function(t,e){var o=this._FlowView._PanelChromeProvider;if(o){var i=o.createPanelForeignObject(t,e);i&&this._renderPanelContent(t,i);var n=e.querySelector('[data-panel-hash="'.concat(t.Hash,'"]'));n&&(this._renderAppearanceTab(t,n),this._renderHelpTab(t,n),this._wireTabSwitching(n))}}},{key:"_renderPanelContent",value:function(t,e){var o=this._FlowView.getNode(t.NodeHash);if(o){var i=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(i)if(i.PropertiesPanel){var n=i.PropertiesPanel,r=n.PanelType||"Base",a="PictFlowCardPropertiesPanel-".concat(r),s=null;this._PanelInstances[t.Hash]?s=this._PanelInstances[t.Hash]:(this.fable.servicesMap.hasOwnProperty(a)?s=this.fable.instantiateServiceProviderWithoutRegistration(a,n):this.fable.servicesMap.hasOwnProperty("PictFlowCardPropertiesPanel")&&(s=this.fable.instantiateServiceProviderWithoutRegistration("PictFlowCardPropertiesPanel",n)),s&&(s._FlowView=this._FlowView,this._PanelInstances[t.Hash]=s)),s&&s.render(e,o),this._renderPortSummary(e,i)}else this._renderInfoPanelContent(e,o,i)}}},{key:"_renderInfoPanelContent",value:function(t,e,o){var i=o.CardMetadata||{},n=o.DefaultPorts||[],r=n.filter(function(t){return"input"===t.Direction}),a=n.filter(function(t){return"output"===t.Direction}),s=o.Label||e.Type,l=[],c=this._FlowView._IconProvider;if(i.Icon&&c&&!c.isEmojiIcon(i.Icon)){var d=c.resolveIconKey(i),p=c.getIconSVGMarkup(d,18);l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:p,Label:s}))}else if(i.Icon)l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:i.Icon,Label:s}));else if(c){var h=c.getIconSVGMarkup("default",18);l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header-Icon",{Icon:h,Label:s}))}else l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Header",{Label:s}));if(i.Description&&l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Description",{Description:i.Description})),i.Category||i.Code){var u="";i.Category&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Category",{Category:i.Category})),i.Code&&(u+=this.pict.parseTemplateByHash("Flow-InfoPanel-Badge-Code",{Code:i.Code})),l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Badges",{BadgesContent:u}))}if(r.length>0){for(var f="",w=0;w<r.length;w++){var v=r[w],g=this._getPortConstraintHTML(v);f+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Input",{Label:v.Label||"In",Constraint:g})}l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Inputs",{PortsContent:f}))}if(a.length>0){for(var y="",b=0;b<a.length;b++){var m=a[b];y+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Output",{Label:m.Label||"Out"})}l.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Outputs",{PortsContent:y}))}t.innerHTML=this.pict.parseTemplateByHash("Flow-InfoPanel-Wrapper",{PanelContent:l.join("")})}},{key:"_renderPortSummary",value:function(t,e){var o=e.DefaultPorts||[];if(0!==o.length){for(var i=[],n=[],r=[],a=0;a<o.length;a++){var s=o[a],l=s.PortType||"";"event-in"===l?i.push(s):"event-out"===l||"error"===l?n.push(s):"value"===l&&r.push(s)}if(0!==i.length||0!==n.length||0!==r.length){var c=[];if(i.length>0){for(var d="",p=0;p<i.length;p++)d+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:i[p].Label||i[p].Name||"Event In"});c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Inputs",PortsContent:d}))}if(n.length>0){for(var h="",u=0;u<n.length;u++){var f=n[u],w=f.Label||f.Name||"Event Out";"error"===f.PortType&&(w+=" ⚠"),h+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Event",{Label:w})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"Event Outputs",PortsContent:h}))}if(r.length>0){for(var v="",g=0;g<r.length;g++){var y=r[g],b=y.Label||y.Name||"Output",m="";y.DataType&&(m=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-DataType",{DataTypeText:y.DataType})),v+=this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Value",{Label:b,DataType:m})}c.push(this.pict.parseTemplateByHash("Flow-InfoPanel-Section-Generic",{SectionTitle:"State Outputs",PortsContent:v}))}if(c.length>0){var _=document.createElement("div");_.className="pict-flow-info-panel pict-flow-port-summary",_.innerHTML=c.join(""),t.appendChild(_)}}}}},{key:"_getPortConstraintHTML",value:function(t){var e="number"==typeof t.MinimumInputCount?t.MinimumInputCount:0,o="number"==typeof t.MaximumInputCount?t.MaximumInputCount:-1;if(e>0||o>0){var i="";return i=o<0?"(min ".concat(e,")"):e===o?"(exactly ".concat(e,")"):"(".concat(e,"–").concat(o,")"),this.pict.parseTemplateByHash("Flow-InfoPanel-Port-Constraint",{ConstraintText:i})}return""}},{key:"_renderAppearanceTab",value:function(t,e){var o=this,i=this._FlowView.getNode(t.NodeHash);if(i){var n=e.querySelector('.pict-flow-panel-tab-pane[data-tab="appearance"]');if(n){var r=i.Style||{},a=this._FlowView._NodeTypeProvider.getNodeType(i.Type),s="#2c3e50",l="#ffffff",c="#d0d4d8";a&&(a.TitleBarColor&&(s=a.TitleBarColor),a.BodyStyle&&(a.BodyStyle.fill&&(l=a.BodyStyle.fill),a.BodyStyle.stroke&&(c=a.BodyStyle.stroke)));var d={Title:i.Title||"",Width:i.Width||180,Height:i.Height||80,BodyFillValue:r.BodyFill||l,BodyStrokeValue:r.BodyStroke||c,BodyStrokeWidthValue:r.BodyStrokeWidth||1,TitleBarColorValue:r.TitleBarColor||s};n.innerHTML=this.pict.parseTemplateByHash("Flow-NodeProps-Editor",d);for(var p=n.querySelectorAll(".pict-flow-node-props-input"),h=function(){var e=p[u],i=e.getAttribute("data-prop");e.addEventListener("input",function(n){n.stopPropagation(),o._applyNodePropChange(t.NodeHash,i,e.value,e.type)}),e.addEventListener("pointerdown",function(t){t.stopPropagation()})},u=0;u<p.length;u++)h()}}}},{key:"_renderHelpTab",value:function(t,e){var o=this._FlowView.getNode(t.NodeHash);if(o){var i=this._FlowView._NodeTypeProvider.getNodeType(o.Type);if(i){var n=i.CardMetadata&&i.CardMetadata.Help?i.CardMetadata.Help:null;if(n){var r=e.querySelector('.pict-flow-panel-tab[data-tab-target="help"]');r&&(r.style.display="");var a=e.querySelector('.pict-flow-panel-tab-pane[data-tab="help"]');a&&(a.innerHTML='<div class="pict-flow-panel-help-content">'+n+"</div>")}}}}},{key:"_wireTabSwitching",value:function(t){for(var e=t.querySelectorAll(".pict-flow-panel-tab"),o=t.querySelectorAll(".pict-flow-panel-tab-pane"),i=0;i<e.length;i++)e[i].addEventListener("click",function(i){i.stopPropagation();for(var n=i.currentTarget.getAttribute("data-tab-target"),r=0;r<e.length;r++)e[r].classList.remove("active");for(var a=0;a<o.length;a++)o[a].classList.remove("active"),o[a].style.display="none";i.currentTarget.classList.add("active");var s=t.querySelector('.pict-flow-panel-tab-pane[data-tab="'+n+'"]');s&&(s.classList.add("active"),s.style.display="block")})}},{key:"_applyNodePropChange",value:function(t,e,o,i){var n=this._FlowView.getNode(t);if(n){var r=o;if("number"!==i||(r=parseFloat(o),!isNaN(r))){if("Title"===e)n.Title=r;else if("Width"===e)n.Width=r;else if("Height"===e)n.Height=r;else if(e.startsWith("Style.")){n.Style||(n.Style={});var a=e.substring(6);n.Style[a]=r}this._FlowView.renderFlow(),this._FlowView.marshalFromView(),this._FlowView._EventHandlerProvider&&this._FlowView._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowView._FlowData)}}}},{key:"_renderTether",value:function(t,e,o){var i=this._FlowView._TetherService;if(i){var n=this._FlowView.getNode(t.NodeHash);if(n){var r=this._FlowView.options.ViewIdentifier;i.renderTether(t,n,e,o,r)}}}},{key:"marshalAllFromPanels",value:function(){for(var t in this._PanelInstances){var e=this._PanelInstances[t];e&&e._NodeData&&e.marshalFromPanel(e._NodeData)}}},{key:"destroyPanel",value:function(t){this._PanelInstances[t]&&(this._PanelInstances[t].destroy(),delete this._PanelInstances[t])}},{key:"destroyAllPanels",value:function(){for(var t in this._PanelInstances)this._PanelInstances[t].destroy();this._PanelInstances={}}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],42:[function(t,e,o){var i=t("pict-view"),n={ViewIdentifier:"Flow-Toolbar",DefaultRenderable:"Flow-Toolbar-Content",DefaultDestinationAddress:"#Flow-Toolbar-Container",AutoRender:!1,FlowViewIdentifier:"Pict-Flow",EnablePalette:!0,EnableAddNode:!0,EnableCardPalette:!0,CSS:!1,Templates:[{Hash:"Flow-Toolbar-Template",Template:'\n<div class="pict-flow-toolbar" id="Flow-Toolbar-Bar-{~D:Record.FlowViewIdentifier~}">\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="add-node" id="Flow-Toolbar-AddNode-{~D:Record.FlowViewIdentifier~}" title="Add Node">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-plus-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Node</span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="cards-popup" id="Flow-Toolbar-Cards-{~D:Record.FlowViewIdentifier~}" title="Card Palette">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-cards-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Cards</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-CardsChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="delete-selected" title="Delete Node">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-trash-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="layout-popup" id="Flow-Toolbar-Layout-{~D:Record.FlowViewIdentifier~}" title="Manage Layouts">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Layout</span>\n\t\t\t<span class="pict-flow-toolbar-btn-chevron" id="Flow-Toolbar-LayoutChevron-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="auto-layout" title="Auto Layout">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-auto-layout-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t\t<span class="pict-flow-toolbar-btn-text">Auto Layout</span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-in" title="Zoom In">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-in-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-out" title="Zoom Out">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-out-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="zoom-fit" title="Fit to View">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-zoom-fit-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n\t<div class="pict-flow-toolbar-group pict-flow-toolbar-right">\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="settings-popup" id="Flow-Toolbar-Settings-{~D:Record.FlowViewIdentifier~}" title="Theme Settings">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-settings-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="fullscreen" id="Flow-Toolbar-Fullscreen-{~D:Record.FlowViewIdentifier~}" title="Toggle Fullscreen">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Fullscreen-Icon-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="toggle-floating" title="Float">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-grip-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t\t<button class="pict-flow-toolbar-btn" data-flow-action="collapse-toolbar" title="Collapse Toolbar">\n\t\t\t<span class="pict-flow-toolbar-btn-icon" id="Flow-Toolbar-Icon-collapse-{~D:Record.FlowViewIdentifier~}"></span>\n\t\t</button>\n\t</div>\n</div>\n<div class="pict-flow-toolbar-collapsed" id="Flow-Toolbar-Collapsed-{~D:Record.FlowViewIdentifier~}">\n\t<button class="pict-flow-toolbar-expand-btn" data-flow-action="expand-toolbar" title="Expand Toolbar" id="Flow-Toolbar-ExpandBtn-{~D:Record.FlowViewIdentifier~}">\n\t\t<span id="Flow-Toolbar-Icon-expand-{~D:Record.FlowViewIdentifier~}"></span>\n\t</button>\n</div>\n<div class="pict-flow-toolbar-popup-anchor" id="Flow-Toolbar-PopupAnchor-{~D:Record.FlowViewIdentifier~}">\n</div>\n'}],Renderables:[{RenderableHash:"Flow-Toolbar-Content",TemplateHash:"Flow-Toolbar-Template",DestinationAddress:"#Flow-Toolbar-Container",RenderMethod:"replace"}]},r=function(t){function e(t,o,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(n)),o),i])).serviceType="PictViewFlowToolbar",r._FlowView=null,r._ToolbarMode="docked",r._ActivePopup=null,r._FloatingPosition={X:80,Y:80},r._DocumentClickHandler=null,r._FloatingToolbarView=null,r}return _inherits(e,t),_createClass(e,[{key:"render",value:function(t,o,i){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"onAfterRender",value:function(t,o,i,n){var r=this,a=this.options.FlowViewIdentifier,s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Bar-".concat(a));s.length>0&&s[0].addEventListener("click",function(t){var e=t.target;if(e){var o=e.closest("[data-flow-action]");if(o){var i=o.getAttribute("data-flow-action");r._handleToolbarAction(i)}}});var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-ExpandBtn-".concat(a));if(l.length>0&&l[0].addEventListener("click",function(){r._setToolbarMode("docked")}),this._populateToolbarIcons(),!1===this.options.EnableAddNode){var c=this.pict.ContentAssignment.getElement("#Flow-Toolbar-AddNode-".concat(a));c.length>0&&c[0].remove()}if(!1===this.options.EnableCardPalette){var d=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Cards-".concat(a));d.length>0&&d[0].remove()}return _superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"_populateToolbarIcons",value:function(){var t=this._FlowView?this._FlowView._IconProvider:null;if(t){for(var e=this.options.FlowViewIdentifier,o={plus:"plus",trash:"trash","zoom-in":"zoom-in","zoom-out":"zoom-out","zoom-fit":"zoom-fit","auto-layout":"auto-layout",cards:"cards",layout:"layout",settings:"settings",grip:"grip",collapse:"collapse",expand:"expand"},i=Object.keys(o),n=0;n<i.length;n++){var r="Flow-Toolbar-Icon-".concat(i[n],"-").concat(e),a=this.pict.ContentAssignment.getElement("#".concat(r));a.length>0&&(a[0].innerHTML=t.getIconSVGMarkup(o[i[n]],14))}var s=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(e));s.length>0&&(s[0].innerHTML=t.getIconSVGMarkup("fullscreen",14));var l=this.pict.ContentAssignment.getElement("#Flow-Toolbar-CardsChevron-".concat(e));l.length>0&&(l[0].innerHTML=t.getIconSVGMarkup("chevron-down",8));var c=this.pict.ContentAssignment.getElement("#Flow-Toolbar-LayoutChevron-".concat(e));c.length>0&&(c[0].innerHTML=t.getIconSVGMarkup("chevron-down",8))}}},{key:"_openPopup",value:function(t){var e=this;if(this._ActivePopup!==t){this._closePopup();var o=this.options.FlowViewIdentifier,i=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(o));if(!(i.length<1)){var n=document.createElement("div");switch(n.className="pict-flow-toolbar-popup",n.setAttribute("id","Flow-Toolbar-Popup-".concat(o)),t){case"add-node":this._buildAddNodePopup(n);break;case"cards":this._buildCardsPopup(n);break;case"layout":this._buildLayoutPopup(n);break;case"settings":this._buildSettingsPopup(n)}if(i[0].appendChild(n),this._ActivePopup=t,this._positionPopup(n,t),setTimeout(function(){e._DocumentClickHandler=function(o){if(!n.contains(o.target)){var i=o.target.closest("[data-flow-action]");if(i){var r=i.getAttribute("data-flow-action");if(r===t||r===t.replace("-popup","")+"-popup")return}e._closePopup()}},document.addEventListener("click",e._DocumentClickHandler,!0)},0),"add-node"===t){var r=n.querySelector(".pict-flow-popup-search");r&&setTimeout(function(){r.focus()},50)}}}else this._closePopup()}},{key:"_closePopup",value:function(){this._DocumentClickHandler&&(document.removeEventListener("click",this._DocumentClickHandler,!0),this._DocumentClickHandler=null);var t=this.options.FlowViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Popup-".concat(t));e.length>0&&e[0].parentNode.removeChild(e[0]),this._ActivePopup=null}},{key:"_positionPopup",value:function(t,e){var o,i=this.options.FlowViewIdentifier;switch(e){case"add-node":o="#Flow-Toolbar-AddNode-".concat(i);break;case"cards":o="#Flow-Toolbar-Cards-".concat(i);break;case"layout":o="#Flow-Toolbar-Layout-".concat(i);break;case"settings":o="#Flow-Toolbar-Settings-".concat(i);break;default:return}var n=this.pict.ContentAssignment.getElement(o);if(!(n.length<1)){var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-PopupAnchor-".concat(i));if(!(r.length<1)){var a=n[0].getBoundingClientRect(),s=r[0].getBoundingClientRect(),l=a.left-s.left;t.style.left=l+"px",t.style.top="0px"}}}},{key:"_buildAddNodePopup",value:function(t){var e=this,o=document.createElement("div");o.className="pict-flow-popup-search-wrapper";var i=document.createElement("span");i.className="pict-flow-popup-search-icon";var n=this._FlowView?this._FlowView._IconProvider:null;n&&(i.innerHTML=n.getIconSVGMarkup("search",12)),o.appendChild(i);var r=document.createElement("input");r.className="pict-flow-popup-search",r.setAttribute("type","text"),r.setAttribute("placeholder","Search node types..."),o.appendChild(r),t.appendChild(o);var a=document.createElement("div");a.className="pict-flow-popup-node-list",t.appendChild(a),this._populateNodeList(a,""),r.addEventListener("input",function(){e._populateNodeList(a,r.value)})}},{key:"_populateNodeList",value:function(t,e){var o=this;if(this._FlowView&&this._FlowView._NodeTypeProvider){for(;t.firstChild;)t.removeChild(t.firstChild);for(var i=this._FlowView._NodeTypeProvider.getNodeTypes(),n=Object.keys(i),r=(e||"").toLowerCase().trim(),a=this._FlowView._IconProvider,s=0,l=function(e){var l=i[n[e]],c=l.CardMetadata||{};if(!1===c.Enabled)return 0;if(r){var d=(l.Label||"").toLowerCase(),p=(c.Code||"").toLowerCase(),h=(c.Category||"").toLowerCase();if(d.indexOf(r)<0&&p.indexOf(r)<0&&h.indexOf(r)<0)return 0}s++;var u=document.createElement("div");u.className="pict-flow-popup-list-item",u.setAttribute("data-node-type",n[e]);var f=document.createElement("span");if(f.className="pict-flow-popup-list-item-icon",a){var w=a.resolveIconKey(c);f.innerHTML=a.getIconSVGMarkup(w,16)}u.appendChild(f);var v=document.createElement("span");if(v.className="pict-flow-popup-list-item-label",v.textContent=l.Label,u.appendChild(v),c.Code){var g=document.createElement("span");g.className="pict-flow-popup-list-item-code",g.textContent=c.Code,u.appendChild(g)}u.addEventListener("click",function(){o._addNodeAtCenter(n[e]),o._closePopup()}),t.appendChild(u)},c=0;c<n.length;c++)l(c);if(0===s){var d=document.createElement("div");d.className="pict-flow-popup-list-empty",d.textContent="No matching node types",t.appendChild(d)}}}},{key:"_buildCardsPopup",value:function(t){var e=this,o=document.createElement("div");o.className="pict-flow-popup-search-wrapper";var i=document.createElement("span");i.className="pict-flow-popup-search-icon";var n=this._FlowView?this._FlowView._IconProvider:null;n&&(i.innerHTML=n.getIconSVGMarkup("search",12)),o.appendChild(i);var r=document.createElement("input");r.className="pict-flow-popup-search",r.setAttribute("type","text"),r.setAttribute("placeholder","Search cards..."),o.appendChild(r),t.appendChild(o);var a=document.createElement("div");a.className="pict-flow-popup-node-list",t.appendChild(a),this._renderPalette(a,""),r.addEventListener("input",function(){e._renderPalette(a,r.value)}),setTimeout(function(){r.focus()},50)}},{key:"_renderPalette",value:function(t,e){var o=this;if(this._FlowView&&this._FlowView._NodeTypeProvider){for(;t.firstChild;)t.removeChild(t.firstChild);for(var i=this._FlowView._NodeTypeProvider.getCardsByCategory(),n=Object.keys(i),r=(e||"").toLowerCase().trim(),a=0,s=0;s<n.length;s++){for(var l=n[s],c=i[l],d=[],p=0;p<c.length;p++){var h=c[p],u=h.CardMetadata||{};if(r){var f=(h.Label||"").toLowerCase(),w=(u.Code||"").toLowerCase(),v=l.toLowerCase();if(f.indexOf(r)<0&&w.indexOf(r)<0&&v.indexOf(r)<0)continue}d.push(h)}if(0!==d.length){a+=d.length;var g=document.createElement("div");g.className="pict-flow-palette-category",g.style.padding="0.35em 0.5em";var y=document.createElement("div");y.className="pict-flow-palette-category-label",y.textContent=l,g.appendChild(y);var b=document.createElement("div");b.className="pict-flow-palette-cards";for(var m=function(){var t=d[_],e=t.CardMetadata||{},i=document.createElement("div");if(i.className="pict-flow-palette-card",!1===e.Enabled&&i.classList.add("disabled"),i.setAttribute("data-card-type",t.Hash),e.Tooltip?i.setAttribute("title",e.Tooltip):e.Description&&i.setAttribute("title",e.Description),e.Icon){var n=document.createElement("span");n.className="pict-flow-palette-card-icon";var r=o._FlowView._IconProvider;if(r&&!r.isEmojiIcon(e.Icon)){var a=r.resolveIconKey(e);n.innerHTML=r.getIconSVGMarkup(a,14)}else n.textContent=e.Icon;i.appendChild(n)}else if(o._FlowView._IconProvider){var s=document.createElement("span");s.className="pict-flow-palette-card-icon",s.innerHTML=o._FlowView._IconProvider.getIconSVGMarkup("default",14),i.appendChild(s)}else if(t.TitleBarColor){var l=document.createElement("span");l.className="pict-flow-palette-card-swatch",l.style.backgroundColor=t.TitleBarColor,i.appendChild(l)}var c=document.createElement("span");if(c.className="pict-flow-palette-card-title",c.textContent=t.Label,i.appendChild(c),e.Code){var p=document.createElement("span");p.className="pict-flow-palette-card-code",p.textContent=e.Code,i.appendChild(p)}i.addEventListener("click",function(){o._addCardFromPalette(t.Hash),o._closePopup()}),b.appendChild(i)},_=0;_<d.length;_++)m();g.appendChild(b),t.appendChild(g)}}if(0===a){var P=document.createElement("div");P.className="pict-flow-popup-list-empty",P.textContent=r?"No matching cards":"No card types available",t.appendChild(P)}}}},{key:"_buildLayoutPopup",value:function(t){var e=this,o=this._FlowView?this._FlowView._IconProvider:null,i=document.createElement("div");i.className="pict-flow-popup-layout-save-section";var n=document.createElement("div");n.className="pict-flow-popup-layout-save-input-row",n.style.display="none";var r=document.createElement("input");r.className="pict-flow-popup-layout-save-input",r.setAttribute("type","text"),r.setAttribute("placeholder","Layout name..."),n.appendChild(r);var a=document.createElement("button");a.className="pict-flow-popup-layout-save-confirm",a.title="Save",o?a.innerHTML=o.getIconSVGMarkup("save",14):a.textContent="✓",n.appendChild(a);var s=document.createElement("div");s.className="pict-flow-popup-layout-save";var l=document.createElement("span");l.className="pict-flow-popup-layout-save-icon",o&&(l.innerHTML=o.getIconSVGMarkup("save",14)),s.appendChild(l);var c=document.createElement("span");c.textContent="Save Current Layout",s.appendChild(c),s.addEventListener("click",function(){s.style.display="none",n.style.display="",r.value="",setTimeout(function(){r.focus()},50)});var d=function(){var o=r.value.trim();if(""!==o){for(e._FlowView._LayoutProvider.saveLayout(o);t.firstChild;)t.removeChild(t.firstChild);e._buildLayoutPopup(t)}};a.addEventListener("click",d),r.addEventListener("keydown",function(t){"Enter"===t.key?(t.preventDefault(),d()):"Escape"===t.key&&(n.style.display="none",s.style.display="")}),r.addEventListener("click",function(t){t.stopPropagation()}),i.appendChild(s),i.appendChild(n),t.appendChild(i);var p=document.createElement("div");if(p.className="pict-flow-popup-divider",t.appendChild(p),!this._FlowView||!this._FlowView._LayoutProvider){var h=document.createElement("div");return h.className="pict-flow-popup-list-empty",h.textContent="No saved layouts",void t.appendChild(h)}var u=this._FlowView._LayoutProvider.getLayouts();if(0===u.length){var f=document.createElement("div");return f.className="pict-flow-popup-list-empty",f.textContent="No saved layouts",void t.appendChild(f)}for(var w=function(){var i=u[v],n=document.createElement("div");n.className="pict-flow-popup-layout-row";var r=document.createElement("span");r.className="pict-flow-popup-layout-name",r.textContent=i.Name,n.appendChild(r);var a=document.createElement("button");a.className="pict-flow-popup-layout-delete",a.title="Delete layout",o?a.innerHTML=o.getIconSVGMarkup("trash",12):a.textContent="×",n.appendChild(a),n.addEventListener("click",function(t){t.target.closest(".pict-flow-popup-layout-delete")||(e._FlowView._LayoutProvider.restoreLayout(i.Hash),e._closePopup())}),a.addEventListener("click",function(o){for(o.stopPropagation(),e._FlowView._LayoutProvider.deleteLayout(i.Hash);t.firstChild;)t.removeChild(t.firstChild);e._buildLayoutPopup(t)}),t.appendChild(n)},v=0;v<u.length;v++)w()}},{key:"_buildSettingsPopup",value:function(t){var e=this;if(this._FlowView&&this._FlowView._ThemeProvider){var o=this._FlowView._ThemeProvider,i=document.createElement("div");i.className="pict-flow-popup-settings-section";var n=document.createElement("label");n.className="pict-flow-popup-settings-label",n.textContent="Theme",i.appendChild(n);var r=document.createElement("select");r.className="pict-flow-popup-settings-select";for(var a=o.getThemeKeys(),s=o.getActiveThemeKey(),l=0;l<a.length;l++){var c=document.createElement("option");c.value=a[l];var d=o._Themes[a[l]];c.textContent=d.Label||a[l],a[l]===s&&(c.selected=!0),r.appendChild(c)}r.addEventListener("change",function(){e._FlowView.setTheme(r.value),e._refreshNoiseSlider(t)}),r.addEventListener("click",function(t){t.stopPropagation()}),i.appendChild(r),t.appendChild(i);var p=document.createElement("div");p.className="pict-flow-popup-divider",t.appendChild(p);var h=document.createElement("div");h.className="pict-flow-popup-settings-section pict-flow-popup-settings-noise",h.setAttribute("data-settings-type","noise");var u=document.createElement("label");u.className="pict-flow-popup-settings-label",u.textContent="Noise",h.appendChild(u);var f=document.createElement("div");f.className="pict-flow-popup-settings-slider-row";var w=document.createElement("input");w.type="range",w.className="pict-flow-popup-settings-slider",w.min="0",w.max="100",w.value=String(Math.round(100*o.getNoiseLevel()));var v=document.createElement("span");v.className="pict-flow-popup-settings-slider-value",v.textContent=w.value+"%",w.addEventListener("input",function(){var t=parseInt(w.value,10)/100;v.textContent=w.value+"%",e._FlowView.setNoiseLevel(t)}),w.addEventListener("click",function(t){t.stopPropagation()}),w.addEventListener("pointerdown",function(t){t.stopPropagation()}),f.appendChild(w),f.appendChild(v),h.appendChild(f),t.appendChild(h),this._refreshNoiseSlider(t)}}},{key:"_refreshNoiseSlider",value:function(t){var e=t.querySelector('[data-settings-type="noise"]');if(e){var o=this._FlowView._ThemeProvider.getActiveTheme();if(o&&o.NoiseConfig&&o.NoiseConfig.Enabled){e.style.display="";var i=e.querySelector(".pict-flow-popup-settings-slider"),n=e.querySelector(".pict-flow-popup-settings-slider-value");if(i){var r=Math.round(100*this._FlowView._ThemeProvider.getNoiseLevel());i.value=String(r),n&&(n.textContent=r+"%")}}else e.style.display="none"}}},{key:"_setToolbarMode",value:function(t){this._closePopup();var e=this.options.FlowViewIdentifier,o=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Bar-".concat(e)),i=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Collapsed-".concat(e));switch(t){case"docked":o.length>0&&(o[0].style.display=""),i.length>0&&i[0].classList.remove("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide();break;case"floating":o.length>0&&(o[0].style.display="none"),i.length>0&&i[0].classList.remove("visible"),this._showFloatingToolbar();break;case"collapsed":o.length>0&&(o[0].style.display="none"),i.length>0&&i[0].classList.add("visible"),this._FloatingToolbarView&&this._FloatingToolbarView.hide()}this._ToolbarMode=t}},{key:"_showFloatingToolbar",value:function(){if(this._FlowView){if(!this._FloatingToolbarView){var t=this.options.FlowViewIdentifier;this._FloatingToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowFloatingToolbar",{FlowViewIdentifier:t,DefaultDestinationAddress:"#Flow-FloatingToolbar-Container-".concat(t),EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette}),this._FloatingToolbarView._ToolbarView=this,this._FloatingToolbarView._FlowView=this._FlowView,this._FloatingToolbarView.render()}this._FloatingToolbarView.show()}}},{key:"_addNodeAtCenter",value:function(t){if(this._FlowView){var e=this._FlowView.viewState,o=this._FlowView._SVGElement,i=o?o.clientWidth:600,n=o?o.clientHeight:400,r=(-e.PanX+i/2)/e.Zoom,a=(-e.PanY+n/2)/e.Zoom,s=this._FlowView.flowData.Nodes.length;r+=s%5*30,a+=s%5*30,this._FlowView.addNode(t,r,a)}}},{key:"_addCardFromPalette",value:function(t){if(this._FlowView){var e=this._FlowView.viewState,o=(200-e.PanX)/e.Zoom,i=(200-e.PanY)/e.Zoom,n=this._FlowView.flowData.Nodes.length;o+=n%5*40,i+=n%5*40,this._FlowView.addNode(t,o,i)}}},{key:"_handleToolbarAction",value:function(t){if(this._FlowView){var e=this.options.FlowViewIdentifier;switch(t){case"add-node":this._openPopup("add-node");break;case"delete-selected":this._FlowView.deleteSelected();break;case"zoom-in":this._FlowView.setZoom(this._FlowView.viewState.Zoom+this._FlowView.options.ZoomStep);break;case"zoom-out":this._FlowView.setZoom(this._FlowView.viewState.Zoom-this._FlowView.options.ZoomStep);break;case"zoom-fit":this._FlowView.zoomToFit();break;case"auto-layout":this._FlowView.autoLayout();break;case"cards-popup":this._openPopup("cards");break;case"layout-popup":this._openPopup("layout");break;case"settings-popup":this._openPopup("settings");break;case"toggle-floating":"floating"===this._ToolbarMode?this._setToolbarMode("docked"):this._setToolbarMode("floating");break;case"collapse-toolbar":this._setToolbarMode("collapsed");break;case"expand-toolbar":this._setToolbarMode("docked");break;case"fullscreen":var o=this._FlowView.toggleFullscreen(),i=this._FlowView._IconProvider,n=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-Icon-".concat(e));n.length>0&&i&&(n[0].innerHTML=i.getIconSVGMarkup(o?"exit-fullscreen":"fullscreen",14));var r=this.pict.ContentAssignment.getElement("#Flow-Toolbar-Fullscreen-".concat(e));r.length>0&&r[0].setAttribute("title",o?"Exit Fullscreen":"Toggle Fullscreen");break;default:this.log.warn("PictViewFlowToolbar: unknown action '".concat(t,"'"))}}}}])}(i);e.exports=r,e.exports.default_configuration=n},{"pict-view":45}],43:[function(t,e,o){var i=t("pict-view"),n=t("../services/PictService-Flow-InteractionManager.js"),r=t("../services/PictService-Flow-ConnectionRenderer.js"),a=t("../services/PictService-Flow-Tether.js"),s=t("../services/PictService-Flow-Layout.js"),l=t("../services/PictService-Flow-PathGenerator.js"),c=t("../services/PictService-Flow-ViewportManager.js"),d=t("../services/PictService-Flow-SelectionManager.js"),p=t("../services/PictService-Flow-PanelManager.js"),h=t("../services/PictService-Flow-DataManager.js"),u=t("../services/PictService-Flow-ConnectionHandleManager.js"),f=t("../services/PictService-Flow-RenderManager.js"),w=t("../services/PictService-Flow-PortRenderer.js"),v=t("../providers/PictProvider-Flow-NodeTypes.js"),g=t("../providers/PictProvider-Flow-EventHandler.js"),y=t("../providers/PictProvider-Flow-Layouts.js"),b=t("../providers/PictProvider-Flow-SVGHelpers.js"),m=t("../providers/PictProvider-Flow-Geometry.js"),_=t("../providers/PictProvider-Flow-PanelChrome.js"),P=t("../providers/PictProvider-Flow-CSS.js"),F=t("../providers/PictProvider-Flow-Icons.js"),S=t("../providers/PictProvider-Flow-ConnectorShapes.js"),V=t("../providers/PictProvider-Flow-Theme.js"),C=t("../providers/PictProvider-Flow-Noise.js"),k=t("./PictView-Flow-Node.js"),T=t("./PictView-Flow-Toolbar.js"),D=t("./PictView-Flow-FloatingToolbar.js"),A=t("./PictView-Flow-PropertiesPanel.js"),H=t("../PictFlowCardPropertiesPanel.js"),x=t("../panels/FlowCardPropertiesPanel-Template.js"),I=t("../panels/FlowCardPropertiesPanel-Markdown.js"),M=t("../panels/FlowCardPropertiesPanel-Form.js"),N=t("../panels/FlowCardPropertiesPanel-View.js"),L={ViewIdentifier:"Pict-Flow",DefaultRenderable:"Flow-Container",DefaultDestinationAddress:"#Flow-Container",AutoRender:!1,FlowDataAddress:!1,TargetElementAddress:"#Flow-SVG-Container",EnableToolbar:!0,EnableAddNode:!0,EnableCardPalette:!0,IncludeDefaultNodeTypes:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0,EnableGridSnap:!1,GridSnapSize:20,MinZoom:.1,MaxZoom:5,ZoomStep:.1,DefaultNodeType:"default",DefaultNodeWidth:180,DefaultNodeHeight:80,CSS:!1,Templates:[{Hash:"Flow-PanelChrome-Template",Template:'<div class="pict-flow-panel" xmlns="http://www.w3.org/1999/xhtml"><div class="pict-flow-panel-titlebar" data-element-type="panel-titlebar" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-title-text">{~D:Record.Title~}</span><span class="pict-flow-panel-close-btn" data-element-type="panel-close" data-panel-hash="{~D:Record.Hash~}"><span class="pict-flow-panel-close-icon"></span></span></div><div class="pict-flow-panel-content" data-panel-hash="{~D:Record.Hash~}"><div class="pict-flow-panel-tab-pane active" data-tab="properties" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tab-pane" data-tab="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div><div class="pict-flow-panel-tab-pane" data-tab="appearance" data-panel-hash="{~D:Record.Hash~}" style="display:none;"></div></div><div class="pict-flow-panel-resize-handle" data-element-type="panel-resize" data-panel-hash="{~D:Record.Hash~}"></div><div class="pict-flow-panel-tabbar" data-panel-hash="{~D:Record.Hash~}"><div class="pict-flow-panel-tab active" data-tab-target="properties" data-panel-hash="{~D:Record.Hash~}">Properties</div><div class="pict-flow-panel-tab" data-tab-target="help" data-panel-hash="{~D:Record.Hash~}" style="display:none;">Help</div><div class="pict-flow-panel-tab" data-tab-target="appearance" data-panel-hash="{~D:Record.Hash~}">Appearance</div></div></div>'},{Hash:"Flow-Container-Template",Template:'\n<div class="pict-flow-container" id="Flow-Wrapper-{~D:Record.ViewIdentifier~}">\n\t<div id="Flow-Toolbar-{~D:Record.ViewIdentifier~}"></div>\n\t<div id="Flow-FloatingToolbar-Container-{~D:Record.ViewIdentifier~}" style="display:none;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100;"></div>\n\t<div class="pict-flow-svg-container" id="Flow-SVG-Container-{~D:Record.ViewIdentifier~}">\n\t\t<svg class="pict-flow-svg"\n\t\t\tid="Flow-SVG-{~D:Record.ViewIdentifier~}"\n\t\t\txmlns="http://www.w3.org/2000/svg">\n\t\t\t<defs>\n\t\t\t\t<pattern id="flow-grid-{~D:Record.ViewIdentifier~}"\n\t\t\t\t\twidth="20" height="20" patternUnits="userSpaceOnUse">\n\t\t\t\t\t<line x1="20" y1="0" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t\t<line x1="0" y1="20" x2="20" y2="20" class="pict-flow-grid-pattern" />\n\t\t\t\t</pattern>\n\t\t\t</defs>\n\t\t\t<rect width="10000" height="10000" x="-5000" y="-5000"\n\t\t\t\tfill="url(#flow-grid-{~D:Record.ViewIdentifier~})"\n\t\t\t\tclass="pict-flow-grid-background" />\n\t\t\t<g class="pict-flow-viewport" id="Flow-Viewport-{~D:Record.ViewIdentifier~}">\n\t\t\t\t<g class="pict-flow-connections-layer" id="Flow-Connections-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-nodes-layer" id="Flow-Nodes-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-tethers-layer" id="Flow-Tethers-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t\t<g class="pict-flow-panels-layer" id="Flow-Panels-{~D:Record.ViewIdentifier~}"></g>\n\t\t\t</g>\n\t\t</svg>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Flow-Container",TemplateHash:"Flow-Container-Template",DestinationAddress:"#Flow-Container",RenderMethod:"replace"}]},E=function(t){function e(t,o,i){var E;_classCallCheck(this,e);var z=Object.assign({},JSON.parse(JSON.stringify(L)),o);return(E=_callSuper(this,e,[t,z,i])).serviceType="PictSectionFlow",E._ServiceRegistry=[{ServiceType:"PictProviderFlowSVGHelpers",Library:b,Property:"_SVGHelperProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowGeometry",Library:m,Property:"_GeometryProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowNoise",Library:C,Property:"_NoiseProvider",NoFlowView:!0},{ServiceType:"PictProviderFlowTheme",Library:V,Property:"_ThemeProvider"},{ServiceType:"PictProviderFlowCSS",Library:P,Property:"_CSSProvider",PostInit:"registerCSS"},{ServiceType:"PictProviderFlowIcons",Library:F,Property:"_IconProvider",PostInit:"registerIconTemplates"},{ServiceType:"PictProviderFlowConnectorShapes",Library:S,Property:"_ConnectorShapesProvider"},{ServiceType:"PictProviderFlowPanelChrome",Library:_,Property:"_PanelChromeProvider"},{ServiceType:"PictProviderFlowNodeTypes",Library:v,Property:"_NodeTypeProvider",ExtraOptions:function(){return{AdditionalNodeTypes:E.options.NodeTypes,IncludeDefaultNodeTypes:E.options.IncludeDefaultNodeTypes}}},{ServiceType:"PictProviderFlowEventHandler",Library:g,Property:"_EventHandlerProvider"},{ServiceType:"PictProviderFlowLayouts",Library:y,Property:"_LayoutProvider",PostInit:"loadPersistedLayouts"},{ServiceType:"PictServiceFlowPathGenerator",Library:l,Property:"_PathGenerator"},{ServiceType:"PictServiceFlowDataManager",Library:h,Property:"_DataManager"},{ServiceType:"PictServiceFlowConnectionHandleManager",Library:u,Property:"_ConnectionHandleManager"},{ServiceType:"PictServiceFlowRenderManager",Library:f,Property:"_RenderManager"},{ServiceType:"PictServiceFlowPortRenderer",Library:w,Property:"_PortRenderer"},{ServiceType:"PictServiceFlowInteractionManager",Library:n,Property:"_InteractionManager"},{ServiceType:"PictServiceFlowConnectionRenderer",Library:r,Property:"_ConnectionRenderer"},{ServiceType:"PictServiceFlowTether",Library:a,Property:"_TetherService"},{ServiceType:"PictServiceFlowLayout",Library:s,Property:"_LayoutService"},{ServiceType:"PictServiceFlowViewportManager",Library:c,Property:"_ViewportManager"},{ServiceType:"PictServiceFlowSelectionManager",Library:d,Property:"_SelectionManager"},{ServiceType:"PictServiceFlowPanelManager",Library:p,Property:"_PanelManager"},{ServiceType:"PictViewFlowNode",Library:k,RegisterOnly:!0},{ServiceType:"PictViewFlowToolbar",Library:T,RegisterOnly:!0},{ServiceType:"PictViewFlowFloatingToolbar",Library:D,RegisterOnly:!0},{ServiceType:"PictViewFlowPropertiesPanel",Library:A,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel",Library:H,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Template",Library:x,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Markdown",Library:I,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-Form",Library:M,RegisterOnly:!0},{ServiceType:"PictFlowCardPropertiesPanel-View",Library:N,RegisterOnly:!0}],E._registerServiceTypes(),E._FlowData={Nodes:[],Connections:[],OpenPanels:[],SavedLayouts:[],ViewState:{PanX:0,PanY:0,Zoom:1,SelectedNodeHash:null,SelectedConnectionHash:null,SelectedTetherHash:null}},E._SVGElement=null,E._ViewportElement=null,E._NodesLayer=null,E._ConnectionsLayer=null,E._TethersLayer=null,E._PanelsLayer=null,E._DataManager=null,E._ConnectionHandleManager=null,E._RenderManager=null,E._PortRenderer=null,E._InteractionManager=null,E._ConnectionRenderer=null,E._TetherService=null,E._LayoutService=null,E._PathGenerator=null,E._ViewportManager=null,E._SelectionManager=null,E._PanelManager=null,E._CSSProvider=null,E._IconProvider=null,E._ConnectorShapesProvider=null,E._ThemeProvider=null,E._NoiseProvider=null,E._SVGHelperProvider=null,E._GeometryProvider=null,E._PanelChromeProvider=null,E._NodeTypeProvider=null,E._LayoutProvider=null,E._EventHandlerProvider=null,E._NodeView=null,E._ToolbarView=null,E._PropertiesPanelView=null,E.initialRenderComplete=!1,E}return _inherits(e,t),_createClass(e,[{key:"_registerServiceTypes",value:function(){for(var t=0;t<this._ServiceRegistry.length;t++){var e=this._ServiceRegistry[t];this.fable.servicesMap.hasOwnProperty(e.ServiceType)||this.fable.addServiceType(e.ServiceType,e.Library)}}},{key:"_instantiateServices",value:function(){for(var t=0;t<this._ServiceRegistry.length;t++){var e=this._ServiceRegistry[t];if(!e.RegisterOnly&&!this[e.Property]){var o=e.NoFlowView?{}:{FlowView:this};"function"==typeof e.ExtraOptions&&Object.assign(o,e.ExtraOptions()),this[e.Property]=this.fable.instantiateServiceProviderWithoutRegistration(e.ServiceType,o),e.PostInit&&"function"==typeof this[e.Property][e.PostInit]&&this[e.Property][e.PostInit]()}}}},{key:"flowData",get:function(){return this._FlowData}},{key:"viewState",get:function(){return this._FlowData.ViewState}},{key:"_IsFullscreen",get:function(){return!!this._ViewportManager&&this._ViewportManager._IsFullscreen}},{key:"render",value:function(t,o){return _superPropGet(e,"render",this,3)([t,o,this.options])}},{key:"renderAsync",value:function(t,o,i,n,r){return"function"==typeof i||void 0===i?_superPropGet(e,"renderAsync",this,3)([t,o,this.options,n,i||r]):_superPropGet(e,"renderAsync",this,3)([t,o,i,n,r])}},{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this._ThemeProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowTheme",{FlowView:this}),this._NoiseProvider=this.fable.instantiateServiceProviderWithoutRegistration("PictProviderFlowNoise"),this.options.Theme&&this._ThemeProvider.setTheme(this.options.Theme),"number"==typeof this.options.NoiseLevel&&this._ThemeProvider.setNoiseLevel(this.options.NoiseLevel),this._instantiateServices(),_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"onAfterRender",value:function(t,o,i,n){return this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t,o,i,n])}},{key:"onAfterInitialRender",value:function(){var t=this.options.ViewIdentifier,e=this.pict.ContentAssignment.getElement("#Flow-SVG-".concat(t));if(e.length<1)return this.log.error("PictSectionFlow could not find SVG element #Flow-SVG-".concat(t)),!1;this._SVGElement=e[0];var o=this.pict.ContentAssignment.getElement("#Flow-Viewport-".concat(t));o.length>0&&(this._ViewportElement=o[0]);var i=this.pict.ContentAssignment.getElement("#Flow-Nodes-".concat(t));i.length>0&&(this._NodesLayer=i[0]);var n=this.pict.ContentAssignment.getElement("#Flow-Connections-".concat(t));n.length>0&&(this._ConnectionsLayer=n[0]);var r=this.pict.ContentAssignment.getElement("#Flow-Tethers-".concat(t));r.length>0&&(this._TethersLayer=r[0]);var a=this.pict.ContentAssignment.getElement("#Flow-Panels-".concat(t));if(a.length>0&&(this._PanelsLayer=a[0]),this._instantiateServices(),this._ConnectorShapesProvider&&this._SVGElement){var s=this._SVGElement.querySelector("defs");if(s){var l=this._ConnectorShapesProvider.generateMarkerDefs(t),c=document.createElementNS("http://www.w3.org/2000/svg","svg");for(c.innerHTML=l;c.firstChild;)s.appendChild(c.firstChild)}}this.options.EnableToolbar&&(this._ToolbarView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowToolbar",Object.assign({},T.default_configuration,{ViewIdentifier:"Flow-Toolbar-".concat(t),DefaultDestinationAddress:"#Flow-Toolbar-".concat(t),FlowViewIdentifier:t,EnableAddNode:this.options.EnableAddNode,EnableCardPalette:this.options.EnableCardPalette})),this._ToolbarView&&"function"==typeof this._ToolbarView.render&&(this._ToolbarView._FlowView=this,this._ToolbarView.render())),this._NodeView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowNode",Object.assign({},k.default_configuration,{ViewIdentifier:"Flow-NodeRenderer-".concat(t),AutoRender:!1})),this._NodeView._FlowView=this,this._PropertiesPanelView=this.fable.instantiateServiceProviderWithoutRegistration("PictViewFlowPropertiesPanel",Object.assign({},A.default_configuration,{ViewIdentifier:"Flow-PropertiesPanel-".concat(t),AutoRender:!1})),this._PropertiesPanelView._FlowView=this,this._InteractionManager.initialize(this._SVGElement,this._ViewportElement),this.options.FlowDataAddress&&this.marshalToView(),this.renderFlow()}},{key:"marshalToView",value:function(){return this._DataManager.marshalToView()}},{key:"marshalFromView",value:function(){return this._DataManager.marshalFromView()}},{key:"getFlowData",value:function(){return this._DataManager.getFlowData()}},{key:"setFlowData",value:function(t){return this._DataManager.setFlowData(t)}},{key:"addNode",value:function(t,e,o,i,n){return this._DataManager.addNode(t,e,o,i,n)}},{key:"removeNode",value:function(t){return this._DataManager.removeNode(t)}},{key:"addConnection",value:function(t,e,o,i,n){return this._DataManager.addConnection(t,e,o,i,n)}},{key:"removeConnection",value:function(t){return this._DataManager.removeConnection(t)}},{key:"selectNode",value:function(t){return this._SelectionManager.selectNode(t)}},{key:"selectConnection",value:function(t){return this._SelectionManager.selectConnection(t)}},{key:"deselectAll",value:function(){return this._SelectionManager.deselectAll()}},{key:"deleteSelected",value:function(){return this._SelectionManager.deleteSelected()}},{key:"updateViewportTransform",value:function(){return this._ViewportManager.updateViewportTransform()}},{key:"setZoom",value:function(t,e,o){return this._ViewportManager.setZoom(t,e,o)}},{key:"zoomToFit",value:function(){return this._ViewportManager.zoomToFit()}},{key:"autoLayout",value:function(){this._LayoutService&&(this._LayoutService.autoLayout(this._FlowData.Nodes,this._FlowData.Connections),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData))}},{key:"toggleFullscreen",value:function(){return this._ViewportManager.toggleFullscreen()}},{key:"exitFullscreen",value:function(){return this._ViewportManager.exitFullscreen()}},{key:"setTheme",value:function(t){this._ThemeProvider?this._ThemeProvider.setTheme(t)&&(this._CSSProvider&&this._CSSProvider.registerCSS(),this._reinjectMarkerDefs(),this.initialRenderComplete&&this.renderFlow(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onThemeChanged",t)):this.log.warn("PictSectionFlow setTheme: ThemeProvider not available")}},{key:"setNoiseLevel",value:function(t){this._ThemeProvider?(this._ThemeProvider.setNoiseLevel(t),this.initialRenderComplete&&this.renderFlow()):this.log.warn("PictSectionFlow setNoiseLevel: ThemeProvider not available")}},{key:"getNoiseLevel",value:function(){return this._ThemeProvider?this._ThemeProvider.getNoiseLevel():0}},{key:"getThemeKey",value:function(){return this._ThemeProvider?this._ThemeProvider.getActiveThemeKey():"default"}},{key:"_reinjectMarkerDefs",value:function(){return this._RenderManager.reinjectMarkerDefs()}},{key:"getNode",value:function(t){return this._FlowData.Nodes.find(function(e){return e.Hash===t})||null}},{key:"getConnection",value:function(t){return this._FlowData.Connections.find(function(e){return e.Hash===t})||null}},{key:"selectTether",value:function(t){return this._SelectionManager.selectTether(t)}},{key:"updateConnectionHandle",value:function(t,e,o,i){return this._ConnectionHandleManager.updateConnectionHandle(t,e,o,i)}},{key:"addConnectionHandle",value:function(t,e,o){return this._ConnectionHandleManager.addConnectionHandle(t,e,o)}},{key:"removeConnectionHandle",value:function(t,e){return this._ConnectionHandleManager.removeConnectionHandle(t,e)}},{key:"_resetHandlesForNode",value:function(t){return this._ConnectionHandleManager.resetHandlesForNode(t)}},{key:"_resetHandlesForPanel",value:function(t){return this._ConnectionHandleManager.resetHandlesForPanel(t)}},{key:"addTetherHandle",value:function(t,e,o){var i=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});if(i&&this._TetherService){var n=this.getNode(i.NodeHash);if(n){var r=this._TetherService.getSmartAnchors(i,n);this._TetherService.addHandle(i,e,o,r.panelAnchor,r.nodeAnchor),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData)}}}},{key:"removeTetherHandle",value:function(t,e){var o=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});o&&this._TetherService&&(this._TetherService.removeHandle(o,e),this.renderFlow(),this.marshalFromView(),this._EventHandlerProvider&&this._EventHandlerProvider.fireEvent("onFlowChanged",this._FlowData))}},{key:"updateTetherHandle",value:function(t,e,o,i){var n=this._FlowData.OpenPanels.find(function(e){return e.Hash===t});n&&(this._TetherService&&this._TetherService.updateHandlePosition(n,e,o,i),this._renderSingleTether(t))}},{key:"getPortPosition",value:function(t,e){var o=this.getNode(t);if(!o)return null;var i=o.Ports.find(function(t){return t.Hash===e});if(!i)return null;var n=o.Ports.filter(function(t){return t.Side===i.Side}),r=n.indexOf(i),a=n.length,s=this._NodeView&&this._NodeView.options.NodeTitleBarHeight||28,l=o.Height||80;if(this._GeometryProvider&&o.Ports&&o.Ports.length>0){var c=this._GeometryProvider.computeMinimumNodeHeight(o.Ports,s);c>l&&(l=c)}var d=this._GeometryProvider.buildPortCountsBySide(o.Ports),p=this._GeometryProvider.getPortLocalPosition(i.Side,r,a,o.Width,l,s,d);return{x:o.X+p.x,y:o.Y+p.y,side:i.Side||"right"}}},{key:"screenToSVGCoords",value:function(t,e){return this._ViewportManager.screenToSVGCoords(t,e)}},{key:"renderFlow",value:function(){return this._RenderManager.renderFlow()}},{key:"_renderSingleConnection",value:function(t){return this._RenderManager.renderSingleConnection(t)}},{key:"_renderSingleTether",value:function(t){return this._RenderManager.renderSingleTether(t)}},{key:"updateNodePosition",value:function(t,e,o){return this._RenderManager.updateNodePosition(t,e,o)}},{key:"_renderConnectionsForNode",value:function(t){return this._RenderManager.renderConnectionsForNode(t)}},{key:"_renderTethersForNode",value:function(t){return this._RenderManager.renderTethersForNode(t)}},{key:"openPanel",value:function(t){return this._PanelManager.openPanel(t)}},{key:"closePanel",value:function(t){return this._PanelManager.closePanel(t)}},{key:"closePanelForNode",value:function(t){return this._PanelManager.closePanelForNode(t)}},{key:"togglePanel",value:function(t){return this._PanelManager.togglePanel(t)}},{key:"updatePanelPosition",value:function(t,e,o){return this._PanelManager.updatePanelPosition(t,e,o)}}])}(i);e.exports=E,e.exports.default_configuration=L},{"../PictFlowCardPropertiesPanel.js":11,"../panels/FlowCardPropertiesPanel-Form.js":12,"../panels/FlowCardPropertiesPanel-Markdown.js":13,"../panels/FlowCardPropertiesPanel-Template.js":14,"../panels/FlowCardPropertiesPanel-View.js":15,"../providers/PictProvider-Flow-CSS.js":16,"../providers/PictProvider-Flow-ConnectorShapes.js":17,"../providers/PictProvider-Flow-EventHandler.js":18,"../providers/PictProvider-Flow-Geometry.js":19,"../providers/PictProvider-Flow-Icons.js":20,"../providers/PictProvider-Flow-Layouts.js":21,"../providers/PictProvider-Flow-NodeTypes.js":22,"../providers/PictProvider-Flow-Noise.js":23,"../providers/PictProvider-Flow-PanelChrome.js":24,"../providers/PictProvider-Flow-SVGHelpers.js":25,"../providers/PictProvider-Flow-Theme.js":26,"../services/PictService-Flow-ConnectionHandleManager.js":27,"../services/PictService-Flow-ConnectionRenderer.js":28,"../services/PictService-Flow-DataManager.js":29,"../services/PictService-Flow-InteractionManager.js":30,"../services/PictService-Flow-Layout.js":31,"../services/PictService-Flow-PanelManager.js":32,"../services/PictService-Flow-PathGenerator.js":33,"../services/PictService-Flow-PortRenderer.js":34,"../services/PictService-Flow-RenderManager.js":35,"../services/PictService-Flow-SelectionManager.js":36,"../services/PictService-Flow-Tether.js":37,"../services/PictService-Flow-ViewportManager.js":38,"./PictView-Flow-FloatingToolbar.js":39,"./PictView-Flow-Node.js":40,"./PictView-Flow-PropertiesPanel.js":41,"./PictView-Flow-Toolbar.js":42,"pict-view":45}],44:[function(t,e,o){e.exports={name:"pict-view",version:"1.0.67",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.63","fable-serviceproviderbase":"^3.0.19"}}},{}],45:[function(t,e,o){var i=t("fable-serviceproviderbase"),n=t("../package.json"),r={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}},a=function(t){function e(t,o,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),o),i])).fable,a.options,a.UUID,a.Hash,a.log;var s=a.Hash===a.UUID;a.UUID="V-".concat(a.UUID),s&&(a.Hash=a.UUID),a.options.ViewIdentifier||(a.options.ViewIdentifier="AutoViewID-".concat(a.fable.getUUID())),a.serviceType="PictView",a._Package=n,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1,a.lastRenderedTimestamp=!1,a.lastMarshalFromViewTimestamp=!1,a.lastMarshalToViewTimestamp=!1,a.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(var l=0;l<a.options.Templates.length;l++){var c=a.options.Templates[l];"Hash"in c&&"Template"in c?(c.Source||(c.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addTemplate(c.Hash,c.Template,c.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Template ").concat(l," in the options array."),c)}for(var d=0;d<a.options.DefaultTemplates.length;d++){var p=a.options.DefaultTemplates[d];"Postfix"in p&&"Template"in p?(p.Source||(p.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(p.Prefix,p.Postfix,p.Template,p.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Default Template ").concat(d," in the options array."),p)}if(a.options.CSS){var h=a.options.CSSHash?a.options.CSSHash:"View-".concat(a.options.ViewIdentifier),u=a.options.CSSProvider?a.options.CSSProvider:h;a.pict.CSSMap.addCSS(h,a.options.CSS,u,a.options.CSSPriority)}a.renderables={};for(var f=0;f<a.options.Renderables.length;f++){var w=a.options.Renderables[f];a.addRenderable(w)}return a}return _inherits(e,t),_createClass(e,[{key:"addRenderable",value:function(t,e,o,i,n){var r;"object"==_typeof(t)?r=t:r={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:o,ContentDestinationAddress:i,RenderMethod:"string"!=typeof n?n:"replace"};"string"!=typeof r.RenderableHash||"string"!=typeof r.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),r):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(r.RenderableHash,"] pointed to template ").concat(r.TemplateHash,".")),this.renderables[r.RenderableHash]=r)}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),o.anticipate(this.onBeforeInitializeAsync.bind(this)),o.anticipate(this.onInitializeAsync.bind(this)),o.anticipate(this.onAfterInitializeAsync.bind(this)),o.wait(function(o){return o&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization failed: ").concat(o.message||o),{stack:o.stack}),e.initializeTimestamp=e.pict.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.info("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onBeforeRender",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t,e){return this.onBeforeRender(e),t()}},{key:"onBeforeProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}},{key:"onBeforeProjectAsync",value:function(t,e){return this.onBeforeProject(e),t()}},{key:"buildRenderOptions",value:function(t,e,o){var i={Valid:!0};return i.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,i.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(i.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),i.Valid=!1),i.Renderable=this.renderables[i.RenderableHash],i.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not exist.")),i.Valid=!1),i.DestinationAddress="string"==typeof e?e:"string"==typeof i.Renderable.ContentDestinationAddress?i.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,i.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),i.Valid=!1),"object"===_typeof(o)?(i.RecordAddress="Passed in as object",i.Record=o):(i.RecordAddress="string"==typeof o?o:"string"==typeof i.Renderable.DefaultTemplateRecordAddress?i.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,i.Record="string"==typeof i.RecordAddress?this.pict.DataProvider.getDataByAddress(i.RecordAddress):void 0),i}},{key:"assignRenderContent",value:function(t,e,o){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,o,t.TestAddress)}},{key:"render",value:function(t,e,o,i){return this.renderWithScope(this,t,e,o,i)}},{key:"renderWithScope",value:function(t,e,o,i,n){var r,a,s,l="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return l?("__Virtual"==l?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&n.TransactionHash,RootRenderableViewHash:n&&n.RootRenderableViewHash}:(r=Object.assign({},this.renderables[l])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),r?r.ContentDestinationAddress?("object"===_typeof(i)?(s=i,a="Passed in as object"):s="string"==typeof(a="string"==typeof i?i:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress)?this.pict.DataProvider.getDataByAddress(a):void 0,this.onBeforeRender(r),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(l,"] to Destination [").concat(r.ContentDestinationAddress,"]...")),r.Content=this.pict.parseTemplateByHash(r.TemplateHash,s,null,[this],t,{RootRenderable:"object"===_typeof(n)?n:r}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(l,"] content length ").concat(r.Content.length," to Destination [").concat(r.ContentDestinationAddress,"] using render method [").concat(r.RenderMethod,"].")),this.onBeforeProject(r),this.onProject(r),"virtual-assignment"!==r.RenderMethod&&(this.onAfterProject(r),this.onAfterRender(r)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it is not a valid renderable.")),!1)}},{key:"renderAsync",value:function(t,e,o,i,n){return this.renderWithScopeAsync(this,t,e,o,i,n)}},{key:"renderWithScopeAsync",value:function(t,e,o,i,n,r){var a,s,l,c=this,d="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,p="function"==typeof r?r:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:"function"==typeof n?n:null;if(p||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),p=function(t){t&&c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!d)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==d?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof o?o:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:n&&"function"!=typeof n&&n.TransactionHash,RootRenderableViewHash:n&&"function"!=typeof n&&n.RootRenderableViewHash}:(a=Object.assign({},this.renderables[d])).ContentDestinationAddress="string"==typeof o?o:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(d,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not have a valid destination address.")),p(new Error("Could not render ".concat(d)));"object"===_typeof(i)?(l=i,s="Passed in as object"):(s="string"==typeof i?i:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,l="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(d,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));var h=this.fable.newAnticipate();h.anticipate(function(t){c.onBeforeRenderAsync(t,a)}),h.anticipate(function(o){c.pict.parseTemplateByHash(a.TemplateHash,l,function(t,i){return t?(c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.ViewIdentifier," could not render (asynchronously) ").concat(d," (param ").concat(e,") because it did not parse the template."),t),o(t)):(a.Content=i,o())},[c],t,{RootRenderable:"object"===_typeof(n)?n:a})}),h.anticipate(function(t){c.onBeforeProjectAsync(t,a)}),h.anticipate(function(t){c.onProjectAsync(t,a)}),"virtual-assignment"!==a.RenderMethod&&(h.anticipate(function(t){c.onAfterProjectAsync(t,a)}),h.anticipate(function(t){c.onAfterRenderAsync(t,a)})),h.wait(p)}},{key:"renderDefaultAsync",value:function(t){this.renderAsync(t)}},{key:"basicRender",value:function(t,e,o){return this.basicRenderWithScope(this,t,e,o)}},{key:"basicRenderWithScope",value:function(t,e,o,i){var n=this.buildRenderOptions(e,o,i);return n.Valid?(this.assignRenderContent(n.Renderable,n.DestinationAddress,this.pict.parseTemplateByHash(n.Renderable.TemplateHash,n.Record,null,[this],t,{RootRenderable:n.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(n.RenderableHash," because it is not valid.")),!1)}},{key:"basicRenderAsync",value:function(t,e,o,i){return this.basicRenderWithScopeAsync(this,t,e,o,i)}},{key:"basicRenderWithScopeAsync",value:function(t,e,o,i,n){var r=this,a="function"==typeof n?n:"function"==typeof i?i:"function"==typeof o?o:"function"==typeof e?e:null;a||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),a=function(t){t&&r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});var s=this.buildRenderOptions(e,o,i);if(!s.Valid){var l="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(s.RenderableHash," because it is not valid.");return this.log.error(l),a(new Error(l))}this.pict.parseTemplateByHash(s.Renderable.TemplateHash,s.Record,function(t,e){return t?(r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.ViewIdentifier," could not render (asynchronously) ").concat(s.RenderableHash," because it did not parse the template."),t),a(t)):(r.assignRenderContent(s.Renderable,s.DestinationAddress,e),a())},[this],t,{RootRenderable:s.Renderable})}},{key:"onProject",value:function(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}},{key:"onProjectAsync",value:function(t,e){return this.onProject(e),t()}},{key:"onAfterRender",value:function(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){var e,o=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[]);try{for(o.s();!(e=o.n()).done;){var i=e.value,n=this.pict.views[i.Data.ViewHash];n?(n.onAfterProject(),n.onAfterRender(i.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}catch(t){o.e(t)}finally{o.f()}}return!0}},{key:"onAfterRenderAsync",value:function(t,e){var o=this;this.onAfterRender(e);var i=this.fable.newAnticipate();if(e&&e.RootRenderableViewHash===this.Hash){var n,r=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[]);try{var a=function(){var t=n.value,r=o.pict.views[t.Data.ViewHash];if(!r)return o.log.error("PictView [".concat(o.UUID,"]::[").concat(o.Hash,"] ").concat(o.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(t.Data.ViewHash,".")),1;i.anticipate(r.onAfterProjectAsync.bind(r)),i.anticipate(function(e){r.onAfterRenderAsync(e,t.Data.Renderable)})};for(r.s();!(n=r.n()).done;)a()}catch(t){r.e(t)}finally{r.f()}}return i.wait(t)}},{key:"onAfterProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}},{key:"onAfterProjectAsync",value:function(t,e){return t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeSolveAsync.bind(this)),o.anticipate(this.onSolveAsync.bind(this)),o.anticipate(this.onAfterSolveAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," solveAsync() complete.")),e.lastSolvedTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}},{key:"onBeforeMarshalFromViewAsync",value:function(t){return this.onBeforeMarshalFromView(),t()}},{key:"onMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}},{key:"onMarshalFromViewAsync",value:function(t){return this.onMarshalFromView(),t()}},{key:"marshalFromView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalFromViewAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),o.anticipate(this.onMarshalFromViewAsync.bind(this)),o.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalFromViewAsync() complete.")),e.lastMarshalFromViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}},{key:"onAfterMarshalFromViewAsync",value:function(t){return this.onAfterMarshalFromView(),t()}},{key:"onBeforeMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}},{key:"onBeforeMarshalToViewAsync",value:function(t){return this.onBeforeMarshalToView(),t()}},{key:"onMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}},{key:"onMarshalToViewAsync",value:function(t){return this.onMarshalToView(),t()}},{key:"marshalToView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalToViewAsync",value:function(t){var e=this,o=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),o.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),o.anticipate(this.onMarshalToViewAsync.bind(this)),o.anticipate(this.onAfterMarshalToViewAsync.bind(this)),o.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalToViewAsync() complete.")),e.lastMarshalToViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}},{key:"onAfterMarshalToViewAsync",value:function(t){return this.onAfterMarshalToView(),t()}},{key:"isPictView",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":44,"fable-serviceproviderbase":4}],46:[function(t,e,o){var i={"@":{DataType:"AutoIdentity",Label:"Auto ID",HasSize:!1},"%":{DataType:"GUID",Label:"GUID",HasSize:!1},$:{DataType:"String",Label:"String",HasSize:!0},"*":{DataType:"Text",Label:"Text",HasSize:!1},"#":{DataType:"Numeric",Label:"Numeric",HasSize:!1},".":{DataType:"Decimal",Label:"Decimal",HasSize:!0},"&":{DataType:"DateTime",Label:"Date/Time",HasSize:!1},"^":{DataType:"Boolean",Label:"Boolean",HasSize:!1}},n={};for(var r in i)n[i[r].DataType]=r;e.exports={MICRODDL_TYPE_MAP:i,DATATYPE_TO_SYMBOL:n,columnsToMicroDDL:function(t,e){for(var o=["!"+(e||"Untitled").replace(/[^a-zA-Z0-9_]/g,"")],r=0;r<t.length;r++){var a=t[r],s=n[a.DataType]||"$",l=s+(a.Name||"Column"+r);i[s].HasSize&&a.Size&&(l+=" "+a.Size),o.push(l)}return o.join("\n")},microDDLToColumns:function(t){for(var e=t.split("\n"),o=[],n=0;n<e.length;n++){var r=e[n].trim();if(!(!r||r.startsWith("!")||r.startsWith("//")||r.startsWith("--")||r.startsWith("->"))){var a=r.charAt(0);if(i.hasOwnProperty(a)){var s=r.substring(1).trim().split(/\s+/);o.push({Name:s[0]||"",DataType:i[a].DataType,Size:s[1]||""})}}}return o}}},{}],47:[function(t,e,o){var i=t("pict-view"),n=t("./MappingEditor-SchemaUtils.js"),r=function(e){function o(t,e,i){var n;return _classCallCheck(this,o),(n=_callSuper(this,o,[t,e,i]))._EditingContextID=0,n._EditingName="",n._CurrentMappings=[],n._SelectedMappingID=0,n._DiscoveredFields={},n._FlowView=null,n._MapEditorMode="flow",n._MappingSources=[],n._MappingStores=[],n._CurrentTargetSchema=null,n}return _inherits(o,e),_createClass(o,[{key:"_doLoadMappings",value:function(t){return Promise.resolve({Mappings:[]})}},{key:"_doLoadSources",value:function(){return Promise.resolve([])}},{key:"_doLoadStores",value:function(t){return Promise.resolve({Stores:[]})}},{key:"_doLoadTargetSchema",value:function(t){return Promise.resolve({SchemaDefinition:""})}},{key:"_doLoadMapping",value:function(t){return Promise.resolve({Mapping:null})}},{key:"_doDeleteMapping",value:function(t){return Promise.resolve({})}},{key:"_doDiscoverSourceFields",value:function(t,e,o){return Promise.resolve({Headers:[],SampleSize:0})}},{key:"_doCreateMapping",value:function(t,e){return Promise.resolve({Mapping:{}})}},{key:"_doUpdateMapping",value:function(t,e){return Promise.resolve({Mapping:{}})}},{key:"_onClose",value:function(){}},{key:"_doToast",value:function(t,e){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];o&&"function"==typeof o.toast?o.toast(t,e):this.log.info("[MeadowMappingEditor] "+t)}},{key:"_doConfirm",value:function(t,e){var o=this.pict.views&&this.pict.views["Pict-Section-Modal"];return o&&"function"==typeof o.confirm?o.confirm(t,e):Promise.resolve("undefined"!=typeof window&&window.confirm(t))}},{key:"editMappings",value:function(t,e){var o=this;this._EditingContextID=t,this._EditingName=e||"",this.render();var i=document.getElementById("MeadowMap-Editor"),n=document.getElementById("MeadowMap-Title");i&&(i.classList.add("active"),i.scrollIntoView({behavior:"smooth",block:"nearest"})),n&&(n.textContent="Mappings: "+(e||"Untitled"));var r=document.getElementById("MeadowMap-List-Wrap"),a=document.getElementById("MeadowMap-Detail");r&&(r.style.display=""),a&&(a.style.display="none"),Promise.all([this._doLoadMappings(t),this._doLoadSources(),this._doLoadStores(t),this._doLoadTargetSchema(t)]).then(function(t){o._CurrentMappings=t[0]&&t[0].Mappings?t[0].Mappings:[],o._MappingSources=Array.isArray(t[1])?t[1]:[],o._MappingStores=t[2]&&t[2].Stores?t[2].Stores:[];for(var e=0;e<o._MappingSources.length;e++){var i=o._MappingSources[e];Array.isArray(i.Columns)&&i.Columns.length>0&&(o._DiscoveredFields[i.IDSource]=i.Columns)}var n=t[3];n&&n.SchemaDefinition&&(o._CurrentTargetSchema=n.SchemaDefinition),o.refreshMappingList()})}},{key:"closeMappingEditor",value:function(){this._FlowView&&(this._FlowView=null),this._SelectedMappingID=0,this._onClose()}},{key:"refreshMappingList",value:function(){var t=document.getElementById("MeadowMap-List");if(t)if(0!==this._CurrentMappings.length){var e=this.options.ViewIdentifier,o='<table class="meadow-mapping-list-table"><thead><tr>';o+="<th>ID</th><th>Name</th><th>Source</th><th>Active</th><th>Actions</th>",o+="</tr></thead><tbody>";for(var i=0;i<this._CurrentMappings.length;i++){for(var n=this._CurrentMappings[i],r="—",a=0;a<this._MappingSources.length;a++)if(this._MappingSources[a].IDSource===n.IDSource){r=this._MappingSources[a].Name||"Source "+n.IDSource;break}o+="<tr>",o+="<td>"+n.IDProjectionMapping+"</td>",o+="<td><strong>"+(n.Name||"—")+"</strong></td>",o+="<td>"+r+"</td>",o+="<td>"+(n.Active?"✓":"✗")+"</td>",o+="<td>",o+='<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="window._Pict.views[\''+e+"'].openMappingDetail("+n.IDProjectionMapping+')">Edit</button> ',o+='<button class="meadow-mapping-btn meadow-mapping-btn-danger meadow-mapping-btn-small" onclick="window._Pict.views[\''+e+"'].deleteMapping("+n.IDProjectionMapping+')">Delete</button>',o+="</td>",o+="</tr>"}o+="</tbody></table>",t.innerHTML=o}else t.innerHTML='<div style="text-align:center; padding:1.5em; color:var(--facto-text-tertiary, #a09070);">No mappings yet. Create one to map source fields to target columns.</div>'}},{key:"newMapping",value:function(){var t=this;this._SelectedMappingID=0;var e=document.getElementById("MeadowMap-List-Wrap"),o=document.getElementById("MeadowMap-Detail");e&&(e.style.display="none"),o&&(o.style.display="");var i=document.getElementById("MeadowMap-Name");i&&(i.value="");var n=this._MappingSources.length>0?this._MappingSources[0].IDSource:void 0;this._populateSourceDropdown(n),this._populateStoreChecklist();var r=document.getElementById("MeadowMap-JSON");if(r){var a=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),s="GUID"+a,l="ID"+a,c={};c[s]="{~D:Record.IDRecord~}",c[l]="{~D:Record.IDRecord~}",r.value=JSON.stringify({Entity:a,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:s,Mappings:c,Solvers:[],ManyfestAddresses:!1},null,"\t")}var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),this._FlowView=null,this.switchMapMode("flow"),this.initFlowView(),this._doLoadTargetSchema(this._EditingContextID).then(function(e){e&&e.SchemaDefinition&&(t._CurrentTargetSchema=e.SchemaDefinition),t._rebuildFlowNodes()})}},{key:"openMappingDetail",value:function(t){var e=this;this._SelectedMappingID=t,this._doLoadMapping(t).then(function(t){if(t&&t.Mapping){var o=t.Mapping,i=document.getElementById("MeadowMap-List-Wrap"),n=document.getElementById("MeadowMap-Detail");i&&(i.style.display="none"),n&&(n.style.display="");var r=document.getElementById("MeadowMap-Name");r&&(r.value=o.Name||""),e._populateSourceDropdown(o.IDSource);var a=null;try{var s=JSON.parse(o.MappingConfiguration||"{}");Array.isArray(s.TargetStores)&&s.TargetStores.length>0&&(a=s.TargetStores)}catch(t){}!a&&o.IDProjectionStore&&(a=[o.IDProjectionStore]),e._populateStoreChecklist(a);var l={};try{l=JSON.parse(o.MappingConfiguration||"{}")}catch(t){}Array.isArray(l.sourceColumns)&&l.sourceColumns.length>0&&(e._DiscoveredFields[o.IDSource]=l.sourceColumns);var c=document.getElementById("MeadowMap-JSON");c&&(c.value=JSON.stringify(l,null,"\t"));var d=document.getElementById("MeadowMap-Flow-Container");d&&(d.innerHTML=""),e._FlowView=null,e.switchMapMode("flow"),e.initFlowView(),e._doLoadTargetSchema(e._EditingContextID).then(function(t){if(t&&t.SchemaDefinition&&(e._CurrentTargetSchema=t.SchemaDefinition),e._FlowView){var i=null;try{i=JSON.parse(o.FlowDiagramState||"null")}catch(t){}i&&i.Nodes&&i.Nodes.length>0&&"function"==typeof e._FlowView.setFlowData&&e._FlowView.setFlowData(i)}e._rebuildFlowNodes()})}else e._doToast("Mapping not found.","error")})}},{key:"deleteMapping",value:(i=_asyncToGenerator(_regenerator().m(function t(e){var o=this;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._doConfirm("Delete this mapping?",{title:"Delete Mapping",confirmLabel:"Delete",dangerous:!0});case 1:if(t.v){t.n=2;break}return t.a(2);case 2:this._doDeleteMapping(e).then(function(){o._doLoadMappings(o._EditingContextID).then(function(t){o._CurrentMappings=t&&t.Mappings?t.Mappings:[],o.refreshMappingList()})});case 3:return t.a(2)}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"switchMapMode",value:function(t){this._MapEditorMode=t;var e=document.getElementById("MeadowMap-Flow-Wrap"),o=document.getElementById("MeadowMap-JSON-Wrap"),i=document.getElementById("MeadowMap-Mode-Flow"),n=document.getElementById("MeadowMap-Mode-JSON");if("flow"===t)e&&(e.style.display=""),o&&(o.style.display="none"),i&&i.classList.add("active"),n&&n.classList.remove("active");else if(e&&(e.style.display="none"),o&&(o.style.display=""),i&&i.classList.remove("active"),n&&n.classList.add("active"),this._FlowView&&"function"==typeof this._FlowView.getFlowData){var r=this.flowToMappingConfig(),a=document.getElementById("MeadowMap-JSON");a&&(a.value=JSON.stringify(r,null,"\t"))}}},{key:"_populateSourceDropdown",value:function(t){var e=document.getElementById("MeadowMap-Source");if(e){for(var o='<option value="0">Select a source...</option>',i=0;i<this._MappingSources.length;i++){var n=this._MappingSources[i],r=n.IDSource===t?" selected":"";o+='<option value="'+n.IDSource+'"'+r+">"+(n.Name||"Source "+n.IDSource)+"</option>"}e.innerHTML=o}}},{key:"_populateStoreChecklist",value:function(t){var e=document.getElementById("MeadowMap-Stores");if(e){var o={};if(Array.isArray(t))for(var i=0;i<t.length;i++)o[t[i]]=!0;else t&&(o[t]=!0);if(0!==this._MappingStores.length){for(var n="",r=0;r<this._MappingStores.length;r++){var a=this._MappingStores[r],s=o[a.IDProjectionStore]?" checked":"",l=(a.TargetTableName||"Store "+a.IDProjectionStore)+" ("+(a.Status||"Unknown")+")";n+="<label>",n+='<input type="checkbox" value="'+a.IDProjectionStore+'"'+s+">",n+=" "+l,n+="</label>"}e.innerHTML=n}else e.innerHTML='<div style="font-size:0.82em; color:var(--facto-text-tertiary, #a09070);">No stores configured yet.</div>'}}},{key:"_getCheckedStoreIDs",value:function(){var t=document.getElementById("MeadowMap-Stores");if(!t)return[];for(var e=t.querySelectorAll('input[type="checkbox"]:checked'),o=[],i=0;i<e.length;i++)o.push(parseInt(e[i].value,10));return o}},{key:"discoverSourceFields",value:function(){var t=this,e=document.getElementById("MeadowMap-Source"),o=e?parseInt(e.value,10):0;o?this._doDiscoverSourceFields(this._EditingContextID,o,50).then(function(e){if(e&&e.Error)t._doToast("Error: "+e.Error,{type:"error"});else{var i=e&&e.Headers?e.Headers:[];t._DiscoveredFields[o]=i,t._doToast("Discovered "+i.length+" fields from "+(e.SampleSize||0)+" records: "+i.join(", "),{type:"success",duration:6e3}),t._rebuildFlowNodes()}}):this._doToast("Select a source first.",{type:"warning"})}},{key:"_rebuildFlowNodes",value:function(){var t=document.getElementById("MeadowMap-Source"),e=t?parseInt(t.value,10):0,o=this._DiscoveredFields[e]||[],i=this._getSchemaColumns();if(this.initFlowView(),this._FlowView){for(var n="Source: "+(t&&t.selectedIndex>=0?t.options[t.selectedIndex].text:"Source"),r="Target: "+(this._EditingName||"Target"),a=[{Hash:"src-whole-record",Direction:"output",Side:"right",Label:"Whole Record"}],s=0;s<o.length;s++)a.push({Hash:"src-field-"+o[s].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"output",Side:"right",Label:o[s]});for(var l=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),c="GUID"+l,d="ID"+l,p=[{Hash:"tgt-col-"+c,Direction:"input",Side:"left",Label:c},{Hash:"tgt-col-"+d,Direction:"input",Side:"left",Label:d}],h=0;h<i.length;h++)i[h]!==c&&i[h]!==d&&p.push({Hash:"tgt-col-"+i[h].replace(/[^a-zA-Z0-9_-]/g,"_"),Direction:"input",Side:"left",Label:i[h]});for(var u=this._FlowView.getFlowData(),f=null,w=null,v=0;v<u.Nodes.length;v++)"SRC"===u.Nodes[v].Type&&(f=u.Nodes[v]),"TGT"===u.Nodes[v].Type&&(w=u.Nodes[v]);if(f){for(var g=a.slice(),y={},b=0;b<g.length;b++)y[g[b].Hash]=!0;for(var m=f.Ports||[],_=0;_<m.length;_++)y[m[_].Hash]||g.push(m[_]);for(var P=this._FlowView._FlowData.Nodes,F=0;F<P.length;F++)if(P[F].Hash===f.Hash){P[F].Ports=g,P[F].Title=n;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-src-"+this.fable.getUUID(),Type:"SRC",X:50,Y:50,Width:200,Height:100,Title:n,Ports:a,Data:{}});if(w){for(var S=p.slice(),V={},C=0;C<S.length;C++)V[S[C].Hash]=!0;for(var k=w.Ports||[],T=0;T<k.length;T++)V[k[T].Hash]||S.push(k[T]);for(var D=this._FlowView._FlowData.Nodes,A=0;A<D.length;A++)if(D[A].Hash===w.Hash){D[A].Ports=S,D[A].Title=r;break}}else this._FlowView._FlowData.Nodes.push({Hash:"node-tgt-"+this.fable.getUUID(),Type:"TGT",X:550,Y:50,Width:200,Height:100,Title:r,Ports:p,Data:{}});"function"==typeof this._FlowView.renderFlow?this._FlowView.renderFlow():"function"==typeof this._FlowView.render&&this._FlowView.render()}}},{key:"_getSchemaColumns",value:function(){var t=[],e=this._CurrentTargetSchema||"";if(e)for(var o=n.microDDLToColumns(e),i=0;i<o.length;i++)t.push(o[i].Name);return t}},{key:"initFlowView",value:function(){if(!this._FlowView){var e=document.getElementById("MeadowMap-Flow-Container");if(e)try{var o=t("pict-section-flow");this._FlowView=this.pict.addView("MeadowMapping-Flow",{ViewIdentifier:"MeadowMapping-Flow",DefaultDestinationAddress:"#MeadowMap-Flow-Container",EnableToolbar:!0,EnablePanning:!0,EnableZooming:!0,EnableNodeDragging:!0,EnableConnectionCreation:!0},o);var i=t("./flow-cards/FlowCard-MappingSource.js"),n=t("./flow-cards/FlowCard-MappingTarget.js"),r=t("./flow-cards/FlowCard-TemplateExpression.js"),a=t("./flow-cards/FlowCard-SolverExpression.js");this.pict.addServiceType("FlowCardMappingSource",i),this.pict.addServiceType("FlowCardMappingTarget",n),this.pict.addServiceType("FlowCardTemplateExpression",r),this.pict.addServiceType("FlowCardSolverExpression",a),"function"==typeof this._FlowView.render&&this._FlowView.render();var s=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingSource",{}),l=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardMappingTarget",{}),c=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardTemplateExpression",{}),d=this.pict.instantiateServiceProviderWithoutRegistration("FlowCardSolverExpression",{});s.registerWithFlowView(this._FlowView),l.registerWithFlowView(this._FlowView),c.registerWithFlowView(this._FlowView),d.registerWithFlowView(this._FlowView)}catch(t){this.log.error("Failed to initialize flow view: "+t.message),e.innerHTML='<div style="padding:2em; text-align:center; color:var(--facto-text-tertiary, #a09070);">Flow editor could not be loaded. Use JSON Config mode instead.</div>'}}}},{key:"flowToMappingConfig",value:function(){var t=(this._EditingName||"Record").replace(/[^a-zA-Z0-9_]/g,""),e="GUID"+t,o="ID"+t,i={Entity:t,GUIDTemplate:"{~D:Record.IDRecord~}",GUIDName:e,Mappings:{},Solvers:[],ManyfestAddresses:!1};if(!this._FlowView||"function"!=typeof this._FlowView.getFlowData)return i;var n=this._FlowView.getFlowData();if(!n||!n.Connections)return i;var r={},a={};if(n.Nodes)for(var s=0;s<n.Nodes.length;s++){var l=n.Nodes[s];if(r[l.Hash]=l,l.Ports)for(var c=0;c<l.Ports.length;c++)a[l.Ports[c].Hash]={Label:l.Ports[c].Label,NodeHash:l.Hash,NodeType:l.Type}}for(var d={},p=0;p<n.Connections.length;p++){var h=n.Connections[p],u=a[h.SourcePortHash],f=a[h.TargetPortHash];if(u&&f&&"TGT"===f.NodeType){var w=f.Label;if(w){var v=r[u.NodeHash];if(v)if("SRC"===v.Type){var g=u.Label;if("Whole Record"===g)continue;var y=h.Data&&h.Data.Template?h.Data.Template:"{~D:Record."+g+"~}";w===e&&(i.GUIDTemplate=y),i.Mappings[w]=y}else if("TPL"===v.Type){var b=v.Data&&v.Data.TemplateExpression?v.Data.TemplateExpression:"";b&&(w===e&&(i.GUIDTemplate=b),i.Mappings[w]=b)}else if("SOL"===v.Type){var m=v.Data&&v.Data.SolverExpression?v.Data.SolverExpression:"";m&&(d[v.Hash]||(d[v.Hash]={expression:m,outputs:{}}),d[v.Hash].outputs[w]=!0)}}}}i.Mappings.hasOwnProperty(e)||(i.Mappings[e]=i.GUIDTemplate),i.Mappings.hasOwnProperty(o)||(i.Mappings[o]="{~D:Record.IDRecord~}");for(var _=Object.keys(d),P=0;P<_.length;P++)i.Solvers.push(d[_[P]]);return i}},{key:"saveMapping",value:function(){var t=this,e=document.getElementById("MeadowMap-Name"),o=document.getElementById("MeadowMap-Source"),i=e?e.value.trim():"",n=o?parseInt(o.value,10):0,r=this._getCheckedStoreIDs(),a=r.length>0?r[0]:0;if(i){var s;if("json"===this._MapEditorMode){var l=document.getElementById("MeadowMap-JSON"),c=l?l.value:"{}";try{s=JSON.parse(c)}catch(t){return void this._doToast("Invalid JSON: "+t.message,{type:"error"})}}else s=this.flowToMappingConfig();s.TargetStores=r;var d=this._DiscoveredFields[n];Array.isArray(d)&&d.length>0&&(s.sourceColumns=d);var p={};this._FlowView&&"function"==typeof this._FlowView.getFlowData&&(p=this._FlowView.getFlowData());var h={Name:i,IDSource:n,IDProjectionStore:a,MappingConfiguration:JSON.stringify(s),FlowDiagramState:JSON.stringify(p),Active:1};(this._SelectedMappingID?this._doUpdateMapping(this._SelectedMappingID,h):this._doCreateMapping(this._EditingContextID,h)).then(function(e){e&&e.Error?t._doToast("Error: "+e.Error,{type:"error"}):(e&&e.Mapping&&e.Mapping.IDProjectionMapping&&(t._SelectedMappingID=e.Mapping.IDProjectionMapping),t._doToast("Mapping saved.",{type:"success"}),t._doLoadMappings(t._EditingContextID).then(function(e){t._CurrentMappings=e&&e.Mappings?e.Mappings:[]}))})}else this._doToast("Enter a mapping name.",{type:"warning"})}}]);var i}(i);e.exports=r,e.exports.default_configuration={ViewIdentifier:"MeadowMappingEditor",DefaultRenderable:"MeadowMappingEditor-Content",DefaultDestinationAddress:"#MeadowMap-Editor-Container",AutoRender:!1,CSS:"\n\t\t/* Meadow Mapping Editor */\n\t\t.meadow-mapping-editor {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.meadow-mapping-editor.active {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.meadow-mapping-header {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 1em;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-header h3 {\n\t\t\tmargin: 0;\n\t\t\tflex: 1;\n\t\t}\n\t\t.meadow-mapping-list-table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin-bottom: 1em;\n\t\t}\n\t\t.meadow-mapping-list-table th {\n\t\t\ttext-align: left;\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--facto-text-tertiary, #a09070);\n\t\t\tpadding: 0.5em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--facto-border, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-list-table td {\n\t\t\tpadding: 0.35em 0.4em;\n\t\t\tborder-bottom: 1px solid var(--facto-border-subtle, #e8ddc8);\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.meadow-flow-container {\n\t\t\twidth: 100%;\n\t\t\theight: 500px;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--facto-bg-surface, #fcf8f0);\n\t\t\tmargin-bottom: 0.75em;\n\t\t}\n\t\t.meadow-mapping-json-editor {\n\t\t\twidth: 100%;\n\t\t\tmin-height: 300px;\n\t\t\tfont-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.75em;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t\tresize: vertical;\n\t\t\ttab-size: 4;\n\t\t}\n\t\t.meadow-mapping-store-checklist {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 0.5em;\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.meadow-mapping-store-checklist label {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.35em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tborder: 1px solid var(--facto-border-subtle, #e8ddc8);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t}\n\t\t.meadow-mapping-store-checklist label:has(input:checked) {\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t\tbackground: var(--facto-brand-a12, rgba(24,165,160,0.12));\n\t\t}\n\t\t.meadow-mapping-btn {\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 0.35em 0.9em;\n\t\t\tfont-size: 0.82em;\n\t\t\tfont-weight: 500;\n\t\t\tborder-radius: 4px;\n\t\t\tborder: 1px solid transparent;\n\t\t\tcursor: pointer;\n\t\t\ttext-decoration: none;\n\t\t\tline-height: 1.4;\n\t\t}\n\t\t.meadow-mapping-btn-primary {\n\t\t\tbackground: var(--facto-brand, #18a5a0);\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t}\n\t\t.meadow-mapping-btn-primary:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-secondary {\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t\tborder-color: var(--facto-border, #d6c8ae);\n\t\t}\n\t\t.meadow-mapping-btn-secondary:hover {\n\t\t\tbackground: var(--facto-border-subtle, #e8ddc8);\n\t\t}\n\t\t.meadow-mapping-btn-danger {\n\t\t\tbackground: #e74c3c;\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--theme-color-status-error, #e74c3c);\n\t\t}\n\t\t.meadow-mapping-btn-danger:hover {\n\t\t\topacity: 0.88;\n\t\t}\n\t\t.meadow-mapping-btn-small {\n\t\t\tpadding: 0.2em 0.6em;\n\t\t\tfont-size: 0.78em;\n\t\t}\n\t\t.meadow-schema-mode-tabs {\n\t\t\tdisplay: flex;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.meadow-schema-mode-tab {\n\t\t\tpadding: 0.25em 0.75em;\n\t\t\tfont-size: 0.8em;\n\t\t\tborder: 1px solid var(--facto-border, #d6c8ae);\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tbackground: var(--facto-bg-input, #fcf8f0);\n\t\t\tcolor: var(--facto-text, #3a3020);\n\t\t}\n\t\t.meadow-schema-mode-tab.active {\n\t\t\tbackground: var(--facto-brand, #18a5a0);\n\t\t\tcolor: #fff;\n\t\t\tborder-color: var(--facto-brand, #18a5a0);\n\t\t}\n\t\t.meadow-section-title {\n\t\t\tfont-size: 0.72em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--facto-text-tertiary, #a09070);\n\t\t}\n\t",Templates:[{Hash:"MeadowMappingEditor-Template",Template:'\n<div>\n\t<div id="MeadowMap-Editor" class="meadow-mapping-editor">\n\t\t<div class="meadow-mapping-header">\n\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].closeMappingEditor()">&larr; Back</button>\n\t\t\t<h3 id="MeadowMap-Title">Mapping Editor</h3>\n\t\t\t<div class="meadow-schema-mode-tabs">\n\t\t\t\t<button class="meadow-schema-mode-tab active" id="MeadowMap-Mode-Flow" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'flow\')">Visual Mapper</button>\n\t\t\t\t<button class="meadow-schema-mode-tab" id="MeadowMap-Mode-JSON" onclick="{~P~}.views[\'MeadowMappingEditor\'].switchMapMode(\'json\')">JSON Config</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-List-Wrap">\n\t\t\t<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:0.75em;">\n\t\t\t\t<div class="meadow-section-title" style="margin:0;">Existing Mappings</div>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].newMapping()">+ New Mapping</button>\n\t\t\t</div>\n\t\t\t<div id="MeadowMap-List"></div>\n\t\t</div>\n\n\t\t<div id="MeadowMap-Detail" style="display:none;">\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Mapping Name</label>\n\t\t\t\t<input type="text" id="MeadowMap-Name" placeholder="Mapping name" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--facto-border); border-radius:4px; background:var(--facto-bg-input); color:var(--facto-text);">\n\t\t\t</div>\n\n\t\t\t<div style="display:flex; gap:0.5em; align-items:center; margin-bottom:0.75em;">\n\t\t\t\t<label style="font-size:0.78em; font-weight:600;">Source</label>\n\t\t\t\t<select id="MeadowMap-Source" style="flex:1; padding:0.3em 0.5em; font-size:0.85em; border:1px solid var(--facto-border); border-radius:4px;"></select>\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-secondary meadow-mapping-btn-small" onclick="{~P~}.views[\'MeadowMappingEditor\'].discoverSourceFields()">Discover Fields</button>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-Flow-Wrap">\n\t\t\t\t<div id="MeadowMap-Flow-Container" class="meadow-flow-container"></div>\n\t\t\t</div>\n\n\t\t\t<div id="MeadowMap-JSON-Wrap" style="display:none;">\n\t\t\t\t<textarea class="meadow-mapping-json-editor" id="MeadowMap-JSON" placeholder=\'{"Entity":"MyTable","GUIDTemplate":"{~D:Record.IDRecord~}","Mappings":{},"Solvers":[],"ManyfestAddresses":false}\'></textarea>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em;">\n\t\t\t\t<div style="font-size:0.72em; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:var(--facto-text-tertiary); margin-bottom:0.35em;">Target Stores</div>\n\t\t\t\t<div id="MeadowMap-Stores" class="meadow-mapping-store-checklist"></div>\n\t\t\t</div>\n\n\t\t\t<div style="margin-top:0.75em; display:flex; gap:0.5em; flex-wrap:wrap; align-items:center;">\n\t\t\t\t<button class="meadow-mapping-btn meadow-mapping-btn-primary" onclick="{~P~}.views[\'MeadowMappingEditor\'].saveMapping()">Save Mapping</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"MeadowMappingEditor-Content",TemplateHash:"MeadowMappingEditor-Template",DestinationAddress:"#MeadowMap-Editor-Container",RenderMethod:"replace"}]}},{"./MappingEditor-SchemaUtils.js":46,"./flow-cards/FlowCard-MappingSource.js":48,"./flow-cards/FlowCard-MappingTarget.js":49,"./flow-cards/FlowCard-SolverExpression.js":50,"./flow-cards/FlowCard-TemplateExpression.js":51,"pict-section-flow":9,"pict-view":45}],48:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Mapping Source",Name:"Mapping Source",Code:"SRC",Category:"Data Source",Description:"Source dataset with discovered record fields",TitleBarColor:"#2980b9",Width:200,Height:100,Inputs:[],Outputs:[{Name:"Whole Record",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),i])).serviceType="FlowCardMappingSource",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Mapping Source",Code:"SRC",Category:"Data Source",TitleBarColor:"#2980b9",Width:200,Height:100}},{"pict-section-flow":9}],49:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Mapping Target",Name:"Mapping Target",Code:"TGT",Category:"Data Target",Description:"Mapping target table with schema columns",TitleBarColor:"#27ae60",Width:200,Height:100,Inputs:[],Outputs:[],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0},o),i])).serviceType="FlowCardMappingTarget",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Mapping Target",Code:"TGT",Category:"Data Target",TitleBarColor:"#27ae60",Width:200,Height:100}},{"pict-section-flow":9}],50:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Solver Expression",Name:"Solver Expression",Code:"SOL",Category:"Transform",Description:"Apply a Fable solver expression for conditional logic and computed values",TitleBarColor:"#d35400",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:var(--theme-color-border-default, #ccc); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.SolverExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Solver Expression",Configuration:{Template:"<div style=\"padding:8px;\"><label style=\"display:block; margin-bottom:4px; font-weight:bold; font-size:12px;\">Solver Expression</label><textarea id=\"FlowCard-SOL-{~D:Record.Hash~}\" style=\"width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:var(--theme-color-border-default, #e0e0e0); border:1px solid var(--theme-color-text-secondary, #444); border-radius:4px; padding:6px;\" onchange=\"(function(el){var n=pict.views['MeadowMapping-Flow'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash==='{~D:Record.Hash~}'){n._FlowData.Nodes[i].Data.SolverExpression=el.value;if(typeof n.renderFlow==='function')n.renderFlow();break;}}}})(this)\">{~D:Record.Data.SolverExpression~}</textarea><div style=\"font-size:10px; color:var(--theme-color-text-muted, #888); margin-top:4px;\">Example: IF(IncomingRecord.Type == 'Premium', 'GOLD', 'SILVER')</div></div>"}}},o),i])).serviceType="FlowCardSolverExpression",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Solver Expression",Code:"SOL",Category:"Transform",TitleBarColor:"#d35400",Width:220,Height:90}},{"pict-section-flow":9}],51:[function(t,e,o){var i=function(t){function e(t,o,i){var n;return _classCallCheck(this,e),(n=_callSuper(this,e,[t,Object.assign({},{Title:"Template Expression",Name:"Template Expression",Code:"TPL",Category:"Transform",Description:"Apply a Manyfest template expression to map source fields to a target column",TitleBarColor:"#8e44ad",Width:220,Height:90,Inputs:[{Name:"Whole Record",Side:"left"}],Outputs:[{Name:"Result",Side:"right"}],ShowTypeLabel:!0,PortLabelsOnHover:!1,PortLabelsOutside:!0,LabelsInFront:!0,Enabled:!0,BodyContent:{ContentType:"html",Template:'<div style="font-size:10px; padding:2px 4px; color:var(--theme-color-border-default, #ccc); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:200px;">{~D:Record.Data.TemplateExpression~}</div>'},PropertiesPanel:{PanelType:"Template",DefaultWidth:420,DefaultHeight:160,Title:"Template Expression",Configuration:{Template:'<div style="padding:8px;"><label style="display:block; margin-bottom:4px; font-weight:bold; font-size:12px;">Template Expression</label><textarea id="FlowCard-TPL-{~D:Record.Hash~}" style="width:100%; height:80px; font-family:monospace; font-size:12px; resize:vertical; background:#1a1a2e; color:var(--theme-color-border-default, #e0e0e0); border:1px solid var(--theme-color-text-secondary, #444); border-radius:4px; padding:6px;" onchange="(function(el){var n=pict.views[\'MeadowMapping-Flow\'];if(n&&n._FlowData){for(var i=0;i<n._FlowData.Nodes.length;i++){if(n._FlowData.Nodes[i].Hash===\'{~D:Record.Hash~}\'){n._FlowData.Nodes[i].Data.TemplateExpression=el.value;if(typeof n.renderFlow===\'function\')n.renderFlow();break;}}}})(this)">{~D:Record.Data.TemplateExpression~}</textarea><div style="font-size:10px; color:var(--theme-color-text-muted, #888); margin-top:4px;">Use {~D:Record.FieldName~} syntax. Example: {~D:Record.Name~} in {~D:Record.City~}</div></div>'}}},o),i])).serviceType="FlowCardTemplateExpression",n}return _inherits(e,t),_createClass(e)}(t("pict-section-flow").PictFlowCard);e.exports=i,e.exports.default_configuration={Title:"Template Expression",Code:"TPL",Category:"Transform",TitleBarColor:"#8e44ad",Width:220,Height:90}},{"pict-section-flow":9}]},{},[1])(1)});
2
2
  //# sourceMappingURL=mapping-demo-editor.min.js.map