基础bladex_workflow_saber创建我们自己开发的基础仓库 mainf分支包含完整工作流插件和表单设计器 saber分支只包含基础工作流不包含表单设计器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
2.7 MiB

(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("Vue")):"function"===typeof define&&define.amd?define(["Vue"],t):"object"===typeof exports?exports["WfDesign"]=t(require("Vue")):e["WfDesign"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__8bbf__){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="5069")}({"0066":function(e,t,n){"use strict";var i=n("e244"),o=n("d6ed"),r=n("58d1"),s=n("c673"),a=n("609f"),l=n("a53d"),c=n("fc4e"),h=n("7c08"),u=n("acd4"),d=n("c61c"),p=n("6023"),f=i.Array;e.exports=function(e){var t=s(e),n=c(this),i=arguments.length,g=i>1?arguments[1]:void 0,m=void 0!==g;m&&(g=o(g,i>2?arguments[2]:void 0));var b,v,y,w,_,C,A=p(t),E=0;if(!A||this==f&&l(A))for(b=h(t),v=n?new this(b):f(b);b>E;E++)C=m?g(t[E],E):t[E],u(v,E,C);else for(w=d(t,A),_=w.next,v=n?new this:[];!(y=r(_,w)).done;E++)C=m?a(w,g,[y.value,E],!0):y.value,u(v,E,C);return v.length=E,v}},"006c":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-progress-container{width:100%;height:5px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:5px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{-webkit-animation-name:progress;animation-name:progress;-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear;transform:translateZ(0)}@-webkit-keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}@keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}",""]),e.exports=t},"00ad":function(e,t,n){var i=n("61b6");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("8966e390",i,!0,{sourceMap:!1,shadowMode:!1})},"02de":function(e,t,n){"use strict";var i=n("83ec"),o=n("55ab"),r=n("e244"),s=n("6f9e"),a=n("0b05"),l=n("9564"),c=n("81e5"),h=n("04c3"),u=n("b896").f,d=n("8c42"),p=r.Symbol,f=p&&p.prototype;if(o&&l(p)&&(!("description"in f)||void 0!==p().description)){var g={},m=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:h(arguments[0]),t=c(f,this)?new p(e):void 0===e?p():p(e);return""===e&&(g[t]=!0),t};d(m,p),m.prototype=f,f.constructor=m;var b="Symbol(test)"==String(p("test")),v=s(f.toString),y=s(f.valueOf),w=/^Symbol\((.*)\)[^)]+$/,_=s("".replace),C=s("".slice);u(f,"description",{configurable:!0,get:function(){var e=y(this),t=v(e);if(a(g,e))return"";var n=b?C(t,7,-1):_(t,w,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:m})}},"030e":function(e,t,n){var i=n("ac97"),o=n("e244"),r=o.RegExp,s=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=s||i((function(){return!r("a","y").sticky})),l=s||i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:l,MISSED_STICKY:a,UNSUPPORTED_Y:s}},"0317":function(e,t,n){"use strict";var i=n("4580"),o=i.CONSUME_TOKEN_EVENT,r=i.GENERATE_TOKEN_EVENT;function s(e,t,n){this._eventBus=e,this._animation=t,this._elementRegistry=n}s.prototype.consume=function(e){var t=e.element;if(!t.sequenceFlow)throw new Error("no sequence flow configured for element "+t.id);this._eventBus.fire(r,e)},s.prototype.generate=function(e){var t=e.element,n=e.processInstanceId;if(!t.sequenceFlow)throw new Error("no sequence flow configured for element "+t.id);var i=this,r=this._elementRegistry.get(t.sequenceFlow.id);this._animation.createAnimation(r,n,(function(){i._eventBus.fire(o,{element:r.target,processInstanceId:n})}))},s.$inject=["eventBus","animation","elementRegistry"],e.exports=s},"03ad":function(e){e.exports=JSON.parse('{"name":"Flowable","uri":"http://flowable.org/bpmn","prefix":"flowable","xml":{"tagAlias":"lowerCase"},"associations":[],"types":[{"name":"Definitions","isAbstract":true,"extends":["bpmn:Definitions"],"properties":[{"name":"diagramRelationId","isAttr":true,"type":"String"}]},{"name":"InOutBinding","superClass":["Element"],"isAbstract":true,"properties":[{"name":"source","isAttr":true,"type":"String"},{"name":"sourceExpression","isAttr":true,"type":"String"},{"name":"target","isAttr":true,"type":"String"},{"name":"businessKey","isAttr":true,"type":"String"},{"name":"local","isAttr":true,"type":"Boolean","default":false},{"name":"variables","isAttr":true,"type":"String"}]},{"name":"In","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"Out","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"AsyncCapable","isAbstract":true,"extends":["bpmn:Activity","bpmn:Gateway","bpmn:Event"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false},{"name":"asyncBefore","isAttr":true,"type":"Boolean","default":false},{"name":"asyncAfter","isAttr":true,"type":"Boolean","default":false},{"name":"exclusive","isAttr":true,"type":"Boolean","default":true}]},{"name":"JobPriorized","isAbstract":true,"extends":["bpmn:Process","flowable:AsyncCapable"],"properties":[{"name":"jobPriority","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinition","isAbstract":true,"extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false}]},{"name":"ErrorEventDefinition","isAbstract":true,"extends":["bpmn:ErrorEventDefinition"],"properties":[{"name":"errorCodeVariable","isAttr":true,"type":"String"},{"name":"errorMessageVariable","isAttr":true,"type":"String"}]},{"name":"Error","isAbstract":true,"extends":["bpmn:Error"],"properties":[{"name":"flowable:errorMessage","isAttr":true,"type":"String"}]},{"name":"PotentialStarter","superClass":["Element"],"properties":[{"name":"resourceAssignmentExpression","type":"bpmn:ResourceAssignmentExpression"}]},{"name":"FormSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"formHandlerClass","isAttr":true,"type":"String"},{"name":"formKey","isAttr":true,"type":"String"},{"name":"formType","isAttr":true,"type":"String"},{"name":"formReadOnly","isAttr":true,"type":"String"},{"name":"indepFormKey","isAttr":true,"type":"String"},{"name":"indepFormSummary","isAttr":true,"type":"String"},{"name":"exFormKey","isAttr":true,"type":"String"},{"name":"exFormUrl","isAttr":true,"type":"String"},{"name":"exAppFormUrl","isAttr":true,"type":"String"},{"name":"backToRejecter","isAttr":true,"type":"String"}]},{"name":"TemplateSupported","isAbstract":true,"extends":["bpmn:Process","bpmn:FlowElement"],"properties":[{"name":"modelerTemplate","isAttr":true,"type":"String"}]},{"name":"Initiator","isAbstract":true,"extends":["bpmn:StartEvent"],"properties":[{"name":"initiator","isAttr":true,"type":"String"}]},{"name":"ScriptTask","isAbstract":true,"extends":["bpmn:ScriptTask"],"properties":[{"name":"resultVariable","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Process","isAbstract":true,"extends":["bpmn:Process"],"properties":[{"name":"skipFirstNode","isAttr":true,"type":"Boolean"},{"name":"rollbackNode","isAttr":true,"type":"String"},{"name":"candidateStarterGroups","isAttr":true,"type":"String"},{"name":"candidateStarterUsers","isAttr":true,"type":"String"},{"name":"versionTag","isAttr":true,"type":"String"},{"name":"historyTimeToLive","isAttr":true,"type":"String"},{"name":"isStartableInTasklist","isAttr":true,"type":"Boolean","default":true},{"name":"executionListener","isAbstract":true,"type":"Expression"}]},{"name":"EscalationEventDefinition","isAbstract":true,"extends":["bpmn:EscalationEventDefinition"],"properties":[{"name":"escalationCodeVariable","isAttr":true,"type":"String"}]},{"name":"FormalExpression","isAbstract":true,"extends":["bpmn:FormalExpression"],"properties":[{"name":"resource","isAttr":true,"type":"String"}]},{"name":"multiinstance_type","superClass":["Element"]},{"name":"multiinstance_condition","superClass":["Element"]},{"name":"Assignable","extends":["bpmn:UserTask"],"properties":[{"name":"assignee","isAttr":true,"type":"String"},{"name":"candidateUsers","isAttr":true,"type":"String"},{"name":"candidateGroups","isAttr":true,"type":"String"},{"name":"dueDate","isAttr":true,"type":"String"},{"name":"followUpDate","isAttr":true,"type":"String"},{"name":"priority","isAttr":true,"type":"String"},{"name":"multiinstance_condition","isAttr":true,"type":"String"},{"name":"rollbackNode","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"calledElementBinding","isAttr":true,"type":"String","default":"latest"},{"name":"calledElementVersion","isAttr":true,"type":"String"},{"name":"calledElementVersionTag","isAttr":true,"type":"String"},{"name":"calledElementTenantId","isAttr":true,"type":"String"},{"name":"caseRef","isAttr":true,"type":"String"},{"name":"caseBinding","isAttr":true,"type":"String","default":"latest"},{"name":"caseVersion","isAttr":true,"type":"String"},{"name":"caseTenantId","isAttr":true,"type":"String"},{"name":"variableMappingClass","isAttr":true,"type":"String"},{"name":"variableMappingDelegateExpression","isAttr":true,"type":"String"},{"name":"calledElementType","isAttr":true,"type":"String"},{"name":"inheritVariables","isAttr":true,"type":"String"},{"name":"sameDeployment","isAttr":true,"type":"String"}]},{"name":"ServiceTaskLike","extends":["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"resultVariable","isAttr":true,"type":"String"}]},{"name":"DmnCapable","extends":["bpmn:BusinessRuleTask"],"properties":[{"name":"decisionRef","isAttr":true,"type":"String"},{"name":"decisionRefBinding","isAttr":true,"type":"String","default":"latest"},{"name":"decisionRefVersion","isAttr":true,"type":"String"},{"name":"mapDecisionResult","isAttr":true,"type":"String","default":"resultList"},{"name":"decisionRefTenantId","isAttr":true,"type":"String"}]},{"name":"ExternalCapable","extends":["flowable:ServiceTaskLike"],"properties":[{"name":"type","isAttr":true,"type":"String"},{"name":"topic","isAttr":true,"type":"String"}]},{"name":"TaskPriorized","extends":["bpmn:Process","flowable:ExternalCapable"],"properties":[{"name":"taskPriority","isAttr":true,"type":"String"}]},{"name":"Properties","superClass":["Element"],"meta":{"allowedIn":["*"]},"properties":[{"name":"values","type":"Property","isMany":true}]},{"name":"Property","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true}]},{"name":"Connector","superClass":["Element"],"meta":{"allowedIn":["flowable:ServiceTaskLike"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"}]},{"name":"InputOutput","superClass":["Element"],"meta":{"allowedIn":["bpmn:FlowNode","flowable:Connector"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"},{"name":"inputParameters","isMany":true,"type":"InputParameter"},{"name":"outputParameters","isMany":true,"type":"OutputParameter"}]},{"name":"InputOutputParameter","properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"InputOutputParameterDefinition","isAbstract":true},{"name":"List","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"items","isMany":true,"type":"InputOutputParameterDefinition"}]},{"name":"Map","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"entries","isMany":true,"type":"Entry"}]},{"name":"Entry","properties":[{"name":"key","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"Value","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Script","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"scriptFormat","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Field","superClass":["Element"],"meta":{"allowedIn":["flowable:ServiceTaskLike","flowable:ExecutionListener","flowable:TaskListener"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"expression","type":"String"},{"name":"stringValue","isAttr":true,"type":"String"},{"name":"string","type":"String"}]},{"name":"InputParameter","superClass":["InputOutputParameter"]},{"name":"OutputParameter","superClass":["InputOutputParameter"]},{"name":"Collectable","isAbstract":true,"extends":["bpmn:MultiInstanceLoopCharacteristics"],"superClass":["flowable:AsyncCapable"],"properties":[{"name":"collection","isAttr":true,"type":"String"},{"name":"elementVariable","isAttr":true,"type":"String"}]},{"name":"FailedJobRetryTimeCycle","superClass":["Element"],"meta":{"allowedIn":["flowable:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},"properties":[{"name":"body","isBody":true,"type":"String"}]},{"name":"ExecutionListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"TaskListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"FormProperty","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"required","type":"String","isAttr":true},{"name":"readable","type":"String","isAttr":true},{"name":"writable","type":"String","isAttr":true},{"name":"variable","type":"String","isAttr":true},{"name":"expression","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"default","type":"String","isAttr":true},{"name":"values","type":"Value","isMany":true}]},{"name":"Button","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"label","type":"String","isAttr":true},{"name":"prop","type":"String","isAttr":true},{"name":"display","type":"String","isAttr":true}]},{"name":"FormData","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"fields","type":"FormField","isMany":true},{"name":"businessKey","type":"String","isAttr":true}]},{"name":"FormField","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"label","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"defaultValue","type":"String","isAttr":true},{"name":"properties","type":"Properties"},{"name":"validation","type":"Validation"},{"name":"values","type":"Value","isMany":true}]},{"name":"Validation","superClass":["Element"],"properties":[{"name":"constraints","type":"Constraint","isMany":true}]},{"name":"Constraint","superClass":["Element"],"properties":[{"name":"name","type":"String","isAttr":true},{"name":"config","type":"String","isAttr":true}]},{"name":"ConditionalEventDefinition","isAbstract":true,"extends":["bpmn:ConditionalEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"},{"name":"variableEvent","isAttr":true,"type":"String"}]},{"name":"Serial","superClass":["Element"],"meta":{"allowedIn":["bpmn:Process"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"prefix","isAttr":true,"type":"String"},{"name":"dateFormat","isAttr":true,"type":"String"},{"name":"suffixLength","isAttr":true,"type":"Number"},{"name":"startSequence","isAttr":true,"type":"Number"},{"name":"connector","isAttr":true,"type":"String"},{"name":"cycle","isAttr":true,"type":"String"}]},{"name":"Assignee","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"type","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true},{"name":"text","type":"String","isAttr":true}]},{"name":"HideCopy","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true}]},{"name":"HideExamine","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true}]},{"name":"HideAttachment","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true}]},{"name":"ExFormKey","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true}]},{"name":"ExFormUrl","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true}]},{"name":"ExAppFormUrl","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true}]},{"name":"IndepFormKey","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true}]},{"name":"CopyUser","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask","bpmn:StartEvent"]},"properties":[{"name":"value","type":"String","isAttr":true},{"name":"text","type":"String","isAttr":true}]},{"name":"ExamineSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"hideCopy","isAttr":true,"type":"String"},{"name":"hideExamine","isAttr":true,"type":"String"},{"name":"hideAttachment","isAttr":true,"type":"String"}]}],"emumerations":[]}')},"04c3":function(e,t,n){var i=n("e244"),o=n("d53b"),r=i.String;e.exports=function(e){if("Symbol"===o(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},"0556":function(e,t,n){var i=n("4e70");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("da24a924",i,!0,{sourceMap:!1,shadowMode:!1})},"061d":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-aria-container{position:absolute;left:-999em}",""]),e.exports=t},"0678":function(e,t,n){var i=n("061d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("c963882a",i,!0,{sourceMap:!1,shadowMode:!1})},"085b":function(e,t,n){"use strict";var i=n("55ab"),o=n("e244"),r=n("6f9e"),s=n("a056"),a=n("7d86"),l=n("0b05"),c=n("ca23"),h=n("81e5"),u=n("0b38"),d=n("7f82"),p=n("ac97"),f=n("f0f1").f,g=n("42b1").f,m=n("b896").f,b=n("b1ef"),v=n("3395").trim,y="Number",w=o[y],_=w.prototype,C=o.TypeError,A=r("".slice),E=r("".charCodeAt),x=function(e){var t=d(e,"number");return"bigint"==typeof t?t:S(t)},S=function(e){var t,n,i,o,r,s,a,l,c=d(e,"number");if(u(c))throw C("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=v(c),t=E(c,0),43===t||45===t){if(n=E(c,2),88===n||120===n)return NaN}else if(48===t){switch(E(c,1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+c}for(r=A(c,2),s=r.length,a=0;a<s;a++)if(l=E(r,a),l<48||l>o)return NaN;return parseInt(r,i)}return+c};if(s(y,!w(" 0o1")||!w("0b1")||w("+0x1"))){for(var k,D=function(e){var t=arguments.length<1?0:w(x(e)),n=this;return h(_,n)&&p((function(){b(n)}))?c(Object(t),n,D):t},L=i?f(w):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),I=0;L.length>I;I++)l(w,k=L[I])&&!l(D,k)&&m(D,k,g(w,k));D.prototype=_,_.constructor=D,a(o,y,D)}},"0874":function(e,t,n){var i=n("e244"),o=i.TypeError;e.exports=function(e){if(void 0==e)throw o("Can't call method on "+e);return e}},"0b05":function(e,t,n){var i=n("6f9e"),o=n("c673"),r=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(o(e),t)}},"0b38":function(e,t,n){var i=n("e244"),o=n("6043"),r=n("9564"),s=n("81e5"),a=n("bd77"),l=i.Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return r(t)&&s(t.prototype,l(e))}},"0c5e":function(e,t,n){"use strict";var i=function(e){return o(e)&&!r(e)};function o(e){return!!e&&"object"===typeof e}function r(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||l(e)}var s="function"===typeof Symbol&&Symbol.for,a=s?Symbol.for("react.element"):60103;function l(e){return e.$$typeof===a}function c(e){return Array.isArray(e)?[]:{}}function h(e,t){return!1!==t.clone&&t.isMergeableObject(e)?v(c(e),e,t):e}function u(e,t,n){return e.concat(t).map((function(e){return h(e,n)}))}function d(e,t){if(!t.customMerge)return v;var n=t.customMerge(e);return"function"===typeof n?n:v}function p(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}function f(e){return Object.keys(e).concat(p(e))}function g(e,t){try{return t in e}catch(n){return!1}}function m(e,t){return g(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function b(e,t,n){var i={};return n.isMergeableObject(e)&&f(e).forEach((function(t){i[t]=h(e[t],n)})),f(t).forEach((function(o){m(e,o)||(g(e,o)&&n.isMergeableObject(t[o])?i[o]=d(o,n)(e[o],t[o],n):i[o]=h(t[o],n))})),i}function v(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||u,n.isMergeableObject=n.isMergeableObject||i,n.cloneUnlessOtherwiseSpecified=h;var o=Array.isArray(t),r=Array.isArray(e),s=o===r;return s?o?n.arrayMerge(e,t,n):b(e,t,n):h(t,n)}v.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return v(e,n,t)}),{})};var y=v;e.exports=y},"0da4":function(e,t,n){"use strict";var i=n("6965"),o=n("d53b");e.exports=i?{}.toString:function(){return"[object "+o(this)+"]"}},"0df9":function(e,t,n){var i=n("e244"),o=n("7439"),r=i.TypeError;e.exports=function(e){if(o(e))throw r("The method doesn't accept regular expressions");return e}},"0ef1":function(e,t){t.f=Object.getOwnPropertySymbols},"10b1":function(e,t,n){var i=n("53c2"),o=n("a0c9"),r=n("1eca");t=i(!1);var s=o(r);t.push([e.i,"@font-face{font-family:codicon;font-display:block;src:url("+s+') format("truetype")}.codicon[class*=codicon-]{font:normal normal normal 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}',""]),e.exports=t},"10ef":function(e,t,n){e.exports=n("db90")},1115:function(e,t,n){"use strict";n("00ad")},"11b0":function(e,t,n){"use strict";var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!i.call({1:2},1);t.f=r?function(e){var t=o(this,e);return!!t&&t.enumerable}:i},"11cb":function(e,t,n){var i=n("9d6f");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("33471020",i,!0,{sourceMap:!1,shadowMode:!1})},"11e2":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .lines-content .cdr{position:absolute}",""]),e.exports=t},"139d":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}",""]),e.exports=t},"13a8":function(e,t,n){var i=n("6f9e"),o=n("fbcf"),r=n("2cdc");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=i(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),t=n instanceof Array}catch(s){}return function(n,i){return o(n),r(i),t?e(n,i):n.__proto__=i,n}}():void 0)},"154c":function(e,t,n){var i=n("4cdd");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("03a6d95f",i,!0,{sourceMap:!1,shadowMode:!1})},"15b2":function(e,t,n){"use strict";var i,o,r,s=n("ac97"),a=n("9564"),l=n("ca2b"),c=n("a7f7"),h=n("7d86"),u=n("1810"),d=n("f0db"),p=u("iterator"),f=!1;[].keys&&(r=[].keys(),"next"in r?(o=c(c(r)),o!==Object.prototype&&(i=o)):f=!0);var g=void 0==i||s((function(){var e={};return i[p].call(e)!==e}));g?i={}:d&&(i=l(i)),a(i[p])||h(i,p,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},"164d":function(e,t,n){"use strict";var i=n("4580"),o=i.TOGGLE_MODE_EVENT,r=1e4;function s(e,t){var n=t.get("editorActions",!1),i=t.get("keyboard",!1);if(i&&n){var s=!1;e.on("keyboard.init",(function(){i.addListener(r,(function(e){var t=e.keyEvent;l(t)}))})),e.on(o,(function(e){var t=e.simulationModeActive;s=!!t}))}function l(e){return a(["t","T"],e)?(n.trigger("toggleTokenSimulation"),!0):s?a(["l","L"],e)?(n.trigger("toggleTokenSimulationLog"),!0):a([" ","Spacebar"],e)?(n.trigger("togglePauseTokenSimulation"),!0):a(["r","R"],e)?(n.trigger("resetTokenSimulation"),!0):void 0:void 0}}function a(e,t){return e.indexOf(t.key)>-1}s.$inject=["eventBus","injector"],e.exports=s},"17be":function(e,t,n){var i=n("e244"),o=n("9564"),r=n("9550"),s=i.WeakMap;e.exports=o(s)&&/native code/.test(r(s))},"17d4":function(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read=function(e,t,n,i,o){var r,s,a=8*o-i-1,l=(1<<a)-1,c=l>>1,h=-7,u=n?o-1:0,d=n?-1:1,p=e[t+u];for(u+=d,r=p&(1<<-h)-1,p>>=-h,h+=a;h>0;r=256*r+e[t+u],u+=d,h-=8);for(s=r&(1<<-h)-1,r>>=-h,h+=i;h>0;s=256*s+e[t+u],u+=d,h-=8);if(0===r)r=1-c;else{if(r===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),r-=c}return(p?-1:1)*s*Math.pow(2,r-i)},t.write=function(e,t,n,i,o,r){var s,a,l,c=8*r-o-1,h=(1<<c)-1,u=h>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:r-1,f=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+u>=1?d/l:d*Math.pow(2,1-u),t*l>=2&&(s++,l/=2),s+u>=h?(a=0,s=h):s+u>=1?(a=(t*l-1)*Math.pow(2,o),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=f,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*g}},1810:function(e,t,n){var i=n("e244"),o=n("986e"),r=n("0b05"),s=n("76b2"),a=n("8fed"),l=n("bd77"),c=o("wks"),h=i.Symbol,u=h&&h["for"],d=l?h:h&&h.withoutSetter||s;e.exports=function(e){if(!r(c,e)||!a&&"string"!=typeof c[e]){var t="Symbol."+e;a&&r(h,e)?c[e]=h[e]:c[e]=l&&u?u(t):d(t)}return c[e]}},1854:function(e,t,n){e.exports=n.p+"fonts/fontawesome-webfont.674f50d2.eot"},1969:function(e,t,n){"use strict";n("f96e");var i=n("7299"),o=i.domify,r=i.classes,s=i.event,a=i.query,l=n("4580"),c=l.TOGGLE_MODE_EVENT;function h(e,t,n,i){var o=this;this._canvas=e,this._animation=t,this._eventBus=n,this._translate=i,this._init(),n.on(c,(function(e){var t=e.simulationModeActive;t?r(o.container).remove("hidden"):r(o.container).add("hidden")}))}h.prototype._init=function(){var e=this;this.container=o('<div class="set-animation-speed hidden">'+'<i title="'.concat(this._translate("Set Animation Speed"),'" class="fa fa-tachometer" aria-hidden="true"></i>')+'<div class="animation-speed-buttons">'+'<div title="'.concat(this._translate("Slow"),'" id="animation-speed-1" class="animation-speed-button"><i class="fa fa-angle-right" aria-hidden="true"></i></div>')+'<div title="'.concat(this._translate("Normal"),'" id="animation-speed-2" class="animation-speed-button active"><i class="fa fa-angle-right" aria-hidden="true"></i><i class="fa fa-angle-right" aria-hidden="true"></i></div>')+'<div title="'.concat(this._translate("Fast"),'" id="animation-speed-3" class="animation-speed-button"><i class="fa fa-angle-right" aria-hidden="true"></i><i class="fa fa-angle-right" aria-hidden="true"></i><i class="fa fa-angle-right" aria-hidden="true"></i></div>')+"</div></div>");var t=a("#animation-speed-1",this.container),n=a("#animation-speed-2",this.container),i=a("#animation-speed-3",this.container);s.bind(t,"click",(function(){e.setActive(t),e._animation.setAnimationSpeed(.5)})),s.bind(n,"click",(function(){e.setActive(n),e._animation.setAnimationSpeed(1)})),s.bind(i,"click",(function(){e.setActive(i),e._animation.setAnimationSpeed(1.5)})),this._canvas.getContainer().appendChild(this.container)},h.prototype.setActive=function(e){a.all(".animation-speed-button",this.container).forEach((function(e){r(e).remove("active")})),r(e).add("active")},h.$inject=["canvas","animation","eventBus","translate"],e.exports=h},"1a37":function(e,t,n){var i=n("6120");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("a7cf33a8",i,!0,{sourceMap:!1,shadowMode:!1})},"1a7b":function(e,t,n){var i=n("e248");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("9c9f48d4",i,!0,{sourceMap:!1,shadowMode:!1})},"1ac3":function(e,t,n){e.exports=n("522e")},"1cb4":function(e,t,n){"use strict";(function(e,i){var o;n.d(t,"b",(function(){return b})),n.d(t,"i",(function(){return _})),n.d(t,"f",(function(){return C})),n.d(t,"d",(function(){return A})),n.d(t,"g",(function(){return E})),n.d(t,"h",(function(){return x})),n.d(t,"c",(function(){return S})),n.d(t,"k",(function(){return k})),n.d(t,"j",(function(){return D})),n.d(t,"a",(function(){return L})),n.d(t,"e",(function(){return M}));const r="en";let s=!1,a=!1,l=!1,c=!1,h=!1,u=!1,d=!1,p=void 0,f=r,g=void 0,m=void 0;const b="object"===typeof self?self:"object"===typeof e?e:{};let v=void 0;"undefined"!==typeof b.vscode&&"undefined"!==typeof b.vscode.process?v=b.vscode.process:"undefined"!==typeof i&&(v=i);const y="string"===typeof(null===(o=null===v||void 0===v?void 0:v.versions)||void 0===o?void 0:o.electron)&&"renderer"===v.type;if("object"!==typeof navigator||y){if("object"===typeof v){s="win32"===v.platform,a="darwin"===v.platform,l="linux"===v.platform,c=l&&!!v.env["SNAP"]&&!!v.env["SNAP_REVISION"],p=r,f=r;const e=v.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];p=t.locale,f=n||r,g=t._translationsConfigFile}catch(B){}h=!0}}else m=navigator.userAgent,s=m.indexOf("Windows")>=0,a=m.indexOf("Macintosh")>=0,d=(m.indexOf("Macintosh")>=0||m.indexOf("iPad")>=0||m.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,l=m.indexOf("Linux")>=0,u=!0,p=navigator.language,f=p;let w=0;a?w=1:s?w=3:l&&(w=2);const _=s,C=a,A=l,E=h,x=u,S=d,k=m,D=function(){if(b.setImmediate)return b.setImmediate.bind(b);if("function"===typeof b.postMessage&&!b.importScripts){let e=[];b.addEventListener("message",t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let n=0,i=e.length;n<i;n++){const i=e[n];if(i.id===t.data.vscodeSetImmediateId)return e.splice(n,1),void i.callback()}});let t=0;return n=>{const i=++t;e.push({id:i,callback:n}),b.postMessage({vscodeSetImmediateId:i},"*")}}if("function"===typeof(null===v||void 0===v?void 0:v.nextTick))return v.nextTick.bind(v);const e=Promise.resolve();return t=>e.then(t)}(),L=a||d?2:s?1:3;let I=!0,N=!1;function M(){if(!N){N=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);I=513===t[0]}return I}}).call(this,n("c8ed"),n("2552"))},"1d2f":function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},"1eca":function(e,t,n){e.exports=n.p+"fonts/codicon.888f9cc0.ttf"},"1f19":function(e,t,n){e.exports=n("5821")},"1f2d":function(e,t,n){var i=n("6cd1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("8f81f0b2",i,!0,{sourceMap:!1,shadowMode:!1})},"1ffd":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,86.7%,.4);border:1px solid hsla(0,0%,80%,.4);border-bottom-color:hsla(0,0%,73.3%,.4);box-shadow:inset 0 -1px 0 hsla(0,0%,73.3%,.4);color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:1px solid #6fc3df;box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,50.2%,.17);border:1px solid rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);box-shadow:inset 0 -1px 0 rgba(68,68,68,.6);color:#ccc}",""]),e.exports=t},2273:function(e,t,n){var i=n("6043");e.exports=i("navigator","userAgent")||""},2530:function(e,t,n){var i=n("ac97"),o=n("e244"),r=o.RegExp;e.exports=i((function(){var e=r("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},2552:function(e,t,n){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,i="/";t.cwd=function(){return i},t.chdir=function(t){e||(e=n("e3f4")),i=e.resolve(t,i)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"26c4":function(e,t,n){"use strict";var i=n("83ec"),o=n("6f9e"),r=n("0df9"),s=n("0874"),a=n("04c3"),l=n("9508"),c=o("".indexOf);i({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~c(a(s(this)),a(r(e)),arguments.length>1?arguments[1]:void 0)}})},2717:function(e,t,n){var i,o,r;(function(n,s){o=[],i=s,r="function"===typeof i?i.apply(t,o):i,void 0===r||(e.exports=r)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,i,o,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,a=r.exec(p.stack)||s.exec(p.stack),l=a&&a[1]||!1,c=a&&a[2]||!1,h=document.location.href.replace(document.location.hash,""),u=document.getElementsByTagName("script");l===h&&(n=document.documentElement.outerHTML,i=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(i,"$1").trim());for(var d=0;d<u.length;d++){if("interactive"===u[d].readyState)return u[d];if(u[d].src===l)return u[d];if(l===h&&u[d].innerHTML&&u[d].innerHTML.trim()===o)return u[d]}return null}}return e}))},2843:function(e,t,n){"use strict";n("f96e"),n("70a5");var i=n("7299"),o=i.domify,r=i.event,s=n("fbdf").is,a=n("4580"),l=a.GENERATE_TOKEN_EVENT;function c(e,t,n){this._eventBus=e,this._elementRegistry=t,this._animation=n}c.prototype.createContextPads=function(e){var t=!1;if(this._elementRegistry.forEach((function(e){e.tokenCount&&Object.values(e.tokenCount).forEach((function(e){e&&(t=!0)}))})),!(s(e.parent,"bpmn:SubProcess")||t||this._animation.animations.length)){var n=this,i=o('<div class="context-pad"><i class="fa fa-play"></i></div>');return r.bind(i,"click",(function(){n._eventBus.fire(l,{element:e})})),[{element:e,html:i}]}},c.$inject=["eventBus","elementRegistry","animation"],e.exports=c},"286b":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".wf-dialog{display:flex;flex-direction:column;margin:0!important;position:absolute;top:40%;left:50%;transform:translate(-50%,-40%);max-height:calc(100% - 30px);max-width:calc(100% - 30px)}.wf-dialog .el-dialog__body{flex:1;overflow:auto}.wf-dialog .el-select{width:100%}",""]),e.exports=t},2875:function(e,t,n){"use strict";function i(e,t,n,i){var o=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,o,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var r=this.indexOf(e);if("undefined"===typeof n){if(-1!==r)return;n=this.length}-1!==r&&this.splice(r,1),this.splice(n,0,e),-1===r&&t.set(e,o,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function o(e){return!0===e.__refs_collection}e.exports.extend=i,e.exports.isExtended=o},"294d":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}",""]),e.exports=t},"2a35":function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf").is,o=n("4580"),r=o.CONSUME_TOKEN_EVENT,s=o.GENERATE_TOKEN_EVENT,a=o.UPDATE_ELEMENT_EVENT;function l(e,t,n){this._animation=e,this._eventBus=t,this._log=n}l.prototype.consume=function(e){var t=e.element,n=e.processInstanceId,o=t.children.filter((function(e){return i(e,"bpmn:StartEvent")}))[0];o?(this._log.log("Starting Subprocess","info","fa-sign-in"),this._eventBus.fire(s,{element:o,parentProcessInstanceId:n})):(this._log.log("Skipping Subprocess","info","fa-angle-double-right"),this._eventBus.fire(s,e)),this._eventBus.fire(a,{element:t})},l.prototype.generate=function(e){var t=this,n=e.element,o=e.processInstanceId,s=n.outgoing.filter((function(e){return i(e,"bpmn:SequenceFlow")}));s.forEach((function(e){t._animation.createAnimation(e,o,(function(){t._eventBus.fire(r,{element:e.target,processInstanceId:o})}))})),this._eventBus.fire(a,{element:n})},l.$inject=["animation","eventBus","log"],e.exports=l},"2ab6":function(e,t,n){e.exports={__init__:["animation","contextPads","elementNotifications","elementSupport","exclusiveGatewaySettings","log","notifications","pauseSimulation","preserveElementColors","processInstanceIds","processInstanceSettings","processInstances","resetSimulation","setAnimationSpeed","showProcessInstance","simulationState","toggleMode","tokenCount","tokenSimulationBehavior","tokenSimulationPalette"],animation:["type",n("ffc8")],contextPads:["type",n("5f19")],elementNotifications:["type",n("1ac3")],elementSupport:["type",n("fc78")],exclusiveGatewaySettings:["type",n("9ce1")],log:["type",n("5e04")],notifications:["type",n("ba1b")],pauseSimulation:["type",n("97d5")],preserveElementColors:["type",n("10ef")],processInstanceIds:["type",n("1f19")],processInstanceSettings:["type",n("9692")],processInstances:["type",n("de49")],resetSimulation:["type",n("ae9d")],setAnimationSpeed:["type",n("f086")],showProcessInstance:["type",n("c25e")],simulationState:["type",n("977a")],toggleMode:["type",n("5ed7")],tokenCount:["type",n("f31a")],tokenSimulationBehavior:["type",n("ccd9")],tokenSimulationPalette:["type",n("778b")]}},"2adc":function(e,t,n){var i=n("006c");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("57511c5a",i,!0,{sourceMap:!1,shadowMode:!1})},"2ae8":function(e,t,n){var i=n("e244"),o=n("3352"),r=n("7c08"),s=n("acd4"),a=i.Array,l=Math.max;e.exports=function(e,t,n){for(var i=r(e),c=o(t,i),h=o(void 0===n?i:n,i),u=a(l(h-c,0)),d=0;c<h;c++,d++)s(u,d,e[c]);return u.length=d,u}},"2b9c":function(e,t,n){"use strict";var i=n("83ec"),o=n("6f9e"),r=n("42b1").f,s=n("ce47"),a=n("04c3"),l=n("0df9"),c=n("0874"),h=n("9508"),u=n("f0db"),d=o("".startsWith),p=o("".slice),f=Math.min,g=h("startsWith"),m=!u&&!g&&!!function(){var e=r(String.prototype,"startsWith");return e&&!e.writable}();i({target:"String",proto:!0,forced:!m&&!g},{startsWith:function(e){var t=a(c(this));l(e);var n=s(f(arguments.length>1?arguments[1]:void 0,t.length)),i=a(e);return d?d(t,i,n):p(t,n,n+i.length)===i}})},"2c21":function(e,t,n){var i,o,r=n("e244"),s=n("2273"),a=r.process,l=r.Deno,c=a&&a.versions||l&&l.version,h=c&&c.v8;h&&(i=h.split("."),o=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&s&&(i=s.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/),i&&(o=+i[1]))),e.exports=o},"2c45":function(e,t,n){e.exports={__init__:["animation","contextPads","disableModeling","elementNotifications","elementSupport","exclusiveGatewaySettings","log","notifications","pauseSimulation","preserveElementColors","processInstanceIds","processInstanceSettings","processInstances","resetSimulation","setAnimationSpeed","showProcessInstance","simulationState","toggleMode","tokenCount","tokenSimulationBehavior","tokenSimulationEditorActions","tokenSimulationKeyboardBindings","tokenSimulationPalette"],animation:["type",n("ffc8")],contextPads:["type",n("5f19")],disableModeling:["type",n("37c0")],elementNotifications:["type",n("1ac3")],elementSupport:["type",n("fc78")],exclusiveGatewaySettings:["type",n("9ce1")],log:["type",n("5e04")],notifications:["type",n("ba1b")],pauseSimulation:["type",n("97d5")],preserveElementColors:["type",n("10ef")],processInstanceIds:["type",n("1f19")],processInstanceSettings:["type",n("9692")],processInstances:["type",n("de49")],resetSimulation:["type",n("ae9d")],setAnimationSpeed:["type",n("f086")],showProcessInstance:["type",n("c25e")],simulationState:["type",n("977a")],toggleMode:["type",n("51739")],tokenCount:["type",n("f31a")],tokenSimulationBehavior:["type",n("ccd9")],tokenSimulationEditorActions:["type",n("8e1c")],tokenSimulationKeyboardBindings:["type",n("eaa1")],tokenSimulationPalette:["type",n("778b")]}},"2c50":function(e,t,n){"use strict";var i=n("83ec"),o=n("6f9e"),r=n("b4fd"),s=n("45ad"),a=n("3d1a"),l=o([].join),c=r!=Object,h=a("join",",");i({target:"Array",proto:!0,forced:c||!h},{join:function(e){return l(s(this),void 0===e?",":e)}})},"2c69":function(e,t,n){var i=n("83ec"),o=n("55ab"),r=n("c1ca"),s=n("45ad"),a=n("42b1"),l=n("acd4");i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){var t,n,i=s(e),o=a.f,c=r(i),h={},u=0;while(c.length>u)n=o(i,t=c[u++]),void 0!==n&&l(h,t,n);return h}})},"2cdc":function(e,t,n){var i=n("e244"),o=n("9564"),r=i.String,s=i.TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw s("Can't set "+r(e)+" as a prototype")}},"2eb0":function(e,t,n){"use strict";var i=n("83ec"),o=n("6e1d");i({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},"2f62":function(e,t,n){"use strict";var i=n("83ec"),o=n("f226").includes,r=n("6e10");i({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")},"2f6c":function(e,t,n){var i=n("e244"),o=n("72c7"),r="__core-js_shared__",s=i[r]||o(r,{});e.exports=s},3073:function(e,t,n){var i=n("fbcf"),o=n("eee7"),r=n("fc01");e.exports=function(e,t){if(i(e),o(t)&&t.constructor===e)return t;var n=r.f(e),s=n.resolve;return s(t),n.promise}},"312a":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}",""]),e.exports=t},"325d":function(e,t,n){"use strict";var i=n("83ec"),o=n("58d1"),r=n("f0db"),s=n("32a5"),a=n("9564"),l=n("e0e0"),c=n("a7f7"),h=n("13a8"),u=n("63ef"),d=n("69f1"),p=n("7d86"),f=n("1810"),g=n("d85b"),m=n("15b2"),b=s.PROPER,v=s.CONFIGURABLE,y=m.IteratorPrototype,w=m.BUGGY_SAFARI_ITERATORS,_=f("iterator"),C="keys",A="values",E="entries",x=function(){return this};e.exports=function(e,t,n,s,f,m,S){l(n,t,s);var k,D,L,I=function(e){if(e===f&&O)return O;if(!w&&e in B)return B[e];switch(e){case C:return function(){return new n(this,e)};case A:return function(){return new n(this,e)};case E:return function(){return new n(this,e)}}return function(){return new n(this)}},N=t+" Iterator",M=!1,B=e.prototype,T=B[_]||B["@@iterator"]||f&&B[f],O=!w&&T||I(f),R="Array"==t&&B.entries||T;if(R&&(k=c(R.call(new e)),k!==Object.prototype&&k.next&&(r||c(k)===y||(h?h(k,y):a(k[_])||p(k,_,x)),u(k,N,!0,!0),r&&(g[N]=x))),b&&f==A&&T&&T.name!==A&&(!r&&v?d(B,"name",A):(M=!0,O=function(){return o(T,this)})),f)if(D={values:I(A),keys:m?O:I(C),entries:I(E)},S)for(L in D)(w||M||!(L in B))&&p(B,L,D[L]);else i({target:t,proto:!0,forced:w||M},D);return r&&!S||B[_]===O||p(B,_,O,{name:f}),g[t]=O,D}},"32a5":function(e,t,n){var i=n("55ab"),o=n("0b05"),r=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=o(r,"name"),l=a&&"something"===function(){}.name,c=a&&(!i||i&&s(r,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},3352:function(e,t,n){var i=n("409e"),o=Math.max,r=Math.min;e.exports=function(e,t){var n=i(e);return n<0?o(n+t,0):r(n,t)}},3395:function(e,t,n){var i=n("6f9e"),o=n("0874"),r=n("04c3"),s=n("d554"),a=i("".replace),l="["+s+"]",c=RegExp("^"+l+l+"*"),h=RegExp(l+l+"*$"),u=function(e){return function(t){var n=r(o(t));return 1&e&&(n=a(n,c,"")),2&e&&(n=a(n,h,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},"339e":function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf").is,o=n("4580"),r=o.CONSUME_TOKEN_EVENT,s=o.UPDATE_ELEMENTS_EVENT;function a(e,t,n,i){this._animation=e,this._eventBus=t,this._elementRegistry=n,this._processInstances=i}a.prototype.consume=function(){},a.prototype.generate=function(e){var t=this,n=e.element,o=e.parentProcessInstanceId,a=n.outgoing.filter((function(e){return i(e,"bpmn:SequenceFlow")})),l=n.parent,c=this._processInstances.create(l,o);if(a.forEach((function(e){t._animation.createAnimation(e,c,(function(){t._eventBus.fire(r,{element:e.target,processInstanceId:c})}))})),!i(n.parent,"bpmn:SubProcess")){var h=this._elementRegistry.filter((function(e){return i(e,"bpmn:StartEvent")}));this._eventBus.fire(s,{elements:h})}},a.$inject=["animation","eventBus","elementRegistry","processInstances"],e.exports=a},3433:function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf"),o=i.is,r=n("4580"),s=r.CONSUME_TOKEN_EVENT,a=r.UPDATE_ELEMENT_EVENT;function l(e,t,n){this._animation=e,this._eventBus=t,this._elementRegistry=n}l.prototype.consume=function(e){var t=e.element,n=e.processInstanceId;t.tokenCount||(t.tokenCount={}),t.tokenCount[n]||(t.tokenCount[n]=0),t.tokenCount[n]++,this._eventBus.fire(a,{element:t})},l.prototype.generate=function(e){var t=this,n=e.element,i=e.processInstanceId,r=n.outgoing.filter((function(e){return o(e,"bpmn:SequenceFlow")}));r.forEach((function(e){t._animation.createAnimation(e,i,(function(){t._eventBus.fire(s,{element:e.target,processInstanceId:i})}))}))},l.$inject=["animation","eventBus","elementRegistry"],e.exports=l},"358f":function(e,t,n){var i=n("5124");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("1784dae1",i,!0,{sourceMap:!1,shadowMode:!1})},"35d6":function(e,t,n){var i,o,r,s=n("17be"),a=n("e244"),l=n("6f9e"),c=n("eee7"),h=n("69f1"),u=n("0b05"),d=n("2f6c"),p=n("5350"),f=n("fd3f"),g="Object already initialized",m=a.TypeError,b=a.WeakMap,v=function(e){return r(e)?o(e):i(e,{})},y=function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return n}};if(s||d.state){var w=d.state||(d.state=new b),_=l(w.get),C=l(w.has),A=l(w.set);i=function(e,t){if(C(w,e))throw new m(g);return t.facade=e,A(w,e,t),t},o=function(e){return _(w,e)||{}},r=function(e){return C(w,e)}}else{var E=p("state");f[E]=!0,i=function(e,t){if(u(e,E))throw new m(g);return t.facade=e,h(e,E,t),t},o=function(e){return u(e,E)?e[E]:{}},r=function(e){return u(e,E)}}e.exports={set:i,get:o,has:r,enforce:v,getterFor:y}},"36df":function(e,t,n){var i=n("294d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("2f97e014",i,!0,{sourceMap:!1,shadowMode:!1})},"370b":function(e,t,n){"use strict";var i=n("8aa3").forEach,o=n("3d1a"),r=o("forEach");e.exports=r?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},"37c0":function(e,t,n){e.exports=n("5d86")},"37fd":function(e,t,n){"use strict";var i=n("83ec"),o=n("8aa3").filter,r=n("72d4"),s=r("filter");i({target:"Array",proto:!0,forced:!s},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},"396d":function(e,t,n){var i=n("6f9e"),o=n("0b05"),r=n("45ad"),s=n("f226").indexOf,a=n("fd3f"),l=i([].push);e.exports=function(e,t){var n,i=r(e),c=0,h=[];for(n in i)!o(a,n)&&o(i,n)&&l(h,n);while(t.length>c)o(i,n=t[c++])&&(~s(h,n)||l(h,n));return h}},3990:function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf").is,o=n("4580"),r=o.CONSUME_TOKEN_EVENT,s=o.GENERATE_TOKEN_EVENT;function a(e,t){this._animation=e,this._eventBus=t}a.prototype.consume=function(e){this._eventBus.fire(s,e)},a.prototype.generate=function(e){var t=this,n=e.element,o=e.processInstanceId,s=n.outgoing.filter((function(e){return i(e,"bpmn:SequenceFlow")}));s.forEach((function(e){t._animation.createAnimation(e,o,(function(){t._eventBus.fire(r,{element:e.target,processInstanceId:o})}))}))},a.$inject=["animation","eventBus"],e.exports=a},"3aac":function(e,t,n){"use strict";var i=n("2875");function o(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function r(e,t,n){var o=i.extend(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:o}),o.length&&o.forEach((function(i){e.set(i,t.inverse,n)}))}function s(e,t,n){var i=t.inverse,o=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return o},set:function(t){if(t!==o){var r=o;o=null,r&&e.unset(r,i,n),o=t,e.set(o,i,n)}}})}function a(e,t){if(!(this instanceof a))return new a(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}a.prototype.bind=function(e,t){if("string"===typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?r(this,t,e):s(this,t,e)},a.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return i.isExtended(n)||r(this,t,e),n},a.prototype.ensureBound=function(e,t){o(e,t)||this.bind(e,t)},a.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},a.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)},e.exports=a},"3c82":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}",""]),e.exports=t},"3d1a":function(e,t,n){"use strict";var i=n("ac97");e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},"3e1a":function(e,t,n){var i=n("396d"),o=n("e629");e.exports=Object.keys||function(e){return i(e,o)}},"3ef6":function(e,t,n){"use strict";t.byteLength=h,t.toByteArray=d,t.fromByteArray=g;for(var i=[],o=[],r="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)i[a]=s[a],o[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var i=n===t?0:4-n%4;return[n,i]}function h(e){var t=c(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function u(e,t,n){return 3*(t+n)/4-n}function d(e){var t,n,i=c(e),s=i[0],a=i[1],l=new r(u(e,s,a)),h=0,d=a>0?s-4:s;for(n=0;n<d;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],l[h++]=t>>16&255,l[h++]=t>>8&255,l[h++]=255&t;return 2===a&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,l[h++]=255&t),1===a&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,l[h++]=t>>8&255,l[h++]=255&t),l}function p(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function f(e,t,n){for(var i,o=[],r=t;r<n;r+=3)i=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),o.push(p(i));return o.join("")}function g(e){for(var t,n=e.length,o=n%3,r=[],s=16383,a=0,l=n-o;a<l;a+=s)r.push(f(e,a,a+s>l?l:a+s));return 1===o?(t=e[n-1],r.push(i[t>>2]+i[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],r.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),r.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},"3f13":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}",""]),e.exports=t},"3ffb":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,'.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-td,.monaco-table-th{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--sash-size)/2);width:0;border-left:1px solid transparent}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}',""]),e.exports=t},"407e":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent;transition:border-color .1s linear}.monaco-tl-contents,.monaco-tl-twistie{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translateX(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{-webkit-animation:codicon-spin 1.25s steps(30) infinite;animation:codicon-spin 1.25s steps(30) infinite}",""]),e.exports=t},"409e":function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){var t=+e;return t!==t||0===t?0:(t>0?i:n)(t)}},"40cd":function(e,t,n){var i=n("6baf");i("iterator")},"42b1":function(e,t,n){var i=n("55ab"),o=n("58d1"),r=n("11b0"),s=n("4d82"),a=n("45ad"),l=n("6b7e"),c=n("0b05"),h=n("bf6f"),u=Object.getOwnPropertyDescriptor;t.f=i?u:function(e,t){if(e=a(e),t=l(t),h)try{return u(e,t)}catch(n){}if(c(e,t))return s(!o(r.f,e,t),e[t])}},4467:function(e,t,n){var i=n("ac97");e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4580:function(e,t){var n="tokenSimulation";e.exports={TOGGLE_MODE_EVENT:n+".toggleMode",GENERATE_TOKEN_EVENT:n+".generateToken",CONSUME_TOKEN_EVENT:n+".consumeToken",PLAY_SIMULATION_EVENT:n+".playSimulation",PAUSE_SIMULATION_EVENT:n+".pauseSimulation",RESET_SIMULATION_EVENT:n+".resetSimulation",TERMINATE_EVENT:n+".terminateEvent",UPDATE_ELEMENTS_EVENT:n+".updateElements",UPDATE_ELEMENT_EVENT:n+".updateElement",PROCESS_INSTANCE_CREATED_EVENT:n+".processInstanceCreated",PROCESS_INSTANCE_FINISHED_EVENT:n+".processInstanceFinished",PROCESS_INSTANCE_SHOWN_EVENT:n+".processInstanceShown",PROCESS_INSTANCE_HIDDEN_EVENT:n+".processInstanceHidden",ANIMATION_CREATED_EVENT:n+".animationCreated"}},"45ad":function(e,t,n){var i=n("b4fd"),o=n("0874");e.exports=function(e){return i(o(e))}},4775:function(e,t,n){"use strict";n("ff39")},4902:function(e,t,n){"use strict";n("84f7"),n("6b40"),n("2f62"),n("26c4");var i=n("7299"),o=i.domify,r=i.classes,s=i.event,a=i.query,l=n("fbdf"),c=l.getBusinessObject,h=l.is,u=l.isTypedEvent,d=n("4580"),p=d.GENERATE_TOKEN_EVENT,f=d.CONSUME_TOKEN_EVENT,g=d.TOGGLE_MODE_EVENT,m=d.RESET_SIMULATION_EVENT,b=d.PROCESS_INSTANCE_CREATED_EVENT;function v(e){return e&&e.businessObject.name}function y(e,t,n,i,o){var s=this;this._notifications=t,this._tokenSimulationPalette=n,this._canvas=i,this._translate=o,this._init(),e.on(p,(function(e){var t=e.element,n=v(t);if(h(t,"bpmn:BusinessRuleTask"))s.log(n||"Business Rule Task","info","bpmn-icon-business-rule");else if(h(t,"bpmn:CallActivity"))s.log(n||"Call Activity","info","bpmn-icon-call-activity");else if(h(t,["bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent"]))s.log(n||"Intermediate Event","info","bpmn-icon-intermediate-event-none");else if(h(t,"bpmn:ManualTask"))s.log(n||"Manual Task","info","bpmn-icon-manual");else if(h(t,"bpmn:ScriptTask"))s.log(n||"Script Task","info","bpmn-icon-script");else if(h(t,"bpmn:ServiceTask"))s.log(n||"Service Task","info","bpmn-icon-service");else if(h(t,"bpmn:StartEvent"))s.log(n||"Start Event","info","bpmn-icon-start-event-none");else if(h(t,"bpmn:Task"))s.log(n||"Task","info","bpmn-icon-task");else if(h(t,"bpmn:UserTask"))s.log(n||"User Task","info","bpmn-icon-user");else if(h(t,"bpmn:ExclusiveGateway")){if(t.outgoing.length<2)return;var i=v(t.sequenceFlow),o=n||"Gateway";i&&(o=o.concat(' <i class="fa fa-angle-right" aria-hidden="true"></i> '+i)),s.log(o,"info","bpmn-icon-gateway-xor")}})),e.on(f,(function(e){var t=e.element,n=v(t);h(t,"bpmn:EndEvent")&&(u(c(t),"bpmn:TerminateEventDefinition")?s.log(n||"Terminate End Event","info","bpmn-icon-end-event-terminate"):s.log(n||"End Event","info","bpmn-icon-end-event-none"))})),e.on(b,(function(e){var t=e.processInstanceId,n=e.parent;h(n,"bpmn:Process")?s.log(s._translate("Process {processInstanceId} started",{processInstanceId:t}),"success","fa-check"):s.log(s._translate("Subprocess {processInstanceId} started",{processInstanceId:t}),"info","fa-check")})),e.on(g,(function(e){var t=e.simulationModeActive;t||(s.emptyLog(),r(s.container).add("hidden"))})),e.on(m,(function(e){s.emptyLog(),r(s.container).add("hidden")}))}y.prototype._init=function(){var e=this;this.container=o('<div class="token-simulation-log hidden"><div class="header"><i class="fa fa-align-left"></i><button class="close"><i class="fa fa-times" aria-hidden="true"></i></button></div><div class="content">'+'<p class="entry placeholder">'.concat(this._translate("No Entries"),"</p>")+"</div></div>"),this.placeholder=a(".placeholder",this.container),this.content=a(".content",this.container),s.bind(this.content,"wheel",(function(e){e.stopPropagation()})),s.bind(this.content,"mousedown",(function(e){e.stopPropagation()})),this.close=a(".close",this.container),s.bind(this.close,"click",(function(){r(e.container).add("hidden")})),this.icon=a(".fa-align-left",this.container),s.bind(this.icon,"click",(function(){r(e.container).add("hidden")})),this._canvas.getContainer().appendChild(this.container),this.paletteEntry=o('<div class="entry" title="'.concat(this._translate("Show Simulation Log"),'"><i class="fa fa-align-left"></i></div>')),s.bind(this.paletteEntry,"click",(function(){r(e.container).remove("hidden")})),this._tokenSimulationPalette.addEntry(this.paletteEntry,3)},y.prototype.toggle=function(){var e=this.container;r(e).has("hidden")?r(e).remove("hidden"):r(e).add("hidden")},y.prototype.log=function(e,t,n){r(this.placeholder).add("hidden");var i,s=new Date,a=s.toLocaleTimeString();this._notifications.showNotification(e,t,n),n||(n="fa-info"),i=n.includes("bpmn")?'<span class="icon '+n+'">':'<i class="icon fa '+n+'"></i>';var l=o('<p class="entry '+t+'"><span class="date">'+a+"</span>"+i+"</span>"+this._translate(e)+"</p>");this.content.appendChild(l),this.content.scrollTop=this.content.scrollHeight},y.prototype.emptyLog=function(){while(this.content.firstChild)this.content.removeChild(this.content.firstChild);this.placeholder=o('<p class="entry placeholder">'.concat(this._translate("No Entries"),"</p>")),this.content.appendChild(this.placeholder)},y.$inject=["eventBus","notifications","tokenSimulationPalette","canvas","translate"],e.exports=y},4974:function(e,t,n){"use strict";function i(e,t){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],s=r[0],a=r[1],l=r[2],c=r[3],h={id:e+":"+o,css:a,media:l,sourceMap:c};i[s]?i[s].parts.push(h):n.push(i[s]={id:s,parts:[h]})}return n}n.r(t),n.d(t,"default",(function(){return f}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var r={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,l=0,c=!1,h=function(){},u=null,d="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,n,o){c=n,u=o||{};var s=i(e,t);return g(s),function(t){for(var n=[],o=0;o<s.length;o++){var a=s[o],l=r[a.id];l.refs--,n.push(l)}t?(s=i(e,t),g(s)):s=[];for(o=0;o<n.length;o++){l=n[o];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}}function g(e){for(var t=0;t<e.length;t++){var n=e[t],i=r[n.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](n.parts[o]);for(;o<n.parts.length;o++)i.parts.push(b(n.parts[o]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(b(n.parts[o]));r[n.id]={id:n.id,refs:1,parts:s}}}}function m(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function b(e){var t,n,i=document.querySelector("style["+d+'~="'+e.id+'"]');if(i){if(c)return h;i.parentNode.removeChild(i)}if(p){var o=l++;i=a||(a=m()),t=y.bind(null,i,o,!1),n=y.bind(null,i,o,!0)}else i=m(),t=w.bind(null,i),n=function(){i.parentNode.removeChild(i)};return t(e),function(i){if(i){if(i.css===e.css&&i.media===e.media&&i.sourceMap===e.sourceMap)return;t(e=i)}else n()}}var v=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function y(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=v(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function w(e,t){var n=t.css,i=t.media,o=t.sourceMap;if(i&&e.setAttribute("media",i),u.ssrId&&e.setAttribute(d,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},"497f":function(e,t,n){e.exports=n.p+"img/bpmn.1381b44e.svg"},"4a9d":function(e,t,n){"use strict";n("f96e");var i=n("fbdf"),o=i.isAncestor,r=n("4580"),s=r.TOGGLE_MODE_EVENT,a=r.RESET_SIMULATION_EVENT,l=r.TERMINATE_EVENT,c=r.UPDATE_ELEMENTS_EVENT,h=r.UPDATE_ELEMENT_EVENT,u=r.PROCESS_INSTANCE_SHOWN_EVENT,d=n("aa28"),p=n("f658"),f=n("5c1e"),g=n("9d65"),m=n("2843"),b=500,v=-15,y=-15;function w(e,t,n,i,o,r){var v=this;this._elementRegistry=t,this._overlays=n,this._injector=i,this._canvas=o,this._processInstances=r,this.overlayIds={},this.handlers={},this.registerHandler("bpmn:ExclusiveGateway",p),this.registerHandler("bpmn:IntermediateCatchEvent",f),this.registerHandler("bpmn:SubProcess",g),this.registerHandler("bpmn:SubProcess",d),this.registerHandler("bpmn:StartEvent",m),e.on(s,b,(function(e){var t=e.simulationModeActive;t?v.openContextPads():v.closeContextPads()})),e.on(a,b,(function(){v.closeContextPads(),v.openContextPads()})),e.on(l,b,(function(e){var t=e.element,n=t.parent;v.closeContextPads(n)})),e.on(c,b,(function(e){var t=e.elements;t.forEach((function(e){v.closeElementContextPads(e),v.openElementContextPads(e)}))})),e.on(h,b,(function(e){var t=e.element;v.closeElementContextPads(t),v.openElementContextPads(t)})),e.on(u,(function(e){var t=e.processInstanceId,n=r.getProcessInstance(t),i=n.parent;v.closeContextPads(i),v.openContextPads(i)}))}w.prototype.registerHandler=function(e,t){var n=this._injector.instantiate(t);this.handlers[e]||(this.handlers[e]=[]),this.handlers[e].push(n)},w.prototype.openContextPads=function(e){var t=this;e||(e=this._canvas.getRootElement()),this._elementRegistry.forEach((function(n){t.handlers[n.type]&&o(e,n)&&t.openElementContextPads(n)}))},w.prototype.openElementContextPads=function(e){if(this.handlers[e.type]){var t=[];this.handlers[e.type].forEach((function(n){var i=n.createContextPads(e);i&&i.forEach((function(e){e&&t.push(e)}))}));var n=this;t.forEach((function(e){var t={top:v,left:y},i=n._overlays.add(e.element,"context-menu",{position:t,html:e.html,show:{minZoom:.5}});n.overlayIds[e.element.id]=i}))}},w.prototype.closeContextPads=function(e){var t=this;e||(e=this._canvas.getRootElement()),this._elementRegistry.forEach((function(n){o(e,n)&&t.closeElementContextPads(n)}))},w.prototype.closeElementContextPads=function(e){var t=this;e.attachers&&e.attachers.length>0&&e.attachers.forEach((function(e){t.closeElementContextPads(e)})),e.children&&e.children.length>0&&e.children.forEach((function(e){t.closeElementContextPads(e)}));var n=this.overlayIds[e.id];n&&(this._overlays.remove(n),delete this.overlayIds[e.id])},w.$inject=["eventBus","elementRegistry","overlays","injector","canvas","processInstances"],e.exports=w},"4ad5":function(e,t,n){var i=n("2273");e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},"4cdd":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{font-size:11px;padding:3px;border-radius:5px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:#bbb}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}",""]),e.exports=t},"4d82":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4df4":function(e,t,n){var i=n("83ec"),o=n("1d2f");i({target:"Math",stat:!0},{sign:o})},"4e6a":function(e,t,n){var i=n("e244"),o=n("fc4e"),r=n("8dcc"),s=i.TypeError;e.exports=function(e){if(o(e))return e;throw s(r(e)+" is not a constructor")}},"4e70":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,"::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}",""]),e.exports=t},"4e99":function(e,t){e.exports.getMid=function(e){var t=e.bbox();return{x:t.x+t.width/2,y:t.y+t.height/2}},e.exports.distance=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}},"4eaf":function(e,t,n){var i=n("6f9e"),o=n("409e"),r=n("04c3"),s=n("0874"),a=i("".charAt),l=i("".charCodeAt),c=i("".slice),h=function(e){return function(t,n){var i,h,u=r(s(t)),d=o(n),p=u.length;return d<0||d>=p?e?"":void 0:(i=l(u,d),i<55296||i>56319||d+1===p||(h=l(u,d+1))<56320||h>57343?e?a(u,d):i:e?c(u,d,d+2):h-56320+(i-55296<<10)+65536)}};e.exports={codeAt:h(!1),charAt:h(!0)}},"4fe1":function(e,t,n){var i=n("e244");e.exports=function(e,t){var n=i.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},5069:function(e,t,n){"use strict";n.r(t);var i={};if(n.r(i),n.d(i,"CancellationTokenSource",(function(){return CQ})),n.d(i,"Emitter",(function(){return AQ})),n.d(i,"KeyCode",(function(){return EQ})),n.d(i,"KeyMod",(function(){return xQ})),n.d(i,"Position",(function(){return SQ})),n.d(i,"Range",(function(){return kQ})),n.d(i,"Selection",(function(){return DQ})),n.d(i,"SelectionDirection",(function(){return LQ})),n.d(i,"MarkerSeverity",(function(){return IQ})),n.d(i,"MarkerTag",(function(){return NQ})),n.d(i,"Uri",(function(){return MQ})),n.d(i,"Token",(function(){return BQ})),n.d(i,"editor",(function(){return TQ})),n.d(i,"languages",(function(){return OQ})),"undefined"!==typeof window){var o=window.document.currentScript,r=n("2717");o=r(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:r});var s=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(n.p=s[1])}var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wf-design"},[n("el-container",[n("el-container",[n("el-header",{directives:[{name:"show",rawName:"v-show",value:e.isEditMode&&e.option.toolbar&&e.option.toolbar.length>0,expression:"isEditMode && option.toolbar && option.toolbar.length > 0"}]},[n("wf-toolbar",{attrs:{toolbar:e.option.toolbar},on:{open:e.createNewDiagram,create:function(t){e.createNewDiagram(e.INIT_XML())},fit:e.fitViewport,undo:function(t){e.modeler.get("commandStack").undo()},redo:function(t){e.modeler.get("commandStack").redo()},download:e.getData,import:function(t){e.importVisible=!0},preview:e.handlePreview}},[n("template",{slot:"toolbar"},[e._t("toolbar")],2)],2)],1),n("el-main",[n("div",{ref:"modeler",staticClass:"modeler"})])],1),e.isEditMode?n("el-aside",{attrs:{width:"380px"}},[e.modeler?n("wf-panel",{ref:"panel",attrs:{modeler:e.modeler,"form-option":e.option.form,"ex-form-option":e.option.exForm,"indep-form-option":e.option.indepForm,"user-option":e.option.user,"group-option":e.option.group,"button-option":e.option.button}}):e._e()],1):e._e()],1),e.modeler&&e.option.config?n("wf-config",{attrs:{option:e.option,modeler:e.modeler},on:{"update:option":function(t){e.option=t},change:e.init}}):e._e(),n("el-drawer",{attrs:{title:"xml",visible:e.previewVisible,"append-to-body":"","destroy-on-close":"",size:"60%"},on:{"update:visible":function(t){e.previewVisible=t}}},[n("monaco-editor",{attrs:{language:"xml"},model:{value:e.previewXML,callback:function(t){e.previewXML=t},expression:"previewXML"}})],1),n("el-drawer",{attrs:{title:"导入xml",visible:e.importVisible,"append-to-body":"","destroy-on-close":"",size:"60%"},on:{"update:visible":function(t){e.importVisible=t}}},[n("monaco-editor",{attrs:{height:"94%",language:"xml"},model:{value:e.importXML,callback:function(t){e.importXML=t},expression:"importXML"}}),n("div",{staticClass:"wf-design__drawer-foot"},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleImport}},[e._v("确定")]),n("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(t){e.importVisible=!1}}},[e._v("取消")])],1)],1)],1)},l=[];n("fa89"),n("d31d");function c(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(i,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function s(e){c(r,i,o,s,a,"next",e)}function a(e){c(r,i,o,s,a,"throw",e)}s(void 0)}))}}var u=n("863c");n("fc08"),n("84f7"),n("2f62"),n("f96e"),n("2eb0"),n("a8de"),n("26c4"),n("e2da"),n("a078"),n("95d1"),n("dc6d"),n("6b40");function d(e){e=e||32;for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",n=t.length,i="",o=0;o<e;o++)i+=t.charAt(Math.floor(Math.random()*n));return i}var p=function(e){var t=e&&e.id?e.id:"process_".concat(d());if(!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(t))throw new Error("process节点id必须以字母开头,且不能包含中文!当前id:"+e.id+" 不符合规则");var n=e&&e.name?e.name:"name_".concat(d());return'<?xml version="1.0" encoding="UTF-8"?>\n <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:flowable="http://flowable.org/bpmn" xmlns:activiti="http://activiti.org/bpmn" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" targetNamespace="http://bpmn.io/schema/bpmn">\n <process id="'.concat(t,'" name="').concat(n,'" isExecutable="true" flowable:skipFirstNode="true" flowable:rollbackNode="Activity_06t0e98">\n <startEvent id="startEvent_1" name="请先点击我初始化节点">\n <outgoing>Flow_0yhobgw</outgoing>\n </startEvent>\n <userTask id="Activity_06t0e98" name="发起人">\n <extensionElements>\n <flowable:assignee type="custom" value="applyUser" text="流程发起人" />\n </extensionElements>\n <incoming>Flow_0yhobgw</incoming>\n </userTask>\n <sequenceFlow id="Flow_0yhobgw" sourceRef="startEvent_1" targetRef="Activity_06t0e98" />\n </process>\n <bpmndi:BPMNDiagram id="BPMNDiagram_flow">\n <bpmndi:BPMNPlane id="BPMNPlane_flow" bpmnElement="process_REbSxZSKr3ps6tb6ssA4hSwKdhwGxwER">\n <bpmndi:BPMNEdge id="Flow_0yhobgw_di" bpmnElement="Flow_0yhobgw">\n <di:waypoint x="276" y="218" />\n <di:waypoint x="330" y="218" />\n </bpmndi:BPMNEdge>\n <bpmndi:BPMNShape id="BPMNShape_startEvent_1" bpmnElement="startEvent_1">\n <dc:Bounds x="240" y="200" width="36" height="36" />\n <bpmndi:BPMNLabel>\n <dc:Bounds x="247" y="243" width="22" height="14" />\n </bpmndi:BPMNLabel>\n </bpmndi:BPMNShape>\n <bpmndi:BPMNShape id="Activity_06t0e98_di" bpmnElement="Activity_06t0e98">\n <dc:Bounds x="330" y="178" width="100" height="80" />\n </bpmndi:BPMNShape>\n </bpmndi:BPMNPlane>\n </bpmndi:BPMNDiagram>\n </definitions>')},f={xml:"",lang:"zh",config:!1,mode:"edit",toolbar:["open","create","fit","zoom-in","zoom-out","undo","redo","import","preview","get","download-xml","download-svg"],engine:"flowable",lint:!0,minimap:!1,simulation:!1,flows:[]};n("085b"),n("99ab");function g(e,t){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,n){const i=n[0];return"undefined"!==typeof t[i]?t[i]:e})),n}function m(e,t,...n){return g(t,n)}var b=n("1cb4");const v="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function y(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of v)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const w=y();function _(e){let t=w;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const C={maxLen:1e3,windowSize:15,timeBudget:150};function A(e,t,n,i,o=C){if(n.length>o.maxLen){let r=e-o.maxLen/2;return r<0?r=0:i+=r,n=n.substring(r,e+o.maxLen/2),A(e,t,n,i,o)}const r=Date.now(),s=e-1-i;let a=-1,l=null;for(let c=1;;c++){if(Date.now()-r>=o.timeBudget)break;const e=s-o.windowSize*c;t.lastIndex=Math.max(0,e);const i=E(t,n,s,a);if(!i&&l)break;if(l=i,e<=0)break;a=e}if(l){let e={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function E(e,t,n,i){let o;while(o=e.exec(t)){const t=o.index||0;if(t<=n&&e.lastIndex>=n)return o;if(i>0&&t>i)return null}return null}const x=8;class S{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class k{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class D{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class L{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}compute(e,t,n){return n}}class I{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class N{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}validate(e){return"undefined"===typeof e?this.defaultValue:e}compute(e,t,n){return n}}function M(e,t){return"undefined"===typeof e?t:"false"!==e&&Boolean(e)}class B extends N{constructor(e,t,n,i){"undefined"!==typeof i&&(i.type="boolean",i.default=n),super(e,t,n,i)}validate(e){return M(e,this.defaultValue)}}function T(e,t,n,i){if("undefined"===typeof e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(n,o),o=Math.min(i,o),0|o)}class O extends N{constructor(e,t,n,i,o,r){"undefined"!==typeof r&&(r.type="integer",r.default=n,r.minimum=i,r.maximum=o),super(e,t,n,r),this.minimum=i,this.maximum=o}static clampedInt(e,t,n,i){return T(e,t,n,i)}validate(e){return O.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class R extends N{constructor(e,t,n,i,o){"undefined"!==typeof o&&(o.type="number",o.default=n),super(e,t,n,o),this.validationFn=i}static clamp(e,t,n){return e<t?t:e>n?n:e}static float(e,t){if("number"===typeof e)return e;if("undefined"===typeof e)return t;const n=parseFloat(e);return isNaN(n)?t:n}validate(e){return this.validationFn(R.float(e,this.defaultValue))}}class P extends N{static string(e,t){return"string"!==typeof e?t:e}constructor(e,t,n,i){"undefined"!==typeof i&&(i.type="string",i.default=n),super(e,t,n,i)}validate(e){return P.string(e,this.defaultValue)}}function F(e,t,n){return"string"!==typeof e||-1===n.indexOf(e)?t:e}class j extends N{constructor(e,t,n,i,o){"undefined"!==typeof o&&(o.type="string",o.enum=i,o.default=n),super(e,t,n,o),this._allowedValues=i}validate(e){return F(e,this.defaultValue,this._allowedValues)}}class z extends L{constructor(e,t,n,i,o,r,s){"undefined"!==typeof s&&(s.type="string",s.enum=o,s.default=i),super(e,t,n,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!==typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}function V(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class Q extends L{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),m("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:m("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return 0===n?e.accessibilitySupport:n}}class W extends L{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertSpace:M(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:M(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function H(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var U;function Y(e){switch(e){case"line":return U.Line;case"block":return U.Block;case"underline":return U.Underline;case"line-thin":return U.LineThin;case"block-outline":return U.BlockOutline;case"underline-thin":return U.UnderlineThin}}(function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"})(U||(U={}));class G extends I{constructor(){super(126,[65,33])}compute(e,t,n){const i=["monaco-editor"];return t.get(33)&&i.push(t.get(33)),e.extraEditorClassName&&i.push(e.extraEditorClassName),"default"===t.get(65)?i.push("mouse-default"):"copy"===t.get(65)&&i.push("mouse-copy"),t.get(99)&&i.push("showUnused"),t.get(124)&&i.push("showDeprecated"),i.join(" ")}}class K extends B{constructor(){super(32,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}class q extends L{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:b["f"]},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:M(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"===typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":F(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"===typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":F(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:M(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:M(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:M(t.loop,this.defaultValue.loop)}}}class J extends L{constructor(){super(44,"fontLigatures",J.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e?J.OFF:"true"===e?J.ON:e:Boolean(e)?J.ON:J.OFF}}J.OFF='"liga" off, "calt" off',J.ON='"liga" on, "calt" on';class $ extends I{constructor(){super(43)}compute(e,t,n){return e.fontInfo}}class X extends N{constructor(){super(45,"fontSize",De.fontSize,{type:"number",minimum:6,maximum:100,default:De.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){let t=R.float(e,this.defaultValue);return 0===t?De.fontSize:R.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}class Z extends L{constructor(){super(46,"fontWeight",De.fontWeight,{anyOf:[{type:"number",minimum:Z.MINIMUM_VALUE,maximum:Z.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Z.SUGGESTION_VALUES}],default:De.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(O.clampedInt(e,De.fontWeight,Z.MINIMUM_VALUE,Z.MAXIMUM_VALUE))}}Z.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],Z.MINIMUM_VALUE=1,Z.MAXIMUM_VALUE=1e3;class ee extends L{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),m("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(50,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:m("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:m("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:m("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:m("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:m("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:m("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,i,o,r;if(!e||"object"!==typeof e)return this.defaultValue;const s=e;return{multiple:F(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:F(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(n=s.multipleTypeDefinitions)&&void 0!==n?n:F(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(i=s.multipleDeclarations)&&void 0!==i?i:F(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=s.multipleImplementations)&&void 0!==o?o:F(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=s.multipleReferences)&&void 0!==r?r:F(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:P.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:P.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:P.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:P.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:P.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class te extends L{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(52,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:M(t.enabled,this.defaultValue.enabled),delay:O.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:M(t.sticky,this.defaultValue.sticky)}}}class ne extends I{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(e,t,n){return ne.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=e.scrollBeyondLastLine?t-1:0,i=(e.viewLineCount+n)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/i);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:n,desiredRatio:i,minimapLineCount:o}}static _computeMinimapLayout(e,t){const n=e.outerWidth,i=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};const r=t.stableMinimapLayoutInput,s=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const d=e.minimap.maxColumn,p=e.minimap.size,f=e.minimap.side,g=e.verticalScrollbarWidth,m=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,y=h?2:3;let w=Math.floor(o*i);const _=w/o;let C=!1,A=!1,E=y*u,S=u/o,k=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:n,extraLinesBeyondLastLine:r,desiredRatio:l,minimapLineCount:h}=ne.computeContainedMinimapLineCount({viewLineCount:m,scrollBeyondLastLine:c,height:i,lineHeight:a,pixelRatio:o}),d=m/h;if(d>1)C=!0,A=!0,u=1,E=1,S=u/o;else{let i=!1,c=u+1;if("fit"===p){const e=Math.ceil((m+r)*E);v&&s&&b<=t.stableFitRemainingWidth?(i=!0,c=t.stableFitMaxMinimapScale):i=e>w}if("fill"===p||i){C=!0;const i=u;E=Math.min(a*o,Math.max(1,Math.floor(1/l))),v&&s&&b<=t.stableFitRemainingWidth&&(c=t.stableFitMaxMinimapScale),u=Math.min(c,Math.max(1,Math.floor(E/y))),u>i&&(k=Math.min(2,u/i)),S=u/o/k,w=Math.ceil(Math.max(n,m+r)*E),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const D=Math.floor(d*S),L=Math.min(D,Math.max(0,Math.floor((b-g-2)*S/(l+S)))+x);let I=Math.floor(o*L);const N=I/o;I=Math.floor(I*k);const M=h?1:2,B="left"===f?0:n-L-g;return{renderMinimap:M,minimapLeft:B,minimapWidth:L,minimapHeightIsEditorHeight:C,minimapIsSampling:A,minimapScale:u,minimapLineHeight:E,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:N,minimapCanvasOuterHeight:_}}static computeLayout(e,t){const n=0|t.outerWidth,i=0|t.outerHeight,o=0|t.lineHeight,r=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,h=e.get(121),u="inherit"===h?e.get(120):h,d="inherit"===u?e.get(116):u,p=e.get(119),f=e.get(2),g=t.isDominatedByLongLines,m=e.get(49),b=0!==e.get(59).renderType,v=e.get(60),y=e.get(93),w=e.get(64),_=e.get(91),C=_.verticalScrollbarSize,A=_.verticalHasArrows,E=_.arrowSize,x=_.horizontalScrollbarSize,S=e.get(57),k=e.get(37);let L;if("string"===typeof S&&/^\d+(\.\d+)?ch$/.test(S)){const e=parseFloat(S.substr(0,S.length-2));L=O.clampedInt(e*s,0,0,1e3)}else L=O.clampedInt(S,0,0,1e3);k&&(L+=16);let I=0;if(b){const e=Math.max(r,v);I=Math.round(e*a)}let N=0;m&&(N=o);let M=0,B=M+N,T=B+I,R=T+L;const P=n-N-I-L;let F=!1,j=!1,z=-1;2!==f&&("inherit"===u&&g?(F=!0,j=!0):"on"===d||"bounded"===d?j=!0:"wordWrapColumn"===d&&(z=p));const V=ne._computeMinimapLayout({outerWidth:n,outerHeight:i,lineHeight:o,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:y,minimap:w,verticalScrollbarWidth:C,viewLineCount:c,remainingWidth:P,isViewportWrapping:j},t.memory||new D);0!==V.renderMinimap&&0===V.minimapLeft&&(M+=V.minimapWidth,B+=V.minimapWidth,T+=V.minimapWidth,R+=V.minimapWidth);const Q=P-V.minimapWidth,W=Math.max(1,Math.floor((Q-C-2)/s)),H=A?E:0;return j&&(z=Math.max(1,W),"bounded"===d&&(z=Math.min(z,p))),{width:n,height:i,glyphMarginLeft:M,glyphMarginWidth:N,lineNumbersLeft:B,lineNumbersWidth:I,decorationsLeft:T,decorationsWidth:L,contentLeft:R,contentWidth:Q,minimap:V,viewportColumn:W,isWordWrapMinified:F,isViewportWrapping:j,wrappingColumn:z,verticalScrollbarWidth:C,horizontalScrollbarHeight:x,overviewRuler:{top:H,width:C,height:i-2*H,right:0}}}}class ie extends L{constructor(){const e={enabled:!0};super(56,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:m("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:M(t.enabled,this.defaultValue.enabled)}}}class oe extends L{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:M(t.enabled,this.defaultValue.enabled),fontSize:O.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:P.string(t.fontFamily,this.defaultValue.fontFamily)}}}class re extends R{constructor(){super(58,"lineHeight",De.lineHeight,e=>R.clamp(e,0,150),{markdownDescription:m("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,n){return e.fontInfo.lineHeight}}class se extends L{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:m("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[m("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),m("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),m("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:m("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:m("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:m("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:m("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:m("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:m("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:M(t.enabled,this.defaultValue.enabled),size:F(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:F(t.side,this.defaultValue.side,["right","left"]),showSlider:F(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:M(t.renderCharacters,this.defaultValue.renderCharacters),scale:O.clampedInt(t.scale,1,1,3),maxColumn:O.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function ae(e){return"ctrlCmd"===e?b["f"]?"metaKey":"ctrlKey":"altKey"}class le extends L{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{top:O.clampedInt(t.top,0,0,1e3),bottom:O.clampedInt(t.bottom,0,0,1e3)}}}class ce extends L{constructor(){const e={enabled:!0,cycle:!1};super(75,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:m("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:m("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:M(t.enabled,this.defaultValue.enabled),cycle:M(t.cycle,this.defaultValue.cycle)}}}class he extends I{constructor(){super(127)}compute(e,t,n){return e.pixelRatio}}class ue extends L{constructor(){const e={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:m("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:m("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:m("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:m("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"===typeof e)return e;if(e&&"object"===typeof e){const t=e,n={other:M(t.other,this.defaultValue.other),comments:M(t.comments,this.defaultValue.comments),strings:M(t.strings,this.defaultValue.strings)};return!!(n.other&&n.comments&&n.strings)||!!(n.other||n.comments||n.strings)&&n}return this.defaultValue}}class de extends L{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[m("lineNumbers.off","Line numbers are not rendered."),m("lineNumbers.on","Line numbers are rendered as absolute number."),m("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),m("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:m("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return"undefined"!==typeof e&&("function"===typeof e?(t=4,n=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:n}}}function pe(e){const t=e.get(86);return"editable"===t?e.get(80):"on"!==t}class fe extends L{constructor(){const e=[],t={type:"number",description:m("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:m("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:m("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let n of e)if("number"===typeof n)t.push({column:O.clampedInt(n,0,0,1e4),color:null});else if(n&&"object"===typeof n){const e=n;t.push({column:O.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort((e,t)=>e.column-t.column),t}return this.defaultValue}}function ge(e,t){if("string"!==typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}class me extends L{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(91,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),m("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),m("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),m("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),m("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:m("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:m("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:m("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e,n=O.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=O.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:O.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:ge(t.vertical,this.defaultValue.vertical),horizontal:ge(t.horizontal,this.defaultValue.horizontal),useShadows:M(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:M(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:M(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:M(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:M(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:O.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:i,verticalSliderSize:O.clampedInt(t.verticalSliderSize,i,0,1e3),scrollByPage:M(t.scrollByPage,this.defaultValue.scrollByPage)}}}class be extends L{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:m("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:M(t.enabled,this.defaultValue.enabled),mode:F(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class ve extends L{constructor(){const e={enabled:Le.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:m("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:M(t.enabled,this.defaultValue.enabled)}}}class ye extends L{constructor(){const e={bracketPairs:!1,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:"boolean",default:e.bracketPairs,description:m("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:m("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:m("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{bracketPairs:M(t.bracketPairs,this.defaultValue.bracketPairs),indentation:M(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:M(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}class we extends L{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(105,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[m("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),m("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:m("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:m("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:m("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:m("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:m("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:m("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:m("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:m("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:m("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:m("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:m("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertMode:F(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:M(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:M(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:M(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:M(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:M(t.showIcons,this.defaultValue.showIcons),showStatusBar:M(t.showStatusBar,this.defaultValue.showStatusBar),preview:M(t.preview,this.defaultValue.preview),previewMode:F(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:M(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:M(t.showMethods,this.defaultValue.showMethods),showFunctions:M(t.showFunctions,this.defaultValue.showFunctions),showConstructors:M(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:M(t.showDeprecated,this.defaultValue.showDeprecated),showFields:M(t.showFields,this.defaultValue.showFields),showVariables:M(t.showVariables,this.defaultValue.showVariables),showClasses:M(t.showClasses,this.defaultValue.showClasses),showStructs:M(t.showStructs,this.defaultValue.showStructs),showInterfaces:M(t.showInterfaces,this.defaultValue.showInterfaces),showModules:M(t.showModules,this.defaultValue.showModules),showProperties:M(t.showProperties,this.defaultValue.showProperties),showEvents:M(t.showEvents,this.defaultValue.showEvents),showOperators:M(t.showOperators,this.defaultValue.showOperators),showUnits:M(t.showUnits,this.defaultValue.showUnits),showValues:M(t.showValues,this.defaultValue.showValues),showConstants:M(t.showConstants,this.defaultValue.showConstants),showEnums:M(t.showEnums,this.defaultValue.showEnums),showEnumMembers:M(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:M(t.showKeywords,this.defaultValue.showKeywords),showWords:M(t.showWords,this.defaultValue.showWords),showColors:M(t.showColors,this.defaultValue.showColors),showFiles:M(t.showFiles,this.defaultValue.showFiles),showReferences:M(t.showReferences,this.defaultValue.showReferences),showFolders:M(t.showFolders,this.defaultValue.showFolders),showTypeParameters:M(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:M(t.showSnippets,this.defaultValue.showSnippets),showUsers:M(t.showUsers,this.defaultValue.showUsers),showIssues:M(t.showIssues,this.defaultValue.showIssues)}}}class _e extends L{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:m("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"===typeof e?{selectLeadingAndTrailingWhitespace:M(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}class Ce extends I{constructor(){super(128,[80])}compute(e,t,n){const i=t.get(80);return!!i||e.tabFocusMode}}function Ae(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class Ee extends I{constructor(){super(130,[129])}compute(e,t,n){const i=t.get(129);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:i.isWordWrapMinified,isViewportWrapping:i.isViewportWrapping,wrappingColumn:i.wrappingColumn}}}const xe="Consolas, 'Courier New', monospace",Se="Menlo, Monaco, 'Courier New', monospace",ke="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",De={fontFamily:b["f"]?Se:b["d"]?ke:xe,fontWeight:"normal",fontSize:b["f"]?12:14,lineHeight:0,letterSpacing:0},Le={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},Ie=[];function Ne(e){return Ie[e.id]=e,e}const Me={acceptSuggestionOnCommitCharacter:Ne(new B(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:m("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Ne(new j(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",m("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:m("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Ne(new Q),accessibilityPageSize:Ne(new O(3,"accessibilityPageSize",10,1,1073741824,{description:m("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:Ne(new P(4,"ariaLabel",m("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:Ne(new j(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),m("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:m("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:Ne(new j(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Ne(new j(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Ne(new j(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),m("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:m("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Ne(new z(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],V,{enumDescriptions:[m("editor.autoIndent.none","The editor will not insert indentation automatically."),m("editor.autoIndent.keep","The editor will keep the current line's indentation."),m("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),m("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),m("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:m("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Ne(new B(10,"automaticLayout",!1)),autoSurround:Ne(new j(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[m("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),m("editor.autoSurround.quotes","Surround with quotes but not brackets."),m("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:m("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Ne(new ve),bracketPairGuides:Ne(new ye),stickyTabStops:Ne(new B(103,"stickyTabStops",!1,{description:m("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Ne(new B(14,"codeLens",!0,{description:m("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Ne(new P(15,"codeLensFontFamily","",{description:m("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Ne(new O(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:m("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:Ne(new B(17,"colorDecorators",!0,{description:m("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:Ne(new B(18,"columnSelection",!1,{description:m("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Ne(new W),contextmenu:Ne(new B(20,"contextmenu",!0)),copyWithSyntaxHighlighting:Ne(new B(21,"copyWithSyntaxHighlighting",!0,{description:m("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Ne(new z(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],H,{description:m("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Ne(new B(23,"cursorSmoothCaretAnimation",!1,{description:m("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Ne(new z(24,"cursorStyle",U.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],Y,{description:m("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Ne(new O(25,"cursorSurroundingLines",0,0,1073741824,{description:m("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Ne(new j(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[m("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),m("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:m("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:Ne(new O(27,"cursorWidth",0,0,1073741824,{markdownDescription:m("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Ne(new B(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:Ne(new B(29,"disableMonospaceOptimizations",!1)),domReadOnly:Ne(new B(30,"domReadOnly",!1)),dragAndDrop:Ne(new B(31,"dragAndDrop",!0,{description:m("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Ne(new K),extraEditorClassName:Ne(new P(33,"extraEditorClassName","")),fastScrollSensitivity:Ne(new R(34,"fastScrollSensitivity",5,e=>e<=0?5:e,{markdownDescription:m("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Ne(new q),fixedOverflowWidgets:Ne(new B(36,"fixedOverflowWidgets",!1)),folding:Ne(new B(37,"folding",!0,{description:m("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Ne(new j(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[m("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),m("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:m("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Ne(new B(39,"foldingHighlight",!0,{description:m("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Ne(new B(40,"foldingImportsByDefault",!1,{description:m("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:Ne(new B(41,"unfoldOnClickAfterEndOfLine",!1,{description:m("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Ne(new P(42,"fontFamily",De.fontFamily,{description:m("fontFamily","Controls the font family.")})),fontInfo:Ne(new $),fontLigatures2:Ne(new J),fontSize:Ne(new X),fontWeight:Ne(new Z),formatOnPaste:Ne(new B(47,"formatOnPaste",!1,{description:m("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Ne(new B(48,"formatOnType",!1,{description:m("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Ne(new B(49,"glyphMargin",!0,{description:m("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Ne(new ee),hideCursorInOverviewRuler:Ne(new B(51,"hideCursorInOverviewRuler",!1,{description:m("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Ne(new te),inDiffEditor:Ne(new B(53,"inDiffEditor",!1)),letterSpacing:Ne(new R(55,"letterSpacing",De.letterSpacing,e=>R.clamp(e,-5,20),{description:m("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Ne(new ie),lineDecorationsWidth:Ne(new N(57,"lineDecorationsWidth",10)),lineHeight:Ne(new re),lineNumbers:Ne(new de),lineNumbersMinChars:Ne(new O(60,"lineNumbersMinChars",5,1,300)),linkedEditing:Ne(new B(61,"linkedEditing",!1,{description:m("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:Ne(new B(62,"links",!0,{description:m("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Ne(new j(63,"matchBrackets","always",["always","near","never"],{description:m("matchBrackets","Highlight matching brackets.")})),minimap:Ne(new se),mouseStyle:Ne(new j(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Ne(new R(66,"mouseWheelScrollSensitivity",1,e=>0===e?1:e,{markdownDescription:m("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Ne(new B(67,"mouseWheelZoom",!1,{markdownDescription:m("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Ne(new B(68,"multiCursorMergeOverlapping",!0,{description:m("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Ne(new z(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],ae,{markdownEnumDescriptions:[m("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:m({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Ne(new j(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[m("multiCursorPaste.spread","Each cursor pastes a single line of the text."),m("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:m("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:Ne(new B(71,"occurrencesHighlight",!0,{description:m("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Ne(new B(72,"overviewRulerBorder",!0,{description:m("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Ne(new O(73,"overviewRulerLanes",3,0,3)),padding:Ne(new le),parameterHints:Ne(new ce),peekWidgetDefaultFocus:Ne(new j(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[m("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),m("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:m("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Ne(new B(77,"definitionLinkOpensInPeek",!1,{description:m("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Ne(new ue),quickSuggestionsDelay:Ne(new O(79,"quickSuggestionsDelay",10,0,1073741824,{description:m("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Ne(new B(80,"readOnly",!1)),renameOnType:Ne(new B(81,"renameOnType",!1,{description:m("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:m("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Ne(new B(82,"renderControlCharacters",!1,{description:m("renderControlCharacters","Controls whether the editor should render control characters.")})),renderFinalNewline:Ne(new B(83,"renderFinalNewline",!0,{description:m("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Ne(new j(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",m("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:m("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Ne(new B(85,"renderLineHighlightOnlyWhenFocus",!1,{description:m("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Ne(new j(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Ne(new j(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",m("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),m("renderWhitespace.selection","Render whitespace characters only on selected text."),m("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:m("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Ne(new O(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:Ne(new B(89,"roundedSelection",!0,{description:m("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Ne(new fe),scrollbar:Ne(new me),scrollBeyondLastColumn:Ne(new O(92,"scrollBeyondLastColumn",5,0,1073741824,{description:m("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Ne(new B(93,"scrollBeyondLastLine",!0,{description:m("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Ne(new B(94,"scrollPredominantAxis",!0,{description:m("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Ne(new B(95,"selectionClipboard",!0,{description:m("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:b["d"]})),selectionHighlight:Ne(new B(96,"selectionHighlight",!0,{description:m("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Ne(new B(97,"selectOnLineNumbers",!0)),showFoldingControls:Ne(new j(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[m("showFoldingControls.always","Always show the folding controls."),m("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:m("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Ne(new B(99,"showUnused",!0,{description:m("showUnused","Controls fading out of unused code.")})),showDeprecated:Ne(new B(124,"showDeprecated",!0,{description:m("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Ne(new oe),snippetSuggestions:Ne(new j(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[m("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),m("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),m("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),m("snippetSuggestions.none","Do not show snippet suggestions.")],description:m("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Ne(new _e),smoothScrolling:Ne(new B(102,"smoothScrolling",!1,{description:m("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Ne(new O(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Ne(new we),inlineSuggest:Ne(new be),suggestFontSize:Ne(new O(106,"suggestFontSize",0,0,1e3,{markdownDescription:m("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:Ne(new O(107,"suggestLineHeight",0,0,1e3,{markdownDescription:m("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:Ne(new B(108,"suggestOnTriggerCharacters",!0,{description:m("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Ne(new j(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[m("suggestSelection.first","Always select the first suggestion."),m("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),m("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:m("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Ne(new j(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[m("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),m("tabCompletion.off","Disable tab completions."),m("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:m("tabCompletion","Enables tab completions.")})),tabIndex:Ne(new O(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:Ne(new j(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),m("unusualLineTerminators.off","Unusual line terminators are ignored."),m("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:m("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Ne(new B(113,"useShadowDOM",!0)),useTabStops:Ne(new B(114,"useTabStops",!0,{description:m("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:Ne(new P(115,"wordSeparators",v,{description:m("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Ne(new j(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),m({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:m({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Ne(new P(117,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Ne(new P(118,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Ne(new O(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:m({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Ne(new j(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Ne(new j(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:Ne(new z(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],Ae,{enumDescriptions:[m("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),m("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),m("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),m("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:m("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:Ne(new j(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[m("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:m("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:Ne(new G),pixelRatio:Ne(new he),tabFocusMode:Ne(new Ce),layoutInfo:Ne(new ne),wrappingInfo:Ne(new Ee)};class Be{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const Te=new Be;function Oe(e){je(e)||Te.onUnexpectedError(e)}function Re(e){je(e)||Te.onUnexpectedExternalError(e)}function Pe(e){if(e instanceof Error){let{name:t,message:n}=e;const i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i}}return e}const Fe="Canceled";function je(e){return e instanceof Error&&e.name===Fe&&e.message===Fe}function ze(){const e=new Error(Fe);return e.name=e.message,e}function Ve(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function Qe(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}class We extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}function He(e){const t=this;let n,i=!1;return function(){return i||(i=!0,n=e.apply(t,arguments)),n}}var Ue;(function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const n=Object.freeze([]);function i(){return n}function*o(e){yield e}function r(e){return e||n}function s(e){return!e||!0===e[Symbol.iterator]().next().done}function a(e){return e[Symbol.iterator]().next().value}function l(e,t){for(const n of e)if(t(n))return!0;return!1}function c(e,t){for(const n of e)if(t(n))return n}function*h(e,t){for(const n of e)t(n)&&(yield n)}function*u(e,t){let n=0;for(const i of e)yield t(i,n++)}function*d(...e){for(const t of e)for(const e of t)yield e}function*p(e){for(const t of e)for(const e of t)yield e}function f(e,t,n){let i=n;for(const o of e)i=t(i,o);return i}function*g(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]}function m(t,n=Number.POSITIVE_INFINITY){const i=[];if(0===n)return[i,t];const o=t[Symbol.iterator]();for(let r=0;r<n;r++){const t=o.next();if(t.done)return[i,e.empty()];i.push(t.value)}return[i,{[Symbol.iterator](){return o}}]}function b(e,t,n=((e,t)=>e===t)){const i=e[Symbol.iterator](),o=t[Symbol.iterator]();while(1){const e=i.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!n(e.value,t.value))return!1}}e.empty=i,e.single=o,e.from=r,e.isEmpty=s,e.first=a,e.some=l,e.find=c,e.filter=h,e.map=u,e.concat=d,e.concatNested=p,e.reduce=f,e.slice=g,e.consume=m,e.equals=b})(Ue||(Ue={}));const Ye=!1;let Ge=null;function Ke(e){Ge=e}if(Ye){const e="__is_disposable_tracked__";Ke(new class{trackDisposable(t){new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]},3e3)}setParent(t,n){if(t&&t!==st.None)try{t[e]=!0}catch(i){}}markAsDisposed(t){if(t&&t!==st.None)try{t[e]=!0}catch(n){}}markAsSingleton(e){}})}function qe(e){return null===Ge||void 0===Ge||Ge.trackDisposable(e),e}function Je(e){null===Ge||void 0===Ge||Ge.markAsDisposed(e)}function $e(e,t){null===Ge||void 0===Ge||Ge.setParent(e,t)}function Xe(e,t){if(Ge)for(const n of e)Ge.setParent(n,t)}function Ze(e){return null===Ge||void 0===Ge||Ge.markAsSingleton(e),e}class et extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function tt(e){return"function"===typeof e.dispose&&0===e.dispose.length}function nt(e){if(Ue.is(e)){let n=[];for(const i of e)if(i)try{i.dispose()}catch(t){n.push(t)}if(1===n.length)throw n[0];if(n.length>1)throw new et(n);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function it(...e){const t=ot(()=>nt(e));return Xe(e,t),t}function ot(e){const t=qe({dispose:He(()=>{Je(t),e()})});return t}class rt{constructor(){this._toDispose=new Set,this._isDisposed=!1,qe(this)}dispose(){this._isDisposed||(Je(this),this._isDisposed=!0,this.clear())}clear(){try{nt(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return $e(e,this),this._isDisposed?rt.DISABLE_DISPOSED_WARNING:this._toDispose.add(e),e}}rt.DISABLE_DISPOSED_WARNING=!1;class st{constructor(){this._store=new rt,qe(this),$e(this._store,this)}dispose(){Je(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}st.None=Object.freeze({dispose(){}});class at{constructor(){this._isDisposed=!1,qe(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&$e(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,Je(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e&&$e(e,null),e}}class lt{constructor(e){this.object=e}dispose(){}}class ct{constructor(e){this.element=e,this.next=ct.Undefined,this.prev=ct.Undefined}}ct.Undefined=new ct(void 0);class ht{constructor(){this._first=ct.Undefined,this._last=ct.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ct.Undefined}clear(){let e=this._first;while(e!==ct.Undefined){const t=e.next;e.prev=ct.Undefined,e.next=ct.Undefined,e=t}this._first=ct.Undefined,this._last=ct.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new ct(e);if(this._first===ct.Undefined)this._first=n,this._last=n;else if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==ct.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ct.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ct.Undefined&&e.next!==ct.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ct.Undefined&&e.next===ct.Undefined?(this._first=ct.Undefined,this._last=ct.Undefined):e.next===ct.Undefined?(this._last=this._last.prev,this._last.next=ct.Undefined):e.prev===ct.Undefined&&(this._first=this._first.next,this._first.prev=ct.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==ct.Undefined)yield e.element,e=e.next}}const ut=b["b"].performance&&"function"===typeof b["b"].performance.now;class dt{constructor(e){this._highResolution=ut&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new dt(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?b["b"].performance.now():Date.now()}}var pt;(function(e){function t(e){return(t,n=null,i)=>{let o,r=!1;return o=e(e=>{if(!r)return o?o.dispose():r=!0,t.call(n,e)},null,i),r&&o.dispose(),o}}function n(e,t){return l((n,i=null,o)=>e(e=>n.call(i,t(e)),null,o))}function i(e,t){return l((n,i=null,o)=>e(e=>{t(e),n.call(i,e)},null,o))}function o(e,t){return l((n,i=null,o)=>e(e=>t(e)&&n.call(i,e),null,o))}function r(e){return e}function s(...e){return(t,n=null,i)=>it(...e.map(e=>e(e=>t.call(n,e),null,i)))}function a(e,t,i){let o=i;return n(e,e=>(o=t(o,e),o))}function l(e){let t;const n=new bt({onFirstListenerAdd(){t=e(n.fire,n)},onLastListenerRemove(){t.dispose()}});return n.event}function c(e,t,n=100,i=!1,o){let r,s=void 0,a=void 0,l=0;const c=new bt({leakWarningThreshold:o,onFirstListenerAdd(){r=e(e=>{l++,s=t(s,e),i&&!a&&(c.fire(s),s=void 0),clearTimeout(a),a=setTimeout(()=>{const e=s;s=void 0,a=void 0,(!i||l>1)&&c.fire(e),l=0},n)})},onLastListenerRemove(){r.dispose()}});return c.event}function h(e,t=((e,t)=>e===t)){let n,i=!0;return o(e,e=>{const o=i||!t(e,n);return i=!1,n=e,o})}function u(t,n){return[e.filter(t,n),e.filter(t,e=>!n(e))]}function d(e,t=!1,n=[]){let i=n.slice(),o=e(e=>{i?i.push(e):s.fire(e)});const r=()=>{i&&i.forEach(e=>s.fire(e)),i=null},s=new bt({onFirstListenerAdd(){o||(o=e(e=>s.fire(e)))},onFirstListenerDidAdd(){i&&(t?setTimeout(r):r())},onLastListenerRemove(){o&&o.dispose(),o=null}});return s.event}e.None=()=>st.None,e.once=t,e.map=n,e.forEach=i,e.filter=o,e.signal=r,e.any=s,e.reduce=a,e.debounce=c,e.latch=h,e.split=u,e.buffer=d;class p{constructor(e){this.event=e}map(e){return new p(n(this.event,e))}forEach(e){return new p(i(this.event,e))}filter(e){return new p(o(this.event,e))}reduce(e,t){return new p(a(this.event,e,t))}latch(){return new p(h(this.event))}debounce(e,t=100,n=!1,i){return new p(c(this.event,e,t,n,i))}on(e,t,n){return this.event(e,t,n)}once(e,n,i){return t(this.event)(e,n,i)}}function f(e){return new p(e)}function g(e,t,n=(e=>e)){const i=(...e)=>s.fire(n(...e)),o=()=>e.on(t,i),r=()=>e.removeListener(t,i),s=new bt({onFirstListenerAdd:o,onLastListenerRemove:r});return s.event}function m(e,t,n=(e=>e)){const i=(...e)=>s.fire(n(...e)),o=()=>e.addEventListener(t,i),r=()=>e.removeEventListener(t,i),s=new bt({onFirstListenerAdd:o,onLastListenerRemove:r});return s.event}function b(e){return new Promise(n=>t(e)(n))}e.chain=f,e.fromNodeEventEmitter=g,e.fromDOMEventEmitter=m,e.toPromise=b})(pt||(pt={}));class ft{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${ft._idPool++}`}start(e){this._stopWatch=new dt(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,this._stopWatch=void 0}}}ft._idPool=0;let gt=-1;class mt{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=gt;if("number"===typeof this.customThreshold&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map);const n=(new Error).stack.split("\n").slice(3).join("\n"),i=this._stacks.get(n)||0;if(this._stacks.set(n,i+1),this._warnCountdown-=1,this._warnCountdown<=0){let e;this._warnCountdown=.5*t;let n=0;for(const[t,i]of this._stacks)(!e||n<i)&&(e=t,n=i)}return()=>{const e=this._stacks.get(n)||0;this._stacks.set(n,e-1)}}}class bt{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=gt>0?new mt(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new ft(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,n)=>{var i;this._listeners||(this._listeners=new ht);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(t?[e,t]:e);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const s=null===(i=this._leakageMon)||void 0===i?void 0:i.check(this._listeners.size),a=ot(()=>{if(s&&s(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const e=this._listeners&&!this._listeners.isEmpty();e||this._options.onLastListenerRemove(this)}});return n instanceof rt?n.add(a):Array.isArray(n)&&n.push(a),a}),this._event}fire(e){var t,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ht);for(let t of this._listeners)this._deliveryQueue.push([t,e]);null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);while(this._deliveryQueue.size>0){const[e,t]=this._deliveryQueue.shift();try{"function"===typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(i){Oe(i)}}null===(n=this._perfMon)||void 0===n||n.stop()}}dispose(){var e,t,n,i,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(i=null===(n=this._options)||void 0===n?void 0:n.onLastListenerRemove)||void 0===i||i.call(n),null===(o=this._leakageMon)||void 0===o||o.dispose())}}class vt extends bt{constructor(e){super(e),this._isPaused=0,this._eventQueue=new ht,this._mergeFn=null===e||void 0===e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0===--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else while(!this._isPaused&&0!==this._eventQueue.size)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class yt extends vt{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class wt{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,i)=>e(e=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>t.call(n,e)):t.call(n,e)},void 0,i)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach(e=>e()),n}}class _t{constructor(){this.listening=!1,this.inputEvent=pt.None,this.inputEventListener=st.None,this.emitter=new bt({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const Ct=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var At;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof Et||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:pt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ct})})(At||(At={}));class Et{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ct:(this._emitter||(this._emitter=new bt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class xt{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Et),this._token}cancel(){this._token?this._token instanceof Et&&this._token.cancel():this._token=At.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Et&&this._token.dispose():this._token=At.None}}class St{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const kt=new St,Dt=new St,Lt=new St;var It;function Nt(e,t){const n=(65535&t)<<16>>>0;return(e|n)>>>0}function Mt(e,t){if(0===e)return null;const n=(65535&e)>>>0,i=(4294901760&e)>>>16;return new Ot(0!==i?[Bt(n,t),Bt(i,t)]:[Bt(n,t)])}function Bt(e,t){const n=!!(2048&e),i=!!(256&e),o=2===t?i:n,r=!!(1024&e),s=!!(512&e),a=2===t?n:i,l=255&e;return new Tt(o,r,s,a,l)}(function(){function e(e,t,n=t,i=n){kt.define(e,t),Dt.define(e,n),Lt.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})(),function(e){function t(e){return kt.keyCodeToStr(e)}function n(e){return kt.strToKeyCode(e)}function i(e){return Dt.keyCodeToStr(e)}function o(e){return Lt.keyCodeToStr(e)}function r(e){return Dt.strToKeyCode(e)||Lt.strToKeyCode(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=i,e.toUserSettingsGeneral=o,e.fromUserSettings=r}(It||(It={}));class Tt{constructor(e,t,n,i,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new Ot([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class Ot{constructor(e){if(0===e.length)throw Ve("parts");this.parts=e}}class Rt{constructor(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o,this.keyAriaLabel=r}}class Pt{}var Ft=n("f940");const jt=65,zt=97,Vt=90,Qt=122,Wt=46,Ht=47,Ut=92,Yt=58,Gt=63;class Kt extends Error{constructor(e,t,n){let i;"string"===typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const o=-1!==e.indexOf(".")?"property":"argument";let r=`The "${e}" ${o} ${i} of type ${t}`;r+=". Received type "+typeof n,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function qt(e,t){if("string"!==typeof e)throw new Kt(t,"string",e)}function Jt(e){return e===Ht||e===Ut}function $t(e){return e===Ht}function Xt(e){return e>=jt&&e<=Vt||e>=zt&&e<=Qt}function Zt(e,t,n,i){let o="",r=0,s=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c<e.length)l=e.charCodeAt(c);else{if(i(l))break;l=Ht}if(i(l)){if(s===c-1||1===a);else if(2===a){if(o.length<2||2!==r||o.charCodeAt(o.length-1)!==Wt||o.charCodeAt(o.length-2)!==Wt){if(o.length>2){const e=o.lastIndexOf(n);-1===e?(o="",r=0):(o=o.slice(0,e),r=o.length-1-o.lastIndexOf(n)),s=c,a=0;continue}if(0!==o.length){o="",r=0,s=c,a=0;continue}}t&&(o+=o.length>0?n+"..":"..",r=2)}else o.length>0?o+=`${n}${e.slice(s+1,c)}`:o=e.slice(s+1,c),r=c-s-1;s=c,a=0}else l===Wt&&-1!==a?++a:a=-1}return o}function en(e,t){if(null===t||"object"!==typeof t)throw new Kt("pathObject","Object",t);const n=t.dir||t.root,i=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const tn={resolve(...e){let t="",n="",i=!1;for(let o=e.length-1;o>=-1;o--){let r;if(o>=0){if(r=e[o],qt(r,"path"),0===r.length)continue}else 0===t.length?r=Ft["a"]():(r=Ft["b"]["="+t]||Ft["a"](),(void 0===r||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===Ut)&&(r=t+"\\"));const s=r.length;let a=0,l="",c=!1;const h=r.charCodeAt(0);if(1===s)Jt(h)&&(a=1,c=!0);else if(Jt(h))if(c=!0,Jt(r.charCodeAt(1))){let e=2,t=e;while(e<s&&!Jt(r.charCodeAt(e)))e++;if(e<s&&e!==t){const n=r.slice(t,e);t=e;while(e<s&&Jt(r.charCodeAt(e)))e++;if(e<s&&e!==t){t=e;while(e<s&&!Jt(r.charCodeAt(e)))e++;e!==s&&e===t||(l=`\\\\${n}\\${r.slice(t,e)}`,a=e)}}}else a=1;else Xt(h)&&r.charCodeAt(1)===Yt&&(l=r.slice(0,2),a=2,s>2&&Jt(r.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(i){if(t.length>0)break}else if(n=`${r.slice(a)}\\${n}`,i=c,c&&t.length>0)break}return n=Zt(n,!i,"\\",Jt),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){qt(e,"path");const t=e.length;if(0===t)return".";let n,i=0,o=!1;const r=e.charCodeAt(0);if(1===t)return $t(r)?"\\":e;if(Jt(r))if(o=!0,Jt(e.charCodeAt(1))){let o=2,r=o;while(o<t&&!Jt(e.charCodeAt(o)))o++;if(o<t&&o!==r){const s=e.slice(r,o);r=o;while(o<t&&Jt(e.charCodeAt(o)))o++;if(o<t&&o!==r){r=o;while(o<t&&!Jt(e.charCodeAt(o)))o++;if(o===t)return`\\\\${s}\\${e.slice(r)}\\`;o!==r&&(n=`\\\\${s}\\${e.slice(r,o)}`,i=o)}}}else i=1;else Xt(r)&&e.charCodeAt(1)===Yt&&(n=e.slice(0,2),i=2,t>2&&Jt(e.charCodeAt(2))&&(o=!0,i=3));let s=i<t?Zt(e.slice(i),!o,"\\",Jt):"";return 0!==s.length||o||(s="."),s.length>0&&Jt(e.charCodeAt(t-1))&&(s+="\\"),void 0===n?o?"\\"+s:s:o?`${n}\\${s}`:`${n}${s}`},isAbsolute(e){qt(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return Jt(n)||t>2&&Xt(n)&&e.charCodeAt(1)===Yt&&Jt(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let r=0;r<e.length;++r){const i=e[r];qt(i,"path"),i.length>0&&(void 0===t?t=n=i:t+="\\"+i)}if(void 0===t)return".";let i=!0,o=0;if("string"===typeof n&&Jt(n.charCodeAt(0))){++o;const e=n.length;e>1&&Jt(n.charCodeAt(1))&&(++o,e>2&&(Jt(n.charCodeAt(2))?++o:i=!1))}if(i){while(o<t.length&&Jt(t.charCodeAt(o)))o++;o>=2&&(t="\\"+t.slice(o))}return tn.normalize(t)},relative(e,t){if(qt(e,"from"),qt(t,"to"),e===t)return"";const n=tn.resolve(e),i=tn.resolve(t);if(n===i)return"";if(e=n.toLowerCase(),t=i.toLowerCase(),e===t)return"";let o=0;while(o<e.length&&e.charCodeAt(o)===Ut)o++;let r=e.length;while(r-1>o&&e.charCodeAt(r-1)===Ut)r--;const s=r-o;let a=0;while(a<t.length&&t.charCodeAt(a)===Ut)a++;let l=t.length;while(l-1>a&&t.charCodeAt(l-1)===Ut)l--;const c=l-a,h=s<c?s:c;let u=-1,d=0;for(;d<h;d++){const n=e.charCodeAt(o+d);if(n!==t.charCodeAt(a+d))break;n===Ut&&(u=d)}if(d!==h){if(-1===u)return i}else{if(c>h){if(t.charCodeAt(a+d)===Ut)return i.slice(a+d+1);if(2===d)return i.slice(a+d)}s>h&&(e.charCodeAt(o+d)===Ut?u=d:2===d&&(u=3)),-1===u&&(u=0)}let p="";for(d=o+u+1;d<=r;++d)d!==r&&e.charCodeAt(d)!==Ut||(p+=0===p.length?"..":"\\..");return a+=u,p.length>0?`${p}${i.slice(a,l)}`:(i.charCodeAt(a)===Ut&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e)return e;if(0===e.length)return"";const t=tn.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Ut){if(t.charCodeAt(1)===Ut){const e=t.charCodeAt(2);if(e!==Gt&&e!==Wt)return"\\\\?\\UNC\\"+t.slice(2)}}else if(Xt(t.charCodeAt(0))&&t.charCodeAt(1)===Yt&&t.charCodeAt(2)===Ut)return"\\\\?\\"+t;return e},dirname(e){qt(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const o=e.charCodeAt(0);if(1===t)return Jt(o)?e:".";if(Jt(o)){if(n=i=1,Jt(e.charCodeAt(1))){let o=2,r=o;while(o<t&&!Jt(e.charCodeAt(o)))o++;if(o<t&&o!==r){r=o;while(o<t&&Jt(e.charCodeAt(o)))o++;if(o<t&&o!==r){r=o;while(o<t&&!Jt(e.charCodeAt(o)))o++;if(o===t)return e;o!==r&&(n=i=o+1)}}}}else Xt(o)&&e.charCodeAt(1)===Yt&&(n=t>2&&Jt(e.charCodeAt(2))?3:2,i=n);let r=-1,s=!0;for(let a=t-1;a>=i;--a)if(Jt(e.charCodeAt(a))){if(!s){r=a;break}}else s=!1;if(-1===r){if(-1===n)return".";r=n}return e.slice(0,r)},basename(e,t){void 0!==t&&qt(t,"ext"),qt(e,"path");let n,i=0,o=-1,r=!0;if(e.length>=2&&Xt(e.charCodeAt(0))&&e.charCodeAt(1)===Yt&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(Jt(l)){if(!r){i=n+1;break}}else-1===a&&(r=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(o=n):(s=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=i;--n)if(Jt(e.charCodeAt(n))){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname(e){qt(e,"path");let t=0,n=-1,i=0,o=-1,r=!0,s=0;e.length>=2&&e.charCodeAt(1)===Yt&&Xt(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(Jt(t)){if(!r){i=a+1;break}}else-1===o&&(r=!1,o=a+1),t===Wt?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1)}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:en.bind(null,"\\"),parse(e){qt(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,o=e.charCodeAt(0);if(1===n)return Jt(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(Jt(o)){if(i=1,Jt(e.charCodeAt(1))){let t=2,o=t;while(t<n&&!Jt(e.charCodeAt(t)))t++;if(t<n&&t!==o){o=t;while(t<n&&Jt(e.charCodeAt(t)))t++;if(t<n&&t!==o){o=t;while(t<n&&!Jt(e.charCodeAt(t)))t++;t===n?i=t:t!==o&&(i=t+1)}}}}else if(Xt(o)&&e.charCodeAt(1)===Yt){if(n<=2)return t.root=t.dir=e,t;if(i=2,Jt(e.charCodeAt(2))){if(3===n)return t.root=t.dir=e,t;i=3}}i>0&&(t.root=e.slice(0,i));let r=-1,s=i,a=-1,l=!0,c=e.length-1,h=0;for(;c>=i;--c)if(o=e.charCodeAt(c),Jt(o)){if(!l){s=c+1;break}}else-1===a&&(l=!1,a=c+1),o===Wt?-1===r?r=c:1!==h&&(h=1):-1!==r&&(h=-1);return-1!==a&&(-1===r||0===h||1===h&&r===a-1&&r===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,r),t.base=e.slice(s,a),t.ext=e.slice(r,a))),t.dir=s>0&&s!==i?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},nn={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const o=i>=0?e[i]:Ft["a"]();qt(o,"path"),0!==o.length&&(t=`${o}/${t}`,n=o.charCodeAt(0)===Ht)}return t=Zt(t,!n,"/",$t),n?"/"+t:t.length>0?t:"."},normalize(e){if(qt(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===Ht,n=e.charCodeAt(e.length-1)===Ht;return e=Zt(e,!t,"/",$t),0===e.length?t?"/":n?"./":".":(n&&(e+="/"),t?"/"+e:e)},isAbsolute(e){return qt(e,"path"),e.length>0&&e.charCodeAt(0)===Ht},join(...e){if(0===e.length)return".";let t;for(let n=0;n<e.length;++n){const i=e[n];qt(i,"path"),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":nn.normalize(t)},relative(e,t){if(qt(e,"from"),qt(t,"to"),e===t)return"";if(e=nn.resolve(e),t=nn.resolve(t),e===t)return"";const n=1,i=e.length,o=i-n,r=1,s=t.length-r,a=o<s?o:s;let l=-1,c=0;for(;c<a;c++){const i=e.charCodeAt(n+c);if(i!==t.charCodeAt(r+c))break;i===Ht&&(l=c)}if(c===a)if(s>a){if(t.charCodeAt(r+c)===Ht)return t.slice(r+c+1);if(0===c)return t.slice(r+c)}else o>a&&(e.charCodeAt(n+c)===Ht?l=c:0===c&&(l=0));let h="";for(c=n+l+1;c<=i;++c)c!==i&&e.charCodeAt(c)!==Ht||(h+=0===h.length?"..":"/..");return`${h}${t.slice(r+l)}`},toNamespacedPath(e){return e},dirname(e){if(qt(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===Ht;let n=-1,i=!0;for(let o=e.length-1;o>=1;--o)if(e.charCodeAt(o)===Ht){if(!i){n=o;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&qt(t,"ext"),qt(e,"path");let n,i=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===Ht){if(!r){i=n+1;break}}else-1===a&&(r=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(o=n):(s=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===Ht){if(!r){i=n+1;break}}else-1===o&&(r=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname(e){qt(e,"path");let t=-1,n=0,i=-1,o=!0,r=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==Ht)-1===i&&(o=!1,i=s+1),a===Wt?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){n=s+1;break}}return-1===t||-1===i||0===r||1===r&&t===i-1&&t===n+1?"":e.slice(t,i)},format:en.bind(null,"/"),parse(e){qt(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===Ht;let i;n?(t.root="/",i=1):i=0;let o=-1,r=0,s=-1,a=!0,l=e.length-1,c=0;for(;l>=i;--l){const t=e.charCodeAt(l);if(t!==Ht)-1===s&&(a=!1,s=l+1),t===Wt?-1===o?o=l:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){r=l+1;break}}if(-1!==s){const i=0===r&&n?1:r;-1===o||0===c||1===c&&o===s-1&&o===r+1?t.base=t.name=e.slice(i,s):(t.name=e.slice(i,o),t.base=e.slice(i,s),t.ext=e.slice(o,s))}return r>0?t.dir=e.slice(0,r-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};nn.win32=tn.win32=tn,nn.posix=tn.posix=nn;const on="win32"===Ft["c"]?tn.normalize:nn.normalize,rn="win32"===Ft["c"]?tn.resolve:nn.resolve,sn="win32"===Ft["c"]?tn.relative:nn.relative,an="win32"===Ft["c"]?tn.dirname:nn.dirname,ln="win32"===Ft["c"]?tn.basename:nn.basename,cn="win32"===Ft["c"]?tn.extname:nn.extname,hn="win32"===Ft["c"]?tn.sep:nn.sep,un=/^\w[\w\d+.-]*$/,dn=/^\//,pn=/^\/\//;function fn(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!un.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!dn.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(pn.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function gn(e,t){return e||t?e:"file"}function mn(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==vn&&(t=vn+t):t=vn;break}return t}const bn="",vn="/",yn=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class wn{constructor(e,t,n,i,o,r=!1){"object"===typeof e?(this.scheme=e.scheme||bn,this.authority=e.authority||bn,this.path=e.path||bn,this.query=e.query||bn,this.fragment=e.fragment||bn):(this.scheme=gn(e,r),this.authority=t||bn,this.path=mn(this.scheme,n||bn),this.query=i||bn,this.fragment=o||bn,fn(this,r))}static isUri(e){return e instanceof wn||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}get fsPath(){return Sn(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=bn),void 0===n?n=this.authority:null===n&&(n=bn),void 0===i?i=this.path:null===i&&(i=bn),void 0===o?o=this.query:null===o&&(o=bn),void 0===r?r=this.fragment:null===r&&(r=bn),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new Cn(t,n,i,o,r)}static parse(e,t=!1){const n=yn.exec(e);return n?new Cn(n[2]||bn,In(n[4]||bn),In(n[5]||bn),In(n[7]||bn),In(n[9]||bn),t):new Cn(bn,bn,bn,bn,bn)}static file(e){let t=bn;if(b["i"]&&(e=e.replace(/\\/g,vn)),e[0]===vn&&e[1]===vn){const n=e.indexOf(vn,2);-1===n?(t=e.substring(2),e=vn):(t=e.substring(2,n),e=e.substring(n)||vn)}return new Cn("file",t,e,bn,bn)}static from(e){const t=new Cn(e.scheme,e.authority,e.path,e.query,e.fragment);return fn(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return n=b["i"]&&"file"===e.scheme?wn.file(tn.join(Sn(e,!0),...t)).path:nn.join(e.path,...t),e.with({path:n})}toString(e=!1){return kn(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof wn)return e;{const t=new Cn(e);return t._formatted=e.external,t._fsPath=e._sep===_n?e.fsPath:null,t}}return e}}const _n=b["i"]?1:void 0;class Cn extends wn{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Sn(this,!1)),this._fsPath}toString(e=!1){return e?kn(this,!0):(this._formatted||(this._formatted=kn(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=_n),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const An={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function En(e,t){let n=void 0,i=-1;for(let o=0;o<e.length;o++){const r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=An[r];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=t):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function xn(e){let t=void 0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=An[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function Sn(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,b["i"]&&(n=n.replace(/\//g,"\\")),n}function kn(e,t){const n=t?xn:En;let i="",{scheme:o,authority:r,path:s,query:a,fragment:l}=e;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=vn,i+=vn),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.indexOf(":"),-1===e?i+=n(t,!1):(i+=n(t.substr(0,e),!1),i+=":",i+=n(t.substr(e+1),!1)),i+="@"}r=r.toLowerCase(),e=r.indexOf(":"),-1===e?i+=n(r,!1):(i+=n(r.substr(0,e),!1),i+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),l&&(i+="#",i+=t?l:En(l,!1)),i}function Dn(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Dn(e.substr(3)):e}}const Ln=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function In(e){return e.match(Ln)?e.replace(Ln,e=>Dn(e)):e}class Nn{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Nn(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Nn.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Nn.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return Nn.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){let n=0|e.lineNumber,i=0|t.lineNumber;if(n===i){let n=0|e.column,i=0|t.column;return n-i}return n-i}clone(){return new Nn(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new Nn(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"===typeof e.lineNumber&&"number"===typeof e.column}}class Mn{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return Mn.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Mn.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))}containsRange(e){return Mn.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))}strictContainsRange(e){return Mn.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return Mn.plusRange(this,e)}static plusRange(e,t){let n,i,o,r;return t.startLineNumber<e.startLineNumber?(n=t.startLineNumber,i=t.startColumn):t.startLineNumber===e.startLineNumber?(n=t.startLineNumber,i=Math.min(t.startColumn,e.startColumn)):(n=e.startLineNumber,i=e.startColumn),t.endLineNumber>e.endLineNumber?(o=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,r=e.endColumn),new Mn(n,i,o,r)}intersectRanges(e){return Mn.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;return n<s?(n=s,i=a):n===s&&(i=Math.max(i,a)),o>l?(o=l,r=c):o===l&&(r=Math.min(r,c)),n>o||n===o&&i>r?null:new Mn(n,i,o,r)}equalsRange(e){return Mn.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Mn.getEndPosition(this)}static getEndPosition(e){return new Nn(e.endLineNumber,e.endColumn)}getStartPosition(){return Mn.getStartPosition(this)}static getStartPosition(e){return new Nn(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Mn(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Mn(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Mn.collapseToStart(this)}static collapseToStart(e){return new Mn(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new Mn(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Mn(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const n=0|e.startLineNumber,i=0|t.startLineNumber;if(n===i){const n=0|e.startColumn,i=0|t.startColumn;if(n===i){const n=0|e.endLineNumber,i=0|t.endLineNumber;if(n===i){const n=0|e.endColumn,i=0|t.endColumn;return n-i}return n-i}return n-i}return n-i}const n=e?1:0,i=t?1:0;return n-i}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}}class Bn extends Mn{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Bn.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new Bn(this.startLineNumber,this.startColumn,e,t):new Bn(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Nn(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new Bn(e,t,this.endLineNumber,this.endColumn):new Bn(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Bn(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new Bn(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0}static isISelection(e){return e&&"number"===typeof e.selectionStartLineNumber&&"number"===typeof e.selectionStartColumn&&"number"===typeof e.positionLineNumber&&"number"===typeof e.positionColumn}static createWithDirection(e,t,n,i,o){return 0===o?new Bn(e,t,n,i):new Bn(n,i,e,t)}}class Tn{constructor(e,t,n){this._tokenBrand=void 0,this.offset=0|e,this.type=t,this.language=n}toString(){return"("+this.offset+", "+this.type+")"}}class On{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class Rn{constructor(e,t){this._tokenizationResult2Brand=void 0,this.tokens=e,this.endState=t}}var Pn,Fn,jn,zn,Vn,Qn,Wn,Hn,Un,Yn,Gn,Kn,qn,Jn,$n,Xn,Zn,ei,ti,ni,ii,oi,ri,si,ai,li,ci,hi,ui,di,pi,fi,gi,mi,bi;(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(Pn||(Pn={})),function(e){e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(Fn||(Fn={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(jn||(jn={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(zn||(zn={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(Vn||(Vn={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(Qn||(Qn={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(Wn||(Wn={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(Hn||(Hn={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(Un||(Un={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(Yn||(Yn={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["autoClosingBrackets"]=5]="autoClosingBrackets",e[e["autoClosingDelete"]=6]="autoClosingDelete",e[e["autoClosingOvertype"]=7]="autoClosingOvertype",e[e["autoClosingQuotes"]=8]="autoClosingQuotes",e[e["autoIndent"]=9]="autoIndent",e[e["automaticLayout"]=10]="automaticLayout",e[e["autoSurround"]=11]="autoSurround",e[e["bracketPairColorization"]=12]="bracketPairColorization",e[e["guides"]=13]="guides",e[e["codeLens"]=14]="codeLens",e[e["codeLensFontFamily"]=15]="codeLensFontFamily",e[e["codeLensFontSize"]=16]="codeLensFontSize",e[e["colorDecorators"]=17]="colorDecorators",e[e["columnSelection"]=18]="columnSelection",e[e["comments"]=19]="comments",e[e["contextmenu"]=20]="contextmenu",e[e["copyWithSyntaxHighlighting"]=21]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=22]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=23]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=24]="cursorStyle",e[e["cursorSurroundingLines"]=25]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=26]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=27]="cursorWidth",e[e["disableLayerHinting"]=28]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=29]="disableMonospaceOptimizations",e[e["domReadOnly"]=30]="domReadOnly",e[e["dragAndDrop"]=31]="dragAndDrop",e[e["emptySelectionClipboard"]=32]="emptySelectionClipboard",e[e["extraEditorClassName"]=33]="extraEditorClassName",e[e["fastScrollSensitivity"]=34]="fastScrollSensitivity",e[e["find"]=35]="find",e[e["fixedOverflowWidgets"]=36]="fixedOverflowWidgets",e[e["folding"]=37]="folding",e[e["foldingStrategy"]=38]="foldingStrategy",e[e["foldingHighlight"]=39]="foldingHighlight",e[e["foldingImportsByDefault"]=40]="foldingImportsByDefault",e[e["unfoldOnClickAfterEndOfLine"]=41]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=42]="fontFamily",e[e["fontInfo"]=43]="fontInfo",e[e["fontLigatures"]=44]="fontLigatures",e[e["fontSize"]=45]="fontSize",e[e["fontWeight"]=46]="fontWeight",e[e["formatOnPaste"]=47]="formatOnPaste",e[e["formatOnType"]=48]="formatOnType",e[e["glyphMargin"]=49]="glyphMargin",e[e["gotoLocation"]=50]="gotoLocation",e[e["hideCursorInOverviewRuler"]=51]="hideCursorInOverviewRuler",e[e["hover"]=52]="hover",e[e["inDiffEditor"]=53]="inDiffEditor",e[e["inlineSuggest"]=54]="inlineSuggest",e[e["letterSpacing"]=55]="letterSpacing",e[e["lightbulb"]=56]="lightbulb",e[e["lineDecorationsWidth"]=57]="lineDecorationsWidth",e[e["lineHeight"]=58]="lineHeight",e[e["lineNumbers"]=59]="lineNumbers",e[e["lineNumbersMinChars"]=60]="lineNumbersMinChars",e[e["linkedEditing"]=61]="linkedEditing",e[e["links"]=62]="links",e[e["matchBrackets"]=63]="matchBrackets",e[e["minimap"]=64]="minimap",e[e["mouseStyle"]=65]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=66]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=67]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=68]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=69]="multiCursorModifier",e[e["multiCursorPaste"]=70]="multiCursorPaste",e[e["occurrencesHighlight"]=71]="occurrencesHighlight",e[e["overviewRulerBorder"]=72]="overviewRulerBorder",e[e["overviewRulerLanes"]=73]="overviewRulerLanes",e[e["padding"]=74]="padding",e[e["parameterHints"]=75]="parameterHints",e[e["peekWidgetDefaultFocus"]=76]="peekWidgetDefaultFocus",e[e["definitionLinkOpensInPeek"]=77]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=78]="quickSuggestions",e[e["quickSuggestionsDelay"]=79]="quickSuggestionsDelay",e[e["readOnly"]=80]="readOnly",e[e["renameOnType"]=81]="renameOnType",e[e["renderControlCharacters"]=82]="renderControlCharacters",e[e["renderFinalNewline"]=83]="renderFinalNewline",e[e["renderLineHighlight"]=84]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=85]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=86]="renderValidationDecorations",e[e["renderWhitespace"]=87]="renderWhitespace",e[e["revealHorizontalRightPadding"]=88]="revealHorizontalRightPadding",e[e["roundedSelection"]=89]="roundedSelection",e[e["rulers"]=90]="rulers",e[e["scrollbar"]=91]="scrollbar",e[e["scrollBeyondLastColumn"]=92]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=93]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=94]="scrollPredominantAxis",e[e["selectionClipboard"]=95]="selectionClipboard",e[e["selectionHighlight"]=96]="selectionHighlight",e[e["selectOnLineNumbers"]=97]="selectOnLineNumbers",e[e["showFoldingControls"]=98]="showFoldingControls",e[e["showUnused"]=99]="showUnused",e[e["snippetSuggestions"]=100]="snippetSuggestions",e[e["smartSelect"]=101]="smartSelect",e[e["smoothScrolling"]=102]="smoothScrolling",e[e["stickyTabStops"]=103]="stickyTabStops",e[e["stopRenderingLineAfter"]=104]="stopRenderingLineAfter",e[e["suggest"]=105]="suggest",e[e["suggestFontSize"]=106]="suggestFontSize",e[e["suggestLineHeight"]=107]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=108]="suggestOnTriggerCharacters",e[e["suggestSelection"]=109]="suggestSelection",e[e["tabCompletion"]=110]="tabCompletion",e[e["tabIndex"]=111]="tabIndex",e[e["unusualLineTerminators"]=112]="unusualLineTerminators",e[e["useShadowDOM"]=113]="useShadowDOM",e[e["useTabStops"]=114]="useTabStops",e[e["wordSeparators"]=115]="wordSeparators",e[e["wordWrap"]=116]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=117]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=118]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=119]="wordWrapColumn",e[e["wordWrapOverride1"]=120]="wordWrapOverride1",e[e["wordWrapOverride2"]=121]="wordWrapOverride2",e[e["wrappingIndent"]=122]="wrappingIndent",e[e["wrappingStrategy"]=123]="wrappingStrategy",e[e["showDeprecated"]=124]="showDeprecated",e[e["inlayHints"]=125]="inlayHints",e[e["editorClassName"]=126]="editorClassName",e[e["pixelRatio"]=127]="pixelRatio",e[e["tabFocusMode"]=128]="tabFocusMode",e[e["layoutInfo"]=129]="layoutInfo",e[e["wrappingInfo"]=130]="wrappingInfo"}(Gn||(Gn={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(Kn||(Kn={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(qn||(qn={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(Jn||(Jn={})),function(e){e[e["Other"]=0]="Other",e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}($n||($n={})),function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"}(Xn||(Xn={})),function(e){e[e["DependsOnKbLayout"]=-1]="DependsOnKbLayout",e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["KEY_0"]=21]="KEY_0",e[e["KEY_1"]=22]="KEY_1",e[e["KEY_2"]=23]="KEY_2",e[e["KEY_3"]=24]="KEY_3",e[e["KEY_4"]=25]="KEY_4",e[e["KEY_5"]=26]="KEY_5",e[e["KEY_6"]=27]="KEY_6",e[e["KEY_7"]=28]="KEY_7",e[e["KEY_8"]=29]="KEY_8",e[e["KEY_9"]=30]="KEY_9",e[e["KEY_A"]=31]="KEY_A",e[e["KEY_B"]=32]="KEY_B",e[e["KEY_C"]=33]="KEY_C",e[e["KEY_D"]=34]="KEY_D",e[e["KEY_E"]=35]="KEY_E",e[e["KEY_F"]=36]="KEY_F",e[e["KEY_G"]=37]="KEY_G",e[e["KEY_H"]=38]="KEY_H",e[e["KEY_I"]=39]="KEY_I",e[e["KEY_J"]=40]="KEY_J",e[e["KEY_K"]=41]="KEY_K",e[e["KEY_L"]=42]="KEY_L",e[e["KEY_M"]=43]="KEY_M",e[e["KEY_N"]=44]="KEY_N",e[e["KEY_O"]=45]="KEY_O",e[e["KEY_P"]=46]="KEY_P",e[e["KEY_Q"]=47]="KEY_Q",e[e["KEY_R"]=48]="KEY_R",e[e["KEY_S"]=49]="KEY_S",e[e["KEY_T"]=50]="KEY_T",e[e["KEY_U"]=51]="KEY_U",e[e["KEY_V"]=52]="KEY_V",e[e["KEY_W"]=53]="KEY_W",e[e["KEY_X"]=54]="KEY_X",e[e["KEY_Y"]=55]="KEY_Y",e[e["KEY_Z"]=56]="KEY_Z",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["NumLock"]=78]="NumLock",e[e["ScrollLock"]=79]="ScrollLock",e[e["US_SEMICOLON"]=80]="US_SEMICOLON",e[e["US_EQUAL"]=81]="US_EQUAL",e[e["US_COMMA"]=82]="US_COMMA",e[e["US_MINUS"]=83]="US_MINUS",e[e["US_DOT"]=84]="US_DOT",e[e["US_SLASH"]=85]="US_SLASH",e[e["US_BACKTICK"]=86]="US_BACKTICK",e[e["US_OPEN_SQUARE_BRACKET"]=87]="US_OPEN_SQUARE_BRACKET",e[e["US_BACKSLASH"]=88]="US_BACKSLASH",e[e["US_CLOSE_SQUARE_BRACKET"]=89]="US_CLOSE_SQUARE_BRACKET",e[e["US_QUOTE"]=90]="US_QUOTE",e[e["OEM_8"]=91]="OEM_8",e[e["OEM_102"]=92]="OEM_102",e[e["NUMPAD_0"]=93]="NUMPAD_0",e[e["NUMPAD_1"]=94]="NUMPAD_1",e[e["NUMPAD_2"]=95]="NUMPAD_2",e[e["NUMPAD_3"]=96]="NUMPAD_3",e[e["NUMPAD_4"]=97]="NUMPAD_4",e[e["NUMPAD_5"]=98]="NUMPAD_5",e[e["NUMPAD_6"]=99]="NUMPAD_6",e[e["NUMPAD_7"]=100]="NUMPAD_7",e[e["NUMPAD_8"]=101]="NUMPAD_8",e[e["NUMPAD_9"]=102]="NUMPAD_9",e[e["NUMPAD_MULTIPLY"]=103]="NUMPAD_MULTIPLY",e[e["NUMPAD_ADD"]=104]="NUMPAD_ADD",e[e["NUMPAD_SEPARATOR"]=105]="NUMPAD_SEPARATOR",e[e["NUMPAD_SUBTRACT"]=106]="NUMPAD_SUBTRACT",e[e["NUMPAD_DECIMAL"]=107]="NUMPAD_DECIMAL",e[e["NUMPAD_DIVIDE"]=108]="NUMPAD_DIVIDE",e[e["KEY_IN_COMPOSITION"]=109]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=110]="ABNT_C1",e[e["ABNT_C2"]=111]="ABNT_C2",e[e["MAX_VALUE"]=112]="MAX_VALUE"}(Zn||(Zn={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(ei||(ei={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(ti||(ti={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(ni||(ni={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(ii||(ii={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(oi||(oi={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(ri||(ri={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(si||(si={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(ai||(ai={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(li||(li={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(ci||(ci={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(hi||(hi={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(ui||(ui={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(di||(di={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(pi||(pi={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(fi||(fi={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(gi||(gi={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(mi||(mi={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(bi||(bi={}));class vi{static chord(e,t){return Nt(e,t)}}function yi(){return{editor:void 0,languages:void 0,CancellationTokenSource:xt,Emitter:bt,KeyCode:Zn,KeyMod:vi,Position:Nn,Range:Mn,Selection:Bn,SelectionDirection:hi,MarkerSeverity:ei,MarkerTag:ti,Uri:wn,Token:Tn}}vi.CtrlCmd=2048,vi.Shift=1024,vi.Alt=512,vi.WinCtrl=256;var wi;n("769f");(function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t})(wi||(wi={}));const _i=Ai("instantiationService");function Ci(e,t,n,i){t[wi.DI_TARGET]===t?t[wi.DI_DEPENDENCIES].push({id:e,index:n,optional:i}):(t[wi.DI_DEPENDENCIES]=[{id:e,index:n,optional:i}],t[wi.DI_TARGET]=t)}function Ai(e){if(wi.serviceIds.has(e))return wi.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Ci(t,e,i,!1)};return t.toString=()=>e,wi.serviceIds.set(e,t),t}function Ei(e){return function(t,n,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");Ci(e,t,i,!0)}}const xi=Ai("codeEditorService");class Si{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new bt,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}}function ki(){return Si.INSTANCE.getZoomLevel()}function Di(){return Si.INSTANCE.getTimeSinceLastZoomLevelChanged()}function Li(e){return Si.INSTANCE.onDidChangeZoomLevel(e)}function Ii(){return Si.INSTANCE.getZoomFactor()}function Ni(){return Si.INSTANCE.getPixelRatio()}Si.INSTANCE=new Si;const Mi=navigator.userAgent,Bi=Mi.indexOf("Firefox")>=0,Ti=Mi.indexOf("AppleWebKit")>=0,Oi=Mi.indexOf("Chrome")>=0,Ri=!Oi&&Mi.indexOf("Safari")>=0,Pi=!Oi&&!Ri&&Ti,Fi=Mi.indexOf("Android")>=0,ji=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,zi={clipboard:{writeText:b["g"]||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:b["g"]||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>b["g"]||ji?0:navigator.keyboard||Ri?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};let Vi=new Array(230),Qi=new Array(112);function Wi(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return It.fromString(t)}return Vi[e.keyCode]||0}(function(){for(let t=0;t<Qi.length;t++)Qi[t]=-1;function e(e,t){Vi[e]=t,Qi[t]=e}e(3,7),e(8,1),e(9,2),e(13,3),e(16,4),e(17,5),e(18,6),e(19,7),e(20,8),e(27,9),e(32,10),e(33,11),e(34,12),e(35,13),e(36,14),e(37,15),e(38,16),e(39,17),e(40,18),e(45,19),e(46,20),e(48,21),e(49,22),e(50,23),e(51,24),e(52,25),e(53,26),e(54,27),e(55,28),e(56,29),e(57,30),e(65,31),e(66,32),e(67,33),e(68,34),e(69,35),e(70,36),e(71,37),e(72,38),e(73,39),e(74,40),e(75,41),e(76,42),e(77,43),e(78,44),e(79,45),e(80,46),e(81,47),e(82,48),e(83,49),e(84,50),e(85,51),e(86,52),e(87,53),e(88,54),e(89,55),e(90,56),e(93,58),e(96,93),e(97,94),e(98,95),e(99,96),e(100,97),e(101,98),e(102,99),e(103,100),e(104,101),e(105,102),e(106,103),e(107,104),e(108,105),e(109,106),e(110,107),e(111,108),e(112,59),e(113,60),e(114,61),e(115,62),e(116,63),e(117,64),e(118,65),e(119,66),e(120,67),e(121,68),e(122,69),e(123,70),e(124,71),e(125,72),e(126,73),e(127,74),e(128,75),e(129,76),e(130,77),e(144,78),e(145,79),e(186,80),e(187,81),e(188,82),e(189,83),e(190,84),e(191,85),e(192,86),e(193,110),e(194,111),e(219,87),e(220,88),e(221,89),e(222,90),e(223,91),e(226,92),e(229,109),Bi?(e(59,80),e(107,81),e(109,83),b["f"]&&e(224,57)):Ti&&(e(91,57),b["f"]?e(93,57):e(92,57))})();const Hi=b["f"]?256:2048,Ui=512,Yi=1024,Gi=b["f"]?2048:256;class Ki{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=Wi(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=Hi),this.altKey&&(t|=Ui),this.shiftKey&&(t|=Yi),this.metaKey&&(t|=Gi),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new Tt(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let qi=!1,Ji=null;function $i(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if("null"!==t.origin&&"null"!==n.origin&&t.origin!==n.origin)return qi=!0,null}catch(t){return qi=!0,null}return e.parent}class Xi{static getSameOriginWindowChain(){if(!Ji){Ji=[];let e,t=window;do{e=$i(t),e?Ji.push({window:t,iframeElement:t.frameElement||null}):Ji.push({window:t,iframeElement:null}),t=e}while(t)}return Ji.slice(0)}static hasDifferentOriginAncestor(){return Ji||this.getSameOriginWindowChain(),qi}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,i=0,o=this.getSameOriginWindowChain();for(const r of o){if(n+=r.window.scrollY,i+=r.window.scrollX,r.window===t)break;if(!r.iframeElement)break;let e=r.iframeElement.getBoundingClientRect();n+=e.top,i+=e.left}return{top:n,left:i}}}class Zi{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"===typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=Xi.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class eo{constructor(e,t=0,n=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){let t=e,n=e;if("undefined"!==typeof t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if("undefined"!==typeof n.VERTICAL_AXIS&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?Bi&&!b["f"]?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if("undefined"!==typeof t.wheelDeltaX)Ri&&b["i"]?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if("undefined"!==typeof n.HORIZONTAL_AXIS&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?Bi&&!b["f"]?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}var to=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function no(e){return!!e&&"function"===typeof e.then}function io(e){const t=new xt,n=e(t.token),i=new Promise((e,i)=>{const o=t.token.onCancellationRequested(()=>{o.dispose(),t.dispose(),i(ze())});Promise.resolve(n).then(n=>{o.dispose(),t.dispose(),e(n)},e=>{o.dispose(),t.dispose(),i(e)})});return new class{cancel(){t.cancel()}then(e,t){return i.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return i.finally(e)}}}class oo{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise(t=>{this.activePromise.then(e,e).then(t)})}return new Promise((e,t)=>{this.queuedPromise.then(e,t)})}return this.activePromise=e(),new Promise((e,t)=>{this.activePromise.then(t=>{this.activePromise=null,e(t)},e=>{this.activePromise=null,t(e)})})}}class ro{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(ze()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}class so{constructor(e){this.delayer=new ro(e),this.throttler=new oo}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}dispose(){this.delayer.dispose()}}function ao(e,t){return t?new Promise((n,i)=>{const o=setTimeout(()=>{r.dispose(),n()},e),r=t.onCancellationRequested(()=>{clearTimeout(o),r.dispose(),i(ze())})}):io(t=>ao(e,t))}function lo(e,t=0){const n=setTimeout(e,t);return ot(()=>clearTimeout(n))}class co{constructor(e,t){this._token=-1,"function"===typeof e&&"number"===typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class ho{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class uo{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let po;(function(){po="function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback?e=>{const t=setTimeout(()=>{const t=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,t-Date.now())}}))});let n=!1;return{dispose(){n||(n=!0,clearTimeout(t))}}}:(e,t)=>{const n=requestIdleCallback(e,"number"===typeof t?{timeout:t}:void 0);let i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(n))}}}})();class fo{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=po(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}var go,mo;(function(e){function t(e){return to(this,void 0,void 0,(function*(){let t=void 0;const n=yield Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if("undefined"!==typeof t)throw t;return n}))}e.settled=t})(go||(go={})),function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp"}(mo||(mo={}));class bo{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&(n=`[${n}]`);const i=this._ports[t],o=this._connectionTokens[t];let r="path="+encodeURIComponent(e.path);return"string"===typeof o&&(r+="&tkn="+encodeURIComponent(o)),wn.from({scheme:b["h"]?this._preferredWebSchema:mo.vscodeRemoteResource,authority:`${n}:${i}`,path:"/vscode-remote-resource",query:r})}}const vo=new bo;class yo{asBrowserUri(e,t){const n=this.toUri(e,t);return n.scheme===mo.vscodeRemote?vo.rewrite(n):n.scheme===mo.file&&(b["g"]||"function"===typeof b["b"].importScripts&&b["b"].origin===`${mo.vscodeFileResource}://${yo.FALLBACK_AUTHORITY}`)?n.with({scheme:mo.vscodeFileResource,authority:n.authority||yo.FALLBACK_AUTHORITY,query:null,fragment:null}):n}toUri(e,t){return wn.isUri(e)?e:wn.parse(t.toUrl(e))}}yo.FALLBACK_AUTHORITY="vscode-app";const wo=new yo;function _o(e){while(e.firstChild)e.firstChild.remove()}function Co(e){var t;return null!==(t=null===e||void 0===e?void 0:e.isConnected)&&void 0!==t&&t}class Ao{constructor(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._options=i||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function Eo(e,t,n,i){return new Ao(e,t,n,i)}function xo(e){return function(t){return e(new Zi(t))}}function So(e){return function(t){return e(new Ki(t))}}let ko=function(e,t,n,i){let o=n;return"click"===t||"mousedown"===t?o=xo(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=So(n)),Eo(e,t,o,i)};function Do(e,t){return Eo(e,"mouseout",n=>{let i=n.relatedTarget;while(i&&i!==e)i=i.parentNode;i!==e&&t(n)})}function Lo(e,t){return Eo(e,"pointerout",n=>{let i=n.relatedTarget;while(i&&i!==e)i=i.parentNode;i!==e&&t(n)})}let Io,No,Mo=null;function Bo(e){if(!Mo){const e=e=>setTimeout(()=>e((new Date).getTime()),0);Mo=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}return Mo.call(self,e)}class To{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Oe(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let e=[],t=null,n=!1,i=!1,o=()=>{n=!1,t=e,e=[],i=!0;while(t.length>0){t.sort(To.sort);let e=t.shift();e.execute()}i=!1};No=(t,i=0)=>{let r=new To(t,i);return e.push(r),n||(n=!0,Bo(o)),r},Io=(e,n)=>{if(i){let i=new To(e,n);return t.push(i),i}return No(e,n)}})();const Oo=8,Ro=function(e,t){return t};class Po extends st{constructor(e,t,n,i=Ro,o=Oo){super();let r=null,s=0,a=this._register(new co),l=()=>{s=(new Date).getTime(),n(r),r=null};this._register(Eo(e,t,e=>{r=i(r,e);let t=(new Date).getTime()-s;t>=o?(a.cancel(),l()):a.setIfNotSet(l,o-t)}))}}function Fo(e,t,n,i,o){return new Po(e,t,n,i,o)}function jo(e){return document.defaultView.getComputedStyle(e,null)}function zo(e){if(e!==document.body)return new Qo(e.clientWidth,e.clientHeight);if(b["c"]&&window.visualViewport)return new Qo(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new Qo(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new Qo(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new Qo(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Vo{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let i=jo(e),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),Vo.convertToPixels(e,o)}static getBorderLeftWidth(e){return Vo.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Vo.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Vo.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Vo.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Vo.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Vo.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Vo.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Vo.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Vo.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Vo.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Vo.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Vo.getDimension(e,"margin-bottom","marginBottom")}}class Qo{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Qo(e,t):this}static is(e){return"object"===typeof e&&"number"===typeof e.height&&"number"===typeof e.width}static lift(e){return e instanceof Qo?e:new Qo(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function Wo(e){let t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;while(null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement){n-=e.scrollTop;const o=Zo(e)?null:jo(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=Vo.getBorderLeftWidth(e),n+=Vo.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function Ho(e){let t=e.getBoundingClientRect();return{left:t.left+Uo.scrollX,top:t.top+Uo.scrollY,width:t.width,height:t.height}}const Uo=new class{get scrollX(){return"number"===typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"===typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function Yo(e){let t=Vo.getMarginLeft(e)+Vo.getMarginRight(e);return e.offsetWidth+t}function Go(e){let t=Vo.getBorderLeftWidth(e)+Vo.getBorderRightWidth(e),n=Vo.getPaddingLeft(e)+Vo.getPaddingRight(e);return e.offsetWidth-t-n}function Ko(e){let t=Vo.getBorderTopWidth(e)+Vo.getBorderBottomWidth(e),n=Vo.getPaddingTop(e)+Vo.getPaddingBottom(e);return e.offsetHeight-t-n}function qo(e){let t=Vo.getMarginTop(e)+Vo.getMarginBottom(e);return e.offsetHeight+t}function Jo(e,t){while(e){if(e===t)return!0;e=e.parentNode}return!1}function $o(e,t,n){while(e&&e.nodeType===e.ELEMENT_NODE){if(e.classList.contains(t))return e;if(n)if("string"===typeof n){if(e.classList.contains(n))return null}else if(e===n)return null;e=e.parentNode}return null}function Xo(e,t,n){return!!$o(e,t,n)}function Zo(e){return e&&!!e.host&&!!e.mode}function er(e){return!!tr(e)}function tr(e){while(e.parentNode){if(e===document.body)return null;e=e.parentNode}return Zo(e)?e:null}function nr(){let e=document.activeElement;while(null===e||void 0===e?void 0:e.shadowRoot)e=e.shadowRoot.activeElement;return e}function ir(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let or=null;function rr(){return or||(or=ir()),or}function sr(e){var t,n;return(null===(t=null===e||void 0===e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(n=null===e||void 0===e?void 0:e.sheet)||void 0===n?void 0:n.cssRules)?e.sheet.cssRules:[]}function ar(e,t,n=rr()){n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)}function lr(e,t=rr()){if(!t)return;let n=sr(t),i=[];for(let o=0;o<n.length;o++){let t=n[o];-1!==t.selectorText.indexOf(e)&&i.push(o)}for(let o=i.length-1;o>=0;o--)t.sheet.deleteRule(i[o])}function cr(e){return"object"===typeof HTMLElement?e instanceof HTMLElement:e&&"object"===typeof e&&1===e.nodeType&&"string"===typeof e.nodeName}const hr={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Ti?"webkitAnimationStart":"animationstart",ANIMATION_END:Ti?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Ti?"webkitAnimationIteration":"animationiteration"},ur={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function dr(e){let t=[];for(let n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function pr(e,t){for(let n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}class fr extends st{constructor(e){super(),this._onDidFocus=this._register(new bt),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new bt),this.onDidBlur=this._onDidBlur.event;let t=Jo(document.activeElement,e),n=!1;const i=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(n=!0,window.setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{let n=Jo(document.activeElement,e);n!==t&&(t?o():i())},this._register(Eo(e,hr.FOCUS,i,!0)),this._register(Eo(e,hr.BLUR,o,!0))}}function gr(e){return new fr(e)}function mr(e,...t){if(e.append(...t),1===t.length&&"string"!==typeof t[0])return t[0]}function br(e,...t){e.innerText="",mr(e,...t)}const vr=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var yr;function wr(e,t,n,...i){let o=vr.exec(t);if(!o)throw new Error("Bad use of emmet");n=Object.assign({},n||{});let r,s=o[1]||"div";return r=e!==yr.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),Object.keys(n).forEach(e=>{const t=n[e];"undefined"!==typeof t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))}),r.append(...i),r}function _r(e,t,...n){return wr(yr.HTML,e,t,...n)}function Cr(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function Ar(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function Er(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function xr(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function Sr(e){window.open(e,"_blank","noopener")}function kr(e){const t=()=>{e(),n=No(t)};let n=No(t);return ot(()=>n.dispose())}function Dr(e){return e?`url('${wo.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Lr(e){return`'${e.replace(/'/g,"%27")}'`}(function(e){e["HTML"]="http://www.w3.org/1999/xhtml",e["SVG"]="http://www.w3.org/2000/svg"})(yr||(yr={})),_r.SVG=function(e,t,...n){return wr(yr.SVG,e,t,...n)},vo.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class Ir extends bt{constructor(){super(),this._subscriptions=new rt,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Eo(window,"keydown",e=>{if(e.defaultPrevented)return;const t=new Ki(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(Eo(window,"keyup",e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(Eo(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(Eo(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(Eo(document.body,"mousemove",e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(Eo(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Ir.instance||(Ir.instance=new Ir),Ir.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function Nr(e,t){const n=window.matchMedia(e);"function"===typeof n.addEventListener?n.addEventListener("change",t):n.addListener(t)}function Mr(e){return!e||"string"!==typeof e||0===e.trim().length}const Br=/{(\d+)}/g;function Tr(e,...t){return 0===t.length?e:e.replace(Br,(function(e,n){const i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]}))}function Or(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}function Rr(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Pr(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;while(e.indexOf(t,i)===i)i+=n;return e.substring(i)}function Fr(e,t){if(!e||!t)return e;const n=t.length,i=e.length;if(0===n||0===i)return e;let o=i,r=-1;while(1){if(r=e.lastIndexOf(t,o-1),-1===r||r+n!==o)break;if(0===r)return"";o=r}return e.substring(0,o)}function jr(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function zr(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=Rr(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function Vr(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function Qr(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function Wr(e){return e.split(/\r\n|\r|\n/)}function Hr(e){for(let t=0,n=e.length;t<n;t++){const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}return-1}function Ur(e,t=0,n=e.length){for(let i=t;i<n;i++){const n=e.charCodeAt(i);if(32!==n&&9!==n)return e.substring(t,i)}return e.substring(t,n)}function Yr(e,t=e.length-1){for(let n=t;n>=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function Gr(e,t){return e<t?-1:e>t?1:0}function Kr(e,t,n=0,i=e.length,o=0,r=t.length){for(;n<i&&o<r;n++,o++){let i=e.charCodeAt(n),r=t.charCodeAt(o);if(i<r)return-1;if(i>r)return 1}const s=i-n,a=r-o;return s<a?-1:s>a?1:0}function qr(e,t){return Jr(e,t,0,e.length,0,t.length)}function Jr(e,t,n=0,i=e.length,o=0,r=t.length){for(;n<i&&o<r;n++,o++){let s=e.charCodeAt(n),a=t.charCodeAt(o);if(s===a)continue;const l=s-a;if((32!==l||!Xr(a))&&(-32!==l||!Xr(s)))return $r(s)&&$r(a)?l:Kr(e.toLowerCase(),t.toLowerCase(),n,i,o,r)}const s=i-n,a=r-o;return s<a?-1:s>a?1:0}function $r(e){return e>=97&&e<=122}function Xr(e){return e>=65&&e<=90}function Zr(e){return $r(e)||Xr(e)}function es(e,t){return e.length===t.length&&ts(e,t)}function ts(e,t,n=e.length){for(let i=0;i<n;i++){const n=e.charCodeAt(i),o=t.charCodeAt(i);if(n!==o)if(Zr(n)&&Zr(o)){const e=Math.abs(n-o);if(0!==e&&32!==e)return!1}else if(String.fromCharCode(n).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function ns(e,t){const n=t.length;return!(t.length>e.length)&&ts(e,t,n)}function is(e,t){let n,i=Math.min(e.length,t.length);for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i}function os(e,t){let n,i=Math.min(e.length,t.length);const o=e.length-1,r=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(o-n)!==t.charCodeAt(r-n))return n;return i}function rs(e){return 55296<=e&&e<=56319}function ss(e){return 56320<=e&&e<=57343}function as(e,t){return t-56320+(e-55296<<10)+65536}function ls(e,t,n){const i=e.charCodeAt(n);if(rs(i)&&n+1<t){const t=e.charCodeAt(n+1);if(ss(t))return as(i,t)}return i}function cs(e,t){const n=e.charCodeAt(t-1);if(ss(n)&&t>1){const i=e.charCodeAt(t-2);if(rs(i))return as(i,n)}return n}function hs(e,t){const n=Ds.getInstance(),i=t,o=e.length,r=ls(e,o,t);t+=r>=65536?2:1;let s=n.getGraphemeBreakType(r);while(t<o){const i=ls(e,o,t),r=n.getGraphemeBreakType(i);if(ks(s,r))break;t+=i>=65536?2:1,s=r}return t-i}function us(e,t){const n=Ds.getInstance(),i=t,o=cs(e,t);t-=o>=65536?2:1;let r=n.getGraphemeBreakType(o);while(t>0){const i=cs(e,t),o=n.getGraphemeBreakType(i);if(ks(o,r))break;t-=i>=65536?2:1,r=o}return i-t}const ds=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function ps(e){return ds.test(e)}const fs=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function gs(e){return fs.test(e)}const ms=/^[\t\n\r\x20-\x7E]*$/;function bs(e){return ms.test(e)}const vs=/[\u2028\u2029]/;function ys(e){return vs.test(e)}function ws(e){for(let t=0,n=e.length;t<n;t++)if(_s(e.charCodeAt(t)))return!0;return!1}function _s(e){return e=+e,e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Cs(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129750}const As=String.fromCharCode(65279);function Es(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function xs(e){const t=26;return e%=2*t,e<t?String.fromCharCode(97+e):String.fromCharCode(65+e-t)}function Ss(e){const t=Ds.getInstance();return t.getGraphemeBreakType(e)}function ks(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}class Ds{constructor(){this._data=Ls()}static getInstance(){return Ds._INSTANCE||(Ds._INSTANCE=new Ds),Ds._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let i=1;while(i<=n)if(e<t[3*i])i*=2;else{if(!(e>t[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}function Ls(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Is(e,t){if(0===e)return 0;const n=Ns(e,t);if(void 0!==n)return n;const i=cs(t,e);return e-=Ms(i),e}function Ns(e,t){let n=cs(t,e);e-=Ms(n);while(Bs(n)||65039===n||8419===n){if(0===e)return;n=cs(t,e),e-=Ms(n)}if(Cs(n)){if(e>=0){const n=cs(t,e);8205===n&&(e-=Ms(n))}return e}}function Ms(e){return e>=65536?2:1}function Bs(e){return 127995<=e&&e<=127999}var Ts,Os;Ds._INSTANCE=null;class Rs{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const t=e.charCodeAt(0),n=this._value.charCodeAt(this._pos);return t-n}value(){return this._value[this._pos]}}class Ps{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(46===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?Kr(e,this._value,0,e.length,this._from,this._to):Jr(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class Fs{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?Kr(e,this._value,0,e.length,this._from,this._to):Jr(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class js{constructor(e){this._ignorePathCasing=e,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new Fs(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(1===this._states[this._stateIdx])return qr(e,this._value.scheme);if(2===this._states[this._stateIdx])return qr(e,this._value.authority);if(3===this._states[this._stateIdx])return this._pathIterator.cmp(e);if(4===this._states[this._stateIdx])return Gr(e,this._value.query);if(5===this._states[this._stateIdx])return Gr(e,this._value.fragment);throw new Error}value(){if(1===this._states[this._stateIdx])return this._value.scheme;if(2===this._states[this._stateIdx])return this._value.authority;if(3===this._states[this._stateIdx])return this._pathIterator.value();if(4===this._states[this._stateIdx])return this._value.query;if(5===this._states[this._stateIdx])return this._value.fragment;throw new Error}}class zs{isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}}class Vs{constructor(e){this._iter=e}static forUris(e=(()=>!1)){return new Vs(new js(e))}static forStrings(){return new Vs(new Rs)}static forConfigKeys(){return new Vs(new Ps)}clear(){this._root=void 0}set(e,t){const n=this._iter.reset(e);let i;this._root||(this._root=new zs,this._root.segment=n.value()),i=this._root;while(1){const e=n.cmp(i.segment);if(e>0)i.left||(i.left=new zs,i.left.segment=n.value()),i=i.left;else if(e<0)i.right||(i.right=new zs,i.right.segment=n.value()),i=i.right;else{if(!n.hasNext())break;n.next(),i.mid||(i.mid=new zs,i.mid.segment=n.value()),i=i.mid}}const o=i.value;return i.value=t,i.key=e,o}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let n=this._root;while(n){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n}has(e){const t=this._getNode(e);return!(void 0===(null===t||void 0===t?void 0:t.value)&&void 0===(null===t||void 0===t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const n=this._iter.reset(e),i=[];let o=this._root;while(o){const e=n.cmp(o.segment);if(e>0)i.push([1,o]),o=o.left;else if(e<0)i.push([-1,o]),o=o.right;else{if(!n.hasNext()){t?(o.left=void 0,o.mid=void 0,o.right=void 0):o.value=void 0;while(i.length>0&&o.isEmpty()){let[e,t]=i.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0;break}o=t}break}n.next(),i.push([0,o]),o=o.mid}}}findSubstr(e){const t=this._iter.reset(e);let n=this._root,i=void 0;while(n){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){const t=this._iter.reset(e);let n=this._root;while(n){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())return n.mid?this._entries(n.mid):void 0;t.next(),n=n.mid}}}forEach(e){for(const[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){if(!e)return;const t=[e];while(t.length>0){const e=t.pop();e&&(e.value&&(yield[e.key,e.value]),e.left&&t.push(e.left),e.mid&&t.push(e.mid),e.right&&t.push(e.right))}}}class Qs{constructor(e,t){this[Ts]="ResourceMap",e instanceof Qs?(this.map=new Map(e.map),this.toKey=null!==t&&void 0!==t?t:Qs.defaultToKey):(this.map=new Map,this.toKey=null!==e&&void 0!==e?e:Qs.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(let[n,i]of this.map)e(i,wn.parse(n),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield wn.parse(e)}*entries(){for(let e of this.map.entries())yield[wn.parse(e[0]),e[1]]}*[(Ts=Symbol.toStringTag,Symbol.iterator)](){for(let e of this.map)yield[wn.parse(e[0]),e[1]]}}Qs.defaultToKey=e=>e.toString();class Ws{constructor(){this[Os]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;while(i){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[(Os=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;while(t&&n>e)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class Hs extends Ws{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}var Us=n("c223");function Ys(e){let t=JSON.parse(e);return t=Gs(t),t}function Gs(e,t=0){if(!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return wn.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof Us["a"]||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let n=0;n<e.length;++n)e[n]=Gs(e[n],t+1);else for(const n in e)Object.hasOwnProperty.call(e,n)&&(e[n]=Gs(e[n],t+1))}return e}function Ks(e){return e.replace(/[\\/]/g,nn.sep)}function qs(e){return-1===e.indexOf("/")&&(e=Ks(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function Js(e,t,n,i=hn){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){const n=ns(e,t);if(!n)return!1;if(t.length===e.length)return!0;let o=t.length;return t.charAt(t.length-1)===i&&o--,e.charAt(o)===i}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t)}function $s(e){return Sn(e,!0)}class Xs{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:Gr(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return wn.joinPath(e,...t)}basenameOrAuthority(e){return ea(e)||e.authority}basename(e){return nn.basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===mo.file?t=wn.file(an($s(e))).path:(t=nn.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===mo.file?wn.file(on($s(e))).path:nn.normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===mo.file){const n=wn.file(rn($s(e),t));return e.with({authority:n.authority,path:n.path})}return t=qs(t),e.with({path:nn.resolve(e.path,t)})}}const Zs=new Xs(()=>!1),ea=(Zs.isEqual.bind(Zs),Zs.basenameOrAuthority.bind(Zs),Zs.basename.bind(Zs)),ta=(Zs.dirname.bind(Zs),Zs.joinPath.bind(Zs),Zs.normalizePath.bind(Zs));Zs.resolvePath.bind(Zs);var na;function ia(e){return"string"===typeof e}function oa(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function ra(e){return"number"===typeof e&&!isNaN(e)}function sa(e){return!0===e||!1===e}function aa(e){return"undefined"===typeof e}function la(e){return aa(e)||null===e}function ca(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function ha(e){return"function"===typeof e}function ua(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++)da(e[i],t[i])}function da(e,t){if(ia(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(ha(t)){try{if(e instanceof t)return}catch(n){}if(!la(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function pa(e){let t=[],n=Object.getPrototypeOf(e);while(Object.prototype!==n)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function fa(e){const t=[];for(const n of pa(e))"function"===typeof e[n]&&t.push(n);return t}function ga(e,t){const n=e=>function(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)};let i={};for(const o of e)i[o]=n(o);return i}function ma(e){return null===e?void 0:e}function ba(e,t="Unreachable"){throw new Error(t)}(function(e){function t(t){const n=new Map,i=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));i.split(";").forEach(e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)});const o=t.path.substring(0,t.path.indexOf(";"));return o&&n.set(e.META_DATA_MIME,o),n}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(na||(na={}));const va=Ai("commandService"),ya=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new bt,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"===typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let i of e.description.args)t.push(i.constraint);const n=e.handler;e.handler=function(e,...i){return ua(i,t),n(e,...i)}}const{id:n}=e;let i=this._commands.get(n);i||(i=new ht,this._commands.set(n,i));let o=i.unshift(e),r=ot(()=>{o();const e=this._commands.get(n);(null===e||void 0===e?void 0:e.isEmpty())&&this._commands.delete(n)});return this._onDidRegisterCommand.fire(n),r}registerCommandAlias(e,t){return ya.registerCommand(e,(e,...n)=>e.get(va).executeCommand(t,...n))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return Ue.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const n=this.getCommand(t);n&&e.set(t,n)}return e}};var wa;ya.registerCommand("noop",()=>{}),function(e){e[e["API"]=0]="API",e[e["USER"]=1]="USER"}(wa||(wa={}));var _a=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const Ca=Ai("openerService");Object.freeze({_serviceBrand:void 0,registerOpener(){return st.None},registerValidator(){return st.None},registerExternalUriResolver(){return st.None},setDefaultExternalOpener(){},registerExternalOpener(){return st.None},open(){return _a(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return _a(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function Aa(e,t){return wn.isUri(e)?es(e.scheme,t):ns(e,t+":")}var Ea=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},xa=function(e,t){return function(n,i){t(n,i,e)}},Sa=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let ka=class{constructor(e){this._commandService=e}open(e,t){return Sa(this,void 0,void 0,(function*(){if(!Aa(e,mo.command))return!1;if(!(null===t||void 0===t?void 0:t.allowCommands))return!0;"string"===typeof e&&(e=wn.parse(e));let n=[];try{n=Ys(decodeURIComponent(e.query))}catch(i){try{n=Ys(e.query)}catch(o){}}return Array.isArray(n)||(n=[n]),yield this._commandService.executeCommand(e.path,...n),!0}))}};ka=Ea([xa(0,va)],ka);let Da=class{constructor(e){this._editorService=e}open(e,t){return Sa(this,void 0,void 0,(function*(){"string"===typeof e&&(e=wn.parse(e));let n=void 0;const i=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return i&&(n={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1},e=e.with({fragment:""})),e.scheme===mo.file&&(e=ta(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:n,context:(null===t||void 0===t?void 0:t.fromUserGesture)?wa.USER:wa.API},null===t||void 0===t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null===t||void 0===t?void 0:t.openToSide),!0}))}};Da=Ea([xa(0,xi)],Da);let La=class{constructor(e,t){this._openers=new ht,this._validators=new ht,this._resolvers=new ht,this._resolvedUriTargets=new Qs(e=>e.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new ht,this._defaultExternalOpener={openExternal:e=>Sa(this,void 0,void 0,(function*(){return Aa(e,mo.http)||Aa(e,mo.https)?Sr(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>Sa(this,void 0,void 0,(function*(){return!!((null===t||void 0===t?void 0:t.openExternal)||Aa(e,mo.mailto)||Aa(e,mo.http)||Aa(e,mo.https))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new ka(t)),this._openers.push(new Da(e))}registerOpener(e){const t=this._openers.unshift(e);return{dispose:t}}registerValidator(e){const t=this._validators.push(e);return{dispose:t}}registerExternalUriResolver(e){const t=this._resolvers.push(e);return{dispose:t}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){const t=this._externalOpeners.push(e);return{dispose:t}}open(e,t){var n;return Sa(this,void 0,void 0,(function*(){const i="string"===typeof e?wn.parse(e):e,o=null!==(n=this._resolvedUriTargets.get(i))&&void 0!==n?n:e;for(const e of this._validators)if(!(yield e.shouldOpen(o)))return!1;for(const n of this._openers){const i=yield n.open(e,t);if(i)return!0}return!1}))}resolveExternalUri(e,t){return Sa(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(n){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return Sa(this,void 0,void 0,(function*(){const n="string"===typeof e?wn.parse(e):e;let i,o;try{i=(yield this.resolveExternalUri(n,t)).resolved}catch(r){i=n}if(o="string"===typeof e&&n.toString()===i.toString()?e:encodeURI(i.toString(!0)),null===t||void 0===t?void 0:t.allowContributedOpeners){const e="string"===typeof(null===t||void 0===t?void 0:t.allowContributedOpeners)?null===t||void 0===t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners){const i=yield t.openExternal(o,{sourceUri:n,preferredOpenerId:e},At.None);if(i)return!0}}return this._defaultExternalOpener.openExternal(o,{sourceUri:n},At.None)}))}dispose(){this._validators.clear()}};function Ia(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function Na(e){if(!e||"object"!==typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{e[n]&&"object"===typeof e[n]?t[n]=Na(e[n]):t[n]=e[n]}),t}function Ma(e){if(!e||"object"!==typeof e)return e;const t=[e];while(t.length>0){const e=t.shift();Object.freeze(e);for(const n in e)if(Ba.call(e,n)){const i=e[n];"object"!==typeof i||Object.isFrozen(i)||t.push(i)}}return e}La=Ea([xa(0,xi),xa(1,va)],La);const Ba=Object.prototype.hasOwnProperty;function Ta(e,t,n=!0){return oa(e)?(oa(t)&&Object.keys(t).forEach(i=>{i in e?n&&(oa(e[i])&&oa(t[i])?Ta(e[i],t[i],n):e[i]=t[i]):e[i]=t[i]}),e):t}function Oa(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Oa(e[n],t[n]))return!1}else{const o=[];for(i in e)o.push(i);o.sort();const r=[];for(i in t)r.push(i);if(r.sort(),!Oa(o,r))return!1;for(n=0;n<o.length;n++)if(!Oa(e[o[n]],t[o[n]]))return!1}return!0}function Ra(e,t,n){const i=t(e);return"undefined"===typeof i?n:i}const Pa={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class Fa extends st{constructor(e,t={}){super(),this._onDidUpdate=this._register(new bt),this._editor=e,this._options=Ta(t,Pa,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(e=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(e=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(e=>{this.ranges.push({rhs:!0,range:new Mn(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new Mn(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,n=this._editor.getPosition();if(n){for(let i=0,o=this.ranges.length;i<o&&!t;i++){let o=this.ranges[i].range;n.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=i+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0}_move(e,t){if(Ia(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=n.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}const ja=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new bt,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},za=b["f"]?1.5:1.35,Va=8;class Qa{constructor(e){this._bareFontInfoBrand=void 0,this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,n,i){const o=e.get(42),r=e.get(46),s=e.get(45),a=e.get(44),l=e.get(58),c=e.get(55);return Qa._create(o,r,s,a,l,c,t,n,i)}static _create(e,t,n,i,o,r,s,a,l){0===o?o=za*n:o<Va&&(o*=n),o=Math.round(o),o<Va&&(o=Va);const c=1+(l?0:.1*ja.getZoomLevel());return n*=c,o*=c,new Qa({zoomLevel:s,pixelRatio:a,fontFamily:e,fontWeight:t,fontSize:n,fontFeatureSettings:i,lineHeight:o,letterSpacing:r})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(e){const t=Qa._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}const Wa=1;class Ha extends Qa{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=Wa,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}function Ua(e){return e&&"string"===typeof e.id}const Ya={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var Ga,Ka;(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(Ga||(Ga={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(Ka||(Ka={}));class qa{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Oa(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class Ja{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}class $a{constructor(e,t){this.visibleColumn=e,this.className=t}}class Xa{constructor(e,t,n,i){this.range=e,this.openingBracketRange=t,this.closingBracketRange=n,this.nestingLevel=i}}class Za{constructor(e,t,n,i,o,r){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class el{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function tl(e,t){return(t<<5)-t+e|0}function nl(e,t){t=tl(149417,t);for(let n=0,i=e.length;n<i;n++)t=tl(e.charCodeAt(n),t);return t}function il(e,t,n=32){const i=n-t,o=~((1<<i)-1);return(e<<t|(o&e)>>>i)>>>0}function ol(e,t=0,n=e.byteLength,i=0){for(let o=0;o<n;o++)e[t+o]=i}function rl(e,t,n="0"){while(e.length<t)e=n+e;return e}function sl(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,"0")).join(""):rl((e>>>0).toString(16),t/4)}class al{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let i,o,r=this._buffLen,s=this._leftoverHighSurrogate;0!==s?(i=s,o=-1,s=0):(i=e.charCodeAt(0),o=0);while(1){let a=i;if(rs(i)){if(!(o+1<t)){s=i;break}{const t=e.charCodeAt(o+1);ss(t)?(o++,a=as(i,t)):a=65533}}else ss(i)&&(a=65533);if(r=this._push(n,r,a),o++,!(o<t))break;i=e.charCodeAt(o)}this._buffLen=r,this._leftoverHighSurrogate=s}_push(e,t,n){return n<128?e[t++]=n:n<2048?(e[t++]=192|(1984&n)>>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),sl(this._h0)+sl(this._h1)+sl(this._h2)+sl(this._h3)+sl(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,ol(this._buff,this._buffLen),this._buffLen>56&&(this._step(),ol(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=al._bigBlock32,t=this._buffDV;for(let h=0;h<64;h+=4)e.setUint32(h,t.getUint32(h,!1),!1);for(let h=64;h<320;h+=4)e.setUint32(h,il(e.getUint32(h-12,!1)^e.getUint32(h-32,!1)^e.getUint32(h-56,!1)^e.getUint32(h-64,!1),1),!1);let n,i,o,r=this._h0,s=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let h=0;h<80;h++)h<20?(n=s&a|~s&l,i=1518500249):h<40?(n=s^a^l,i=1859775393):h<60?(n=s&a|s&l|a&l,i=2400959708):(n=s^a^l,i=3395469782),o=il(r,5)+n+c+i+e.getUint32(4*h,!1)&4294967295,c=l,l=a,a=il(s,30),s=r,r=o;this._h0=this._h0+r&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}function ll(e,t,n){return Math.min(Math.max(e,t),n)}al._bigBlock32=new DataView(new ArrayBuffer(320));const cl="**",hl="/",ul="[/\\\\]",dl="[^/\\\\]",pl=/\//g;function fl(e){switch(e){case 0:return"";case 1:return dl+"*?";default:return`(?:${ul}|${dl}+${ul}|${ul}${dl}+)*?`}}function gl(e,t){if(!e)return[];const n=[];let i=!1,o=!1,r="";for(const s of e){switch(s){case t:if(!i&&!o){n.push(r),r="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":o=!0;break;case"]":o=!1;break}r+=s}return r&&n.push(r),n}function ml(e){if(!e)return"";let t="";const n=gl(e,hl);if(n.every(e=>e===cl))t=".*";else{let e=!1;n.forEach((i,o)=>{if(i===cl)return void(e||(t+=fl(2),e=!0));let r=!1,s="",a=!1,l="";for(const e of i)if("}"!==e&&r)s+=e;else if(!a||"]"===e&&l)switch(e){case"{":r=!0;continue;case"[":a=!0;continue;case"}":const n=gl(s,","),i=`(?:${n.map(e=>ml(e)).join("|")})`;t+=i,r=!1,s="";break;case"]":t+="["+l+"]",a=!1,l="";break;case"?":t+=dl;continue;case"*":t+=fl(1);continue;default:t+=Rr(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||l?e===hl?"":Rr(e):"^",l+=t}o<n.length-1&&(n[o+1]!==cl||o+2<n.length)&&(t+=ul),e=!1})}return t}const bl=/^\*\*\/\*\.[\w\.-]+$/,vl=/^\*\*\/([\w\.-]+)\/?$/,yl=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,wl=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,_l=/^\*\*((\/[\w\.-]+)+)\/?$/,Cl=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,Al=new Hs(1e4),El=function(){return!1},xl=function(){return null};function Sl(e,t){if(!e)return xl;let n;n="string"!==typeof e?e.pattern:e,n=n.trim();const i=`${n}_${!!t.trimForExclusions}`;let o,r=Al.get(i);if(r)return kl(r,e);if(bl.test(n)){const e=n.substr(4);r=function(t,i){return"string"===typeof t&&t.endsWith(e)?n:null}}else r=(o=vl.exec(Dl(n,t)))?Ll(o[1],n):(t.trimForExclusions?wl:yl).test(n)?Il(n,t):(o=_l.exec(Dl(n,t)))?Nl(o[1].substr(1),n,!0):(o=Cl.exec(Dl(n,t)))?Nl(o[1],n,!1):Ml(n);return Al.set(i,r),kl(r,e)}function kl(e,t){return"string"===typeof t?e:function(n,i){return Js(n,t.base)?e(sn(t.base,n),i):null}}function Dl(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function Ll(e,t){const n="/"+e,i="\\"+e,o=function(o,r){return"string"!==typeof o?null:r?r===e?t:null:o===e||o.endsWith(n)||o.endsWith(i)?t:null},r=[e];return o.basenames=r,o.patterns=[t],o.allBasenames=r,o}function Il(e,t){const n=Fl(e.slice(1,-1).split(",").map(e=>Sl(e,t)).filter(e=>e!==xl),e),i=n.length;if(!i)return xl;if(1===i)return n[0];const o=function(t,i){for(let o=0,r=n.length;o<r;o++)if(n[o](t,i))return e;return null},r=n.find(e=>!!e.allBasenames);r&&(o.allBasenames=r.allBasenames);const s=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(o.allPaths=s),o}function Nl(e,t,n){const i=hn===nn.sep,o=i?e:e.replace(pl,hn),r=hn+o,s=nn.sep+e,a=n?function(n,a){return"string"!==typeof n||n!==o&&!n.endsWith(r)&&(i||n!==e&&!n.endsWith(s))?null:t}:function(n,r){return"string"!==typeof n||n!==o&&(i||n!==e)?null:t};return a.allPaths=[(n?"*/":"./")+e],a}function Ml(e){try{const t=new RegExp(`^${ml(e)}$`);return function(n){return t.lastIndex=0,"string"===typeof n&&t.test(n)?e:null}}catch(t){return xl}}function Bl(e,t,n){return!(!e||"string"!==typeof t)&&Tl(e)(t,void 0,n)}function Tl(e,t={}){if(!e)return El;if("string"===typeof e||Ol(e)){const n=Sl(e,t);if(n===xl)return El;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return Rl(e,t)}function Ol(e){const t=e;return t&&"string"===typeof t.base&&"string"===typeof t.pattern}function Rl(e,t){const n=Fl(Object.getOwnPropertyNames(e).map(n=>Pl(n,e[n],t)).filter(e=>e!==xl)),i=n.length;if(!i)return xl;if(!n.some(e=>!!e.requiresSiblings)){if(1===i)return n[0];const e=function(e,t){for(let i=0,o=n.length;i<o;i++){const o=n[i](e,t);if(o)return o}return null},t=n.find(e=>!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const o=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,i){let o=void 0;for(let r=0,s=n.length;r<s;r++){const s=n[r];s.requiresSiblings&&i&&(t||(t=ln(e)),o||(o=t.substr(0,t.length-cn(e).length)));const a=s(e,t,o,i);if(a)return a}return null},r=n.find(e=>!!e.allBasenames);r&&(o.allBasenames=r.allBasenames);const s=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(o.allPaths=s),o}function Pl(e,t,n){if(!1===t)return xl;const i=Sl(e,n);if(i===xl)return xl;if("boolean"===typeof t)return i;if(t){const n=t.when;if("string"===typeof n){const t=(t,o,r,s)=>{if(!s||!i(t,o))return null;const a=n.replace("$(basename)",r),l=s(a);return no(l)?l.then(t=>t?e:null):l?e:null};return t.requiresSiblings=!0,t}}return i}function Fl(e,t){const n=e.filter(e=>!!e.basenames);if(n.length<2)return e;const i=n.reduce((e,t)=>{const n=t.basenames;return n?e.concat(n):e},[]);let o;if(t){o=[];for(let e=0,n=i.length;e<n;e++)o.push(t)}else o=n.reduce((e,t)=>{const n=t.patterns;return n?e.concat(n):e},[]);const r=function(e,t){if("string"!==typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?o[n]:null};r.basenames=i,r.patterns=o,r.allBasenames=i;const s=e.filter(e=>!e.basenames);return s.push(r),s}function jl(e,t,n,i){if(Array.isArray(e)){let o=0;for(const r of e){const e=jl(r,t,n,i);if(10===e)return e;e>o&&(o=e)}return o}if("string"===typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:o,pattern:r,scheme:s,hasAccessToAllModels:a}=e;if(!i&&!a)return 0;let l=0;if(s)if(s===t.scheme)l=10;else{if("*"!==s)return 0;l=5}if(o)if(o===n)l=10;else{if("*"!==o)return 0;l=Math.max(l,5)}if(r){let e;if(e="string"===typeof r?r:Object.assign(Object.assign({},r),{base:on(r.base)}),e!==t.fsPath&&!Bl(e,t.fsPath))return 0;l=10}return l}return 0}const zl=Ai("modelService");function Vl(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}function Ql(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(Ql):!!e.exclusive)}class Wl{constructor(){this._clock=0,this._entries=[],this._onDidChange=new bt}get onDidChange(){return this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),ot(()=>{if(n){let e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,e=>t.push(e.provider)),t}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))}),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=jl(t.selector,e.uri,e.getLanguageIdentifier().language,Vl(e)),Ql(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(Wl._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}new WeakMap;class Hl{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new bt,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),ot(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerPromise(e,t){let n=null,i=!1;return this._promises.set(e,t.then(t=>{this._promises.delete(e),!i&&t&&(n=this.register(e,t))})),ot(()=>{i=!0,n&&n.dispose()})}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const n=this._promises.get(e);return n?n.then(t=>this.get(e)):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Ul{constructor(){this._icons=new Map,this._onDidRegister=new bt}add(e){const t=this._icons.get(e.id);t?e.description&&(t.description=e.description):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Yl=new Ul,Gl=Yl;function Kl(e,t){return new Jl(e,t)}function ql(e){return e?e.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}class Jl{constructor(e,t,n){this.id=e,this.definition=t,this.description=n,Yl.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var $l;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function n(e){if(e instanceof Jl)return["codicon","codicon-"+e.id];const i=t.exec(e.id);if(!i)return n(Jl.error);let[,o,r]=i;const s=["codicon","codicon-"+o];return r&&s.push("codicon-modifier-"+r.substr(1)),s}function i(e){return n(e).join(" ")}function o(e){return"."+n(e).join(".")}e.asClassNameArray=n,e.asClassName=i,e.asCSSSelector=o})($l||($l={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",{fontCharacter:"\\ea60"}),e.gistNew=new e("gist-new",{fontCharacter:"\\ea60"}),e.repoCreate=new e("repo-create",{fontCharacter:"\\ea60"}),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",{fontCharacter:"\\eb0f"}),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition)}(Jl||(Jl={}));class Xl{constructor(e,t){this.language=e,this.id=t}}class Zl{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t=this.getForeground(e),n="mtk"+t,i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let o=`color: ${t[n]};`;return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o}}(function(){let e=Object.create(null);e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues"})();(function(){let e=Object.create(null);e["method"]=0,e["function"]=1,e["constructor"]=2,e["field"]=3,e["variable"]=4,e["class"]=5,e["struct"]=6,e["interface"]=7,e["module"]=8,e["property"]=9,e["event"]=10,e["operator"]=11,e["unit"]=12,e["value"]=13,e["constant"]=14,e["enum"]=15,e["enum-member"]=16,e["enumMember"]=16,e["keyword"]=17,e["snippet"]=27,e["text"]=18,e["color"]=19,e["file"]=20,e["reference"]=21,e["customcolor"]=22,e["folder"]=23,e["type-parameter"]=24,e["typeParameter"]=24,e["account"]=25,e["issue"]=26})();var ec,tc,nc,ic,oc;(function(e){e[e["Automatic"]=0]="Automatic",e[e["Explicit"]=1]="Explicit"})(ec||(ec={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(tc||(tc={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(nc||(nc={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const n=new Map;function i(e){return t.get(e)}function o(e){return n.get(e)}function r(e,t){const i=n.get(e);let o=i&&Gl.get("symbol-"+i);return o||(o=Jl.symbolProperty),`${t?"inline":"block"} ${o.classNames}`}n.set(0,"file"),n.set(1,"module"),n.set(2,"namespace"),n.set(3,"package"),n.set(4,"class"),n.set(5,"method"),n.set(6,"property"),n.set(7,"field"),n.set(8,"constructor"),n.set(9,"enum"),n.set(10,"interface"),n.set(11,"function"),n.set(12,"variable"),n.set(13,"constant"),n.set(14,"string"),n.set(15,"number"),n.set(16,"boolean"),n.set(17,"array"),n.set(18,"object"),n.set(19,"key"),n.set(20,"null"),n.set(21,"enum-member"),n.set(22,"struct"),n.set(23,"event"),n.set(24,"operator"),n.set(25,"type-parameter"),e.fromString=i,e.toString=o,e.toCssClassName=r}(ic||(ic={}));class rc{constructor(e){this.value=e}}rc.Comment=new rc("comment"),rc.Imports=new rc("imports"),rc.Region=new rc("region"),function(e){e[e["Other"]=0]="Other",e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(oc||(oc={}));const sc=new Wl,ac=new Wl,lc=new Wl,cc=new Wl,hc=new Wl,uc=new Wl,dc=new Wl,pc=new Wl,fc=new Wl,gc=new Wl,mc=new Wl,bc=new Wl,vc=new Wl,yc=new Wl,wc=new Wl,_c=new Wl,Cc=new Wl,Ac=new Wl,Ec=new Wl,xc=new Wl,Sc=new Wl,kc=new Wl,Dc=new Wl,Lc=new Wl,Ic=new Wl,Nc=new Hl;class Mc{clone(){return this}equals(e){return this===e}}const Bc=new Mc,Tc="vs.editor.nullMode",Oc=new Xl(Tc,0);function Rc(e,t,n,i){return new On([new Tn(i,"",e)],n)}function Pc(e,t,n,i){let o=new Uint32Array(2);return o[0]=i,o[1]=(16384|e<<0|2<<23)>>>0,new Rn(o,null===n?Bc:n)}const Fc="editorWorkerService",jc=Ai(Fc),zc=Ai("modeService"),Vc=Ai("textModelService"),Qc="$initialize";let Wc=!1;function Hc(e){b["h"]&&(Wc||(Wc=!0))}class Uc{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let n=String(++this._lastSentReq);return new Promise((i,o)=>{this._pendingReplies[n]={resolve:i,reject:o},this._send({vsWorker:this._workerId,req:n,method:e,args:t})})}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return;let n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&(e=new Error,e.name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void n.reject(e)}return void n.resolve(t.res)}let t=e,n=t.req,i=this._handler.handleMessage(t.method,t.args);i.then(e=>{this._send({vsWorker:this._workerId,seq:n,res:e,err:void 0})},e=>{e.detail instanceof Error&&(e.detail=Pe(e.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:Pe(e)})})}_send(e){let t=[];if(e.req){const n=e;for(let e=0;e<n.args.length;e++)n.args[e]instanceof ArrayBuffer&&t.push(n.args[e])}else{const n=e;n.res instanceof ArrayBuffer&&t.push(n.res)}this._handler.sendMessage(e,t)}}class Yc extends st{constructor(e,t,n){super();let i=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",e=>{this._protocol.handleMessage(e)},e=>{i&&i(e)})),this._protocol=new Uc({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!==typeof n[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(n[e].apply(n,t))}catch(i){return Promise.reject(i)}}}),this._protocol.setWorkerId(this._worker.getId());let o=null;"undefined"!==typeof self.require&&"function"===typeof self.require.getConfig?o=self.require.getConfig():"undefined"!==typeof self.requirejs&&(o=self.requirejs.s.contexts._.config);const r=fa(n);this._onModuleLoaded=this._protocol.sendMessage(Qc,[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const s=(e,t)=>this._request(e,t);this._lazyProxy=new Promise((e,n)=>{i=n,this._onModuleLoaded.then(t=>{e(ga(t,s))},e=>{n(e),this._onError("Worker failed to load "+t,e)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((n,i)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(n,i)},i)})}_onError(e,t){}}var Gc;const Kc=null===(Gc=window.trustedTypes)||void 0===Gc?void 0:Gc.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});function qc(e,t){if(b["b"].MonacoEnvironment){if("function"===typeof b["b"].MonacoEnvironment.getWorker)return b["b"].MonacoEnvironment.getWorker(e,t);if("function"===typeof b["b"].MonacoEnvironment.getWorkerUrl){const n=b["b"].MonacoEnvironment.getWorkerUrl(e,t);return new Worker(Kc?Kc.createScriptURL(n):n,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function Jc(e){return"function"===typeof e.then}class $c{constructor(e,t,n,i,o){this.id=t;const r=qc("workerMain.js",n);Jc(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then(e=>{e.onmessage=function(e){i(e.data)},e.onmessageerror=o,"function"===typeof e.addEventListener&&e.addEventListener("error",o)})}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then(n=>n.postMessage(e,t))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class Xc{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,n){let i=++Xc.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new $c(e,i,this._label||"anonymous"+i,t,e=>{Hc(e),this._webWorkerFailedBeforeError=e,n(e)})}}var Zc;Xc.LAST_WORKER_ID=0,function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(Zc||(Zc={}));class eh{constructor(e){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t<n;t++){const n=e.notIn[t];switch(n){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}}isOK(e){return 0===(this._standardTokenMask&e)}}class th{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)nh(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),nh(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),nh(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),nh(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),1===t.close.length&&1===t.open.length&&nh(this.autoClosingPairsCloseSingleChar,t.close,t)}}function nh(e,t,n){e.has(t)?e.get(t).push(n):e.set(t,[n])}function ih(e,t){let n=e.getCount(),i=e.findTokenIndexAtOffset(t),o=e.getLanguageId(i),r=i;while(r+1<n&&e.getLanguageId(r+1)===o)r++;let s=i;while(s>0&&e.getLanguageId(s-1)===o)s--;return new oh(e,o,s,r+1,e.getStartOffset(s),e.getEndOffset(r))}class oh{constructor(e,t,n,i,o,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}getLineContent(){const e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){const t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function rh(e){return 0!==(7&e)}class sh{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new eh(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new eh({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=e.colorizedBracketPairs.map(e=>[e[0],e[1]]):e.brackets?this._colorizedBracketPairs=e.brackets.map(e=>[e[0],e[1]]).filter(e=>!("<"===e[0]&&">"===e[1])):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new eh({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"===typeof e.autoCloseBefore?e.autoCloseBefore:sh.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,n){if(0===t.getTokenCount())return!0;const i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i);return e.isOK(o)}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}let ah,lh,ch;function hh(){return ah||(ah=new TextDecoder("UTF-16LE")),ah}function uh(){return lh||(lh=new TextDecoder("UTF-16BE")),lh}function dh(){return ch||(ch=b["e"]()?hh():uh()),ch}sh.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";const ph="undefined"!==typeof TextDecoder;let fh,gh;function mh(e,t,n){const i=new Uint16Array(e.buffer,t,n);return n>0&&(65279===i[0]||65534===i[0])?bh(e,t,n):hh().decode(i)}function bh(e,t,n){let i=[],o=0;for(let r=0;r<n;r++){const n=Us["b"](e,t);t+=2,i[o++]=String.fromCharCode(n)}return i.join("")}ph?(fh=e=>new vh(e),gh=mh):(fh=e=>new yh,gh=bh);class vh{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return dh().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||rs(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let n=0;n<t;n++)this._buffer[this._bufferLength++]=e.charCodeAt(n)}}class yh{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}class wh{constructor(e,t,n,i,o,r){this._richEditBracketBrand=void 0,this.languageIdentifier=e,this.index=t,this.open=n,this.close=i,this.forwardRegex=o,this.reversedRegex=r,this._openSet=wh._toSet(this.open),this._closeSet=wh._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const n of e)t.add(n);return t}}function _h(e){const t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);const n=[];for(let s=0;s<t;s++)n[s]=s;const i=(e,t)=>{const[n,i]=e,[o,r]=t;return n===o||n===r||i===o||i===r},o=(e,i)=>{const o=Math.min(e,i),r=Math.max(e,i);for(let s=0;s<t;s++)n[s]===r&&(n[s]=o)};for(let s=0;s<t;s++){const r=e[s];for(let a=s+1;a<t;a++){const t=e[a];i(r,t)&&o(n[s],n[a])}}const r=[];for(let s=0;s<t;s++){let i=[],o=[];for(let r=0;r<t;r++)if(n[r]===s){const[t,n]=e[r];i.push(t),o.push(n)}i.length>0&&r.push({open:i,close:o})}return r}class Ch{constructor(e,t){this._richEditBracketsBrand=void 0;const n=_h(t);this.brackets=n.map((t,i)=>new wh(e,i,t.open,t.close,Sh(t.open,t.close,n,i),kh(t.open,t.close,n,i))),this.forwardRegex=Dh(this.brackets),this.reversedRegex=Lh(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const i of this.brackets){for(const e of i.open)this.textIsBracket[e]=i,this.textIsOpenBracket[e]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,e.length);for(const e of i.close)this.textIsBracket[e]=i,this.textIsOpenBracket[e]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,e.length)}}}function Ah(e,t,n,i){for(let o=0,r=t.length;o<r;o++){if(o===n)continue;const r=t[o];for(const t of r.open)t.indexOf(e)>=0&&i.push(t);for(const t of r.close)t.indexOf(e)>=0&&i.push(t)}}function Eh(e,t){return e.length-t.length}function xh(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function Sh(e,t,n,i){let o=[];o=o.concat(e),o=o.concat(t);for(let r=0,s=o.length;r<s;r++)Ah(o[r],n,i,o);return o=xh(o),o.sort(Eh),o.reverse(),Nh(o)}function kh(e,t,n,i){let o=[];o=o.concat(e),o=o.concat(t);for(let r=0,s=o.length;r<s;r++)Ah(o[r],n,i,o);return o=xh(o),o.sort(Eh),o.reverse(),Nh(o.map(Mh))}function Dh(e){let t=[];for(const n of e){for(const e of n.open)t.push(e);for(const e of n.close)t.push(e)}return t=xh(t),Nh(t)}function Lh(e){let t=[];for(const n of e){for(const e of n.open)t.push(e);for(const e of n.close)t.push(e)}return t=xh(t),Nh(t.map(Mh))}function Ih(e){const t=/^[\w ]+$/.test(e);return e=Rr(e),t?`\\b${e}\\b`:e}function Nh(e){let t=`(${e.map(Ih).join(")|(")})`;return zr(t,!0)}const Mh=function(){function e(e){if(ph){const t=new Uint16Array(e.length);let n=0;for(let i=e.length-1;i>=0;i--)t[n++]=e.charCodeAt(i);return dh().decode(t)}{let t=[],n=0;for(let i=e.length-1;i>=0;i--)t[n++]=e.charAt(i);return t.join("")}}let t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}();class Bh{static _findPrevBracketInText(e,t,n,i){let o=n.match(e);if(!o)return null;let r=n.length-(o.index||0),s=o[0].length,a=i+r;return new Mn(t,a-s+1,t,a+1)}static findPrevBracketInRange(e,t,n,i,o){const r=Mh(n),s=r.substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,s,i)}static findNextBracketInText(e,t,n,i){let o=n.match(e);if(!o)return null;let r=o.index||0,s=o[0].length;if(0===s)return null;let a=i+r;return new Mn(t,a+1,t,a+1+s)}static findNextBracketInRange(e,t,n,i,o){const r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)}}class Th{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return e=e.filter((e,t,n)=>n.indexOf(e)===t),e}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if(rh(t.getStandardTokenType(i)))return null;const o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,n-1)+e,s=Bh.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;const a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const c=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function Oh(e){return e.global&&(e.lastIndex=0),!0}class Rh{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&Oh(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&Oh(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&Oh(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&Oh(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class Ph{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{const t=Ph._createOpenBracketRegExp(e[0]),n=Ph._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let o=0,r=this._regExpRules.length;o<r;o++){let e=this._regExpRules[o];const r=[{reg:e.beforeText,text:n},{reg:e.afterText,text:i},{reg:e.previousLineText,text:t}].every(e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)));if(r)return e.action}if(e>=2&&n.length>0&&i.length>0)for(let o=0,r=this._brackets.length;o<r;o++){let e=this._brackets[o];if(e.openRegExp.test(n)&&e.closeRegExp.test(i))return{indentAction:Zc.IndentOutdent}}if(e>=2&&n.length>0)for(let o=0,r=this._brackets.length;o<r;o++){let e=this._brackets[o];if(e.openRegExp.test(n))return{indentAction:Zc.Indent}}return null}static _createOpenBracketRegExp(e){let t=Rr(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",Ph._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=Rr(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,Ph._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(t){return Oe(t),null}}}class Fh{constructor(e,t){this._languageIdentifier=e,this._brackets=null,this._electricCharacter=null,this._conf=t,this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new Ph(this._conf):null,this.comments=Fh._handleComments(this._conf),this.characterPair=new sh(this._conf),this.wordDefinition=this._conf.wordPattern||w,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new Rh(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}get brackets(){return!this._brackets&&this._conf.brackets&&(this._brackets=new Ch(this._languageIdentifier,this._conf.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Th(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}static _handleComments(e){let t=e.comments;if(!t)return null;let n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){let[e,i]=t.blockComment;n.blockCommentStartToken=e,n.blockCommentEndToken=i}return n}}class jh{constructor(e){this.languageIdentifier=e}}class zh{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class Vh{constructor(e){this.languageIdentifier=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new zh(e,t,++this._order);return this._entries.push(n),this._resolved=null,ot(()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===n){this._entries.splice(e,1),this._resolved=null;break}})}getRichEditSupport(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new Fh(this.languageIdentifier,e))}return this._resolved}_resolve(){if(0===this._entries.length)return null;this._entries.sort(zh.cmp);const e={};for(const t of this._entries){const n=t.configuration;e.comments=n.comments||e.comments,e.brackets=n.brackets||e.brackets,e.wordPattern=n.wordPattern||e.wordPattern,e.indentationRules=n.indentationRules||e.indentationRules,e.onEnterRules=n.onEnterRules||e.onEnterRules,e.autoClosingPairs=n.autoClosingPairs||e.autoClosingPairs,e.surroundingPairs=n.surroundingPairs||e.surroundingPairs,e.autoCloseBefore=n.autoCloseBefore||e.autoCloseBefore,e.folding=n.folding||e.folding,e.colorizedBracketPairs=n.colorizedBracketPairs||e.colorizedBracketPairs,e.__electricCharacterSupport=n.__electricCharacterSupport||e.__electricCharacterSupport}return e}}class Qh{constructor(){this._entries=new Map,this._onDidChange=new bt,this.onDidChange=this._onDidChange.event}register(e,t,n=0){let i=this._entries.get(e.id);i||(i=new Vh(e),this._entries.set(e.id,i));const o=i.register(t,n);return this._onDidChange.fire(new jh(e)),ot(()=>{o.dispose(),this._onDidChange.fire(new jh(e))})}_getRichEditSupport(e){const t=this._entries.get(e);return t?t.getRichEditSupport():null}getIndentationRules(e){const t=this._getRichEditSupport(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,n){let i=ih(t,n-1),o=this._getElectricCharacterSupport(i.languageId);return o?o.onElectricCharacter(e,i,n-i.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new th(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():sh.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,n){const i=ih(t,n-1);return sh.shouldAutoClosePair(e,i,n-i.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return _(t&&t.wordDefinition||null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,n){let i=e.getLanguageIdAtPosition(t,0);if(t>1){let o,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;let t=e.getLineContent(o);if(!n.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;r=o}}return-1}getInheritIndentForLine(e,t,n,i=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(n<=1)return{indentation:"",action:null};const r=this.getPrecedingValidLine(t,n,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};const s=t.getLineContent(r);if(o.shouldIncrease(s)||o.shouldIndentNextLine(s))return{indentation:Ur(s),action:Zc.Indent,line:r};if(o.shouldDecrease(s))return{indentation:Ur(s),action:null,line:r};{if(1===r)return{indentation:Ur(t.getLineContent(r)),action:null,line:r};const e=r-1,n=o.getIndentMetadata(t.getLineContent(e));if(!(3&n)&&4&n){let n=0;for(let i=e-1;i>0;i--)if(!o.shouldIndentNextLine(t.getLineContent(i))){n=i;break}return{indentation:Ur(t.getLineContent(n+1)),action:null,line:n+1}}if(i)return{indentation:Ur(t.getLineContent(r)),action:null,line:r};for(let i=r;i>0;i--){const e=t.getLineContent(i);if(o.shouldIncrease(e))return{indentation:Ur(e),action:Zc.Indent,line:i};if(o.shouldIndentNextLine(e)){let e=0;for(let n=i-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(i))){e=n;break}return{indentation:Ur(t.getLineContent(e+1)),action:null,line:e+1}}if(o.shouldDecrease(e))return{indentation:Ur(e),action:null,line:i}}return{indentation:Ur(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,n,i,o){if(e<4)return null;const r=this._getRichEditSupport(n);if(!r)return null;const s=this.getIndentRulesSupport(n);if(!s)return null;const a=this.getInheritIndentForLine(e,t,i),l=t.getLineContent(i);if(a){const n=a.line;if(void 0!==n){const i=r.onEnter(e,"",t.getLineContent(n),"");if(i){let e=Ur(t.getLineContent(n));return i.removeText&&(e=e.substring(0,e.length-i.removeText)),i.indentAction===Zc.Indent||i.indentAction===Zc.IndentOutdent?e=o.shiftIndent(e):i.indentAction===Zc.Outdent&&(e=o.unshiftIndent(e)),s.shouldDecrease(l)&&(e=o.unshiftIndent(e)),i.appendText&&(e+=i.appendText),Ur(e)}}return s.shouldDecrease(l)?a.action===Zc.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===Zc.Indent?o.shiftIndent(a.indentation):a.indentation}return null}getIndentForEnter(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);const o=t.getLineTokens(n.startLineNumber),r=ih(o,n.startColumn-1),s=r.getLineContent();let a,l,c=!1;if(r.firstCharOffset>0&&o.getLanguageId(0)!==r.languageId?(c=!0,a=s.substr(0,n.startColumn-1-r.firstCharOffset)):a=o.getLineContent().substring(0,n.startColumn-1),n.isEmpty())l=s.substr(n.startColumn-1-r.firstCharOffset);else{const e=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn);l=e.getLineContent().substr(n.endColumn-1-r.firstCharOffset)}const h=this.getIndentRulesSupport(r.languageId);if(!h)return null;const u=a,d=Ur(a),p={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,n)=>t.getLanguageIdAtPosition(e,n),getLineContent:e=>e===n.startLineNumber?u:t.getLineContent(e)},f=Ur(o.getLineContent()),g=this.getInheritIndentForLine(e,p,n.startLineNumber+1);if(!g){const e=c?f:d;return{beforeEnter:e,afterEnter:e}}let m=c?f:g.indentation;return g.action===Zc.Indent&&(m=i.shiftIndent(m)),h.shouldDecrease(l)&&(m=i.unshiftIndent(m)),{beforeEnter:c?f:d,afterEnter:m}}getIndentActionForType(e,t,n,i,o){if(e<4)return null;const r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn);if(r.firstCharOffset)return null;const s=this.getIndentRulesSupport(r.languageId);if(!s)return null;const a=r.getLineContent(),l=a.substr(0,n.startColumn-1-r.firstCharOffset);let c;if(n.isEmpty())c=a.substr(n.startColumn-1-r.firstCharOffset);else{const e=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn);c=e.getLineContent().substr(n.endColumn-1-r.firstCharOffset)}if(!s.shouldDecrease(l+c)&&s.shouldDecrease(l+i+c)){const i=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!i)return null;let r=i.indentation;return i.action!==Zc.Indent&&(r=o.unshiftIndent(r)),r}return null}getIndentMetadata(e,t){const n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,n){const i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;const r=i.getLineContent(),s=r.substr(0,n.startColumn-1-i.firstCharOffset);let a;if(n.isEmpty())a=r.substr(n.startColumn-1-i.firstCharOffset);else{const e=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn);a=e.getLineContent().substr(n.endColumn-1-i.firstCharOffset)}let l="";if(n.startLineNumber>1&&0===i.firstCharOffset){const e=this.getScopedLineTokens(t,n.startLineNumber-1);e.languageId===i.languageId&&(l=e.getLineContent())}const c=o.onEnter(e,l,s,a);if(!c)return null;const h=c.indentAction;let u=c.appendText;const d=c.removeText||0;u?h===Zc.Indent&&(u="\t"+u):u=h===Zc.Indent||h===Zc.IndentOutdent?"\t":"";let p=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return d&&(p=p.substring(0,p.length-d)),{indentAction:h,appendText:u,removeText:d,indentation:p}}getIndentationAtPosition(e,t,n){const i=e.getLineContent(t);let o=Ur(i);return o.length>n-1&&(o=o.substring(0,n-1)),o}getScopedLineTokens(e,t,n){e.forceTokenization(t);const i=e.getLineTokens(t),o="undefined"===typeof n?e.getLineMaxColumn(t)-1:n-1;return ih(i,o)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}getColorizedBracketPairs(e){var t;return(null===(t=this._getRichEditSupport(e))||void 0===t?void 0:t.characterPair.getColorizedBrackets())||[]}}const Wh=new Qh;class Hh{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class Uh{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n<i;n++)t[n]=e.charCodeAt(n);return t}}function Yh(e,t,n){return new Jh(new Uh(e),new Uh(t)).ComputeDiff(n).changes}class Gh{static Assert(e,t){if(!e)throw new Error(t)}}class Kh{static Copy(e,t,n,i,o){for(let r=0;r<o;r++)n[i+r]=e[t+r]}static Copy2(e,t,n,i,o){for(let r=0;r<o;r++)n[i+r]=e[t+r]}}class qh{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Hh(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Jh{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,o,r]=Jh._getElements(e),[s,a,l]=Jh._getElements(t);this._hasStrings=r&&l,this._originalStringElements=i,this._originalElementsOrHash=o,this._modifiedStringElements=s,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(Jh._isStringArray(t)){const e=new Int32Array(t.length);for(let n=0,i=t.length;n<i;n++)e[n]=nl(t[n],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}ElementsAreStrictEqual(e,t){if(!this.ElementsAreEqual(e,t))return!1;const n=Jh._getStrictElement(this._originalSequence,e),i=Jh._getStrictElement(this._modifiedSequence,t);return n===i}static _getStrictElement(e,t){return"function"===typeof e.getStrictElement?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,n,i,o){const r=[!1];let s=this.ComputeDiffRecursive(e,t,n,i,r);return o&&(s=this.PrettifyChanges(s)),{quitEarly:r[0],changes:s}}ComputeDiffRecursive(e,t,n,i,o){o[0]=!1;while(e<=t&&n<=i&&this.ElementsAreEqual(e,n))e++,n++;while(t>=e&&i>=n&&this.ElementsAreEqual(t,i))t--,i--;if(e>t||n>i){let o;return n<=i?(Gh.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new Hh(e,0,n,i-n+1)]):e<=t?(Gh.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),o=[new Hh(e,t-e+1,n,0)]):(Gh.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Gh.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const r=[0],s=[0],a=this.ComputeRecursionPoint(e,t,n,i,r,s,o),l=r[0],c=s[0];if(null!==a)return a;if(!o[0]){const r=this.ComputeDiffRecursive(e,l,n,c,o);let s=[];return s=o[0]?[new Hh(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,i,o),this.ConcatenateChanges(r,s)}return[new Hh(e,t-e+1,n,i-n+1)]}WALKTRACE(e,t,n,i,o,r,s,a,l,c,h,u,d,p,f,g,m,b){let v=null,y=null,w=new qh,_=t,C=n,A=d[0]-g[0]-i,E=-1073741824,x=this.m_forwardHistory.length-1;do{const t=A+e;t===_||t<C&&l[t-1]<l[t+1]?(h=l[t+1],p=h-A-i,h<E&&w.MarkNextChange(),E=h,w.AddModifiedElement(h+1,p),A=t+1-e):(h=l[t-1]+1,p=h-A-i,h<E&&w.MarkNextChange(),E=h-1,w.AddOriginalElement(h,p+1),A=t-1-e),x>=0&&(l=this.m_forwardHistory[x],e=l[0],_=1,C=l.length-1)}while(--x>=-1);if(v=w.getReverseChanges(),b[0]){let e=d[0]+1,t=g[0]+1;if(null!==v&&v.length>0){const n=v[v.length-1];e=Math.max(e,n.getOriginalEnd()),t=Math.max(t,n.getModifiedEnd())}y=[new Hh(e,u-e+1,t,f-t+1)]}else{w=new qh,_=r,C=s,A=d[0]-g[0]-a,E=1073741824,x=m?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=A+o;e===_||e<C&&c[e-1]>=c[e+1]?(h=c[e+1]-1,p=h-A-a,h>E&&w.MarkNextChange(),E=h+1,w.AddOriginalElement(h+1,p+1),A=e+1-o):(h=c[e-1],p=h-A-a,h>E&&w.MarkNextChange(),E=h,w.AddModifiedElement(h+1,p+1),A=e-1-o),x>=0&&(c=this.m_reverseHistory[x],o=c[0],_=1,C=c.length-1)}while(--x>=-1);y=w.getChanges()}return this.ConcatenateChanges(v,y)}ComputeRecursionPoint(e,t,n,i,o,r,s){let a=0,l=0,c=0,h=0,u=0,d=0;e--,n--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=t-e+(i-n),f=p+1,g=new Int32Array(f),m=new Int32Array(f),b=i-n,v=t-e,y=e-n,w=t-i,_=v-b,C=_%2===0;g[b]=e,m[v]=t,s[0]=!1;for(let A=1;A<=p/2+1;A++){let p=0,_=0;c=this.ClipDiagonalBound(b-A,A,b,f),h=this.ClipDiagonalBound(b+A,A,b,f);for(let e=c;e<=h;e+=2){a=e===c||e<h&&g[e-1]<g[e+1]?g[e+1]:g[e-1]+1,l=a-(e-b)-y;const n=a;while(a<t&&l<i&&this.ElementsAreEqual(a+1,l+1))a++,l++;if(g[e]=a,a+l>p+_&&(p=a,_=l),!C&&Math.abs(e-v)<=A-1&&a>=m[e])return o[0]=a,r[0]=l,n<=m[e]&&A<=1448?this.WALKTRACE(b,c,h,y,v,u,d,w,g,m,a,t,o,l,i,r,C,s):null}const E=(p-e+(_-n)-A)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(p,E))return s[0]=!0,o[0]=p,r[0]=_,E>0&&A<=1448?this.WALKTRACE(b,c,h,y,v,u,d,w,g,m,a,t,o,l,i,r,C,s):(e++,n++,[new Hh(e,t-e+1,n,i-n+1)]);u=this.ClipDiagonalBound(v-A,A,v,f),d=this.ClipDiagonalBound(v+A,A,v,f);for(let f=u;f<=d;f+=2){a=f===u||f<d&&m[f-1]>=m[f+1]?m[f+1]-1:m[f-1],l=a-(f-v)-w;const p=a;while(a>e&&l>n&&this.ElementsAreEqual(a,l))a--,l--;if(m[f]=a,C&&Math.abs(f-b)<=A&&a<=g[f])return o[0]=a,r[0]=l,p>=g[f]&&A<=1448?this.WALKTRACE(b,c,h,y,v,u,d,w,g,m,a,t,o,l,i,r,C,s):null}if(A<=1447){let e=new Int32Array(h-c+2);e[0]=b-c+1,Kh.Copy2(g,c,e,1,h-c+1),this.m_forwardHistory.push(e),e=new Int32Array(d-u+2),e[0]=v-u+1,Kh.Copy2(m,u,e,1,d-u+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,c,h,y,v,u,d,w,g,m,a,t,o,l,i,r,C,s)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const n=e[t],i=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,r=n.originalLength>0,s=n.modifiedLength>0;while(n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<o&&(!r||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength))){const e=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart),t=this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength);if(t&&!e)break;n.originalStart++,n.modifiedStart++}let a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const n=e[t];let i=0,o=0;if(t>0){const n=e[t-1];i=n.originalStart+n.originalLength,o=n.modifiedStart+n.modifiedLength}const r=n.originalLength>0,s=n.modifiedLength>0;let a=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let e=1;;e++){const t=n.originalStart-e,c=n.modifiedStart-e;if(t<i||c<o)break;if(r&&!this.OriginalElementsAreEqual(t,t+n.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(c,c+n.modifiedLength))break;const h=t===i&&c===o,u=(h?5:0)+this._boundaryScore(t,n.originalLength,c,n.modifiedLength);u>l&&(l=u,a=e)}n.originalStart-=a,n.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,n=e.length;t<n;t++){const n=e[t-1],i=e[t],o=i.originalStart-n.originalStart-n.originalLength,r=n.originalStart,s=i.originalStart+i.originalLength,a=s-r,l=n.modifiedStart,c=i.modifiedStart+i.modifiedLength,h=c-l;if(o<5&&a<20&&h<20){const e=this._findBetterContiguousSequence(r,a,l,h,o);if(e){const[t,r]=e;t===n.originalStart+n.originalLength&&r===n.modifiedStart+n.modifiedLength||(n.originalLength=t-n.originalStart,n.modifiedLength=r-n.modifiedStart,i.originalStart=t+o,i.modifiedStart=r+o,i.originalLength=s-i.originalStart,i.modifiedLength=c-i.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,n,i,o){if(t<o||i<o)return null;const r=e+t-o+1,s=n+i-o+1;let a=0,l=0,c=0;for(let h=e;h<r;h++)for(let e=n;e<s;e++){const t=this._contiguousSequenceScore(h,e,o);t>0&&t>a&&(a=t,l=h,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let o=0;o<n;o++){if(!this.ElementsAreEqual(e+o,t+o))return 0;i+=this._originalStringElements[e+o].length}return i}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){const o=this._OriginalRegionIsBoundary(e,t)?1:0,r=this._ModifiedRegionIsBoundary(n,i)?1:0;return o+r}ConcatenateChanges(e,t){let n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return Kh.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],Kh.Copy(t,1,i,e.length,t.length-1),i}{const n=new Array(e.length+t.length);return Kh.Copy(e,0,n,0,e.length),Kh.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,n){if(Gh.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Gh.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const i=e.originalStart;let o=e.originalLength;const r=e.modifiedStart;let s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new Hh(i,o,r,s),!0}return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e<i)return e;const o=n,r=i-n-1,s=t%2===0;if(e<0){const e=o%2===0;return s===e?0:1}{const e=r%2===0;return s===e?i-1:i-2}}}const $h=3;function Xh(e,t,n,i){const o=new Jh(e,t,n);return o.ComputeDiff(i)}class Zh{constructor(e){const t=[],n=[];for(let i=0,o=e.length;i<o;i++)t[i]=ru(e[i],1),n[i]=su(e[i],1);this.lines=e,this._startColumns=t,this._endColumns=n}getElements(){const e=[];for(let t=0,n=this.lines.length;t<n;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,n){const i=[],o=[],r=[];let s=0;for(let a=t;a<=n;a++){const t=this.lines[a],n=e?this._startColumns[a]:1,l=e?this._endColumns[a]:t.length+1;for(let e=n;e<l;e++)i[s]=t.charCodeAt(e-1),o[s]=a+1,r[s]=e,s++}return new eu(i,o,r)}}class eu{constructor(e,t,n){this._charCodes=e,this._lineNumbers=t,this._columns=n}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class tu{constructor(e,t,n,i,o,r,s,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=o,this.modifiedStartColumn=r,this.modifiedEndLineNumber=s,this.modifiedEndColumn=a}static createFromDiffChange(e,t,n){let i,o,r,s,a,l,c,h;return 0===e.originalLength?(i=0,o=0,r=0,s=0):(i=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),r=t.getEndLineNumber(e.originalStart+e.originalLength-1),s=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(a=0,l=0,c=0,h=0):(a=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=n.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new tu(i,o,r,s,a,l,c,h)}}function nu(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let i=1,o=e.length;i<o;i++){const o=e[i],r=o.originalStart-(n.originalStart+n.originalLength),s=o.modifiedStart-(n.modifiedStart+n.modifiedLength),a=Math.min(r,s);a<$h?(n.originalLength=o.originalStart+o.originalLength-n.originalStart,n.modifiedLength=o.modifiedStart+o.modifiedLength-n.modifiedStart):(t.push(o),n=o)}return t}class iu{constructor(e,t,n,i,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=o}static createFromDiffResult(e,t,n,i,o,r,s){let a,l,c,h,u=void 0;if(0===t.originalLength?(a=n.getStartLineNumber(t.originalStart)-1,l=0):(a=n.getStartLineNumber(t.originalStart),l=n.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=i.getStartLineNumber(t.modifiedStart)-1,h=0):(c=i.getStartLineNumber(t.modifiedStart),h=i.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),r&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const r=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=Xh(r,a,o,!0).changes;s&&(l=nu(l)),u=[];for(let e=0,t=l.length;e<t;e++)u.push(tu.createFromDiffChange(l[e],r,a))}return new iu(a,l,c,h,u)}}class ou{constructor(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new Zh(e),this.modified=new Zh(t),this.continueLineDiff=au(n.maxComputationTime),this.continueCharDiff=au(0===n.maxComputationTime?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return 1===this.modified.lines.length&&0===this.modified.lines[0].length?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=Xh(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let n=0,i=t.length;n<i;n++)e.push(iu.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[n],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:e}}const i=[];let o=0,r=0;for(let s=-1,a=t.length;s<a;s++){const e=s+1<a?t[s+1]:null,n=e?e.originalStart:this.originalLines.length,l=e?e.modifiedStart:this.modifiedLines.length;while(o<n&&r<l){const e=this.originalLines[o],t=this.modifiedLines[r];if(e!==t){{let n=ru(e,1),s=ru(t,1);while(n>1&&s>1){const i=e.charCodeAt(n-2),o=t.charCodeAt(s-2);if(i!==o)break;n--,s--}(n>1||s>1)&&this._pushTrimWhitespaceCharChange(i,o+1,1,n,r+1,1,s)}{let n=su(e,1),s=su(t,1);const a=e.length+1,l=t.length+1;while(n<a&&s<l){const t=e.charCodeAt(n-1),i=e.charCodeAt(s-1);if(t!==i)break;n++,s++}(n<a||s<l)&&this._pushTrimWhitespaceCharChange(i,o+1,n,a,r+1,s,l)}}o++,r++}e&&(i.push(iu.createFromDiffResult(this.shouldIgnoreTrimWhitespace,e,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=e.originalLength,r+=e.modifiedLength)}return{quitEarly:n,changes:i}}_pushTrimWhitespaceCharChange(e,t,n,i,o,r,s){if(this._mergeTrimWhitespaceCharChange(e,t,n,i,o,r,s))return;let a=void 0;this.shouldComputeCharChanges&&(a=[new tu(t,n,t,i,o,r,o,s)]),e.push(new iu(t,t,o,o,a))}_mergeTrimWhitespaceCharChange(e,t,n,i,o,r,s){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&(l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===o&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new tu(t,n,t,i,o,r,o,s)),!0))}}function ru(e,t){const n=Hr(e);return-1===n?t:n+1}function su(e,t){const n=Yr(e);return-1===n?t:n+2}function au(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}function lu(e){return e<0?0:e>255?255:0|e}function cu(e){return e<0?0:e>4294967295?4294967295:0|e}class hu{constructor(e,t){this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class uu{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=cu(e);const n=this.values,i=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(n.length+o),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=cu(e),t=cu(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=cu(e),t=cu(t);const n=this.values,i=this.prefixSum;if(e>=n.length)return!1;let o=n.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=cu(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,o=0,r=0;while(t<=n)if(i=t+(n-t)/2|0,o=this.prefixSum[i],r=o-this.values[i],e<r)n=i-1;else{if(!(e>=o))break;t=i+1}return new hu(i,e-r)}}class du{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new Nn(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;i<t;i++)n[i]=this._lines[i].length+e;this._lineStarts=new uu(n)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;let n=Wr(t);if(1===n.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);let i=new Uint32Array(n.length-1);for(let o=1;o<n.length;o++)this._lines.splice(e.lineNumber+o-1,0,n[o]),i[o-1]=n[o].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,i)}}class pu{constructor(e){let t=lu(e);this._defaultValue=t,this._asciiMap=pu._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let n=0;n<256;n++)t[n]=e;return t}set(e,t){let n=lu(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class fu{constructor(e,t,n){const i=new Uint8Array(e*t);for(let o=0,r=e*t;o<r;o++)i[o]=n;this._data=i,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,n){this._data[e*this.cols+t]=n}}class gu{constructor(e){let t=0,n=0;for(let o=0,r=e.length;o<r;o++){let[i,r,s]=e[o];r>t&&(t=r),i>n&&(n=i),s>n&&(n=s)}t++,n++;let i=new fu(n,t,0);for(let o=0,r=e.length;o<r;o++){let[t,n,r]=e[o];i.set(t,n,r)}this._states=i,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let mu=null;function bu(){return null===mu&&(mu=new gu([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),mu}let vu=null;function yu(){if(null===vu){vu=new pu(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let n=0;n<e.length;n++)vu.set(e.charCodeAt(n),1);const t=".,;";for(let n=0;n<t.length;n++)vu.set(t.charCodeAt(n),2)}return vu}class wu{static _createLink(e,t,n,i,o){let r=o-1;do{const n=t.charCodeAt(r),i=e.get(n);if(2!==i)break;r--}while(r>i);if(i>0){const e=t.charCodeAt(i-1),n=t.charCodeAt(r);(40===e&&41===n||91===e&&93===n||123===e&&125===n)&&r--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}}static computeLinks(e,t=bu()){const n=yu();let i=[];for(let o=1,r=e.getLineCount();o<=r;o++){const r=e.getLineContent(o),s=r.length;let a=0,l=0,c=0,h=1,u=!1,d=!1,p=!1,f=!1;while(a<s){let e=!1;const s=r.charCodeAt(a);if(13===h){let t;switch(s){case 40:u=!0,t=0;break;case 41:t=u?0:1;break;case 91:p=!0,d=!0,t=0;break;case 93:p=!1,t=d?0:1;break;case 123:f=!0,t=0;break;case 125:t=f?0:1;break;case 39:t=34===c||96===c?0:1;break;case 34:t=39===c||96===c?0:1;break;case 96:t=39===c||34===c?0:1;break;case 42:t=42===c?1:0;break;case 124:t=124===c?1:0;break;case 32:t=p?0:1;break;default:t=n.get(s)}1===t&&(i.push(wu._createLink(n,r,o,l,a)),e=!0)}else if(12===h){let t;91===s?(d=!0,t=0):t=n.get(s),1===t?e=!0:h=13}else h=t.nextState(h,s),0===h&&(e=!0);e&&(h=1,u=!1,d=!1,f=!1,l=a+1,c=s),a++}13===h&&i.push(wu._createLink(n,r,o,l,s))}return i}}function _u(e){return e&&"function"===typeof e.getLineCount&&"function"===typeof e.getLineContent?wu.computeLinks(e):[]}class Cu{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,n,i,o){if(e&&t){let n=this.doNavigateValueSet(t,o);if(n)return{range:e,value:n}}if(n&&i){let e=this.doNavigateValueSet(i,o);if(e)return{range:n,value:e}}return null}doNavigateValueSet(e,t){let n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)}numberReplace(e,t){let n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),i=Number(e),o=parseFloat(e);return isNaN(i)||isNaN(o)||i!==o?null:0!==i||t?(i=Math.floor(i*n),i+=t?n:-n,String(i/n)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,n){let i=null;for(let o=0,r=e.length;null===i&&o<r;o++)i=this.valueSetReplace(e[o],t,n);return i}valueSetReplace(e,t,n){let i=e.indexOf(t);return i>=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}Cu.INSTANCE=new Cu;var Au=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class Eu extends du{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let n=A(e.column,_(t),this._lines[e.lineNumber-1],0);return n?new Mn(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}words(e){const t=this._lines,n=this._wordenize.bind(this);let i=0,o="",r=0,s=[];return{*[Symbol.iterator](){while(1)if(r<s.length){const e=o.substring(s[r].start,s[r].end);r+=1,yield e}else{if(!(i<t.length))break;o=t[i],s=n(o,e),r=0,i+=1}}}}getLineWords(e,t){let n=this._lines[e-1],i=this._wordenize(n,t),o=[];for(const r of i)o.push({word:n.substring(r.start,r.end),startColumn:r.start+1,endColumn:r.end+1});return o}_wordenize(e,t){const n=[];let i;t.lastIndex=0;while(i=t.exec(e)){if(0===i[0].length)break;n.push({start:i.index,end:i.index+i[0].length})}return n}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,o=[];o.push(this._lines[n].substring(e.startColumn-1));for(let r=n+1;r<i;r++)o.push(this._lines[r]);return o.push(this._lines[i].substring(0,e.endColumn-1)),o.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e}_validatePosition(e){if(!Nn.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:n}=e,i=!1;if(t<1)t=1,n=1,i=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{let e=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>e&&(n=e,i=!0)}return i?{lineNumber:t,column:n}:e}}class xu{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new Eu(wn.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;let n=this._models[e];n.onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,n,i){return Au(this,void 0,void 0,(function*(){const o=this._getModel(e),r=this._getModel(t);if(!o||!r)return null;const s=o.getLinesContent(),a=r.getLinesContent(),l=new ou(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}),c=l.computeDiff(),h=!(c.changes.length>0)&&this._modelsAreIdentical(o,r);return{quitEarly:c.quitEarly,identical:h,changes:c.changes}}))}_modelsAreIdentical(e,t){const n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(let o=1;o<=n;o++){const n=e.getLineContent(o),i=t.getLineContent(o);if(n!==i)return!1}return!0}computeMoreMinimalEdits(e,t){return Au(this,void 0,void 0,(function*(){const n=this._getModel(e);if(!n)return t;const i=[];let o=void 0;t=t.slice(0).sort((e,t)=>{if(e.range&&t.range)return Mn.compareRangesUsingStarts(e.range,t.range);let n=e.range?0:1,i=t.range?0:1;return n-i});for(let{range:e,text:r,eol:s}of t){if("number"===typeof s&&(o=s),Mn.isEmpty(e)&&!r)continue;const t=n.getValueInRange(e);if(r=r.replace(/\r\n|\n|\r/g,n.eol),t===r)continue;if(Math.max(r.length,t.length)>xu._diffLimit){i.push({range:e,text:r});continue}const a=Yh(t,r,!1),l=n.offsetAt(Mn.lift(e).getStartPosition());for(const e of a){const t=n.positionAt(l+e.originalStart),o=n.positionAt(l+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};n.getValueInRange(s.range)!==s.text&&i.push(s)}}return"number"===typeof o&&i.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}))}computeLinks(e){return Au(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?_u(t):null}))}textualSuggest(e,t,n,i){return Au(this,void 0,void 0,(function*(){const o=new dt(!0),r=new RegExp(n,i),s=new Set;e:for(let n of e){const e=this._getModel(n);if(e)for(let n of e.words(r))if(n!==t&&isNaN(Number(n))&&(s.add(n),s.size>xu._suggestionsLimit))break e}return{words:Array.from(s),duration:o.elapsed()}}))}computeWordRanges(e,t,n,i){return Au(this,void 0,void 0,(function*(){let o=this._getModel(e);if(!o)return Object.create(null);const r=new RegExp(n,i),s=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){let t=o.getLineWords(e,r);for(const n of t){if(!isNaN(Number(n.word)))continue;let t=s[n.word];t||(t=[],s[n.word]=t),t.push({startLineNumber:e,startColumn:n.startColumn,endLineNumber:e,endColumn:n.endColumn})}}return s}))}navigateValueSet(e,t,n,i,o){return Au(this,void 0,void 0,(function*(){let r=this._getModel(e);if(!r)return null;let s=new RegExp(i,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let a=r.getValueInRange(t),l=r.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},s);if(!l)return null;let c=r.getValueInRange(l),h=Cu.INSTANCE.navigateValueSet(t,a,l,c,n);return h}))}loadForeignModule(e,t,n){const i=(e,t)=>this._host.fhr(e,t),o=ga(n,i);let r={host:o,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve(fa(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}}xu._diffLimit=1e5,xu._suggestionsLimit=1e4,"function"===typeof importScripts&&(b["b"].monaco=yi());const Su=Ai("textResourceConfigurationService"),ku=Ai("textResourcePropertiesService");function Du(e,t=0){return e[e.length-(1+t)]}function Lu(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function Iu(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,o=e.length;i<o;i++)if(!n(e[i],t[i]))return!1;return!0}function Nu(e,t,n){let i=0,o=e.length-1;while(i<=o){const r=(i+o)/2|0,s=n(e[r],t);if(s<0)i=r+1;else{if(!(s>0))return r;o=r-1}}return-(i+1)}function Mu(e){return e.filter(e=>!!e)}function Bu(e){return!Array.isArray(e)||0===e.length}function Tu(e){return Array.isArray(e)&&e.length>0}function Ou(e,t){if(!t)return e.filter((t,n)=>e.indexOf(t)===n);const n=Object.create(null);return e.filter(e=>{const i=t(e);return!n[i]&&(n[i]=!0,!0)})}function Ru(e){const t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))}function Pu(e,t){const n=Fu(e,t);if(-1!==n)return e[n]}function Fu(e,t){for(let n=e.length-1;n>=0;n--){const i=e[n];if(t(i))return n}return-1}function ju(e,t){return e.length>0?e[0]:t}function zu(e,t){let n="number"===typeof t?e:0;"number"===typeof t?n=e:(n=0,t=e);const i=[];if(n<=t)for(let o=n;o<t;o++)i.push(o);else for(let o=n;o>t;o--)i.push(o);return i}function Vu(e,t,n){const i=e.slice(0,t),o=e.slice(t);return i.concat(n,o)}function Qu(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function Wu(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function Hu(e,t,n){const i=Yu(e,t),o=e.length,r=n.length;e.length=o+r;for(let s=o-1;s>=i;s--)e[s+r]=e[s];for(let s=0;s<r;s++)e[s+i]=n[s]}function Uu(e,t,n,i){const o=Yu(e,t),r=e.splice(o,n);return Hu(e,o,i),r}function Yu(e,t){return t<0?Math.max(t+e.length,0):Math.min(t,e.length)}class Gu{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;while(t<this.items.length&&e(this.items[t]))t++;const n=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,n}takeFromEndWhile(e){let t=this.lastIdx;while(t>=0&&e(this.items[t]))t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){return this.items[this.firstIdx]}}const Ku=Ai("logService");var qu;(function(e){e[e["Trace"]=0]="Trace",e[e["Debug"]=1]="Debug",e[e["Info"]=2]="Info",e[e["Warning"]=3]="Warning",e[e["Error"]=4]="Error",e[e["Critical"]=5]="Critical",e[e["Off"]=6]="Off"})(qu||(qu={}));const Ju=qu.Info;class $u extends st{constructor(){super(...arguments),this.level=Ju,this._onDidChangeLogLevel=this._register(new bt)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class Xu extends $u{constructor(e=Ju){super(),this.setLevel(e)}trace(e,...t){this.getLevel(),qu.Trace}debug(e,...t){this.getLevel(),qu.Debug}info(e,...t){this.getLevel(),qu.Info}error(e,...t){this.getLevel(),qu.Error}dispose(){}}class Zu extends st{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}var ed=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},td=function(e,t){return function(n,i){t(n,i,e)}},nd=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const id=6e4,od=3e5;function rd(e,t){let n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing()}let sd=class extends st{constructor(e,t,n){super(),this._modelService=e,this._workerManager=this._register(new ld(this._modelService)),this._logService=n,this._register(xc.register("*",{provideLinks:(e,t)=>rd(this._modelService,e.uri)?this._workerManager.withWorker().then(t=>t.computeLinks(e.uri)).then(e=>e&&{links:e}):Promise.resolve({links:[]})})),this._register(lc.register("*",new ad(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}computeDiff(e,t,n,i){return this._workerManager.withWorker().then(o=>o.computeDiff(e,t,n,i))}computeMoreMinimalEdits(e,t){if(Tu(t)){if(!rd(this._modelService,e))return Promise.resolve(t);const n=dt.create(!0),i=this._workerManager.withWorker().then(n=>n.computeMoreMinimalEdits(e,t));return i.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed())),Promise.race([i,ao(1e3).then(()=>t)])}return Promise.resolve(void 0)}canNavigateValueSet(e){return rd(this._modelService,e)}navigateValueSet(e,t,n){return this._workerManager.withWorker().then(i=>i.navigateValueSet(e,t,n))}canComputeWordRanges(e){return rd(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,t))}};sd=ed([td(0,zl),td(1,Su),td(2,Ku)],sd);class ad{constructor(e,t,n){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}provideCompletionItems(e,t){return nd(this,void 0,void 0,(function*(){const n=this._configurationService.getValue(e.uri,t,"editor");if(!n.wordBasedSuggestions)return;const i=[];if("currentDocument"===n.wordBasedSuggestionsMode)rd(this._modelService,e.uri)&&i.push(e.uri);else for(const t of this._modelService.getModels())rd(this._modelService,t.uri)&&(t===e?i.unshift(t.uri):"allDocuments"!==n.wordBasedSuggestionsMode&&t.getLanguageIdentifier().id!==e.getLanguageIdentifier().id||i.push(t.uri));if(0===i.length)return;const o=Wh.getWordDefinition(e.getLanguageIdentifier().id),r=e.getWordAtPosition(t),s=r?new Mn(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):Mn.fromPositions(t),a=s.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),c=yield l.textualSuggest(i,null===r||void 0===r?void 0:r.word,o);return c?{duration:c.duration,suggestions:c.words.map(e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:s}}))}:void 0}))}}class ld extends st{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();let t=this._register(new ho);t.cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(od/2)),this._register(this._modelService.onModelRemoved(e=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;let e=this._modelService.getModels();0===e.length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;let e=(new Date).getTime()-this._lastWorkerUsedTime;e>od&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new dd(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class cd extends st{constructor(e,t,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){let e=new ho;e.cancelAndSet(()=>this._checkStopModelSync(),Math.round(id/2)),this._register(e)}}dispose(){for(let e in this._syncedModels)nt(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const n of e){let e=n.toString();this._syncedModels[e]||this._beginModelSync(n,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let n in this._syncedModelsLastUsedTime){let i=e-this._syncedModelsLastUsedTime[n];i>id&&t.push(n)}for(const n of t)this._stopModelSync(n)}_beginModelSync(e,t){let n=this._modelService.getModel(e);if(!n)return;if(!t&&n.isTooLargeForSyncing())return;let i=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const o=new rt;o.add(n.onDidChangeContent(e=>{this._proxy.acceptModelChanged(i.toString(),e)})),o.add(n.onWillDispose(()=>{this._stopModelSync(i)})),o.add(ot(()=>{this._proxy.acceptRemovedModel(i)})),this._syncedModels[i]=o}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],nt(t)}}class hd{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class ud{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class dd extends st{constructor(e,t,n){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Xc(n),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Yc(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new ud(this)))}catch(e){Hc(e),this._worker=new hd(new xu(new ud(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(Hc(e),this._worker=new hd(new xu(new ud(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new cd(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return nd(this,void 0,void 0,(function*(){return this._disposed?Promise.reject(ze()):this._getProxy().then(n=>(this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n))}))}computeDiff(e,t,n,i){return this._withSyncedResources([e,t],!0).then(o=>o.computeDiff(e.toString(),t.toString(),n,i))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then(n=>n.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t,n){return nd(this,void 0,void 0,(function*(){const i=yield this._withSyncedResources(e),o=n.source,r=Qr(n);return i.textualSuggest(e.map(e=>e.toString()),t,o,r)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then(n=>{let i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);let o=Wh.getWordDefinition(i.getLanguageIdentifier().id),r=o.source,s=Qr(o);return n.computeWordRanges(e.toString(),t,r,s)})}navigateValueSet(e,t,n){return this._withSyncedResources([e]).then(i=>{let o=this._modelService.getModel(e);if(!o)return null;let r=Wh.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=Qr(r);return i.navigateValueSet(e.toString(),t,n,s,a)})}dispose(){super.dispose(),this._disposed=!0}}function pd(e,t){return new fd(e,t)}class fd extends dd{constructor(e,t){super(e,t.keepIdleModels||!1,t.label),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!==typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?fa(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(t=>{this._foreignModuleCreateData=null;const n=(t,n)=>e.fmr(t,n),i=(e,t)=>function(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)};let o={};for(const e of t)o[e]=i(e,n);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(e=>this.getProxy())}}class gd{constructor(e,t){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}static createEmpty(e){const t=gd.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=t,new gd(n,e)}equals(e){return e instanceof gd&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,o=i+(n<<1);for(let r=i;r<o;r++)if(this._tokens[r]!==e._tokens[r])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)];return Zl.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return Zl.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return Zl.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return Zl.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return Zl.getInlineStyleFromMetadata(n,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return gd.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new md(this,e,t,n)}static convertToEndOffset(e,t){const n=e.length>>>1,i=n-1;for(let o=0;o<i;o++)e[o<<1]=e[o+1<<1];e[i<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let n=0,i=(e.length>>>1)-1;while(n<i){const o=n+Math.floor((i-n)/2),r=e[o<<1];if(r===t)return o+1;r<t?n=o+1:r>t&&(i=o)}return n}withInserted(e){if(0===e.length)return this;let t=0,n=0,i="";const o=new Array;let r=0;while(1){let s=t<this._tokensCount?this._tokens[t<<1]:-1,a=n<e.length?e[n]:null;if(-1!==s&&(null===a||s<=a.offset)){i+=this._text.substring(r,s);const e=this._tokens[1+(t<<1)];o.push(i.length,e),t++,r=s}else{if(!a)break;if(a.offset>r){i+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];o.push(i.length,e),r=a.offset}i+=a.text,o.push(i.length,a.tokenMetadata),n++}}return new gd(new Uint32Array(o),i)}}gd.defaultTokenMetadata=16793600;class md{constructor(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let o=this._firstTokenIndex,r=e.getCount();o<r;o++){const t=e.getStartOffset(o);if(t>=n)break;this._tokensCount++}}equals(e){return e instanceof md&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class bd{constructor(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.type=i,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const n=e.length,i=t.length;if(n!==i)return!1;for(let o=0;o<n;o++)if(!bd._equals(e[o],t[o]))return!1;return!0}static extractWrapped(e,t,n){if(0===e.length)return e;const i=t+1,o=n+1,r=n-t,s=[];let a=0;for(const l of e)l.endColumn<=i||l.startColumn>=o||(s[a++]=new bd(Math.max(1,l.startColumn-i+1),Math.min(r+1,l.endColumn-i+1),l.className,l.type));return s}static filter(e,t,n,i){if(0===e.length)return[];let o=[],r=0;for(let s=0,a=e.length;s<a;s++){const a=e[s],l=a.range;if(l.endLineNumber<t||l.startLineNumber>t)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const c=l.startLineNumber===t?l.startColumn:n,h=l.endLineNumber===t?l.endColumn:i;o[r++]=new bd(c,h,a.inlineClassName,a.type)}return o}static _typeCompare(e,t){const n=[2,0,1,3];return n[e]-n[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const n=bd._typeCompare(e.type,t.type);return 0!==n?n:e.className!==t.className?e.className<t.className?-1:1:0}}class vd{constructor(e,t,n,i){this.startOffset=e,this.endOffset=t,this.className=n,this.metadata=i}}class yd{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let n=0,i=e.length;n<i;n++)t|=e[n];return t}consumeLowerThan(e,t,n){while(this.count>0&&this.stopOffsets[0]<e){let e=0;while(e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1])e++;n.push(new vd(t,this.stopOffsets[e],this.classNames.join(" "),yd._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(n.push(new vd(t,e-1,this.classNames.join(" "),yd._metadata(this.metadata))),t=e),t}insert(e,t,n){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(n);else for(let i=0;i<this.count;i++)if(this.stopOffsets[i]>=e){this.stopOffsets.splice(i,0,e),this.classNames.splice(i,0,t),this.metadata.splice(i,0,n);break}this.count++}}class wd{static normalize(e,t){if(0===t.length)return[];let n=[];const i=new yd;let o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];let a=s.startColumn,l=s.endColumn;const c=s.className,h=1===s.type?2:2===s.type?4:0;if(a>1){const t=e.charCodeAt(a-2);rs(t)&&a--}if(l>1){const t=e.charCodeAt(l-2);rs(t)&&l--}const u=a-1,d=l-2;o=i.consumeLowerThan(u,o,n),0===i.count&&(o=u),i.insert(d,c,h)}return i.consumeLowerThan(1073741824,o,n),n}}class _d{constructor(e,t,n){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=n}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class Cd{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Ad{constructor(e,t,n,i,o,r,s,a,l,c,h,u,d,p,f,g,m,b,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=l.sort(bd.compare),this.tabSize=c,this.startVisibleColumn=h,this.spaceWidth=u,this.stopRenderingLineAfter=f,this.renderWhitespace="all"===g?4:"boundary"===g?1:"selection"===g?2:"trailing"===g?3:0,this.renderControlCharacters=m,this.fontLigatures=b,this.selectionsOnLine=v&&v.sort((e,t)=>e.startOffset<t.startOffset?-1:1);const y=Math.abs(p-u),w=Math.abs(d-u);y<w?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=d,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&bd.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class Ed{constructor(e,t){this.partIndex=e,this.charIndex=t}}class xd{constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(4294901760&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,n,i){const o=(t<<16|n<<0)>>>0;this._data[e-1]=o,this._absoluteOffsets[e-1]=i+n}getAbsoluteOffset(e){return 0===this._absoluteOffsets.length?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),n=xd.getPartIndex(t),i=xd.getCharIndex(t);return new Ed(n,i)}getColumn(e,t){const n=this.partDataToCharOffset(e.partIndex,t,e.charIndex);return n+1}partDataToCharOffset(e,t,n){if(0===this.length)return 0;let i=(e<<16|n<<0)>>>0,o=0,r=this.length-1;while(o+1<r){let e=o+r>>>1,t=this._data[e];if(t===i)return e;t>i?r=e:o=e}if(o===r)return o;let s=this._data[o],a=this._data[r];if(s===i)return o;if(a===i)return r;let l,c=xd.getPartIndex(s),h=xd.getCharIndex(s),u=xd.getPartIndex(a);l=c!==u?t:xd.getCharIndex(a);let d=n-h,p=l-n;return d<=p?o:r}}class Sd{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}function kd(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("<span>");let n=0,i=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendASCIIString('<span class="'),t.appendASCIIString(s.className),t.appendASCIIString('"></span>'),1===s.type&&(o|=1,n++),2===s.type&&(o|=2,i++));t.appendASCIIString("</span>");const r=new xd(1,n+i);return r.setColumnInfo(1,n,0,0),new Sd(r,!1,o)}return t.appendASCIIString("<span><span></span></span>"),new Sd(new xd(0,0),!1,0)}return Rd(Nd(e),t)}class Dd{constructor(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}}function Ld(e){let t=fh(1e4),n=kd(e,t);return new Dd(n.characterMapping,t.build(),n.containsRTL,n.containsForeignElements)}class Id{constructor(e,t,n,i,o,r,s,a,l,c,h,u,d,p,f){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=i,this.isOverflowing=o,this.parts=r,this.containsForeignElements=s,this.fauxIndentLength=a,this.tabSize=l,this.startVisibleColumn=c,this.containsRTL=h,this.spaceWidth=u,this.renderSpaceCharCode=d,this.renderWhitespace=p,this.renderControlCharacters=f}}function Nd(e){const t=e.lineContent;let n,i;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<t.length?(n=!0,i=e.stopRenderingLineAfter):(n=!1,i=t.length);let o=Md(e.lineTokens,e.fauxIndentLength,i);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(o=Td(e,t,i,o));let r=0;if(e.lineDecorations.length>0){for(let t=0,n=e.lineDecorations.length;t<n;t++){const n=e.lineDecorations[t];3===n.type||1===n.type?r|=1:2===n.type&&(r|=2)}o=Od(t,i,o,e.lineDecorations)}return e.containsRTL||(o=Bd(t,o,!e.isBasicASCII||e.fontLigatures)),new Id(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,t,i,n,o,r,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}function Md(e,t,n){let i=[],o=0;t>0&&(i[o++]=new _d(t,"",0));for(let r=0,s=e.getCount();r<s;r++){const s=e.getEndOffset(r);if(s<=t)continue;const a=e.getClassName(r);if(s>=n){i[o++]=new _d(n,a,0);break}i[o++]=new _d(s,a,0)}return i}function Bd(e,t,n){let i=0,o=[],r=0;if(n)for(let s=0,a=t.length;s<a;s++){const n=t[s],a=n.endIndex;if(i+50<a){const t=n.type,s=n.metadata;let l=-1,c=i;for(let n=i;n<a;n++)32===e.charCodeAt(n)&&(l=n),-1!==l&&n-c>=50&&(o[r++]=new _d(l+1,t,s),c=l+1,l=-1);c!==a&&(o[r++]=new _d(a,t,s))}else o[r++]=n;i=a}else for(let s=0,a=t.length;s<a;s++){const e=t[s],n=e.endIndex;let a=n-i;if(a>50){const t=e.type,s=e.metadata,l=Math.ceil(a/50);for(let e=1;e<l;e++){let n=i+50*e;o[r++]=new _d(n,t,s)}o[r++]=new _d(n,t,s)}else o[r++]=e;i=n}return o}function Td(e,t,n,i){const o=e.continuesWithWrappedLine,r=e.fauxIndentLength,s=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,c=e.selectionsOnLine,h=1===e.renderWhitespace,u=3===e.renderWhitespace,d=e.renderSpaceWidth!==e.spaceWidth;let p=[],f=0,g=0,m=i[g].type,b=i[g].endIndex;const v=i.length;let y,w=!1,_=Hr(t);-1===_?(w=!0,_=n,y=n):y=Yr(t);let C=!1,A=0,E=c&&c[A],x=a%s;for(let k=r;k<n;k++){const e=t.charCodeAt(k);let o;if(E&&k>=E.endOffset&&(A++,E=c&&c[A]),k<_||k>y)o=!0;else if(9===e)o=!0;else if(32===e)if(h)if(C)o=!0;else{const e=k+1<n?t.charCodeAt(k+1):0;o=32===e||9===e}else o=!0;else o=!1;if(o&&c&&(o=!!E&&E.startOffset<=k&&E.endOffset>k),o&&u&&(o=w||k>y),C){if(!o||!l&&x>=s){if(d){const e=f>0?p[f-1].endIndex:r;for(let t=e+1;t<=k;t++)p[f++]=new _d(t,"mtkw",1)}else p[f++]=new _d(k,"mtkw",1);x%=s}}else(k===b||o&&k>r)&&(p[f++]=new _d(k,m,0),x%=s);9===e?x=s:_s(e)?x+=2:x++,C=o;while(k===b){if(g++,!(g<v))break;m=i[g].type,b=i[g].endIndex}}let S=!1;if(C)if(o&&h){let e=n>0?t.charCodeAt(n-1):0,i=n>1?t.charCodeAt(n-2):0,o=32===e&&32!==i&&9!==i;o||(S=!0)}else S=!0;if(S)if(d){const e=f>0?p[f-1].endIndex:r;for(let t=e+1;t<=n;t++)p[f++]=new _d(t,"mtkw",1)}else p[f++]=new _d(n,"mtkw",1);else p[f++]=new _d(n,m,0);return p}function Od(e,t,n,i){i.sort(bd.compare);const o=wd.normalize(e,i),r=o.length;let s=0,a=[],l=0,c=0;for(let u=0,d=n.length;u<d;u++){const e=n[u],t=e.endIndex,i=e.type,h=e.metadata;while(s<r&&o[s].startOffset<t){const e=o[s];if(e.startOffset>c&&(c=e.startOffset,a[l++]=new _d(c,i,h)),!(e.endOffset+1<=t)){c=t,a[l++]=new _d(c,i+" "+e.className,h|e.metadata);break}c=e.endOffset+1,a[l++]=new _d(c,i+" "+e.className,h|e.metadata),s++}t>c&&(c=t,a[l++]=new _d(c,i,h))}const h=n[n.length-1].endIndex;if(s<r&&o[s].startOffset===h)while(s<r&&o[s].startOffset===h){const e=o[s];a[l++]=new _d(c,e.className,e.metadata),s++}return a}function Rd(e,t){const n=e.fontIsMonospace,i=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,l=e.parts,c=e.fauxIndentLength,h=e.tabSize,u=e.startVisibleColumn,d=e.containsRTL,p=e.spaceWidth,f=e.renderSpaceCharCode,g=e.renderWhitespace,m=e.renderControlCharacters,b=new xd(s+1,l.length);let v=!1,y=0,w=u,_=0,C=0,A=0,E=0;d?t.appendASCIIString('<span dir="ltr">'):t.appendASCIIString("<span>");for(let x=0,S=l.length;x<S;x++){E+=A;const e=l[x],a=e.endIndex,u=e.type,d=0!==g&&e.isWhitespace(),S=d&&!n&&("mtkw"===u||!o),k=y===a&&e.isPseudoAfter();if(_=0,t.appendASCIIString('<span class="'),t.appendASCIIString(S?"mtkz":u),t.appendASCII(34),d){let e=0;{let t=y,n=w;for(;t<a;t++){const i=r.charCodeAt(t),o=0|(9===i?h-n%h:1);e+=o,t>=c&&(n+=o)}}for(S&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(p*e)),t.appendASCIIString('px"')),t.appendASCII(62);y<a;y++){b.setColumnInfo(y+1,x-C,_,E),C=0;const e=r.charCodeAt(y);let n;if(9===e){n=h-w%h|0,!i||n>1?t.write1(8594):t.write1(65515);for(let e=2;e<=n;e++)t.write1(160)}else n=1,t.write1(f);_+=n,y>=c&&(w+=n)}A=e}else{let e=0;for(t.appendASCII(62);y<a;y++){b.setColumnInfo(y+1,x-C,_,E),C=0;const n=r.charCodeAt(y);let i=1,o=1;switch(n){case 9:i=h-w%h,o=i;for(let e=1;e<=i;e++)t.write1(160);break;case 32:t.write1(160);break;case 60:t.appendASCIIString("&lt;");break;case 62:t.appendASCIIString("&gt;");break;case 38:t.appendASCIIString("&amp;");break;case 0:m?t.write1(9216):t.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:t.write1(65533);break;default:_s(n)&&o++,m&&n<32?t.write1(9216+n):m&&127===n?t.write1(9249):t.write1(n)}_+=i,e+=i,y>=c&&(w+=o)}A=e}k?C++:C=0,y>=s&&!v&&e.isPseudoAfter()&&(v=!0,b.setColumnInfo(y+1,x,_,E)),t.appendASCIIString("</span>")}return v||b.setColumnInfo(s+1,l.length-1,_,E),a&&t.appendASCIIString("<span>&hellip;</span>"),t.appendASCIIString("</span>"),new Sd(b,d,o)}class Pd{constructor(e,t,n,i){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i}}class Fd{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e,t){const n=this.outputLineIndex>0?t:0;return new Nn(e+this.outputLineIndex,n+this.outputOffset+1)}}class jd{constructor(e,t,n,i,o){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=n,this.injectionOffsets=i,this.injectionOptions=o}getInputOffsetOfOutputPosition(e,t){let n=0;if(n=0===e?t:this.breakOffsets[e-1]+t,null!==this.injectionOffsets)for(let i=0;i<this.injectionOffsets.length;i++){if(!(n>this.injectionOffsets[i]))break;n<this.injectionOffsets[i]+this.injectionOptions[i].content.length?n=this.injectionOffsets[i]:n-=this.injectionOptions[i].content.length}return n}getOutputPositionOfInputOffset(e,t=2){let n=0;if(null!==this.injectionOffsets)for(let i=0;i<this.injectionOffsets.length;i++){if(e<this.injectionOffsets[i])break;if(1!==t&&e===this.injectionOffsets[i])break;n+=this.injectionOptions[i].content.length}return e+=n,this.getOutputPositionOfOffsetInUnwrappedLine(e,t)}getOutputPositionOfOffsetInUnwrappedLine(e,t=2){let n=0,i=this.breakOffsets.length-1,o=0,r=0;while(n<=i){o=n+(i-n)/2|0;const s=this.breakOffsets[o];if(r=o>0?this.breakOffsets[o-1]:0,0===t)if(e<=r)i=o-1;else{if(!(e>s))break;n=o+1}else if(e<r)i=o-1;else{if(!(e>=s))break;n=o+1}}return new Fd(o,e-r)}outputPositionToOffsetInUnwrappedLine(e,t){let n=(e>0?this.breakOffsets[e-1]:0)+t;return e>0&&(n-=this.wrappedTextIndentLength),n}normalizeOffsetAroundInjections(e,t){const n=this.getInjectedTextAtOffset(e);if(!n)return e;if(2===t)return e===n.offsetInUnwrappedLine+n.length?n.offsetInUnwrappedLine+n.length:n.offsetInUnwrappedLine;if(1===t){let e=n.offsetInUnwrappedLine+n.length,t=n.injectedTextIndex;while(t+1<this.injectionOffsets.length&&this.injectionOffsets[t+1]===this.injectionOffsets[t])e+=this.injectionOptions[t+1].content.length,t++;return e}let i=n.offsetInUnwrappedLine,o=n.injectedTextIndex;while(o-1>=0&&this.injectionOffsets[o-1]===this.injectionOffsets[o])i-=this.injectionOptions[o-1].content.length,o++;return i}getInjectedText(e,t){const n=this.outputPositionToOffsetInUnwrappedLine(e,t),i=this.getInjectedTextAtOffset(n);return i?{options:this.injectionOptions[i.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,n=this.injectionOptions;if(null!==t){let i=0;for(let o=0;o<t.length;o++){const r=n[o].content.length,s=t[o]+i,a=t[o]+i+r;if(s>e)break;if(e<=a)return{injectedTextIndex:o,offsetInUnwrappedLine:s,length:r};i+=r}}}}class zd{constructor(e,t){this.tabSize=e,this.data=t}}class Vd{constructor(e,t,n,i,o,r,s){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.startVisibleColumn=o,this.tokens=r,this.inlineDecorations=s}}class Qd{constructor(e,t,n,i,o,r,s,a,l,c){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=i,this.isBasicASCII=Qd.isBasicASCII(n,r),this.containsRTL=Qd.containsRTL(n,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return!t||bs(e)}static containsRTL(e,t,n){return!(t||!n)&&ps(e)}}class Wd{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}class Hd{constructor(e,t,n,i){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=i}toInlineDecoration(e){return new Wd(new Mn(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class Ud{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}function Yd(e){return Array.isArray(e)}function Gd(e){return!Yd(e)}function Kd(e){return"string"===typeof e}function qd(e){return!Kd(e)}function Jd(e){return!e}function $d(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Xd(e){return e.replace(/[&<>'"_]/g,"-")}function Zd(e,t){}function ep(e,t){return new Error(`${e.languageId}: ${t}`)}function tp(e,t,n,i,o){const r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let s=null;return t.replace(r,(function(t,r,a,l,c,h,u,d,p){return Jd(a)?Jd(l)?!Jd(c)&&c<i.length?$d(e,i[c]):!Jd(u)&&e&&"string"===typeof e[u]?e[u]:(null===s&&(s=o.split("."),s.unshift(o)),!Jd(h)&&h<s.length?$d(e,s[h]):""):$d(e,n):"$"}))}function np(e,t){let n=t;while(n&&n.length>0){const t=e.tokenizer[n];if(t)return t;const i=n.lastIndexOf(".");n=i<0?null:n.substr(0,i)}return null}function ip(e,t){let n=t;while(n&&n.length>0){const t=e.stateNames[n];if(t)return!0;const i=n.lastIndexOf(".");n=i<0?null:n.substr(0,i)}return!1}const op=5;class rp{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new sp(e,t);let n=sp.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let i=this._entries[n];return i||(i=new sp(e,t),this._entries[n]=i,i)}}rp._INSTANCE=new rp(op);class sp{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";while(null!==e)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){while(null!==e&&null!==t){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return sp._equals(this,e)}push(e){return rp.create(this,e)}pop(){return this.parent}popall(){let e=this;while(e.parent)e=e.parent;return e}switchTo(e){return rp.create(this.parent,e)}}class ap{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){let e=this.state.clone();return e===this.state?this:new ap(this.modeId,this.state)}}class lp{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new cp(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new cp(e,t);let n=sp.getStackElementId(e),i=this._entries[n];return i||(i=new cp(e,null),this._entries[n]=i,i)}}lp._INSTANCE=new lp(op);class cp{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){let e=this.embeddedModeData?this.embeddedModeData.clone():null;return e===this.embeddedModeData?this:lp.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof cp&&(!!this.stack.equals(e.stack)&&(null===this.embeddedModeData&&null===e.embeddedModeData||null!==this.embeddedModeData&&null!==e.embeddedModeData&&this.embeddedModeData.equals(e.embeddedModeData)))}}class hp{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new Tn(e,t,this._language)))}nestedModeTokenize(e,t,n,i){const o=n.modeId,r=n.state,s=Nc.get(o);if(!s)return this.enterMode(i,o),this.emit(i,""),r;let a=s.tokenize(e,t,r,i);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState}finalize(e){return new On(this._tokens,e)}}class up{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){let i=null!==e?e.length:0,o=t.length,r=null!==n?n.length:0;if(0===i&&0===o&&0===r)return new Uint32Array(0);if(0===i&&0===o)return n;if(0===o&&0===r)return e;let s=new Uint32Array(i+o+r);null!==e&&s.set(e);for(let a=0;a<o;a++)s[i+a]=t[a];return null!==n&&s.set(n,i+o),s}nestedModeTokenize(e,t,n,i){const o=n.modeId,r=n.state,s=Nc.get(o);if(!s)return this.enterMode(i,o),this.emit(i,""),r;let a=s.tokenize2(e,t,r,i);return this._prependTokens=up._merge(this._prependTokens,this._tokens,a.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,a.endState}finalize(e){return new Rn(up._merge(this._prependTokens,this._tokens,null),e)}}class dp{constructor(e,t,n,i){this._modeService=e,this._standaloneThemeService=t,this._modeId=n,this._lexer=i,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let o=!1;this._tokenizationRegistryListener=Nc.onDidChange(e=>{if(o)return;let t=!1;for(let n=0,i=e.changedLanguages.length;n<i;n++){let i=e.changedLanguages[n];if(this._embeddedModes[i]){t=!0;break}}t&&(o=!0,Nc.fire([this._modeId]),o=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let t in this._embeddedModes){const n=Nc.get(t);if(n){if(n instanceof dp){const t=n.getLoadStatus();!1===t.loaded&&e.push(t.promise)}continue}const i=Nc.getPromise(t);i&&e.push(i)}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(e=>{})}}getInitialState(){let e=rp.create(null,this._lexer.start);return lp.create(e,null)}tokenize(e,t,n,i){let o=new hp,r=this._tokenize(e,t,n,i,o);return o.finalize(r)}tokenize2(e,t,n,i){let o=new up(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,i,o);return o.finalize(r)}_tokenize(e,t,n,i,o){return n.embeddedModeData?this._nestedTokenize(e,t,n,i,o):this._myTokenize(e,t,n,i,o)}_findLeavingNestedModeOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=np(this._lexer,t.stack.state),!n))throw ep(this._lexer,"tokenizer state is not defined: "+t.stack.state);let i=-1,o=!1;for(const r of n){if(!qd(r.action)||"@pop"!==r.action.nextEmbedded)continue;o=!0;let t=r.regex,n=r.regex.source;if("^(?:"===n.substr(0,4)&&")"===n.substr(n.length-1,1)){let e=(t.ignoreCase?"i":"")+(t.unicode?"u":"");t=new RegExp(n.substr(4,n.length-5),e)}let s=e.search(t);-1===s||0!==s&&r.matchOnlyAtLineStart||(-1===i||s<i)&&(i=s)}if(!o)throw ep(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return i}_nestedTokenize(e,t,n,i,o){let r=this._findLeavingNestedModeOffset(e,n);if(-1===r){let r=o.nestedModeTokenize(e,t,n.embeddedModeData,i);return lp.create(n.stack,new ap(n.embeddedModeData.modeId,r))}let s=e.substring(0,r);s.length>0&&o.nestedModeTokenize(s,!1,n.embeddedModeData,i);let a=e.substring(r);return this._myTokenize(a,t,n,i+r,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,i,o){o.enterMode(i,this._modeId);const r=e.length,s=t&&this._lexer.includeLF?e+"\n":e,a=s.length;let l=n.embeddedModeData,c=n.stack,h=0,u=null,d=!0;while(d||h<a){const n=h,p=c.depth,f=u?u.groups.length:0,g=c.state;let m=null,b=null,v=null,y=null,w=null;if(u){m=u.matches;const e=u.groups.shift();b=e.matched,v=e.action,y=u.rule,0===u.groups.length&&(u=null)}else{if(!d&&h>=a)break;d=!1;let e=this._lexer.tokenizer[g];if(!e&&(e=np(this._lexer,g),!e))throw ep(this._lexer,"tokenizer state is not defined: "+g);let t=s.substr(h);for(const n of e)if((0===h||!n.matchOnlyAtLineStart)&&(m=t.match(n.regex),m)){b=m[0],v=n.action;break}}if(m||(m=[""],b=""),v||(h<a&&(m=[s.charAt(h)],b=m[0]),v=this._lexer.defaultToken),null===b)break;h+=b.length;while(Gd(v)&&qd(v)&&v.test)v=v.test(b,m,g,h===a);let _=null;if("string"===typeof v||Array.isArray(v))_=v;else if(v.group)_=v.group;else if(null!==v.token&&void 0!==v.token){if(_=v.tokenSubst?tp(this._lexer,v.token,b,m,g):v.token,v.nextEmbedded)if("@pop"===v.nextEmbedded){if(!l)throw ep(this._lexer,"cannot pop embedded mode if not inside one");l=null}else{if(l)throw ep(this._lexer,"cannot enter embedded mode from within an embedded mode");w=tp(this._lexer,v.nextEmbedded,b,m,g)}if(v.goBack&&(h=Math.max(0,h-v.goBack)),v.switchTo&&"string"===typeof v.switchTo){let e=tp(this._lexer,v.switchTo,b,m,g);if("@"===e[0]&&(e=e.substr(1)),!np(this._lexer,e))throw ep(this._lexer,"trying to switch to a state '"+e+"' that is undefined in rule: "+this._safeRuleName(y));c=c.switchTo(e)}else{if(v.transform&&"function"===typeof v.transform)throw ep(this._lexer,"action.transform not supported");if(v.next)if("@push"===v.next){if(c.depth>=this._lexer.maxStack)throw ep(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(g)}else if("@pop"===v.next){if(c.depth<=1)throw ep(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(y));c=c.pop()}else if("@popall"===v.next)c=c.popall();else{let e=tp(this._lexer,v.next,b,m,g);if("@"===e[0]&&(e=e.substr(1)),!np(this._lexer,e))throw ep(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(y));c=c.push(e)}}v.log&&"string"===typeof v.log&&Zd(this._lexer,this._lexer.languageId+": "+tp(this._lexer,v.log,b,m,g))}if(null===_)throw ep(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(y));const C=n=>{let r=this._modeService.getModeIdForLanguageName(n);r&&(n=r);const s=this._getNestedEmbeddedModeData(n);if(h<a){const n=e.substr(h);return this._nestedTokenize(n,t,lp.create(c,s),i+h,o)}return lp.create(c,s)};if(Array.isArray(_)){if(u&&u.groups.length>0)throw ep(this._lexer,"groups cannot be nested: "+this._safeRuleName(y));if(m.length!==_.length+1)throw ep(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(y));let e=0;for(let t=1;t<m.length;t++)e+=m[t].length;if(e!==b.length)throw ep(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(y));u={rule:y,matches:m,groups:[]};for(let t=0;t<_.length;t++)u.groups[t]={action:_[t],matched:m[t+1]};h-=b.length}else{{if("@rematch"===_&&(h-=b.length,b="",m=null,_="",null!==w))return C(w);if(0===b.length){if(0===a||p!==c.depth||g!==c.state||(u?u.groups.length:0)!==f)continue;throw ep(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(y))}let e=null;if(Kd(_)&&0===_.indexOf("@brackets")){let t=_.substr("@brackets".length),n=pp(this._lexer,b);if(!n)throw ep(this._lexer,"@brackets token returned but no bracket defined as: "+b);e=Xd(n.token+t)}else{let t=""===_?"":_+this._lexer.tokenPostfix;e=Xd(t)}n<r&&o.emit(n+i,e)}if(null!==w)return C(w)}}return lp.create(c,l)}_getNestedEmbeddedModeData(e){let t=this._locateMode(e);if(t){let e=Nc.get(t);if(e)return new ap(t,e.getInitialState())}return new ap(t||Tc,Bc)}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._modeId)return e;let t=this._modeService.getModeId(e);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t}}function pp(e,t){if(!t)return null;t=$d(e,t);let n=e.brackets;for(const i of n){if(i.open===t)return{token:i.token,bracketType:1};if(i.close===t)return{token:i.token,bracketType:-1}}return null}function fp(e,t,n,i){return new dp(e,t,n,i)}var gp;const mp=null===(gp=window.trustedTypes)||void 0===gp?void 0:gp.createPolicy("standaloneColorizer",{createHTML:e=>e});class bp{static colorizeElement(e,t,n,i){i=i||{};let o=i.theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!r)return Promise.resolve();e.setTheme(o);let s=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+o;let a=e=>{var t;const i=null!==(t=null===mp||void 0===mp?void 0:mp.createHTML(e))&&void 0!==t?t:e;n.innerHTML=i};return this.colorize(t,s||"",r,i).then(a,e=>{})}static colorize(e,t,n,i){let o=4;i&&"number"===typeof i.tabSize&&(o=i.tabSize),Es(t)&&(t=t.substr(1));let r=Wr(t),s=e.getModeId(n);if(!s)return Promise.resolve(yp(r,o));e.triggerMode(s);const a=Nc.get(s);if(a)return vp(r,o,a);const l=Nc.getPromise(s);return new Promise(l?(e,t)=>{l.then(n=>{vp(r,o,n).then(e,t)},t)}:(e,t)=>{let n=null,i=null;const a=()=>{n&&(n.dispose(),n=null),i&&(i.dispose(),i=null);const a=Nc.get(s);a?vp(r,o,a).then(e,t):e(yp(r,o))};i=new co,i.cancelAndSet(a,500),n=Nc.onDidChange(e=>{e.changedLanguages.indexOf(s)>=0&&a()})})}static colorizeLine(e,t,n,i,o=4){const r=Qd.isBasicASCII(e,t),s=Qd.containsRTL(e,r,n);let a=Ld(new Ad(!1,!0,e,!1,r,s,0,i,[],o,0,0,0,0,-1,"none",!1,!1,null));return a.html}static colorizeModelLine(e,t,n=4){let i=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t),r=o.inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),r,n)}}function vp(e,t,n){return new Promise((i,o)=>{const r=()=>{const s=wp(e,t,n);if(n instanceof dp){const e=n.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}i(s)};r()})}function yp(e,t){let n=[];const i=16793600,o=new Uint32Array(2);o[0]=0,o[1]=i;for(let r=0,s=e.length;r<s;r++){let i=e[r];o[0]=i.length;const s=new gd(o,i),a=Qd.isBasicASCII(i,!0),l=Qd.containsRTL(i,a,!0);let c=Ld(new Ad(!1,!0,i,!1,a,l,0,s,[],t,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(c.html),n.push("<br/>")}return n.join("")}function wp(e,t,n){let i=[],o=n.getInitialState();for(let r=0,s=e.length;r<s;r++){let s=e[r],a=n.tokenize2(s,!0,o,0);gd.convertToEndOffset(a.tokens,s.length);let l=new gd(a.tokens,s);const c=Qd.isBasicASCII(s,!0),h=Qd.containsRTL(s,c,!0);let u=Ld(new Ad(!1,!0,s,!1,c,h,0,l.inflate(),[],t,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(u.html),i.push("<br/>"),o=a.endState}return i.join("")}var _p;(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(_p||(_p={})),function(e){const t="error",n="warning",i="warn",o="info",r="ignore";function s(r){return r?es(t,r)?e.Error:es(n,r)||es(i,r)?e.Warning:es(o,r)?e.Info:e.Ignore:e.Ignore}function a(i){switch(i){case e.Error:return t;case e.Warning:return n;case e.Info:return o;default:return r}}e.fromValue=s,e.toString=a}(_p||(_p={}));var Cp=_p;function Ap(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===Ya.ICodeEditor}const Ep=Ai("IWorkspaceEditService");function xp(e){return oa(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}function Sp(e){return oa(e)&&wn.isUri(e.resource)&&oa(e.edit)}class kp{constructor(e){this.metadata=e}static convert(e){return e.edits.map(e=>{if(Sp(e))return new Dp(e.resource,e.edit,e.modelVersionId,e.metadata);if(xp(e))return new Lp(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")})}}class Dp extends kp{constructor(e,t,n,i){super(i),this.resource=e,this.textEdit=t,this.versionId=n}}class Lp extends kp{constructor(e,t,n,i){super(i),this.oldResource=e,this.newResource=t,this.options=n}}class Ip{constructor(){this.data=new Map}add(e,t){Ia(ia(e)),Ia(oa(t)),Ia(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const Np=new Ip,Mp={JSONContribution:"base.contributions.json"};function Bp(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class Tp{constructor(){this._onDidChangeSchema=new bt,this.schemasById={}}registerSchema(e,t){this.schemasById[Bp(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const Op=new Tp;Np.add(Mp.JSONContribution,Op);const Rp={Configuration:"base.contributions.configuration"},Pp={properties:{},patternProperties:{}},Fp={properties:{},patternProperties:{}},jp={properties:{},patternProperties:{}},zp={properties:{},patternProperties:{}},Vp={properties:{},patternProperties:{}},Qp={properties:{},patternProperties:{}},Wp="vscode://schemas/settings/resourceLanguage",Hp=Np.as(Mp.JSONContribution);class Up{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new bt,this._onDidUpdateConfiguration=new bt,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:m("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},Hp.registerSchema(Wp,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=this.doRegisterConfigurations(e,t);Hp.registerSchema(Wp,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const n=[];return e.forEach(e=>{n.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}),n}validateAndRegisterProperties(e,t=!0,n,i=3){var o;i=la(e.scope)?i:e.scope;let r=[],s=e.properties;if(s)for(let l in s){if(t&&$p(l)){delete s[l];continue}const e=s[l];this.updatePropertyDefaultValue(l,e),Gp.test(l)?e.scope=void 0:(e.scope=la(e.scope)?i:e.scope,e.restricted=la(e.restricted)?!!(null===(o=null===n||void 0===n?void 0:n.restrictedConfigurations)||void 0===o?void 0:o.includes(l)):e.restricted),!s[l].hasOwnProperty("included")||s[l].included?(this.configurationProperties[l]=s[l],!s[l].deprecationMessage&&s[l].markdownDeprecationMessage&&(s[l].deprecationMessage=s[l].markdownDeprecationMessage),r.push(l)):(this.excludedConfigurationProperties[l]=s[l],delete s[l])}let a=e.allOf;if(a)for(let l of a)r.push(...this.validateAndRegisterProperties(l,t,n,i));return r}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let n=e.properties;if(n)for(const t in n)this.updateSchema(t,n[t]);let i=e.allOf;i&&i.forEach(t)};t(e)}updateSchema(e,t){switch(Pp.properties[e]=t,t.scope){case 1:Fp.properties[e]=t;break;case 2:jp.properties[e]=t;break;case 6:zp.properties[e]=t;break;case 3:Vp.properties[e]=t;break;case 4:Qp.properties[e]=t;break;case 5:Qp.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:m("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:m("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:Wp};this.updatePropertyDefaultValue(t,n),Pp.properties[t]=n,Fp.properties[t]=n,jp.properties[t]=n,zp.properties[t]=n,Vp.properties[t]=n,Qp.properties[t]=n}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let n=this.defaultValues[e];aa(n)&&(n=t.default),aa(n)&&(n=qp(t.type)),t.default=n}}const Yp="\\[.*\\]$",Gp=new RegExp(Yp);function Kp(e){return e.substring(1,e.length-1)}function qp(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const Jp=new Up;function $p(e){return e.trim()?Gp.test(e)?m("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==Jp.getConfigurationProperties()[e]?m("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null:m("config.property.empty","Cannot register an empty property")}Np.add(Rp.Configuration,Jp);const Xp=Object.prototype.hasOwnProperty;function Zp(e,t){for(let n in e)if(Xp.call(e,n)){const i=t({key:n,value:e[n]},(function(){delete e[n]}));if(!1===i)return}}class ef{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}}const tf=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new bt,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},nf=Object.hasOwnProperty;class of{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class rf{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class sf{static readOptions(e){const t=e,n=new rf;for(const i of Ie){const e="_never_"===i.name?void 0:t[i.name];n._write(i.id,e)}return n}static validateOptions(e){const t=new k;for(const n of Ie)t._write(n.id,n.validate(e._read(n.id)));return t}static computeOptions(e,t){const n=new of;for(const i of Ie)n._write(i.id,i.compute(t,n,e._read(i.id)));return n}static _deepEquals(e,t){if("object"!==typeof e||"object"!==typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&Iu(e,t);for(let n in e)if(!sf._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){const n=[];let i=!1;for(const o of Ie){const r=!sf._deepEquals(e._read(o.id),t._read(o.id));n[o.id]=r,r&&(i=!0)}return i?new S(n):null}}function af(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const n=e.lineNumbers;!0===n?e.lineNumbers="on":!1===n&&(e.lineNumbers="off");const i=e.autoClosingBrackets;!1===i&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never");const o=e.cursorBlinking;"visible"===o&&(e.cursorBlinking="solid");const r=e.renderWhitespace;!0===r?e.renderWhitespace="boundary":!1===r&&(e.renderWhitespace="none");const s=e.renderLineHighlight;!0===s?e.renderLineHighlight="line":!1===s&&(e.renderLineHighlight="none");const a=e.acceptSuggestionOnEnter;!0===a?e.acceptSuggestionOnEnter="on":!1===a&&(e.acceptSuggestionOnEnter="off");const l=e.tabCompletion;!1===l?e.tabCompletion="off":!0===l&&(e.tabCompletion="onlySnippets");const c=e.suggest;if(c&&"object"===typeof c.filteredTypes&&c.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};Zp(e,e=>{const t=c.filteredTypes[e.key];!1===t&&(c[e.value]=t)})}const h=e.hover;!0===h?e.hover={enabled:!0}:!1===h&&(e.hover={enabled:!1});const u=e.parameterHints;!0===u?e.parameterHints={enabled:!0}:!1===u&&(e.parameterHints={enabled:!1});const d=e.autoIndent;!0===d?e.autoIndent="full":!1===d&&(e.autoIndent="advanced");const p=e.matchBrackets;!0===p?e.matchBrackets="always":!1===p&&(e.matchBrackets="never");const{renderIndentGuides:f,highlightActiveIndentGuide:g}=e;e.guides||(e.guides={}),void 0!==f&&(e.guides.indentation=!!f),void 0!==g&&(e.guides.highlightActiveIndentation=!!g)}function lf(e){const t=Na(e);return af(t),t}class cf extends st{constructor(e,t){super(),this._onDidChange=this._register(new bt),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new bt),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new D,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=lf(t),this._readOptions=sf.readOptions(this._rawOptions),this._validatedOptions=sf.validateOptions(this._readOptions),this._register(ja.onDidChangeZoomLevel(e=>this._recomputeOptions())),this._register(tf.onDidChangeTabFocus(e=>this._recomputeOptions()))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const n=sf.checkEquals(e,t);if(null===n)return;this.options=t,this._onDidChangeFast.fire(n),this._onDidChange.fire(n)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=Qa.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:tf.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return sf.computeOptions(this._validatedOptions,n)}static _subsetEquals(e,t){for(const n in t)if(nf.call(t,n)){const i=t[n],o=e[n];if(o===i)continue;if(Array.isArray(o)&&Array.isArray(i)){if(!Iu(o,i))return!1;continue}if(o&&"object"===typeof o&&i&&"object"===typeof i){if(!this._subsetEquals(o,i))return!1;continue}return!1}return!0}updateOptions(e){if("undefined"===typeof e)return;const t=lf(e);cf._subsetEquals(this._rawOptions,t)||(this._rawOptions=Ta(this._rawOptions,t||{}),this._readOptions=sf.readOptions(this._rawOptions),this._validatedOptions=sf.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=cf._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;while(e)e=Math.floor(e/10),t++;return t||1}}const hf=Object.freeze({id:"editor",order:5,type:"object",title:m("editorConfigurationTitle","Editor"),scope:5}),uf=Np.as(Rp.Configuration),df=Object.assign(Object.assign({},hf),{properties:{"editor.tabSize":{type:"number",default:Le.tabSize,minimum:1,markdownDescription:m("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:Le.insertSpaces,markdownDescription:m("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:Le.detectIndentation,markdownDescription:m("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:Le.trimAutoWhitespace,description:m("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Le.largeFileOptimizations,description:m("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:m("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[m("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),m("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),m("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:m("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[m("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),m("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),m("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:m("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:m("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:m("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:m("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:m("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:m("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:m("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:m("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:m("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function pf(e){return"undefined"!==typeof e.type||"undefined"!==typeof e.anyOf}for(const vle of Ie){const e=vle.schema;if("undefined"!==typeof e)if(pf(e))df.properties["editor."+vle.name]=e;else for(let t in e)nf.call(e,t)&&(df.properties[t]=e[t])}let ff=null;function gf(){return null===ff&&(ff=Object.create(null),Object.keys(df.properties).forEach(e=>{ff[e]=!0})),ff}function mf(e){const t=gf();return t["editor."+e]||!1}function bf(e){const t=gf();return t["diffEditor."+e]||!1}uf.registerConfiguration(df);class vf{static insert(e,t){return{range:new Mn(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}const yf=Ai("configurationService");function wf(e,t){const n=Object.create(null);for(let i in e)_f(n,i,e[i],t);return n}function _f(e,t,n,i){const o=t.split("."),r=o.pop();let s=e;for(let l=0;l<o.length;l++){let e=o[l],n=s[e];switch(typeof n){case"undefined":n=s[e]=Object.create(null);break;case"object":break;default:return void i(`Ignoring ${t} as ${o.slice(0,l+1).join(".")} is ${JSON.stringify(n)}`)}s=n}if("object"===typeof s&&null!==s)try{s[r]=n}catch(a){i(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}else i(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}function Cf(e,t){const n=t.split(".");Af(e,n)}function Af(e,t){const n=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(n)){const i=e[n];"object"!==typeof i||Array.isArray(i)||(Af(i,t),0===Object.keys(i).length&&delete e[n])}}else delete e[n]}function Ef(e,t,n){function i(e,t){let n=e;for(const i of t){if("object"!==typeof n||null===n)return;n=n[i]}return n}const o=t.split("."),r=i(e,o);return"undefined"===typeof r?n:r}function xf(){const e=Np.as(Rp.Configuration).getConfigurationProperties();return Object.keys(e)}function Sf(){const e=Object.create(null),t=Np.as(Rp.Configuration).getConfigurationProperties();for(let n in t){let i=t[n].default;_f(e,n,i,e=>{})}return e}class kf{constructor(e={},t=[],n=[]){this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?Ef(this.contents,e):this.contents}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=Na(this.contents),n=Na(this.overrides),i=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=n.filter(t=>Iu(t.identifiers,e.identifiers));t?this.mergeContents(t.contents,e.contents):n.push(Na(e))}for(const e of o.keys)-1===i.indexOf(e)&&i.push(e)}return new kf(t,i,n)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!==typeof t||!Object.keys(t).length)return this;let n={};for(const i of Ou([...Object.keys(this.contents),...Object.keys(t)])){let e=this.contents[i],o=t[i];o&&("object"===typeof e&&"object"===typeof o?(e=Na(e),this.mergeContents(e,o)):e=o),n[i]=e}return new kf(n,this.keys,this.overrides)}mergeContents(e,t){for(const n of Object.keys(t))n in e&&oa(e[n])&&oa(t[n])?this.mergeContents(e[n],t[n]):e[n]=Na(t[n])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?Ma(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),_f(this.contents,e,t,e=>{throw new Error(e)})}removeValue(e){this.removeKey(e)&&Cf(this.contents,e)}addKey(e){let t=this.keys.length;for(let n=0;n<t;n++)0===e.indexOf(this.keys[n])&&(t=n);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}class Df extends kf{constructor(){const e=Sf(),t=xf(),n=[];for(const i of Object.keys(e))Gp.test(i)&&n.push({identifiers:[Kp(i).trim()],keys:Object.keys(e[i]),contents:wf(e[i],e=>{})});super(e,t,n)}}class Lf{constructor(e,t,n=new kf,i=new kf,o=new Qs,r=new kf,s=new Qs,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=n,this._workspaceConfiguration=i,this._folderConfigurations=o,this._memoryConfiguration=r,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Qs,this._userConfiguration=null}getValue(e,t,n){const i=this.getConsolidateConfigurationModel(t,n);return i.getValue(e)}updateValue(e,t,n={}){let i;n.resource?(i=this._memoryConfigurationByResource.get(n.resource),i||(i=new kf,this._memoryConfigurationByResource.set(n.resource,i))):i=this._memoryConfiguration,void 0===t?i.removeValue(e):i.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const i=t.getFolder(e);i&&(n=this.getFolderConsolidatedConfiguration(i.uri)||n);const o=this._memoryConfigurationByResource.get(e);o&&(n=n.merge(o))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:n,overrides:i,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:i,keys:o}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.user),i=this.parseConfigurationModel(e.workspace),o=e.folders.reduce((e,t)=>(e.set(wn.revive(t[0]),this.parseConfigurationModel(t[1])),e),new Qs);return new Lf(t,n,new kf,i,o,new kf,new Qs,!1)}static parseConfigurationModel(e){return new kf(e.contents,e.keys,e.overrides).freeze()}}class If{constructor(e,t,n,i){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=i,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach(e=>o.add(e)),e.overrides.forEach(([,e])=>e.forEach(e=>o.add(e))),this.affectedKeys=[...o.values()];const r=new kf;this.affectedKeys.forEach(e=>r.setValue(e,{})),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Lf.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var n;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const i=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(n=this.previous)||void 0===n?void 0:n.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Oa(i,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let n,i=wf({[t]:!0},()=>{});while("object"===typeof i&&(n=Object.keys(i)[0])){if(e=e[n],!e)return!1;i=i[n]}return!0}}const Nf=/^(cursor|delete)/;class Mf extends st{constructor(e,t,n,i,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=i,this._logService=o,this._onDidUpdateKeybindings=this._register(new bt),this._currentChord=null,this._currentChordChecker=new ho,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Bf.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new co,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:pt.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info("[KeybindingService]: "+e)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const n=this.resolveKeyboardEvent(e);if(n.isChord())return null;const[i]=n.getDispatchParts();if(null===i)return null;const o=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,r,i)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(m("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const n=Date.now();this._currentChordChecker.cancelAndSet(()=>{this._documentHasFocus()?Date.now()-n>5e3&&this._leaveChordMode():this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const n=this.resolveKeyboardEvent(e),[i]=n.getSingleModifierDispatchParts();if(i)return this._ignoreSingleModifiers.has(i)?(this._log(`+ Ignoring single modifier ${i} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Bf.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Bf.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${i}.`),this._currentSingleModifier=i,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):i===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${i} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=n.getParts();return this._ignoreSingleModifiers=new Bf(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){let i=!1;if(e.isChord())return!1;let o=null,r=null;if(n){const[t]=e.getSingleModifierDispatchParts();o=t,r=t}else[o]=e.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),i;const s=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(s,r,o);return this._logService.trace("KeybindingService#dispatch",a,null===l||void 0===l?void 0:l.commandId),l&&l.enterChord?(i=!0,this._enterChordMode(o,a),i):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(m("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),i=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(i=!0),"undefined"===typeof l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,e=>this._notificationService.warn(e)):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,e=>this._notificationService.warn(e)),Nf.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),i)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Bf{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}Bf.EMPTY=new Bf(null);let Tf=b["k"]||"";const Of=new Map;Of.set("false",!1),Of.set("true",!0),Of.set("isMac",b["f"]),Of.set("isLinux",b["d"]),Of.set("isWindows",b["i"]),Of.set("isWeb",b["h"]),Of.set("isMacNative",b["f"]&&!b["h"]),Of.set("isEdge",Tf.indexOf("Edg/")>=0),Of.set("isFirefox",Tf.indexOf("Firefox")>=0),Of.set("isChrome",Tf.indexOf("Chrome")>=0),Of.set("isSafari",Tf.indexOf("Safari")>=0);const Rf=Object.prototype.hasOwnProperty;class Pf{static has(e){return Qf.create(e)}static equals(e,t){return Wf.create(e,t)}static regex(e,t){return Xf.create(e,t)}static not(e){return Gf.create(e)}static and(...e){return tg.create(e,null)}static or(...e){return ng.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let n=e.split("||");return ng.create(n.map(e=>this._deserializeAndExpression(e,t)),null,!0)}static _deserializeAndExpression(e,t){let n=e.split("&&");return tg.create(n.map(e=>this._deserializeOne(e,t)),null)}static _deserializeOne(e,t){if(e=e.trim(),e.indexOf("!=")>=0){let n=e.split("!=");return Yf.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("==")>=0){let n=e.split("==");return Wf.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("=~")>=0){let n=e.split("=~");return Xf.create(n[0].trim(),this._deserializeRegexValue(n[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return Hf.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return qf.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return Kf.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return $f.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return Jf.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?Gf.create(e.substr(1).trim()):Qf.create(e)}static _deserializeValue(e,t){if(e=e.trim(),"true"===e)return!0;if("false"===e)return!1;let n=/^'([^']*)'$/.exec(e);return n?n[1].trim():e}static _deserializeRegexValue(e,t){if(Mr(e)){if(t)throw new Error("missing regexp-value for =~-expression");return null}let n=e.indexOf("/"),i=e.lastIndexOf("/");if(n===i||n<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return null}let o=e.slice(n+1,i),r="i"===e[i+1]?"i":"";try{return new RegExp(o,r)}catch(s){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${s}`);return null}}}function Ff(e,t){const n=e?e.substituteConstants():void 0,i=t?t.substituteConstants():void 0;return!n&&!i||!(!n||!i)&&n.equals(i)}function jf(e,t){return e.cmp(t)}class zf{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Vf.INSTANCE}}zf.INSTANCE=new zf;class Vf{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return zf.INSTANCE}}Vf.INSTANCE=new Vf;class Qf{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const n=Of.get(e);return"boolean"===typeof n?n?Vf.INSTANCE:zf.INSTANCE:new Qf(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:sg(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=Of.get(this.key);return"boolean"===typeof e?e?Vf.INSTANCE:zf.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Gf.create(this.key,this)),this.negated}}class Wf{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}static create(e,t,n=null){if("boolean"===typeof t)return t?Qf.create(e,n):Gf.create(e,n);const i=Of.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?Vf.INSTANCE:zf.INSTANCE}return new Wf(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:ag(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=Of.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?Vf.INSTANCE:zf.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Yf.create(this.key,this.value,this)),this.negated}}class Hf{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new Hf(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:ag(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.indexOf(n)>=0:"string"===typeof n&&"object"===typeof t&&null!==t&&Rf.call(t,n)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=Uf.create(this)),this.negated}}class Uf{constructor(e){this._actual=e,this.type=11}static create(e){return new Uf(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class Yf{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}static create(e,t,n=null){if("boolean"===typeof t)return t?Gf.create(e,n):Qf.create(e,n);const i=Of.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?zf.INSTANCE:Vf.INSTANCE}return new Yf(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:ag(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=Of.get(this.key);if("boolean"===typeof e){const t=e?"true":"false";return this.value===t?zf.INSTANCE:Vf.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Wf.create(this.key,this.value,this)),this.negated}}class Gf{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const n=Of.get(e);return"boolean"===typeof n?n?zf.INSTANCE:Vf.INSTANCE:new Gf(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:sg(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=Of.get(this.key);return"boolean"===typeof e?e?zf.INSTANCE:Vf.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return"!"+this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Qf.create(this.key,this)),this.negated}}class Kf{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}static create(e,t,n=null){return new Kf(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:ag(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=$f.create(this.key,this.value,this)),this.negated}}class qf{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}static create(e,t,n=null){return new qf(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:ag(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Jf.create(this.key,this.value,this)),this.negated}}class Jf{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}static create(e,t,n=null){return new Jf(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:ag(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))<parseFloat(this.value)}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=qf.create(this.key,this.value,this)),this.negated}}class $f{constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}static create(e,t,n=null){return new $f(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:ag(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))<=parseFloat(this.value)}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Kf.create(this.key,this.value,this)),this.negated}}class Xf{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new Xf(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return t<n?-1:t>n?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Zf.create(this)),this.negated}}class Zf{constructor(e){this._actual=e,this.type=8}static create(e){return new Zf(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function eg(e){let t=null;for(let n=0,i=e.length;n<i;n++){const i=e[n].substituteConstants();if(e[n]!==i&&null===t){t=[];for(let i=0;i<n;i++)t[i]=e[i]}null!==t&&(t[n]=i)}return null===t?e:t}class tg{constructor(e,t){this.expr=e,this.negated=t,this.type=6}static create(e,t){return tg._normalizeArr(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,n=this.expr.length;t<n;t++){const n=jf(this.expr[t],e.expr[t]);if(0!==n)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=eg(this.expr);return e===this.expr?this:tg.create(e,this.negated)}evaluate(e){for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t){const n=[];let i=!1;for(const o of e)if(o)if(1!==o.type){if(0===o.type)return zf.INSTANCE;6!==o.type?n.push(o):n.push(...o.expr)}else i=!0;if(0===n.length&&i)return Vf.INSTANCE;if(0!==n.length){if(1===n.length)return n[0];n.sort(jf);for(let e=1;e<n.length;e++)n[e-1].equals(n[e])&&(n.splice(e,1),e--);if(1===n.length)return n[0];while(n.length>1){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),i=0===n.length,o=ng.create(e.expr.map(e=>tg.create([e,t],null)),null,i);o&&(n.push(o),n.sort(jf))}return 1===n.length?n[0]:new tg(n,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=ng.create(e,this,!0)}return this.negated}}class ng{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,n){return ng._normalizeArr(e,t,n)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,n=this.expr.length;t<n;t++){const n=jf(this.expr[t],e.expr[t]);if(0!==n)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=eg(this.expr);return e===this.expr?this:ng.create(e,this.negated,!1)}evaluate(e){for(let t=0,n=this.expr.length;t<n;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,n){let i=[],o=!1;if(e){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(n)if(0!==n.type){if(1===n.type)return Vf.INSTANCE;9!==n.type?i.push(n):i=i.concat(n.expr)}else o=!0}if(0===i.length&&o)return zf.INSTANCE;i.sort(jf)}if(0!==i.length){if(1===i.length)return i[0];for(let e=1;e<i.length;e++)i[e-1].equals(i[e])&&(i.splice(e,1),e--);if(1===i.length)return i[0];if(n){for(let e=0;e<i.length;e++)for(let t=e+1;t<i.length;t++)lg(i[e],i[t])&&(i.splice(t,1),t--);if(1===i.length)return i[0]}return new ng(i,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());while(e.length>1){const t=e.shift(),n=e.shift(),i=[];for(const e of cg(t))for(const t of cg(n))i.push(tg.create([e,t],null));const o=0===e.length;e.unshift(ng.create(i,null,o))}this.negated=e[0]}return this.negated}}class ig extends Qf{constructor(e,t,n){super(e,null),this._defaultValue=t,"object"===typeof n?ig._info.push(Object.assign(Object.assign({},n),{key:e})):!0!==n&&ig._info.push({key:e,description:n,type:null!==t&&void 0!==t?typeof t:void 0})}static all(){return ig._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return Wf.create(this.key,e)}}ig._info=[];const og=Ai("contextKeyService"),rg="setContext";function sg(e,t){return e<t?-1:e>t?1:0}function ag(e,t,n,i){return e<n?-1:e>n?1:t<i?-1:t>i?1:0}function lg(e,t){if(6===t.type&&9!==e.type&&6!==e.type)for(const o of t.expr)if(e.equals(o))return!0;const n=e.negate(),i=cg(n).concat(cg(t));i.sort(jf);for(let o=0;o<i.length;o++){const e=i[o],t=e.negate();for(let n=o+1;n<i.length;n++){const e=i[n];if(t.equals(e))return!0}}return!1}function cg(e){return 9===e.type?e.expr:[e]}class hg{constructor(e,t,n){this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let i=0,o=e.length;i<o;i++){const t=e[i].command;t&&this._defaultBoundCommands.set(t,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=hg.combine(e,t);for(let i=0,o=this._keybindings.length;i<o;i++){let e=this._keybindings[i];0!==e.keypressParts.length&&(e.when&&0===e.when.type||this._addKeyPress(e.keypressParts[0],e))}}static _isTargetedForRemoval(e,t,n,i,o){if(e.command!==i)return!1;if(t&&e.keypressParts[0]!==t)return!1;if(n&&e.keypressParts[1]!==n)return!1;if(o){if(!e.when)return!1;if(!Ff(o,e.when))return!1}return!0}static combine(e,t){e=e.slice(0);let n=[];for(const i of t){if(!i.command||0===i.command.length||"-"!==i.command.charAt(0)){n.push(i);continue}const t=i.command.substr(1),o=i.keypressParts[0],r=i.keypressParts[1],s=i.when;for(let n=e.length-1;n>=0;n--)this._isTargetedForRemoval(e[n],o,r,t,s)&&e.splice(n,1)}return e.concat(n)}_addKeyPress(e,t){const n=this._map.get(e);if("undefined"===typeof n)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let i=n.length-1;i>=0;i--){let e=n[i];if(e.command===t.command)continue;const o=e.keypressParts.length>1,r=t.keypressParts.length>1;o&&r&&e.keypressParts[1]!==t.keypressParts[1]||hg.whenIsEntirelyIncluded(e.when,t.when)&&this._removeFromLookupMap(e)}n.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);"undefined"===typeof t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if("undefined"!==typeof t)for(let n=0,i=t.length;n<i;n++)if(t[n]===e)return void t.splice(n,1)}static whenIsEntirelyIncluded(e,t){return!t||1===t.type||!(!e||1===e.type)&&lg(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t){const n=this._lookupMap.get(e);if("undefined"===typeof n||0===n.length)return null;if(1===n.length)return n[0];for(let i=n.length-1;i>=0;i--){const e=n[i];if(t.contextMatchesRules(e.when))return e}return n[n.length-1]}resolve(e,t,n){this._log(`| Resolving ${n}${t?" chorded from "+t:""}`);let i=null;if(null!==t){const e=this._map.get(t);if("undefined"===typeof e)return this._log("\\ No keybinding entries."),null;i=[];for(let t=0,o=e.length;t<o;t++){let o=e[t];o.keypressParts[1]===n&&i.push(o)}}else{const e=this._map.get(n);if("undefined"===typeof e)return this._log("\\ No keybinding entries."),null;i=e}let o=this._findCommand(e,i);return o?null===t&&o.keypressParts.length>1&&null!==o.keypressParts[1]?(this._log(`\\ From ${i.length} keybinding entries, matched chord, when: ${ug(o.when)}, source: ${dg(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${i.length} keybinding entries, matched ${o.command}, when: ${ug(o.when)}, source: ${dg(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${i.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let n=t.length-1;n>=0;n--){let i=t[n];if(hg.contextMatchesRules(e,i.when))return i}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}}function ug(e){return e?""+e.serialize():"no when condition"}function dg(e){return e.extensionId?e.isBuiltinExtension?"built-in extension "+e.extensionId:"user extension "+e.extensionId:e.isDefault?"built-in":"user"}class pg{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===b["a"]){if(e&&e.win)return e.win}else if(2===b["a"]){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=pg.bindToCurrentPlatform(e);if(t&&t.primary){const n=Mt(t.primary,b["a"]);n&&this._registerDefaultKeybinding(n,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let n=0,i=t.secondary.length;n<i;n++){const i=t.secondary[n],o=Mt(i,b["a"]);o&&this._registerDefaultKeybinding(o,e.id,e.args,e.weight,-n-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),ya.registerCommand(e)}static _mightProduceChar(e){return e>=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&pg._mightProduceChar(e.keyCode)}_registerDefaultKeybinding(e,t,n,i,o,r){1===b["a"]&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:n,when:r,weight1:i,weight2:o,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(mg)),this._cachedMergedKeybindings.slice(0)}}const fg=new pg,gg={EditorModes:"platform.keybindingsRegistry"};function mg(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}Np.add(gg.EditorModes,fg);class bg{constructor(e,t,n,i,o,r,s){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?vg(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=vg(e.getSingleModifierDispatchParts())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o,this.extensionId=r,this.isBuiltinExtension=s}}function vg(e){let t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n];if(!i)return t;t.push(i)}return t}class yg{constructor(e,t,n=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}toLabel(e,t,n){if(0===t.length)return null;const i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=n(r);if(null===s)return null;i[o]=Ag(r,s,this.modifierLabels[e])}return i.join(" ")}}const wg=new yg({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:m({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:m({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:m({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:m({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),_g=new yg({ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),Cg=new yg({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function Ag(e,t,n){if(null===t)return"";const i=[];return e.ctrlKey&&i.push(n.ctrlKey),e.shiftKey&&i.push(n.shiftKey),e.altKey&&i.push(n.altKey),e.metaKey&&i.push(n.metaKey),""!==t&&i.push(t),i.join(n.separator)}class Eg extends Pt{constructor(e,t){if(super(),0===t.length)throw Ve("parts");this._os=e,this._parts=t}getLabel(){return wg.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return _g.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1?null:Cg.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new Rt(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class xg extends Eg{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return It.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":It.toString(e.keyCode)}_keyCodeToElectronAccelerator(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return It.toString(e)}_getElectronAccelerator(e){return e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode)}_getDispatchPart(e){return xg.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=It.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}}const Sg=Ai("notificationService");class kg{}const Dg=Ai("contextService");class Lg{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}var Ig,Ng,Mg,Bg,Tg,Og,Rg,Pg,Fg;(function(e){e.noSelection=m("noSelection","No selection"),e.singleSelectionRange=m("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=m("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=m("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=m("multiSelection","{0} selections"),e.emergencyConfOn=m("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=m("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=m("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=m("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=m("readonlyEditor"," in a read-only code editor"),e.editableEditor=m("editableEditor"," in a code editor"),e.changeConfigToOnMac=m("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=m("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=m("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=m("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=m("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=m("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=m("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=m("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=m("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=m("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=m("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=m("showAccessibilityHelpAction","Show Accessibility Help")})(Ig||(Ig={})),function(e){e.inspectTokensAction=m("inspectTokens","Developer: Inspect Tokens")}(Ng||(Ng={})),function(e){e.gotoLineActionLabel=m("gotoLineActionLabel","Go to Line/Column...")}(Mg||(Mg={})),function(e){e.helpQuickAccessActionLabel=m("helpQuickAccess","Show all Quick Access Providers")}(Bg||(Bg={})),function(e){e.quickCommandActionLabel=m("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=m("quickCommandActionHelp","Show And Run Commands")}(Tg||(Tg={})),function(e){e.quickOutlineActionLabel=m("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=m("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(Og||(Og={})),function(e){e.editorViewAccessibleLabel=m("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=m("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(Rg||(Rg={})),function(e){e.toggleHighContrast=m("toggleHighContrast","Toggle High Contrast Theme")}(Pg||(Pg={})),function(e){e.bulkEditServiceSummary=m("bulkEditServiceSummary","Made {0} edits in {1} files")}(Fg||(Fg={}));var jg=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},zg=function(e,t){return function(n,i){t(n,i,e)}},Vg=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class Qg{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new bt}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}function Wg(e,t,n){return Ap(e)?t(e):n(e)}let Hg=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;return this.editor&&(t=Wg(this.editor,t=>this.findModel(t,e),t=>this.findModel(t.getOriginalEditor(),e)||this.findModel(t.getModifiedEditor(),e))),t?Promise.resolve(new lt(new Qg(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let n=this.modelService.getModel(t);return n&&n.uri.toString()!==t.toString()?null:n}};Hg=jg([zg(0,zl)],Hg);class Ug{show(){return Ug.NULL_PROGRESS_RUNNER}showWhile(e,t){return Vg(this,void 0,void 0,(function*(){yield e}))}}Ug.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Yg{confirm(e){return this.doConfirm(e).then(e=>({confirmed:e,checkboxChecked:!1}))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,n,i){return Promise.resolve({choice:0})}}class Gg{info(e){return this.notify({severity:Cp.Info,message:e})}warn(e){return this.notify({severity:Cp.Warning,message:e})}error(e){return this.notify({severity:Cp.Error,message:e})}notify(e){switch(e.severity){case Cp.Error:break;case Cp.Warning:break;default:break}return Gg.NO_OP}status(e,t){return st.None}}Gg.NO_OP=new kg;class Kg{constructor(e){this._onWillExecuteCommand=new bt,this._onDidExecuteCommand=new bt,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const n=ya.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const i=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(i)}catch(i){return Promise.reject(i)}}}class qg extends Mf{constructor(e,t,n,i,o,r){super(e,t,n,i,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._register(Eo(r,hr.KEY_DOWN,e=>{const t=new Ki(e),n=this._dispatch(t,t.target);n&&(t.preventDefault(),t.stopPropagation())})),this._register(Eo(window,hr.KEY_UP,e=>{const t=new Ki(e),n=this._singleModifierDispatch(t,t.target);n&&t.preventDefault()}))}addDynamicKeybinding(e,t,n,i){const o=Mt(t,b["a"]),r=new rt;return o&&(this._dynamicKeybindings.push({keybinding:o,command:e,when:i,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),r.add(ot(()=>{for(let t=0;t<this._dynamicKeybindings.length;t++){let n=this._dynamicKeybindings[t];if(n.command===e)return this._dynamicKeybindings.splice(t,1),void this.updateResolver({source:1})}}))),r.add(ya.registerCommand(e,n)),this.updateResolver({source:1}),r}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(fg.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new hg(e,t,e=>this._log(e))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let n=[],i=0;for(const o of e){const e=o.when||void 0,r=o.keybinding;if(r){const s=this.resolveKeybinding(r);for(const r of s)n[i++]=new bg(r,o.command,o.commandArgs,e,t,null,!1)}else n[i++]=new bg(void 0,o.command,o.commandArgs,e,t,null,!1)}return n}resolveKeybinding(e){return[new xg(e,b["a"])]}resolveKeyboardEvent(e){let t=new Tt(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new xg(t,b["a"])}}function Jg(e){return e&&"object"===typeof e&&(!e.overrideIdentifier||"string"===typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof wn)}class $g{constructor(){this._onDidChangeConfiguration=new bt,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new Lf(new Df,new kf)}getValue(e,t){const n="string"===typeof e?e:void 0,i=Jg(e)?e:Jg(t)?t:{};return this._configuration.getValue(n,i,void 0)}updateValues(e){const t={data:this._configuration.toData()};let n=[];for(const i of e){const[e,t]=i;this.getValue(e)!==t&&(this._configuration.updateValue(e,t),n.push(e))}if(n.length>0){const e=new If({keys:n,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}}class Xg{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new bt,this.configurationService.onDidChangeConfiguration(e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,n)=>e.affectsConfiguration(n)})})}getValue(e,t,n){const i=Nn.isIPosition(t)?t:null,o=i?"string"===typeof n?n:void 0:"string"===typeof t?t:void 0;return"undefined"===typeof o?this.configurationService.getValue():this.configurationService.getValue(o)}}let Zg=class{constructor(e){this.configurationService=e}getEOL(e,t){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&"string"===typeof n&&"auto"!==n?n:b["d"]||b["f"]?"\n":"\r\n"}};Zg=jg([zg(0,yf)],Zg);class em{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class tm{constructor(){const e=wn.from({scheme:tm.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new Lg({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function nm(e,t,n){if(!t)return;if(!(e instanceof $g))return;let i=[];Object.keys(t).forEach(e=>{mf(e)&&i.push(["editor."+e,t[e]]),n&&bf(e)&&i.push(["diffEditor."+e,t[e]])}),i.length>0&&e.updateValues(i)}tm.SCHEME="inmemory";class im{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return Vg(this,void 0,void 0,(function*(){const t=new Map;for(let o of e){if(!(o instanceof Dp))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(o.resource);if(!e)throw new Error("bad edit - model not found");if("number"===typeof o.versionId&&e.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let n=t.get(e);n||(n=[],t.set(e,n)),n.push(vf.replaceMove(Mn.lift(o.textEdit.range),o.textEdit.text))}let n=0,i=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,()=>[]),e.pushStackElement(),i+=1,n+=o.length;return{ariaSummary:Tr(Fg.bulkEditServiceSummary,n,i)}}))}}class om{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}class rm{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=pt.None}get dimension(){return this._dimension||(this._dimension=zo(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}}n("0678");const sm=2e4;let am,lm,cm,hm,um;function dm(e){am=document.createElement("div"),am.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),am.appendChild(e),e};lm=t(),cm=t();const n=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),am.appendChild(e),e};hm=n(),um=n(),e.appendChild(am)}function pm(e){am&&(lm.textContent!==e?(_o(cm),gm(lm,e)):(_o(lm),gm(cm,e)))}function fm(e){am&&(b["f"]?pm(e):hm.textContent!==e?(_o(um),gm(hm,e)):(_o(hm),gm(um,e)))}function gm(e,t){_o(e),t.length>sm&&(t=t.substr(0,sm)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}const mm=Ai("markerDecorationsService");var bm,vm=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class ym extends st{constructor(e,t="",n="",i=!0,o){super(),this._onDidChange=this._register(new bt),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return vm(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class wm extends st{constructor(){super(...arguments),this._onBeforeRun=this._register(new bt),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new bt),this.onDidRun=this._onDidRun.event}run(e,t){return vm(this,void 0,void 0,(function*(){if(!e.enabled)return;this._onBeforeRun.fire({action:e});let n=void 0;try{yield this.runAction(e,t)}catch(i){n=i}this._onDidRun.fire({action:e,error:n})}))}runAction(e,t){return vm(this,void 0,void 0,(function*(){yield e.run(t)}))}}class _m extends ym{constructor(e){super(_m.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}_m.ID="vs.actions.separator";class Cm{constructor(e,t,n,i){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=i,this._actions=n}get actions(){return this._actions}dispose(){}run(){return vm(this,void 0,void 0,(function*(){}))}}class Am extends ym{constructor(){super(Am.ID,m("submenu.empty","(empty)"),void 0,!1)}}Am.ID="vs.actions.empty",function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST"]="hc"}(bm||(bm={}));const Em=Ai("themeService");var xm,Sm;function km(e){return{id:e}}function Dm(e){switch(e){case bm.DARK:return"vs-dark";case bm.HIGH_CONTRAST:return"hc-black";default:return"vs"}}(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(xm||(xm={})),function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||xm.isThemeColor(e.color))}e.isThemeIcon=t;const n=new RegExp(`^\\$\\((${$l.iconNameExpression}(?:${$l.iconModifierExpression})?)\\)$`);function i(e){const t=n.exec(e);if(!t)return;let[,i]=t;return{id:i}}function o(e,t){let n=e.id;const i=n.lastIndexOf("~");return-1!==i&&(n=n.substring(0,i)),t&&(n=`${n}~${t}`),{id:n}}function r(e,t){var n,i;return e.id===t.id&&(null===(n=e.color)||void 0===n?void 0:n.id)===(null===(i=t.color)||void 0===i?void 0:i.id)}function s(e,t){return{id:e.id,color:t?km(t):void 0}}e.fromString=i,e.modify=o,e.isEqual=r,e.asThemeIcon=s,e.asClassNameArray=$l.asClassNameArray,e.asClassName=$l.asClassName,e.asCSSSelector=$l.asCSSSelector}(Sm||(Sm={}));const Lm={ThemingContribution:"base.contributions.theming"};class Im{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new bt}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),ot(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}let Nm=new Im;function Mm(e){return Nm.onColorThemeChange(e)}Np.add(Lm.ThemingContribution,Nm);class Bm extends st{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}var Tm=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Om=function(e,t){return function(n,i){t(n,i,e)}};function Rm(e){return void 0!==e.command}class Pm{constructor(e){this.id=Pm._idPool++,this._debugName=e}}Pm._idPool=0,Pm.CommandPalette=new Pm("CommandPalette"),Pm.EditorContext=new Pm("EditorContext"),Pm.SimpleEditorContext=new Pm("SimpleEditorContext"),Pm.EditorContextCopy=new Pm("EditorContextCopy"),Pm.EditorContextPeek=new Pm("EditorContextPeek"),Pm.MenubarEditMenu=new Pm("MenubarEditMenu"),Pm.MenubarCopy=new Pm("MenubarCopy"),Pm.MenubarGoMenu=new Pm("MenubarGoMenu"),Pm.MenubarSelectionMenu=new Pm("MenubarSelectionMenu"),Pm.InlineCompletionsActions=new Pm("InlineCompletionsActions");const Fm=Ai("menuService"),jm=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new bt,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===Pm.CommandPalette}}addCommand(e){return this.addCommands(Ue.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),ot(()=>{let t=!1;for(const n of e)t=this._commands.delete(n.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach((t,n)=>e.set(n,t)),e}appendMenuItem(e,t){return this.appendMenuItems(Ue.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,n=new ht;for(const{id:i,item:o}of e){let e=this._menuItems.get(i);e||(e=new ht,this._menuItems.set(i,e)),n.push(e.push(o)),t.add(i)}return this._onDidChangeMenu.fire(t),ot(()=>{if(n.size>0){for(let e of n)e();this._onDidChangeMenu.fire(t),n.clear()}})}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===Pm.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const n of e)Rm(n)&&(t.add(n.command.id),n.alt&&t.add(n.alt.id));this._commands.forEach((n,i)=>{t.has(i)||e.push({command:n})})}};class zm extends Cm{constructor(e,t,n,i){super("submenuitem."+e.submenu.id,"string"===typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=n,this._options=i}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),n=t.getActions(this._options);t.dispose();for(const[,i]of n)i.length>0&&(e.push(...i),e.push(new _m));return e.length&&e.pop(),e}}let Vm=class e{constructor(t,n,i,o,r){var s,a;if(this._commandService=r,this.id=t.id,this.label=(null===i||void 0===i?void 0:i.renderShortTitle)&&t.shortTitle?"string"===typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"===typeof t.title?t.title:t.title.value,this.tooltip=null!==(a="string"===typeof t.tooltip?t.tooltip:null===(s=t.tooltip)||void 0===s?void 0:s.value)&&void 0!==a?a:"",this.enabled=!t.precondition||o.contextMatchesRules(t.precondition),this.checked=!1,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=o.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"===typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"===typeof e.title?e.title:e.title.value)}this.item=t,this.alt=n?new e(n,void 0,i,o,r):void 0,this._options=i,Sm.isThemeIcon(t.icon)&&(this.class=$l.asClassName(t.icon))}dispose(){}run(...e){var t,n;let i=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(i=[...i,this._options.arg]),(null===(n=this._options)||void 0===n?void 0:n.shouldForwardArgs)&&(i=[...i,...e]),this._commandService.executeCommand(this.id,...i)}};Vm=Tm([Om(3,og),Om(4,va)],Vm);const Qm=Ai("telemetryService");class Wm{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?Pf.and(e,this.precondition):this.precondition);const n={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};fg.registerKeybindingRule(n)}}ya.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){jm.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class Hm extends Wm{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n){return this._implementations.push({priority:e,name:t,implementation:n}),this._implementations.sort((e,t)=>t.priority-e.priority),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e].implementation===n)return void this._implementations.splice(e,1)}}}runCommand(e,t){const n=e.get(Ku);n.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const i of this._implementations){const o=i.implementation(e,t);if(o){if(n.trace(`Command '${this.id}' was handled by '${i.name}'.`),"boolean"===typeof o)return;return o}}n.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class Um extends Wm{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class Ym extends Wm{static bindToContribution(e){return class extends Ym{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,n,i){const o=e(n);o&&this._callback(e(n),i)}}}runCommand(e,t){const n=e.get(xi),i=n.getFocusedCodeEditor()||n.getActiveCodeEditor();if(i)return i.invokeWithinContext(e=>{const n=e.get(og);if(n.contextMatchesRules(ma(this.precondition)))return this.runEditorCommand(e,i,t)})}}class Gm extends Ym{constructor(e){super(Gm.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function n(t){return t.menuId||(t.menuId=Pm.EditorContext),t.title||(t.title=e.label),t.when=Pf.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(Qm).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}function Km(e){return Zm.INSTANCE.registerEditorCommand(e),e}function qm(e){const t=new e;return Zm.INSTANCE.registerEditorAction(t),t}function Jm(e,t){Zm.INSTANCE.registerEditorContribution(e,t)}var $m;(function(e){function t(e){return Zm.INSTANCE.getEditorCommand(e)}function n(){return Zm.INSTANCE.getEditorActions()}function i(){return Zm.INSTANCE.getEditorContributions()}function o(e){return Zm.INSTANCE.getEditorContributions().filter(t=>e.indexOf(t.id)>=0)}function r(){return Zm.INSTANCE.getDiffEditorContributions()}e.getEditorCommand=t,e.getEditorActions=n,e.getEditorContributions=i,e.getSomeEditorContributions=o,e.getDiffEditorContributions=r})($m||($m={}));const Xm={EditorCommonContributions:"editor.contributions"};class Zm{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function eb(e){return e.register(),e}Zm.INSTANCE=new Zm,Np.add(Xm.EditorCommonContributions,Zm.INSTANCE);const tb=eb(new Hm({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Pm.MenubarEditMenu,group:"1_do",title:m({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:Pm.CommandPalette,group:"",title:m("undo","Undo"),order:1}]}));eb(new Um(tb,{id:"default:undo",precondition:void 0}));const nb=eb(new Hm({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Pm.MenubarEditMenu,group:"1_do",title:m({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:Pm.CommandPalette,group:"",title:m("redo","Redo"),order:1}]}));eb(new Um(nb,{id:"default:redo",precondition:void 0}));const ib=eb(new Hm({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Pm.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:Pm.CommandPalette,group:"",title:m("selectAll","Select All"),order:1}]}));var ob=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},rb=function(e,t){return function(n,i){t(n,i,e)}};let sb=class{constructor(e,t){}dispose(){}};sb.ID="editor.contrib.markerDecorations",sb=ob([rb(1,mm)],sb),Jm(sb.ID,sb);n("0556");class ab{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class lb{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=this._bareFontInfo.getMassagedFontFamily(Ri?De.fontFamily:null),t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";const n=document.createElement("div");n.style.fontFamily=e,n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);const i=document.createElement("div");i.style.fontFamily=e,i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);const o=document.createElement("div");o.style.fontFamily=e,o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",t.appendChild(o);const r=[];for(const s of this._requests){let e;0===s.type&&(e=n),2===s.type&&(e=i),1===s.type&&(e=o),e.appendChild(document.createElement("br"));const t=document.createElement("span");lb._render(t,s),e.appendChild(t),r.push(t)}this._container=t,this._testElements=r}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let n=t.chr;for(let e=0;e<8;e++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const t=this._requests[e],n=this._testElements[e];t.fulfill(n.offsetWidth/256)}}}function cb(e,t){const n=new lb(e,t);n.read()}class hb extends st{constructor(e,t,n){super(),this.referenceDomElement=e,this.changeCallback=n,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!==typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())}}class ub{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const n=e.getId();this._keys[n]=e,this._values[n]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}function db(){pb.INSTANCE.clearCache()}class pb extends st{constructor(){super(),this._onDidChange=this._register(new bt),this.onDidChange=this._onDidChange.event,this._cache=new ub,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new ub,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const n of e)n.isTrusted||(t=!0,this._cache.remove(n));t&&this._onDidChange.fire()}readConfiguration(e){if(!this._cache.has(e)){let t=pb._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new Ha({zoomLevel:ki(),pixelRatio:Ni(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}static createRequest(e,t,n,i){const o=new ab(e,t);return n.push(o),i&&i.push(o),o}static _actualReadConfiguration(e){const t=[],n=[],i=this.createRequest("n",0,t,n),o=this.createRequest("m",0,t,null),r=this.createRequest(" ",0,t,n),s=this.createRequest("0",0,t,n),a=this.createRequest("1",0,t,n),l=this.createRequest("2",0,t,n),c=this.createRequest("3",0,t,n),h=this.createRequest("4",0,t,n),u=this.createRequest("5",0,t,n),d=this.createRequest("6",0,t,n),p=this.createRequest("7",0,t,n),f=this.createRequest("8",0,t,n),g=this.createRequest("9",0,t,n),m=this.createRequest("→",0,t,n),b=this.createRequest("→",0,t,null),v=this.createRequest("·",0,t,n),y=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,n),this.createRequest("/",0,t,n),this.createRequest("-",0,t,n),this.createRequest("_",0,t,n),this.createRequest("i",0,t,n),this.createRequest("l",0,t,n),this.createRequest("m",0,t,n),this.createRequest("|",1,t,n),this.createRequest("_",1,t,n),this.createRequest("i",1,t,n),this.createRequest("l",1,t,n),this.createRequest("m",1,t,n),this.createRequest("n",1,t,n),this.createRequest("|",2,t,n),this.createRequest("_",2,t,n),this.createRequest("i",2,t,n),this.createRequest("l",2,t,n),this.createRequest("m",2,t,n),this.createRequest("n",2,t,n),cb(e,t);const w=Math.max(s.width,a.width,l.width,c.width,h.width,u.width,d.width,p.width,f.width,g.width);let _=e.fontFeatureSettings===J.OFF;const C=n[0].width;for(let x=1,S=n.length;_&&x<S;x++){const e=C-n[x].width;if(e<-.001||e>.001){_=!1;break}}let A=!0;_&&b.width!==C&&(A=!1),b.width>m.width&&(A=!1);const E=Di()>2e3;return new Ha({zoomLevel:ki(),pixelRatio:Ni(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:_,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:A,spaceWidth:r.width,middotWidth:v.width,wsmiddotWidth:y.width,maxDigitWidth:w},E)}}pb.INSTANCE=new pb;class fb extends cf{constructor(e,t,n=null,i){super(e,t),this.accessibilityService=i,this._elementSizeObserver=this._register(new hb(n,t.dimension,()=>this._recomputeOptions())),this._register(pb.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(Li(e=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(Ri?De.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily(Ri?De.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return Ri||Pi||(e+="no-user-select "),Ri&&(e+="no-minimap-shadow "),b["f"]&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:fb._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:Ti||Bi,pixelRatio:Ni(),zoomLevel:ki(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return pb.INSTANCE.readConfiguration(e)}}class gb{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function mb(e){return new gb(e)}function bb(e,t,n){let i=null,o=null;if("function"===typeof n.value?(i="value",o=n.value,o.length):"function"===typeof n.get&&(i="get",o=n.get),!o)throw new Error("not supported");const r="$memoize$"+t;n[i]=function(...e){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[r]}}var vb,yb=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};(function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"})(vb||(vb={}));class wb extends st{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(Eo(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(Eo(document,"touchend",e=>this.onTouchEnd(e))),this._register(Eo(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return wb.isTouchDevice()?(wb.INSTANCE||(wb.INSTANCE=new wb),wb.INSTANCE.targets.push(e),{dispose:()=>{wb.INSTANCE.targets=wb.INSTANCE.targets.filter(t=>t!==e)}}):st.None}static ignoreTarget(e){return wb.isTouchDevice()?(wb.INSTANCE||(wb.INSTANCE=new wb),wb.INSTANCE.ignoreTargets.push(e),{dispose:()=>{wb.INSTANCE.ignoreTargets=wb.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):st.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,i=e.targetTouches.length;n<i;n++){let i=e.targetTouches.item(n);this.activeTouches[i.identifier]={id:i.identifier,initialTarget:i.target,initialTimeStamp:t,initialPageX:i.pageX,initialPageY:i.pageY,rollingTimestamps:[t],rollingPageX:[i.pageX],rollingPageY:[i.pageY]};let o=this.newGestureEvent(vb.Start,i.target);o.pageX=i.pageX,o.pageY=i.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let t=Date.now(),n=Object.keys(this.activeTouches).length;for(let i=0,o=e.changedTouches.length;i<o;i++){let o=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(o.identifier)))continue;let r=this.activeTouches[o.identifier],s=Date.now()-r.initialTimeStamp;if(s<wb.HOLD_DELAY&&Math.abs(r.initialPageX-Du(r.rollingPageX))<30&&Math.abs(r.initialPageY-Du(r.rollingPageY))<30){let e=this.newGestureEvent(vb.Tap,r.initialTarget);e.pageX=Du(r.rollingPageX),e.pageY=Du(r.rollingPageY),this.dispatchEvent(e)}else if(s>=wb.HOLD_DELAY&&Math.abs(r.initialPageX-Du(r.rollingPageX))<30&&Math.abs(r.initialPageY-Du(r.rollingPageY))<30){let e=this.newGestureEvent(vb.Contextmenu,r.initialTarget);e.pageX=Du(r.rollingPageX),e.pageY=Du(r.rollingPageY),this.dispatchEvent(e)}else if(1===n){let e=Du(r.rollingPageX),n=Du(r.rollingPageY),i=Du(r.rollingTimestamps)-r.rollingTimestamps[0],o=e-r.rollingPageX[0],s=n-r.rollingPageY[0];const a=this.targets.filter(e=>r.initialTarget instanceof Node&&e.contains(r.initialTarget));this.inertia(a,t,Math.abs(o)/i,o>0?1:-1,e,Math.abs(s)/i,s>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(vb.End,r.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===vb.Tap){const t=(new Date).getTime();let n=0;n=t-this._lastSetTapCountTime>wb.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=n}else e.type!==vb.Change&&e.type!==vb.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t<this.ignoreTargets.length;t++)if(e.initialTarget instanceof Node&&this.ignoreTargets[t].contains(e.initialTarget))return;this.targets.forEach(t=>{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,n,i,o,r,s,a){this.handle=No(()=>{let l=Date.now(),c=l-t,h=0,u=0,d=!0;n+=wb.SCROLL_FRICTION*c,r+=wb.SCROLL_FRICTION*c,n>0&&(d=!1,h=i*n*c),r>0&&(d=!1,u=s*r*c);let p=this.newGestureEvent(vb.Change);p.translationX=h,p.translationY=u,e.forEach(e=>e.dispatchEvent(p)),d||this.inertia(e,l,n,i,o+h,r,s,a+u)})}onTouchMove(e){let t=Date.now();for(let n=0,i=e.changedTouches.length;n<i;n++){let i=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(i.identifier)))continue;let o=this.activeTouches[i.identifier],r=this.newGestureEvent(vb.Change,o.initialTarget);r.translationX=i.pageX-Du(o.rollingPageX),r.translationY=i.pageY-Du(o.rollingPageY),r.pageX=i.pageX,r.pageY=i.pageY,this.dispatchEvent(r),o.rollingPageX.length>3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(i.pageX),o.rollingPageY.push(i.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}function _b(e,t){let n=new Zi(t);return n.preventDefault(),{leftButton:n.leftButton,buttons:n.buttons,posx:n.posx,posy:n.posy}}wb.SCROLL_FRICTION=-.005,wb.HOLD_DELAY=700,wb.CLEAR_TAP_COUNT_TIME=400,yb([bb],wb,"isTouchDevice",null);class Cb{constructor(){this._hooks=new rt,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,n,i,o){if(this.isMonitoring())return;this._mouseMoveEventMerger=n,this._mouseMoveCallback=i,this._onStopCallback=o;const r=Xi.getSameOriginWindowChain(),s=b["c"]?"pointermove":"mousemove",a="mouseup",l=r.map(e=>e.window.document),c=tr(e);c&&l.unshift(c);for(const h of l)this._hooks.add(Fo(h,s,e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)},(e,t)=>this._mouseMoveEventMerger(e,t))),this._hooks.add(Eo(h,a,e=>this.stopMonitoring(!0)));if(Xi.hasDifferentOriginAncestor()){let e=r[r.length-1];this._hooks.add(Eo(e.window.document,"mouseout",e=>{let t=new Zi(e);"html"===t.target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(Eo(e.window.document,"mouseover",e=>{let t=new Zi(e);"html"===t.target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(Eo(e.window.document.body,"mouseleave",e=>{this.stopMonitoring(!0)}))}}}class Ab{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new Eb(this.x-Uo.scrollX,this.y-Uo.scrollY)}}class Eb{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new Ab(this.clientX+Uo.scrollX,this.clientY+Uo.scrollY)}}class xb{constructor(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i,this._editorPagePositionBrand=void 0}}function Sb(e){const t=Ho(e);return new xb(t.left,t.top,t.width,t.height)}class kb extends Zi{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new Ab(this.posx,this.posy),this.editorPos=Sb(t)}}class Db{constructor(e){this._editorViewDomNode=e}_create(e){return new kb(e,this._editorViewDomNode)}onContextMenu(e,t){return Eo(e,"contextmenu",e=>{t(this._create(e))})}onMouseUp(e,t){return Eo(e,"mouseup",e=>{t(this._create(e))})}onMouseDown(e,t){return Eo(e,"mousedown",e=>{t(this._create(e))})}onMouseLeave(e,t){return Do(e,e=>{t(this._create(e))})}onMouseMoveThrottled(e,t,n,i){const o=(e,t)=>n(e,this._create(t));return Fo(e,"mousemove",t,o,i)}}class Lb{constructor(e){this._editorViewDomNode=e}_create(e){return new kb(e,this._editorViewDomNode)}onPointerUp(e,t){return Eo(e,"pointerup",e=>{t(this._create(e))})}onPointerDown(e,t){return Eo(e,"pointerdown",e=>{t(this._create(e))})}onPointerLeave(e,t){return Lo(e,e=>{t(this._create(e))})}onPointerMoveThrottled(e,t,n,i){const o=(e,t)=>n(e,this._create(t));return Fo(e,"pointermove",t,o,i)}}class Ib extends st{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new Cb),this._keydownListener=null}startMonitoring(e,t,n,i,o){this._keydownListener=ko(document,"keydown",e=>{const t=e.toKeybinding();t.isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)},!0);const r=(e,t)=>n(e,new kb(t,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(e,t,r,i,e=>{this._keydownListener.dispose(),o(e)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class Nb extends st{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,i=e.length;n<i;n++){let i=e[n];switch(i.type){case 0:this.onCompositionStart(i)&&(t=!0);break;case 1:this.onCompositionEnd(i)&&(t=!0);break;case 2:this.onConfigurationChanged(i)&&(t=!0);break;case 3:this.onCursorStateChanged(i)&&(t=!0);break;case 4:this.onDecorationsChanged(i)&&(t=!0);break;case 5:this.onFlushed(i)&&(t=!0);break;case 6:this.onFocusChanged(i)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(i)&&(t=!0);break;case 8:this.onLineMappingChanged(i)&&(t=!0);break;case 9:this.onLinesChanged(i)&&(t=!0);break;case 10:this.onLinesDeleted(i)&&(t=!0);break;case 11:this.onLinesInserted(i)&&(t=!0);break;case 12:this.onRevealRangeRequest(i)&&(t=!0);break;case 13:this.onScrollChanged(i)&&(t=!0);break;case 15:this.onTokensChanged(i)&&(t=!0);break;case 14:this.onThemeChanged(i)&&(t=!0);break;case 16:this.onTokensColorsChanged(i)&&(t=!0);break;case 17:this.onZonesChanged(i)&&(t=!0);break;default:}}t&&(this._shouldRender=!0)}}class Mb extends Nb{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Bb{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){let n=[],i=0;while(e&&e!==document.body){if(e===t)break;e.nodeType===e.ELEMENT_NODE&&(n[i++]=this.read(e)),e=e.parentElement}const o=new Uint8Array(i);for(let r=0;r<i;r++)o[r]=n[i-r-1];return o}}class Tb{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class Ob extends Tb{constructor(e,t,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=n}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class Rb{constructor(e,t,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=n}}class Pb{constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}static from(e){const t=new Array(e.length);for(let n=0,i=e.length;n<i;n++){const i=e[n];t[n]=new Pb(i.left,i.width)}return t}toString(){return`[${this.left},${this.width}]`}}class Fb{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class jb{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class zb{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class Vb{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,n,i,o){const r=this._createRange();try{return r.setStart(e,t),r.setEnd(n,i),r.getClientRects()}catch(s){return null}finally{this._detachRange(r,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return e;e.sort(Fb.compare);let t=[],n=0,i=e[0];for(let o=1,r=e.length;o<r;o++){const r=e[o];i.left+i.width+.9>=r.left?i.width=Math.max(i.width,r.left+r.width-i.left):(t[n++]=i,i=r)}return t[n++]=i,t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const n=[];for(let i=0,o=e.length;i<o;i++){const o=e[i];n[i]=new Fb(Math.max(0,o.left-t),o.width)}return this._mergeAdjacentRanges(n)}static readHorizontalRanges(e,t,n,i,o,r,s){const a=0,l=e.children.length-1;if(a>l)return null;if(t=Math.min(l,Math.max(a,t)),i=Math.min(l,Math.max(a,i)),t===i&&n===o&&0===n&&!e.children[t].firstChild){const n=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(n,r)}t!==i&&i>0&&0===o&&(i--,o=1073741824);let c=e.children[t].firstChild,h=e.children[i].firstChild;if(c&&h||(!c&&0===n&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!h&&0===o&&i>0&&(h=e.children[i-1].firstChild,o=1073741824)),!c||!h)return null;n=Math.min(c.textContent.length,Math.max(0,n)),o=Math.min(h.textContent.length,Math.max(0,o));const u=this._readClientRects(c,n,h,o,s);return this._createHorizontalRangesFromClientRects(u,r)}}const Qb=function(){return!!b["g"]||!(b["d"]||Bi||Ri)}();let Wb=!0;class Hb{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class Ub{constructor(e,t){this.themeType=t;const n=e.options,i=n.get(43);this.renderWhitespace=n.get(87),this.renderControlCharacters=n.get(82),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(29),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(58),this.stopRenderingLineAfter=n.get(104),this.fontLigatures=n.get(44)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class Yb{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=mb(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===bm.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,n,i){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=n.getViewLineRenderingData(e),r=this._options,s=bd.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(r.themeType===bm.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=n.selections;for(const n of t){if(n.endLineNumber<e||n.startLineNumber>e)continue;const t=n.startLineNumber===e?n.startColumn:o.minColumn,i=n.endLineNumber===e?n.endColumn:o.maxColumn;t<i&&(r.themeType===bm.HIGH_CONTRAST||"selection"!==this._options.renderWhitespace?s.push(new bd(t,i,"inline-selected-text",0)):(a||(a=[]),a.push(new Cd(t-1,i-1))))}}const l=new Ad(r.useMonospaceOptimizations,r.canUseHalfwidthRightwardsArrow,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,o.minColumn-1,o.tokens,s,o.tabSize,o.startVisibleColumn,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==J.OFF,a);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;i.appendASCIIString('<div style="top:'),i.appendASCIIString(String(t)),i.appendASCIIString("px;height:"),i.appendASCIIString(String(this._options.lineHeight)),i.appendASCIIString('px;" class="'),i.appendASCIIString(Yb.CLASS_NAME),i.appendASCIIString('">');const c=kd(l,i);i.appendASCIIString("</div>");let h=null;return Wb&&Qb&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===c.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(h=new Gb(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),h||(h=Jb(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof Gb}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof Gb?this._renderedViewLine.monospaceAssumptionsAreValid():Wb}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof Gb&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,i){if(!this._renderedViewLine)return null;t|=0,n|=0,t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));const o=0|this._renderedViewLine.input.stopRenderingLineAfter;let r=!1;-1!==o&&t>o+1&&n>o+1&&(r=!0),-1!==o&&t>o+1&&(t=o+1),-1!==o&&n>o+1&&(n=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,n,i);return s&&s.length>0?new zb(r,s):null}getColumnOfNodeOffset(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1}}Yb.CLASS_NAME="view-line";class Gb{constructor(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return Wb;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(Wb=!1),Wb}toSlowRenderedLine(){return Jb(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,i){const o=this._getCharPosition(t),r=this._getCharPosition(n);return[new Fb(o,r-o)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,n){const i=t.textContent.length;let o=-1;while(t)t=t.previousSibling,o++;return this._characterMapping.getColumn(new Ed(o,n),i)}}class Kb{constructor(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,n,i){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,i);if(-1===o)return null;const r=this._readPixelOffset(this.domNode,e,n,i);return-1===r?null:[new Fb(o,r-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,i)}_readVisibleRangesForRange(e,t,n,i,o){if(n===i){const i=this._readPixelOffset(e,t,n,o);return-1===i?null:[new Fb(i,0)]}return this._readRawVisibleRangesForRange(e,n,i,o)}_readPixelOffset(e,t,n,i){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[n];if(-1!==o)return o;const r=this._actualReadPixelOffset(e,t,n,i);return this._pixelOffsetCache[n]=r,r}return this._actualReadPixelOffset(e,t,n,i)}_actualReadPixelOffset(e,t,n,i){if(0===this._characterMapping.length){const t=Vb.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i.clientRectDeltaLeft,i.endNode);return t&&0!==t.length?t[0].left:-1}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const o=this._characterMapping.getDomPosition(n),r=Vb.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,i.clientRectDeltaLeft,i.endNode);if(!r||0===r.length)return-1;const s=r[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(n),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-s)<=1)return t}return s}_readRawVisibleRangesForRange(e,t,n,i){if(1===t&&n===this._characterMapping.length)return[new Fb(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),r=this._characterMapping.getDomPosition(n);return Vb.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,r.partIndex,r.charIndex,i.clientRectDeltaLeft,i.endNode)}getColumnOfNodeOffset(e,t,n){const i=t.textContent.length;let o=-1;while(t)t=t.previousSibling,o++;return this._characterMapping.getColumn(new Ed(o,n),i)}}class qb extends Kb{_readVisibleRangesForRange(e,t,n,i,o){const r=super._readVisibleRangesForRange(e,t,n,i,o);if(!r||0===r.length||n===i||1===n&&i===this._characterMapping.length)return r;if(!this.input.containsRTL){const n=this._readPixelOffset(e,t,i,o);if(-1!==n){const e=r[r.length-1];e.left<n&&(e.width=n-e.left)}}return r}}const Jb=function(){return Ti?$b:Xb}();function $b(e,t,n,i,o){return new qb(e,t,n,i,o)}function Xb(e,t,n,i,o){return new Kb(e,t,n,i,o)}function Zb(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class ev{constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Zb(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Zb(this.oldText)}")`:`(replace@${this.oldPosition} "${Zb(this.oldText)}" with "${Zb(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;Us["f"](e,i,n),n+=4;for(let o=0;o<i;o++)Us["e"](e,t.charCodeAt(o),n),n+=2;return n}static _readString(e,t){const n=Us["c"](e,t);return t+=4,gh(e,t,n)}writeSize(){return 8+ev._writeStringSize(this.oldText)+ev._writeStringSize(this.newText)}write(e,t){return Us["f"](e,this.oldPosition,t),t+=4,Us["f"](e,this.newPosition,t),t+=4,t=ev._writeString(e,this.oldText,t),t=ev._writeString(e,this.newText,t),t}static read(e,t,n){const i=Us["c"](e,t);t+=4;const o=Us["c"](e,t);t+=4;const r=ev._readString(e,t);t+=ev._writeStringSize(r);const s=ev._readString(e,t);return t+=ev._writeStringSize(s),n.push(new ev(i,r,o,s)),t}}function tv(e,t){if(null===e||0===e.length)return t;const n=new nv(e,t);return n.compress()}class nv{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,n=this._getPrev(e),i=this._getCurr(t);while(e<this._prevLen||t<this._currLen){if(null===n){this._acceptCurr(i),i=this._getCurr(++t);continue}if(null===i){this._acceptPrev(n),n=this._getPrev(++e);continue}if(i.oldEnd<=n.newPosition){this._acceptCurr(i),i=this._getCurr(++t);continue}if(n.newEnd<=i.oldPosition){this._acceptPrev(n),n=this._getPrev(++e);continue}if(i.oldPosition<n.newPosition){const[e,t]=nv._splitCurr(i,n.newPosition-i.oldPosition);this._acceptCurr(e),i=t;continue}if(n.newPosition<i.oldPosition){const[e,t]=nv._splitPrev(n,i.oldPosition-n.newPosition);this._acceptPrev(e),n=t;continue}let o,r;if(i.oldEnd===n.newEnd)o=n,r=i,n=this._getPrev(++e),i=this._getCurr(++t);else if(i.oldEnd<n.newEnd){const[e,s]=nv._splitPrev(n,i.oldLength);o=e,r=i,n=s,i=this._getCurr(++t)}else{const[t,s]=nv._splitCurr(i,n.newLength);o=n,r=t,n=this._getPrev(++e),i=s}this._result[this._resultLen++]=new ev(o.oldPosition,o.oldText,r.newPosition,r.newText),this._prevDeltaOffset+=o.newLength-o.oldLength,this._currDeltaOffset+=r.newLength-r.oldLength}const o=nv._merge(this._result),r=nv._removeNoOps(o);return r}_acceptCurr(e){this._result[this._resultLen++]=nv._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=nv._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new ev(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new ev(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const n=e.newText.substr(0,t),i=e.newText.substr(t);return[new ev(e.oldPosition,e.oldText,e.newPosition,n),new ev(e.oldEnd,"",e.newPosition+t,i)]}static _splitCurr(e,t){const n=e.oldText.substr(0,t),i=e.oldText.substr(t);return[new ev(e.oldPosition,n,e.newPosition,e.newText),new ev(e.oldPosition+t,i,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;let t=[],n=0,i=e[0];for(let o=1;o<e.length;o++){const r=e[o];i.oldEnd===r.oldPosition?i=new ev(i.oldPosition,i.oldText+r.oldText,i.newPosition,i.newText+r.newText):(t[n++]=i,i=r)}return t[n++]=i,t}static _removeNoOps(e){if(0===e.length)return e;let t=[],n=0;for(let i=0;i<e.length;i++){const o=e[i];o.oldText!==o.newText&&(t[n++]=o)}return t}}function iv(e){return e.toString()}class ov{constructor(e,t,n,i,o,r,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=i,this.beforeCursorState=o,this.afterCursorState=r,this.changes=s}static create(e,t){const n=e.getAlternativeVersionId(),i=av(e);return new ov(n,n,i,i,t,t,[])}append(e,t,n,i,o){t.length>0&&(this.changes=tv(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(Us["f"](e,t?t.length:0,n),n+=4,t)for(const i of t)Us["f"](e,i.selectionStartLineNumber,n),n+=4,Us["f"](e,i.selectionStartColumn,n),n+=4,Us["f"](e,i.positionLineNumber,n),n+=4,Us["f"](e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=Us["c"](e,t);t+=4;for(let o=0;o<i;o++){const i=Us["c"](e,t);t+=4;const o=Us["c"](e,t);t+=4;const r=Us["c"](e,t);t+=4;const s=Us["c"](e,t);t+=4,n.push(new Bn(i,o,r,s))}return t}serialize(){let e=10+ov._writeSelectionsSize(this.beforeCursorState)+ov._writeSelectionsSize(this.afterCursorState)+4;for(const i of this.changes)e+=i.writeSize();const t=new Uint8Array(e);let n=0;Us["f"](t,this.beforeVersionId,n),n+=4,Us["f"](t,this.afterVersionId,n),n+=4,Us["g"](t,this.beforeEOL,n),n+=1,Us["g"](t,this.afterEOL,n),n+=1,n=ov._writeSelections(t,this.beforeCursorState,n),n=ov._writeSelections(t,this.afterCursorState,n),Us["f"](t,this.changes.length,n),n+=4;for(const i of this.changes)n=i.write(t,n);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let n=0;const i=Us["c"](t,n);n+=4;const o=Us["c"](t,n);n+=4;const r=Us["d"](t,n);n+=1;const s=Us["d"](t,n);n+=1;const a=[];n=ov._readSelections(t,n,a);const l=[];n=ov._readSelections(t,n,l);const c=Us["c"](t,n);n+=4;const h=[];for(let u=0;u<c;u++)n=ev.read(t,n,h);return new ov(i,o,r,s,a,l,h)}}class rv{constructor(e,t){this.model=e,this._data=ov.create(e,t)}get type(){return 0}get resource(){return wn.isUri(this.model)?this.model:this.model.uri}get label(){return m("edit","Typing")}toString(){const e=this._data instanceof ov?this._data:ov.deserialize(this._data);return e.changes.map(e=>e.toString()).join(", ")}matchesResource(e){const t=wn.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof ov}append(e,t,n,i,o){this._data instanceof ov&&this._data.append(e,t,n,i,o)}close(){this._data instanceof ov&&(this._data=this._data.serialize())}open(){this._data instanceof ov||(this._data=ov.deserialize(this._data))}undo(){if(wn.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof ov&&(this._data=this._data.serialize());const e=ov.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(wn.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof ov&&(this._data=this._data.serialize());const e=ov.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof ov&&(this._data=this._data.serialize()),this._data.byteLength+168}}class sv{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const e=iv(n.resource);this._editStackElementsMap.set(e,n)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=iv(e);return this._editStackElementsMap.has(t)}setModel(e){const t=iv(wn.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=iv(e.uri);if(this._editStackElementsMap.has(t)){const n=this._editStackElementsMap.get(t);return n.canAppend(e)}return!1}append(e,t,n,i,o){const r=iv(e.uri),s=this._editStackElementsMap.get(r);s.append(e,t,n,i,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=iv(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${ea(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function av(e){const t=e.getEOL();return"\n"===t?0:1}function lv(e){return!!e&&(e instanceof rv||e instanceof sv)}class cv{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);lv(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);lv(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(lv(t)&&t.canAppend(this._model))return t;const n=new rv(this._model,e);return this._undoRedoService.pushElement(n),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],av(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n){const i=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=cv._computeCursorState(n,o),s=o.map((e,t)=>({index:t,textChange:e.textChange}));return s.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),i.append(this._model,s.map(e=>e.textChange),av(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return Oe(n),null}}}class hv{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function uv(e,t,n,i,o){let r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r<t&&r<i;r++){let t=e.charCodeAt(r),i=n.charCodeAt(r);if(t!==i)break}let s=0,a=0;for(let d=r;d<t;d++){let t=e.charCodeAt(d);32===t?s++:a++}let l=0,c=0;for(let d=r;d<i;d++){let e=n.charCodeAt(d);32===e?l++:c++}if(s>0&&a>0)return;if(l>0&&c>0)return;let h=Math.abs(a-c),u=Math.abs(s-l);if(0===h)return o.spacesDiff=u,void(u>0&&0<=l-1&&l-1<e.length&&l<n.length&&32!==n.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(o.looksLikeAlignment=!0));u%h!==0||(o.spacesDiff=u/h)}function dv(e,t,n){const i=Math.min(e.getLineCount(),1e4);let o=0,r=0,s="",a=0;const l=[2,4,6,8,3,5,7],c=8;let h=[0,0,0,0,0,0,0,0,0],u=new hv;for(let f=1;f<=i;f++){let i=e.getLineLength(f),l=e.getLineContent(f);const d=i<=65536;let p=!1,g=0,m=0,b=0;for(let t=0,n=i;t<n;t++){let n=d?l.charCodeAt(t):e.getLineCharCode(f,t);if(9===n)b++;else{if(32!==n){p=!0,g=t;break}m++}}if(!p)continue;if(b>0?o++:m>1&&r++,uv(s,a,l,g,u),u.looksLikeAlignment&&(!n||t!==u.spacesDiff))continue;let v=u.spacesDiff;v<=c&&h[v]++,s=l,a=g}let d=n;o!==r&&(d=o<r);let p=t;if(d){let e=d?0:.1*i;l.forEach(t=>{let n=h[t];n>e&&(e=n,p=t)}),4===p&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(p=2)}return{insertSpaces:d,tabSize:p}}function pv(e){return(1&e.metadata)>>>0}function fv(e,t){e.metadata=254&e.metadata|t<<0}function gv(e){return(2&e.metadata)>>>1===1}function mv(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function bv(e){return(4&e.metadata)>>>2===1}function vv(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function yv(e){return(24&e.metadata)>>>3}function wv(e,t){e.metadata=231&e.metadata|t<<3}function _v(e){return(32&e.metadata)>>>5===1}function Cv(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class Av{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,fv(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,vv(this,!1),wv(this,1),Cv(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,mv(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;let t=this.options.className;vv(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),wv(this,this.options.stickiness),Cv(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Ev=new Av(null,0,0);Ev.parent=Ev,Ev.left=Ev,Ev.right=Ev,fv(Ev,0);class xv{constructor(){this.root=Ev,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,o){return this.root===Ev?[]:Tv(this,e,t,n,i,o)}search(e,t,n){return this.root===Ev?[]:Bv(this,e,t,n)}collectNodesFromOwner(e){return Nv(this,e)}collectNodesPostOrder(){return Mv(this)}insert(e){Ov(this,e),this._normalizeDeltaIfNecessary()}delete(e){Pv(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;while(e!==this.root)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)}acceptReplace(e,t,n,i){const o=Lv(this,e,e+t);for(let r=0,s=o.length;r<s;r++){const e=o[r];Pv(this,e)}this._normalizeDeltaIfNecessary(),Iv(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;r<s;r++){const s=o[r];s.start=s.cachedAbsoluteStart,s.end=s.cachedAbsoluteEnd,Dv(s,e,e+t,n,i),s.maxEnd=s.end,Ov(this,s)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,Sv(this))}}function Sv(e){let t=e.root,n=0;while(t!==Ev)t.left===Ev||gv(t.left)?t.right===Ev||gv(t.right)?(t.start=n+t.start,t.end=n+t.end,t.delta=0,Wv(t),mv(t,!0),mv(t.left,!1),mv(t.right,!1),t===t.parent.right&&(n-=t.parent.delta),t=t.parent):(n+=t.delta,t=t.right):t=t.left;mv(e.root,!1)}function kv(e,t,n,i){return e<n||!(e>n)&&(1!==i&&(2===i||t))}function Dv(e,t,n,i,o){const r=yv(e),s=0===r||2===r,a=1===r||2===r,l=n-t,c=i,h=Math.min(l,c),u=e.start;let d=!1;const p=e.end;let f=!1;t<=u&&p<=n&&_v(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=o?1:l>0?2:0;!d&&kv(u,s,t,e)&&(d=!0),!f&&kv(p,a,t,e)&&(f=!0)}if(h>0&&!o){const e=l>c?2:0;!d&&kv(u,s,t+h,e)&&(d=!0),!f&&kv(p,a,t+h,e)&&(f=!0)}{const i=o?1:0;!d&&kv(u,s,n,i)&&(e.start=t+c,d=!0),!f&&kv(p,a,n,i)&&(e.end=t+c,f=!0)}const g=c-l;d||(e.start=Math.max(0,u+g)),f||(e.end=Math.max(0,p+g)),e.start>e.end&&(e.end=e.start)}function Lv(e,t,n){let i=e.root,o=0,r=0,s=0,a=0,l=[],c=0;while(i!==Ev)if(gv(i))mv(i.left,!1),mv(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!gv(i.left)){if(r=o+i.maxEnd,r<t){mv(i,!0);continue}if(i.left!==Ev){i=i.left;continue}}s=o+i.start,s>n?mv(i,!0):(a=o+i.end,a>=t&&(i.setCachedOffsets(s,a,0),l[c++]=i),mv(i,!0),i.right===Ev||gv(i.right)||(o+=i.delta,i=i.right))}return mv(e.root,!1),l}function Iv(e,t,n,i){let o=e.root,r=0,s=0,a=0;const l=i-(n-t);while(o!==Ev)if(gv(o))mv(o.left,!1),mv(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),Wv(o),o=o.parent;else{if(!gv(o.left)){if(s=r+o.maxEnd,s<t){mv(o,!0);continue}if(o.left!==Ev){o=o.left;continue}}a=r+o.start,a>n?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),mv(o,!0)):(mv(o,!0),o.right===Ev||gv(o.right)||(r+=o.delta,o=o.right))}mv(e.root,!1)}function Nv(e,t){let n=e.root,i=[],o=0;while(n!==Ev)gv(n)?(mv(n.left,!1),mv(n.right,!1),n=n.parent):n.left===Ev||gv(n.left)?(n.ownerId===t&&(i[o++]=n),mv(n,!0),n.right===Ev||gv(n.right)||(n=n.right)):n=n.left;return mv(e.root,!1),i}function Mv(e){let t=e.root,n=[],i=0;while(t!==Ev)gv(t)?(mv(t.left,!1),mv(t.right,!1),t=t.parent):t.left===Ev||gv(t.left)?t.right===Ev||gv(t.right)?(n[i++]=t,mv(t,!0)):t=t.right:t=t.left;return mv(e.root,!1),n}function Bv(e,t,n,i){let o=e.root,r=0,s=0,a=0,l=[],c=0;while(o!==Ev){if(gv(o)){mv(o.left,!1),mv(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==Ev&&!gv(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),n&&bv(o)&&(e=!1),e&&(l[c++]=o),mv(o,!0),o.right===Ev||gv(o.right)||(r+=o.delta,o=o.right)}return mv(e.root,!1),l}function Tv(e,t,n,i,o,r){let s=e.root,a=0,l=0,c=0,h=0,u=[],d=0;while(s!==Ev)if(gv(s))mv(s.left,!1),mv(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!gv(s.left)){if(l=a+s.maxEnd,l<t){mv(s,!0);continue}if(s.left!==Ev){s=s.left;continue}}if(c=a+s.start,c>n)mv(s,!0);else{if(h=a+s.end,h>=t){s.setCachedOffsets(c,h,r);let e=!0;i&&s.ownerId&&s.ownerId!==i&&(e=!1),o&&bv(s)&&(e=!1),e&&(u[d++]=s)}mv(s,!0),s.right===Ev||gv(s.right)||(a+=s.delta,s=s.right)}}return mv(e.root,!1),u}function Ov(e,t){if(e.root===Ev)return t.parent=Ev,t.left=Ev,t.right=Ev,fv(t,0),e.root=t,e.root;Rv(e,t),Hv(t.parent);let n=t;while(n!==e.root&&1===pv(n.parent))if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===pv(t)?(fv(n.parent,0),fv(t,0),fv(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,zv(e,n)),fv(n.parent,0),fv(n.parent.parent,1),Vv(e,n.parent.parent))}else{const t=n.parent.parent.left;1===pv(t)?(fv(n.parent,0),fv(t,0),fv(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,Vv(e,n)),fv(n.parent,0),fv(n.parent.parent,1),zv(e,n.parent.parent))}return fv(e.root,0),t}function Rv(e,t){let n=0,i=e.root;const o=t.start,r=t.end;while(1){const e=Uv(o,r,i.start+n,i.end+n);if(e<0){if(i.left===Ev){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===Ev){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=Ev,t.right=Ev,fv(t,1)}function Pv(e,t){let n,i;if(t.left===Ev?(n=t.right,i=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===Ev?(n=t.left,i=t):(i=Fv(t.right),n=i.right,n.start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,fv(n,0),t.detach(),jv(),Wv(n),void(e.root.parent=Ev);let o,r=1===pv(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,fv(i,pv(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Ev&&(i.left.parent=i),i.right!==Ev&&(i.right.parent=i)),t.detach(),r)return Hv(n.parent),i!==t&&(Hv(i),Hv(i.parent)),void jv();Hv(n),Hv(n.parent),i!==t&&(Hv(i),Hv(i.parent));while(n!==e.root&&0===pv(n))n===n.parent.left?(o=n.parent.right,1===pv(o)&&(fv(o,0),fv(n.parent,1),zv(e,n.parent),o=n.parent.right),0===pv(o.left)&&0===pv(o.right)?(fv(o,1),n=n.parent):(0===pv(o.right)&&(fv(o.left,0),fv(o,1),Vv(e,o),o=n.parent.right),fv(o,pv(n.parent)),fv(n.parent,0),fv(o.right,0),zv(e,n.parent),n=e.root)):(o=n.parent.left,1===pv(o)&&(fv(o,0),fv(n.parent,1),Vv(e,n.parent),o=n.parent.left),0===pv(o.left)&&0===pv(o.right)?(fv(o,1),n=n.parent):(0===pv(o.left)&&(fv(o.right,0),fv(o,1),zv(e,o),o=n.parent.left),fv(o,pv(n.parent)),fv(n.parent,0),fv(o.left,0),Vv(e,n.parent),n=e.root));fv(n,0),jv()}function Fv(e){while(e.left!==Ev)e=e.left;return e}function jv(){Ev.parent=Ev,Ev.delta=0,Ev.start=0,Ev.end=0}function zv(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==Ev&&(n.left.parent=t),n.parent=t.parent,t.parent===Ev?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,Wv(t),Wv(n)}function Vv(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==Ev&&(n.right.parent=t),n.parent=t.parent,t.parent===Ev?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,Wv(t),Wv(n)}function Qv(e){let t=e.end;if(e.left!==Ev){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==Ev){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function Wv(e){e.maxEnd=Qv(e)}function Hv(e){while(e!==Ev){const t=Qv(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function Uv(e,t,n,i){return e===n?t-i:e-n}class Yv{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Gv)return Kv(this.right);let e=this;while(e.parent!==Gv){if(e.parent.left===e)break;e=e.parent}return e.parent===Gv?Gv:e.parent}prev(){if(this.left!==Gv)return qv(this.left);let e=this;while(e.parent!==Gv){if(e.parent.right===e)break;e=e.parent}return e.parent===Gv?Gv:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Gv=new Yv(null,0);function Kv(e){while(e.left!==Gv)e=e.left;return e}function qv(e){while(e.right!==Gv)e=e.right;return e}function Jv(e){return e===Gv?0:e.size_left+e.piece.length+Jv(e.right)}function $v(e){return e===Gv?0:e.lf_left+e.piece.lineFeedCnt+$v(e.right)}function Xv(){Gv.parent=Gv}function Zv(e,t){let n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==Gv&&(n.left.parent=t),n.parent=t.parent,t.parent===Gv?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function ey(e,t){let n=t.left;t.left=n.right,n.right!==Gv&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===Gv?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function ty(e,t){let n,i;if(t.left===Gv?(i=t,n=i.right):t.right===Gv?(i=t,n=i.left):(i=Kv(t.right),n=i.right),i===e.root)return e.root=n,n.color=0,t.detach(),Xv(),void(e.root.parent=Gv);let o,r=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,oy(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,oy(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Gv&&(i.left.parent=i),i.right!==Gv&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,oy(e,i)),t.detach(),n.parent.left===n){let t=Jv(n),i=$v(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){let o=t-n.parent.size_left,r=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,iy(e,n.parent,o,r)}}if(oy(e,n.parent),r)Xv();else{while(n!==e.root&&0===n.color)n===n.parent.left?(o=n.parent.right,1===o.color&&(o.color=0,n.parent.color=1,Zv(e,n.parent),o=n.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,n=n.parent):(0===o.right.color&&(o.left.color=0,o.color=1,ey(e,o),o=n.parent.right),o.color=n.parent.color,n.parent.color=0,o.right.color=0,Zv(e,n.parent),n=e.root)):(o=n.parent.left,1===o.color&&(o.color=0,n.parent.color=1,ey(e,n.parent),o=n.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,n=n.parent):(0===o.left.color&&(o.right.color=0,o.color=1,Zv(e,o),o=n.parent.left),o.color=n.parent.color,n.parent.color=0,o.left.color=0,ey(e,n.parent),n=e.root));n.color=0,Xv()}}function ny(e,t){oy(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,Zv(e,t)),t.parent.color=0,t.parent.parent.color=1,ey(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,ey(e,t)),t.parent.color=0,t.parent.parent.color=1,Zv(e,t.parent.parent))}e.root.color=0}function iy(e,t,n,i){while(t!==e.root&&t!==Gv)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function oy(e,t){let n=0,i=0;if(t!==e.root){if(0===n){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t===e.root)return;t=t.parent,n=Jv(t.left)-t.size_left,i=$v(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}while(t!==e.root&&(0!==n||0!==i))t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}Gv.parent=Gv,Gv.left=Gv,Gv.right=Gv,Gv.color=0;class ry extends pu{constructor(e){super(0);for(let t=0,n=e.length;t<n;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}function sy(e){let t={};return n=>(t.hasOwnProperty(n)||(t[n]=e(n)),t[n])}const ay=sy(e=>new ry(e)),ly=999;class cy{constructor(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?hy(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=zr(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(i){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new uy(t,this.wordSeparators?ay(this.wordSeparators):null,n?this.searchString:null)}}function hy(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t<n;t++){const i=e.charCodeAt(t);if(92===i){if(t++,t>=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i)return!0}}return!1}class uy{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}function dy(e,t,n){if(!n)return new Ja(e,null);let i=[];for(let o=0,r=t.length;o<r;o++)i[o]=t[o];return new Ja(e,i)}class py{constructor(e){let t=[],n=0;for(let i=0,o=e.length;i<o;i++)10===e.charCodeAt(i)&&(t[n++]=i);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let n=0,i=t.length-1;if(-1===i)return 0;if(e<=t[0])return 0;while(n<i){const o=n+((i-n)/2>>0);t[o]>=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1}}class fy{static findMatches(e,t,n,i,o){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new vy(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]}static _getMultilineMatchRange(e,t,n,i,o,r){let s,a,l=0;if(i?(l=i.findLineFeedCountBeforeOffset(o),s=t+o+l):s=t+o,i){let e=i.findLineFeedCountBeforeOffset(o+r.length),t=e-l;a=s+r.length+t}else a=s+r.length;const c=e.getPositionAt(s),h=e.getPositionAt(a);return new Mn(c.lineNumber,c.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,n,i,o){const r=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new py(s):null,l=[];let c,h=0;n.reset(0);while(c=n.next(s))if(l[h++]=dy(this._getMultilineMatchRange(e,r,s,a,c.index,c[0]),c,i),h>=o)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,o){const r=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o);for(let l=t.startLineNumber+1;l<t.endLineNumber&&s<o;l++)s=this._findMatchesInLine(n,e.getLineContent(l),l,0,s,r,i,o);if(s<o){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);s=this._findMatchesInLine(n,a,t.endLineNumber,0,s,r,i,o)}return r}static _findMatchesInLine(e,t,n,i,o,r,s,a){const l=e.wordSeparators;if(!s&&e.simpleSearch){const s=e.simpleSearch,c=s.length,h=t.length;let u=-c;while(-1!==(u=t.indexOf(s,u+c)))if((!l||by(l,t,h,u,c))&&(r[o++]=new Ja(new Mn(n,u+1+i,n,u+1+c+i),null),o>=a))return o;return o}const c=new vy(e.wordSeparators,e.regex);let h;c.reset(0);do{if(h=c.next(t),h&&(r[o++]=dy(new Mn(n,h.index+1+i,n,h.index+1+h[0].length+i),h,s),o>=a))return o}while(h);return o}static findNextMatch(e,t,n,i){const o=t.parseSearchRequest();if(!o)return null;const r=new vy(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)}static _doFindNextMatchMultiline(e,t,n,i){const o=new Nn(t.lineNumber,1),r=e.getOffsetAt(o),s=e.getLineCount(),a=e.getValueInRange(new Mn(o.lineNumber,o.column,s,e.getLineMaxColumn(s)),1),l="\r\n"===e.getEOL()?new py(a):null;n.reset(t.column-1);let c=n.next(a);return c?dy(this._getMultilineMatchRange(e,r,a,l,c.index,c[0]),c,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Nn(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(let l=1;l<=o;l++){const t=(r+l-1)%o,s=e.getLineContent(t+1),a=this._findFirstMatchInLine(n,s,t+1,1,i);if(a)return a}return null}static _findFirstMatchInLine(e,t,n,i,o){e.reset(i-1);const r=e.next(t);return r?dy(new Mn(n,r.index+1,n,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,n,i){const o=t.parseSearchRequest();if(!o)return null;const r=new vy(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const o=this._doFindMatchesMultiline(e,new Mn(1,1,t.lineNumber,t.column),n,i,10*ly);if(o.length>0)return o[o.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new Nn(r,e.getLineMaxColumn(r)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(let l=1;l<=o;l++){const t=(o+r-l-1)%o,s=e.getLineContent(t+1),a=this._findLastMatchInLine(n,s,t+1,i);if(a)return a}return null}static _findLastMatchInLine(e,t,n,i){let o,r=null;e.reset(0);while(o=e.next(t))r=dy(new Mn(n,o.index+1,n,o.index+1+o[0].length),o,i);return r}}function gy(e,t,n,i,o){if(0===i)return!0;const r=t.charCodeAt(i-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}function my(e,t,n,i,o){if(i+o===n)return!0;const r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const n=t.charCodeAt(i+o-1);if(0!==e.get(n))return!0}return!1}function by(e,t,n,i,o){return gy(e,t,n,i,o)&&my(e,t,n,i,o)}class vy{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(n=this._searchRegex.exec(e),!n)return null;const i=n.index,o=n[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){ls(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||by(this._wordSeparators,e,t,i,o))return n}while(n);return null}}const yy=65535;function wy(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class _y{constructor(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o}}function Cy(e,t=!0){let n=[0],i=1;for(let o=0,r=e.length;o<r;o++){const t=e.charCodeAt(o);13===t?o+1<r&&10===e.charCodeAt(o+1)?(n[i++]=o+2,o++):n[i++]=o+1:10===t&&(n[i++]=o+1)}return t?wy(n):n}function Ay(e,t){e.length=0,e[0]=0;let n=1,i=0,o=0,r=0,s=!0;for(let l=0,c=t.length;l<c;l++){const a=t.charCodeAt(l);13===a?l+1<c&&10===t.charCodeAt(l+1)?(r++,e[n++]=l+2,l++):(i++,e[n++]=l+1):10===a?(o++,e[n++]=l+1):s&&9!==a&&(a<32||a>126)&&(s=!1)}const a=new _y(wy(e),i,o,r,s);return e.length=0,a}class Ey{constructor(e,t,n,i,o){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=o}}class xy{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Sy{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Gv&&e.iterate(e.root,e=>(e!==Gv&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class ky{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber<e&&n.nodeStartLineNumber+n.node.piece.lineFeedCnt>=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let i=0;i<n.length;i++){let o=n[i];(null===o.node.parent||o.nodeStartOffset>=e)&&(n[i]=null,t=!0)}if(t){let e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class Dy{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new xy("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Gv,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let o=0,r=e.length;o<r;o++)if(e[o].buffer.length>0){e[o].lineStarts||(e[o].lineStarts=Cy(e[o].buffer));let t=new Ey(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,t)}this._searchCache=new ky(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=yy,n=t-Math.floor(t/3),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,t=>{let a=this.getNodeContent(t),l=a.length;if(r<=n||r+l<i)return o+=a,r+=l,!0;let c=o.replace(/\r\n|\r|\n/g,e);return s.push(new xy(c,Cy(c))),o=a,r=l,!0}),r>0){let t=o.replace(/\r\n|\r|\n/g,e);s.push(new xy(t,Cy(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Sy(this,e)}getOffsetAt(e,t){let n=0,i=this.root;while(i!==Gv)if(i.left!==Gv&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;let o=this.getAccumulatedValue(i,e-i.lf_left-2);return n+(o+t-1)}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,i=e;while(t!==Gv)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){let e=this.getOffsetAt(n+1,1),t=i-e;return new Nn(n+1,t+1)}return new Nn(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===Gv){let t=this.getOffsetAt(n+1,1),o=i-e-t;return new Nn(n+1,o+1)}t=t.right}return new Nn(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}let n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),r=i.substring(o+e.remainder,o+n.piece.length);n=n.next();while(n!==Gv){let e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){r+=e.substring(i,i+t.remainder);break}r+=e.substr(i,n.piece.length),n=n.next()}return r}getLinesContent(){let e=[],t=0,n="",i=!1;return this.iterate(this.root,o=>{if(o===Gv)return!0;const r=o.piece;let s=r.length;if(0===s)return!0;const a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,c=r.start.line,h=r.end.line;let u=l[c]+r.start.column;if(i&&(10===a.charCodeAt(u)&&(u++,s--),e[t++]=n,n="",i=!1,0===s))return!0;if(c===h)return this._EOLNormalized||13!==a.charCodeAt(u+s-1)?n+=a.substr(u,s):(i=!0,n+=a.substr(u,s-1)),!0;n+=this._EOLNormalized?a.substring(u,Math.max(u,l[c+1]-this._EOLLength)):a.substring(u,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=c+1;i<h;i++)n=this._EOLNormalized?a.substring(l[i],l[i+1]-this._EOLLength):a.substring(l[i],l[i+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;return this._EOLNormalized||13!==a.charCodeAt(l[h]+r.end.column-1)?n=a.substr(l[h],r.end.column):(i=!0,0===r.end.column?t--:n=a.substr(l[h],r.end.column-1)),!0}),i&&(e[t++]=n,n=""),e[t++]=n,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value}_getCharCode(e){if(e.remainder===e.node.piece.length){let t=e.node.next();if(!t)return 0;let n=this._buffers[t.piece.bufferIndex],i=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return n.buffer.charCodeAt(i)}{let t=this._buffers[e.node.piece.bufferIndex],n=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start),i=n+e.remainder;return t.buffer.charCodeAt(i)}}getLineCharCode(e,t){let n=this.nodeAt2(e,t+1);return this._getCharCode(n)}getLineLength(e){if(e===this.getLineCount()){let t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,n,i,o,r,s,a,l,c,h){let u,d,p,f=this._buffers[e.piece.bufferIndex],g=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),m=this.offsetInBuffer(e.piece.bufferIndex,o),b=this.offsetInBuffer(e.piece.bufferIndex,r),v={line:0,column:0};t._wordSeparators?(d=f.buffer.substring(m,b),p=e=>e+m,t.reset(0)):(d=f.buffer,p=e=>e,t.reset(m));do{if(u=t.next(d),u){if(p(u.index)>=b)return c;this.positionInBuffer(e,p(u.index)-g,v);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,v),r=v.line===o.line?v.column-o.column+i:v.column+1,s=r+u[0].length;if(h[c++]=dy(new Mn(n+t,r,n+t,s),u,a),p(u.index)+u[0].length>=b)return c;if(c>=l)return c}}while(u);return c}findMatchesLineByLine(e,t,n,i){const o=[];let r=0;const s=new vy(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder),h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,c,h,t,n,i,r,o),o;let u=e.startLineNumber,d=a.node;while(d!==l.node){let l=this.getLineFeedCnt(d.piece.bufferIndex,c,d.piece.end);if(l>=1){let a=this._buffers[d.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),p=a[c.line+l],f=u===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(d,s,u,f,c,this.positionInBuffer(d,p-h),t,n,i,r,o),r>=i)return o;u+=l}let h=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(h,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,h,r,o,n,i),o}if(r=this._findMatchesInLine(t,s,this.getLineContent(u).substr(h),u,h,r,o,n,i),r>=i)return o;u++,a=this.nodeAt2(u,1),d=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){let a=u===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(u).substring(a,e.endColumn-1);return r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,n,i),o}let p=u===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,u,p,c,h,t,n,i,r,o),o}_findMatchesInLine(e,t,n,i,o,r,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=n.length;let u=-a;while(-1!==(u=n.indexOf(t,u+a)))if((!c||by(c,n,h,u,a))&&(s[r++]=new Ja(new Mn(i,u+1+o,i,u+1+a+o),null),r>=l))return r;return r}let h;t.reset(0);do{if(h=t.next(n),h&&(s[r++]=dy(new Mn(i,h.index+1+o,i,h.index+1+h[0].length+o),h,a),r>=l))return r}while(h);return r}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Gv){let{node:n,remainder:i,nodeStartOffset:o}=this.nodeAt(e),r=n.piece,s=r.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.length<yy)return this.appendToNode(n,t),void this.computeBufferMetadata();if(o===e)this.insertContentToNodeLeft(t,n),this._searchCache.validate(e);else if(o+n.piece.length>e){let e=[],o=new Ey(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){let e=this.nodeCharCodeAt(n,i);if(10===e){let e={line:o.start.line+1,column:0};o=new Ey(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){let o=this.nodeCharCodeAt(n,i-1);if(13===o){let o=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,o),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a)}else this.deleteNodeTail(n,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(n,o);let c=n;for(let t=0;t<l.length;t++)c=this.rbInsertRight(c,l[t]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,n)}else{let e=this.createNewPieces(t),n=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)n=this.rbInsertRight(n,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===Gv)return;let n=this.nodeAt(e),i=this.nodeAt(e+t),o=n.node,r=i.node;if(o===r){let r=this.positionInBuffer(o,n.remainder),s=this.positionInBuffer(o,i.remainder);if(n.nodeStartOffset===e){if(t===o.piece.length){let e=o.next();return ty(this,o),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(o,s),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return n.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,r),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,r,s),void this.computeBufferMetadata())}let s=[],a=this.positionInBuffer(o,n.remainder);this.deleteNodeTail(o,a),this._searchCache.validate(e),0===o.piece.length&&s.push(o);let l=this.positionInBuffer(r,i.remainder);this.deleteNodeHead(r,l),0===r.piece.length&&s.push(r);let c=o.next();for(let u=c;u!==Gv&&u!==r;u=u.next())s.push(u);let h=0===o.piece.length?o.prev():o;this.deleteNodes(s),this.validateCRLFWithNextNode(h),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){let n=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){let i=t.piece,o={line:i.start.line+1,column:0},r=new Ey(i.bufferIndex,o,i.end,this.getLineFeedCnt(i.bufferIndex,o,i.end),i.length-1);t.piece=r,e+="\n",iy(this,t,-1,-1),0===t.piece.length&&n.push(t)}let i=this.createNewPieces(e),o=this.rbInsertLeft(t,i[i.length-1]);for(let r=i.length-2;r>=0;r--)o=this.rbInsertLeft(o,i[r]);this.validateCRLFWithPrevNode(o),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i;for(let r=1;r<n.length;r++)o=this.rbInsertRight(o,n[r]);this.validateCRLFWithPrevNode(i)}positionInBuffer(e,t,n){let i=e.piece,o=e.piece.bufferIndex,r=this._buffers[o].lineStarts,s=r[i.start.line]+i.start.column,a=s+t,l=i.start.line,c=i.end.line,h=0,u=0,d=0;while(l<=c){if(h=l+(c-l)/2|0,d=r[h],h===c)break;if(u=r[h+1],a<d)c=h-1;else{if(!(a>=u))break;l=h+1}}return n?(n.line=h,n.column=a-d,null):{line:h,column:a-d}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;let i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;let o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;let s=r-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(s)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){let n=this._buffers[e].lineStarts;return n[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)ty(this,e[t])}createNewPieces(e){if(e.length>yy){let t=[];while(e.length>yy){const n=e.charCodeAt(yy-1);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,yy-1),e=e.substring(yy-1)):(i=e.substring(0,yy),e=e.substring(yy));let o=Cy(i);t.push(new Ey(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new xy(i,o))}let n=Cy(e);return t.push(new Ey(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new xy(e,n)),t}let t=this._buffers[0].buffer.length;const n=Cy(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e<n.length;e++)n[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<n.length;e++)n[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length;let r=this._buffers[0].lineStarts.length-1,s=o-this._buffers[0].lineStarts[r],a={line:r,column:s},l=new Ey(0,i,a,this.getLineFeedCnt(0,i,a),o-t);return this._lastChangeBufferPos=a,[l]}getLineRawContent(e,t=0){let n=this.root,i="",o=this._searchCache.get2(e);if(o){n=o.node;let r=this.getAccumulatedValue(n,e-o.nodeStartLineNumber-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(o.nodeStartLineNumber+n.piece.lineFeedCnt!==e){let i=this.getAccumulatedValue(n,e-o.nodeStartLineNumber);return s.substring(a+r,a+i-t)}i=s.substring(a+r,a+n.piece.length)}else{let o=0;const r=e;while(n!==Gv)if(n.left!==Gv&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){let i=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-n.lf_left)}),a.substring(l+i,l+s-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(n,e-n.lf_left-2),o=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=o.substring(r+t,r+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right}}n=n.next();while(n!==Gv){let e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(n,0),r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(r,r+o-t),i}{let t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;while(e!==Gv)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){let n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;let n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),l=a-i,c=s-o,h=n.length+c;e.piece=new Ey(n.bufferIndex,n.start,r,a,h),iy(this,e,c,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=this.offsetInBuffer(n.bufferIndex,r),l=s-i,c=o-a,h=n.length+c;e.piece=new Ey(n.bufferIndex,r,n.end,s,h),iy(this,e,c,l)}shrinkNode(e,t,n){const i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,l=t,c=this.getLineFeedCnt(i.bufferIndex,i.start,l),h=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new Ey(i.bufferIndex,i.start,l,c,h),iy(this,e,h-s,c-a);let u=new Ey(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),d=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=Cy(t,!1);for(let d=0;d<o.length;d++)o[d]+=i;if(n){let e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:i-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const r=this._buffers[0].lineStarts.length-1,s=this._buffers[0].buffer.length-this._buffers[0].lineStarts[r],a={line:r,column:s},l=e.piece.length+t.length,c=e.piece.lineFeedCnt,h=this.getLineFeedCnt(0,e.piece.start,a),u=h-c;e.piece=new Ey(e.piece.bufferIndex,e.piece.start,a,h,l),this._lastChangeBufferPos=a,iy(this,e,t.length,u)}nodeAt(e){let t=this.root,n=this._searchCache.get(e);if(n)return{node:n.node,nodeStartOffset:n.nodeStartOffset,remainder:e-n.nodeStartOffset};let i=0;while(t!==Gv)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;let n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;while(n!==Gv)if(n.left!==Gv&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2);if(o+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}n=n.next();while(n!==Gv){if(n.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1){let e=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:e}}t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===Gv||0===e.piece.lineFeedCnt)return!1;let t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;if(i===n.length-1)return!1;let r=n[i+1];return!(r>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==Gv&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new Ey(e.piece.bufferIndex,e.piece.start,n,s,r),iy(this,e,-1,-1),0===e.piece.length&&i.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Ey(t.piece.bufferIndex,a,t.piece.end,c,l),iy(this,t,-1,-1),0===t.piece.length&&i.push(t);let h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let u=0;u<i.length;u++)ty(this,i[u])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let n=t.next();if(this.startWithLF(n)){if(e+="\n",1===n.piece.length)ty(this,n);else{const e=n.piece,t={line:e.start.line+1,column:0},i=e.length-1,o=this.getLineFeedCnt(e.bufferIndex,t,e.end);n.piece=new Ey(e.bufferIndex,t,e.end,o,i),iy(this,n,-1,-1)}return!0}}return!1}iterate(e,t){if(e===Gv)return t(Gv);let n=this.iterate(e.left,t);return n?t(e)&&this.iterate(e.right,t):n}getNodeContent(e){if(e===Gv)return"";let t,n=this._buffers[e.piece.bufferIndex],i=e.piece,o=this.offsetInBuffer(i.bufferIndex,i.start),r=this.offsetInBuffer(i.bufferIndex,i.end);return t=n.buffer.substring(o,r),t}getPieceContent(e){let t=this._buffers[e.bufferIndex],n=this.offsetInBuffer(e.bufferIndex,e.start),i=this.offsetInBuffer(e.bufferIndex,e.end),o=t.buffer.substring(n,i);return o}rbInsertRight(e,t){let n=new Yv(t,1);n.left=Gv,n.right=Gv,n.parent=Gv,n.size_left=0,n.lf_left=0;let i=this.root;if(i===Gv)this.root=n,n.color=0;else if(e.right===Gv)e.right=n,n.parent=e;else{let t=Kv(e.right);t.left=n,n.parent=t}return ny(this,n),n}rbInsertLeft(e,t){let n=new Yv(t,1);if(n.left=Gv,n.right=Gv,n.parent=Gv,n.size_left=0,n.lf_left=0,this.root===Gv)this.root=n,n.color=0;else if(e.left===Gv)e.left=n,n.parent=e;else{let t=qv(e.left);t.right=n,n.parent=t}return ny(this,n),n}}function Ly(e){let t=0,n=0,i=0,o=0;for(let r=0,s=e.length;r<s;r++){const a=e.charCodeAt(r);13===a?(0===t&&(n=r),t++,r+1<s&&10===e.charCodeAt(r+1)?(o|=2,r++):o|=3,i=r+1):10===a&&(o|=1,0===t&&(n=r),t++,i=r+1)}return 0===t&&(n=e.length),[t,n,e.length-i,o]}function Iy(e){return(16384|e<<0|2<<23)>>>0}const Ny=new Uint32Array(0).buffer;class My{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const n=this.tokens[this.tokens.length-1],i=n.startLineNumber+n.tokens.length-1;if(i+1===e)return void n.tokens.push(t)}this.tokens.push(new Ry(e,[t]))}}class By{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let n=0;n<this._tokenCount;n++)t.push(`(${this._getDeltaLine(n)+e},${this._getStartCharacter(n)}-${this._getEndCharacter(n)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),n=this._getDeltaLine(e-1),i=this._getEndCharacter(e-1);return new Mn(0,t+1,n,i+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,n=this._getTokenCount()-1;while(t<n){const i=t+Math.floor((n-t)/2),o=this._getDeltaLine(i);if(o<e)t=i+1;else{if(!(o>e)){let o=i;while(o>t&&this._getDeltaLine(o-1)===e)o--;let r=i;while(r<n&&this._getDeltaLine(r+1)===e)r++;return new Ty(this._tokens.subarray(4*o,4*r+4))}n=i-1}}return this._getDeltaLine(t)===e?new Ty(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,n,i){const o=this._tokens,r=this._tokenCount;let s=0,a=!1,l=0;for(let c=0;c<r;c++){const r=4*c,h=o[r],u=o[r+1],d=o[r+2],p=o[r+3];if((h>e||h===e&&d>=t)&&(h<n||h===n&&u<=i))a=!0;else{if(0===s&&(l=h),a){const e=4*s;o[e]=h-l,o[e+1]=u,o[e+2]=d,o[e+3]=p}s++}}return this._tokenCount=s,l}split(e,t,n,i){const o=this._tokens,r=this._tokenCount;let s=[],a=[],l=s,c=0,h=0;for(let u=0;u<r;u++){const r=4*u,s=o[r],d=o[r+1],p=o[r+2],f=o[r+3];if(s>e||s===e&&p>=t){if(s<n||s===n&&d<=i)continue;l!==a&&(l=a,c=0,h=s)}l[c++]=s-h,l[c++]=d,l[c++]=p,l[c++]=f}return[new By(new Uint32Array(s)),new By(new Uint32Array(a)),h]}acceptDeleteRange(e,t,n,i,o){const r=this._tokens,s=this._tokenCount,a=i-t;let l=0,c=!1;for(let h=0;h<s;h++){const u=4*h;let d=r[u],p=r[u+1],f=r[u+2];const g=r[u+3];if(d<t||d===t&&f<=n){l++;continue}if(d===t&&p<n)d===i&&f>o?f-=o-n:f=n;else if(d===t&&p===n){if(!(d===i&&f>o)){c=!0;continue}f-=o-n}else if(d<i||d===i&&p<o){if(!(d===i&&f>o)){c=!0;continue}d===t?(p=n,f=p+(f-o)):(p=0,f=p+(f-o))}else if(d>i){if(0===a&&!c){l=s;break}d-=a}else{if(!(d===i&&p>=o))throw new Error("Not possible!");e&&0===d&&(p+=e,f+=e),d-=a,p-=o-n,f-=o-n}const m=4*l;r[m]=d,r[m+1]=p,r[m+2]=f,r[m+3]=g,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,o,r){const s=0===n&&1===i&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let c=0;c<l;c++){const r=4*c;let l=a[r],h=a[r+1],u=a[r+2];if(!(l<e||l===e&&u<t)){if(l===e&&u===t){if(!s)continue;u+=1}else if(l===e&&h<t&&t<u)0===n?u+=i:u=t;else{if(l===e&&h===t&&s)continue;if(l===e)if(l+=n,0===n)h+=i,u+=i;else{const e=u-h;h=o+(h-t),u=h+e}else l+=n}a[r]=l,a[r+1]=h,a[r+2]=u}}}}class Ty{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}class Oy{constructor(e,t){this.startLineNumber=e,this.tokens=t,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(e){return this.startLineNumber<=e&&e<=this.endLineNumber?this.tokens.getLineTokens(e-this.startLineNumber):null}getRange(){const e=this.tokens.getRange();return e?new Mn(this.startLineNumber+e.startLineNumber,e.startColumn,this.startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this.startLineNumber,n=e.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this.startLineNumber,n=e.endLineNumber-this.startLineNumber,[i,o,r]=this.tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new Oy(this.startLineNumber,i),new Oy(this.startLineNumber+r,o)]}applyEdit(e,t){const[n,i,o]=Ly(t);this.acceptEdit(e,n,i,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,o){this._acceptDeleteRange(e),this._acceptInsertText(new Nn(e.startLineNumber,e.startColumn),t,n,i,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,n=e.endLineNumber-this.startLineNumber;if(n<0){const e=n-t;return void(this.startLineNumber-=e)}const i=this.tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const i=-t;this.startLineNumber-=i,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,o){if(0===t&&0===n)return;const r=e.lineNumber-this.startLineNumber;if(r<0)return void(this.startLineNumber+=t);const s=this.tokens.getMaxDeltaLine();r>=s+1||this.tokens.acceptInsertText(r,e.column-1,t,n,i,o)}}class Ry{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function Py(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class Fy{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),o=t[t.length-1].getRange();if(!i||!o)return e;n=e.plusRange(i).plusRange(o)}let i=null;for(let o=0,r=this._pieces.length;o<r;o++){const e=this._pieces[o];if(e.endLineNumber<n.startLineNumber)continue;if(e.startLineNumber>n.endLineNumber){i=i||{index:o};break}if(e.removeTokens(n),e.isEmpty()){this._pieces.splice(o,1),o--,r--;continue}if(e.endLineNumber<n.startLineNumber)continue;if(e.startLineNumber>n.endLineNumber){i=i||{index:o};continue}const[t,s]=e.split(n);t.isEmpty()?i=i||{index:o}:s.isEmpty()||(this._pieces.splice(o,1,t,s),o++,r++,i=i||{index:o})}return i=i||{index:this._pieces.length},t.length>0&&(this._pieces=Vu(this._pieces,i.index,t)),n}isComplete(){return this._isComplete}addSemanticTokens(e,t){const n=this._pieces;if(0===n.length)return t;const i=Fy._findFirstPieceWithLine(n,e),o=n[i].getLineTokens(e);if(!o)return t;const r=t.getCount(),s=o.getCount();let a=0,l=[],c=0,h=0;const u=(e,t)=>{e!==h&&(h=e,l[c++]=e,l[c++]=t)};for(let d=0;d<s;d++){const e=o.getStartCharacter(d),n=o.getEndCharacter(d),i=o.getMetadata(d),s=((1&i?2048:0)|(2&i?4096:0)|(4&i?8192:0)|(8&i?8372224:0)|(16&i?4286578688:0))>>>0,l=~s>>>0;while(a<r&&t.getEndOffset(a)<=e)u(t.getEndOffset(a),t.getMetadata(a)),a++;a<r&&t.getStartOffset(a)<e&&u(e,t.getMetadata(a));while(a<r&&t.getEndOffset(a)<n)u(t.getEndOffset(a),t.getMetadata(a)&l|i&s),a++;if(a<r)u(n,t.getMetadata(a)&l|i&s),t.getEndOffset(a)===n&&a++;else{const e=Math.min(Math.max(0,a-1),r-1);u(n,t.getMetadata(e)&l|i&s)}}while(a<r)u(t.getEndOffset(a),t.getMetadata(a)),a++;return new gd(new Uint32Array(l),t.getLineContent())}static _findFirstPieceWithLine(e,t){let n=0,i=e.length-1;while(n<i){let o=n+Math.floor((i-n)/2);if(e[o].endLineNumber<t)n=o+1;else{if(!(e[o].startLineNumber>t)){while(o>n&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber)o--;return o}i=o-1}}return n}acceptEdit(e,t,n,i,o){for(const r of this._pieces)r.acceptEdit(e,t,n,i,o)}}class jy{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,n){let i=null;if(t<this._len&&(i=this._lineTokens[t]),null!==i&&i!==Ny)return new gd(Py(i),n);let o=new Uint32Array(2);return o[0]=n.length,o[1]=Iy(e),new gd(o,n)}static _massageTokens(e,t,n){const i=n?Py(n):null;if(0===t){let t=!1;if(i&&i.length>1&&(t=Zl.getLanguageId(i[1])!==e),!t)return Ny}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=Iy(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[];for(let i=0;i<t;i++)n[i]=null;this._lineTokens=Vu(this._lineTokens,e,n),this._len+=t}setTokens(e,t,n,i,o){const r=jy._massageTokens(e,n,i);this._ensureLine(t);const s=this._lineTokens[t];return this._lineTokens[t]=r,!!o&&!jy._equals(s,r)}static _equals(e,t){if(!e||!t)return!e&&!t;const n=Py(e),i=Py(t);if(n.length!==i.length)return!1;for(let o=0,r=n.length;o<r;o++)if(n[o]!==i[o])return!1;return!0}acceptEdit(e,t,n){this._acceptDeleteRange(e),this._acceptInsertText(new Nn(e.startLineNumber,e.startColumn),t,n)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=jy._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=jy._deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n<this._len&&(i=jy._deleteBeginning(this._lineTokens[n],e.endColumn-1)),this._lineTokens[t]=jy._append(this._lineTokens[t],i),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,n){if(0===t&&0===n)return;const i=e.lineNumber-1;i>=this._len||(0!==t?(this._lineTokens[i]=jy._deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=jy._insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=jy._insert(this._lineTokens[i],e.column-1,n))}static _deleteBeginning(e,t){return null===e||e===Ny?e:jy._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===Ny)return e;const n=Py(e),i=n[n.length-2];return jy._delete(e,t,i)}static _delete(e,t,n){if(null===e||e===Ny||t===n)return e;const i=Py(e),o=i.length>>>1;if(0===t&&i[i.length-2]===n)return Ny;const r=gd.findIndexInTokensArray(i,t),s=r>0?i[r-1<<1]:0,a=i[r<<1];if(n<a){const s=n-t;for(let e=r;e<o;e++)i[e<<1]-=s;return e}let l,c;s!==t?(i[r<<1]=t,l=r+1<<1,c=t):(l=r<<1,c=s);const h=n-t;for(let d=r+1;d<o;d++){const e=i[d<<1]-h;e>c&&(i[l++]=e,i[l++]=i[1+(d<<1)],c=e)}if(l===i.length)return e;let u=new Uint32Array(l);return u.set(i.subarray(0,l),0),u.buffer}static _append(e,t){if(t===Ny)return e;if(e===Ny)return t;if(null===e)return e;if(null===t)return null;const n=Py(e),i=Py(t),o=i.length>>>1;let r=new Uint32Array(n.length+i.length);r.set(n,0);let s=n.length;const a=n[n.length-2];for(let l=0;l<o;l++)r[s++]=i[l<<1]+a,r[s++]=i[1+(l<<1)];return r.buffer}static _insert(e,t,n){if(null===e||e===Ny)return e;const i=Py(e),o=i.length>>>1;let r=gd.findIndexInTokensArray(i,t);if(r>0){const e=i[r-1<<1];e===t&&r--}for(let s=r;s<o;s++)i[s<<1]+=n;return e}}class zy extends st{constructor(e,t,n,i,o,r,s){super(),this._onDidChangeContent=this._register(new bt),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=i,this._mightContainUnusualLineTerminators=o,this._pieceTree=new Dy(e,n,s)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let n=e+t;const i=this.getPositionAt(e),o=this.getPositionAt(n);return new Mn(i.lineNumber,i.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let n=this.getOffsetAt(e.startLineNumber,e.startColumn),i=this.getOffsetAt(e.endLineNumber,e.endColumn);return i-n}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let n=0;const i=e.startLineNumber,o=e.endLineNumber;for(let t=i;t<=o;t++){const r=this.getLineContent(t),s=t===i?e.startColumn-1:0,a=t===o?e.endColumn-1:r.length;for(let e=s;e<a;e++)rs(r.charCodeAt(e))?(n+=1,e+=1):n+=1}return n+=this._getEndOfLine(t).length*(o-i),n}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=Hr(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Yr(this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,n){let i=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,s=!0,a=[];for(let f=0;f<e.length;f++){let t=e[f];s&&t._isTracked&&(s=!1);let n=t.range;if(t.text){let e=!0;r||(e=!bs(t.text),r=e),!i&&e&&(i=ps(t.text)),!o&&e&&(o=ys(t.text))}let l="",c=0,h=0,u=0;if(t.text){let e;[c,h,u,e]=Ly(t.text);const n=this.getEOL(),i="\r\n"===n?2:1;l=0===e||e===i?t.text:t.text.replace(/\r\n|\r|\n/g,n)}a[f]={sortIndex:f,identifier:t.identifier||null,range:n,rangeOffset:this.getOffsetAt(n.startLineNumber,n.startColumn),rangeLength:this.getValueLengthInRange(n),text:l,eolCount:c,firstLineLength:h,lastLineLength:u,forceMoveMarkers:Boolean(t.forceMoveMarkers),isAutoWhitespaceEdit:t.isAutoWhitespaceEdit||!1}}a.sort(zy._sortOpsAscending);let l=!1;for(let f=0,g=a.length-1;f<g;f++){let e=a[f].range.getEndPosition(),t=a[f+1].range.getStartPosition();if(t.isBeforeOrEqual(e)){if(t.isBefore(e))throw new Error("Overlapping ranges are not allowed!");l=!0}}s&&(a=this._reduceOperations(a));let c=n||t?zy._getInverseEditRanges(a):[],h=[];if(t)for(let f=0;f<a.length;f++){let e=a[f],t=c[f];if(e.isAutoWhitespaceEdit&&e.range.isEmpty())for(let n=t.startLineNumber;n<=t.endLineNumber;n++){let i="";n===t.startLineNumber&&(i=this.getLineContent(e.range.startLineNumber),-1!==Hr(i))||h.push({lineNumber:n,oldContent:i})}}let u=null;if(n){let e=0;u=[];for(let t=0;t<a.length;t++){const n=a[t],i=c[t],o=this.getValueInRange(n.range),r=n.rangeOffset+e;e+=n.text.length-o.length,u[t]={sortIndex:n.sortIndex,identifier:n.identifier,range:i,text:o,textChange:new ev(n.rangeOffset,o,r,n.text)}}l||u.sort((e,t)=>e.sortIndex-t.sortIndex)}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;const d=this._doApplyEdits(a);let p=null;if(t&&h.length>0){h.sort((e,t)=>t.lineNumber-e.lineNumber),p=[];for(let e=0,t=h.length;e<t;e++){let t=h[e].lineNumber;if(e>0&&h[e-1].lineNumber===t)continue;let n=h[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===Hr(i)&&p.push(t)}}return this._onDidChangeContent.fire(),new el(u,d,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,o=new Mn(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let r=n.startLineNumber,s=n.startColumn;const a=[];for(let d=0,p=e.length;d<p;d++){const n=e[d],i=n.range;t=t||n.forceMoveMarkers,a.push(this.getValueInRange(new Mn(r,s,i.startLineNumber,i.startColumn))),n.text.length>0&&a.push(n.text),r=i.endLineNumber,s=i.endColumn}const l=a.join(""),[c,h,u]=Ly(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(zy._sortOpsDescending);let t=[];for(let n=0;n<e.length;n++){let i=e[n];const o=i.range.startLineNumber,r=i.range.startColumn,s=i.range.endLineNumber,a=i.range.endColumn;if(o===s&&r===a&&0===i.text.length)continue;i.text?(this._pieceTree.delete(i.rangeOffset,i.rangeLength),this._pieceTree.insert(i.rangeOffset,i.text,!0)):this._pieceTree.delete(i.rangeOffset,i.rangeLength);const l=new Mn(o,r,s,a);t.push({range:l,rangeLength:i.rangeLength,text:i.text,rangeOffset:i.rangeOffset,forceMoveMarkers:i.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,n,i){return this._pieceTree.findMatchesLineByLine(e,t,n,i)}static _getInverseEditRanges(e){let t=[],n=0,i=0,o=null;for(let r=0,s=e.length;r<s;r++){let s,a,l,c=e[r];if(o?o.range.endLineNumber===c.range.startLineNumber?(s=n,a=i+(c.range.startColumn-o.range.endColumn)):(s=n+(c.range.startLineNumber-o.range.endLineNumber),a=c.range.startColumn):(s=c.range.startLineNumber,a=c.range.startColumn),c.text.length>0){const e=c.eolCount+1;l=1===e?new Mn(s,a,s,a+c.firstLineLength):new Mn(s,a,s+e-1,c.lastLineLength+1)}else l=new Mn(s,a,s,a);n=l.endLineNumber,i=l.endColumn,t.push(l),o=c}return t}static _sortOpsAscending(e,t){let n=Mn.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){let n=Mn.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class Vy{constructor(e,t,n,i,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let o=0,r=n.length;o<r;o++){let e=n[o].buffer.replace(/\r\n|\r|\n/g,t),i=Cy(e);n[o]=new xy(e,i)}const i=new zy(n,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:i,disposable:i}}}class Qy{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&Es(e)&&(this.BOM=As,e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=Ay(this._tmpLineStarts,e);this.chunks.push(new xy(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=ps(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=ys(e))}finish(e=!0){return this._finish(),new Vy(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=Cy(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class Wy{constructor(){this.changeType=1}}class Hy{constructor(e,t,n,i,o){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=o}static applyInjectedText(e,t){if(!t||0===t.length)return e;let n="",i=0;for(const o of t)n+=e.substring(i,o.column-1),i=o.column-1,n+=o.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new Hy(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new Hy(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber),t}}class Uy{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class Yy{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class Gy{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class Ky{constructor(){this.changeType=5}}class qy{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t<n;t++){const n=this.changes[t];if(n.changeType===e)return!0}return!1}static merge(e,t){const n=[].concat(e.changes).concat(t.changes),i=t.versionId,o=e.isUndoing||t.isUndoing,r=e.isRedoing||t.isRedoing;return new qy(n,i,o,r)}}class Jy{constructor(e){this.changes=e}}class $y{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=qy.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),n=$y._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new $y(t,n)}static _mergeChangeEvents(e,t){const n=[].concat(e.changes).concat(t.changes),i=t.eol,o=t.versionId,r=e.isUndoing||t.isUndoing,s=e.isRedoing||t.isRedoing,a=e.isFlush||t.isFlush;return{changes:n,eol:i,versionId:o,isUndoing:r,isRedoing:s,isFlush:a}}}class Xy{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e<this._len&&(this._valid[e]=!1),e<this._invalidLineStartIndex&&(this._invalidLineStartIndex=e)}_isValid(e){return e<this._len&&this._valid[e]}getBeginState(e){return e<this._len?this._beginState[e]:null}_ensureLine(e){while(e>=this._len)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[],i=[];for(let o=0;o<t;o++)n[o]=null,i[o]=!1;this._beginState=Vu(this._beginState,e,n),this._valid=Vu(this._valid,e,i),this._len+=t}_setValid(e,t){this._ensureLine(e),this._valid[e]=t}_setBeginState(e,t){this._ensureLine(e),this._beginState[e]=t}setEndState(e,t,n){if(this._setValid(t,!0),this._invalidLineStartIndex=t+1,t===e-1)return;const i=this.getBeginState(t+1);if(null===i||!n.equals(i))return this._setBeginState(t+1,n),void this._invalidateLine(t+1);let o=t+1;while(o<e){if(!this._isValid(o))break;o++}this._invalidLineStartIndex=o}setFakeTokens(e){this._setValid(e,!1)}applyEdits(e,t){const n=e.endLineNumber-e.startLineNumber,i=t,o=Math.min(n,i);for(let r=o;r>=0;r--)this._invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new Nn(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){const t=e.startLineNumber-1;t>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){const n=e.lineNumber-1;n>=this._len||this._insertLines(e.lineNumber,t)}}class Zy extends st{constructor(e){super(),this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new Xy,this._tokenizationSupport=null,this._register(Nc.onDidChange(e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeContentFast(e=>{if(e.isFlush)this._resetTokenizationState();else{for(let t=0,n=e.changes.length;t<n;t++){const n=e.changes[t],[i]=Ly(n.text);this._tokenizationStateStore.applyEdits(n.range,i)}this._beginBackgroundTokenization()}})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=ew(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&b["j"](()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(){const e=this._textModel.getLineCount(),t=1,n=new My,i=dt.create(!1);let o=-1;while(this._hasLinesToTokenize()){if(i.elapsed()>t)break;if(o=this._tokenizeOneInvalidLine(n),o>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(n.tokens,!this._hasLinesToTokenize())}tokenizeViewport(e,t){const n=new My;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens,!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new My;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens,!this._hasLinesToTokenize())}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e<t||this._textModel.getLineLength(e)<2048)}_hasLinesToTokenize(){return!!this._tokenizationSupport&&this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationSupport)return;const n=this._textModel.getLanguageIdentifier(),i=this._textModel.getLineCount(),o=t-1;for(let r=this._tokenizationStateStore.invalidLineStartIndex;r<=o;r++){const t=this._textModel.getLineContent(r+1),o=this._tokenizationStateStore.getBeginState(r),s=tw(n,this._tokenizationSupport,t,!0,o);e.add(r+1,s.tokens),this._tokenizationStateStore.setEndState(i,r,s.endState),r=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,n){if(!this._tokenizationSupport)return;if(n<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex)return void this._updateTokensUntilLine(e,n);let i=this._textModel.getLineFirstNonWhitespaceColumn(t),o=[],r=null;for(let l=t-1;i>0&&l>=1;l--){let e=this._textModel.getLineFirstNonWhitespaceColumn(l);if(0!==e&&e<i){if(r=this._tokenizationStateStore.getBeginState(l-1),r)break;o.push(this._textModel.getLineContent(l)),i=e}}r||(r=this._tokenizationSupport.getInitialState());const s=this._textModel.getLanguageIdentifier();let a=r;for(let l=o.length-1;l>=0;l--){let e=tw(s,this._tokenizationSupport,o[l],!1,a);a=e.endState}for(let l=t;l<=n;l++){let t=this._textModel.getLineContent(l),n=tw(s,this._tokenizationSupport,t,!0,a);e.add(l,n.tokens),this._tokenizationStateStore.setFakeTokens(l-1),a=n.endState}}}function ew(e){const t=e.getLanguageIdentifier();let n=e.isTooLargeForTokenization()?null:Nc.get(t.language),i=null;if(n)try{i=n.getInitialState()}catch(o){Oe(o),n=null}return[n,i]}function tw(e,t,n,i,o){let r=null;if(t)try{r=t.tokenize2(n,i,o.clone(),0)}catch(s){Oe(s)}return r||(r=Pc(e.id,n,o,0)),gd.convertToEndOffset(r.tokens,n.length),r}function nw(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class iw{constructor(e,t,n,i=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=nw(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class ow{constructor(e,t,n,i){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=nw(Math.max(Math.min(1,t),0),3),this.l=nw(Math.max(Math.min(1,n),0),3),this.a=nw(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,o=e.a,r=Math.max(t,n,i),s=Math.min(t,n,i);let a=0,l=0;const c=(s+r)/2,h=r-s;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),r){case t:a=(n-i)/h+(n<i?6:0);break;case n:a=(i-t)/h+2;break;case i:a=(t-n)/h+4;break}a*=60,a=Math.round(a)}return new ow(a,l,c,o)}static _hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:o}=e;let r,s,a;if(0===n)r=s=a=i;else{const e=i<.5?i*(1+n):i+n-i*n,o=2*i-e;r=ow._hue2rgb(o,e,t+1/3),s=ow._hue2rgb(o,e,t),a=ow._hue2rgb(o,e,t-1/3)}return new iw(Math.round(255*r),Math.round(255*s),Math.round(255*a),o)}}class rw{constructor(e,t,n,i){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=nw(Math.max(Math.min(1,t),0),3),this.v=nw(Math.max(Math.min(1,n),0),3),this.a=nw(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,o=Math.max(t,n,i),r=Math.min(t,n,i),s=o-r,a=0===o?0:s/o;let l;return l=0===s?0:o===t?((n-i)/s%6+6)%6:o===n?(i-t)/s+2:(t-n)/s+4,new rw(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:o}=e,r=i*n,s=r*(1-Math.abs(t/60%2-1)),a=i-r;let[l,c,h]=[0,0,0];return t<60?(l=r,c=s):t<120?(l=s,c=r):t<180?(c=r,h=s):t<240?(c=s,h=r):t<300?(l=s,h=r):t<=360&&(l=r,h=s),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),h=Math.round(255*(h+a)),new iw(l,c,h,o)}}class sw{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof iw)this.rgba=e;else if(e instanceof ow)this._hsla=e,this.rgba=ow.toRGBA(e);else{if(!(e instanceof rw))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=rw.toRGBA(e)}}static fromHex(e){return sw.Format.CSS.parseHex(e)||sw.red}get hsla(){return this._hsla?this._hsla:ow.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:rw.fromRGBA(this.rgba)}equals(e){return!!e&&iw.equals(this.rgba,e.rgba)&&ow.equals(this.hsla,e.hsla)&&rw.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=sw._relativeLuminanceForComponent(this.rgba.r),t=sw._relativeLuminanceForComponent(this.rgba.g),n=sw._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*t+.0722*n;return nw(i,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t<n}lighten(e){return new sw(new ow(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new sw(new ow(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:n,b:i,a:o}=this.rgba;return new sw(new iw(t,n,i,o*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new sw(new iw(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=sw.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,n){if(e.isLighterThan(t))return e;n=n||.5;const i=e.getRelativeLuminance(),o=t.getRelativeLuminance();return n=n*(o-i)/o,e.lighten(n)}static getDarkerColor(e,t,n){if(e.isDarkerThan(t))return e;n=n||.5;const i=e.getRelativeLuminance(),o=t.getRelativeLuminance();return n=n*(i-o)/i,e.darken(n)}}sw.white=new sw(new iw(255,255,255,1)),sw.black=new sw(new iw(0,0,0,1)),sw.red=new sw(new iw(255,0,0,1)),sw.blue=new sw(new iw(0,0,255,1)),sw.cyan=new sw(new iw(0,255,255,1)),sw.lightgrey=new sw(new iw(211,211,211,1)),sw.transparent=new sw(new iw(0,0,0,0)),function(e){let t;(function(t){let n;(function(t){function n(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)}function i(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`}function o(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)}function r(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`}function s(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function a(e){return`#${s(e.rgba.r)}${s(e.rgba.g)}${s(e.rgba.b)}`}function l(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${s(t.rgba.r)}${s(t.rgba.g)}${s(t.rgba.b)}${s(Math.round(255*t.rgba.a))}`}function c(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)}function h(t){const n=t.length;if(0===n)return null;if(35!==t.charCodeAt(0))return null;if(7===n){const n=16*u(t.charCodeAt(1))+u(t.charCodeAt(2)),i=16*u(t.charCodeAt(3))+u(t.charCodeAt(4)),o=16*u(t.charCodeAt(5))+u(t.charCodeAt(6));return new e(new iw(n,i,o,1))}if(9===n){const n=16*u(t.charCodeAt(1))+u(t.charCodeAt(2)),i=16*u(t.charCodeAt(3))+u(t.charCodeAt(4)),o=16*u(t.charCodeAt(5))+u(t.charCodeAt(6)),r=16*u(t.charCodeAt(7))+u(t.charCodeAt(8));return new e(new iw(n,i,o,r/255))}if(4===n){const n=u(t.charCodeAt(1)),i=u(t.charCodeAt(2)),o=u(t.charCodeAt(3));return new e(new iw(16*n+n,16*i+i,16*o+o))}if(5===n){const n=u(t.charCodeAt(1)),i=u(t.charCodeAt(2)),o=u(t.charCodeAt(3)),r=u(t.charCodeAt(4));return new e(new iw(16*n+n,16*i+i,16*o+o,(16*r+r)/255))}return null}function u(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}t.formatRGB=n,t.formatRGBA=i,t.formatHSL=o,t.formatHSLA=r,t.formatHex=a,t.formatHexA=l,t.format=c,t.parseHex=h})(n=t.CSS||(t.CSS={}))})(t=e.Format||(e.Format={}))}(sw||(sw={}));const aw=new Array;class lw{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&0===t.length){let n=lw.cache[e];return n||(n=new lw(e,t),lw.cache[e]=n),n}return new lw(e,t)}static getEmpty(){return this.empty}add(e,t){const n=t.getKey(e);let i=n>>5;if(0===i){const e=1<<n|this.items;return e===this.items?this:lw.create(e,this.additionalItems)}i--;const o=this.additionalItems.slice(0);while(o.length<i)o.push(0);return o[i]|=1<<(31&n),lw.create(this.items,o)}merge(e){const t=this.items|e.items;if(this.additionalItems===aw&&e.additionalItems===aw)return t===this.items?this:t===e.items?e:lw.create(t,aw);const n=new Array;for(let i=0;i<Math.max(this.additionalItems.length,e.additionalItems.length);i++){const t=this.additionalItems[i]||0,o=e.additionalItems[i]||0;n.push(t|o)}return lw.create(t,n)}intersects(e){if(0!==(this.items&e.items))return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if(0!==(this.additionalItems[t]&e.additionalItems[t]))return!0;return!1}}lw.cache=new Array(129),lw.empty=lw.create(0,aw);const cw={getKey(e){return e}};class hw{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}const uw={ColorContribution:"base.contributions.colors"};class dw{constructor(){this._onDidChangeSchema=new bt,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,o){let r={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:o};this.colorsById[e]=r;let s={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n&&n.defaults){const e=n.defaults[t.type];return AC(e,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(e,t)=>{let n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}}const pw=new dw;function fw(e,t,n,i,o){return pw.registerColor(e,t,n,i,o)}Np.add(uw.ColorContribution,pw);const gw=fw("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},m("foreground","Overall foreground color. This color is only used if not overridden by a component.")),mw=(fw("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},m("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),fw("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},m("iconForeground","The default color for icons in the workbench.")),fw("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},m("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component."))),bw=fw("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},m("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),vw=fw("contrastActiveBorder",{light:null,dark:null,hc:mw},m("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),yw=(fw("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},m("textLinkForeground","Foreground color for links in text.")),fw("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},m("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),fw("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:sw.black},m("textCodeBlockBackground","Background color for code blocks in text.")),fw("widget.shadow",{dark:yC(sw.black,.36),light:yC(sw.black,.16),hc:null},m("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),ww=fw("input.background",{dark:"#3C3C3C",light:sw.white,hc:sw.black},m("inputBoxBackground","Input box background.")),_w=fw("input.foreground",{dark:gw,light:gw,hc:gw},m("inputBoxForeground","Input box foreground.")),Cw=fw("input.border",{dark:null,light:null,hc:bw},m("inputBoxBorder","Input box border.")),Aw=(fw("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:bw},m("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),fw("inputOption.activeBackground",{dark:yC(mw,.4),light:yC(mw,.2),hc:sw.transparent},m("inputOption.activeBackground","Background color of activated options in input fields.")),fw("inputOption.activeForeground",{dark:sw.white,light:sw.black,hc:null},m("inputOption.activeForeground","Foreground color of activated options in input fields.")),fw("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:sw.black},m("inputValidationInfoBackground","Input validation background color for information severity."))),Ew=fw("inputValidation.infoForeground",{dark:null,light:null,hc:null},m("inputValidationInfoForeground","Input validation foreground color for information severity.")),xw=fw("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:bw},m("inputValidationInfoBorder","Input validation border color for information severity.")),Sw=fw("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:sw.black},m("inputValidationWarningBackground","Input validation background color for warning severity.")),kw=fw("inputValidation.warningForeground",{dark:null,light:null,hc:null},m("inputValidationWarningForeground","Input validation foreground color for warning severity.")),Dw=fw("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:bw},m("inputValidationWarningBorder","Input validation border color for warning severity.")),Lw=fw("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:sw.black},m("inputValidationErrorBackground","Input validation background color for error severity.")),Iw=fw("inputValidation.errorForeground",{dark:null,light:null,hc:null},m("inputValidationErrorForeground","Input validation foreground color for error severity.")),Nw=fw("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:bw},m("inputValidationErrorBorder","Input validation border color for error severity.")),Mw=fw("dropdown.background",{dark:"#3C3C3C",light:sw.white,hc:sw.black},m("dropdownBackground","Dropdown background.")),Bw=fw("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:sw.white},m("dropdownForeground","Dropdown foreground.")),Tw=fw("button.foreground",{dark:sw.white,light:sw.white,hc:sw.white},m("buttonForeground","Button foreground color.")),Ow=fw("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},m("buttonBackground","Button background color.")),Rw=fw("button.hoverBackground",{dark:vC(Ow,.2),light:bC(Ow,.2),hc:null},m("buttonHoverBackground","Button background color when hovering.")),Pw=fw("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:sw.black},m("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Fw=fw("badge.foreground",{dark:sw.white,light:"#333",hc:sw.white},m("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),jw=fw("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},m("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),zw=fw("scrollbarSlider.background",{dark:sw.fromHex("#797979").transparent(.4),light:sw.fromHex("#646464").transparent(.4),hc:yC(bw,.6)},m("scrollbarSliderBackground","Scrollbar slider background color.")),Vw=fw("scrollbarSlider.hoverBackground",{dark:sw.fromHex("#646464").transparent(.7),light:sw.fromHex("#646464").transparent(.7),hc:yC(bw,.8)},m("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Qw=fw("scrollbarSlider.activeBackground",{dark:sw.fromHex("#BFBFBF").transparent(.4),light:sw.fromHex("#000000").transparent(.6),hc:bw},m("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),Ww=fw("progressBar.background",{dark:sw.fromHex("#0E70C0"),light:sw.fromHex("#0E70C0"),hc:bw},m("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Hw=fw("editorError.background",{dark:null,light:null,hc:null},m("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Uw=fw("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},m("editorError.foreground","Foreground color of error squigglies in the editor.")),Yw=fw("editorError.border",{dark:null,light:null,hc:sw.fromHex("#E47777").transparent(.8)},m("errorBorder","Border color of error boxes in the editor.")),Gw=fw("editorWarning.background",{dark:null,light:null,hc:null},m("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Kw=fw("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},m("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),qw=fw("editorWarning.border",{dark:null,light:null,hc:sw.fromHex("#FFCC00").transparent(.8)},m("warningBorder","Border color of warning boxes in the editor.")),Jw=fw("editorInfo.background",{dark:null,light:null,hc:null},m("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),$w=fw("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},m("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Xw=fw("editorInfo.border",{dark:null,light:null,hc:sw.fromHex("#3794FF").transparent(.8)},m("infoBorder","Border color of info boxes in the editor.")),Zw=fw("editorHint.foreground",{dark:sw.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},m("editorHint.foreground","Foreground color of hint squigglies in the editor.")),e_=fw("editorHint.border",{dark:null,light:null,hc:sw.fromHex("#eeeeee").transparent(.8)},m("hintBorder","Border color of hint boxes in the editor.")),t_=fw("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:sw.black},m("editorBackground","Editor background color.")),n_=fw("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:sw.white},m("editorForeground","Editor default foreground color.")),i_=fw("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},m("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),o_=fw("editorWidget.foreground",{dark:gw,light:gw,hc:gw},m("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),r_=fw("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:bw},m("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),s_=(fw("editorWidget.resizeBorder",{light:null,dark:null,hc:null},m("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),fw("quickInput.background",{dark:i_,light:i_,hc:i_},m("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette."))),a_=fw("quickInput.foreground",{dark:o_,light:o_,hc:o_},m("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),l_=fw("quickInputTitle.background",{dark:new sw(new iw(255,255,255,.105)),light:new sw(new iw(0,0,0,.06)),hc:"#000000"},m("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),c_=fw("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:sw.white},m("pickerGroupForeground","Quick picker color for grouping labels.")),h_=fw("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:sw.white},m("pickerGroupBorder","Quick picker color for grouping borders.")),u_=fw("keybindingLabel.background",{dark:new sw(new iw(128,128,128,.17)),light:new sw(new iw(221,221,221,.4)),hc:sw.transparent},m("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),d_=fw("keybindingLabel.foreground",{dark:sw.fromHex("#CCCCCC"),light:sw.fromHex("#555555"),hc:sw.white},m("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),p_=fw("keybindingLabel.border",{dark:new sw(new iw(51,51,51,.6)),light:new sw(new iw(204,204,204,.4)),hc:new sw(new iw(111,195,223))},m("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),f_=fw("keybindingLabel.bottomBorder",{dark:new sw(new iw(68,68,68,.6)),light:new sw(new iw(187,187,187,.4)),hc:new sw(new iw(111,195,223))},m("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),g_=fw("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},m("editorSelectionBackground","Color of the editor selection.")),m_=fw("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},m("editorSelectionForeground","Color of the selected text for high contrast.")),b_=fw("editor.inactiveSelectionBackground",{light:yC(g_,.5),dark:yC(g_,.5),hc:yC(g_,.5)},m("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),v_=fw("editor.selectionHighlightBackground",{light:CC(g_,t_,.3,.6),dark:CC(g_,t_,.3,.6),hc:null},m("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),y_=(fw("editor.selectionHighlightBorder",{light:null,dark:null,hc:vw},m("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),fw("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},m("editorFindMatch","Color of the current search match.")),fw("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},m("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),w_=(fw("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},m("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),fw("editor.findMatchBorder",{light:null,dark:null,hc:vw},m("editorFindMatchBorder","Border color of the current search match.")),fw("editor.findMatchHighlightBorder",{light:null,dark:null,hc:vw},m("findMatchHighlightBorder","Border color of the other search matches.")),fw("editor.findRangeHighlightBorder",{dark:null,light:null,hc:yC(vw,.4)},m("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),fw("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},m("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),fw("editorHoverWidget.background",{light:i_,dark:i_,hc:i_},m("hoverBackground","Background color of the editor hover."))),__=(fw("editorHoverWidget.foreground",{light:o_,dark:o_,hc:o_},m("hoverForeground","Foreground color of the editor hover.")),fw("editorHoverWidget.border",{light:r_,dark:r_,hc:r_},m("hoverBorder","Border color of the editor hover.")),fw("editorHoverWidget.statusBarBackground",{dark:vC(w_,.2),light:bC(w_,.05),hc:i_},m("statusBarBackground","Background color of the editor hover status bar.")),fw("editorLink.activeForeground",{dark:"#4E94CE",light:sw.blue,hc:sw.cyan},m("activeLinkForeground","Color of active links.")),fw("editorInlayHint.foreground",{dark:yC(Fw,.8),light:yC(Fw,.8),hc:Fw},m("editorInlayHintForeground","Foreground color of inline hints"))),C_=fw("editorInlayHint.background",{dark:yC(Pw,.6),light:yC(Pw,.3),hc:Pw},m("editorInlayHintBackground","Background color of inline hints")),A_=(fw("editorInlayHint.typeForeground",{dark:__,light:__,hc:__},m("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),fw("editorInlayHint.typeBackground",{dark:C_,light:C_,hc:C_},m("editorInlayHintBackgroundTypes","Background color of inline hints for types")),fw("editorInlayHint.parameterForeground",{dark:__,light:__,hc:__},m("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),fw("editorInlayHint.parameterBackground",{dark:C_,light:C_,hc:C_},m("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),fw("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},m("editorLightBulbForeground","The color used for the lightbulb actions icon.")),fw("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),new sw(new iw(155,185,85,.2))),E_=new sw(new iw(255,0,0,.2)),x_=fw("diffEditor.insertedTextBackground",{dark:A_,light:A_,hc:null},m("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),S_=fw("diffEditor.removedTextBackground",{dark:E_,light:E_,hc:null},m("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),k_=fw("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},m("diffEditorInsertedOutline","Outline color for the text that got inserted.")),D_=fw("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},m("diffEditorRemovedOutline","Outline color for text that got removed.")),L_=fw("diffEditor.border",{dark:null,light:null,hc:bw},m("diffEditorBorder","Border color between the two text editors.")),I_=fw("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},m("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),N_=fw("list.focusBackground",{dark:null,light:null,hc:null},m("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),M_=fw("list.focusForeground",{dark:null,light:null,hc:null},m("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),B_=fw("list.focusOutline",{dark:mw,light:mw,hc:vw},m("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),T_=fw("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},m("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),O_=fw("list.activeSelectionForeground",{dark:sw.white,light:sw.white,hc:null},m("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),R_=fw("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},m("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),P_=fw("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},m("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),F_=fw("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},m("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),j_=fw("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},m("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),z_=fw("list.inactiveFocusBackground",{dark:null,light:null,hc:null},m("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),V_=fw("list.inactiveFocusOutline",{dark:null,light:null,hc:null},m("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Q_=fw("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},m("listHoverBackground","List/Tree background when hovering over items using the mouse.")),W_=fw("list.hoverForeground",{dark:null,light:null,hc:null},m("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),H_=fw("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},m("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),U_=fw("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:mw},m("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Y_=(fw("list.focusHighlightForeground",{dark:U_,light:_C(T_,U_,"#9DDDFF"),hc:U_},m("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),fw("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:sw.black},m("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."))),G_=fw("listFilterWidget.outline",{dark:sw.transparent,light:sw.transparent,hc:"#f38518"},m("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),K_=fw("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:bw},m("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),q_=fw("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},m("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),J_=fw("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},m("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),$_=fw("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,m("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),X_=fw("quickInputList.focusForeground",{dark:O_,light:O_,hc:O_},m("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),Z_=fw("quickInputList.focusIconForeground",{dark:R_,light:R_,hc:R_},m("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),eC=fw("quickInputList.focusBackground",{dark:wC($_,T_),light:wC($_,T_),hc:null},m("quickInput.listFocusBackground","Quick picker background color for the focused item.")),tC=fw("menu.border",{dark:null,light:null,hc:bw},m("menuBorder","Border color of menus.")),nC=fw("menu.foreground",{dark:Bw,light:gw,hc:Bw},m("menuForeground","Foreground color of menu items.")),iC=fw("menu.background",{dark:Mw,light:Mw,hc:Mw},m("menuBackground","Background color of menu items.")),oC=fw("menu.selectionForeground",{dark:O_,light:O_,hc:O_},m("menuSelectionForeground","Foreground color of the selected menu item in menus.")),rC=fw("menu.selectionBackground",{dark:T_,light:T_,hc:T_},m("menuSelectionBackground","Background color of the selected menu item in menus.")),sC=fw("menu.selectionBorder",{dark:null,light:null,hc:vw},m("menuSelectionBorder","Border color of the selected menu item in menus.")),aC=fw("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:bw},m("menuSeparatorBackground","Color of a separator menu item in menus.")),lC=(fw("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},m("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),fw("editor.snippetTabstopHighlightBackground",{dark:new sw(new iw(124,124,124,.3)),light:new sw(new iw(10,50,100,.2)),hc:new sw(new iw(124,124,124,.3))},m("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),fw("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},m("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),fw("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},m("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),fw("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new sw(new iw(10,50,100,.5)),hc:"#525252"},m("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),fw("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},m("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),fw("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},m("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),fw("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},m("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),fw("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},m("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),fw("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},m("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0)),cC=fw("minimap.errorHighlight",{dark:new sw(new iw(255,18,18,.7)),light:new sw(new iw(255,18,18,.7)),hc:new sw(new iw(255,50,50,1))},m("minimapError","Minimap marker color for errors.")),hC=fw("minimap.warningHighlight",{dark:Kw,light:Kw,hc:qw},m("overviewRuleWarning","Minimap marker color for warnings.")),uC=fw("minimap.background",{dark:null,light:null,hc:null},m("minimapBackground","Minimap background color.")),dC=fw("minimap.foregroundOpacity",{dark:sw.fromHex("#000f"),light:sw.fromHex("#000f"),hc:sw.fromHex("#000f")},m("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),pC=fw("minimapSlider.background",{light:yC(zw,.5),dark:yC(zw,.5),hc:yC(zw,.5)},m("minimapSliderBackground","Minimap slider background color.")),fC=fw("minimapSlider.hoverBackground",{light:yC(Vw,.5),dark:yC(Vw,.5),hc:yC(Vw,.5)},m("minimapSliderHoverBackground","Minimap slider background color when hovering.")),gC=fw("minimapSlider.activeBackground",{light:yC(Qw,.5),dark:yC(Qw,.5),hc:yC(Qw,.5)},m("minimapSliderActiveBackground","Minimap slider background color when clicked on."));fw("problemsErrorIcon.foreground",{dark:Uw,light:Uw,hc:Uw},m("problemsErrorIconForeground","The color used for the problems error icon.")),fw("problemsWarningIcon.foreground",{dark:Kw,light:Kw,hc:Kw},m("problemsWarningIconForeground","The color used for the problems warning icon.")),fw("problemsInfoIcon.foreground",{dark:$w,light:$w,hc:$w},m("problemsInfoIconForeground","The color used for the problems info icon."));function mC(e,t){var n,i,o;switch(e.op){case 0:return null===(n=AC(e.value,t))||void 0===n?void 0:n.darken(e.factor);case 1:return null===(i=AC(e.value,t))||void 0===i?void 0:i.lighten(e.factor);case 2:return null===(o=AC(e.value,t))||void 0===o?void 0:o.transparent(e.factor);case 3:for(const n of e.values){const e=AC(n,t);if(e)return e}return;case 5:return AC(t.defines(e.if)?e.then:e.else,t);case 4:const r=AC(e.value,t);if(!r)return;const s=AC(e.background,t);return s?r.isDarkerThan(s)?sw.getLighterColor(r,s,e.factor).transparent(e.transparency):sw.getDarkerColor(r,s,e.factor).transparent(e.transparency):r.transparent(e.factor*e.transparency);default:throw ba(e)}}function bC(e,t){return{op:0,value:e,factor:t}}function vC(e,t){return{op:1,value:e,factor:t}}function yC(e,t){return{op:2,value:e,factor:t}}function wC(...e){return{op:3,values:e}}function _C(e,t,n){return{op:5,if:e,then:t,else:n}}function CC(e,t,n,i){return{op:4,value:e,background:t,factor:n,transparency:i}}function AC(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?sw.fromHex(e):t.getColor(e):e instanceof sw?e:"object"===typeof e?mC(e,t):void 0}const EC="vscode://schemas/workbench-colors";let xC=Np.as(Mp.JSONContribution);xC.registerSchema(EC,pw.getColorSchema());const SC=new uo(()=>xC.notifySchemaChanged(EC),200);pw.onDidChangeSchema(()=>{SC.isScheduled()||SC.schedule()});const kC=fw("editor.lineHighlightBackground",{dark:null,light:null,hc:null},m("lineHighlight","Background color for the highlight of line at the cursor position.")),DC=fw("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},m("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),LC=fw("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},m("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),IC=fw("editor.rangeHighlightBorder",{dark:null,light:null,hc:vw},m("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),NC=fw("editor.symbolHighlightBackground",{dark:y_,light:y_,hc:null},m("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),MC=fw("editor.symbolHighlightBorder",{dark:null,light:null,hc:vw},m("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),BC=fw("editorCursor.foreground",{dark:"#AEAFAD",light:sw.black,hc:sw.white},m("caret","Color of the editor cursor.")),TC=fw("editorCursor.background",null,m("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),OC=fw("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},m("editorWhitespaces","Color of whitespace characters in the editor.")),RC=fw("editorIndentGuide.background",{dark:OC,light:OC,hc:OC},m("editorIndentGuides","Color of the editor indentation guides.")),PC=fw("editorIndentGuide.activeBackground",{dark:OC,light:OC,hc:OC},m("editorActiveIndentGuide","Color of the active editor indentation guides.")),FC=fw("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:sw.white},m("editorLineNumbers","Color of editor line numbers.")),jC=fw("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:vw},m("editorActiveLineNumber","Color of editor active line number"),!1,m("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),zC=fw("editorLineNumber.activeForeground",{dark:jC,light:jC,hc:jC},m("editorActiveLineNumber","Color of editor active line number")),VC=fw("editorRuler.foreground",{dark:"#5A5A5A",light:sw.lightgrey,hc:sw.white},m("editorRuler","Color of the editor rulers.")),QC=(fw("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},m("editorCodeLensForeground","Foreground color of editor CodeLens")),fw("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},m("editorBracketMatchBackground","Background color behind matching brackets")),fw("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:bw},m("editorBracketMatchBorder","Color for matching brackets boxes")),fw("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},m("editorOverviewRulerBorder","Color of the overview ruler border."))),WC=fw("editorOverviewRuler.background",null,m("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),HC=fw("editorGutter.background",{dark:t_,light:t_,hc:t_},m("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),UC=fw("editorUnnecessaryCode.border",{dark:null,light:null,hc:sw.fromHex("#fff").transparent(.8)},m("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),YC=fw("editorUnnecessaryCode.opacity",{dark:sw.fromHex("#000a"),light:sw.fromHex("#0007"),hc:null},m("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),GC=(fw("editorGhostText.border",{dark:null,light:null,hc:sw.fromHex("#fff").transparent(.8)},m("editorGhostTextBorder","Border color of ghost text in the editor.")),fw("editorGhostText.foreground",{dark:sw.fromHex("#ffffff56"),light:sw.fromHex("#0007"),hc:null},m("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),new sw(new iw(0,122,204,.6))),KC=(fw("editorOverviewRuler.rangeHighlightForeground",{dark:GC,light:GC,hc:GC},m("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),fw("editorOverviewRuler.errorForeground",{dark:new sw(new iw(255,18,18,.7)),light:new sw(new iw(255,18,18,.7)),hc:new sw(new iw(255,50,50,1))},m("overviewRuleError","Overview ruler marker color for errors."))),qC=fw("editorOverviewRuler.warningForeground",{dark:Kw,light:Kw,hc:qw},m("overviewRuleWarning","Overview ruler marker color for warnings.")),JC=fw("editorOverviewRuler.infoForeground",{dark:$w,light:$w,hc:Xw},m("overviewRuleInfo","Overview ruler marker color for infos.")),$C=fw("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},m("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),XC=fw("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},m("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),ZC=fw("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},m("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),eA=fw("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),tA=fw("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),nA=fw("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),iA=fw("editorBracketHighlight.unexpectedBracket.foreground",{dark:new sw(new iw(255,18,18,.8)),light:new sw(new iw(255,18,18,.8)),hc:new sw(new iw(255,50,50,1))},m("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));Mm((e,t)=>{const n=e.getColor(t_);n&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${n}; }`);const i=e.getColor(n_);i&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${i}; }`);const o=e.getColor(HC);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const r=e.getColor(LC);r&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${r}; }`);const s=e.getColor(IC);s&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${s}; }`);const a=e.getColor(NC);a&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=e.getColor(MC);l&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${l}; }`);const c=e.getColor(OC);c&&(t.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))});class oA{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function rA(e,t,n,i){return e!==n?cA(n-e,i):cA(0,i-t)}const sA=0;function aA(e){return 0===e}const lA=Math.pow(2,26);function cA(e,t){return e*lA+t}function hA(e){const t=e,n=Math.floor(t/lA),i=t-n*lA;return new oA(n,i)}function uA(e){return Math.floor(e/lA)}function dA(e){return e}function pA(e,t){return t<lA?e+t:e-e%lA+t}function fA(e,t){const n=e,i=t,o=i-n;if(o<=0)return sA;const r=Math.floor(n/lA),s=Math.floor(i/lA),a=i-s*lA;if(r===s){const e=n-r*lA;return cA(0,a-e)}return cA(s-r,a)}function gA(e,t){return e<t}function mA(e,t){return e<=t}function bA(e,t){return e>=t}function vA(e){return cA(e.lineNumber-1,e.column-1)}function yA(e,t){const n=e,i=Math.floor(n/lA),o=n-i*lA,r=t,s=Math.floor(r/lA),a=r-s*lA;return new Mn(i+1,o+1,s+1,a+1)}function wA(e){const t=Wr(e);return cA(t.length-1,t[t.length-1].length)}function _A(e){return e}class CA{constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}}class AA{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(e=>EA.from(e))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):this.documentLength;return fA(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?cA(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):cA(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=hA(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?cA(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):cA(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){while(this.nextEditIdx<this.edits.length){const t=this.edits[this.nextEditIdx],n=this.translateOldToCur(t.endOffsetAfterObj);if(!mA(n,e))break;{this.nextEditIdx++;const e=hA(n),i=hA(this.translateOldToCur(t.endOffsetBeforeObj)),o=e.lineCount-i.lineCount;this.deltaOldToNewLineCount+=o;const r=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,s=e.columnCount-i.columnCount;this.deltaOldToNewColumnCount=r+s,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}}}}class EA{constructor(e,t,n){this.endOffsetBeforeObj=hA(t),this.endOffsetAfterObj=hA(pA(e,n)),this.offsetObj=hA(e)}static from(e){return new EA(e.startOffset,e.endOffset,e.newLength)}}class xA{constructor(e){this._length=e}get length(){return this._length}}class SA extends xA{constructor(e,t,n,i,o){super(e),this.openingBracket=t,this.child=n,this.closingBracket=i,this.missingOpeningBracketIds=o}static create(e,t,n){let i=e.length;return t&&(i=pA(i,t.length)),n&&(i=pA(i,n.length)),new SA(i,e,t,n,t?t.missingOpeningBracketIds:lw.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e,t){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new SA(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}}class kA extends xA{constructor(e,t,n){super(e),this.listHeight=t,this._missingOpeningBracketIds=n}static create23(e,t,n,i=!1){let o=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=pA(o,t.length),r=r.merge(t.missingOpeningBracketIds),n){if(e.listHeight!==n.listHeight)throw new Error("Invalid list heights");o=pA(o,n.length),r=r.merge(n.missingOpeningBracketIds)}return i?new LA(o,e.listHeight+1,e,t,n,r):new DA(o,e.listHeight+1,e,t,n,r)}static getEmpty(){return new NA(sA,0,[],lw.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),n=4===t.kind?t.toMutable():t;return t!==n&&this.setChild(e-1,n),n}makeFirstElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(0),n=4===t.kind?t.toMutable():t;return t!==n&&this.setChild(0,n),n}canBeReused(e,t){if(e.intersects(this.missingOpeningBracketIds))return!1;let n,i=this;while(4===i.kind&&(n=i.childrenLength)>0)i=i.getChild(n-1);return i.canBeReused(e,t)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let i=1;i<e;i++){const e=this.getChild(i);t=pA(t,e.length),n=n.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=n}}class DA extends kA{constructor(e,t,n,i,o,r){super(e,t,r),this._item1=n,this._item2=i,this._item3=o}get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:return void(this._item1=t);case 1:return void(this._item2=t);case 2:return void(this._item3=t)}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new DA(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class LA extends DA{toMutable(){return new DA(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class IA extends kA{constructor(e,t,n,i){super(e,t,i),this._children=n}get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new IA(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class NA extends IA{toMutable(){return new IA(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const MA=[];class BA extends xA{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return MA}deepClone(){return this}}class TA extends BA{get kind(){return 0}get missingOpeningBracketIds(){return lw.getEmpty()}canBeReused(e,t){return!t}}class OA extends BA{constructor(e){super(e)}static create(e){const t=_A(e),n=OA.cacheByLength.get(t);if(n)return n;const i=new OA(e);return OA.cacheByLength.set(t,i),i}get kind(){return 1}get missingOpeningBracketIds(){return lw.getEmpty()}canBeReused(e,t){return!1}}OA.cacheByLength=new Map;class RA extends BA{constructor(e,t){super(t),this.missingOpeningBracketIds=e}get kind(){return 3}canBeReused(e,t){return!e.intersects(this.missingOpeningBracketIds)}}class PA{constructor(e,t,n,i,o){this.length=e,this.kind=t,this.bracketId=n,this.bracketIds=i,this.astNode=o}}class FA{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new jA(this.textModel,this.bracketTokens),this._offset=sA,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return cA(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=pA(this._offset,e);const t=hA(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=pA(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class jA{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=dA(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;while(n<1e3){const i=this.lineTokens,o=i.getCount();let r=null;if(this.lineTokenOffset<o){const s=i.getMetadata(this.lineTokenOffset);while(this.lineTokenOffset+1<o&&s===i.getMetadata(this.lineTokenOffset+1))this.lineTokenOffset++;const a=0===Zl.getTokenType(s),l=i.getEndOffset(this.lineTokenOffset);if(a&&l!==this.lineCharOffset){const e=i.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,l),n=this.bracketTokens.getSingleLanguageBracketTokens(e),o=n.regExpGlobal;if(o){o.lastIndex=0;const e=o.exec(t);e&&(r=n.getToken(e[0]),r&&(this.lineCharOffset+=e.index))}}if(n+=l-this.lineCharOffset,r){if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=r;break}return this.lineCharOffset+=dA(r.length),r}this.lineTokenOffset++,this.lineCharOffset=l}else{if(this.lineIdx===this.textBufferLineCount-1)break;this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,n++}}const i=rA(e,t,this.lineIdx,this.lineCharOffset);return new PA(i,0,-1,lw.getEmpty(),new TA(i))}}class zA{constructor(e,t){this.text=e,this._offset=sA,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(t.getRegExpStr()+"|\n","g"):null,o=[];let r,s=0,a=0,l=0,c=0;const h=new Array;for(let p=0;p<60;p++)h.push(new PA(cA(0,p),0,-1,lw.getEmpty(),new TA(cA(0,p))));const u=new Array;for(let p=0;p<60;p++)u.push(new PA(cA(1,p),0,-1,lw.getEmpty(),new TA(cA(1,p))));if(i){i.lastIndex=0;while(null!==(r=i.exec(e))){const e=r.index,n=r[0];if("\n"===n)s++,a=e+1;else{if(l!==e){let t;if(c===s){const n=e-l;if(n<h.length)t=h[n];else{const e=cA(0,n);t=new PA(e,0,-1,lw.getEmpty(),new TA(e))}}else{const n=s-c,i=e-a;if(1===n&&i<u.length)t=u[i];else{const e=cA(n,i);t=new PA(e,0,-1,lw.getEmpty(),new TA(e))}}o.push(t)}o.push(t.getToken(n)),l=e+n.length,c=s}}}const d=e.length;if(l!==d){const e=c===s?cA(0,d-l):cA(s-c,d-a);o.push(new PA(e,0,-1,lw.getEmpty(),new TA(e)))}this.length=cA(s,d-a),this.tokens=o}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new We}}class VA{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function n(e,n){return t.getKey(`${e}:::${n}`)}const i=[...Wh.getColorizedBracketPairs(e)],o=new Map,r=new Set;for(const[a,l]of i){r.add(a);let t=o.get(l);const i=n(e,a);t||(t={openingBrackets:lw.getEmpty(),first:i},o.set(l,t)),t.openingBrackets=t.openingBrackets.add(i,cw)}const s=new Map;for(const[a,l]of o){const e=cA(0,a.length);s.set(a,new PA(e,2,l.first,l.openingBrackets,OA.create(e)))}for(const a of r){const t=cA(0,a.length),i=n(e,a);s.set(a,new PA(t,1,i,lw.getEmpty().add(i,cw),OA.create(t)))}return new VA(s)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(e=>Rr(e)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}get isEmpty(){return 0===this.map.size}}class QA{constructor(e){this.denseKeyProvider=e,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const n=VA.createFromLanguage(e,this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==n}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=VA.createFromLanguage(e,this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function WA(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function n(){if(t>=e.length)return null;const n=t,i=e[n].listHeight;t++;while(t<e.length&&e[t].listHeight===i)t++;return t-n>=2?HA(0===n&&t===e.length?e:e.slice(n,t),!1):e[n]}let i=n(),o=n();if(!o)return i;for(let s=n();s;s=n())UA(i,o)<=UA(o,s)?(i=YA(i,o),o=s):o=YA(o,s);const r=YA(i,o);return r}function HA(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let n=e.length;while(n>3){const i=n>>1;for(let o=0;o<i;o++){const i=o<<1;e[o]=kA.create23(e[i],e[i+1],i+3===n?e[i+2]:null,t)}n=i}return kA.create23(e[0],e[1],n>=3?e[2]:null,t)}function UA(e,t){return Math.abs(e.listHeight-t.listHeight)}function YA(e,t){return e.listHeight===t.listHeight?kA.create23(e,t,null,!1):e.listHeight>t.listHeight?GA(e,t):KA(t,e)}function GA(e,t){e=e.toMutable();let n=e;const i=new Array;let o;while(1){if(t.listHeight===n.listHeight){o=t;break}if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeLastElementMutable()}for(let r=i.length-1;r>=0;r--){const e=i[r];o?e.childrenLength>=3?o=kA.create23(e.unappendChild(),o,null,!1):(e.appendChildOfSameHeight(o),o=void 0):e.handleChildrenChanged()}return o?kA.create23(e,o,null,!1):e}function KA(e,t){e=e.toMutable();let n=e;const i=new Array;while(t.listHeight!==n.listHeight){if(4!==n.kind)throw new Error("unexpected");i.push(n),n=n.makeFirstElementMutable()}let o=t;for(let r=i.length-1;r>=0;r--){const e=i[r];o?e.childrenLength>=3?o=kA.create23(o,e.unprependChild(),null,!1):(e.prependChildOfSameHeight(o),o=void 0):e.handleChildrenChanged()}return o?kA.create23(o,e,null,!1):e}class qA{constructor(e){this.lastOffset=sA,this.nextNodes=[e],this.offsets=[sA],this.idxs=[]}readLongestNodeAt(e,t){if(gA(e,this.lastOffset))throw new Error("Invalid offset");this.lastOffset=e;while(1){const n=$A(this.nextNodes);if(!n)return;const i=$A(this.offsets);if(gA(e,i))return;if(gA(i,e))if(pA(i,n.length)<=e)this.nextNodeAfterCurrent();else{const e=JA(n);-1!==e?(this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const e=JA(n);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(n.getChild(e)),this.offsets.push(i),this.idxs.push(e)}}}}nextNodeAfterCurrent(){while(1){const e=$A(this.offsets),t=$A(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const n=$A(this.nextNodes),i=JA(n,this.idxs[this.idxs.length-1]);if(-1!==i){this.nextNodes.push(n.getChild(i)),this.offsets.push(pA(e,t.length)),this.idxs[this.idxs.length-1]=i;break}this.idxs.pop()}}}function JA(e,t=-1){while(1){if(t++,t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function $A(e){return e.length>0?e[e.length-1]:void 0}function XA(e,t,n,i){const o=new ZA(e,t,n,i);return o.parseDocument()}class ZA{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new qA(n):void 0,this.positionMapper=new AA(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(lw.getEmpty());return e||(e=kA.getEmpty()),e}parseList(e){const t=new Array;while(1){const n=this.tokenizer.peek();if(!n||2===n.kind&&n.bracketIds.intersects(e))break;const i=this.parseChild(e);4===i.kind&&0===i.childrenLength||t.push(i)}const n=this.oldNodeReader?WA(t):HA(t,this.createImmutableLists);return n}parseChild(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!aA(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),n=>{if(!mA(n.length,t))return!1;const i=uA(n.length)===uA(t),o=n.canBeReused(e,i);return o});if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new RA(t.bracketIds,t.length);case 0:return t.astNode;case 1:const n=e.merge(t.bracketIds),i=this.parseList(n),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===t.bracketId||o.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),SA.create(t.astNode,i,o.astNode)):SA.create(t.astNode,i,null);default:throw new Error("unexpected")}}}class eE extends st{constructor(e){super(),this.textModel=e,this.didChangeDecorationsEmitter=new bt,this.cache=this._register(new at),this.bracketsRequested=!1,this.options=e.getOptions().bracketPairColorizationOptions,this._register(Wh.onDidChange(e=>{var t;(null===(t=this.cache.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageIdentifier.id))&&(this.cache.clear(),this.updateCache())})),this._register(e.onDidChangeOptions(t=>{this.options=e.getOptions().bracketPairColorizationOptions,this.cache.clear(),this.updateCache()})),this._register(e.onDidChangeLanguage(e=>{this.cache.clear(),this.updateCache()})),this._register(e.onDidChangeAttached(()=>{this.updateCache()}))}get isDocumentSupported(){const e=5e6;return this.textModel.getValueLength()<=e}updateCache(){if(this.bracketsRequested||this.textModel.isAttachedToEditor()&&this.isDocumentSupported&&this.options.enabled){if(!this.cache.value){const e=new rt;this.cache.value=tE(e.add(new nE(this.textModel)),e),e.add(this.cache.value.object.onDidChangeDecorations(e=>this.didChangeDecorationsEmitter.fire(e))),this.didChangeDecorationsEmitter.fire()}}else this.cache.clear(),this.didChangeDecorationsEmitter.fire()}handleContentChanged(e){var t;null===(t=this.cache.value)||void 0===t||t.object.handleContentChanged(e)}getDecorationsInRange(e,t,n){var i;return void 0===t?[]:this.options.enabled&&(null===(i=this.cache.value)||void 0===i?void 0:i.object.getDecorationsInRange(e,t,n))||[]}getAllDecorations(e,t){var n;return void 0===e?[]:this.options.enabled&&(null===(n=this.cache.value)||void 0===n?void 0:n.object.getAllDecorations(e,t))||[]}onDidChangeDecorations(e){return this.didChangeDecorationsEmitter.event(e)}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateCache(),(null===(t=this.cache.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e))||[]}}function tE(e,t){return{object:e,dispose:()=>null===t||void 0===t?void 0:t.dispose()}}class nE extends st{constructor(e){if(super(),this.textModel=e,this.didChangeDecorationsEmitter=new bt,this.colorProvider=new sE,this.denseKeyProvider=new hw,this.brackets=new QA(this.denseKeyProvider),this.onDidChangeDecorations=this.didChangeDecorationsEmitter.event,this._register(e.onBackgroundTokenizationStateChanged(()=>{if(2===e.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeDecorationsEmitter.fire()}})),this._register(e.onDidChangeTokens(({ranges:e})=>{const t=e.map(e=>new CA(cA(e.fromLineNumber-1,0),cA(e.toLineNumber,0),cA(e.toLineNumber-e.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeDecorationsEmitter.fire()})),0===e.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageIdentifier().id),t=new zA(this.textModel.getValue(),e);this.initialAstWithoutTokens=XA(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else 2===e.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):1===e.backgroundTokenizationState&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleContentChanged(e){const t=e.changes.map(e=>{const t=Mn.lift(e.range);return new CA(vA(t.getStartPosition()),vA(t.getEndPosition()),wA(e.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,n){const i=!1,o=i?null===t||void 0===t?void 0:t.deepClone():t,r=new FA(this.textModel,this.brackets),s=XA(r,e,o,n);return s}getBracketsInRange(e){const t=cA(e.startLineNumber-1,e.startColumn-1),n=cA(e.endLineNumber-1,e.endColumn-1),i=new Array,o=this.initialAstWithoutTokens||this.astWithTokens;return iE(o,sA,o.length,t,n,i),i}getDecorationsInRange(e,t,n){const i=new Array,o=this.getBracketsInRange(e);for(const r of o)i.push({id:"bracket"+r.hash(),options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r)},ownerId:0,range:r.range});return i}getAllDecorations(e,t){return this.getDecorationsInRange(new Mn(1,1,this.textModel.getLineCount(),1),e,t)}getBracketPairsInRange(e){const t=new Array,n=vA(e.getStartPosition()),i=vA(e.getEndPosition()),o=this.initialAstWithoutTokens||this.astWithTokens;return oE(o,sA,o.length,n,i,t),t}}function iE(e,t,n,i,o,r,s=0){if(1===e.kind){const e=yA(t,n);r.push(new rE(e,s-1,!1))}else if(3===e.kind){const e=yA(t,n);r.push(new rE(e,s-1,!0))}else if(4===e.kind)for(const a of e.children)n=pA(t,a.length),mA(t,o)&&bA(n,i)&&iE(a,t,n,i,o,r,s),t=n;else if(2===e.kind){s++;{const a=e.openingBracket;n=pA(t,a.length),mA(t,o)&&bA(n,i)&&iE(a,t,n,i,o,r,s),t=n}if(e.child){const a=e.child;n=pA(t,a.length),mA(t,o)&&bA(n,i)&&iE(a,t,n,i,o,r,s),t=n}if(e.closingBracket){const a=e.closingBracket;n=pA(t,a.length),mA(t,o)&&bA(n,i)&&iE(a,t,n,i,o,r,s),t=n}}}function oE(e,t,n,i,o,r,s=0){var a;if(2===e.kind){const i=pA(t,e.openingBracket.length);r.push(new Xa(yA(t,n),yA(t,i),e.closingBracket?yA(pA(i,(null===(a=e.child)||void 0===a?void 0:a.length)||sA),n):void 0,s)),s++}let l=t;for(const c of e.children){const e=l;l=pA(l,c.length),mA(e,o)&&mA(i,l)&&oE(c,e,l,i,o,r,s)}}class rE{constructor(e,t,n){this.range=e,this.level=t,this.isInvalid=n}hash(){return`${this.range.toString()}-${this.level}`}}class sE{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.level)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}Mm((e,t)=>{const n=[$C,XC,ZC,eA,tA,nA],i=new sE;t.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${e.getColor(iA)}; }`);let o=n.map(t=>e.getColor(t)).filter(e=>!!e).filter(e=>!e.isTransparent());for(let r=0;r<30;r++){const e=o[r%o.length];t.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(r)} { color: ${e}; }`)}});class aE{static visibleColumnFromColumn(e,t,n){const i=e.length,o=t-1<i?t-1:i;let r=0,s=0;while(s<o){const t=ls(e,o,s);if(s+=t>=65536?2:1,9===t)r=aE.nextRenderTabStop(r,n);else{let n=Ss(t);while(s<o){const t=ls(e,o,s),i=Ss(t);if(ks(n,i))break;s+=t>=65536?2:1,n=i}_s(t)||Cs(t)?r+=2:r+=1}}return r}static visibleColumnsByColumns(e,t){const n=e.length;let i=new Array;i.push(-1);let o=0,r=0;while(r<n){const s=ls(e,n,r);if(r+=s>=65536?2:1,i.push(o),s>=65536&&i.push(o),9===s)o=aE.nextRenderTabStop(o,t);else{let t=Ss(s);while(r<n){const a=ls(e,n,r),l=Ss(a);if(ks(t,l))break;r+=a>=65536?2:1,i.push(o),s>=65536&&i.push(o),t=l}_s(s)||Cs(s)?o+=2:o+=1}}return i.push(o),i}static visibleColumnFromColumn2(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length;let o=0,r=1,s=0;while(s<i){const a=ls(e,i,s);let l;if(s+=a>=65536?2:1,9===a)l=aE.nextRenderTabStop(o,n);else{let t=Ss(a);while(s<i){const n=ls(e,i,s),o=Ss(n);if(ks(t,o))break;s+=n>=65536?2:1,t=o}l=_s(a)||Cs(a)?o+2:o+1}const c=s+1;if(l>=t){const e=t-o,n=l-t;return n<e?c:r}o=l,r=c}return i+1}static columnFromVisibleColumn2(e,t,n,i){let o=this.columnFromVisibleColumn(t.getLineContent(n),i,e.tabSize),r=t.getLineMinColumn(n);if(o<r)return r;let s=t.getLineMaxColumn(n);return o>s?s:o}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}function lE(){return new Qy}function cE(e){const t=lE();return t.acceptChunk(e),t.finish()}function hE(e,t){const n="string"===typeof e?cE(e):e;return n.create(t)}let uE=0;const dE=999,pE=1e4;class fE{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,n=0;do{let i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}while(1)}}const gE=()=>{throw new Error("Invalid change accessor")};class mE{constructor(){this._searchCanceledBrand=void 0}}function bE(e){return e instanceof mE?null:e}mE.INSTANCE=new mE;class vE extends st{constructor(e,t,n,i=null,o){super(),this._onWillDispose=this._register(new bt),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new ME(e=>this.handleBeforeFireDecorationsChangedEvent(e))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new bt),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new bt),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new bt),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new bt),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new bt),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new bt),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new BE),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new bt),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent(e=>{this._onDidChangeContentOrInjectedText.fire(e.rawContentChangedEvent)})),uE++,this.id="$model"+uE,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource="undefined"===typeof i||null===i?wn.parse("inmemory://model/"+uE):i,this._undoRedoService=o,this._attachedEditorCount=0;const{textBuffer:r,disposable:s}=hE(e,t.defaultEOL);this._buffer=r,this._bufferDisposable=s,this._options=vE.resolveOptions(this._buffer,t);const a=this._buffer.getLineCount(),l=this._buffer.getValueLengthInRange(new Mn(1,1,a,this._buffer.getLineLength(a)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=l>vE.LARGE_FILE_SIZE_THRESHOLD||a>vE.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=l>vE.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=n||Oc,this._languageRegistryListener=Wh.onDidChange(e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=xs(uE),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new AE,this._commandManager=new cv(this,o),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new jy,this._tokens2=new Fy,this._tokenization=new Zy(this),this._bracketPairColorizer=this._register(new eE(this)),this._decorationProvider=this._bracketPairColorizer,this._register(this._decorationProvider.onDidChangeDecorations(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){const n=dv(e,t.tabSize,t.insertSpaces);return new qa({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new qa({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.contentChangedEvent))}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new zy([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._bracketPairColorizer.handleContentChanged(t),this._isDisposing||this._eventEmitter.fire(new $y(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:n}=hE(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new AE,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new qy([new Wy],this._versionId,!1,!1),this._createContentChanged2(new Mn(1,1,o,r),0,i,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new qy([new Ky],this._versionId,!1,!1),this._createContentChanged2(new Mn(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n<i;n++){const i=t[n],o=i.range,r=i.cachedAbsoluteStart-i.start,s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),a=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);i.cachedAbsoluteStart=s,i.cachedAbsoluteEnd=a,i.cachedVersionId=e,i.start=s-r,i.end=a-r,Wv(i)}}onBeforeAttached(){this._attachedEditorCount++,1===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,0===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=pE?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.indentSize,i="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r="undefined"!==typeof e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,s=new qa({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:r});if(this._options.equals(s))return;let a=this._options.createChangeEvent(s);this._options=s,this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();let n=dv(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}static _normalizeIndentationFromWhitespace(e,t,n){let i=0;for(let r=0;r<e.length;r++)"\t"===e.charAt(r)?i+=t:i++;let o="";if(!n){let e=Math.floor(i/t);i%=t;for(let t=0;t<e;t++)o+="\t"}for(let r=0;r<i;r++)o+=" ";return o}static normalizeIndentation(e,t,n){let i=Hr(e);return-1===i&&(i=e.length),vE._normalizeIndentationFromWhitespace(e.substring(0,i),t,n)+e.substring(i)}normalizeIndentation(e){return this._assertNotDisposed(),vE.normalizeIndentation(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(vs.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(e=>({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new fE(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let o=Math.floor("number"!==typeof n||isNaN(n)?1:n),r=Math.floor("number"!==typeof i||isNaN(i)?1:i);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{const e=this.getLineMaxColumn(o);r>=e&&(r=e)}const s=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!==typeof s||isNaN(s)?1:s),c=Math.floor("number"!==typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return n===o&&i===r&&s===l&&a===c&&e instanceof Mn&&!(e instanceof Bn)?e:new Mn(o,r,l,c)}_isValidPosition(e,t,n){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const i=this._buffer.getLineCount();if(e>i)return!1;if(1===t)return!0;const o=this.getLineMaxColumn(e);if(t>o)return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(rs(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!==typeof e||isNaN(e)?1:e),o=Math.floor("number"!==typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new Nn(1,1);if(i>r)return new Nn(r,this.getLineMaxColumn(r));if(o<=1)return new Nn(i,1);const s=this.getLineMaxColumn(i);if(o>=s)return new Nn(i,s);if(1===n){const e=this._buffer.getLineCharCode(i,o-2);if(rs(e))return new Nn(i,o-1)}return new Nn(i,o)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof Nn&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,s=rs(e),a=rs(t);return!s&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof Mn&&!(e instanceof Bn)&&this._isValidRange(e,t))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),o=n.lineNumber,r=n.column,s=i.lineNumber,a=i.column;if(1===t){const e=r>1?this._buffer.getLineCharCode(o,r-2):0,t=a>1&&a<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,a-2):0,n=rs(e),i=rs(t);return n||i?o===s&&r===a?new Mn(o,r-1,s,a-1):n&&i?new Mn(o,r-1,s,a+1):n?new Mn(o,r-1,s,a):new Mn(o,r,s,a+1):new Mn(o,r,s,a)}return new Mn(o,r,s,a)}modifyPosition(e,t){this._assertNotDisposed();let n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new Mn(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,o,r,s=dE){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>Mn.isIRange(e))&&(a=t.map(e=>this.validateRange(e)))),null===a&&(a=[this.getFullModelRange()]),a=a.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);const l=[];let c;if(l.push(a.reduce((e,t)=>Mn.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t))),!n&&e.indexOf("\n")<0){const t=new cy(e,n,i,o),a=t.parseSearchRequest();if(!a)return[];c=e=>this.findMatchesLineByLine(e,a,r,s)}else c=t=>fy.findMatches(this,new cy(e,n,i,o),t,r,s);return l.map(c).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,n,i,o,r){this._assertNotDisposed();const s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new cy(e,n,i,o),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let c=new Mn(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),h=this.findMatchesLineByLine(c,a,r,1);return fy.findNextMatch(this,new cy(e,n,i,o),s,r),h.length>0?h[0]:(c=new Mn(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),h=this.findMatchesLineByLine(c,a,r,1),h.length>0?h[0]:null)}return fy.findNextMatch(this,new cy(e,n,i,o),s,r)}findPreviousMatch(e,t,n,i,o,r){this._assertNotDisposed();const s=this.validatePosition(t);return fy.findPreviousMatch(this,new cy(e,n,i,o),s,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Za?e:new Za(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n<i;n++)t[n]=this._validateEditOperation(e[n]);return t}pushEditOperations(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,n){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let n=t.map(e=>({range:this.validateRange(e.range),text:e.text})),i=!0;if(e)for(let t=0,o=e.length;t<o;t++){let o=e[t],r=!1;for(let e=0,t=n.length;e<t;e++){let t=n[e].range,i=t.startLineNumber>o.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!i&&!s){r=!0;break}}if(!r){i=!1;break}}if(i)for(let e=0,o=this._trimAutoWhitespaceLines.length;e<o;e++){let i=this._trimAutoWhitespaceLines[e],o=this.getLineMaxColumn(i),r=!0;for(let e=0,t=n.length;e<t;e++){let t=n[e].range,s=n[e].text;if(!(i<t.startLineNumber||i>t.endLineNumber)&&(!(i===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0))&&!(i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1)))){r=!1;break}}if(r){const e=new Mn(i,1,i,o);t.push(new Za(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n)}_applyUndo(e,t,n,i){const o=e.map(e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new Mn(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}});this._applyUndoRedoEdits(o,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const o=e.map(e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new Mn(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}});this._applyUndoRedoEdits(o,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==r.length){for(let n=0,i=r.length;n<i;n++){const e=r[n],[t,i,o]=Ly(e.text);this._tokens.acceptEdit(e.range,t,i),this._tokens2.acceptEdit(e.range,t,i,o,e.text.length>0?e.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(e.rangeOffset,e.rangeLength,e.text.length,e.forceMoveMarkers)}let e=[];this._increaseVersionId();let t=n;for(let n=0,i=r.length;n<i;n++){const i=r[n],[s]=Ly(i.text);this._onDidChangeDecorations.fire();const a=i.range.startLineNumber,l=i.range.endLineNumber,c=l-a,h=s,u=Math.min(c,h),d=h-c,p=o-t-d+a,f=p,g=p+h,m=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new Nn(f,1)),this.getOffsetAt(new Nn(g,this.getLineMaxColumn(g))),0),b=Hy.fromDecorations(m),v=new Gu(b);for(let t=u;t>=0;t--){const n=a+t,i=p+t;v.takeFromEndWhile(e=>e.lineNumber>i);const o=v.takeFromEndWhile(e=>e.lineNumber===i);e.push(new Uy(n,this.getLineContent(i),o))}if(u<c){const t=a+u;e.push(new Yy(t+1,l))}if(u<h){const n=new Gu(b),i=a+u,r=h-u,s=o-t-r+i+1;let l=[],c=[];for(let e=0;e<r;e++){let t=s+e;c[e]=this.getLineContent(t),n.takeWhile(e=>e.lineNumber<t),l[e]=n.takeWhile(e=>e.lineNumber===t)}e.push(new Gy(i+1,a+h,c,l))}t+=d}this._emitContentChangedEvent(new qy(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===i.reverseEdits?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=[...e],n=t.map(e=>new Uy(e,this.getLineContent(e),this._getInjectedTextInLine(e)));this._onDidChangeContentOrInjectedText.fire(new Jy(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let n={addDecoration:(t,n)=>this._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,NE(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)},i=null;try{i=t(n)}catch(o){Oe(o)}return n.addDecoration=gE,n.changeDecoration=gE,n.changeDecorationOptions=gE,n.removeDecoration=gE,n.deltaDecorations=gE,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:IE[n]}])[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),r,s,o),i.setOptions(IE[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,i=t.length;n<i;n++){const e=t[n];this._decorationsTree.delete(e),delete this._decorations[e.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,n=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1){let o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);const l=new Mn(r,1,s,a),c=this._getDecorationsInRange(l,n,i);return c.push(...this._decorationProvider.getDecorationsInRange(l,n,i)),c}getDecorationsInRange(e,t=0,n=!1){let i=this.validateRange(e);const o=this._getDecorationsInRange(i,t,n);return o.push(...this._decorationProvider.getDecorationsInRange(i,t,n)),o}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return Hy.fromDecorations(i).filter(t=>t.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}_getDecorationsInRange(e,t,n){const i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,i,o,t,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(n.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),r=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!(!n.options.overviewRuler||!n.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(n.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}i!==o?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n){const i=this.getVersionId(),o=t.length;let r=0;const s=n.length;let a=0,l=new Array(s);while(r<o||a<s){let c=null;if(r<o){do{c=this._decorations[t[r++]]}while(!c&&r<o);if(c){if(c.options.after){const e=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(c.options.before){const e=this._decorationsTree.getNodeRange(this,c);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}this._decorationsTree.delete(c),this._onDidChangeDecorations.checkAffectedAndFire(c.options)}}if(a<s){if(!c){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;c=new Av(t,0,0),this._decorations[t]=c}const t=n[a],o=this._validateRangeRelaxedNoAllocations(t.range),r=NE(t.options),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),h=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);c.ownerId=e,c.reset(i,s,h,o),c.setOptions(r),c.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber),c.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(r),this._decorationsTree.insert(c),l[a]=c.id,a++}else c&&delete this._decorations[c.id]}return l}setTokens(e,t=!1){if(0!==e.length){let t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n];let o=0,r=0,s=!1;for(let e=0,t=i.tokens.length;e<t;e++){const t=i.startLineNumber+e;if(s)this._tokens.setTokens(this._languageIdentifier.id,t-1,this._buffer.getLineLength(t),i.tokens[e],!1),r=t;else{const n=this._tokens.setTokens(this._languageIdentifier.id,t-1,this._buffer.getLineLength(t),i.tokens[e],!0);n&&(s=!0,o=t,r=t)}}s&&t.push({fromLineNumber:o,toLineNumber:r})}t.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const n=this.validatePosition(new Nn(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),n=this.getLineContent(t.lineNumber),i=this._getLineTokens(t.lineNumber),o=i.findTokenIndexAtOffset(t.column-1),[r,s]=vE._findLanguageBoundaries(i,o),a=A(t.column,Wh.getWordDefinition(i.getLanguageId(o)),n.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&r===t.column-1){const[r,s]=vE._findLanguageBoundaries(i,o-1),a=A(t.column,Wh.getWordDefinition(i.getLanguageId(o-1)),n.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let r=t;r>=0&&e.getLanguageId(r)===n;r--)i=e.getStartOffset(r);let o=e.getLineContent().length;for(let r=t,s=e.getCount();r<s&&e.getLanguageId(r)===n;r++)o=e.getEndOffset(r);return[i,o]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}findMatchingBracketUp(e,t){let n=e.toLowerCase(),i=this.validatePosition(t),o=this._getLineTokens(i.lineNumber),r=o.getLanguageId(o.findTokenIndexAtOffset(i.column-1)),s=Wh.getBracketsSupport(r);if(!s)return null;let a=s.textIsBracket[n];return a?bE(this._findMatchingBracketUp(a,i,null)):null}matchBracket(e){return this._matchBracket(this.validatePosition(e))}_establishBracketSearchOffsets(e,t,n,i){const o=t.getCount(),r=t.getLanguageId(i);let s=Math.max(0,e.column-1-n.maxBracketLength);for(let l=i-1;l>=0;l--){const e=t.getEndOffset(l);if(e<=s)break;if(rh(t.getStandardTokenType(l))||t.getLanguageId(l)!==r){s=e;break}}let a=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let l=i+1;l<o;l++){const e=t.getStartOffset(l);if(e>=a)break;if(rh(t.getStandardTokenType(l))||t.getLanguageId(l)!==r){a=e;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e){const t=e.lineNumber,n=this._getLineTokens(t),i=this._buffer.getLineContent(t),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=Wh.getBracketsSupport(n.getLanguageId(o));if(r&&!rh(n.getStandardTokenType(o))){let{searchStartOffset:s,searchEndOffset:a}=this._establishBracketSearchOffsets(e,n,r,o),l=null;while(1){const n=Bh.findNextBracketInRange(r.forwardRegex,t,i,s,a);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=i.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),t=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t){if(t instanceof mE)return null;l=t}}s=n.endColumn-1}if(l)return l}if(o>0&&n.getStartOffset(o)===e.column-1){const r=o-1,s=Wh.getBracketsSupport(n.getLanguageId(r));if(s&&!rh(n.getStandardTokenType(r))){let{searchStartOffset:o,searchEndOffset:a}=this._establishBracketSearchOffsets(e,n,s,r);const l=Bh.findPrevBracketInRange(s.reversedRegex,t,i,o,a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn){const e=i.substring(l.startColumn-1,l.endColumn-1).toLowerCase(),t=this._matchFoundBracket(l,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t)return t instanceof mE?null:t}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const o=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return o?o instanceof mE?o:[e,o]:null}_findMatchingBracketUp(e,t,n){const i=e.languageIdentifier.id,o=e.reversedRegex;let r=-1,s=0;const a=(t,i,a,l)=>{while(1){if(n&&++s%100===0&&!n())return mE.INSTANCE;const c=Bh.findPrevBracketInRange(o,t,i,a,l);if(!c)break;const h=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?r++:e.isClose(h)&&r--,0===r)return c;l=c.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this._getLineTokens(l),n=e.getCount(),o=this._buffer.getLineContent(l);let r=n-1,s=o.length,c=o.length;l===t.lineNumber&&(r=e.findTokenIndexAtOffset(t.column-1),s=t.column-1,c=t.column-1);let h=!0;for(;r>=0;r--){const t=e.getLanguageId(r)===i&&!rh(e.getStandardTokenType(r));if(t)h?s=e.getStartOffset(r):(s=e.getStartOffset(r),c=e.getEndOffset(r));else if(h&&s!==c){const e=a(l,o,s,c);if(e)return e}h=t}if(h&&s!==c){const e=a(l,o,s,c);if(e)return e}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageIdentifier.id,o=e.forwardRegex;let r=1,s=0;const a=(t,i,a,l)=>{while(1){if(n&&++s%100===0&&!n())return mE.INSTANCE;const c=Bh.findNextBracketInRange(o,t,i,a,l);if(!c)break;const h=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?r++:e.isClose(h)&&r--,0===r)return c;a=c.endColumn-1}return null},l=this.getLineCount();for(let c=t.lineNumber;c<=l;c++){const e=this._getLineTokens(c),n=e.getCount(),o=this._buffer.getLineContent(c);let r=0,s=0,l=0;c===t.lineNumber&&(r=e.findTokenIndexAtOffset(t.column-1),s=t.column-1,l=t.column-1);let h=!0;for(;r<n;r++){const t=e.getLanguageId(r)===i&&!rh(e.getStandardTokenType(r));if(t)h||(s=e.getStartOffset(r)),l=e.getEndOffset(r);else if(h&&s!==l){const e=a(c,o,s,l);if(e)return e}h=t}if(h&&s!==l){const e=a(c,o,s,l);if(e)return e}}return null}findPrevBracket(e){const t=this.validatePosition(e);let n=-1,i=null;for(let o=t.lineNumber;o>=1;o--){const e=this._getLineTokens(o),r=e.getCount(),s=this._buffer.getLineContent(o);let a=r-1,l=s.length,c=s.length;if(o===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const o=e.getLanguageId(a);n!==o&&(n=o,i=Wh.getBracketsSupport(n))}let h=!0;for(;a>=0;a--){const t=e.getLanguageId(a);if(n!==t){if(i&&h&&l!==c){const e=Bh.findPrevBracketInRange(i.reversedRegex,o,s,l,c);if(e)return this._toFoundBracket(i,e);h=!1}n=t,i=Wh.getBracketsSupport(n)}const r=!!i&&!rh(e.getStandardTokenType(a));if(r)h?l=e.getStartOffset(a):(l=e.getStartOffset(a),c=e.getEndOffset(a));else if(i&&h&&l!==c){const e=Bh.findPrevBracketInRange(i.reversedRegex,o,s,l,c);if(e)return this._toFoundBracket(i,e)}h=r}if(i&&h&&l!==c){const e=Bh.findPrevBracketInRange(i.reversedRegex,o,s,l,c);if(e)return this._toFoundBracket(i,e)}}return null}findNextBracket(e){const t=this.validatePosition(e),n=this.getLineCount();let i=-1,o=null;for(let r=t.lineNumber;r<=n;r++){const e=this._getLineTokens(r),n=e.getCount(),s=this._buffer.getLineContent(r);let a=0,l=0,c=0;if(r===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const n=e.getLanguageId(a);i!==n&&(i=n,o=Wh.getBracketsSupport(i))}let h=!0;for(;a<n;a++){const t=e.getLanguageId(a);if(i!==t){if(o&&h&&l!==c){const e=Bh.findNextBracketInRange(o.forwardRegex,r,s,l,c);if(e)return this._toFoundBracket(o,e);h=!1}i=t,o=Wh.getBracketsSupport(i)}const n=!!o&&!rh(e.getStandardTokenType(a));if(n)h||(l=e.getStartOffset(a)),c=e.getEndOffset(a);else if(o&&h&&l!==c){const e=Bh.findNextBracketInRange(o.forwardRegex,r,s,l,c);if(e)return this._toFoundBracket(o,e)}h=n}if(o&&h&&l!==c){const e=Bh.findNextBracketInRange(o.forwardRegex,r,s,l,c);if(e)return this._toFoundBracket(o,e)}}return null}findEnclosingBrackets(e,t){let n;if("undefined"===typeof t)n=null;else{const e=Date.now();n=()=>Date.now()-e<=t}const i=this.validatePosition(e),o=this.getLineCount(),r=new Map;let s=[];const a=(e,t)=>{if(!r.has(e)){let n=[];for(let e=0,i=t?t.brackets.length:0;e<i;e++)n[e]=0;r.set(e,n)}s=r.get(e)};let l=0;const c=(e,t,i,o,r)=>{while(1){if(n&&++l%100===0&&!n())return mE.INSTANCE;const a=Bh.findNextBracketInRange(e.forwardRegex,t,i,o,r);if(!a)break;const c=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[c];if(h&&(h.isOpen(c)?s[h.index]++:h.isClose(c)&&s[h.index]--,-1===s[h.index]))return this._matchFoundBracket(a,h,!1,n);o=a.endColumn-1}return null};let h=-1,u=null;for(let d=i.lineNumber;d<=o;d++){const e=this._getLineTokens(d),t=e.getCount(),n=this._buffer.getLineContent(d);let o=0,r=0,s=0;if(d===i.lineNumber){o=e.findTokenIndexAtOffset(i.column-1),r=i.column-1,s=i.column-1;const t=e.getLanguageId(o);h!==t&&(h=t,u=Wh.getBracketsSupport(h),a(h,u))}let l=!0;for(;o<t;o++){const t=e.getLanguageId(o);if(h!==t){if(u&&l&&r!==s){const e=c(u,d,n,r,s);if(e)return bE(e);l=!1}h=t,u=Wh.getBracketsSupport(h),a(h,u)}const i=!!u&&!rh(e.getStandardTokenType(o));if(i)l||(r=e.getStartOffset(o)),s=e.getEndOffset(o);else if(u&&l&&r!==s){const e=c(u,d,n,r,s);if(e)return bE(e)}l=i}if(u&&l&&r!==s){const e=c(u,d,n,r,s);if(e)return bE(e)}}return null}_toFoundBracket(e,t){if(!t)return null;let n=this.getValueInRange(t);n=n.toLowerCase();let i=e.textIsBracket[n];return i?{range:t,open:i.open,close:i.close,isOpen:e.textIsOpenBracket[n]}:null}static computeIndentLevel(e,t){let n=0,i=0,o=e.length;while(i<o){let o=e.charCodeAt(i);if(32===o)n++;else{if(9!==o)break;n=n-n%t+t}i++}return i===o?-1:n}_computeIndentLevel(e){return vE.computeIndentLevel(this._buffer.getLineContent(e+1),this._options.tabSize)}getActiveIndentGuide(e,t,n){this._assertNotDisposed();const i=this.getLineCount();if(e<1||e>i)throw new Error("Illegal value for lineNumber");const o=Wh.getFoldingRules(this._languageIdentifier.id),r=Boolean(o&&o.offSide);let s=-2,a=-1,l=-2,c=-1;const h=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t<i;t++){let e=this._computeIndentLevel(t);if(e>=0){l=t,c=e;break}}}};let u=-2,d=-1,p=-2,f=-1;const g=e=>{if(-2===u){u=-1,d=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){u=t,d=e;break}}}if(-1!==p&&(-2===p||p<e-1)){p=-1,f=-1;for(let t=e;t<i;t++){let e=this._computeIndentLevel(t);if(e>=0){p=t,f=e;break}}}};let m=0,b=!0,v=0,y=!0,w=0,_=0;for(let C=0;b||y;C++){const o=e-C,s=e+C;C>1&&(o<1||o<t)&&(b=!1),C>1&&(s>i||s>n)&&(y=!1),C>5e4&&(b=!1,y=!1);let p=-1;if(b){const e=this._computeIndentLevel(o-1);e>=0?(l=o-1,c=e,p=Math.ceil(e/this._options.indentSize)):(h(o),p=this._getIndentLevelForWhitespaceLine(r,a,c))}let A=-1;if(y){const e=this._computeIndentLevel(s-1);e>=0?(u=s-1,d=e,A=Math.ceil(e/this._options.indentSize)):(g(s),A=this._getIndentLevelForWhitespaceLine(r,d,f))}if(0!==C){if(1===C){if(s<=i&&A>=0&&_+1===A){b=!1,m=s,v=s,w=A;continue}if(o>=1&&p>=0&&p-1===_){y=!1,m=o,v=o,w=p;continue}if(m=e,v=e,w=_,0===w)return{startLineNumber:m,endLineNumber:v,indent:w}}b&&(p>=w?m=o:b=!1),y&&(A>=w?v=s:y=!1)}else _=p}return{startLineNumber:m,endLineNumber:v,indent:w}}getLinesBracketGuides(e,t,n,i,o){var r,s,a;const l=[],c=this._bracketPairColorizer.getBracketPairsInRange(new Mn(e,1,t,this.getLineMaxColumn(t)));let h=void 0;if(n&&c.length>0){const i=e<=n.lineNumber&&n.lineNumber<=t?c.filter(e=>e.range.containsPosition(n)):this._bracketPairColorizer.getBracketPairsInRange(Mn.fromPositions(n));h=null===(r=Pu(i,e=>e.range.startLineNumber!==e.range.endLineNumber))||void 0===r?void 0:r.range}const u=new Gu(c),d=new Array,p=new wE;for(let f=e;f<=t;f++){const e=new Array;l.push(e);for(const n of u.takeWhile(e=>e.openingBracketRange.startLineNumber<f)||[])d[n.nestingLevel]=n;let t=Number.MAX_SAFE_INTEGER;for(let n=d.length-1;n>=0;n--){const r=d[n];if(r.range.endLineNumber<=f)continue;const l=Math.min(this.getVisibleColumnFromPosition(r.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(null!==(a=null===(s=r.closingBracketRange)||void 0===s?void 0:s.getStartPosition())&&void 0!==a?a:r.range.getEndPosition()));if(l>t)continue;t=l;const c=i&&h&&r.range.equalsRange(h),u=p.getInlineClassNameOfLevel(r.nestingLevel)+(c?" "+p.activeClassName:"");(c||o)&&e.push(new $a(l,u))}e.reverse()}return l}getVisibleColumnFromPosition(e){return aE.visibleColumnFromColumn(this.getLineContent(e.lineNumber),e.column,this._options.tabSize)+1}getLinesIndentGuides(e,t){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=Wh.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide);let r=new Array(t-e+1),s=-2,a=-1,l=-2,c=-1;for(let h=e;h<=t;h++){let t=h-e;const i=this._computeIndentLevel(h-1);if(i>=0)s=h-1,a=i,r[t]=Math.ceil(i/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(let e=h-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){s=e,a=t;break}}}if(-1!==l&&(-2===l||l<h-1)){l=-1,c=-1;for(let e=h;e<n;e++){let t=this._computeIndentLevel(e);if(t>=0){l=e,c=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,a,c)}}return r}_getIndentLevelForWhitespaceLine(e,t,n){return-1===t||-1===n?0:t<n?1+Math.floor(t/this._options.indentSize):t===n||e?Math.ceil(n/this._options.indentSize):1+Math.floor(n/this._options.indentSize)}normalizePosition(e,t){return e}getLineIndentColumn(e){return yE(this.getLineContent(e))+1}}function yE(e){let t=0;for(const n of e){if(" "!==n&&"\t"!==n)break;t++}return t}vE.MODEL_SYNC_LIMIT=52428800,vE.LARGE_FILE_SIZE_THRESHOLD=20971520,vE.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,vE.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Le.tabSize,indentSize:Le.indentSize,insertSpaces:Le.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Le.trimAutoWhitespace,largeFileOptimizations:Le.largeFileOptimizations,bracketPairColorizationOptions:Le.bracketPairColorizationOptions};class wE{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(e){return"bracket-indent-guide lvl-"+e%30}}function _E(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function CE(e){return!!e.options.after||!!e.options.before}class AE{constructor(){this._decorationsTree0=new xv,this._decorationsTree1=new xv,this._injectedTextDecorationsTree=new xv}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)null===n.range&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,o){const r=e.getVersionId(),s=this._intervalSearch(t,n,i,o,r);return this._ensureNodesHaveRanges(e,s)}_intervalSearch(e,t,n,i,o){const r=this._decorationsTree0.intervalSearch(e,t,n,i,o),s=this._decorationsTree1.intervalSearch(e,t,n,i,o),a=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,o);return r.concat(s).concat(a)}getInjectedTextInInterval(e,t,n,i){const o=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,o);return this._ensureNodesHaveRanges(e,r).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n);return this._ensureNodesHaveRanges(e,i).filter(e=>e.options.showIfCollapsed||!e.range.isEmpty())}getAll(e,t,n,i){const o=e.getVersionId(),r=this._search(t,n,i,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,n,i){if(n)return this._decorationsTree1.search(e,t,i);{const n=this._decorationsTree0.search(e,t,i),o=this._decorationsTree1.search(e,t,i),r=this._injectedTextDecorationsTree.search(e,t,i);return n.concat(o).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){CE(e)?this._injectedTextDecorationsTree.insert(e):_E(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){CE(e)?this._injectedTextDecorationsTree.delete(e):_E(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){CE(e)?this._injectedTextDecorationsTree.resolveNode(e,t):_E(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function EE(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class xE{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class SE extends xE{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:Ga.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;let n=e?t.getColor(e.id):null;return n?n.toString():""}}class kE extends xE{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?sw.fromHex(e):t.getColor(e.id)}}class DE{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1}static from(e){return e instanceof DE?e:new DE(e)}}class LE{constructor(e){this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?EE(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new SE(e.overviewRuler):null,this.minimap=e.minimap?new kE(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?EE(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?EE(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?EE(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?EE(e.marginClassName):null,this.inlineClassName=e.inlineClassName?EE(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?EE(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?EE(e.afterContentClassName):null,this.after=e.after?DE.from(e.after):null,this.before=e.before?DE.from(e.before):null}static register(e){return new LE(e)}static createDynamic(e){return new LE(e)}}LE.EMPTY=LE.register({description:"empty"});const IE=[LE.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),LE.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),LE.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),LE.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function NE(e){return e instanceof LE?e:LE.createDynamic(e)}class ME extends st{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new bt),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class BE extends st{constructor(){super(),this._fastEmitter=this._register(new bt),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new bt),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}const TE=()=>!0,OE=()=>!1,RE=e=>" "===e||"\t"===e;class PE{constructor(e,t,n){this._cursorMoveConfigurationBrand=void 0,this._languageIdentifier=e;const i=n.options,o=i.get(129);this.readOnly=i.get(80),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=i.get(103),this.lineHeight=i.get(58),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=i.get(114),this.wordSeparators=i.get(115),this.emptySelectionClipboard=i.get(32),this.copyWithSyntaxHighlighting=i.get(21),this.multiCursorMergeOverlapping=i.get(68),this.multiCursorPaste=i.get(70),this.autoClosingBrackets=i.get(5),this.autoClosingQuotes=i.get(8),this.autoClosingDelete=i.get(6),this.autoClosingOvertype=i.get(7),this.autoSurround=i.get(11),this.autoIndent=i.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:PE._getShouldAutoClose(e,this.autoClosingQuotes),bracket:PE._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=Wh.getAutoClosingPairs(e.id);let r=PE._getSurroundingPairs(e);if(r)for(const s of r)this.surroundingPairs[s.open]=s.close}static shouldRecreate(e){return e.hasChanged(129)||e.hasChanged(115)||e.hasChanged(32)||e.hasChanged(68)||e.hasChanged(70)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(114)||e.hasChanged(58)||e.hasChanged(80)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=PE._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return vE.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return Wh.getElectricCharacters(e.id)}catch(t){return Oe(t),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return RE;case"languageDefined":return PE._getLanguageDefinedShouldAutoClose(e);case"always":return TE;case"never":return OE}}static _getLanguageDefinedShouldAutoClose(e){try{const t=Wh.getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(t){return Oe(t),OE}}static _getSurroundingPairs(e){try{return Wh.getSurroundingPairs(e.id)}catch(t){return Oe(t),null}}}class FE{constructor(e,t,n,i){this._singleCursorStateBrand=void 0,this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=n,this.leftoverVisibleColumns=i,this.selection=FE._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,n,i){return e?new FE(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new Nn(t,n),i):new FE(new Mn(t,n,t,n),i,new Nn(t,n),i)}static _computeSelection(e,t){let n,i,o,r;return e.isEmpty()?(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,r=t.column):t.isBeforeOrEqual(e.getStartPosition())?(n=e.endLineNumber,i=e.endColumn,o=t.lineNumber,r=t.column):(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,r=t.column),new Bn(n,i,o,r)}}class jE{constructor(e,t,n,i){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=i}}class zE{constructor(e){this.modelState=e,this.viewState=null}}class VE{constructor(e){this.modelState=null,this.viewState=e}}class QE{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new zE(e)}static fromViewState(e){return new VE(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,n=e.selectionStartColumn,i=e.positionLineNumber,o=e.positionColumn,r=new FE(new Mn(t,n,t,n),0,new Nn(i,o),0);return QE.fromModelState(r)}static fromModelSelections(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=this.fromModelSelection(e[n]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class WE{constructor(e,t,n){this._editOperationResultBrand=void 0,this.type=e,this.commands=t,this.shouldPushStackElementBefore=n.shouldPushStackElementBefore,this.shouldPushStackElementAfter=n.shouldPushStackElementAfter}}function HE(e){return"'"===e||'"'===e||"`"===e}class UE{static whitespaceVisibleColumn(e,t,n){const i=e.length;let o=0,r=-1,s=-1;for(let a=0;a<i;a++){if(a===t)return[r,s,o];o%n===0&&(r=a,s=o);const i=e.charCodeAt(a);switch(i){case 32:o+=1;break;case 9:o=aE.nextRenderTabStop(o,n);break;default:return[-1,-1,-1]}}return t===i?[r,s,o]:[-1,-1,-1]}static atomicPosition(e,t,n,i){const o=e.length,[r,s,a]=UE.whitespaceVisibleColumn(e,t,n);if(-1===a)return-1;let l;switch(i){case 0:l=!0;break;case 1:l=!1;break;case 2:if(a%n===0)return t;l=a%n<=n/2;break}if(l){if(-1===r)return-1;let t=s;for(let i=r;i<o;++i){if(t===s+n)return r;const o=e.charCodeAt(i);switch(o){case 32:t+=1;break;case 9:t=aE.nextRenderTabStop(t,n);break;default:return-1}}return t===s+n?r:-1}const c=aE.nextRenderTabStop(a,n);let h=a;for(let u=t;u<o;u++){if(h===c)return u;const t=e.charCodeAt(u);switch(t){case 32:h+=1;break;case 9:h=aE.nextRenderTabStop(h,n);break;default:return-1}}return h===c?o:-1}}class YE{constructor(e=null){this.hitTarget=e,this.type=0}}class GE{constructor(e,t,n){this.position=e,this.spanNode=t,this.injectedText=n,this.type=1}}var KE;(function(e){function t(e,t,n){const i=e.getPositionFromDOMInfo(t,n);return i?new GE(i,t,null):new YE(t)}e.createFromDOMInfo=t})(KE||(KE={}));class qE{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class JE{constructor(e,t,n=0,i=null,o=null,r=null){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,!o&&i&&(o=new Mn(i.lineNumber,i.column,i.lineNumber,i.column)),this.range=o,this.detail=r}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}toString(){return JE.toString(this)}}class $E{static isTextArea(e){return 2===e.length&&3===e[0]&&6===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class XE{constructor(e,t,n){this.model=e.model;const i=e.configuration.options;this.layoutInfo=i.get(129),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(58),this.stickyTabStops=i.get(103),this.typicalHalfwidthCharacterWidth=i.get(43).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return XE.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){const i=n.verticalOffset+n.height/2,o=e.model.getLineCount();let r,s=null,a=null;return n.afterLineNumber!==o&&(a=new Nn(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new Nn(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),r=null===a?s:null===s?a:t<i?s:a,{viewZoneId:n.id,afterLineNumber:n.afterLineNumber,positionBefore:s,positionAfter:a,position:r}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const e=this._context.model.getLineCount(),t=this._context.model.getLineMaxColumn(e);return{range:new Mn(e,t,e,t),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),n=this._context.model.getLineMaxColumn(t);return{range:new Mn(t,1,t,n),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return XE._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,n){while(e&&e!==document.body){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===n)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class ZE{constructor(e,t,n){this.editorPos=t,this.pos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+n.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+n.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=n.x-t.x<e.layoutInfo.contentLeft&&n.x-t.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,ix._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class ex extends ZE{constructor(e,t,n,i){super(e,t,n),this._ctx=e,i?(this.target=i,this.targetPath=Bb.collect(i,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,n=null,i=null){let o=this.mouseColumn;return t&&t.column<this._ctx.model.getLineMaxColumn(t.lineNumber)&&(o=aE.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber),t.column,this._ctx.model.getTextModelOptions().tabSize)+1),new JE(this.target,e,o,t,n,i)}withTarget(e){return new ex(this._ctx,this.editorPos,this.pos,e)}}const tx={isAfterLines:!0};function nx(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class ix{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,n=Bb.collect(t,this._viewHelper.viewDomNode);return!(!$E.isChildOfContentWidgets(n)&&!$E.isChildOfOverflowingContentWidgets(n))||!!$E.isChildOfOverlayWidgets(n)}createMouseTarget(e,t,n,i){const o=new XE(this._context,this._viewHelper,e),r=new ex(o,t,n,i);try{const e=ix._createMouseTarget(o,r,!1);return e}catch(s){return r.fulfill(0)}}static _createMouseTarget(e,t,n){if(null===t.target){if(n)return t.fulfill(0);const i=ix._doHitTest(e,t);return 1===i.type?ix.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):this._createMouseTarget(e,t.withTarget(i.hitTarget),!0)}const i=t;let o=null;return o=o||ix._hitTestContentWidget(e,i),o=o||ix._hitTestOverlayWidget(e,i),o=o||ix._hitTestMinimap(e,i),o=o||ix._hitTestScrollbarSlider(e,i),o=o||ix._hitTestViewZone(e,i),o=o||ix._hitTestMargin(e,i),o=o||ix._hitTestViewCursor(e,i),o=o||ix._hitTestTextArea(e,i),o=o||ix._hitTestViewLines(e,i,n),o=o||ix._hitTestScrollbar(e,i),o||t.fulfill(0)}static _hitTestContentWidget(e,t){if($E.isChildOfContentWidgets(t.targetPath)||$E.isChildOfOverflowingContentWidgets(t.targetPath)){const n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0)}return null}static _hitTestOverlayWidget(e,t){if($E.isChildOfOverlayWidgets(t.targetPath)){const n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0)}return null}static _hitTestViewCursor(e,t){if(t.target){const n=e.lastRenderData.lastViewCursorsRenderData;for(const e of n)if(t.target===e.domNode)return t.fulfill(6,e.position,null,{mightBeForeignElement:!1})}if(t.isInContentArea){const n=e.lastRenderData.lastViewCursorsRenderData,i=t.mouseContentHorizontalOffset,o=t.mouseVerticalOffset;for(const r of n){if(i<r.contentLeft)continue;if(i>r.contentLeft+r.width)continue;const n=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(n<=o&&o<=n+r.height)return t.fulfill(6,r.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(e,t){const n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){const e=t.isInContentArea?8:5;return t.fulfill(e,n.position,null,n)}return null}static _hitTestTextArea(e,t){return $E.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition();let o=Math.abs(t.pos.x-t.editorPos.x);const r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,r)))}return null}static _hitTestViewLines(e,t,n){if(!$E.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new Nn(1,1),null,tx);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const n=e.model.getLineCount(),i=e.model.getLineMaxColumn(n);return t.fulfill(7,new Nn(n,i),null,tx)}if(n){if($E.isStrictChildOfViewLines(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(n)){const i=e.getLineWidth(n),o=nx(t.mouseContentHorizontalOffset-i);return t.fulfill(7,new Nn(n,1),null,o)}const i=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>=i){const o=nx(t.mouseContentHorizontalOffset-i),r=new Nn(n,e.model.getLineMaxColumn(n));return t.fulfill(7,r,null,o)}}return t.fulfill(0)}const i=ix._doHitTest(e,t);return 1===i.type?ix.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):this._createMouseTarget(e,t.withTarget(i.hitTarget),!0)}static _hitTestMinimap(e,t){if($E.isChildOfMinimap(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new Nn(n,i))}return null}static _hitTestScrollbarSlider(e,t){if($E.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new Nn(n,i))}}return null}static _hitTestScrollbar(e,t){if($E.isChildOfScrollableElement(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new Nn(n,i))}return null}getMouseColumn(e,t){const n=this._context.configuration.options,i=n.get(129),o=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-i.contentLeft;return ix._getMouseColumn(o,n.get(43).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;const n=Math.round(e/t);return n+1}static createMouseTargetFromHitTestPosition(e,t,n,i,o){const r=i.lineNumber,s=i.column,a=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>a){const e=nx(t.mouseContentHorizontalOffset-a);return t.fulfill(7,i,null,e)}const l=e.visibleRangeForPosition(r,s);if(!l)return t.fulfill(0,i);const c=l.left;if(t.mouseContentHorizontalOffset===c)return t.fulfill(6,i,null,{mightBeForeignElement:!!o});const h=[];if(h.push({offset:l.left,column:s}),s>1){const t=e.visibleRangeForPosition(r,s-1);t&&h.push({offset:t.left,column:s-1})}const u=e.model.getLineMaxColumn(r);if(s<u){const t=e.visibleRangeForPosition(r,s+1);t&&h.push({offset:t.left,column:s+1})}h.sort((e,t)=>e.offset-t.offset);const d=t.pos.toClientCoordinates(),p=n.getBoundingClientRect(),f=p.left<=d.clientX&&d.clientX<=p.right;for(let g=1;g<h.length;g++){const e=h[g-1],n=h[g];if(e.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=n.offset){const s=new Mn(r,e.column,r,n.column);return t.fulfill(6,i,s,{mightBeForeignElement:!f||!!o})}}return t.fulfill(6,i,null,{mightBeForeignElement:!f||!!o})}static _doHitTestWithCaretRangeFromPoint(e,t){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.getVerticalOffsetForLineNumber(n),o=i+Math.floor(e.lineHeight/2);let r=t.pos.y+(o-t.mouseVerticalOffset);r<=t.editorPos.y&&(r=t.editorPos.y+1),r>=t.editorPos.y+e.layoutInfo.height&&(r=t.editorPos.y+e.layoutInfo.height-1);const s=new Ab(t.pos.x,r),a=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return 1===a.type?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const n=tr(e.viewDomNode);let i;if(i=n?"undefined"===typeof n.caretRangeFromPoint?ox(n,t.clientX,t.clientY):n.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!i||!i.startContainer)return new YE;const o=i.startContainer;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,n=t?t.parentNode:null,r=n?n.parentNode:null,s=r&&r.nodeType===r.ELEMENT_NODE?r.className:null;return s===Yb.CLASS_NAME?KE.createFromDOMInfo(e,t,i.startOffset):new YE(o.parentNode)}if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,n=t?t.parentNode:null,i=n&&n.nodeType===n.ELEMENT_NODE?n.className:null;return i===Yb.CLASS_NAME?KE.createFromDOMInfo(e,o,o.textContent.length):new YE(o)}return new YE}static _doHitTestWithCaretPositionFromPoint(e,t){const n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){const t=n.offsetNode.parentNode,i=t?t.parentNode:null,o=i?i.parentNode:null,r=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;return r===Yb.CLASS_NAME?KE.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new YE(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){const t=n.offsetNode.parentNode,i=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,o=t?t.parentNode:null,r=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(i===Yb.CLASS_NAME){const t=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(t)return KE.createFromDOMInfo(e,t,0)}else if(r===Yb.CLASS_NAME)return KE.createFromDOMInfo(e,n.offsetNode,0)}return new YE(n.offsetNode)}static _snapToSoftTabBoundary(e,t){const n=t.getLineContent(e.lineNumber),{tabSize:i}=t.getTextModelOptions(),o=UE.atomicPosition(n,e.column-1,i,2);return-1!==o?new Nn(e.lineNumber,o+1):e}static _doHitTest(e,t){let n=new YE;if("function"===typeof document.caretRangeFromPoint?n=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),1===n.type){const t=e.model.getInjectedTextAt(n.position),i=e.model.normalizePosition(n.position,2);!t&&i.equals(n.position)||(n=new GE(i,n.spanNode,t))}return 1===n.type&&e.stickyTabStops&&(n=new GE(this._snapToSoftTabBoundary(n.position,e.model),n.spanNode,n.injectedText)),n}}function ox(e,t,n){const i=document.createRange();let o=e.elementFromPoint(t,n);if(null!==o){while(o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild)o=o.lastChild;const e=o.getBoundingClientRect(),n=window.getComputedStyle(o,null).getPropertyValue("font"),r=o.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=r.length;else{const e=rx.getInstance();for(let i=0;i<r.length+1;i++){if(s=e.getCharWidth(r.charAt(i),n)/2,a+=s,t<a){l=i;break}a+=s}}i.setStart(o.firstChild,l),i.setEnd(o.firstChild,l)}return i}class rx{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return rx._INSTANCE||(rx._INSTANCE=new rx),rx._INSTANCE}getCharWidth(e,t){const n=e+t;if(this._cache[n])return this._cache[n];const i=this._canvas.getContext("2d");i.font=t;const o=i.measureText(e),r=o.width;return this._cache[n]=r,r}}function sx(e){return function(t,n){let i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}rx._INSTANCE=null;class ax extends Nb{constructor(e,t,n){super(),this._context=e,this.viewController=t,this.viewHelper=n,this.mouseTargetFactory=new ix(this._context,n),this._mouseDownOperation=this._register(new lx(this._context,this.viewController,this.viewHelper,(e,t)=>this._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const i=new Db(this.viewHelper.viewDomNode);this._register(i.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(i.onMouseMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),sx(this.mouseTargetFactory),ax.MOUSE_MOVE_MINIMUM_TIME)),this._register(i.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(i.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(i.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)));const o=e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(67))return;const t=new eo(e),n=b["f"]?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey;if(n){const e=ja.getZoomLevel(),n=t.deltaY>0?1:-1;ja.setZoomLevel(e+n),t.preventDefault(),t.stopPropagation()}};this._register(Eo(this.viewHelper.viewDomNode,hr.MOUSE_WHEEL,o,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(129)){const e=this._context.configuration.options.get(129).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const n=new Eb(e,t),i=n.toPageCoordinates(),o=Sb(this.viewHelper.viewDomNode);return i.y<o.y||i.y>o.y+o.height||i.x<o.x||i.x>o.x+o.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o,i,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){const t=tr(this.viewHelper.viewDomNode);t&&(n=t.elementsFromPoint(e.posx,e.posy).find(e=>this.viewHelper.viewDomNode.contains(e)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this._mouseDownOperation.isActive())return;const t=e.timestamp;t<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const t=this._createMouseTarget(e,!0),n=6===t.type||7===t.type,i=2===t.type||3===t.type||4===t.type,o=3===t.type,r=this._context.configuration.options.get(97),s=8===t.type||5===t.type,a=9===t.type;let l=e.leftButton||e.middleButton;b["f"]&&e.leftButton&&e.ctrlKey&&(l=!1);const c=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(n||o&&r))c(),this._mouseDownOperation.start(t.type,e);else if(i)e.preventDefault();else if(s){const n=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}ax.MOUSE_MOVE_MINIMUM_TIME=100;class lx extends st{constructor(e,t,n,i,o){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._createMouseTarget=i,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new Ib(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new co),this._mouseState=new cx,this._currentSelection=new Bn(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const i=this._context.configuration.options;if(!i.get(80)&&i.get(31)&&!i.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,sx(null),e=>this._onMouseDownThenMove(e),e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,sx(null),e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,n=this._context.model,i=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posy<t.y){const n=Math.max(i.getCurrentScrollTop()-(t.y-e.posy),0),r=XE.getZoneAtCoord(this._context,n);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return new JE(null,13,o,e)}const s=i.getLineNumberAtVerticalOffset(n);return new JE(null,13,o,new Nn(s,1))}if(e.posy>t.y+t.height){const r=i.getCurrentScrollTop()+(e.posy-t.y),s=XE.getZoneAtCoord(this._context,r);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return new JE(null,13,o,e)}const a=i.getLineNumberAtVerticalOffset(r);return new JE(null,13,o,new Nn(a,n.getLineMaxColumn(a)))}const r=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new JE(null,13,o,new Nn(r,1)):e.posx>t.x+t.width?new JE(null,13,o,new Nn(r,n.getLineMaxColumn(r))):null}_findMousePosition(e,t){const n=this._getPositionOutsideEditor(e);if(n)return n;const i=this._createMouseTarget(e,t),o=i.position;if(!o)return null;if(8===i.type||5===i.type){const e=this._helpPositionJumpOverViewZone(i.detail);if(e)return new JE(i.element,i.type,i.mouseColumn,e,null,i.detail)}return i}_helpPositionJumpOverViewZone(e){const t=new Nn(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class cx{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const n=(new Date).getTime();n-this._lastSetMouseDownCountTime>cx.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var hx;cx.CLEAR_MOUSE_DOWN_COUNT_TIME=400,function(e){e.text="text/plain",e.binary="application/octet-stream",e.unknown="application/unknown",e.markdown="text/markdown",e.latex="text/latex"}(hx||(hx={}));let ux=[],dx=[],px=[];function fx(e,t=!1){const n=gx(e);ux.push(n),n.userConfigured?px.push(n):dx.push(n),t&&!n.userConfigured&&ux.forEach(e=>{e.mime===n.mime||e.userConfigured||(n.extension&&(e.extension,n.extension),n.filename&&(e.filename,n.filename),n.filepattern&&(e.filepattern,n.filepattern),n.firstline&&(e.firstline,n.firstline))})}function gx(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?Tl(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(nn.sep)>=0}}function mx(e,t){let n;if(e)switch(e.scheme){case mo.file:n=e.fsPath;break;case mo.data:const t=na.parseMetaData(e);n=t.get(na.META_DATA_LABEL);break;default:n=e.path}if(!n)return[hx.unknown];n=n.toLowerCase();const i=ln(n),o=bx(n,i,px);if(o)return[o,hx.text];const r=bx(n,i,dx);if(r)return[r,hx.text];if(t){const e=vx(t);if(e)return[e,hx.text]}return[hx.unknown]}function bx(e,t,n){var i;let o=null,r=null,s=null;for(let a=n.length-1;a>=0;a--){const l=n[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!r||l.filepattern.length>r.filepattern.length)){const n=l.filepatternOnPath?e:t;(null===(i=l.filepatternLowercase)||void 0===i?void 0:i.call(l,n))&&(r=l)}l.extension&&(!s||l.extension.length>s.extension.length)&&t.endsWith(l.extensionLowercase)&&(s=l)}return o?o.mime:r?r.mime:s?s.mime:null}function vx(e){if(Es(e)&&(e=e.substr(1)),e.length>0)for(let t=ux.length-1;t>=0;t--){const n=ux[t];if(!n.firstline)continue;const i=e.match(n.firstline);if(i&&i.length>0)return n.mime}return null}class yx{constructor(e,t,n,i,o){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=i,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new yx(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new yx(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)}_finishDeduceEditorPosition(e,t,n){let i=0,o=-1;while(-1!==(o=t.indexOf("\n",o+1)))i++;return[e,n*t.length,i]}static selectedText(e){return new yx(e,0,e.length,null,null)}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let i=e.value,o=e.selectionStart,r=e.selectionEnd,s=t.value,a=t.selectionStart,l=t.selectionEnd;const c=i.substring(r),h=s.substring(l),u=os(c,h);s=s.substring(0,s.length-u),i=i.substring(0,i.length-u);const d=i.substring(0,o),p=s.substring(0,a),f=is(d,p);if(s=s.substring(f),i=i.substring(f),a-=f,o-=f,l-=f,r-=f,n&&a===l&&i.length>0){let e=null;if(a===s.length?s.startsWith(i)&&(e=s.substring(i.length)):s.endsWith(i)&&(e=s.substring(0,s.length-i.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||gs(e)))return{text:e,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(a===l){if(i===s&&0===o&&r===i.length&&a===s.length&&-1===s.indexOf("\n")&&ws(s))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const e=d.length-f;return{text:s,replacePrevCharCnt:e,replaceNextCharCnt:0,positionDelta:0}}const g=r-o;return{text:s,replacePrevCharCnt:g,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const n=Math.min(is(e.value,t.value),e.selectionEnd),i=Math.min(os(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(n,e.value.length-i),r=t.value.substring(n,t.value.length-i),s=(e.selectionStart,e.selectionEnd-n),a=(t.selectionStart,t.selectionEnd-n);return{text:r,replacePrevCharCnt:s,replaceNextCharCnt:o.length-s,positionDelta:a-r.length}}}yx.EMPTY=new yx("",0,0,null,null);class wx{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const n=e*t,i=n+1,o=n+t;return new Mn(i,1,o+1,1)}static fromEditorSelection(e,t,n,i,o){const r=wx._getPageOfLine(n.startLineNumber,i),s=wx._getRangeForPage(r,i),a=wx._getPageOfLine(n.endLineNumber,i),l=wx._getRangeForPage(a,i),c=s.intersectRanges(new Mn(1,1,n.startLineNumber,n.startColumn));let h=t.getValueInRange(c,1);const u=t.getLineCount(),d=t.getLineMaxColumn(u),p=l.intersectRanges(new Mn(n.endLineNumber,n.endColumn,u,d));let f,g=t.getValueInRange(p,1);if(r===a||r+1===a)f=t.getValueInRange(n,1);else{const e=s.intersectRanges(n),i=l.intersectRanges(n);f=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(i,1)}if(o){const e=500;h.length>e&&(h=h.substring(h.length-e,h.length)),g.length>e&&(g=g.substring(0,e)),f.length>2*e&&(f=f.substring(0,e)+String.fromCharCode(8230)+f.substring(f.length-e,f.length))}return new yx(h+f+g,h.length,h.length+f.length,new Nn(n.startLineNumber,n.startColumn),new Nn(n.endLineNumber,n.endColumn))}}var _x;(function(e){e.Tap="-monaco-textarea-synthetic-tap"})(_x||(_x={}));const Cx={forceCopyWithSyntaxHighlighting:!1};class Ax{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}Ax.INSTANCE=new Ax;class Ex extends st{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new bt),this.onFocus=this._onFocus.event,this._onBlur=this._register(new bt),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new bt),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new bt),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new bt),this.onCut=this._onCut.event,this._onPaste=this._register(new bt),this.onPaste=this._onPaste.event,this._onType=this._register(new bt),this.onType=this._onType.event,this._onCompositionStart=this._register(new bt),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new bt),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new bt),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new bt),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new Sx(t)),this._asyncTriggerCut=this._register(new uo(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new uo(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=yx.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let n=null;this._register(ko(t.domNode,"keydown",e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),n=e,this._onKeyDown.fire(e)})),this._register(ko(t.domNode,"keyup",e=>{this._onKeyUp.fire(e)})),this._register(Eo(t.domNode,"compositionstart",e=>{if(!this._isDoingComposition){if(this._isDoingComposition=!0,b["f"]&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data){const e=n&&n.equals(109)&&("ArrowRight"===n.code||"ArrowLeft"===n.code);if(e||Bi)return this._textAreaState=new yx(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new Nn(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),void this._onCompositionStart.fire({revealDeltaColumns:-1})}Fi?this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart}):(this._setAndWriteTextAreaState("compositionstart",yx.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0}))}}));const i=e=>{const t=this._textAreaState,n=yx.readFromTextArea(this._textArea);return[n,yx.deduceInput(t,n,e)]},o=()=>{const e=this._textAreaState,t=yx.readFromTextArea(this._textArea);return[t,yx.deduceAndroidCompositionInput(e,t)]},r=e=>{const t=this._textAreaState,n=yx.selectedText(e),i={text:n.value,replacePrevCharCnt:t.selectionEnd-t.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[n,i]};this._register(Eo(t.domNode,"compositionupdate",e=>{if(Fi){const[t,n]=o();return this._textAreaState=t,this._onType.fire(n),void this._onCompositionUpdate.fire(e)}const[t,n]=r(e.data||"");this._textAreaState=t,this._onType.fire(n),this._onCompositionUpdate.fire(e)})),this._register(Eo(t.domNode,"compositionend",e=>{if(!this._isDoingComposition)return;if(this._isDoingComposition=!1,Fi){const[e,t]=o();return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const[t,n]=r(e.data||"");this._textAreaState=t,this._onType.fire(n),(Oi||Bi)&&(this._textAreaState=yx.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()})),this._register(Eo(t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=i(b["f"]);0===t.replacePrevCharCnt&&1===t.text.length&&rs(t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""===t.text&&0===t.replacePrevCharCnt||this._onType.fire(t):(""===t.text&&0===t.replacePrevCharCnt||this._firePaste(t.text,null),this._nextCommand=0))})),this._register(Eo(t.domNode,"cut",e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(Eo(t.domNode,"copy",e=>{this._ensureClipboardGetsEditorSelection(e)})),this._register(Eo(t.domNode,"paste",e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),xx.canUseTextData(e)){const[t,n]=xx.getTextData(e);""!==t&&this._firePaste(t,n)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",yx.EMPTY),this._nextCommand=1})),this._register(Eo(t.domNode,"focus",()=>{const e=this._hasFocus;this._setHasFocus(!0),Ri&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(Eo(t.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(Eo(t.domNode,_x.Tap,()=>{Fi&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return Eo(document,"selectionchange",t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!Oi)return;const n=Date.now(),i=n-e;if(e=n,i<5)return;const o=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const s=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===s&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(s),c=this._host.deduceModelPosition(l[0],l[1],l[2]),h=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(h[0],h[1],h[2]),d=new Bn(c.lineNumber,c.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(d)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=tr(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):Co(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(xx.canUseTextData(e)),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};Ax.INSTANCE.set(Bi?t.text.replace(/\r\n/g,"\n"):t.text,n),xx.canUseTextData(e)?xx.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",yx.selectedText(t.text))}_firePaste(e,t){t||(t=Ax.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class xx{static canUseTextData(e){return!!e.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const n=e.clipboardData.getData(hx.text);let i=null;const o=e.clipboardData.getData("vscode-editor-data");if("string"===typeof o)try{i=JSON.parse(o),1!==i.version&&(i=null)}catch(t){}return[n,i]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,n,i){if(e.clipboardData)return e.clipboardData.setData(hx.text,t),"string"===typeof n&&e.clipboardData.setData("text/html",n),e.clipboardData.setData("vscode-editor-data",JSON.stringify(i)),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class Sx extends st{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,n){const i=this._actual.domNode;let o=null;const r=tr(i);o=r?r.activeElement:document.activeElement;const s=o===i,a=i.selectionStart,l=i.selectionEnd;if(s&&a===t&&l===n)Bi&&window.parent!==window&&i.focus();else{if(s)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(Bi&&window.parent!==window&&i.focus());try{const e=dr(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),pr(i,e)}catch(c){}}}}class kx extends ax{constructor(e,t,n){super(e,t,n),this._register(wb.addTarget(this.viewHelper.linesContentDomNode)),this._register(Eo(this.viewHelper.linesContentDomNode,vb.Tap,e=>this.onTap(e))),this._register(Eo(this.viewHelper.linesContentDomNode,vb.Change,e=>this.onChange(e))),this._register(Eo(this.viewHelper.linesContentDomNode,vb.Contextmenu,e=>this._onContextMenu(new kb(e,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(Eo(this.viewHelper.linesContentDomNode,"pointerdown",e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"}));const i=new Lb(this.viewHelper.viewDomNode);this._register(i.onPointerMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),sx(this.mouseTargetFactory),ax.MOUSE_MOVE_MINIMUM_TIME)),this._register(i.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(i.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(i.onPointerDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new kb(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class Dx extends ax{constructor(e,t,n){super(e,t,n),this._register(wb.addTarget(this.viewHelper.linesContentDomNode)),this._register(Eo(this.viewHelper.linesContentDomNode,vb.Tap,e=>this.onTap(e))),this._register(Eo(this.viewHelper.linesContentDomNode,vb.Change,e=>this.onChange(e))),this._register(Eo(this.viewHelper.linesContentDomNode,vb.Contextmenu,e=>this._onContextMenu(new kb(e,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new kb(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(_x.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class Lx extends st{constructor(e,t,n){super(),b["c"]&&zi.pointerEvents?this.handler=this._register(new kx(e,t,n)):window.TouchEvent?this.handler=this._register(new Dx(e,t,n)):this.handler=this._register(new ax(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}n("1a37"),n("1f2d");class Ix extends Nb{}class Nx extends Ix{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Nn(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(58);const t=e.get(59);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(83);const n=e.get(129);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Nn(e,1));if(1!==t.column)return"";const n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===e?'<span class="relative-current-line-number">'+n+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=b["d"]?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o='<div class="'+Nx.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',r=this._context.model.getLineCount(),s=[];for(let a=n;a<=i;a++){const e=a-n;if(!this._renderFinalNewline&&a===r&&0===this._context.model.getLineLength(a)){s[e]="";continue}const i=this._getLineRenderLineNumber(a);i?a===this._activeLineNumber?s[e]='<div class="active-line-number '+Nx.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+i+"</div>":s[e]=o+i+"</div>":s[e]=""}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Nx.CLASS_NAME="line-numbers",Mm((e,t)=>{const n=e.getColor(FC);n&&t.addRule(`.monaco-editor .line-numbers { color: ${n}; }`);const i=e.getColor(zC);i&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${i}; }`)});class Mx extends Mb{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._canUseLayerHinting=!t.get(28),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=mb(document.createElement("div")),this._domNode.setClassName(Mx.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=mb(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Mx.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._canUseLayerHinting=!t.get(28),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}Mx.CLASS_NAME="glyph-margin",Mx.OUTER_CLASS_NAME="margin";n("53d7");const Bx="monaco-mouse-cursor-text";class Tx{constructor(e,t,n){this._visibleTextAreaBrand=void 0,this.top=e,this.left=t,this.width=n}setWidth(e){return new Tx(this.top,this.left,e)}}const Ox=Bi;class Rx extends Mb{constructor(e,t,n){super(e),this._primaryCursorPosition=new Nn(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=n,this._scrollLeft=0,this._scrollTop=0;const i=this._context.configuration.options,o=i.get(129);this._setAccessibilityOptions(i),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=i.get(43),this._lineHeight=i.get(58),this._emptySelectionClipboard=i.get(32),this._copyWithSyntaxHighlighting=i.get(21),this._visibleTextArea=null,this._selections=[new Bn(1,1,1,1)],this._modelSelections=[new Bn(1,1,1,1)],this._lastRenderPosition=null,this.textArea=mb(document.createElement("textarea")),Bb.write(this.textArea,6),this.textArea.setClassName("inputarea "+Bx),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(i)),this.textArea.setAttribute("tabindex",String(i.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",m("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),i.get(30)&&i.get(80)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=mb(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},s={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,b["i"]),n=this._context.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),o=Array.isArray(t)?t:null,r=Array.isArray(t)?t.join(n):t;let s=void 0,a=null;if(e&&(Cx.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&r.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,a=e.mode)}return{isFromEmptySelection:i,multicursorText:o,text:r,html:s,mode:a}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(b["f"]){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let n=this._getWordBeforePosition(t);if(0===n.length&&(n=this._getCharacterBeforePosition(t)),n.length>0)return new yx(n,n.length,n.length,t,t)}}return yx.EMPTY}if(Fi){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[n,i]=this._getAndroidWordAtPosition(t);if(n.length>0)return new yx(n,i,i,t,t)}return yx.EMPTY}return wx.fromEditorSelection(e,r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,n)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)};this._textAreaInput=this._register(new Ex(s,this.textArea)),this._register(this._textAreaInput.onKeyDown(e=>{this._viewController.emitKeyDown(e)})),this._register(this._textAreaInput.onKeyUp(e=>{this._viewController.emitKeyUp(e)})),this._register(this._textAreaInput.onPaste(e=>{let t=!1,n=null,i=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,i=e.metadata.mode),this._viewController.paste(e.text,t,n,i)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):this._viewController.type(e.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(e=>{this._viewController.setSelection(e)})),this._register(this._textAreaInput.onCompositionStart(e=>{const t=this._selections[0].startLineNumber,n=this._selections[0].startColumn+e.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new Mn(t,n,t,n),0,1);const i=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,n);i&&(this._visibleTextArea=new Tx(this._context.viewLayout.getVerticalOffsetForLineNumber(t),i.left,Ox?0:1),this._render()),this.textArea.setClassName(`inputarea ${Bx} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(e=>{this._visibleTextArea&&(this._visibleTextArea=this._visibleTextArea.setWidth(Px(e.data,this._fontInfo)),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName("inputarea "+Bx),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.model.getLineContent(e.lineNumber),i=ay(t);let o=!0,r=e.column,s=!0,a=e.column,l=0;while(l<50&&(o||s)){if(o&&r<=1&&(o=!1),o){const e=n.charCodeAt(r-2),t=i.get(e);0!==t?o=!1:r--}if(s&&a>n.length&&(s=!1),s){const e=n.charCodeAt(a-1),t=i.get(e);0!==t?s=!1:a++}l++}return[n.substring(r-1,a-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),n=ay(this._context.configuration.options.get(115));let i=e.column,o=0;while(i>1){const r=t.charCodeAt(i-2),s=n.get(r);if(0!==s||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber),n=t.charAt(e.column-2);if(!rs(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){const t=e.get(2);return 1===t?m("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",b["d"]?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===Me.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(43),this._lineHeight=t.get(58),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(111))),(e.hasChanged(30)||e.hasChanged(80))&&(t.get(30)&&t.get(80)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new Nn(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():b["f"]?this._renderInsideEditor(this._primaryCursorPosition,t,e,Ox?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,Ox?0:1,Ox?0:1)}_renderInsideEditor(e,t,n,i,o){this._lastRenderPosition=e;const r=this.textArea,s=this.textAreaCover;fb.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(n),r.setWidth(i),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(fb.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),Ox)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const n=this._context.configuration.options;n.get(49)?t.setClassName("monaco-editor-background textAreaCover "+Mx.OUTER_CLASS_NAME):0!==n.get(59).renderType?t.setClassName("monaco-editor-background textAreaCover "+Nx.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}function Px(e,t){const n=document.createElement("canvas"),i=n.getContext("2d");i.font=Fx(t);const o=i.measureText(e);return Bi?o.width+2:o.width}function Fx(e){return jx("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}function jx(e,t,n,i,o){return`${e} normal ${t} ${n}px / ${i}px ${o}`}class zx{static columnSelect(e,t,n,i,o,r){let s=Math.abs(o-n)+1,a=n>o,l=i>r,c=i<r,h=[];for(let u=0;u<s;u++){let o=n+(a?-u:u),s=aE.columnFromVisibleColumn2(e,t,o,i),d=aE.columnFromVisibleColumn2(e,t,o,r),p=aE.visibleColumnFromColumn2(e,t,new Nn(o,s)),f=aE.visibleColumnFromColumn2(e,t,new Nn(o,d));if(c){if(p>r)continue;if(f<i)continue}if(l){if(f>i)continue;if(p<r)continue}h.push(new FE(new Mn(o,s,o,s),0,new Nn(o,d),0))}if(0===h.length)for(let u=0;u<s;u++){const e=n+(a?-u:u),i=t.getLineMaxColumn(e);h.push(new FE(new Mn(e,i,e,i),0,new Nn(e,i),0))}return{viewStates:h,reversed:a,fromLineNumber:n,fromVisualColumn:i,toLineNumber:o,toVisualColumn:r}}static columnSelectLeft(e,t,n){let i=n.toViewVisualColumn;return i>0&&i--,zx.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,i)}static columnSelectRight(e,t,n){let i=0;const o=Math.min(n.fromViewLineNumber,n.toViewLineNumber),r=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let a=o;a<=r;a++){const n=t.getLineMaxColumn(a),o=aE.visibleColumnFromColumn2(e,t,new Nn(a,n));i=Math.max(i,o)}let s=n.toViewVisualColumn;return s<i&&s++,this.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,s)}static columnSelectUp(e,t,n,i){const o=i?e.pageSize:1,r=Math.max(1,n.toViewLineNumber-o);return this.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,r,n.toViewVisualColumn)}static columnSelectDown(e,t,n,i){const o=i?e.pageSize:1,r=Math.min(t.getLineCount(),n.toViewLineNumber+o);return this.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,r,n.toViewVisualColumn)}}class Vx{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations(),i=n[0].range;return new Bn(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)}}class Qx{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations(),i=n[0].range;return new Bn(i.startLineNumber,i.startColumn,i.startLineNumber,i.startColumn)}}class Wx{constructor(e,t,n,i,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations(),i=n[0].range;return new Bn(i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset,i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset)}}class Hx{constructor(e,t,n,i=!1){this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=i,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class Ux{constructor(e,t,n){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}}class Yx{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-us(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const n=t.lineNumber-1;return new Nn(n,e.getLineMaxColumn(n))}return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const i=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),r=UE.atomicPosition(o,t.column-1,n,0);if(-1!==r&&r+1>=i)return new Nn(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,n){const i=e.stickyTabStops?Yx.leftPositionAtomicSoftTabs(t,n,e.tabSize):Yx.leftPosition(t,n);return new Ux(i.lineNumber,i.column,0)}static moveLeft(e,t,n,i,o){let r,s;if(n.hasSelection()&&!i)r=n.selection.startLineNumber,s=n.selection.startColumn;else{const i=n.position.delta(void 0,-(o-1)),a=t.normalizePosition(Yx.clipPositionColumn(i,t),0),l=Yx.left(e,t,a);r=l.lineNumber,s=l.column}return n.move(i,r,s,0)}static clipPositionColumn(e,t){return new Nn(e.lineNumber,Yx.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return e<t?t:e>n?n:e}static rightPosition(e,t,n){return n<e.getLineMaxColumn(t)?n+=hs(e.getLineContent(t),n-1):t<e.getLineCount()&&(t+=1,n=e.getLineMinColumn(t)),new Nn(t,n)}static rightPositionAtomicSoftTabs(e,t,n,i,o){if(n<e.getLineIndentColumn(t)){const o=e.getLineContent(t),r=UE.atomicPosition(o,n-1,i,1);if(-1!==r)return new Nn(t,r+1)}return this.rightPosition(e,t,n)}static right(e,t,n){const i=e.stickyTabStops?Yx.rightPositionAtomicSoftTabs(t,n.lineNumber,n.column,e.tabSize,e.indentSize):Yx.rightPosition(t,n.lineNumber,n.column);return new Ux(i.lineNumber,i.column,0)}static moveRight(e,t,n,i,o){let r,s;if(n.hasSelection()&&!i)r=n.selection.endLineNumber,s=n.selection.endColumn;else{const i=n.position.delta(void 0,o-1),a=t.normalizePosition(Yx.clipPositionColumn(i,t),1),l=Yx.right(e,t,a);r=l.lineNumber,s=l.column}return n.move(i,r,s,0)}static vertical(e,t,n,i,o,r,s){const a=aE.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize)+o,l=t.getLineCount(),c=1===n&&1===i,h=n===l&&i===t.getLineMaxColumn(n),u=r<n?c:h;return n=r,n<1?(n=1,i=s?t.getLineMinColumn(n):Math.min(t.getLineMaxColumn(n),i)):n>l?(n=l,i=s?t.getLineMaxColumn(n):Math.min(t.getLineMaxColumn(n),i)):i=aE.columnFromVisibleColumn2(e,t,n,a),o=u?0:a-aE.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new Ux(n,i,o)}static down(e,t,n,i,o,r,s){return this.vertical(e,t,n,i,o,n+r,s)}static moveDown(e,t,n,i,o){let r,s;n.hasSelection()&&!i?(r=n.selection.endLineNumber,s=n.selection.endColumn):(r=n.position.lineNumber,s=n.position.column);let a=Yx.down(e,t,r,s,n.leftoverVisibleColumns,o,!0);return n.move(i,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,n){let i=n.selection,o=Yx.down(e,t,i.selectionStartLineNumber,i.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),r=Yx.down(e,t,i.positionLineNumber,i.positionColumn,n.leftoverVisibleColumns,1,!1);return new FE(new Mn(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Nn(r.lineNumber,r.column),r.leftoverVisibleColumns)}static up(e,t,n,i,o,r,s){return this.vertical(e,t,n,i,o,n-r,s)}static moveUp(e,t,n,i,o){let r,s;n.hasSelection()&&!i?(r=n.selection.startLineNumber,s=n.selection.startColumn):(r=n.position.lineNumber,s=n.position.column);let a=Yx.up(e,t,r,s,n.leftoverVisibleColumns,o,!0);return n.move(i,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,n){let i=n.selection,o=Yx.up(e,t,i.selectionStartLineNumber,i.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),r=Yx.up(e,t,i.positionLineNumber,i.positionColumn,n.leftoverVisibleColumns,1,!1);return new FE(new Mn(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Nn(r.lineNumber,r.column),r.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,n,i){let o=n.position.lineNumber;while(o>1&&this._isBlankLine(t,o))o--;while(o>1&&!this._isBlankLine(t,o))o--;return n.move(i,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,n,i){const o=t.getLineCount();let r=n.position.lineNumber;while(r<o&&this._isBlankLine(t,r))r++;while(r<o&&!this._isBlankLine(t,r))r++;return n.move(i,r,t.getLineMinColumn(r),0)}static moveToBeginningOfLine(e,t,n,i){let o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s,l=n.position.column;return o=l===a?s:a,n.move(i,r,o,0)}static moveToEndOfLine(e,t,n,i,o){let r=n.position.lineNumber,s=t.getLineMaxColumn(r);return n.move(i,r,s,o?1073741824-s:0)}static moveToBeginningOfBuffer(e,t,n,i){return n.move(i,1,1,0)}static moveToEndOfBuffer(e,t,n,i){let o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0)}}class Gx{static deleteRight(e,t,n,i){let o=[],r=3!==e;for(let s=0,a=i.length;s<a;s++){const e=i[s];let a=e;if(a.isEmpty()){let i=e.getPosition(),o=Yx.right(t,n,i);a=new Mn(o.lineNumber,o.column,i.lineNumber,i.column)}a.isEmpty()?o[s]=null:(a.startLineNumber!==a.endLineNumber&&(r=!0),o[s]=new Vx(a,""))}return[r,o]}static isAutoClosingPairDelete(e,t,n,i,o,r,s){if("never"===t&&"never"===n)return!1;if("never"===e)return!1;for(let a=0,l=r.length;a<l;a++){const l=r[a],c=l.getPosition();if(!l.isEmpty())return!1;const h=o.getLineContent(c.lineNumber);if(c.column<2||c.column>=h.length+1)return!1;const u=h.charAt(c.column-2),d=i.get(u);if(!d)return!1;if(HE(u)){if("never"===n)return!1}else if("never"===t)return!1;const p=h.charAt(c.column-1);let f=!1;for(const e of d)e.open===u&&e.close===p&&(f=!0);if(!f)return!1;if("auto"===e){let e=!1;for(let t=0,n=s.length;t<n;t++){const n=s[t];if(c.lineNumber===n.startLineNumber&&c.column===n.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingPairDelete(e,t,n){let i=[];for(let o=0,r=n.length;o<r;o++){const e=n[o].getPosition(),t=new Mn(e.lineNumber,e.column-1,e.lineNumber,e.column+1);i[o]=new Vx(t,"")}return[!0,i]}static deleteLeft(e,t,n,i,o){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,n,i,o))return this._runAutoClosingPairDelete(t,n,i);const r=[];let s=2!==e;for(let a=0,l=i.length;a<l;a++){let e=Gx.getDeleteRange(i[a],n,t);e.isEmpty()?r[a]=null:(e.startLineNumber!==e.endLineNumber&&(s=!0),r[a]=new Vx(e,""))}return[s,r]}static getDeleteRange(e,t,n){if(!e.isEmpty())return e;const i=e.getPosition();if(n.useTabStops&&i.column>1){const e=t.getLineContent(i.lineNumber),o=Hr(e),r=-1===o?e.length+1:o+1;if(i.column<=r){const e=aE.visibleColumnFromColumn2(n,t,i),o=aE.prevIndentTabStop(e,n.indentSize),r=aE.columnFromVisibleColumn2(n,t,i.lineNumber,o);return new Mn(i.lineNumber,r,i.lineNumber,i.column)}}return Mn.fromPositions(Gx.getPositionAfterDeleteLeft(i,t),i)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const n=Is(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}if(e.lineNumber>1){const n=e.lineNumber-1;return new Nn(n,t.getLineMaxColumn(n))}return e}static cut(e,t,n){let i=[];for(let o=0,r=n.length;o<r;o++){const r=n[o];if(r.isEmpty())if(e.emptySelectionClipboard){let e,n,s,a,l=r.getPosition();l.lineNumber<t.getLineCount()?(e=l.lineNumber,n=1,s=l.lineNumber+1,a=1):l.lineNumber>1?(e=l.lineNumber-1,n=t.getLineMaxColumn(l.lineNumber-1),s=l.lineNumber,a=t.getLineMaxColumn(l.lineNumber)):(e=l.lineNumber,n=1,s=l.lineNumber,a=t.getLineMaxColumn(l.lineNumber));let c=new Mn(e,n,s,a);c.isEmpty()?i[o]=null:i[o]=new Vx(c,"")}else i[o]=null;else i[o]=new Vx(r,"")}return new WE(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class Kx{static _createWord(e,t,n,i,o){return{start:i,end:o,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){let i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)}static _doFindPreviousWordOnLine(e,t,n){let i=0;for(let o=n.column-2;o>=0;o--){let n=e.charCodeAt(o),r=t.get(n);if(0===r){if(2===i)return this._createWord(e,i,r,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===r){if(1===i)return this._createWord(e,i,r,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===r&&0!==i)return this._createWord(e,i,r,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null}static _findEndOfWord(e,t,n,i){let o=e.length;for(let r=i;r<o;r++){let i=e.charCodeAt(r),o=t.get(i);if(1===o)return r;if(1===n&&2===o)return r;if(2===n&&0===o)return r}return o}static _findNextWordOnLine(e,t,n){let i=t.getLineContent(n.lineNumber);return this._doFindNextWordOnLine(i,e,n)}static _doFindNextWordOnLine(e,t,n){let i=0,o=e.length;for(let r=n.column-1;r<o;r++){let n=e.charCodeAt(r),o=t.get(n);if(0===o){if(2===i)return this._createWord(e,i,o,this._findStartOfWord(e,t,i,r-1),r);i=1}else if(2===o){if(1===i)return this._createWord(e,i,o,this._findStartOfWord(e,t,i,r-1),r);i=2}else if(1===o&&0!==i)return this._createWord(e,i,o,this._findStartOfWord(e,t,i,r-1),r)}return 0!==i?this._createWord(e,i,1,this._findStartOfWord(e,t,i,o-1),o):null}static _findStartOfWord(e,t,n,i){for(let o=i;o>=0;o--){let i=e.charCodeAt(o),r=t.get(i);if(1===r)return o+1;if(1===n&&2===r)return o+1;if(2===n&&0===r)return o+1}return 0}static moveWordLeft(e,t,n,i){let o=n.lineNumber,r=n.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=Kx._findPreviousWordOnLine(e,t,new Nn(o,r));if(0===i)return new Nn(o,s?s.start+1:1);if(1===i)return s&&2===s.wordType&&s.end-s.start===1&&0===s.nextCharClass&&(s=Kx._findPreviousWordOnLine(e,t,new Nn(o,s.start+1))),new Nn(o,s?s.start+1:1);if(3===i){while(s&&2===s.wordType)s=Kx._findPreviousWordOnLine(e,t,new Nn(o,s.start+1));return new Nn(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=Kx._findPreviousWordOnLine(e,t,new Nn(o,s.start+1))),new Nn(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){const n=t.lineNumber,i=e.getLineMaxColumn(n);if(1===t.column)return n>1?new Nn(n-1,e.getLineMaxColumn(n-1)):t;const o=e.getLineContent(n);for(let r=t.column-1;r>1;r--){const e=o.charCodeAt(r-2),t=o.charCodeAt(r-1);if(95===e&&95!==t)return new Nn(n,r);if($r(e)&&Xr(t))return new Nn(n,r);if(Xr(e)&&Xr(t)&&r+1<i){const e=o.charCodeAt(r);if($r(e))return new Nn(n,r)}}return new Nn(n,1)}static moveWordRight(e,t,n,i){let o=n.lineNumber,r=n.column,s=!1;r===t.getLineMaxColumn(o)&&o<t.getLineCount()&&(s=!0,o+=1,r=1);let a=Kx._findNextWordOnLine(e,t,new Nn(o,r));if(2===i)a&&2===a.wordType&&a.end-a.start===1&&0===a.nextCharClass&&(a=Kx._findNextWordOnLine(e,t,new Nn(o,a.end+1))),r=a?a.end+1:t.getLineMaxColumn(o);else if(3===i){s&&(r=0);while(a&&(2===a.wordType||a.start+1<=r))a=Kx._findNextWordOnLine(e,t,new Nn(o,a.end+1));r=a?a.start+1:t.getLineMaxColumn(o)}else a&&!s&&r>=a.start+1&&(a=Kx._findNextWordOnLine(e,t,new Nn(o,a.end+1))),r=a?a.start+1:t.getLineMaxColumn(o);return new Nn(o,r)}static _moveWordPartRight(e,t){const n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===i)return n<e.getLineCount()?new Nn(n+1,1):t;const o=e.getLineContent(n);for(let r=t.column+1;r<i;r++){const e=o.charCodeAt(r-2),t=o.charCodeAt(r-1);if(95!==e&&95===t)return new Nn(n,r);if($r(e)&&Xr(t))return new Nn(n,r);if(Xr(e)&&Xr(t)&&r+1<i){const e=o.charCodeAt(r);if($r(e))return new Nn(n,r)}}return new Nn(n,i)}static _deleteWordLeftWhitespace(e,t){const n=e.getLineContent(t.lineNumber),i=t.column-2,o=Yr(n,i);return o+1<i?new Mn(t.lineNumber,o+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const n=e.wordSeparators,i=e.model,o=e.selection,r=e.whitespaceHeuristics;if(!o.isEmpty())return o;if(Gx.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const t=e.selection.getPosition();return new Mn(t.lineNumber,t.column-1,t.lineNumber,t.column+1)}const s=new Nn(o.positionLineNumber,o.positionColumn);let a=s.lineNumber,l=s.column;if(1===a&&1===l)return null;if(r){let e=this._deleteWordLeftWhitespace(i,s);if(e)return e}let c=Kx._findPreviousWordOnLine(n,i,s);return 0===t?c?l=c.start+1:l>1?l=1:(a--,l=i.getLineMaxColumn(a)):(c&&l<=c.end+1&&(c=Kx._findPreviousWordOnLine(n,i,new Nn(a,c.start+1))),c?l=c.end+1:l>1?l=1:(a--,l=i.getLineMaxColumn(a))),new Mn(a,l,s.lineNumber,s.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;const i=new Nn(n.positionLineNumber,n.positionColumn);let o=this._deleteInsideWordWhitespace(t,i);return o||this._deleteInsideWordDetermineDeleteRange(e,t,i)}static _charAtIsWhitespace(e,t){const n=e.charCodeAt(t);return 32===n||9===n}static _deleteInsideWordWhitespace(e,t){const n=e.getLineContent(t.lineNumber),i=n.length;if(0===i)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,o))return null;let r=Math.min(t.column-1,i-1);if(!this._charAtIsWhitespace(n,r))return null;while(o>0&&this._charAtIsWhitespace(n,o-1))o--;while(r+1<i&&this._charAtIsWhitespace(n,r+1))r++;return new Mn(t.lineNumber,o+1,t.lineNumber,r+2)}static _deleteInsideWordDetermineDeleteRange(e,t,n){const i=t.getLineContent(n.lineNumber),o=i.length;if(0===o)return n.lineNumber>1?new Mn(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumber<t.getLineCount()?new Mn(n.lineNumber,1,n.lineNumber+1,1):new Mn(n.lineNumber,1,n.lineNumber,1);const r=e=>e.start+1<=n.column&&n.column<=e.end+1,s=(e,t)=>(e=Math.min(e,n.column),t=Math.max(t,n.column),new Mn(n.lineNumber,e,n.lineNumber,t)),a=e=>{let t=e.start+1,n=e.end+1,r=!1;while(n-1<o&&this._charAtIsWhitespace(i,n-1))r=!0,n++;if(!r)while(t>1&&this._charAtIsWhitespace(i,t-2))t--;return s(t,n)},l=Kx._findPreviousWordOnLine(e,t,n);if(l&&r(l))return a(l);const c=Kx._findNextWordOnLine(e,t,n);return c&&r(c)?a(c):l&&c?s(l.end+1,c.start+1):l?s(l.start+1,l.end+1):c?s(c.start+1,c.end+1):s(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const n=t.getPosition(),i=Kx._moveWordPartLeft(e,n);return new Mn(n.lineNumber,n.column,i.lineNumber,i.column)}static _findFirstNonWhitespaceChar(e,t){let n=e.length;for(let i=t;i<n;i++){let t=e.charAt(i);if(" "!==t&&"\t"!==t)return i}return n}static _deleteWordRightWhitespace(e,t){const n=e.getLineContent(t.lineNumber),i=t.column-1,o=this._findFirstNonWhitespaceChar(n,i);return i+1<o?new Mn(t.lineNumber,t.column,t.lineNumber,o+1):null}static deleteWordRight(e,t){const n=e.wordSeparators,i=e.model,o=e.selection,r=e.whitespaceHeuristics;if(!o.isEmpty())return o;const s=new Nn(o.positionLineNumber,o.positionColumn);let a=s.lineNumber,l=s.column;const c=i.getLineCount(),h=i.getLineMaxColumn(a);if(a===c&&l===h)return null;if(r){let e=this._deleteWordRightWhitespace(i,s);if(e)return e}let u=Kx._findNextWordOnLine(n,i,s);return 2===t?u?l=u.end+1:l<h||a===c?l=h:(a++,u=Kx._findNextWordOnLine(n,i,new Nn(a,1)),l=u?u.start+1:i.getLineMaxColumn(a)):(u&&l>=u.start+1&&(u=Kx._findNextWordOnLine(n,i,new Nn(a,u.end+1))),u?l=u.start+1:l<h||a===c?l=h:(a++,u=Kx._findNextWordOnLine(n,i,new Nn(a,1)),l=u?u.start+1:i.getLineMaxColumn(a))),new Mn(a,l,s.lineNumber,s.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const n=t.getPosition(),i=Kx._moveWordPartRight(e,n);return new Mn(n.lineNumber,n.column,i.lineNumber,i.column)}static _createWordAtPosition(e,t,n){const i=new Mn(t,n.start+1,t,n.end+1);return{word:e.getValueInRange(i),startColumn:i.startColumn,endColumn:i.endColumn}}static getWordAtPosition(e,t,n){const i=ay(t),o=Kx._findPreviousWordOnLine(i,e,n);if(o&&1===o.wordType&&o.start<=n.column-1&&n.column-1<=o.end)return Kx._createWordAtPosition(e,n.lineNumber,o);const r=Kx._findNextWordOnLine(i,e,n);return r&&1===r.wordType&&r.start<=n.column-1&&n.column-1<=r.end?Kx._createWordAtPosition(e,n.lineNumber,r):null}static word(e,t,n,i,o){const r=ay(e.wordSeparators);let s,a,l=Kx._findPreviousWordOnLine(r,t,o),c=Kx._findNextWordOnLine(r,t,o);if(!i){let e,n;return l&&1===l.wordType&&l.start<=o.column-1&&o.column-1<=l.end?(e=l.start+1,n=l.end+1):c&&1===c.wordType&&c.start<=o.column-1&&o.column-1<=c.end?(e=c.start+1,n=c.end+1):(e=l?l.end+1:1,n=c?c.start+1:t.getLineMaxColumn(o.lineNumber)),new FE(new Mn(o.lineNumber,e,o.lineNumber,n),0,new Nn(o.lineNumber,n),0)}l&&1===l.wordType&&l.start<o.column-1&&o.column-1<l.end?(s=l.start+1,a=l.end+1):c&&1===c.wordType&&c.start<o.column-1&&o.column-1<c.end?(s=c.start+1,a=c.end+1):(s=o.column,a=o.column);let h,u=o.lineNumber;if(n.selectionStart.containsPosition(o))h=n.selectionStart.endColumn;else if(o.isBeforeOrEqual(n.selectionStart.getStartPosition())){h=s;let e=new Nn(u,h);n.selectionStart.containsPosition(e)&&(h=n.selectionStart.endColumn)}else{h=a;let e=new Nn(u,h);n.selectionStart.containsPosition(e)&&(h=n.selectionStart.startColumn)}return n.move(!0,u,h,0)}}class qx{static addCursorDown(e,t,n){let i=[],o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];i[o++]=new QE(s.modelState,s.viewState),i[o++]=n?QE.fromModelState(Yx.translateDown(e.cursorConfig,e.model,s.modelState)):QE.fromViewState(Yx.translateDown(e.cursorConfig,e,s.viewState))}return i}static addCursorUp(e,t,n){let i=[],o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];i[o++]=new QE(s.modelState,s.viewState),i[o++]=n?QE.fromModelState(Yx.translateUp(e.cursorConfig,e.model,s.modelState)):QE.fromViewState(Yx.translateUp(e.cursorConfig,e,s.viewState))}return i}static moveToBeginningOfLine(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];i[o]=this._moveToLineStart(e,r,n)}return i}static _moveToLineStart(e,t,n){const i=t.viewState.position.column,o=t.modelState.position.column,r=i===o,s=t.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(s),l=i===a;return r||l?this._moveToLineStartByModel(e,t,n):this._moveToLineStartByView(e,t,n)}static _moveToLineStartByView(e,t,n){return QE.fromViewState(Yx.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,n))}static _moveToLineStartByModel(e,t,n){return QE.fromModelState(Yx.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,n))}static moveToEndOfLine(e,t,n,i){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=this._moveToLineEnd(e,s,n,i)}return o}static _moveToLineEnd(e,t,n,i){const o=t.viewState.position,r=e.getLineMaxColumn(o.lineNumber),s=o.column===r,a=t.modelState.position,l=e.model.getLineMaxColumn(a.lineNumber),c=r-o.column===l-a.column;return s||c?this._moveToLineEndByModel(e,t,n,i):this._moveToLineEndByView(e,t,n,i)}static _moveToLineEndByView(e,t,n,i){return QE.fromViewState(Yx.moveToEndOfLine(e.cursorConfig,e,t.viewState,n,i))}static _moveToLineEndByModel(e,t,n,i){return QE.fromModelState(Yx.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,n,i))}static expandLineSelection(e,t){let n=[];for(let i=0,o=t.length;i<o;i++){const o=t[i],r=o.modelState.selection.startLineNumber,s=e.model.getLineCount();let a,l=o.modelState.selection.endLineNumber;l===s?a=e.model.getLineMaxColumn(s):(l++,a=1),n[i]=QE.fromModelState(new FE(new Mn(r,1,r,1),0,new Nn(l,a),0))}return n}static moveToBeginningOfBuffer(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];i[o]=QE.fromModelState(Yx.moveToBeginningOfBuffer(e.cursorConfig,e.model,r.modelState,n))}return i}static moveToEndOfBuffer(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];i[o]=QE.fromModelState(Yx.moveToEndOfBuffer(e.cursorConfig,e.model,r.modelState,n))}return i}static selectAll(e,t){const n=e.model.getLineCount(),i=e.model.getLineMaxColumn(n);return QE.fromModelState(new FE(new Mn(1,1,1,1),0,new Nn(n,i),0))}static line(e,t,n,i,o){const r=e.model.validatePosition(i),s=o?e.coordinatesConverter.validateViewPosition(new Nn(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);if(!n||!t.modelState.hasSelection()){const t=e.model.getLineCount();let n=r.lineNumber+1,i=1;return n>t&&(n=t,i=e.model.getLineMaxColumn(n)),QE.fromModelState(new FE(new Mn(r.lineNumber,1,n,i),0,new Nn(n,i),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<a)return QE.fromViewState(t.viewState.move(t.modelState.hasSelection(),s.lineNumber,1,0));if(r.lineNumber>a){const n=e.getLineCount();let i=s.lineNumber+1,o=1;return i>n&&(i=n,o=e.getLineMaxColumn(i)),QE.fromViewState(t.viewState.move(t.modelState.hasSelection(),i,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return QE.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,n,i){const o=e.model.validatePosition(i);return QE.fromModelState(Kx.word(e.cursorConfig,e.model,t.modelState,n,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new QE(t.modelState,t.viewState);const n=t.viewState.position.lineNumber,i=t.viewState.position.column;return QE.fromViewState(new FE(new Mn(n,i,n,i),0,new Nn(n,i),0))}static moveTo(e,t,n,i,o){const r=e.model.validatePosition(i),s=o?e.coordinatesConverter.validateViewPosition(new Nn(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return QE.fromViewState(t.viewState.move(n,s.lineNumber,s.column,0))}static simpleMove(e,t,n,i,o,r){switch(n){case 0:return 4===r?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===r?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===r?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===r?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return 2===r?t.map(t=>QE.fromViewState(Yx.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,i))):t.map(t=>QE.fromModelState(Yx.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,i)));case 5:return 2===r?t.map(t=>QE.fromViewState(Yx.moveToNextBlankLine(e.cursorConfig,e,t.viewState,i))):t.map(t=>QE.fromModelState(Yx.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,i)));case 6:return this._moveToViewMinColumn(e,t,i);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 8:return this._moveToViewCenterColumn(e,t,i);case 9:return this._moveToViewMaxColumn(e,t,i);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,i);default:return null}}static viewportMove(e,t,n,i,o){const r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(n){case 11:{const n=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,r)]}case 13:{const n=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,r)]}case 12:{const n=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,o)]}case 14:{let n=[];for(let o=0,s=t.length;o<s;o++){const s=t[o];n[o]=this.findPositionInViewportIfOutside(e,s,r,i)}return n}default:return null}}static findPositionInViewportIfOutside(e,t,n,i){let o=t.viewState.position.lineNumber;if(n.startLineNumber<=o&&o<=n.endLineNumber-1)return new QE(t.modelState,t.viewState);{let r;r=o>n.endLineNumber-1?n.endLineNumber-1:o<n.startLineNumber?n.startLineNumber:o;const s=Yx.vertical(e.cursorConfig,e,o,t.viewState.position.column,t.viewState.leftoverVisibleColumns,r,!1);return QE.fromViewState(t.viewState.move(i,s.lineNumber,s.column,s.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,t,n){let i=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(i)&&i++,Math.min(t.endLineNumber,i+n-1)}static _lastLineNumberInRange(e,t,n){let i=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(i)&&i++,Math.max(i,t.endLineNumber-n+1)}static _moveLeft(e,t,n,i){return t.map(t=>QE.fromViewState(Yx.moveLeft(e.cursorConfig,e,t.viewState,n,i)))}static _moveHalfLineLeft(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round(e.getLineContent(s).length/2);i[o]=QE.fromViewState(Yx.moveLeft(e.cursorConfig,e,r.viewState,n,a))}return i}static _moveRight(e,t,n,i){return t.map(t=>QE.fromViewState(Yx.moveRight(e.cursorConfig,e,t.viewState,n,i)))}static _moveHalfLineRight(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round(e.getLineContent(s).length/2);i[o]=QE.fromViewState(Yx.moveRight(e.cursorConfig,e,r.viewState,n,a))}return i}static _moveDownByViewLines(e,t,n,i){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=QE.fromViewState(Yx.moveDown(e.cursorConfig,e,s.viewState,n,i))}return o}static _moveDownByModelLines(e,t,n,i){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=QE.fromModelState(Yx.moveDown(e.cursorConfig,e.model,s.modelState,n,i))}return o}static _moveUpByViewLines(e,t,n,i){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=QE.fromViewState(Yx.moveUp(e.cursorConfig,e,s.viewState,n,i))}return o}static _moveUpByModelLines(e,t,n,i){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=QE.fromModelState(Yx.moveUp(e.cursorConfig,e.model,s.modelState,n,i))}return o}static _moveToViewPosition(e,t,n,i,o){return QE.fromViewState(t.viewState.move(n,i,o,0))}static _moveToModelPosition(e,t,n,i,o){return QE.fromModelState(t.modelState.move(n,i,o,0))}static _moveToViewMinColumn(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineMinColumn(s);i[o]=this._moveToViewPosition(e,r,n,s,a)}return i}static _moveToViewFirstNonWhitespaceColumn(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(s);i[o]=this._moveToViewPosition(e,r,n,s,a)}return i}static _moveToViewCenterColumn(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round((e.getLineMaxColumn(s)+e.getLineMinColumn(s))/2);i[o]=this._moveToViewPosition(e,r,n,s,a)}return i}static _moveToViewMaxColumn(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineMaxColumn(s);i[o]=this._moveToViewPosition(e,r,n,s,a)}return i}static _moveToViewLastNonWhitespaceColumn(e,t,n){let i=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineLastNonWhitespaceColumn(s);i[o]=this._moveToViewPosition(e,r,n,s,a)}return i}}var Jx;(function(e){const t=function(e){if(!oa(e))return!1;let t=e;return!!ia(t.to)&&(!(!aa(t.select)&&!sa(t.select))&&(!(!aa(t.by)&&!ia(t.by))&&!(!aa(t.value)&&!ra(t.value))))};function n(t){if(!t.to)return null;let n;switch(t.to){case e.RawDirection.Left:n=0;break;case e.RawDirection.Right:n=1;break;case e.RawDirection.Up:n=2;break;case e.RawDirection.Down:n=3;break;case e.RawDirection.PrevBlankLine:n=4;break;case e.RawDirection.NextBlankLine:n=5;break;case e.RawDirection.WrappedLineStart:n=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case e.RawDirection.WrappedLineColumnCenter:n=8;break;case e.RawDirection.WrappedLineEnd:n=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case e.RawDirection.ViewPortTop:n=11;break;case e.RawDirection.ViewPortBottom:n=13;break;case e.RawDirection.ViewPortCenter:n=12;break;case e.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let i=0;switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Character:i=3;break;case e.RawUnit.HalfLine:i=4;break}return{direction:n,unit:i,select:!!t.select,value:t.value||1}}e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=n})(Jx||(Jx={}));const $x=Object.create(null);function Xx(e,t){if(t<=0)return"";$x[e]||($x[e]=["",e]);const n=$x[e];for(let i=n.length;i<=t;i++)n[i]=n[i-1]+e;return n[t]}class Zx{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,n,i,o){const r=aE.visibleColumnFromColumn(e,t,n);if(o){const e=Xx(" ",i),t=aE.prevIndentTabStop(r,i),n=t/i;return Xx(e,n)}{const e="\t",t=aE.prevRenderTabStop(r,n),i=t/n;return Xx(e,i)}}static shiftIndent(e,t,n,i,o){const r=aE.visibleColumnFromColumn(e,t,n);if(o){const e=Xx(" ",i),t=aE.nextIndentTabStop(r,i),n=t/i;return Xx(e,n)}{const e="\t",t=aE.nextRenderTabStop(r,n),i=t/n;return Xx(e,i)}}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){const n=this._selection.startLineNumber;let i=this._selection.endLineNumber;1===this._selection.endColumn&&n!==i&&(i-=1);const{tabSize:o,indentSize:r,insertSpaces:s}=this._opts,a=n===i;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,c=0;for(let h=n;h<=i;h++,l=c){c=0;let i,u=e.getLineContent(h),d=Hr(u);if((!this._opts.isUnshift||0!==u.length&&0!==d)&&(a||this._opts.isUnshift||0!==u.length)){if(-1===d&&(d=u.length),h>1){let t=aE.visibleColumnFromColumn(u,d+1,o);if(t%r!==0&&e.isCheapToTokenize(h-1)){let t=Wh.getEnterAction(this._opts.autoIndent,e,new Mn(h-1,e.getLineMaxColumn(h-1),h-1,e.getLineMaxColumn(h-1)));if(t){if(c=l,t.appendText)for(let e=0,n=t.appendText.length;e<n&&c<r;e++){if(32!==t.appendText.charCodeAt(e))break;c++}t.removeText&&(c=Math.max(0,c-t.removeText));for(let e=0;e<c;e++){if(0===d||32!==u.charCodeAt(d-1))break;d--}}}}this._opts.isUnshift&&0===d||(i=this._opts.isUnshift?Zx.unshiftIndent(u,d+1,o,r,s):Zx.shiftIndent(u,d+1,o,r,s),this._addEditOperation(t,new Mn(h,1,h,d+1),i),h!==n||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=d+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(n)&&(this._useLastEditRangeForCursorEndPosition=!0);const o=s?Xx(" ",r):"\t";for(let s=n;s<=i;s++){const i=e.getLineContent(s);let l=Hr(i);if((!this._opts.isUnshift||0!==i.length&&0!==l)&&((a||this._opts.isUnshift||0!==i.length)&&(-1===l&&(l=i.length),!this._opts.isUnshift||0!==l)))if(this._opts.isUnshift){l=Math.min(l,r);for(let e=0;e<l;e++){const t=i.charCodeAt(e);if(9===t){l=e+1;break}}this._addEditOperation(t,new Mn(s,1,s,l+1),"")}else this._addEditOperation(t,new Mn(s,1,s,1),o),s!==n||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let e=t.getInverseEditOperations()[0];return new Bn(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}const n=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let e=this._selection.startColumn,t=n.startColumn;return t<=e?n:0===n.getDirection()?new Bn(n.startLineNumber,e,n.endLineNumber,n.endColumn):new Bn(n.endLineNumber,n.endColumn,n.startLineNumber,e)}return n}}class eS{constructor(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}getEditOperations(e,t){t.addTrackedEditOperation(new Mn(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new Mn(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let n=t.getInverseEditOperations(),i=n[0].range,o=n[1].range;return new Bn(i.endLineNumber,i.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class tS{static indent(e,t,n){if(null===t||null===n)return[];let i=[];for(let o=0,r=n.length;o<r;o++)i[o]=new Zx(n[o],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return i}static outdent(e,t,n){let i=[];for(let o=0,r=n.length;o<r;o++)i[o]=new Zx(n[o],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return i}static shiftIndent(e,t,n){return n=n||1,Zx.shiftIndent(t,t.length+n,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,n){return n=n||1,Zx.unshiftIndent(t,t.length+n,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,n,i){let o=[];for(let r=0,s=n.length;r<s;r++)o[r]=new Vx(n[r],i[r]);return new WE(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,n,i,o){let r=[];for(let s=0,a=n.length;s<a;s++){const e=n[s];let t=e.getPosition();if(o&&!e.isEmpty()&&(o=!1),o&&i.indexOf("\n")!==i.length-1&&(o=!1),o){let n=new Mn(t.lineNumber,1,t.lineNumber,1);r[s]=new Hx(n,i,e,!0)}else r[s]=new Vx(e,i)}return new WE(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,n,i,o){if(i)return null;if(1===t.length)return null;if(o&&o.length===t.length)return o;if("spread"===e.multiCursorPaste){10===n.charCodeAt(n.length-1)&&(n=n.substr(0,n.length-1)),13===n.charCodeAt(n.length-1)&&(n=n.substr(0,n.length-1));let e=Wr(n);if(e.length===t.length)return e}return null}static paste(e,t,n,i,o,r){const s=this._distributePasteToCursors(e,n,i,o,r);return s?(n=n.sort(Mn.compareRangesUsingStarts),this._distributedPaste(e,t,n,s)):this._simplePaste(e,t,n,i,o)}static _goodIndentForLine(e,t,n){let i=null,o="";const r=Wh.getInheritIndentForLine(e.autoIndent,t,n,!1);if(r)i=r.action,o=r.indentation;else if(n>1){let i;for(i=n-1;i>=1;i--){const e=t.getLineContent(i),n=Yr(e);if(n>=0)break}if(i<1)return null;const r=t.getLineMaxColumn(i),s=Wh.getEnterAction(e.autoIndent,t,new Mn(i,r,i,r));s&&(o=s.indentation+s.appendText)}return i&&(i===Zc.Indent&&(o=tS.shiftIndent(e,o)),i===Zc.Outdent&&(o=tS.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,n,i){let o="",r=n.getStartPosition();if(e.insertSpaces){let n=aE.visibleColumnFromColumn2(e,t,r),i=e.indentSize,s=i-n%i;for(let e=0;e<s;e++)o+=" "}else o="\t";return new Vx(n,o,i)}static tab(e,t,n){let i=[];for(let o=0,r=n.length;o<r;o++){const r=n[o];if(r.isEmpty()){let n=t.getLineContent(r.startLineNumber);if(/^\s*$/.test(n)&&t.isCheapToTokenize(r.startLineNumber)){let s=this._goodIndentForLine(e,t,r.startLineNumber);s=s||"\t";let a=e.normalizeIndentation(s);if(!n.startsWith(a)){i[o]=new Vx(new Mn(r.startLineNumber,1,r.startLineNumber,n.length+1),a,!0);continue}}i[o]=this._replaceJumpToNextIndent(e,t,r,!0)}else{if(r.startLineNumber===r.endLineNumber){let n=t.getLineMaxColumn(r.startLineNumber);if(1!==r.startColumn||r.endColumn!==n){i[o]=this._replaceJumpToNextIndent(e,t,r,!1);continue}}i[o]=new Zx(r,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return i}static compositionType(e,t,n,i,o,r,s,a){const l=i.map(e=>this._compositionType(n,e,o,r,s,a));return new WE(4,l,{shouldPushStackElementBefore:oS(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,i,o,r){if(!t.isEmpty())return null;const s=t.getPosition(),a=Math.max(1,s.column-i),l=Math.min(e.getLineMaxColumn(s.lineNumber),s.column+o),c=new Mn(s.lineNumber,a,s.lineNumber,l),h=e.getValueInRange(c);return h===n&&0===r?null:new Wx(c,n,0,r)}static _typeCommand(e,t,n){return n?new Qx(e,t,!0):new Vx(e,t,!0)}static _enter(e,t,n,i){if(0===e.autoIndent)return tS._typeCommand(i,"\n",n);if(!t.isCheapToTokenize(i.getStartPosition().lineNumber)||1===e.autoIndent){let o=t.getLineContent(i.startLineNumber),r=Ur(o).substring(0,i.startColumn-1);return tS._typeCommand(i,"\n"+e.normalizeIndentation(r),n)}const o=Wh.getEnterAction(e.autoIndent,t,i);if(o){if(o.indentAction===Zc.None)return tS._typeCommand(i,"\n"+e.normalizeIndentation(o.indentation+o.appendText),n);if(o.indentAction===Zc.Indent)return tS._typeCommand(i,"\n"+e.normalizeIndentation(o.indentation+o.appendText),n);if(o.indentAction===Zc.IndentOutdent){const t=e.normalizeIndentation(o.indentation),r=e.normalizeIndentation(o.indentation+o.appendText),s="\n"+r+"\n"+t;return n?new Qx(i,s,!0):new Wx(i,s,-1,r.length-t.length,!0)}if(o.indentAction===Zc.Outdent){const t=tS.unshiftIndent(e,o.indentation);return tS._typeCommand(i,"\n"+e.normalizeIndentation(t+o.appendText),n)}}const r=t.getLineContent(i.startLineNumber),s=Ur(r).substring(0,i.startColumn-1);if(e.autoIndent>=4){const o=Wh.getIndentForEnter(e.autoIndent,t,i,{unshiftIndent:t=>tS.unshiftIndent(e,t),shiftIndent:t=>tS.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(o){let r=aE.visibleColumnFromColumn2(e,t,i.getEndPosition());const s=i.endColumn,a=t.getLineContent(i.endLineNumber),l=Hr(a);if(i=l>=0?i.setEndPosition(i.endLineNumber,Math.max(i.endColumn,l+1)):i.setEndPosition(i.endLineNumber,t.getLineMaxColumn(i.endLineNumber)),n)return new Qx(i,"\n"+e.normalizeIndentation(o.afterEnter),!0);{let t=0;return s<=l+1&&(e.insertSpaces||(r=Math.ceil(r/e.indentSize)),t=Math.min(r+1-e.normalizeIndentation(o.afterEnter).length-1,0)),new Wx(i,"\n"+e.normalizeIndentation(o.afterEnter),0,t,!0)}}}return tS._typeCommand(i,"\n"+e.normalizeIndentation(s),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let i=0,o=n.length;i<o;i++)if(!t.isCheapToTokenize(n[i].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,n,i){const o=Wh.getIndentationAtPosition(t,n.startLineNumber,n.startColumn),r=Wh.getIndentActionForType(e.autoIndent,t,n,i,{shiftIndent:t=>tS.shiftIndent(e,t),unshiftIndent:t=>tS.unshiftIndent(e,t)});if(null===r)return null;if(r!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return 0===o?tS._typeCommand(new Mn(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(r)+i,!1):tS._typeCommand(new Mn(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(r)+t.getLineContent(n.startLineNumber).substring(o-1,n.startColumn-1)+i,!1)}return null}static _isAutoClosingOvertype(e,t,n,i,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,s=n.length;r<s;r++){const s=n[r];if(!s.isEmpty())return!1;const a=s.getPosition(),l=t.getLineContent(a.lineNumber),c=l.charAt(a.column-1);if(c!==o)return!1;const h=HE(o),u=a.column>2?l.charCodeAt(a.column-2):0;if(92===u&&h)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,n=i.length;t<n;t++){const n=i[t];if(a.lineNumber===n.startLineNumber&&a.column===n.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingOvertype(e,t,n,i,o){let r=[];for(let s=0,a=i.length;s<a;s++){const e=i[s],t=e.getPosition(),n=new Mn(t.lineNumber,t.column,t.lineNumber,t.column+1);r[s]=new Vx(n,o)}return new WE(4,r,{shouldPushStackElementBefore:oS(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const n=t.charAt(0),i=e.autoClosingPairs.autoClosingPairsOpenByStart.get(n)||[],o=e.autoClosingPairs.autoClosingPairsCloseByStart.get(n)||[],r=i.some(e=>t.startsWith(e.open)),s=o.some(e=>t.startsWith(e.close));return!r&&s}static _findAutoClosingPairOpen(e,t,n,i){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(i);if(!o)return null;let r=null;for(const s of o)if(null===r||s.open.length>r.open.length){let e=!0;for(const o of n){const n=t.getValueInRange(new Mn(o.lineNumber,o.column-s.open.length+1,o.lineNumber,o.column));if(n+i!==s.open){e=!1;break}}e&&(r=s)}return r}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";const n=t.close.charAt(t.close.length-1),i=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let o=null;for(const r of i)r.open!==t.open&&t.open.includes(r.open)&&t.close.endsWith(r.close)&&(!o||r.open.length>o.open.length)&&(o=r);return o?o.close:""}static _getAutoClosingPairClose(e,t,n,i,o){const r=HE(i),s=r?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===s)return null;const a=this._findAutoClosingPairOpen(e,t,n.map(e=>e.getPosition()),i);if(!a)return null;const l=this._findSubAutoClosingPairClose(e,a);let c=!0;const h=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let d=0,p=n.length;d<p;d++){const i=n[d];if(!i.isEmpty())return null;const p=i.getPosition(),f=t.getLineContent(p.lineNumber),g=f.substring(p.column-1);if(g.startsWith(l)||(c=!1),f.length>p.column-1){const t=f.charAt(p.column-1),n=tS._isBeforeClosingBrace(e,g);if(!n&&!h(t))return null}if(!t.isCheapToTokenize(p.lineNumber))return null;if(1===a.open.length&&r&&"always"!==s){const t=ay(e.wordSeparators);if(o&&p.column>1&&0===t.get(f.charCodeAt(p.column-2)))return null;if(!o&&p.column>2&&0===t.get(f.charCodeAt(p.column-3)))return null}t.forceTokenization(p.lineNumber);const m=t.getLineTokens(p.lineNumber);let b=!1;try{b=Wh.shouldAutoClosePair(a,m,o?p.column:p.column-1)}catch(u){Oe(u)}if(!b)return null}return c?a.close.substring(0,a.close.length-l.length):a.close}static _runAutoClosingOpenCharType(e,t,n,i,o,r,s){let a=[];for(let l=0,c=i.length;l<c;l++){const e=i[l];a[l]=new nS(e,o,r,s)}return new WE(4,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return HE(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}static _isSurroundSelectionType(e,t,n,i){if(!tS._shouldSurroundChar(e,i)||!e.surroundingPairs.hasOwnProperty(i))return!1;const o=HE(i);for(let r=0,s=n.length;r<s;r++){const e=n[r];if(e.isEmpty())return!1;let i=!0;for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const o=t.getLineContent(n),r=n===e.startLineNumber?e.startColumn-1:0,s=n===e.endLineNumber?e.endColumn-1:o.length,a=o.substring(r,s);if(/[^ \t]/.test(a)){i=!1;break}}if(i)return!1;if(o&&e.startLineNumber===e.endLineNumber&&e.startColumn+1===e.endColumn){const n=t.getValueInRange(e);if(HE(n))return!1}}return!0}static _runSurroundSelectionType(e,t,n,i,o){let r=[];for(let s=0,a=i.length;s<a;s++){const e=i[s],n=t.surroundingPairs[o];r[s]=new eS(e,o,n)}return new WE(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,n){return!(1!==n.length||!t.isCheapToTokenize(n[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,n,i,o){if(!t.electricChars.hasOwnProperty(o)||!i.isEmpty())return null;let r=i.getPosition();n.forceTokenization(r.lineNumber);let s,a=n.getLineTokens(r.lineNumber);try{s=Wh.onElectricCharacter(o,a,r.column)}catch(l){return Oe(l),null}if(!s)return null;if(s.matchOpenBracket){let i=(a.getLineContent()+o).lastIndexOf(s.matchOpenBracket)+1,l=n.findMatchingBracketUp(s.matchOpenBracket,{lineNumber:r.lineNumber,column:i});if(l){if(l.startLineNumber===r.lineNumber)return null;let i=n.getLineContent(l.startLineNumber),s=Ur(i),a=t.normalizeIndentation(s),c=n.getLineContent(r.lineNumber),h=n.getLineFirstNonWhitespaceColumn(r.lineNumber)||r.column,u=c.substring(h-1,r.column-1),d=a+u+o,p=new Mn(r.lineNumber,1,r.lineNumber,r.column);const f=new Vx(p,d);return new WE(iS(d,e),[f],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,n,i,o,r){if(!i||Bn.selectionsArrEqual(i,o))return null;let s=null;for(const l of o){if(!l.isEmpty())return null;const e=l.getPosition(),t=n.getValueInRange(new Mn(e.lineNumber,e.column-1,e.lineNumber,e.column));if(null===s)s=t;else if(s!==t)return null}if(!s)return null;if(this._isAutoClosingOvertype(t,n,o,r,s)){const e=o.map(e=>new Vx(new Mn(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new WE(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const a=this._getAutoClosingPairClose(t,n,o,s,!1);return null!==a?this._runAutoClosingOpenCharType(e,t,n,o,s,!1,a):null}static typeWithInterceptors(e,t,n,i,o,r,s){if(!e&&"\n"===s){let e=[];for(let t=0,r=o.length;t<r;t++)e[t]=tS._enter(n,i,!1,o[t]);return new WE(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(n,i,o)){let e=[],t=!1;for(let r=0,a=o.length;r<a;r++)if(e[r]=this._runAutoIndentType(n,i,o[r],s),!e[r]){t=!0;break}if(!t)return new WE(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(n,i,o,r,s))return this._runAutoClosingOvertype(t,n,i,o,s);if(!e){const e=this._getAutoClosingPairClose(n,i,o,s,!0);if(e)return this._runAutoClosingOpenCharType(t,n,i,o,s,!0,e)}if(this._isSurroundSelectionType(n,i,o,s))return this._runSurroundSelectionType(t,n,i,o,s);if(!e&&this._isTypeInterceptorElectricChar(n,i,o)){const e=this._typeInterceptorElectricChar(t,n,i,o[0],s);if(e)return e}let a=[];for(let c=0,h=o.length;c<h;c++)a[c]=new Vx(o[c],s);const l=iS(s,t);return new WE(l,a,{shouldPushStackElementBefore:oS(t,l),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,n,i,o){let r=[];for(let a=0,l=i.length;a<l;a++)r[a]=new Vx(i[a],o);const s=iS(o,e);return new WE(s,r,{shouldPushStackElementBefore:oS(e,s),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,n){if(null===t||null===n)return[];let i=[];for(let o=0,r=n.length;o<r;o++){let r=n[o].positionLineNumber;if(1===r)i[o]=new Qx(new Mn(1,1,1,1),"\n");else{r--;let n=t.getLineMaxColumn(r);i[o]=this._enter(e,t,!1,new Mn(r,n,r,n))}}return i}static lineInsertAfter(e,t,n){if(null===t||null===n)return[];let i=[];for(let o=0,r=n.length;o<r;o++){const r=n[o].positionLineNumber;let s=t.getLineMaxColumn(r);i[o]=this._enter(e,t,!1,new Mn(r,s,r,s))}return i}static lineBreakInsert(e,t,n){let i=[];for(let o=0,r=n.length;o<r;o++)i[o]=this._enter(e,t,!0,n[o]);return i}}class nS extends Wx{constructor(e,t,n,i){super(e,(n?t:"")+i,0,-i.length),this._openCharacter=t,this._closeCharacter=i,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){let n=t.getInverseEditOperations(),i=n[0].range;return this.closeCharacterRange=new Mn(i.startLineNumber,i.endColumn-this._closeCharacter.length,i.endLineNumber,i.endColumn),this.enclosingRange=new Mn(i.startLineNumber,i.endColumn-this._openCharacter.length-this._closeCharacter.length,i.endLineNumber,i.endColumn),super.computeCursorState(e,t)}}function iS(e,t){return" "===e?5===t||6===t?6:5:4}function oS(e,t){return!(!sS(e)||sS(t))||5!==e&&rS(e)!==rS(t)}function rS(e){return 6===e||5===e?"space":e}function sS(e){return 4===e||5===e||6===e}var aS;(function(e){e.editorSimpleInput=new ig("editorSimpleInput",!1,!0),e.editorTextFocus=new ig("editorTextFocus",!1,m("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new ig("editorFocus",!1,m("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new ig("textInputFocus",!1,m("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new ig("editorReadonly",!1,m("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new ig("inDiffEditor",!1,m("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new ig("editorColumnSelection",!1,m("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new ig("editorHasSelection",!1,m("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new ig("editorHasMultipleSelections",!1,m("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new ig("editorTabMovesFocus",!1,m("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new ig("isInEmbeddedEditor",!1,!0),e.canUndo=new ig("canUndo",!1,!0),e.canRedo=new ig("canRedo",!1,!0),e.hoverVisible=new ig("editorHoverVisible",!1,m("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new ig("inCompositeEditor",void 0,m("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new ig("editorLangId","",m("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new ig("editorHasCompletionItemProvider",!1,m("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new ig("editorHasCodeActionsProvider",!1,m("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new ig("editorHasCodeLensProvider",!1,m("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new ig("editorHasDefinitionProvider",!1,m("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new ig("editorHasDeclarationProvider",!1,m("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new ig("editorHasImplementationProvider",!1,m("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new ig("editorHasTypeDefinitionProvider",!1,m("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new ig("editorHasHoverProvider",!1,m("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new ig("editorHasDocumentHighlightProvider",!1,m("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new ig("editorHasDocumentSymbolProvider",!1,m("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new ig("editorHasReferenceProvider",!1,m("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new ig("editorHasRenameProvider",!1,m("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new ig("editorHasSignatureHelpProvider",!1,m("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new ig("editorHasInlayHintsProvider",!1,m("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new ig("editorHasDocumentFormattingProvider",!1,m("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new ig("editorHasDocumentSelectionFormattingProvider",!1,m("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new ig("editorHasMultipleDocumentFormattingProvider",!1,m("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new ig("editorHasMultipleDocumentSelectionFormattingProvider",!1,m("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(aS||(aS={}));const lS=0;class cS extends Ym{runEditorCommand(e,t,n){const i=t._getViewModel();i&&this.runCoreEditorCommand(i,n||{})}}var hS,uS,dS;(function(e){const t=function(e){if(!oa(e))return!1;const t=e;return!!ia(t.to)&&(!(!aa(t.by)&&!ia(t.by))&&(!(!aa(t.value)&&!ra(t.value))&&!(!aa(t.revealCursor)&&!sa(t.revealCursor))))};function n(t){let n,i;switch(t.to){case e.RawDirection.Up:n=1;break;case e.RawDirection.Down:n=2;break;default:return null}switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Page:i=3;break;case e.RawUnit.HalfPage:i=4;break;default:i=2}const o=Math.floor(t.value||1),r=!!t.revealCursor;return{direction:n,unit:i,value:o,revealCursor:r,select:!!t.select}}e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=n})(hS||(hS={})),function(e){const t=function(e){if(!oa(e))return!1;const t=e;return!(!ra(t.lineNumber)&&!ia(t.lineNumber))&&!(!aa(t.at)&&!ia(t.at))};e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:t,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(uS||(uS={}));class pS{constructor(e){e.addImplementation(1e4,"code-editor",(e,t)=>{const n=e.get(xi).getFocusedCodeEditor();return!(!n||!n.hasTextFocus())&&this._runEditorCommand(e,n,t)}),e.addImplementation(1e3,"generic-dom-input-textarea",(e,t)=>{const n=document.activeElement;return!!(n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)}),e.addImplementation(0,"generic-dom",(e,t)=>{const n=e.get(xi).getActiveCodeEditor();return!!n&&(n.focus(),this._runEditorCommand(e,n,t))})}_runEditorCommand(e,t,n){const i=this.runEditorCommand(e,t,n);return i||!0}}(function(e){class t extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[qx.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=Km(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=Km(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class n extends cS{runCoreEditorCommand(e,t){e.model.pushStackElement();const n=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,n.viewStates.map(e=>QE.fromViewState(e))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:n.fromLineNumber,fromViewVisualColumn:n.fromVisualColumn,toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),n.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=Km(new class extends n{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,n,i){const o=e.model.validatePosition(i.position),r=e.coordinatesConverter.validateViewPosition(new Nn(i.viewPosition.lineNumber,i.viewPosition.column),o);let s=i.doColumnSelect?n.fromViewLineNumber:r.lineNumber,a=i.doColumnSelect?n.fromViewVisualColumn:i.mouseColumn-1;return zx.columnSelect(e.cursorConfig,e,s,a,r.lineNumber,i.mouseColumn-1)}}),e.CursorColumnSelectLeft=Km(new class extends n{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,n,i){return zx.columnSelectLeft(e.cursorConfig,e,n)}}),e.CursorColumnSelectRight=Km(new class extends n{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,n,i){return zx.columnSelectRight(e.cursorConfig,e,n)}});class i extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,n,i){return zx.columnSelectUp(e.cursorConfig,e,n,this._isPaged)}}e.CursorColumnSelectUp=Km(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Km(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,n,i){return zx.columnSelectDown(e.cursorConfig,e,n,this._isPaged)}}e.CursorColumnSelectDown=Km(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Km(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends cS{constructor(){super({id:"cursorMove",precondition:void 0,description:Jx.description})}runCoreEditorCommand(e,t){const n=Jx.parse(t);n&&this._runCursorMove(e,t.source,n)}_runCursorMove(e,t,n){e.model.pushStackElement(),e.setCursorStates(t,3,r._move(e,e.getCursorStates(),n)),e.revealPrimaryCursor(t,!0)}static _move(e,t,n){const i=n.select,o=n.value;switch(n.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return qx.simpleMove(e,t,n.direction,i,o,n.unit);case 11:case 13:case 12:case 14:return qx.viewportMove(e,t,n.direction,i,o);default:return null}}}e.CursorMoveImpl=r,e.CursorMove=Km(new r);class s extends cS{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let n=this._staticArgs;-1===this._staticArgs.value&&(n={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,qx.simpleMove(e,e.getCursorStates(),n.direction,n.select,n.value,n.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=Km(new s({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Km(new s({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1039}})),e.CursorRight=Km(new s({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Km(new s({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1041}})),e.CursorUp=Km(new s({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Km(new s({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Km(new s({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:11}})),e.CursorPageUpSelect=Km(new s({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1035}})),e.CursorDown=Km(new s({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Km(new s({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Km(new s({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:12}})),e.CursorPageDownSelect=Km(new s({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1036}})),e.CreateCursor=Km(new class extends cS{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let n;n=t.wholeLine?qx.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):qx.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const i=e.getCursorStates();if(i.length>1){const o=n.modelState?n.modelState.position:null,r=n.viewState?n.viewState.position:null;for(let n=0,s=i.length;n<s;n++){const s=i[n];if((!o||s.modelState.selection.containsPosition(o))&&(!r||s.viewState.selection.containsPosition(r)))return i.splice(n,1),e.model.pushStackElement(),void e.setCursorStates(t.source,3,i)}}i.push(n),e.model.pushStackElement(),e.setCursorStates(t.source,3,i)}}),e.LastCursorMoveToSelect=Km(new class extends cS{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(e,t){const n=e.getLastAddedCursorIndex(),i=e.getCursorStates(),o=i.slice(0);o[n]=qx.moveTo(e,i[n],!0,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class a extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,qx.moveToBeginningOfLine(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorHome=Km(new a({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=Km(new a({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class l extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e){const t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n],o=i.modelState.position.lineNumber;t[n]=QE.fromModelState(i.modelState.move(this._inSelectionMode,o,1,0))}return t}}e.CursorLineStart=Km(new l({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:0,mac:{primary:287}}})),e.CursorLineStartSelect=Km(new l({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:0,mac:{primary:1311}}}));class c extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,qx.moveToEndOfLine(e,e.getCursorStates(),this._inSelectionMode,t.sticky||!1)),e.revealPrimaryCursor(t.source,!0)}}e.CursorEnd=Km(new c({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:lS,kbExpr:aS.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:m("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),e.CursorEndSelect=Km(new c({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:lS,kbExpr:aS.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:m("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class h extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e,t){const n=[];for(let i=0,o=t.length;i<o;i++){const o=t[i],r=o.modelState.position.lineNumber,s=e.model.getLineMaxColumn(r);n[i]=QE.fromModelState(o.modelState.move(this._inSelectionMode,r,s,0))}return n}}e.CursorLineEnd=Km(new h({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:0,mac:{primary:291}}})),e.CursorLineEndSelect=Km(new h({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:0,mac:{primary:1315}}}));class u extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,qx.moveToBeginningOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorTop=Km(new u({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=Km(new u({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3086,mac:{primary:3088}}}));class d extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,qx.moveToEndOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorBottom=Km(new d({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=Km(new d({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:3085,mac:{primary:3090}}}));class p extends cS{constructor(){super({id:"editorScroll",precondition:void 0,description:hS.description})}runCoreEditorCommand(e,t){const n=hS.parse(t);n&&this._runEditorScroll(e,t.source,n)}_runEditorScroll(e,t,n){const i=this._computeDesiredScrollTop(e,n);if(n.revealCursor){const o=e.getCompletelyVisibleViewRangeAtScrollTop(i);e.setCursorStates(t,3,[qx.findPositionInViewportIfOutside(e,e.getPrimaryCursorState(),o,n.select)])}e.setScrollTop(i,0)}_computeDesiredScrollTop(e,t){if(1===t.unit){const n=e.getCompletelyVisibleViewRange(),i=e.coordinatesConverter.convertViewRangeToModelRange(n);let o;o=1===t.direction?Math.max(1,i.startLineNumber-t.value):Math.min(e.model.getLineCount(),i.startLineNumber+t.value);const r=e.coordinatesConverter.convertModelPositionToViewPosition(new Nn(o,1));return e.getVerticalOffsetForLineNumber(r.lineNumber)}let n;n=3===t.unit?e.cursorConfig.pageSize*t.value:4===t.unit?Math.round(e.cursorConfig.pageSize/2)*t.value:t.value;const i=(1===t.direction?-1:1)*n;return e.getScrollTop()+i*e.cursorConfig.lineHeight}}e.EditorScrollImpl=p,e.EditorScroll=Km(new p),e.ScrollLineUp=Km(new class extends cS{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageUp=Km(new class extends cS{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),e.ScrollLineDown=Km(new class extends cS{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageDown=Km(new class extends cS{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(t,n){e.EditorScroll._runEditorScroll(t,n.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class f extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[qx.word(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position)]),e.revealPrimaryCursor(t.source,!0)}}e.WordSelect=Km(new f({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=Km(new f({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=Km(new class extends cS{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(e,t){const n=e.getLastAddedCursorIndex(),i=e.getCursorStates(),o=i.slice(0),r=i[n];o[n]=qx.word(e,r,r.modelState.hasSelection(),t.position),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class g extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[qx.line(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!1)}}e.LineSelect=Km(new g({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=Km(new g({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class b extends cS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){const n=e.getLastAddedCursorIndex(),i=e.getCursorStates(),o=i.slice(0);o[n]=qx.line(e,i[n],this._inSelectionMode,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}}e.LastCursorLineSelect=Km(new b({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=Km(new b({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.ExpandLineSelection=Km(new class extends cS{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:2090}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,qx.expandLineSelection(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}}),e.CancelSelection=Km(new class extends cS{constructor(){super({id:"cancelSelection",precondition:aS.hasNonEmptySelection,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[qx.cancelSelection(e,e.getPrimaryCursorState())]),e.revealPrimaryCursor(t.source,!0)}}),e.RemoveSecondaryCursors=Km(new class extends cS{constructor(){super({id:"removeSecondaryCursors",precondition:aS.hasMultipleSelections,kbOpts:{weight:lS+1,kbExpr:aS.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[e.getPrimaryCursorState()]),e.revealPrimaryCursor(t.source,!0),fm(m("removedCursor","Removed secondary cursors"))}}),e.RevealLine=Km(new class extends cS{constructor(){super({id:"revealLine",precondition:void 0,description:uS.description})}runCoreEditorCommand(e,t){const n=t,i=n.lineNumber||0;let o="number"===typeof i?i+1:parseInt(i)+1;o<1&&(o=1);const r=e.model.getLineCount();o>r&&(o=r);const s=new Mn(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(n.at)switch(n.at){case uS.RawAtArgument.Top:a=3;break;case uS.RawAtArgument.Center:a=1;break;case uS.RawAtArgument.Bottom:a=4;break;default:break}const l=e.coordinatesConverter.convertModelRangeToViewRange(s);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends pS{constructor(){super(ib)}runDOMCommand(){Bi&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,n){const i=t._getViewModel();i&&this.runCoreEditorCommand(i,n)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[qx.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=Km(new class extends cS{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[QE.fromModelSelection(t.selection)])}})})(dS||(dS={}));const fS=Pf.and(aS.textInputFocus,aS.columnSelection);function gS(e,t){fg.registerKeybindingRule({id:e,primary:t,when:fS,weight:lS+1})}function mS(e){return e.register(),e}var bS,vS;gS(dS.CursorColumnSelectLeft.id,1039),gS(dS.CursorColumnSelectRight.id,1041),gS(dS.CursorColumnSelectUp.id,1040),gS(dS.CursorColumnSelectPageUp.id,1035),gS(dS.CursorColumnSelectDown.id,1042),gS(dS.CursorColumnSelectPageDown.id,1036),function(e){class t extends Ym{runEditorCommand(e,t,n){const i=t._getViewModel();i&&this.runCoreEditingCommand(t,i,n||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=Km(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:aS.writable,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,tS.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection)))}}),e.Outdent=Km(new class extends t{constructor(){super({id:"outdent",precondition:aS.writable,kbOpts:{weight:lS,kbExpr:Pf.and(aS.editorTextFocus,aS.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,tS.outdent(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.Tab=Km(new class extends t{constructor(){super({id:"tab",precondition:aS.writable,kbOpts:{weight:lS,kbExpr:Pf.and(aS.editorTextFocus,aS.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,tS.tab(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.DeleteLeft=Km(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,n){const[i,o]=Gx.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection),t.getCursorAutoClosedCharacters());i&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=Km(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:lS,kbExpr:aS.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,n){const[i,o]=Gx.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));i&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends pS{constructor(){super(tb)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,n){if(t.hasModel()&&!0!==t.getOption(80))return t.getModel().undo()}},e.Redo=new class extends pS{constructor(){super(nb)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,n){if(t.hasModel()&&!0!==t.getOption(80))return t.getModel().redo()}}}(bS||(bS={}));class yS extends Wm{constructor(e,t,n){super({id:e,precondition:void 0,description:n}),this._handlerId=t}runCommand(e,t){const n=e.get(xi).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}}function wS(e,t){mS(new yS("default:"+e,e)),mS(new yS(e,e,t))}wS("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),wS("replacePreviousChar"),wS("compositionType"),wS("compositionStart"),wS("compositionEnd"),wS("paste"),wS("cut");class _S{constructor(e,t,n,i){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=i}paste(e,t,n,i){this.commandDelegate.paste(e,t,n,i)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,i){this.commandDelegate.compositionType(e,t,n,i)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){dS.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new Nn(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,n=b["d"]&&t.get(95),i=t.get(18);e.middleButton&&!n?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||i?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){dS.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){dS.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,n){e=this._validateViewColumn(e),dS.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),dS.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){dS.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){dS.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){dS.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){dS.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){dS.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){dS.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){dS.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){dS.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){dS.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class CS{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return CS.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new AS(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class AS{constructor(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}toString(){return JE.toString(this)}}class ES{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const n=this.getStartLineNumber(),i=this.getEndLineNumber();if(t<n){const n=t-e+1;return this._rendLineNumberStart-=n,null}if(e>i)return null;let o=0,r=0;for(let a=n;a<=i;a++){const n=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===r?(o=n,r=1):r++)}if(e<n){let i=0;i=t<n?t-e+1:n-e,this._rendLineNumberStart-=i}const s=this._lines.splice(o,r);return s}onLinesChanged(e,t){if(0===this.getCount())return!1;const n=this.getStartLineNumber(),i=this.getEndLineNumber();let o=!1;for(let r=e;r<=t;r++)r>=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o){const t=this._lines.splice(e-this._rendLineNumberStart,o-e+1);return t}const r=[];for(let h=0;h<n;h++)r[h]=this._createLine();const s=e-this._rendLineNumberStart,a=this._lines.slice(0,s),l=this._lines.slice(s,this._lines.length-n),c=this._lines.slice(this._lines.length-n,this._lines.length);return this._lines=a.concat(r).concat(l),c}onTokensChanged(e){if(0===this.getCount())return!1;const t=this.getStartLineNumber(),n=this.getEndLineNumber();let i=!1;for(let o=0,r=e.length;o<r;o++){const r=e[o];if(r.toLineNumber<t||r.fromLineNumber>n)continue;const s=Math.max(t,r.fromLineNumber),a=Math.min(n,r.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),i=!0}}return i}}class xS{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ES(()=>this._host.createVisibleLine())}_createDomNode(){const e=mb(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(129)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,i=t.length;n<i;n++){const e=t[n].getDomNode();e&&this.domNode.domNode.removeChild(e)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,i=t.length;n<i;n++){const e=t[n].getDomNode();e&&this.domNode.domNode.removeChild(e)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),n=new SS(this.domNode.domNode,this._host,e),i={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},o=n.render(i,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}class SS{constructor(e,t,n){this.domNode=e,this.host=t,this.viewportData=n}render(e,t,n,i){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<t||n<o.rendLineNumberStart){o.rendLineNumberStart=t,o.linesLength=n-t+1,o.lines=[];for(let e=t;e<=n;e++)o.lines[e-t]=this.host.createVisibleLine();return this._finishRendering(o,!0,i),o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(n-o.rendLineNumberStart,o.linesLength-1),i,t),o.rendLineNumberStart>t){const e=t,r=Math.min(n,o.rendLineNumberStart-1);e<=r&&(this._insertLinesBefore(o,e,r,i,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart<t){const e=Math.min(o.linesLength,t-o.rendLineNumberStart);e>0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<n){const e=o.rendLineNumberStart+o.linesLength,r=n;e<=r&&(this._insertLinesAfter(o,e,r,i,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart+o.linesLength-1>n){const e=Math.max(0,n-o.rendLineNumberStart+1),t=o.linesLength-1,i=t-e+1;i>0&&(this._removeLinesAfter(o,i),o.linesLength-=i)}return this._finishRendering(o,!1,i),o}_renderUntouchedLines(e,t,n,i,o){const r=e.rendLineNumberStart,s=e.lines;for(let a=t;a<=n;a++){const e=r+a;s[a].layoutLine(e,i[e-o])}}_insertLinesBefore(e,t,n,i,o){const r=[];let s=0;for(let a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n<t;n++){const t=e.lines[n].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(0,t)}_insertLinesAfter(e,t,n,i,o){const r=[];let s=0;for(let a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=e.lines.concat(r)}_removeLinesAfter(e,t){const n=e.linesLength-t;for(let i=0;i<t;i++){const t=e.lines[n+i].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(n,t)}_finishRenderingNewLines(e,t,n,i){SS._ttPolicy&&(n=SS._ttPolicy.createHTML(n));const o=this.domNode.lastChild;t||!o?this.domNode.innerHTML=n:o.insertAdjacentHTML("afterend",n);let r=this.domNode.lastChild;for(let s=e.linesLength-1;s>=0;s--){const t=e.lines[s];i[s]&&(t.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,n){const i=document.createElement("div");SS._ttPolicy&&(t=SS._ttPolicy.createHTML(t)),i.innerHTML=t;for(let o=0;o<e.linesLength;o++){const t=e.lines[o];if(n[o]){const e=i.firstChild,n=t.getDomNode();n.parentNode.replaceChild(e,n),t.setDomNode(e)}}}_finishRendering(e,t,n){const i=SS._sb,o=e.linesLength,r=e.lines,s=e.rendLineNumberStart,a=[];{i.reset();let l=!1;for(let e=0;e<o;e++){const t=r[e];a[e]=!1;const o=t.getDomNode();if(o)continue;const c=t.renderLine(e+s,n[e],this.viewportData,i);c&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,i.build(),a)}{i.reset();let t=!1;const l=[];for(let e=0;e<o;e++){const o=r[e];if(l[e]=!1,a[e])continue;const c=o.renderLine(e+s,n[e],this.viewportData,i);c&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,i.build(),l)}}}SS._ttPolicy=null===(vS=window.trustedTypes)||void 0===vS?void 0:vS.createPolicy("editorViewLayer",{createHTML:e=>e}),SS._sb=fh(1e5);class kS extends Mb{constructor(e){super(e),this._visibleLines=new xS(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++){const t=this._dynamicOverlays[e];if(t.shouldRender())return!0}return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++){const t=this._dynamicOverlays[e];t.dispose()}this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new DS(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let i=t;i<=n;i++){const t=this._visibleLines.getVisibleLine(i);t.onConfigurationChanged(e)}return!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter(e=>e.shouldRender());for(let n=0,i=t.length;n<i;n++){const i=t[n];i.prepareRender(e),i.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class DS{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(58),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=mb(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(58)}renderLine(e,t,n,i){let o="";for(let r=0,s=this._dynamicOverlays.length;r<s;r++){const t=this._dynamicOverlays[r];o+=t.render(n.startLineNumber,e)}return this._renderedContent!==o&&(this._renderedContent=o,i.appendASCIIString('<div style="position:absolute;top:'),i.appendASCIIString(String(t)),i.appendASCIIString("px;width:100%;height:"),i.appendASCIIString(String(this._lineHeight)),i.appendASCIIString('px;">'),i.appendASCIIString(o),i.appendASCIIString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class LS extends kS{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class IS extends kS{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),fb.applyFontInfo(this.domNode,t.get(43))}onConfigurationChanged(e){const t=this._context.configuration.options;fb.applyFontInfo(this.domNode,t.get(43));const n=t.get(129);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class NS{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class MS extends Mb{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=mb(document.createElement("div")),Bb.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=mb(document.createElement("div")),Bb.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new BS(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n){const i=this._widgets[e.getId()];i.setPosition(t,n),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const n=e.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].render(e)}}class BS{constructor(e,t,n){this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=mb(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const i=this._context.configuration.options,o=i.get(129);this._fixedOverflowWidgets=i.get(36),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=i.get(58),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(58),e.hasChanged(129)){const e=t.get(129);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,n,i,o){const r=e.top,s=r,a=t.top+this._lineHeight,l=o.viewportHeight-a,c=r-i,h=s>=i,u=a,d=l>=i;let p=e.left,f=t.left;return p+n>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-n),f+n>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-n),p<o.scrollLeft&&(p=o.scrollLeft),f<o.scrollLeft&&(f=o.scrollLeft),{fitsAbove:h,aboveTop:c,aboveLeft:p,fitsBelow:d,belowTop:u,belowLeft:f}}_layoutHorizontalSegmentInPage(e,t,n,i){const o=Math.max(0,t.left-i),r=Math.min(t.left+t.width+i,e.width);let s=t.left+n-Uo.scrollX;if(s+i>r){const e=s-(r-i);s-=e,n-=e}if(s<o){const e=s-o;s-=e,n-=e}return[n,s]}_layoutBoxInPage(e,t,n,i,o){const r=e.top-i,s=t.top+this._lineHeight,a=Ho(this._viewDomNode.domNode),l=a.top+r-Uo.scrollY,c=a.top+s-Uo.scrollY,h=zo(document.body),[u,d]=this._layoutHorizontalSegmentInPage(h,a,e.left-o.scrollLeft+this._contentLeft,n),[p,f]=this._layoutHorizontalSegmentInPage(h,a,t.left-o.scrollLeft+this._contentLeft,n),g=22,m=22,b=l>=g,v=c+i<=h.height-m;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(l,g),aboveLeft:d,fitsBelow:v,belowTop:c,belowLeft:f}:{fitsAbove:b,aboveTop:r,aboveLeft:u,fitsBelow:v,belowTop:s,belowLeft:p}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new NS(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let n=t[0],i=t[0];for(const h of t)h.lineNumber<n.lineNumber&&(n=h),h.lineNumber>i.lineNumber&&(i=h);let o=1073741824;for(const h of n.ranges)h.left<o&&(o=h.left);let r=1073741824;for(const h of i.ranges)h.left<r&&(r=h.left);const s=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop,a=new NS(s,o),l=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,c=new NS(l,r);return[a,c]}_prepareRenderWidget(e){const[t,n]=this._getTopAndBottomLeft(e);if(!t||!n)return null;if(-1===this._cachedDomNodeClientWidth||-1===this._cachedDomNodeClientHeight){let e=null;if("function"===typeof this._actual.beforeRender&&(e=TS(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeClientWidth=e.width,this._cachedDomNodeClientHeight=e.height;else{const e=this.domNode.domNode;this._cachedDomNodeClientWidth=e.clientWidth,this._cachedDomNodeClientHeight=e.clientHeight}}let i;if(i=this.allowEditorOverflow?this._layoutBoxInPage(t,n,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e):this._layoutBoxInViewport(t,n,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e),this._preference)for(let o=1;o<=2;o++)for(const e of this._preference)if(1===e){if(!i)return null;if(2===o||i.fitsAbove)return{coordinate:new NS(i.aboveTop,i.aboveLeft),position:1}}else{if(2!==e)return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};if(!i)return null;if(2===o||i.fitsBelow)return{coordinate:new NS(i.belowTop,i.belowLeft),position:2}}return null}onBeforeRender(e){this._viewRange&&this._preference&&(this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"===typeof this._actual.afterRender&&TS(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"===typeof this._actual.afterRender&&TS(this._actual.afterRender,this._actual,this._renderData.position)}}function TS(e,t,...n){try{return e.call(t,...n)}catch(i){return null}}n("a2e5");let OS=!0;class RS extends Ix{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(129);this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Bn(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=OS?this._selections.slice(0,1):this._selections,n=t.map(e=>e.positionLineNumber);n.sort((e,t)=>e-t),Iu(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);const i=t.every(e=>e.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let r=0;const s=[];for(let a=n;a<=i;a++){const e=a-n;while(r<o&&this._cursorLineNumbers[r]<a)r++;r<o&&this._cursorLineNumbers[r]===a?s[e]=t:s[e]=""}this._renderData=s}render(e,t){if(!this._renderData)return"";const n=t-e;return n>=this._renderData.length?"":this._renderData[n]}}class PS extends RS{_renderOne(e){const t="current-line"+(this._shouldRenderOther()?" current-line-both":"");return`<div class="${t}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class FS extends RS{_renderOne(e){const t="current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"");return`<div class="${t}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}Mm((e,t)=>{OS=!1;const n=e.getColor(kC);if(n&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${n}; border: none; }`)),!n||n.isTransparent()||e.defines(DC)){const n=e.getColor(DC);n&&(OS=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});n("cc1a");class jS extends Ix{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let a=0,l=t.length;a<l;a++){const e=t[a];e.options.className&&(n[i++]=e)}n=n.sort((e,t)=>{if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;const n=e.options.className,i=t.options.className;return n<i?-1:n>i?1:Mn.compareRangesUsingStarts(e.range,t.range)});const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=[];for(let a=o;a<=r;a++){const e=a-o;s[e]=""}this._renderWholeLineDecorations(e,n,s),this._renderNormalDecorations(e,n,s),this._renderResult=s}_renderWholeLineDecorations(e,t,n){const i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let s=0,a=t.length;s<a;s++){const e=t[s];if(!e.options.isWholeLine)continue;const a='<div class="cdr '+e.options.className+'" style="left:0;width:100%;height:'+i+'px;"></div>',l=Math.max(e.range.startLineNumber,o),c=Math.min(e.range.endLineNumber,r);for(let t=l;t<=c;t++){const e=t-o;n[e]+=a}}}_renderNormalDecorations(e,t,n){const i=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,s=!1,a=null;for(let l=0,c=t.length;l<c;l++){const c=t[l];if(c.options.isWholeLine)continue;const h=c.options.className,u=Boolean(c.options.showIfCollapsed);let d=c.range;u&&1===d.endColumn&&d.endLineNumber!==d.startLineNumber&&(d=new Mn(d.startLineNumber,d.startColumn,d.endLineNumber-1,this._context.model.getLineMaxColumn(d.endLineNumber-1))),r===h&&s===u&&Mn.areIntersectingOrTouching(a,d)?a=Mn.plusRange(a,d):(null!==r&&this._renderNormalDecoration(e,a,r,s,i,o,n),r=h,s=u,a=d)}null!==r&&this._renderNormalDecoration(e,a,r,s,i,o,n)}_renderNormalDecoration(e,t,n,i,o,r,s){const a=e.linesVisibleRangesForRange(t,"findMatch"===n);if(a)for(let l=0,c=a.length;l<c;l++){const e=a[l];if(e.outsideRenderedLine)continue;const t=e.lineNumber-r;if(i&&1===e.ranges.length){const t=e.ranges[0];0===t.width&&(e.ranges[0]=new Pb(t.left,this._typicalHalfwidthCharacterWidth))}for(let i=0,r=e.ranges.length;i<r;i++){const r=e.ranges[i],a='<div class="cdr '+n+'" style="left:'+String(r.left)+"px;width:"+String(r.width)+"px;height:"+o+'px;"></div>';s[t]+=a}}}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class zS extends st{onclick(e,t){this._register(Eo(e,hr.CLICK,e=>t(new Zi(e))))}onmousedown(e,t){this._register(Eo(e,hr.MOUSE_DOWN,e=>t(new Zi(e))))}onmouseover(e,t){this._register(Eo(e,hr.MOUSE_OVER,e=>t(new Zi(e))))}onnonbubblingmouseout(e,t){this._register(Do(e,e=>t(new Zi(e))))}onkeydown(e,t){this._register(Eo(e,hr.KEY_DOWN,e=>t(new Ki(e))))}onkeyup(e,t){this._register(Eo(e,hr.KEY_UP,e=>t(new Ki(e))))}oninput(e,t){this._register(Eo(e,hr.INPUT,t))}onblur(e,t){this._register(Eo(e,hr.BLUR,t))}onfocus(e,t){this._register(Eo(e,hr.FOCUS,t))}ignoreGesture(e){wb.ignoreTarget(e)}}const VS=11;class QS extends zS{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px","undefined"!==typeof e.top&&(this.bgDomNode.style.top="0px"),"undefined"!==typeof e.left&&(this.bgDomNode.style.left="0px"),"undefined"!==typeof e.bottom&&(this.bgDomNode.style.bottom="0px"),"undefined"!==typeof e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=VS+"px",this.domNode.style.height=VS+"px","undefined"!==typeof e.top&&(this.domNode.style.top=e.top+"px"),"undefined"!==typeof e.left&&(this.domNode.style.left=e.left+"px"),"undefined"!==typeof e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),"undefined"!==typeof e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new Cb),this.onmousedown(this.bgDomNode,e=>this._arrowMouseDown(e)),this.onmousedown(this.domNode,e=>this._arrowMouseDown(e)),this._mousedownRepeatTimer=this._register(new ho),this._mousedownScheduleRepeatTimer=this._register(new co)}_arrowMouseDown(e){const t=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(t,200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,_b,e=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class WS extends st{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new co)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}const HS=140;class US extends zS{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new WS(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new Cb),this._shouldRender=!0,this.domNode=mb(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,e=>this._domNodeMouseDown(e))}_createArrow(e){const t=this._register(new QS(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,i){this.slider=mb(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"===typeof n&&this.slider.setWidth(n),"number"===typeof i&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);n<=o&&o<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,n;if(e.target===this.domNode.domNode&&"number"===typeof e.browserEvent.offsetX&&"number"===typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{const i=Ho(this.domNode.domNode);t=e.posx-i.left,n=e.posy-i.top}const i=this._mouseDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(i):this._scrollbarState.getDesiredScrollPositionFromOffset(i)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}_sliderMouseDown(e,t){const n=this._sliderMousePosition(e),i=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,_b,e=>{const t=this._sliderOrthogonalMousePosition(e),r=Math.abs(t-i);if(b["i"]&&r>HS)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const s=this._sliderMousePosition(e),a=s-n;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(a))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const YS=20;class GS{constructor(e,t,n,i,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new GS(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,i,o){const r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(YS,Math.floor(n*s/i))),c=(s-l)/(i-n),h=o*c;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=GS._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let n=this._scrollPosition;return t<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}const KS=Kl("scrollbar-button-left",Jl.triangleLeft),qS=Kl("scrollbar-button-right",Jl.triangleRight);class JS extends US{constructor(e,t,n){const i=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new GS(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,i.width,i.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-VS)/2,n=(t.horizontalScrollbarSize-VS)/2;this._createArrow({className:"scra",icon:KS,top:n,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new eo(null,1,0))}),this._createArrow({className:"scra",icon:qS,top:n,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new eo(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}const $S=Kl("scrollbar-button-up",Jl.triangleUp),XS=Kl("scrollbar-button-down",Jl.triangleDown);class ZS extends US{constructor(e,t,n){const i=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new GS(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,i.height,i.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-VS)/2,n=(t.verticalScrollbarSize-VS)/2;this._createArrow({className:"scra",icon:$S,top:e,left:n,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new eo(null,0,1))}),this._createArrow({className:"scra",icon:XS,top:void 0,left:n,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new eo(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class ek{constructor(e,t,n,i,o,r){this._scrollStateBrand=void 0,e|=0,t|=0,n|=0,i|=0,o|=0,r|=0,this.rawScrollLeft=n,this.rawScrollTop=r,e<0&&(e=0),n+e>t&&(n=t-e),n<0&&(n=0),i<0&&(i=0),r+i>o&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new ek("undefined"!==typeof e.width?e.width:this.width,"undefined"!==typeof e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,"undefined"!==typeof e.height?e.height:this.height,"undefined"!==typeof e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new ek(this.width,this.scrollWidth,"undefined"!==typeof e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"undefined"!==typeof e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const n=this.width!==e.width,i=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,s=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:i,scrollLeftChanged:o,heightChanged:r,scrollHeightChanged:s,scrollTopChanged:a}}}class tk extends st{constructor(e,t){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new bt),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new ek(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:"undefined"===typeof e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:"undefined"===typeof e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let i;i=t?new rk(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=i}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=rk.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})):void 0}_setState(e,t){const n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}}class nk{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}function ik(e,t){const n=t-e;return function(t){return e+n*ak(t)}}function ok(e,t,n){return function(i){return i<n?e(i/n):t((i-n)/(1-n))}}class rk{constructor(e,t,n,i){this.from=e,this.to=t,this.duration=i,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){const i=Math.abs(e-t);if(i>2.5*n){let i,o;return e<t?(i=e+.75*n,o=t-.75*n):(i=e-.75*n,o=t+.75*n),ok(ik(e,i),ik(o,t),.33)}return ik(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const e=this.scrollLeft(t),n=this.scrollTop(t);return new nk(e,n,!1)}return new nk(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,n){return rk.start(e,t,n)}static start(e,t,n){n+=10;const i=Date.now()-10;return new rk(e,t,i,n)}}function sk(e){return Math.pow(e,3)}function ak(e){return 1-sk(1-e)}n("7043");const lk=500,ck=50,hk=!0;class uk{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}}class dk{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,n=1,i=this._rear;do{const o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}while(1);return t<=.5}accept(e,t,n){const i=new uk(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){const t=Math.abs(Math.round(e)-e);return t<.01}}dk.INSTANCE=new dk;class pk extends zS{constructor(e,t,n){super(),this._onScroll=this._register(new bt),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new bt),e.style.overflow="hidden",this._options=bk(t),this._scrollable=n,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));const i={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new ZS(this._scrollable,this._options,i)),this._horizontalScrollbar=this._register(new JS(this._scrollable,this._options,i)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=mb(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=mb(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=mb(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onnonbubblingmouseout(this._listenOnDomNode,e=>this._onMouseOut(e)),this._hideTimeout=this._register(new co),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=nt(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,b["f"]&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){"undefined"!==typeof e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),"undefined"!==typeof e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),"undefined"!==typeof e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),"undefined"!==typeof e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),"undefined"!==typeof e.horizontal&&(this._options.horizontal=e.horizontal),"undefined"!==typeof e.vertical&&(this._options.vertical=e.vertical),"undefined"!==typeof e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),"undefined"!==typeof e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),"undefined"!==typeof e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){const t=this._mouseWheelToDispose.length>0;if(t!==e&&(this._mouseWheelToDispose=nt(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new eo(e))};this._mouseWheelToDispose.push(Eo(this._listenOnDomNode,hr.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=dk.INSTANCE;if(hk){const n=window.devicePixelRatio/Ii();b["i"]||b["d"]?t.accept(Date.now(),e.deltaX/n,e.deltaY/n):t.accept(Date.now(),e.deltaX,e.deltaY)}let n=!1;if(e.deltaY||e.deltaX){let i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(i)>=Math.abs(o)?o=0:i=0),this._options.flipAxes&&([i,o]=[o,i]);const r=!b["f"]&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,i*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let a={};if(i){const e=ck*i,t=s.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=ck*o,t=s.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop){const e=hk&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel();e?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),n=!0}}let i=n;!i&&this._options.alwaysConsumeMouseWheel&&(i=!0),!i&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(i=!0),i&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,i=n?" left":"",o=t?" top":"",r=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName("shadow"+i),this._topShadowDomNode.setClassName("shadow"+o),this._topLeftShadowDomNode.setClassName(`shadow${r}${o}${i}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(()=>this._hide(),lk)}}class fk extends pk{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const n=new tk(0,e=>No(e));super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class gk extends pk{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class mk extends fk{constructor(e,t){super(e,t),this._element=e,this.onScroll(e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function bk(e){const t={lazyRender:"undefined"!==typeof e.lazyRender&&e.lazyRender,className:"undefined"!==typeof e.className?e.className:"",useShadows:"undefined"===typeof e.useShadows||e.useShadows,handleMouseWheel:"undefined"===typeof e.handleMouseWheel||e.handleMouseWheel,flipAxes:"undefined"!==typeof e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:"undefined"!==typeof e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:"undefined"!==typeof e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:"undefined"!==typeof e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:"undefined"!==typeof e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:"undefined"!==typeof e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:"undefined"===typeof e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:"undefined"===typeof e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:"undefined"!==typeof e.arrowSize?e.arrowSize:11,listenOnDomNode:"undefined"!==typeof e.listenOnDomNode?e.listenOnDomNode:null,horizontal:"undefined"!==typeof e.horizontal?e.horizontal:1,horizontalScrollbarSize:"undefined"!==typeof e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:"undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:"undefined"!==typeof e.horizontalHasArrows&&e.horizontalHasArrows,vertical:"undefined"!==typeof e.vertical?e.vertical:1,verticalScrollbarSize:"undefined"!==typeof e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:"undefined"!==typeof e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:"undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:"undefined"!==typeof e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize="undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,b["f"]&&(t.className+=" mac"),t}class vk extends Mb{constructor(e,t,n,i){super(e);const o=this._context.configuration.options,r=o.get(91),s=o.get(66),a=o.get(34),l=o.get(94),c={listenOnDomNode:n.domNode,className:"editor-scrollable "+Dm(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new gk(t.domNode,c,this._context.viewLayout.getScrollable())),Bb.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=mb(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,n)=>{const i={};if(t){const t=e.scrollTop;t&&(i.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(n){const t=e.scrollLeft;t&&(i.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(i,1)};this._register(Eo(n.domNode,"scroll",e=>h(n.domNode,!0,!0))),this._register(Eo(t.domNode,"scroll",e=>h(t.domNode,!0,!1))),this._register(Eo(i.domNode,"scroll",e=>h(i.domNode,!0,!1))),this._register(Eo(this.scrollbarDomNode.domNode,"scroll",e=>h(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(129);this.scrollbarDomNode.setLeft(t.contentLeft);const n=e.get(64),i=n.side;"right"===i?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(91)||e.hasChanged(66)||e.hasChanged(34)){const e=this._context.configuration.options,t=e.get(91),n=e.get(66),i=e.get(34),o=e.get(94),r={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:i,scrollPredominantAxis:o};this.scrollbar.updateOptions(r)}return e.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+Dm(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}n("df70");class yk{constructor(e,t,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}}class wk extends Ix{_render(e,t,n){const i=[];for(let s=e;s<=t;s++){const t=s-e;i[t]=[]}if(0===n.length)return i;n.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1);let o=null,r=0;for(let s=0,a=n.length;s<a;s++){const a=n[s],l=a.className;let c=Math.max(a.startLineNumber,e)-e;const h=Math.min(a.endLineNumber,t)-e;o===l?(c=Math.max(r+1,c),r=Math.max(r,h)):(o=l,r=h);for(let e=c;e<=r;e++)i[e].push(o)}return i}}class _k extends wk{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(129);this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let o=0,r=t.length;o<r;o++){const e=t[o],r=e.options.glyphMarginClassName;r&&(n[i++]=new yk(e.range.startLineNumber,e.range.endLineNumber,r))}return n}prepareRender(e){if(!this._glyphMargin)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),s=this._glyphMarginWidth.toString(),a='" style="left:'+r+"px;width:"+s+"px;height:"+o+'px;"></div>',l=[];for(let c=t;c<=n;c++){const e=c-t,n=i[e];0===n.length?l[e]="":l[e]='<div class="cgmr codicon '+n.join(" ")+a}this._renderResult=l}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}n("9c85");class Ck extends Ix{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,n=t.get(130),i=t.get(43);this._lineHeight=t.get(58),this._spaceWidth=i.spaceWidth,this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(130),i=t.get(43);return this._lineHeight=t.get(58),this._spaceWidth=i.spaceWidth,this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const n=e.selections[0],i=n.getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,n;if(!this._bracketPairGuideOptions.indentation&&!this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=e.scrollWidth,s=this._lineHeight,a=this._primaryPosition,l=this.getGuidesByLine(i,o,a),c=[];for(let h=i;h<=o;h++){const o=h-i,a=l[o];let u="";const d=null!==(n=null===(t=e.visibleRangeForPosition(new Nn(h,1)))||void 0===t?void 0:t.left)&&void 0!==n?n:0;for(const e of a){const t=d+(e.visibleColumn-1)*this._spaceWidth;if(t>r||this._maxIndentLeft>0&&t>this._maxIndentLeft)break;u+=`<div class="core-guide ${e.className}" style="left:${t}px;height:${s}px;width:${this._spaceWidth}px"></div>`}c[o]=u}this._renderResult=c}getGuidesByLine(e,t,n){var i;const o=this._bracketPairGuideOptions.bracketPairs?this._context.model.getBracketGuidesInRangeByLine(e,t,n,!0,!0):null,r=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(e,t):null;let s=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&n){const i=this._context.model.getActiveIndentGuide(n.lineNumber,e,t);s=i.startLineNumber,a=i.endLineNumber,l=i.indent}const{indentSize:c}=this._context.model.getTextModelOptions(),h=[];for(let u=e;u<=t;u++){const t=new Array;h.push(t);const n=o?o[u-e]:[],d=new Gu(n),p=r?r[u-e]:[];for(let e=1;e<=p;e++){const o=(e-1)*c+1,r=0===n.length&&s<=u&&u<=a&&e===l;t.push(...d.takeWhile(e=>e.visibleColumn<o)||[]),(null===(i=d.peek())||void 0===i?void 0:i.visibleColumn)!==o&&t.push(new $a(o,r?"core-guide-indent-active":"core-guide-indent"))}t.push(...d.takeWhile(e=>!0)||[])}return h}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Mm((e,t)=>{const n=e.getColor(RC);n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${n} inset; }`);const i=e.getColor(PC)||n;i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${i} inset; }`);const o=[$C,XC,ZC,eA,tA,nA],r=new wE;let s=o.map(t=>e.getColor(t)).filter(e=>!!e).filter(e=>!e.isTransparent());for(let a=0;a<30;a++){const e=s[a%s.length];t.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(a).replace(/ /g,".")} { opacity: 0.3; box-shadow: 1px 0 0 0 ${e} inset; }`)}t.addRule(`.monaco-editor .${r.activeClassName} { opacity: 1 !important; }`)});n("11cb");class Ak{constructor(){this._currentVisibleRange=new Mn(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Ek{constructor(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class xk{constructor(e,t,n,i){this.selections=e,this.startScrollTop=t,this.stopScrollTop=n,this.scrollType=i,this.type="selections";let o=e[0].startLineNumber,r=e[0].endLineNumber;for(let s=1,a=e.length;s<a;s++){const t=e[s];o=Math.min(o,t.startLineNumber),r=Math.max(r,t.endLineNumber)}this.minLineNumber=o,this.maxLineNumber=r}}class Sk extends Mb{constructor(e,t){super(e),this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new xS(this),this.domNode=this._visibleLines.domNode;const n=this._context.configuration,i=this._context.configuration.options,o=i.get(43),r=i.get(130);this._lineHeight=i.get(58),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=i.get(88),this._cursorSurroundingLines=i.get(25),this._cursorSurroundingLinesStyle=i.get(26),this._canUseLayerHinting=!i.get(28),this._viewLineOptions=new Ub(n,this._context.theme.type),Bb.write(this.domNode,7),this.domNode.setClassName("view-lines "+Bx),fb.applyFontInfo(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new uo(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new uo(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new Ak,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Yb(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(130)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(43),i=t.get(130);return this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(88),this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),fb.applyFontInfo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new Ub(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let t=e;t<=n;t++){const e=this._visibleLines.getVisibleLine(t);e.onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=!1;for(let o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Ek(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new xk(e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop),o=i<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(n,o),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>n)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const n=this._getViewLineDomNode(e);if(null===n)return null;const i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new Nn(i,1);const o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(i<o||i>r)return null;let s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t);const a=this._context.model.getLineMinColumn(i);return s<a&&(s=a),new Nn(i,s)}_getViewLineDomNode(e){while(e&&1===e.nodeType){if(e.className===Yb.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let i=t;i<=n;i++){const t=this._visibleLines.getVisibleLine(i);if(e===t.getDomNode())return i}return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();return e<t||e>n?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,i=Mn.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;let o=[],r=0;const s=new Hb(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Nn(i.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let h=i.startLineNumber;h<=i.endLineNumber;h++){if(h<l||h>c)continue;const e=h===i.startLineNumber?i.startColumn:1,u=h===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(h),d=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(h,e,u,s);if(d){if(t&&h<n){const e=a;a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Nn(h+1,1)).lineNumber,e!==a&&(d.ranges[d.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[r++]=new Rb(d.outsideRenderedLine,h,Pb.from(d.ranges))}}return 0===r?null:o}_visibleRangesForLineRange(e,t,n){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,new Hb(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new jb(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=1,o=!0;for(let r=t;r<=n;r++){const t=this._visibleLines.getVisibleLine(r);!e||t.getWidthIsFast()?i=Math.max(i,t.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let o=n;o<=i;o++){const n=this._visibleLines.getVisibleLine(o);if(n.needsMonospaceFontCheck()){const i=n.getWidth();i>t&&(t=i,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let o=n;o<=i;o++){const e=this._visibleLines.getVisibleLine(o);e.onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),b["d"]&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++){const e=this._visibleLines.getVisibleLine(n);if(e.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,n,i,o){const r=e.top,s=e.height,a=r+s;let l,c,h;if(i&&i.length>0){let e=i[0].startLineNumber,t=i[0].endLineNumber;for(let n=1,o=i.length;n<o;n++){const o=i[n];e=Math.min(e,o.startLineNumber),t=Math.max(t,o.endLineNumber)}l=!1,c=this._context.viewLayout.getVerticalOffsetForLineNumber(e),h=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!n)return-1;l=!0,c=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),h=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight}const u="mouse"===t&&"default"===this._cursorSurroundingLinesStyle;if(!u){const e=Math.min(s/this._lineHeight/2,this._cursorSurroundingLines);c-=e*this._lineHeight,h+=Math.max(0,e-1)*this._lineHeight}let d;if(0!==o&&4!==o||(h+=this._lineHeight),h-c>s){if(!l)return-1;d=c}else if(5===o||6===o)if(6===o&&r<=c&&h<=a)d=r;else{const e=Math.max(5*this._lineHeight,.2*s),t=c-e,n=h-s;d=Math.max(n,t)}else if(1===o||2===o)if(2===o&&r<=c&&h<=a)d=r;else{const e=(c+h)/2;d=Math.max(0,e-s/2)}else d=this._computeMinimumScrolling(r,a,c,h,3===o,4===o);return d}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=t.left,i=n+t.width;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const a of e.selections){if(a.startLineNumber!==a.endLineNumber)return null;const e=this._visibleRangesForLineRange(a.startLineNumber,a.startColumn,a.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}if(o=Math.max(0,o-Sk.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding,"selections"===e.type&&r-o>t.width)return null;const s=this._computeMinimumScrolling(n,i,o,r);return{scrollLeft:s,maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,n,i,o,r){e|=0,t|=0,n|=0,i|=0,o=!!o,r=!!r;const s=t-e,a=i-n;return a<s?o?n:r?Math.max(0,i-s):n<e?n:i>t?Math.max(0,i-s):e:n}}Sk.HORIZONTAL_EXTRA_PX=30;n("b042");class kk extends wk{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(129);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let o=0,r=t.length;o<r;o++){const e=t[o],r=e.options.linesDecorationsClassName;r&&(n[i++]=new yk(e.range.startLineNumber,e.range.endLineNumber,r));const s=e.options.firstLineDecorationClassName;s&&(n[i++]=new yk(e.range.startLineNumber,e.range.startLineNumber,s))}return n}prepareRender(e){const t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=this._decorationsLeft.toString(),r=this._decorationsWidth.toString(),s='" style="left:'+o+"px;width:"+r+'px;"></div>',a=[];for(let l=t;l<=n;l++){const e=l-t,n=i[e];let o="";for(let t=0,i=n.length;t<i;t++)o+='<div class="cldr '+n[t]+s;a[e]=o}this._renderResult=a}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}n("a23c");class Dk extends wk{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let o=0,r=t.length;o<r;o++){const e=t[o],r=e.options.marginClassName;r&&(n[i++]=new yk(e.range.startLineNumber,e.range.endLineNumber,r))}return n}prepareRender(e){const t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=[];for(let r=t;r<=n;r++){const e=r-t,n=i[e];let s="";for(let t=0,i=n.length;t<i;t++)s+='<div class="cmdr '+n[t]+'" style=""></div>';o[e]=s}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}n("36df");class Lk{constructor(e,t,n,i){this._rgba8Brand=void 0,this.r=Lk._clamp(e),this.g=Lk._clamp(t),this.b=Lk._clamp(n),this.a=Lk._clamp(i)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}Lk.Empty=new Lk(0,0,0,0);class Ik extends st{constructor(){super(),this._onDidChange=new bt,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Nc.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=Ze(new Ik)),this._INSTANCE}_updateColorMap(){const e=Nc.getColorMap();if(!e)return this._colors=[Lk.Empty],void(this._backgroundIsLight=!0);this._colors=[Lk.Empty];for(let n=1;n<e.length;n++){const t=e[n].rgba;this._colors[n]=new Lk(t.r,t.g,t.b,Math.round(255*t.a))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}Ik._INSTANCE=null;const Nk=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})(),Mk=(e,t)=>(e-=32,e<0||e>96?t<=2?(e+96)%96:95:e);class Bk{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Bk.soften(e,.8),this.charDataLight=Bk.soften(e,50/60)}static soften(e,t){let n=new Uint8ClampedArray(e.length);for(let i=0,o=e.length;i<o;i++)n[i]=lu(e[i]*t);return n}renderChar(e,t,n,i,o,r,s,a,l,c,h){const u=1*this.scale,d=2*this.scale,p=h?1:d;if(t+u>e.width||n+p>e.height)return;const f=c?this.charDataLight:this.charDataNormal,g=Mk(i,l),m=4*e.width,b=s.r,v=s.g,y=s.b,w=o.r-b,_=o.g-v,C=o.b-y,A=Math.max(r,a),E=e.data;let x=g*u*d,S=n*m+4*t;for(let k=0;k<p;k++){let e=S;for(let t=0;t<u;t++){const t=f[x++]/255*(r/255);E[e++]=b+w*t,E[e++]=v+_*t,E[e++]=y+C*t,E[e++]=A}S+=m}}blockRenderChar(e,t,n,i,o,r,s,a){const l=1*this.scale,c=2*this.scale,h=a?1:c;if(t+l>e.width||n+h>e.height)return;const u=4*e.width,d=o/255*.5,p=r.r,f=r.g,g=r.b,m=i.r-p,b=i.g-f,v=i.b-g,y=p+m*d,w=f+b*d,_=g+v*d,C=Math.max(o,s),A=e.data;let E=n*u+4*t;for(let x=0;x<h;x++){let e=E;for(let t=0;t<l;t++)A[e++]=y,A[e++]=w,A[e++]=_,A[e++]=C;E+=u}}}const Tk={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},Ok=e=>{const t=new Uint8ClampedArray(e.length/2);for(let n=0;n<e.length;n+=2)t[n>>1]=Tk[e[n]]<<4|15&Tk[e[n+1]];return t},Rk={1:He(()=>Ok("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:He(()=>Ok("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class Pk{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return n=Rk[e]?new Bk(Rk[e](),e):Pk.createFromSampleData(Pk.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){const t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font="bold 16px "+e,n.textBaseline="middle";let i=0;for(const o of Nk)n.fillText(String.fromCharCode(o),i,8),i+=10;return n.getImageData(0,0,960,16)}static createFromSampleData(e,t){const n=61440;if(e.length!==n)throw new Error("Unexpected source in MinimapCharRenderer");let i=Pk._downsample(e,t);return new Bk(i,t)}static _downsampleChar(e,t,n,i,o){const r=1*o,s=2*o;let a=i,l=0;for(let c=0;c<s;c++){const i=c/s*16,o=(c+1)/s*16;for(let s=0;s<r;s++){const c=s/r*10,h=(s+1)/r*10;let u=0,d=0;for(let n=i;n<o;n++){const i=t+3840*Math.floor(n),o=1-(n-Math.floor(n));for(let t=c;t<h;t++){const n=1-(t-Math.floor(t)),r=i+4*Math.floor(t),s=n*o;d+=s,u+=e[r]*e[r+3]/255*s}}const p=u/d;l=Math.max(l,p),n[a++]=lu(p)}}return l}static _downsample(e,t){const n=2*t*1*t,i=96*n,o=new Uint8ClampedArray(i);let r=0,s=0,a=0;for(let l=0;l<96;l++)a=Math.max(a,this._downsampleChar(e,s,o,r,t)),r+=n,s+=40;if(a>0){const e=255/a;for(let t=0;t<i;t++)o[t]*=e}return o}}const Fk=140,jk=2;class zk{constructor(e,t,n){const i=e.options,o=i.get(127),r=i.get(129),s=r.minimap,a=i.get(43),l=i.get(64);this.renderMinimap=s.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=s.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=i.get(93),this.showSlider=l.showSlider,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=i.get(58),this.minimapLeft=s.minimapLeft,this.minimapWidth=s.minimapWidth,this.minimapHeight=r.height,this.canvasInnerWidth=s.minimapCanvasInnerWidth,this.canvasInnerHeight=s.minimapCanvasInnerHeight,this.canvasOuterWidth=s.minimapCanvasOuterWidth,this.canvasOuterHeight=s.minimapCanvasOuterHeight,this.isSampling=s.minimapIsSampling,this.editorHeight=r.height,this.fontScale=s.minimapScale,this.minimapLineHeight=s.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=He(()=>Pk.create(this.fontScale,a.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=zk._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=zk._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const n=e.getColor(uC);return n?new Lk(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(dC);return t?Lk._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Vk{constructor(e,t,n,i,o,r,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=i,this.sliderTop=o,this.sliderHeight=r,this.startLineNumber=s,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,n,i,o,r,s,a,l,c,h){const u=e.pixelRatio,d=e.minimapLineHeight,p=Math.floor(e.canvasInnerHeight/d),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),n=Math.max(1,Math.floor(o*o/t)),i=Math.max(0,e.minimapHeight-n),r=i/(c-o),h=l*r,u=i>0,d=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new Vk(l,c,u,r,h,n,1,Math.min(s,d))}let g,m;if(r&&n!==s){const e=n-t+1;g=Math.floor(e*d/u)}else{const e=o/f;g=Math.floor(e*d/u)}m=e.scrollBeyondLastLine?(s-1)*d/u:Math.max(0,s*d/u-g),m=Math.min(e.minimapHeight-g,m);const b=m/(c-o),v=l*b;let y=0;if(e.scrollBeyondLastLine){const e=o/f;y=e-1}if(p>=s+y){const e=1,t=s,n=m>0;return new Vk(l,c,n,b,v,g,e,t)}{let e=Math.max(1,Math.floor(t-v*u/d));h&&h.scrollHeight===c&&(h.scrollTop>l&&(e=Math.min(e,h.startLineNumber)),h.scrollTop<l&&(e=Math.max(e,h.startLineNumber)));const n=Math.min(s,e+p-1),o=(l-i)/f,r=(t-e+o)*d/u;return new Vk(l,c,!0,b,r,g,e,n)}}}class Qk{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Qk.INVALID=new Qk(-1);class Wk{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new ES(()=>Qk.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get(),n=t.lines;for(let i=0,o=n.length;i<o;i++)if(-1===n[i].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class Hk{constructor(e,t,n,i){this._backgroundFillData=Hk._createBackgroundFillData(t,n,i),this._buffers=[e.createImageData(t,n),e.createImageData(t,n)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,n){const i=n.r,o=n.g,r=n.b,s=n.a,a=new Uint8ClampedArray(e*t*4);let l=0;for(let c=0;c<t;c++)for(let t=0;t<e;t++)a[l]=i,a[l+1]=o,a[l+2]=r,a[l+3]=s,l+=4;return a}}class Uk{constructor(e,t){this.samplingRatio=e,this.minimapLines=t}static compute(e,t,n){if(0===e.renderMinimap||!e.isSampling)return[null,[]];const i=e.pixelRatio,o=e.lineHeight,r=e.scrollBeyondLastLine,{minimapLineCount:s}=ne.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:r,height:e.editorHeight,lineHeight:o,pixelRatio:i}),a=t/s,l=a/2;if(!n||0===n.minimapLines.length){let e=[];if(e[0]=1,s>1){for(let t=0,n=s-1;t<n;t++)e[t]=Math.round(t*a+l);e[s-1]=t}return[new Uk(a,e),[]]}const c=n.minimapLines,h=c.length;let u=[],d=0,p=0,f=1;const g=10;let m=[],b=null;for(let v=0;v<s;v++){const e=Math.max(f,Math.round(v*a)),n=Math.max(e,Math.round((v+1)*a));while(d<h&&c[d]<e){if(m.length<g){const e=d+1+p;b&&"deleted"===b.type&&b._oldIndex===d-1?b.deleteToLineNumber++:(b={type:"deleted",_oldIndex:d,deleteFromLineNumber:e,deleteToLineNumber:e},m.push(b)),p--}d++}let i;if(d<h&&c[d]<=n)i=c[d],d++;else if(i=0===v?1:v+1===s?t:Math.round(v*a+l),m.length<g){const e=d+1+p;b&&"inserted"===b.type&&b._i===v-1?b.insertToLineNumber++:(b={type:"inserted",_i:v,insertFromLineNumber:e,insertToLineNumber:e},m.push(b)),p++}u[v]=i,f=i}if(m.length<g)while(d<h){const e=d+1+p;b&&"deleted"===b.type&&b._oldIndex===d-1?b.deleteToLineNumber++:(b={type:"deleted",_oldIndex:d,deleteFromLineNumber:e,deleteToLineNumber:e},m.push(b)),p--,d++}else m=[{type:"flush"}];return[new Uk(a,u),m]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e)-1;while(n>0&&this.minimapLines[n-1]>=e)n--;let i=this.modelLineToMinimapLine(t)-1;while(i+1<this.minimapLines.length&&this.minimapLines[i+1]<=t)i++;if(n===i){const i=this.minimapLines[n];if(i<e||i>t)return null}return[n+1,i+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),i=this.modelLineToMinimapLine(t);return e!==t&&i===n&&(i===this.minimapLines.length?n>1&&n--:i++),[n,i]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,i=0;for(let o=this.minimapLines.length-1;o>=0;o--){if(this.minimapLines[o]<e.fromLineNumber)break;this.minimapLines[o]<=e.toLineNumber?(this.minimapLines[o]=Math.max(1,e.fromLineNumber-1),n=Math.min(n,o),i=Math.max(i,o)):this.minimapLines[o]-=t}return[n,i]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let n=this.minimapLines.length-1;n>=0;n--){if(this.minimapLines[n]<e.fromLineNumber)break;this.minimapLines[n]+=t}}}class Yk extends Mb{constructor(e){super(e),this.tokensColorTracker=Ik.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new zk(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=Uk.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new Gk(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new zk(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.toLineNumber);return!!t&&this._actual.onLinesChanged(t[0],t[1])}return this._actual.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){if(this._samplingState){const[t,n]=this._samplingState.onLinesDeleted(e);return t<=n&&this._actual.onLinesChanged(t+1,n+1),this._shouldCheckSampling=!0,!0}return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){let t=[];for(const n of e.ranges){const e=this._samplingState.modelLineRangeToMinimapLineRange(n.fromLineNumber,n.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),n=this._samplingState.modelLineToMinimapLine(n));const i={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(i)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,n]=Uk.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const i of n)switch(i.type){case"deleted":this._actual.onLinesDeleted(i.deleteFromLineNumber,i.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(i.insertFromLineNumber,i.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.model.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){let i=[];for(let o=0,r=t-e+1;o<r;o++)n[o]?i[o]=this._context.model.getViewLineData(this._samplingState.minimapLines[e+o-1]):i[o]=null;return i}return this._context.model.getMinimapLinesRenderingData(e,t,n).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,n]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new Bn(t,e.startColumn,n,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let n;if(this._samplingState){const i=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];n=new Mn(i,1,o,this._context.model.getLineMaxColumn(o))}else n=new Mn(e,1,t,this._context.model.getLineMaxColumn(t));const i=this._context.model.getDecorationsInViewport(n);if(this._samplingState){let e=[];for(const t of i){if(!t.options.minimap)continue;const n=t.range,i=this._samplingState.modelLineToMinimapLine(n.startLineNumber),o=this._samplingState.modelLineToMinimapLine(n.endLineNumber);e.push(new Ud(new Mn(i,n.startColumn,o,n.endColumn),t.options))}return e}return i}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.model.revealRange("mouse",!1,new Mn(e,1,e,1),1,0)}setScrollTop(e){this._context.model.setScrollPosition({scrollTop:e},1)}}class Gk extends st{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(lC),this._domNode=mb(document.createElement("div")),Bb.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=mb(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=mb(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=mb(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=mb(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=mb(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=ko(this._domNode.domNode,"mousedown",e=>{e.preventDefault();const t=this._model.options.renderMinimap;if(0===t)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=Ho(this._slider.domNode),n=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,n,e.posy,this._lastRenderData.renderedLayout)}return}const n=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY,o=Math.floor(i/n);let r=o+this._lastRenderData.renderedLayout.startLineNumber;r=Math.min(r,this._model.getLineCount()),this._model.revealLineNumber(r)}),this._sliderMouseMoveMonitor=new Cb,this._sliderMouseDownListener=ko(this._slider.domNode,"mousedown",e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=wb.addTarget(this._domNode.domNode),this._sliderTouchStartListener=Eo(this._domNode.domNode,vb.Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=Eo(this._domNode.domNode,vb.Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=ko(this._domNode.domNode,vb.End,e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n,i,o){this._slider.toggleClassName("active",!0);const r=(e,i)=>{const r=Math.abs(i-t);if(b["i"]&&r>Fk)return void this._model.setScrollTop(o.scrollTop);const s=e-n;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(s))};i!==n&&r(i,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,_b,e=>r(e.posy,e.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Hk(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(lC),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){const t=this._model.options.renderMinimap;if(0===t)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const n=Vk.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight);const i=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,o=Math.min(this._model.options.minimapWidth,Math.round(i*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(o),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-o),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(Mn.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0));const{canvasInnerWidth:i,canvasInnerHeight:o}=this._model.options,r=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,i,o);const c=new Kk(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,r),this._renderDecorationsLineHighlights(l,n,c,e,r);const h=new Kk(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,h,e,r,a,s,i),this._renderDecorationsHighlights(l,n,h,e,r,a,s,i)}}_renderSelectionLineHighlights(e,t,n,i,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,s=0;for(const a of t){const t=Math.max(i.startLineNumber,a.startLineNumber),l=Math.min(i.endLineNumber,a.endLineNumber);if(t>l)continue;for(let e=t;e<=l;e++)n.set(e,!0);const c=(t-i.startLineNumber)*o,h=(l-i.startLineNumber)*o+o;s>=c||(s>r&&e.fillRect(x,r,e.canvas.width,s-r),r=c),s=h}s>r&&e.fillRect(x,r,e.canvas.width,s-r)}_renderDecorationsLineHighlights(e,t,n,i,o){const r=new Map;for(let s=t.length-1;s>=0;s--){const a=t[s],l=a.options.minimap;if(!l||l.position!==Ka.Inline)continue;const c=Math.max(i.startLineNumber,a.range.startLineNumber),h=Math.min(i.endLineNumber,a.range.endLineNumber);if(c>h)continue;const u=l.getColor(this._theme);if(!u||u.isTransparent())continue;let d=r.get(u.toString());d||(d=u.transparent(.5).toString(),r.set(u.toString(),d)),e.fillStyle=d;for(let t=c;t<=h;t++){if(n.has(t))continue;n.set(t,!0);const r=(c-i.startLineNumber)*o;e.fillRect(x,r,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,n,i,o,r,s,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=Math.max(i.startLineNumber,l.startLineNumber),c=Math.min(i.endLineNumber,l.endLineNumber);if(!(t>c))for(let h=t;h<=c;h++)this.renderDecorationOnLine(e,n,l,this._selectionColor,i,h,o,o,r,s,a)}}_renderDecorationsHighlights(e,t,n,i,o,r,s,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=Math.max(i.startLineNumber,l.range.startLineNumber),h=Math.min(i.endLineNumber,l.range.endLineNumber);if(c>h)continue;const u=t.getColor(this._theme);if(u&&!u.isTransparent())for(let d=c;d<=h;d++)switch(t.position){case Ka.Inline:this.renderDecorationOnLine(e,n,l.range,u,i,d,o,o,r,s,a);continue;case Ka.Gutter:const t=(d-i.startLineNumber)*o,c=2;this.renderDecoration(e,u,c,t,jk,o);continue}}}renderDecorationOnLine(e,t,n,i,o,r,s,a,l,c,h){const u=(r-o.startLineNumber)*a;if(u+s<0||u>this._model.options.canvasInnerHeight)return;const{startLineNumber:d,endLineNumber:p}=n,f=d===r?n.startColumn:1,g=p===r?n.endColumn:this._model.getLineMaxColumn(r),m=this.getXOffsetForPosition(t,r,f,l,c,h),b=this.getXOffsetForPosition(t,r,g,l,c,h);this.renderDecoration(e,i,m,u,b-m,s)}getXOffsetForPosition(e,t,n,i,o,r){if(1===n)return x;const s=(n-1)*o;if(s>=r)return r;let a=e.get(t);if(!a){const n=this._model.getLineContent(t);a=[x];let s=x;for(let e=1;e<n.length+1;e++){const t=n.charCodeAt(e-1),l=9===t?i*o:_s(t)?2*o:o,c=s+l;if(c>=r){a[e]=r;break}a[e]=c,s=c}e.set(t,a)}return n-1<a.length?a[n-1]:r}renderDecoration(e,t,n,i,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(n,i,o,r)}renderLines(e){const t=e.startLineNumber,n=e.endLineNumber,i=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new Wk(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;let[r,s,a]=Gk._renderUntouchedLines(o,t,n,i,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,n,a),c=this._model.getOptions().tabSize,h=this._model.options.defaultBackgroundColor,u=this._model.options.backgroundColor,d=this._model.options.foregroundAlpha,p=this._model.tokensColorTracker,f=p.backgroundIsLight(),g=this._model.options.renderMinimap,m=this._model.options.charRenderer(),b=this._model.options.fontScale,v=this._model.options.minimapCharWidth,y=1===g?2:3,w=y*b,_=i>w?Math.floor((i-w)/2):0,C=u.a/255,A=new Lk(Math.round((u.r-h.r)*C+h.r),Math.round((u.g-h.g)*C+h.g),Math.round((u.b-h.b)*C+h.b),255);let E=0;const x=[];for(let I=0,N=n-t+1;I<N;I++)a[I]&&Gk._renderLine(o,A,u.a,f,g,v,p,d,m,E,_,c,l[I],b,i),x[I]=new Qk(E),E+=i;const S=-1===r?0:r,k=-1===s?o.height:s,D=k-S,L=this._canvas.domNode.getContext("2d");return L.putImageData(o,0,0,0,S,o.width,D),new Wk(e,o,x)}static _renderUntouchedLines(e,t,n,i,o){const r=[];if(!o){for(let e=0,i=n-t+1;e<i;e++)r[e]=!0;return[-1,-1,r]}const s=o._get(),a=s.imageData.data,l=s.rendLineNumberStart,c=s.lines,h=c.length,u=e.width,d=e.data,p=(n-t+1)*i*u*4;let f=-1,g=-1,m=-1,b=-1,v=-1,y=-1,w=0;for(let A=t;A<=n;A++){const e=A-t,n=A-l,o=n>=0&&n<h?c[n].dy:-1;if(-1===o){r[e]=!0,w+=i;continue}const s=o*u*4,_=(o+i)*u*4,C=w*u*4,E=(w+i)*u*4;b===s&&y===C?(b=_,y=E):(-1!==m&&(d.set(a.subarray(m,b),v),-1===f&&0===m&&m===v&&(f=b),-1===g&&b===p&&m===v&&(g=m)),m=s,b=_,v=C,y=E),r[e]=!1,w+=i}-1!==m&&(d.set(a.subarray(m,b),v),-1===f&&0===m&&m===v&&(f=b),-1===g&&b===p&&m===v&&(g=m));const _=-1===f?-1:f/(4*u),C=-1===g?-1:g/(4*u);return[_,C,r]}static _renderLine(e,t,n,i,o,r,s,a,l,c,h,u,d,p,f){const g=d.content,m=d.tokens,b=e.width-r,v=1===f;let y=x,w=0,_=0;for(let C=0,A=m.getCount();C<A;C++){const d=m.getEndOffset(C),f=m.getForeground(C),A=s.getColor(f);for(;w<d;w++){if(y>b)return;const s=g.charCodeAt(w);if(9===s){const e=u-(w+_)%u;_+=e-1,y+=e*r}else if(32===s)y+=r;else{const u=_s(s)?2:1;for(let d=0;d<u;d++)if(2===o?l.blockRenderChar(e,y,c+h,A,a,t,n,v):l.renderChar(e,y,c+h,s,A,a,t,n,p,i,v),y+=r,y>b)return}}}}}class Kk{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let i=0,o=this._endLineNumber-this._startLineNumber+1;i<o;i++)this._values[i]=n}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}Mm((e,t)=>{const n=e.getColor(pC);n&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${n}; }`);const i=e.getColor(fC);i&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${i}; }`);const o=e.getColor(gC);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const r=e.getColor(jw);r&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${r} -6px 0 6px -6px inset; }`)});n("70a8");class qk extends Mb{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._widgets={},this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,this._domNode=mb(document.createElement("div")),Bb.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){const t=mb(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t],n=e.domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let n=0,i=t.length;n<i;n++){const e=t[n];this._renderWidget(this._widgets[e])}}}class Jk{constructor(e,t){const n=e.options;this.lineHeight=n.get(58),this.pixelRatio=n.get(127),this.overviewRulerLanes=n.get(73),this.renderBorder=n.get(72);const i=t.getColor(QC);this.borderColor=i?i.toString():null,this.hideCursor=n.get(51);const o=t.getColor(BC);this.cursorColor=o?o.transparent(.7).toString():null,this.themeType=t.type;const r=n.get(64),s=r.enabled,a=r.side,l=s?t.getColor(WC)||Nc.getDefaultBackground():null;this.backgroundColor=null===l||"left"===a?null:sw.Format.CSS.formatHex(l);const c=n.get(129),h=c.overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[u,d]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=u,this.w=d}_initLanes(e,t,n){const i=t-e;if(n>=3){const t=Math.floor(i/3),n=Math.floor(i/3),o=i-t-n,r=e,s=r+t,a=r+t+o;return[[0,r,s,r,a,r,s,r],[0,t,o,t+o,n,t+o+n,o+n,t+o+n]]}if(2===n){const t=Math.floor(i/2),n=i-t,o=e,r=o+t;return[[0,o,o,o,r,o,o,o],[0,t,t,t,n,t+n,t+n,t+n]]}{const t=e,n=i;return[[0,t,t,t,t,t,t,t],[0,n,n,n,n,n,n,n]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class $k extends Mb{constructor(e){super(e),this._domNode=mb(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Nc.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Jk(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;t<n;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(Nn.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){if(0===this._settings.overviewRulerLanes)return void this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");const e=this._settings.canvasWidth,t=this._settings.canvasHeight,n=this._settings.lineHeight,i=this._context.viewLayout,o=this._context.viewLayout.getScrollHeight(),r=t/o,s=this._context.model.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,l=a/2|0,c=this._domNode.domNode.getContext("2d");null===this._settings.backgroundColor?c.clearRect(0,0,e,t):(c.fillStyle=this._settings.backgroundColor,c.fillRect(0,0,e,t));const h=this._settings.x,u=this._settings.w,d=Object.keys(s);d.sort();for(let p=0,f=d.length;p<f;p++){const e=d[p],o=s[e];c.fillStyle=e;let f=0,g=0,m=0;for(let s=0,d=o.length;s<d;s++){const e=o[3*s],d=o[3*s+1],p=o[3*s+2];let b=i.getVerticalOffsetForLineNumber(d)*r|0,v=(i.getVerticalOffsetForLineNumber(p)+n)*r|0;const y=v-b;if(y<a){let e=(b+v)/2|0;e<l?e=l:e+l>t&&(e=t-l),b=e-l,v=e+l}b>m+1||e!==f?(0!==s&&c.fillRect(h[f],g,u[f],m-g),f=e,g=b,m=v):v>m&&(m=v)}c.fillRect(h[f],g,u[f],m-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,n=e/2|0,o=this._settings.x[7],s=this._settings.w[7];c.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let h=0,u=this._cursorPositions.length;h<u;h++){const u=this._cursorPositions[h];let d=i.getVerticalOffsetForLineNumber(u.lineNumber)*r|0;d<n?d=n:d+n>t&&(d=t-n);const p=d-n,f=p+e;p>l+1?(0!==h&&c.fillRect(o,a,s,l-a),a=p,l=f):f>l&&(l=f)}c.fillRect(o,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(c.beginPath(),c.lineWidth=1,c.strokeStyle=this._settings.borderColor,c.moveTo(0,0),c.lineTo(0,t),c.stroke(),c.moveTo(0,0),c.lineTo(e,0),c.stroke())}}class Xk{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|n}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class Zk{constructor(e,t,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class eD{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(Zk.compare)}setLineHeight(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),n=Math.floor(this.getCanvasHeight()),i=Math.floor(this._outerHeight),o=n/i,r=Math.floor(4*this._pixelRatio/2);let s=[];for(let a=0,l=this._zones.length;a<l;a++){const i=this._zones[a];if(!e){const e=i.getColorZones();if(e){s.push(e);continue}}const l=Math.floor(o*this._getVerticalOffsetForLine(i.startLineNumber)),c=Math.floor(o*(this._getVerticalOffsetForLine(i.endLineNumber)+t));let h=Math.floor((l+c)/2),u=c-h;u<r&&(u=r),h-u<0&&(h=u),h+u>n&&(h=n-u);const d=i.color;let p=this._color2Id[d];p||(p=++this._lastAssignedId,this._color2Id[d]=p,this._id2Color[p]=d);const f=new Xk(h-u,h+u,p);i.setColorZone(f),s.push(f)}return this._colorZonesInvalid=!1,s.sort(Xk.compare),s}}class tD extends Nb{constructor(e,t){super(),this._context=e;const n=this._context.configuration.options;this._domNode=mb(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new eD(e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(58)),this._zoneManager.setPixelRatio(n.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(58)&&(this._zoneManager.setLineHeight(t.get(58)),this._render()),e.hasChanged(127)&&(this._zoneManager.setPixelRatio(t.get(127)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0}_renderOneLane(e,t,n,i){let o=0,r=0,s=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,r,i,s-r),o=t,e.fillStyle=n[o],r=l,s=c):s>=l?s=Math.max(s,c):(e.fillRect(0,r,i,s-r),r=l,s=c)}e.fillRect(0,r,i,s-r)}}n("df93");class nD extends Mb{constructor(e){super(e),this.domNode=mb(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:n}=this._context.model.getTextModelOptions(),i=n;let o=t-e;while(o>0){const e=mb(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(i),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let n=e-t;while(n>0){const e=this._renderedRulers.pop();this.domNode.removeChild(e),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t<n;t++){const n=this._renderedRulers[t],i=this._rulers[t];n.setBoxShadow(i.color?`1px 0 0 0 ${i.color} inset`:""),n.setHeight(Math.min(e.scrollHeight,1e6)),n.setLeft(i.column*this._typicalHalfwidthCharacterWidth)}}}Mm((e,t)=>{const n=e.getColor(VC);n&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${n} inset; }`)});n("9368");class iD extends Mb{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options,n=t.get(91);this._useShadows=n.useShadows,this._domNode=mb(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options,t=e.get(129);0===t.minimap.renderMinimap||t.minimap.minimapWidth>0&&0===t.minimap.minimapLeft?this._width=t.width:this._width=t.width-t.minimap.minimapWidth-t.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(91);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}Mm((e,t)=>{const n=e.getColor(jw);n&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${n} 0 6px 6px -6px inset; }`)});n("adf0");class oD{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class rD{constructor(e,t){this.lineNumber=e,this.ranges=t}}function sD(e){return new oD(e)}function aD(e){return new rD(e.lineNumber,e.ranges.map(sD))}class lD extends Ix{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t<n;t++){const n=e[t];if(n.ranges.length>1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,n){const i=this._typicalHalfwidthCharacterWidth/4;let o=null,r=null;if(n&&n.length>0&&t.length>0){const i=t[0].lineNumber;if(i===e.startLineNumber)for(let e=0;!o&&e<n.length;e++)n[e].lineNumber===i&&(o=n[e].ranges[0]);const s=t[t.length-1].lineNumber;if(s===e.endLineNumber)for(let e=n.length-1;!r&&e>=0;e--)n[e].lineNumber===s&&(r=n[e].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}for(let s=0,a=t.length;s<a;s++){const e=t[s].ranges[0],n=e.left,l=e.left+e.width,c={top:0,bottom:0},h={top:0,bottom:0};if(s>0){const e=t[s-1].ranges[0].left,o=t[s-1].ranges[0].left+t[s-1].ranges[0].width;cD(n-e)<i?c.top=2:n>e&&(c.top=1),cD(l-o)<i?h.top=2:e<l&&l<o&&(h.top=1)}else o&&(c.top=o.startStyle.top,h.top=o.endStyle.top);if(s+1<a){const e=t[s+1].ranges[0].left,o=t[s+1].ranges[0].left+t[s+1].ranges[0].width;cD(n-e)<i?c.bottom=2:e<n&&n<o&&(c.bottom=1),cD(l-o)<i?h.bottom=2:l<o&&(h.bottom=1)}else r&&(c.bottom=r.startStyle.bottom,h.bottom=r.endStyle.bottom);e.startStyle=c,e.endStyle=h}}_getVisibleRangesWithStyle(e,t,n){const i=t.linesVisibleRangesForRange(e,!0)||[],o=i.map(aD),r=this._visibleRangesHaveGaps(o);return!r&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,o,n),o}_createSelectionPiece(e,t,n,i,o){return'<div class="cslr '+n+'" style="top:'+e.toString()+"px;left:"+i.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,n,i){if(0===i.length)return;const o=!!i[0].ranges[0].startStyle,r=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=i[0].lineNumber,l=i[i.length-1].lineNumber;for(let c=0,h=i.length;c<h;c++){const h=i[c],u=h.lineNumber,d=u-t,p=n&&(u===l||u===a)?s:r,f=n&&u===a?1:0;let g="",m="";for(let e=0,t=h.ranges.length;e<t;e++){const t=h.ranges[e];if(o){const e=t.startStyle,n=t.endStyle;if(1===e.top||1===e.bottom){g+=this._createSelectionPiece(f,p,lD.SELECTION_CLASS_NAME,t.left-lD.ROUNDED_PIECE_WIDTH,lD.ROUNDED_PIECE_WIDTH);let n=lD.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(n+=" "+lD.SELECTION_TOP_RIGHT),1===e.bottom&&(n+=" "+lD.SELECTION_BOTTOM_RIGHT),g+=this._createSelectionPiece(f,p,n,t.left-lD.ROUNDED_PIECE_WIDTH,lD.ROUNDED_PIECE_WIDTH)}if(1===n.top||1===n.bottom){g+=this._createSelectionPiece(f,p,lD.SELECTION_CLASS_NAME,t.left+t.width,lD.ROUNDED_PIECE_WIDTH);let e=lD.EDITOR_BACKGROUND_CLASS_NAME;1===n.top&&(e+=" "+lD.SELECTION_TOP_LEFT),1===n.bottom&&(e+=" "+lD.SELECTION_BOTTOM_LEFT),g+=this._createSelectionPiece(f,p,e,t.left+t.width,lD.ROUNDED_PIECE_WIDTH)}}let n=lD.SELECTION_CLASS_NAME;if(o){const e=t.startStyle,i=t.endStyle;0===e.top&&(n+=" "+lD.SELECTION_TOP_LEFT),0===e.bottom&&(n+=" "+lD.SELECTION_BOTTOM_LEFT),0===i.top&&(n+=" "+lD.SELECTION_TOP_RIGHT),0===i.bottom&&(n+=" "+lD.SELECTION_BOTTOM_RIGHT)}m+=this._createSelectionPiece(f,p,n,t.left,t.width)}e[d][0]+=g,e[d][1]+=m}}prepareRender(e){const t=[],n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;for(let r=n;r<=i;r++){const e=r-n;t[e]=["",""]}const o=[];for(let r=0,s=this._selections.length;r<s;r++){const i=this._selections[r];if(i.isEmpty()){o[r]=null;continue}const s=this._getVisibleRangesWithStyle(i,e,this._previousFrameVisibleRangesWithStyle[r]);o[r]=s,this._actualRenderOneSelection(t,n,this._selections.length>1,s)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function cD(e){return e<0?-e:e}lD.SELECTION_CLASS_NAME="selected-text",lD.SELECTION_TOP_LEFT="top-left-radius",lD.SELECTION_BOTTOM_LEFT="bottom-left-radius",lD.SELECTION_TOP_RIGHT="top-right-radius",lD.SELECTION_BOTTOM_RIGHT="bottom-right-radius",lD.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",lD.ROUNDED_PIECE_WIDTH=10,Mm((e,t)=>{const n=e.getColor(g_);n&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${n}; }`);const i=e.getColor(b_);i&&t.addRule(`.monaco-editor .selected-text { background-color: ${i}; }`);const o=e.getColor(m_);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)});n("b856");class hD{constructor(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r}}class uD{constructor(e){this._context=e;const t=this._context.configuration.options,n=t.get(43);this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=mb(document.createElement("div")),this._domNode.setClassName("cursor "+Bx),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),fb.applyFontInfo(this._domNode,n),this._domNode.setDisplay("none"),this._position=new Nn(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(43);return this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),fb.applyFontInfo(this._domNode,n),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===U.Line||this._cursorStyle===U.LineThin){const n=e.visibleRangeForPosition(this._position);if(!n||n.outsideRenderedLine)return null;let i;if(this._cursorStyle===U.Line){if(i=xr(this._lineCursorWidth>0?this._lineCursorWidth:2),i>2){const e=this._context.model.getLineContent(this._position.lineNumber),n=hs(e,this._position.column-1);t=e.substr(this._position.column-1,n)}}else i=xr(1);let o=n.left;i>=2&&o>=1&&(o-=1);const r=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new hD(r,o,i,this._lineHeight,t,"")}const n=this._context.model.getLineContent(this._position.lineNumber),i=hs(n,this._position.column-1),o=e.linesVisibleRangesForRange(new Mn(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+i),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const s=r.ranges[0],a=s.width<1?this._typicalHalfwidthCharacterWidth:s.width;let l="";if(this._cursorStyle===U.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=n.substr(this._position.column-1,i);const o=e.tokens.findTokenIndexAtOffset(this._position.column-1);l=e.tokens.getClassName(o)}let c=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==U.Underline&&this._cursorStyle!==U.UnderlineThin||(c+=this._lineHeight-2,h=2),new hD(c,s.left,a,h,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Bx} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class dD extends Mb{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new uD(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=mb(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new co,this._cursorFlatBlinkInterval=new ho,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,i=this._secondaryCursors.length;n<i;n++)this._secondaryCursors[n].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length){const e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){const e=new uD(this._context);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let n=0;n<t.length;n++)this._secondaryCursors[n].onCursorPositionChanged(t[n])}onCursorStateChanged(e){const t=[];for(let i=0,o=e.selections.length;i<o;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));const n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=t=>{for(let n=0,i=e.ranges.length;n<i;n++)if(e.ranges[n].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[n].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const n of this._secondaryCursors)if(t(n.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=0===e,n=5===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||n||(1===e?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},dD.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},dD.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case U.Line:e+=" cursor-line-style";break;case U.Block:e+=" cursor-block-style";break;case U.Underline:e+=" cursor-underline-style";break;case U.LineThin:e+=" cursor-line-thin-style";break;case U.BlockOutline:e+=" cursor-block-outline-style";break;case U.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],n=0;const i=this._primaryCursor.render(e);i&&(t[n++]=i);for(let o=0,r=this._secondaryCursors.length;o<r;o++){const i=this._secondaryCursors[o].render(e);i&&(t[n++]=i)}this._renderData=t}getLastRenderData(){return this._renderData}}dD.BLINK_INTERVAL=500,Mm((e,t)=>{const n=e.getColor(BC);if(n){let i=e.getColor(TC);i||(i=n.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${n}; border-color: ${n}; color: ${i}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const pD=()=>{throw new Error("Invalid change accessor")};class fD extends Mb{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(129);this._lineHeight=t.get(58),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=mb(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=mb(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let n=!1;return this._context.model.changeWhitespace(e=>{const i=Object.keys(this._zones);for(let o=0,r=i.length;o<r;o++){const r=i[o],s=this._zones[r],a=this._computeWhitespaceProps(s.delegate),l=t.get(r);!l||l.afterLineNumber===a.afterViewLineNumber&&l.height===a.heightInPx||(e.changeOneWhitespace(r,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(s.delegate,a.heightInPx),n=!0)}}),n}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(129);return this._lineHeight=t.get(58),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,e.hasChanged(58)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return"undefined"!==typeof e.afterColumn?e.afterColumn:1e4}_computeWhitespaceProps(e){if(0===e.afterLineNumber)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t,n;if("undefined"!==typeof e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const n=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new Nn(n,this._context.model.getModelLineMaxColumn(n))}n=t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const i=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),o=this._context.model.coordinatesConverter.modelPositionIsVisible(n);return{afterViewLineNumber:i.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.model.changeWhitespace(n=>{const i={addZone:e=>(t=!0,this._addZone(n,e)),removeZone:e=>{e&&(t=this._removeZone(n,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(n,e)||t)}};gD(e,i),i.addZone=pD,i.removeZone=pD,i.layoutZone=pD}),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),i=e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),o={whitespaceId:i,delegate:t,isVisible:!1,domNode:mb(t.domNode),marginDomNode:t.marginDomNode?mb(t.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,n.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t],i=this._computeWhitespaceProps(n.delegate);return e.changeOneWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"===typeof e.heightInPx?e.heightInPx:"number"===typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"===typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"===typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(n){Oe(n)}}_safeCallOnDomNodeTop(e,t){if("function"===typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(n){Oe(n)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,n={};let i=!1;for(let r=0,s=t.length;r<s;r++)n[t[r].id]=t[r],i=!0;const o=Object.keys(this._zones);for(let r=0,s=o.length;r<s;r++){const t=o[r],i=this._zones[t];let s=0,a=0,l="none";n.hasOwnProperty(t)?(s=n[t].verticalOffset-e.bigNumbersDelta,a=n[t].height,l="block",i.isVisible||(i.domNode.setAttribute("monaco-visible-view-zone","true"),i.isVisible=!0),this._safeCallOnDomNodeTop(i.delegate,e.getScrolledTopFromAbsoluteTop(n[t].verticalOffset))):(i.isVisible&&(i.domNode.removeAttribute("monaco-visible-view-zone"),i.isVisible=!1),this._safeCallOnDomNodeTop(i.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),i.domNode.setTop(s),i.domNode.setHeight(a),i.domNode.setDisplay(l),i.marginDomNode&&(i.marginDomNode.setTop(s),i.marginDomNode.setHeight(a),i.marginDomNode.setDisplay(l))}i&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function gD(e,t){try{return e(t)}catch(n){Oe(n)}}class mD{constructor(e){this._theme=e}get type(){return this._theme.type}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class bD{constructor(e,t,n){this.configuration=e,this.theme=new mD(t),this.model=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.model.addViewEventHandler(e)}removeEventHandler(e){this.model.removeViewEventHandler(e)}}class vD{constructor(e,t,n,i){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=n,this._model=i,this.visibleRange=new Mn(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class yD extends Nb{constructor(e,t,n,i,o,r){super(),this._selections=[new Bn(1,1,1,1)],this._renderAnimationFrame=null;const s=new _S(t,i,o,e);this._context=new bD(t,n.getColorTheme(),i),this._configPixelRatio=this._context.configuration.options.get(127),this._context.addEventHandler(this),this._register(n.onDidColorThemeChange(e=>{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new Rx(this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=mb(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=mb(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=mb(document.createElement("div")),Bb.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new vk(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Sk(this._context,this._linesContent),this._viewZones=new fD(this._context),this._viewParts.push(this._viewZones);const a=new $k(this._context);this._viewParts.push(a);const l=new iD(this._context);this._viewParts.push(l);const c=new LS(this._context);this._viewParts.push(c),c.addDynamicOverlay(new PS(this._context)),c.addDynamicOverlay(new lD(this._context)),c.addDynamicOverlay(new Ck(this._context)),c.addDynamicOverlay(new jS(this._context));const h=new IS(this._context);this._viewParts.push(h),h.addDynamicOverlay(new FS(this._context)),h.addDynamicOverlay(new _k(this._context)),h.addDynamicOverlay(new Dk(this._context)),h.addDynamicOverlay(new kk(this._context)),h.addDynamicOverlay(new Nx(this._context));const u=new Mx(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(h.getDomNode()),this._viewParts.push(u),this._contentWidgets=new MS(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new dD(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new qk(this._context),this._viewParts.push(this._overlayWidgets);const d=new nD(this._context);this._viewParts.push(d);const p=new Yk(this._context);if(this._viewParts.push(p),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(d.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(p.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Lx(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new qE(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Nn(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Nn(e,t)))}}_applyLayout(){const e=this._context.configuration.options,t=e.get(129);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+Dm(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=Io(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){wD(()=>this._actualRender())}_getViewPartsToRender(){let e=[],t=0;for(const n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_actualRender(){if(!Co(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const n=new vD(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const i=new Ob(this._context.viewLayout,n,this._viewLines);for(const o of e)o.prepareRender(i);for(const o of e)o.render(i),o.onDidRender();Math.abs(Ni()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const n=this._context.model.validateModelPosition({lineNumber:e,column:t}),i=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new Nn(i.lineNumber,i.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?CS.convertViewToModelMouseTarget(n,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new tD(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const n=e.position?e.position.position:null;null!==n&&(t=new Mn(n.lineNumber,n.column,n.lineNumber,n.column))}const n=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,n),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null,n=this._overlayWidgets.setWidgetPosition(e.widget,t);n&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}function wD(e){try{return e()}catch(t){Oe(t)}}class _D{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new FE(new Mn(1,1,1,1),0,new Nn(1,1),0),new FE(new Mn(1,1,1,1),0,new Nn(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new QE(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new Bn(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new Bn(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,i){return t.equals(n)?i:e.normalizePosition(t,2)}static _validateViewState(e,t){const n=t.position,i=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),r=e.normalizePosition(n,2),s=this._validatePositionWithCache(e,i,n,r),a=this._validatePositionWithCache(e,o,i,s);return n.equals(r)&&i.equals(s)&&o.equals(a)?t:new FE(Mn.fromPositions(s,a),t.selectionStartLeftoverVisibleColumns+i.column-s.column,r,t.leftoverVisibleColumns+n.column-r.column)}_setState(e,t,n){if(n&&(n=_D._validateViewState(e.viewModel,n)),t){const n=e.model.validateRange(t.selectionStart),i=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),r=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new FE(n,i,o,r)}else{if(!n)return;const i=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new FE(i,n.selectionStartLeftoverVisibleColumns,o,n.leftoverVisibleColumns)}if(n){const i=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new FE(i,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const i=e.coordinatesConverter.convertModelPositionToViewPosition(new Nn(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new Nn(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new Mn(i.lineNumber,i.column,o.lineNumber,o.column),s=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new FE(r,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}class CD{constructor(e){this.context=e,this.primaryCursor=new _D(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)}readSelectionFromMarkers(){let e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e}getAll(){let e=[];e[0]=this.primaryCursor.asCursorState();for(let t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e}getViewPositions(){let e=[];e[0]=this.primaryCursor.viewState.position;for(let t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e}getTopMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,n=this.secondaryCursors.length;t<n;t++){const n=this.secondaryCursors[t].viewState.position;n.isBefore(e)&&(e=n)}return e}getBottomMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,n=this.secondaryCursors.length;t<n;t++){const n=this.secondaryCursors[t].viewState.position;e.isBeforeOrEqual(n)&&(e=n)}return e}getSelections(){let e=[];e[0]=this.primaryCursor.modelState.selection;for(let t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e}getViewSelections(){let e=[];e[0]=this.primaryCursor.viewState.selection;for(let t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e}setSelections(e){this.setStates(QE.fromModelSelections(e))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(e){null!==e&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.secondaryCursors.length,n=e.length;if(t<n){let e=n-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>n){let e=t-n;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let i=0;i<n;i++)this.secondaryCursors[i].setState(this.context,e[i].modelState,e[i].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new _D(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,n=this.secondaryCursors.length;t<n;t++)e[t+1]=this.secondaryCursors[t];return e}normalize(){if(0===this.secondaryCursors.length)return;let e=this._getAll(),t=[];for(let n=0,i=e.length;n<i;n++)t.push({index:n,selection:e[n].modelState.selection});t.sort((e,t)=>e.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber);for(let n=0;n<t.length-1;n++){const i=t[n],o=t[n+1],r=i.selection,s=o.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(a=s.isEmpty()||r.isEmpty()?s.getStartPosition().isBeforeOrEqual(r.getEndPosition()):s.getStartPosition().isBefore(r.getEndPosition()),a){const r=i.index<o.index?n:n+1,s=i.index<o.index?n+1:n,a=t[s].index,l=t[r].index,c=t[s].selection,h=t[r].selection;if(!c.equalsSelection(h)){const n=c.plusRange(h),i=c.selectionStartLineNumber===c.startLineNumber&&c.selectionStartColumn===c.startColumn,o=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn;let s,u;a===this.lastAddedCursorIndex?(s=i,this.lastAddedCursorIndex=l):s=o,u=s?new Bn(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new Bn(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn),t[r].selection=u;const d=QE.fromModelSelection(u);e[l].setState(this.context,d.modelState,d.viewState)}for(const e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),n--}}}}class AD{constructor(){this.type=0}}class ED{constructor(){this.type=1}}class xD{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class SD{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class kD{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class DD{constructor(){this.type=5}}class LD{constructor(e){this.type=6,this.isFocused=e}}class ID{constructor(){this.type=7}}class ND{constructor(){this.type=8}}class MD{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class BD{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class TD{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class OD{constructor(e,t,n,i,o,r){this.type=12,this.source=e,this.range=t,this.selections=n,this.verticalType=i,this.revealHorizontal=o,this.scrollType=r}}class RD{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class PD{constructor(){this.type=14}}class FD{constructor(e){this.type=15,this.ranges=e}}class jD{constructor(){this.type=16}}class zD{constructor(){this.type=17}}class VD extends st{constructor(){super(),this._onEvent=this._register(new bt),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t<n;t++)if(this._outgoingEvents[t].kind===e.kind)return void(this._outgoingEvents[t]=this._outgoingEvents[t].merge(e));this._outgoingEvents.push(e)}_emitOutgoingEvents(){while(this._outgoingEvents.length>0){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t<n;t++)this._eventHandlers[t];this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new QD),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const n of e)this._addOutgoingEvent(n);t.length>0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{const t=this.beginEmitViewEvents();t.emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){while(this._viewEventQueue){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const n of t)n.handleEvents(e)}}}class QD{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class WD{constructor(e,t,n,i){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=i,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new WD(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class HD{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new HD(this.oldHasFocus,e.hasFocus)}}class UD{constructor(e,t,n,i,o,r,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=i,this.scrollWidth=o,this.scrollLeft=r,this.scrollHeight=s,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(e){return 2!==e.kind?this:new UD(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class YD{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class GD{constructor(e,t,n,i,o,r,s){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=i,this.source=o,this.reason=r,this.reachedMaxCursorCount=s}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const n=e.length,i=t.length;if(n!==i)return!1;for(let o=0;o<n;o++)if(!e[o].equalsSelection(t[o]))return!1;return!0}isNoOp(){return GD._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return 5!==e.kind?this:new GD(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class KD{constructor(){this.kind=4}isNoOp(){return!1}merge(e){return this}}class qD{constructor(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getCursorStates()}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t<n;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class JD{constructor(e,t,n){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=n}static getAllAutoClosedCharacters(e){let t=[];for(const n of e)t=t.concat(n.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const n=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);n&&e.push(n)}return e}isValid(e){let t=[];for(let n=0;n<this._autoClosedEnclosingDecorations.length;n++){const e=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[n]);if(e&&(t.push(e),e.startLineNumber!==e.endLineNumber))return!1}t.sort(Mn.compareRangesUsingStarts),e.sort(Mn.compareRangesUsingStarts);for(let n=0;n<e.length;n++){if(n>=t.length)return!1;if(!t[n].strictContainsRange(e[n]))return!1}return!0}}class $D extends st{constructor(e,t,n,i){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=n,this.context=new jE(this._model,this._viewModel,this._coordinatesConverter,i),this._cursors=new CD(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=nt(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new jE(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const n=this._autoClosedActions[t];n.isValid(e)||(n.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,n,i){let o=!1;null!==i&&i.length>$D.MAX_CURSOR_COUNT&&(i=i.slice(0,$D.MAX_CURSOR_COUNT),o=!0);const r=new qD(this._model,this);return this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,i){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,n,i);else{const r=o[0],s=new Mn(r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,s,null,0,n,i)}}_revealPrimaryCursor(e,t,n,i,o){const r=this._cursors.getViewPositions();if(r.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),n,i,o);else{const s=r[0],a=new Mn(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,a,null,n,i,o)}}_emitCursorRevealRange(e,t,n,i,o,r,s){e.emitViewEvent(new OD(t,n,i,o,r,s))}saveState(){let e=[];const t=this._cursors.getSelections();for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push({inSelectionMode:!i.isEmpty(),selectionStart:{lineNumber:i.selectionStartLineNumber,column:i.selectionStartColumn},position:{lineNumber:i.positionLineNumber,column:i.positionColumn}})}return e}restoreState(e,t){let n=[];for(let i=0,o=t.length;i<o;i++){const e=t[i];let o=1,r=1;e.position&&e.position.lineNumber&&(o=e.position.lineNumber),e.position&&e.position.column&&(r=e.position.column);let s=o,a=r;e.selectionStart&&e.selectionStart.lineNumber&&(s=e.selectionStart.lineNumber),e.selectionStart&&e.selectionStart.column&&(a=e.selectionStart.column),n.push({selectionStartLineNumber:s,selectionStartColumn:a,positionLineNumber:o,positionColumn:r})}this.setStates(e,"restoreState",0,QE.fromModelSelections(n)),this.revealPrimary(e,"restoreState",!0,1)}onModelContentChanged(e,t){if(t instanceof Jy){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=t.versionId,this._isHandling)return;const n=t.containsEvent(1);if(this._prevEditOperationType=0,n)this._cursors.dispose(),this._cursors=new CD(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const n=QE.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,n)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,QE.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:aE.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:aE.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,i){this.setStates(e,t,i,QE.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let n=[],i=[];for(let s=0,a=e.length;s<a;s++)n.push({range:e[s],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),i.push({range:t[s],options:{description:"auto-closed-enclosing",stickiness:1}});const o=this._model.deltaDecorations([],n),r=this._model.deltaDecorations([],i);this._autoClosedActions.push(new JD(this._model,o,r))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=XD.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let n=[],i=[];for(let t=0;t<e.commands.length;t++){const o=e.commands[t];o instanceof nS&&o.enclosingRange&&o.closeCharacterRange&&(n.push(o.closeCharacterRange),i.push(o.enclosingRange))}n.length>0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,i,o){const r=new qD(this._model,this);if(r.equals(i))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new SD(a,s)),!i||i.cursorState.length!==r.cursorState.length||r.cursorState.some((e,t)=>!e.modelState.equals(i.cursorState[t].modelState))){const a=i?i.cursorState.map(e=>e.modelState.selection):null,l=i?i.modelVersionId:0;e.emitOutgoingEvent(new GD(a,s,l,r.modelVersionId,t||"keyboard",n,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let n=0,i=e.length;n<i;n++){const i=e[n];if(!i.text||i.text.indexOf("\n")>=0)return null;const o=i.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const r=o[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(r);if(!s||1!==s.length)return null;const a=s[0].open,l=i.text.length-o[2].length-1,c=i.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,n,i){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(n)),o&&(n[0]._isTracked=!0);let r=[],s=[];const a=this._model.pushEditOperations(this.getSelections(),n,e=>{if(o)for(let n=0,i=o.length;n<i;n++){const[t,i]=o[n],a=e[n],l=a.range.startLineNumber,c=a.range.startColumn-1+t,h=a.range.startColumn-1+i;r.push(new Mn(l,h+1,l,h+2)),s.push(new Mn(l,c+1,l,h+2))}const t=i(e);return t&&(this._isHandling=!0),t});a&&(this._isHandling=!1,this.setSelections(e,t,a,0)),r.length>0&&this._pushAutoClosedAction(r,s)}_executeEdit(e,t,n,i=0){if(this.context.cursorConfig.readOnly)return;const o=new qD(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){Oe(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,i,o,!1)&&this._revealPrimaryCursor(t,n,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return JD.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{"keyboard"===t&&(this._executeEditOperation(tS.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},e,t)}type(e,t,n){this._executeEdit(()=>{if("keyboard"===n){const e=t.length;let n=0;while(n<e){const e=hs(t,n),i=t.substr(n,e);this._executeEditOperation(tS.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),i)),n+=e}}else this._executeEditOperation(tS.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,n)}compositionType(e,t,n,i,o,r){if(0!==t.length||0!==n||0!==i)this._executeEdit(()=>{this._executeEditOperation(tS.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,i,o))},e,r);else if(0!==o){const t=this.getSelections().map(e=>{const t=e.getPosition();return new Bn(t.lineNumber,t.column+o,t.lineNumber,t.column+o)});this.setSelections(e,r,t,0)}}paste(e,t,n,i,o){this._executeEdit(()=>{this._executeEditOperation(tS.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,i||[]))},e,o,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(Gx.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new WE(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new WE(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}}$D.MAX_CURSOR_COUNT=1e4;class XD{static executeCommands(e,t,n){const i={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(i,n);for(let r=0,s=i.trackedRanges.length;r<s;r++)i.model._setTrackedRange(i.trackedRanges[r],null,0);return o}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const n=this._getEditOperations(e,t);if(0===n.operations.length)return null;const i=n.operations,o=this._getLoserCursorMap(i);if(o.hasOwnProperty("0"))return null;let r=[];for(let l=0,c=i.length;l<c;l++)o.hasOwnProperty(i[l].identifier.major.toString())||r.push(i[l]);n.hadTrackedEditOperation&&r.length>0&&(r[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,r,n=>{let i=[];for(let t=0;t<e.selectionsBefore.length;t++)i[t]=[];for(const e of n)e.identifier&&i[e.identifier.major].push(e);const o=(e,t)=>e.identifier.minor-t.identifier.minor;let r=[];for(let s=0;s<e.selectionsBefore.length;s++)i[s].length>0?(i[s].sort(o),r[s]=t[s].computeCursorState(e.model,{getInverseEditOperations:()=>i[s],getTrackedSelection:t=>{const n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new Bn(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new Bn(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):r[s]=e.selectionsBefore[s];return r});s||(s=e.selectionsBefore);let a=[];for(let l in o)o.hasOwnProperty(l)&&a.push(parseInt(l,10));a.sort((e,t)=>t-e);for(const l of a)s.splice(l,1);return s}static _arrayIsEmpty(e){for(let t=0,n=e.length;t<n;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let n=[],i=!1;for(let o=0,r=t.length;o<r;o++){const r=t[o];if(r){const t=this._getEditOperationsFromCommand(e,o,r);n=n.concat(t.operations),i=i||t.hadTrackedEditOperation}}return{operations:n,hadTrackedEditOperation:i}}static _getEditOperationsFromCommand(e,t,n){let i=[],o=0;const r=(e,r,s=!1)=>{Mn.isEmpty(e)&&""===r||i.push({identifier:{major:t,minor:o++},range:e,text:r,forceMoveMarkers:s,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let s=!1;const a=(e,t,n)=>{s=!0,r(e,t,n)},l=(t,n)=>{const i=Bn.liftSelection(t);let o;if(i.isEmpty())if("boolean"===typeof n)o=n?2:3;else{const t=e.model.getLineMaxColumn(i.startLineNumber);o=i.startColumn===t?2:3}else o=1;const r=e.trackedRanges.length,s=e.model._setTrackedRange(null,i,o);return e.trackedRanges[r]=s,e.trackedRangesDirection[r]=i.getDirection(),r.toString()},c={addEditOperation:r,addTrackedEditOperation:a,trackSelection:l};try{n.getEditOperations(e.model,c)}catch(h){return Oe(h),{operations:[],hadTrackedEditOperation:!1}}return{operations:i,hadTrackedEditOperation:s}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((e,t)=>-Mn.compareRangesUsingEnds(e.range,t.range));let t={};for(let n=1;n<e.length;n++){const i=e[n-1],o=e[n];if(Mn.getStartPosition(i.range).isBefore(Mn.getEndPosition(o.range))){let r;r=i.identifier.major>o.identifier.major?i.identifier.major:o.identifier.major,t[r.toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===r&&(e.splice(t,1),t<n&&n--,t--);n>0&&n--}}return t}}class ZD{constructor(e,t,n,i,o,r){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}function eL(e,t,n,i,o,r,s){let a="<div>",l=i,c=0,h=!0;for(let u=0,d=t.getCount();u<d;u++){const d=t.getEndOffset(u);if(d<=i)continue;let p="";for(;l<d&&l<o;l++){const t=e.charCodeAt(l);switch(t){case 9:let e=r-(l+c)%r;c+=e-1;while(e>0)s&&h?(p+="&#160;",h=!1):(p+=" ",h=!0),e--;break;case 60:p+="&lt;",h=!1;break;case 62:p+="&gt;",h=!1;break;case 38:p+="&amp;",h=!1;break;case 0:p+="&#00;",h=!1;break;case 65279:case 8232:case 8233:case 133:p+="<EFBFBD>",h=!1;break;case 13:p+="&#8203",h=!1;break;case 32:s&&h?(p+="&#160;",h=!1):(p+=" ",h=!0);break;default:p+=String.fromCharCode(t),h=!1}}if(a+=`<span style="${t.getInlineStyle(u,n)}">${p}</span>`,d>o||l>=o)break}return a+="</div>",a}class tL{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}}class nL{constructor(e,t,n,i,o){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=o,this.prefixSum=0}}class iL{constructor(e,t,n,i){this._instanceId=xs(++iL.INSTANCE_COUNT),this._pendingChanges=new tL,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=i}static findInsertionIndex(e,t,n){let i=0,o=e.length;while(i<o){const r=i+o>>>1;t===e[r].afterLineNumber?n<e[r].ordinal?o=r:i=r+1:t<e[r].afterLineNumber?o=r:i=r+1}return i}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{const n={insertWhitespace:(e,n,i,o)=>{t=!0,e|=0,n|=0,i|=0,o|=0;const r=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new nL(r,e,n,i,o)),r},changeOneWhitespace:(e,n,i)=>{t=!0,n|=0,i|=0,this._pendingChanges.change({id:e,newAfterLineNumber:n,newHeight:i})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}};e(n)}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of n){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const i=new Set;for(const a of n)i.add(a.id);const o=new Map;for(const a of t)o.set(a.id,a);const r=e=>{let t=[];for(const n of e)if(!i.has(n.id)){if(o.has(n.id)){const e=o.get(n.id);n.afterLineNumber=e.newAfterLineNumber,n.height=e.newHeight}t.push(n)}return t},s=r(this._arr).concat(r(e));s.sort((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=iL.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let n=0,i=t.length;n<i;n++)if(t[n].id===e)return n;return-1}_changeOneWhitespace(e,t,n){const i=this._findWhitespaceIndex(e);if(-1!==i&&(this._arr[i].height!==n&&(this._arr[i].height=n,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1)),this._arr[i].afterLineNumber!==t)){const e=this._arr[i];this._removeWhitespace(i),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(let n=0,i=this._arr.length;n<i;n++){const i=this._arr[n].afterLineNumber;e<=i&&i<=t?this._arr[n].afterLineNumber=e-1:i>t&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let n=0,i=this._arr.length;n<i;n++){const i=this._arr[n].afterLineNumber;e<=i&&(this._arr[n].afterLineNumber+=t-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let n=t;n<=e;n++)this._arr[n].prefixSum=this._arr[n-1].prefixSum+this._arr[n].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const e=this._lineHeight*this._lineCount,t=this.getWhitespacesTotalHeight();return e+t+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;const t=this._arr;let n=0,i=t.length-1;while(n<=i){const o=i-n|0,r=o/2|0,s=n+r|0;if(t[s].afterLineNumber<e){if(s+1>=t.length||t[s+1].afterLineNumber>=e)return s;n=s+1|0}else i=s-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e),n=t+1;return n<this._arr.length?n:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){let t;this._checkPendingChanges(),e|=0,t=e>1?this._lineHeight*(e-1):0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return t+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,n=this._arr.length;t<n;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>t}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){if(0===this._paddingBottom)return!1;this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e|=0,e<0)return 1;const t=0|this._lineCount,n=this._lineHeight;let i=1,o=t;while(i<o){const t=(i+o)/2|0,r=0|this.getVerticalOffsetForLineNumber(t);if(e>=r+n)i=t+1;else{if(e>=r)return t;o=t}}return i>t?t:i}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const n=this._lineHeight,i=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(i);let r=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(i);const a=0|this.getWhitespacesCount();let l,c;-1===s?(s=a,c=r+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let h=o,u=h;const d=5e5;let p=0;o>=d&&(p=Math.floor(o/d)*d,p=Math.floor(p/n)*n,u-=p);const f=[],g=e+(t-e)/2;let m=-1;for(let w=i;w<=r;w++){if(-1===m){const e=h,t=h+n;(e<=g&&g<t||e>g)&&(m=w)}h+=n,f[w-i]=u,u+=n;while(c===w)u+=l,h+=l,s++,s>=a?c=r+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(h>=t){r=w;break}}-1===m&&(m=r);const b=0|this.getVerticalOffsetForLineNumber(r);let v=i,y=r;return v<y&&o<e&&v++,v<y&&b+n>t&&y--,{bigNumbersDelta:p,startLineNumber:i,endLineNumber:r,relativeVerticalOffset:f,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:y}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let n,i;return n=t>=1?this._lineHeight*t:0,i=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,n+i+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const i=this.getVerticalOffsetForWhitespaceIndex(n),o=this.getHeightForWhitespaceIndex(n);if(e>=i+o)return-1;while(t<n){const i=Math.floor((t+n)/2),o=this.getVerticalOffsetForWhitespaceIndex(i),r=this.getHeightForWhitespaceIndex(i);if(e>=o+r)t=i+1;else{if(e>=o)return i;n=i}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;const i=this.getHeightForWhitespaceIndex(t),o=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:o,afterLineNumber:r,verticalOffset:n,height:i}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];let o=[];for(let r=n;r<=i;r++){const e=this.getVerticalOffsetForWhitespaceIndex(r),n=this.getHeightForWhitespaceIndex(r);if(e>=t)break;o.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:e,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}iL.INSTANCE_COUNT=0;const oL=125;class rL{constructor(e,t,n,i){e|=0,t|=0,n|=0,i|=0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),i<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class sL extends st{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new bt),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new rL(0,0,0,0),this._scrollable=this._register(new tk(e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire(new WD(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class aL extends st{constructor(e,t,n){super(),this._configuration=e;const i=this._configuration.options,o=i.get(129),r=i.get(74);this._linesLayout=new iL(t,i.get(58),r.top,r.bottom),this._scrollable=this._register(new sL(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new rL(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(102)?oL:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(58)&&this._linesLayout.setLineHeight(t.get(58)),e.hasChanged(74)){const e=t.get(74);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(129)){const e=t.get(129),n=e.contentWidth,i=e.height,o=this._scrollable.getScrollDimensions(),r=o.contentWidth;this._scrollable.setScrollDimensions(new rL(n,o.contentWidth,i,this._getContentHeight(n,i,r)))}else this._updateHeight();e.hasChanged(102)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options,i=n.get(91);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,n){const i=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return i.get(93)?o+=Math.max(0,t-i.get(58)-i.get(74).bottom):o+=this._getHorizontalScrollbarHeight(e,n),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.contentWidth;this._scrollable.setScrollDimensions(new rL(t,e.contentWidth,n,this._getContentHeight(t,n,i)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Pd(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Pd(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,n=t.get(130),i=t.get(43);if(n.isViewportWrapping){const n=t.get(129),o=t.get(64);return e>n.contentWidth+i.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+n.verticalScrollbarWidth:e}{const n=t.get(92)*i.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new rL(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),i=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-i,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const e=this._scrollable.getScrollDimensions();return e.contentWidth}getScrollWidth(){const e=this._scrollable.getScrollDimensions();return e.scrollWidth}getContentHeight(){const e=this._scrollable.getScrollDimensions();return e.contentHeight}getScrollHeight(){const e=this._scrollable.getScrollDimensions();return e.scrollHeight}getCurrentScrollLeft(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollLeft}getCurrentScrollTop(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}class lL{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}}class cL{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e<t;e++){const t=this._counts[e],n=e>0?this._modelToView[e-1]:0;this._modelToView[e]=n+t;for(let i=0;i<t;i++)this._viewToModel[n+i]=e}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(e,t){this._counts[e]!==t&&(this._counts[e]=t,this._invalidate(e))}removeValues(e,t){this._counts.splice(e,t),this._invalidate(e)}insertValues(e,t){this._counts=Vu(this._counts,e,t),this._invalidate(e)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(e){return this._ensureValid(),this._modelToView[e]}getIndexOf(e){this._ensureValid();const t=this._viewToModel[e],n=t>0?this._modelToView[t-1]:0;return new hu(t,e-n)}}class hL{constructor(e,t,n,i,o,r,s,a,l){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=o,this.tabSize=r,this.wrappingStrategy=s,this.wrappingColumn=a,this.wrappingIndent=l,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new lL(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);const n=this.model.getLinesContent(),i=this.model.getInjectedTextDecorations(this._editorId),o=n.length,r=this.createLineBreaksComputer(),s=new Gu(Hy.fromDecorations(i));for(let f=0;f<o;f++){const e=s.takeWhile(e=>e.lineNumber===f+1);r.addRequest(n[f],e,t?t[f]:null)}const a=r.finalize();let l=[],c=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(Mn.compareRangesUsingStarts),h=1,u=0,d=-1,p=d+1<c.length?u+1:o+2;for(let f=0;f<o;f++){let e=f+1;e===p&&(d++,h=c[d].startLineNumber,u=c[d].endLineNumber,p=d+1<c.length?u+1:o+2);let t=e>=h&&e<=u,n=yL(a[f],!t);l[f]=n.getViewLineCount(),this.lines[f]=n}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new cL(l)}getHiddenAreas(){return this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e))}_reduceRanges(e){if(0===e.length)return[];let t=e.map(e=>this.model.validateRange(e)).sort(Mn.compareRangesUsingStarts),n=[],i=t[0].startLineNumber,o=t[0].endLineNumber;for(let r=1,s=t.length;r<s;r++){let e=t[r];e.startLineNumber>o+1?(n.push(new Mn(i,1,o,1)),i=e.startLineNumber,o=e.endLineNumber):e.endLineNumber>o&&(o=e.endLineNumber)}return n.push(new Mn(i,1,o,1)),n}setHiddenAreas(e){let t=this._reduceRanges(e),n=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(Mn.compareRangesUsingStarts);if(t.length===n.length){let e=!1;for(let i=0;i<t.length;i++)if(!t[i].equalsRange(n[i])){e=!0;break}if(!e)return!1}let i=[];for(const h of t)i.push({range:h,options:LE.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,i);let o=t,r=1,s=0,a=-1,l=a+1<o.length?s+1:this.lines.length+2,c=!1;for(let h=0;h<this.lines.length;h++){let e=h+1;e===l&&(a++,r=o[a].startLineNumber,s=o[a].endLineNumber,l=a+1<o.length?s+1:this.lines.length+2);let t=!1;if(e>=r&&e<=s?this.lines[h].isVisible()&&(this.lines[h]=this.lines[h].setVisible(!1),t=!0):(c=!0,this.lines[h].isVisible()||(this.lines[h]=this.lines[h].setVisible(!0),t=!0)),t){let e=this.lines[h].getViewLineCount();this.prefixSumComputer.changeValue(h,e)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,i){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===n,a=this.wrappingIndent===i;if(o&&r&&s&&a)return!1;const l=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i;let c=null;if(l){c=[];for(let e=0,t=this.lines.length;e<t;e++)c[e]=this.lines[e].getLineBreakData()}return this._constructLines(!1,c),!0}createLineBreaksComputer(){const e="advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory;return e.createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,n){if(!e||e<=this._validModelVersionId)return null;let i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new BD(i,o)}onModelLinesInserted(e,t,n,i){if(!e||e<=this._validModelVersionId)return null;const o=t>2&&!this.lines[t-2].isVisible();let r=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=0,a=[],l=[];for(let c=0,h=i.length;c<h;c++){let e=yL(i[c],!o);a.push(e);let t=e.getViewLineCount();s+=t,l[c]=t}return this.lines=this.lines.slice(0,t-1).concat(a).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,l),new TD(r,r+s-1)}onModelLineChanged(e,t,n){if(null!==e&&e<=this._validModelVersionId)return[!1,null,null,null];let i=t-1,o=this.lines[i].getViewLineCount(),r=this.lines[i].isVisible(),s=yL(n,r);this.lines[i]=s;let a=this.lines[i].getViewLineCount(),l=!1,c=0,h=-1,u=0,d=-1,p=0,f=-1;o>a?(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=c+a-1,p=h+1,f=p+(o-a)-1,l=!0):o<a?(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=c+o-1,u=h+1,d=u+(a-o)-1,l=!0):(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=c+a-1),this.prefixSumComputer.changeValue(i,a);const g=c<=h?new MD(c,h):null,m=u<=d?new TD(u,d):null,b=p<=f?new BD(p,f):null;return[l,g,m,b]}acceptVersionId(e){this._validModelVersionId=e,1!==this.lines.length||this.lines[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:0|e}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return new uL(n+1,i)}getMinColumnOfViewLine(e){return this.lines[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),i=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new Nn(e.modelLineNumber,i)}getModelEndPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),i=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new Nn(e.modelLineNumber,i)}getViewLineInfosGroupedByModelRanges(e,t){const n=this.getViewLineInfo(e),i=this.getViewLineInfo(t),o=new Array;let r=this.getModelStartPositionOfViewLine(n),s=new Array;for(let a=n.modelLineNumber;a<=i.modelLineNumber;a++){const e=this.lines[a-1];if(e.isVisible()){let t=a===n.modelLineNumber?n.modelLineWrappedLineIdx:0,o=a===i.modelLineNumber?i.modelLineWrappedLineIdx+1:e.getViewLineCount();for(let e=t;e<o;e++)s.push(new uL(a,e))}if(!e.isVisible()&&r){const e=new Nn(a-1,this.model.getLineMaxColumn(a-1)+1),t=Mn.fromPositions(r,e);o.push(new dL(t,s)),s=[],r=null}else e.isVisible()&&!r&&(r=new Nn(a,1))}if(r){const e=Mn.fromPositions(r,this.getModelEndPositionOfViewLine(i));o.push(new dL(e,s))}return o}getViewLinesBracketGuides(e,t,n,i,o){const r=n?this.convertViewPositionToModelPosition(n.lineNumber,n.column):null,s=[];for(const a of this.getViewLineInfosGroupedByModelRanges(e,t)){const e=a.modelRange.startLineNumber,t=this.model.getLinesBracketGuides(e,a.modelRange.endLineNumber,r,i,o);for(const n of a.viewLines)if(n.isWrappedLineContinuation&&1===this.getMinColumnOfViewLine(n))s.push([]);else{const i=t[n.modelLineNumber-e];s.push(i)}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[],r=[],s=[];const a=n.lineNumber-1,l=i.lineNumber-1;let c=null;for(let p=a;p<=l;p++){const e=this.lines[p];if(e.isVisible()){let t=e.getViewLineNumberOfModelPosition(0,p===a?n.column:1),i=e.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(p+1)),o=i-t+1,l=0;o>1&&1===e.getViewLineMinColumn(this.model,p+1,i)&&(l=0===t?1:2),r.push(o),s.push(l),null===c&&(c=new Nn(p+1,0))}else null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,p)),c=null)}null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,i.lineNumber)),c=null);const h=t-e+1;let u=new Array(h),d=0;for(let p=0,f=o.length;p<f;p++){let e,t=o[p],n=Math.min(h-d,r[p]),i=s[p];e=2===i?0:1===i?1:n;for(let o=0;o<n;o++)o===e&&(t=0),u[d++]=t}return u}getViewLineContent(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineContent(this.model,n+1,i)}getViewLineLength(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineLength(this.model,n+1,i)}getViewLineMinColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMinColumn(this.model,n+1,i)}getViewLineMaxColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMaxColumn(this.model,n+1,i)}getViewLineData(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineData(this.model,n+1,i)}getViewLinesData(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let i=this.prefixSumComputer.getIndexOf(e-1),o=e,r=i.index,s=i.remainder,a=[];for(let l=r,c=this.model.getLineCount();l<c;l++){let i=this.lines[l];if(!i.isVisible())continue;let c=l===r?s:0,h=i.getViewLineCount()-c,u=!1;o+h>t&&(u=!0,h=t-o+1);let d=c+h;if(i.getViewLinesData(this.model,l+1,c,d,o-e,n,a),o+=h,u)break}return a}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),l=s.getViewLineMaxColumn(this.model,o+1,r);t<a&&(t=a),t>l&&(t=l);let c=s.getModelColumnOfViewPosition(r,t),h=this.model.validatePosition(new Nn(o+1,c));return h.equals(n)?new Nn(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Mn(n.lineNumber,n.column,i.lineNumber,i.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,r=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new Nn(i+1,r))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Mn(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2){const i=this.model.validatePosition(new Nn(e,t)),o=i.lineNumber,r=i.column;let s=o-1,a=!1;while(s>0&&!this.lines[s].isVisible())s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new Nn(1,1);const l=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));let c;return c=a?this.lines[s].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(s+1),n):this.lines[o-1].getViewPositionOfModelPosition(l,r,n),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Mn.fromPositions(n)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Mn(t.lineNumber,t.column,n.lineNumber,n.column)}}_getViewLineNumberForModelPosition(e,t){let n=e-1;if(this.lines[n].isVisible()){const e=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(e,t)}while(n>0&&!this.lines[n].isVisible())n--;if(0===n&&!this.lines[n].isVisible())return 1;const i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(n+1))}getAllOverviewRulerDecorations(e,t,n){const i=this.model.getOverviewRulerDecorations(e,t),o=new CL;for(const r of i){const e=r.options.overviewRuler,t=e?e.position:0;if(0===t)continue;const i=e.getColor(n),s=this._getViewLineNumberForModelPosition(r.range.startLineNumber,r.range.startColumn),a=this._getViewLineNumberForModelPosition(r.range.endLineNumber,r.range.endColumn);o.accept(i,s,a,t)}return o.result}getDecorationsInRange(e,t,n){const i=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-i.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Mn(i.lineNumber,1,o.lineNumber,o.column),t,n);let r=[];const s=i.lineNumber-1,a=o.lineNumber-1;let l=null;for(let d=s;d<=a;d++){const e=this.lines[d];if(e.isVisible())null===l&&(l=new Nn(d+1,d===s?i.column:1));else if(null!==l){const e=this.model.getLineMaxColumn(d);r=r.concat(this.model.getDecorationsInRange(new Mn(l.lineNumber,l.column,d,e),t,n)),l=null}}null!==l&&(r=r.concat(this.model.getDecorationsInRange(new Mn(l.lineNumber,l.column,o.lineNumber,o.column),t,n)),l=null),r.sort((e,t)=>{const n=Mn.compareRangesUsingStarts(e.range,t.range);return 0===n?e.id<t.id?-1:e.id>t.id?1:0:n});let c=[],h=0,u=null;for(const d of r){const e=d.id;u!==e&&(u=e,c[h++]=d)}return c}getInjectedTextAt(e){const t=this._toValidViewLineNumber(e.lineNumber),n=this.prefixSumComputer.getIndexOf(t-1),i=n.index,o=n.remainder;return this.lines[i].getInjectedTextAt(o,e.column)}normalizePosition(e,t){const n=this._toValidViewLineNumber(e.lineNumber),i=this.prefixSumComputer.getIndexOf(n-1),o=i.index,r=i.remainder;return this.lines[o].normalizePosition(this.model,o+1,r,e,t)}getLineIndentColumn(e){const t=this._toValidViewLineNumber(e),n=this.prefixSumComputer.getIndexOf(t-1),i=n.index,o=n.remainder;return 0===o?this.model.getLineIndentColumn(i+1):0}}class uL{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class dL{constructor(e,t){this.modelRange=e,this.viewLines=t}}class pL{constructor(){}isVisible(){return!0}setVisible(e){return e?this:fL.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,n){return e.getLineContent(t)}getViewLineLength(e,t,n){return e.getLineLength(t)}getViewLineMinColumn(e,t,n){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,n){return e.getLineMaxColumn(t)}getViewLineData(e,t,n){let i=e.getLineTokens(t),o=i.getLineContent();return new Vd(o,!1,1,o.length+1,0,i.inflate(),null)}getViewLinesData(e,t,n,i,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new Nn(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,n,i,o){return i}getInjectedTextAt(e,t){return null}}pL.INSTANCE=new pL;class fL{constructor(){}isVisible(){return!1}setVisible(e){return e?pL.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,n){throw new Error("Not supported")}getViewLineLength(e,t,n){throw new Error("Not supported")}getViewLineMinColumn(e,t,n){throw new Error("Not supported")}getViewLineMaxColumn(e,t,n){throw new Error("Not supported")}getViewLineData(e,t,n){throw new Error("Not supported")}getViewLinesData(e,t,n,i,o,r,s){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,n,i,o){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}fL.INSTANCE=new fL;class gL{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return this._lineBreakData.getInputOffsetOfOutputPosition(e,0)}getInputEndOffsetOfOutputLineIndex(e,t,n){return n+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:this._lineBreakData.getInputOffsetOfOutputPosition(n+1,0)}getViewLineContent(e,t,n){if(!this._isVisible)throw new Error("Not supported");const i=n>0?this._lineBreakData.breakOffsets[n-1]:0,o=n<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[n]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let r;if(null!==this._lineBreakData.injectionOffsets){const n=this._lineBreakData.injectionOffsets.map((e,t)=>new Hy(0,0,e+1,this._lineBreakData.injectionOptions[t],0));r=Hy.applyInjectedText(e.getLineContent(t),n).substring(i,o)}else r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});return n>0&&(r=bL(this._lineBreakData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,n){if(!this._isVisible)throw new Error("Not supported");const i=n>0?this._lineBreakData.breakOffsets[n-1]:0,o=n<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[n]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let r=o-i;return n>0&&(r=this._lineBreakData.wrappedTextIndentLength+r),r}getViewLineMinColumn(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(n)}_getViewLineMinColumn(e){return e>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(e,t,n)+1}getViewLineData(e,t,n){if(!this._isVisible)throw new Error("Not supported");const i=this._lineBreakData,o=n>0?i.wrappedTextIndentLength:0,r=i.injectionOffsets,s=i.injectionOptions;let a,l,c;if(r){const h=e.getLineTokens(t).withInserted(r.map((e,t)=>({offset:e,text:s[t].content,tokenMetadata:gd.defaultTokenMetadata}))),u=n>0?i.breakOffsets[n-1]:0,d=i.breakOffsets[n];a=h.getLineContent().substring(u,d),l=h.sliceAndInflate(u,d,o),c=new Array;let p=0;for(let e=0;e<r.length;e++){const t=s[e].content.length,o=r[e]+p,a=r[e]+p+t;if(o>d)break;if(u<a){const t=s[e];if(t.inlineClassName){const e=n>0?i.wrappedTextIndentLength:0,r=e+Math.max(o-u,0),s=e+Math.min(a-u,d);r!==s&&c.push(new Hd(r,s,t.inlineClassName,t.inlineClassNameAffectsLetterSpacing))}}p+=t}}else{const i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n),s=e.getLineTokens(t);a=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1}),l=s.sliceAndInflate(i,r,o),c=null}n>0&&(a=bL(i.wrappedTextIndentLength)+a);const h=n>0?i.wrappedTextIndentLength+1:1,u=a.length+1,d=n+1<this.getViewLineCount(),p=0===n?0:i.breakOffsetsVisibleColumn[n-1];return new Vd(a,d,h,u,p,l,c)}getViewLinesData(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(let a=n;a<i;a++){let i=o+a-n;r[i]?s[i]=this.getViewLineData(e,t,a):s[i]=null}}getModelColumnOfViewPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let n=t-1;return e>0&&(n<this._lineBreakData.wrappedTextIndentLength?n=0:n-=this._lineBreakData.wrappedTextIndentLength),this._lineBreakData.getInputOffsetOfOutputPosition(e,n)+1}getViewPositionOfModelPosition(e,t,n=2){if(!this._isVisible)throw new Error("Not supported");let i=this._lineBreakData.getOutputPositionOfInputOffset(t-1,n),o=i.outputLineIndex,r=i.outputOffset+1;return o>0&&(r+=this._lineBreakData.wrappedTextIndentLength),new Nn(e+o,r)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");const n=this._lineBreakData.getOutputPositionOfInputOffset(t-1);return e+n.outputLineIndex}normalizePosition(e,t,n,i,o){if(null!==this._lineBreakData.injectionOffsets){const e=i.lineNumber-n,t=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(n,i.column-1),r=this._lineBreakData.normalizeOffsetAroundInjections(t,o);if(r!==t)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(r,o).toPosition(e,this._lineBreakData.wrappedTextIndentLength)}if(0===o){if(n>0&&i.column===this._getViewLineMinColumn(n))return new Nn(i.lineNumber-1,this.getViewLineMaxColumn(e,t,n-1))}else if(1===o){const o=this.getViewLineCount()-1;if(n<o&&i.column===this.getViewLineMaxColumn(e,t,n))return new Nn(i.lineNumber+1,this._getViewLineMinColumn(n+1))}return i}getInjectedTextAt(e,t){return this._lineBreakData.getInjectedText(e,t-1)}}let mL=[""];function bL(e){if(e>=mL.length)for(let t=1;t<=e;t++)mL[t]=vL(t);return mL[e]}function vL(e){return new Array(e+1).join(" ")}function yL(e,t){return null===e?t?pL.INSTANCE:fL.INSTANCE:new gL(e,t)}class wL{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}}class _L{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new wL(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,i){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,n,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new BD(t,n)}onModelLinesInserted(e,t,n,i){return new TD(t,n)}onModelLineChanged(e,t,n){return[!1,new MD(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const n=t-e+1;let i=new Array(n);for(let o=0;o<n;o++)i[o]=0;return i}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){let t=this.model.getLineTokens(e),n=t.getLineContent();return new Vd(n,!1,1,n.length+1,0,t.inflate(),null)}getViewLinesData(e,t,n){const i=this.model.getLineCount();e=Math.min(Math.max(1,e),i),t=Math.min(Math.max(1,t),i);let o=[];for(let r=e;r<=t;r++){let t=r-e;n[t]||(o[t]=null),o[t]=this.getViewLineData(r)}return o}getAllOverviewRulerDecorations(e,t,n){const i=this.model.getOverviewRulerDecorations(e,t),o=new CL;for(const r of i){const e=r.options.overviewRuler,t=e?e.position:0;if(0===t)continue;const i=e.getColor(n),s=r.range.startLineNumber,a=r.range.endLineNumber;o.accept(i,s,a,t)}return o.result}getDecorationsInRange(e,t,n){return this.model.getDecorationsInRange(e,t,n)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class CL{constructor(){this.result=Object.create(null)}accept(e,t,n,i){let o=this.result[e];if(o){const e=o[o.length-3],r=o[o.length-1];if(e===i&&r+1>=t)return void(n>r&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]}}class AL{constructor(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let n=this._decorationsCache[t];if(!n){const i=e.range,o=e.options;let r;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new Nn(i.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new Nn(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)),1);r=new Mn(e.lineNumber,e.column,t.lineNumber,t.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(i,1);n=new Ud(r,o),this._decorationsCache[t]=n}return n}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,pe(this.configuration.options)),n=e.startLineNumber,i=e.endLineNumber;let o=[],r=0,s=[];for(let a=n;a<=i;a++)s[a-n]=[];for(let a=0,l=t.length;a<l;a++){let e=t[a],l=e.options,c=this._getOrCreateViewModelDecoration(e),h=c.range;if(o[r++]=c,l.inlineClassName){let e=new Wd(h,l.inlineClassName,l.inlineClassNameAffectsLetterSpacing?3:0),t=Math.max(n,h.startLineNumber),o=Math.min(i,h.endLineNumber);for(let i=t;i<=o;i++)s[i-n].push(e)}if(l.beforeContentClassName&&n<=h.startLineNumber&&h.startLineNumber<=i){let e=new Wd(new Mn(h.startLineNumber,h.startColumn,h.startLineNumber,h.startColumn),l.beforeContentClassName,1);s[h.startLineNumber-n].push(e)}if(l.afterContentClassName&&n<=h.endLineNumber&&h.endLineNumber<=i){let e=new Wd(new Mn(h.endLineNumber,h.endColumn,h.endLineNumber,h.endColumn),l.afterContentClassName,2);s[h.endLineNumber-n].push(e)}}return{decorations:o,inlineDecorations:s}}}const EL=!0;class xL extends st{constructor(e,t,n,i,o,r){if(super(),this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new VD,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new PE(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new uo(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new uo(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,EL&&this.model.isTooLargeForTokenization())this._lines=new _L(this.model);else{const e=this._configuration.options,t=e.get(43),n=e.get(123),r=e.get(130),s=e.get(122);this._lines=new hL(this._editorId,this.model,i,o,t,this.model.getOptions().tabSize,n,r.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new $D(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new aL(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll(e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new RD(e)),this._eventDispatcher.emitOutgoingEvent(new UD(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(e=>{this._eventDispatcher.emitOutgoingEvent(e)})),this._decorations=new AL(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(Ik.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new jD)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new Nn(e.startLineNumber,1)),n=this.coordinatesConverter.convertViewPositionToModelPosition(new Nn(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,n.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new LD(e)),this._eventDispatcher.emitOutgoingEvent(new HD(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new AD)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new ED)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new PD)}_onConfigurationChanged(e,t){let n=null;if(-1!==this._viewportStartLine){let e=new Nn(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let i=!1;const o=this._configuration.options,r=o.get(43),s=o.get(123),a=o.get(130),l=o.get(122);if(this._lines.setWrappingSettings(r,s,a.wrappingColumn,l)&&(e.emitViewEvent(new DD),e.emitViewEvent(new ND),e.emitViewEvent(new kD(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(i=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(80)&&(this._decorations.reset(),e.emitViewEvent(new kD(null))),e.emitViewEvent(new xD(t)),this.viewLayout.onConfigurationChanged(t),i&&n){const e=this.coordinatesConverter.convertModelPositionToViewPosition(n),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}PE.shouldRecreate(t)&&(this.cursorConfig=new PE(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let n=!1,i=!1;const o=e.changes,r=e instanceof qy?e.versionId:null,s=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t<e.detail.length;t++){const n=e.detail[t];let i=e.injectedTexts[t];i&&(i=i.filter(e=>!e.ownerId||e.ownerId===this._editorId)),s.addRequest(n,i,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter(e=>!e.ownerId||e.ownerId===this._editorId)),s.addRequest(e.detail,t,null);break}}const a=s.finalize();let l=0;for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new DD),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break;case 3:{const i=this._lines.onModelLinesDeleted(r,e.fromLineNumber,e.toLineNumber);null!==i&&(t.emitViewEvent(i),this.viewLayout.onLinesDeleted(i.fromLineNumber,i.toLineNumber)),n=!0;break}case 4:{const i=a.slice(l,l+e.detail.length);l+=e.detail.length;const o=this._lines.onModelLinesInserted(r,e.fromLineNumber,e.toLineNumber,i);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),n=!0;break}case 2:{const n=a[l];l++;const[o,s,c,h]=this._lines.onModelLineChanged(r,e.lineNumber,n);i=o,s&&t.emitViewEvent(s),c&&(t.emitViewEvent(c),this.viewLayout.onLinesInserted(c.fromLineNumber,c.toLineNumber)),h&&(t.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber));break}case 5:break}null!==r&&this._lines.acceptVersionId(r),this.viewLayout.onHeightMaybeChanged(),!n&&i&&(t.emitViewEvent(new ND),t.emitViewEvent(new kD(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),n=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:n+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let n=0,i=e.ranges.length;n<i;n++){const i=e.ranges[n],o=this.coordinatesConverter.convertModelPositionToViewPosition(new Nn(i.fromLineNumber,1)).lineNumber,r=this.coordinatesConverter.convertModelPositionToViewPosition(new Nn(i.toLineNumber,this.model.getLineMaxColumn(i.toLineNumber))).lineNumber;t[n]={fromLineNumber:o,toLineNumber:r}}this._eventDispatcher.emitSingleViewEvent(new FD(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new ID),this.cursorConfig=new PE(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new PE(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new DD),e.emitViewEvent(new ND),e.emitViewEvent(new kD(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new PE(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new kD(e))}))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();let n=this._lines.setHiddenAreas(e);n&&(t.emitViewEvent(new DD),t.emitViewEvent(new ND),t.emitViewEvent(new kD(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(129),t=this._configuration.options.get(58),n=Math.max(20,Math.round(e.height/t)),i=this.viewLayout.getLinesViewportData(),o=Math.max(1,i.completelyVisibleStartLineNumber-n),r=Math.min(this.getLineCount(),i.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new Mn(o,this.getLineMinColumn(o),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(0===n.length)return[t];let i=[],o=0,r=t.startLineNumber,s=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let c=0,h=n.length;c<h;c++){const e=n[c].startLineNumber,t=n[c].endLineNumber;t<r||(e>a||(r<e&&(i[o++]=new Mn(r,s,e-1,this.model.getLineMaxColumn(e-1))),r=t+1,s=1))}return(r<a||r===a&&s<l)&&(i[o++]=new Mn(r,s,a,l)),i}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,n=e.completelyVisibleEndLineNumber;return new Mn(t,this.getLineMinColumn(t),n,this.getLineMaxColumn(n))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),n=t.completelyVisibleStartLineNumber,i=t.completelyVisibleEndLineNumber;return new Mn(n,this.getLineMinColumn(n),i,this.getLineMaxColumn(i))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,n=this.viewLayout.getLineNumberAtVerticalOffset(t),i=this.coordinatesConverter.convertViewPositionToModelPosition(new Nn(n,this.getLineMinColumn(n))),o=this.viewLayout.getVerticalOffsetForLineNumber(n)-t;return{scrollLeft:e.scrollLeft,firstPosition:i,firstPositionDeltaTop:o}}reduceRestoreState(e){if("undefined"===typeof e.firstPosition)return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),i=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:i}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStartLine=e;let i=this.coordinatesConverter.convertViewPositionToModelPosition(new Nn(e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new Mn(i.lineNumber,i.column,i.lineNumber,i.column),1);const o=this.viewLayout.getVerticalOffsetForLineNumber(e),r=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=r-o}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,i,o){return this._lines.getViewLinesBracketGuides(e,t,n,i,o)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Hr(this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Yr(this.getLineContent(e));return-1===t?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewLineRenderingData(e,t){let n=this.model.mightContainRTL(),i=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),r=this._lines.getViewLineData(t),s=this._decorations.getDecorationsViewportData(e).inlineDecorations,a=s[t-e.startLineNumber];return r.inlineDecorations&&(a=[...a,...r.inlineDecorations.map(e=>e.toInlineDecoration(t))]),new Qd(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,n,i,r.tokens,a,o,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){let i=this._lines.getViewLinesData(e,t,n);return new zd(this.getTabSize(),i)}getAllOverviewRulerDecorations(e){return this._lines.getAllOverviewRulerDecorations(this._editorId,pe(this._configuration.options),e)}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e&&e.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const e=t.options.minimap;e&&e.invalidateCachedColor()}}getValueInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,n){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=n:t+=n);const o=this.model.getOffsetAt(i),r=o+t;return this.model.getPositionAt(r)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,n){const i=n?"\r\n":this.model.getEOL();e=e.slice(0),e.sort(Mn.compareRangesUsingStarts);let o=!1,r=!1;for(const a of e)a.isEmpty()?o=!0:r=!0;if(!r){if(!t)return"";const n=e.map(e=>e.startLineNumber);let o="";for(let e=0;e<n.length;e++)e>0&&n[e-1]===n[e]||(o+=this.model.getLineContent(n[e])+i);return o}if(o&&t){let t=[],i=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==i&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,n?2:0)),i=e}return 1===t.length?t[0]:t}let s=[];for(const a of e)a.isEmpty()||s.push(this.model.getValueInRange(a,n?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const n=this.model.getLanguageIdentifier();if(1===n.id)return null;if(1!==e.length)return null;let i=e[0];if(i.isEmpty()){if(!t)return null;const e=i.startLineNumber;i=new Mn(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(43),r=this._getColorMap(),s=/[:;\\\/<>]/.test(o.fontFamily),a=s||o.fontFamily===De.fontFamily;let l;if(a)l=De.fontFamily;else{l=o.fontFamily,l=l.replace(/"/g,"'");const e=/[,']/.test(l);if(!e){const e=/[+ ]/.test(l);e&&(l=`'${l}'`)}l=`${l}, ${De.fontFamily}`}return{mode:n.language,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${l};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(i,r)+"</div>"}}_getHTMLToCopy(e,t){const n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize();let a="";for(let l=n;l<=o;l++){const e=this.model.getLineTokens(l),c=e.getLineContent(),h=l===n?i-1:0,u=l===o?r-1:c.length;a+=""===c?"<br>":eL(c,e.inflate(),t,h,u,s,b["i"])}return a}_getColorMap(){let e=Nc.getColorMap(),t=["#000000"];if(e)for(let n=1,i=e.length;n<i;n++)t[n]=sw.Format.CSS.formatHex(e[n]);return t}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,n){this._withViewEventsCollector(i=>this._cursor.setStates(i,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(i=>this._cursor.setSelections(i,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new KD):this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(i=>this._cursor.executeEdits(i,e,t,n))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,i,o){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,n,i,o))}paste(e,t,n,i){this._executeCursorEdit(o=>this._cursor.paste(o,e,t,n,i))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealPrimaryCursor(e,t){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),n=new Mn(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new OD(e,n,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),n=new Mn(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new OD(e,n,null,0,!0,0)))}revealRange(e,t,n,i,o){this._withViewEventsCollector(r=>r.emitViewEvent(new OD(e,n,null,i,t,o)))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){const t=this.viewLayout.changeWhitespace(e);t&&(this._eventDispatcher.emitSingleViewEvent(new zD),this._eventDispatcher.emitOutgoingEvent(new YD))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class SL{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){const n=this._entries.get(e);return this._entries.set(e,t),n}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}const kL=Ai("accessibilityService"),DL=new ig("accessibilityModeEnabled",!1);class LL extends pu{constructor(e,t){super(0);for(let n=0;n<e.length;n++)this.set(e.charCodeAt(n),1);for(let n=0;n<t.length;n++)this.set(t.charCodeAt(n),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let IL=[],NL=[];class ML{constructor(e,t){this.classifier=new LL(e,t)}static create(e){return new ML(e.get(118),e.get(117))}createLineBreaksComputer(e,t,n,i){t|=0,n=+n;const o=[],r=[],s=[];return{addRequest:(e,t,n)=>{o.push(e),r.push(t),s.push(n)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let l=[];for(let e=0,c=o.length;e<c;e++){const c=r[e],h=s[e];!h||h.injectionOptions||c?l[e]=TL(this.classifier,o[e],c,t,n,a,i):l[e]=BL(this.classifier,h,o[e],t,n,a,i)}return IL.length=0,NL.length=0,l}}}}function BL(e,t,n,i,o,r,s){if(-1===o)return null;const a=n.length;if(a<=1)return null;const l=t.breakOffsets,c=t.breakOffsetsVisibleColumn,h=FL(n,i,o,r,s),u=o-h;let d=IL,p=NL,f=0,g=0,m=0,b=o;const v=l.length;let y=0;if(y>=0){let e=Math.abs(c[y]-b);while(y+1<v){const t=Math.abs(c[y+1]-b);if(t>=e)break;e=t,y++}}while(y<v){let t=y<0?0:l[y],o=y<0?0:c[y];g>t&&(t=g,o=m);let s=0,h=0,w=0,_=0;if(o<=b){let m=o,v=0===t?0:n.charCodeAt(t-1),y=0===t?0:e.get(v),C=!0;for(let o=t;o<a;o++){const t=o,a=n.charCodeAt(o);let l,c;if(rs(a)?(o++,l=0,c=2):(l=e.get(a),c=OL(a,m,i,r)),t>g&&PL(v,y,a,l)&&(s=t,h=m),m+=c,m>b){t>g?(w=t,_=m-c):(w=o+1,_=m),m-h>u&&(s=0),C=!1;break}v=a,y=l}if(C){f>0&&(d[f]=l[l.length-1],p[f]=c[l.length-1],f++);break}}if(0===s){let a=o,l=n.charCodeAt(t),c=e.get(l),d=!1;for(let i=t-1;i>=g;i--){const t=i+1,o=n.charCodeAt(i);if(9===o){d=!0;break}let p,f;if(ss(o)?(i--,p=0,f=2):(p=e.get(o),f=_s(o)?r:1),a<=b){if(0===w&&(w=t,_=a),a<=b-u)break;if(PL(o,p,l,c)){s=t,h=a;break}}a-=f,l=o,c=p}if(0!==s){const e=u-(_-h);if(e<=i){const t=n.charCodeAt(w);let o;o=rs(t)?2:OL(t,_,i,r),e-o<0&&(s=0)}}if(d){y--;continue}}if(0===s&&(s=w,h=_),s<=g){const e=n.charCodeAt(g);rs(e)?(s=g+2,h=m+2):(s=g+1,h=m+OL(e,m,i,r))}g=s,d[f]=s,m=h,p[f]=h,f++,b=h+u;while(y<0||y<v&&c[y]<h)y++;let C=Math.abs(c[y]-b);while(y+1<v){const e=Math.abs(c[y+1]-b);if(e>=C)break;C=e,y++}}return 0===f?null:(d.length=f,p.length=f,IL=t.breakOffsets,NL=t.breakOffsetsVisibleColumn,t.breakOffsets=d,t.breakOffsetsVisibleColumn=p,t.wrappedTextIndentLength=h,t)}function TL(e,t,n,i,o,r,s){const a=Hy.applyInjectedText(t,n);let l,c;if(n&&n.length>0?(l=n.map(e=>e.options),c=n.map(e=>e.column-1)):(l=null,c=null),-1===o)return l?new jd([a.length],[],0,c,l):null;const h=a.length;if(h<=1)return l?new jd([a.length],[],0,c,l):null;const u=FL(a,i,o,r,s),d=o-u;let p=[],f=[],g=0,m=0,b=0,v=o,y=a.charCodeAt(0),w=e.get(y),_=OL(y,0,i,r),C=1;rs(y)&&(_+=1,y=a.charCodeAt(1),w=e.get(y),C++);for(let A=C;A<h;A++){const t=A,n=a.charCodeAt(A);let o,s;rs(n)?(A++,o=0,s=2):(o=e.get(n),s=OL(n,_,i,r)),PL(y,w,n,o)&&(m=t,b=_),_+=s,_>v&&((0===m||_-b>d)&&(m=t,b=_-s),p[g]=m,f[g]=b,g++,v=b+d,m=0),y=n,w=o}return 0!==g||n&&0!==n.length?(p[g]=h,f[g]=_,new jd(p,f,u,c,l)):null}function OL(e,t,n,i){return 9===e?n-t%n:_s(e)||e<32?i:1}function RL(e,t){return t-e%t}function PL(e,t,n,i){return 32!==n&&(2===t||3===t&&2!==i||1===i||3===i&&1!==t)}function FL(e,t,n,i,o){let r=0;if(0!==o){const s=Hr(e);if(-1!==s){for(let n=0;n<s;n++){const i=9===e.charCodeAt(n)?RL(r,t):1;r+=i}const a=3===o?2:2===o?1:0;for(let e=0;e<a;e++){const e=RL(r,t);r+=e}r+i>n&&(r=0)}}return r}var jL;const zL=null===(jL=window.trustedTypes)||void 0===jL?void 0:jL.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class VL{static create(){return new VL}constructor(){}createLineBreaksComputer(e,t,n,i){t|=0,n=+n;let o=[],r=[];return{addRequest:(e,t,n)=>{o.push(e),r.push(t)},finalize:()=>QL(o,e,t,n,i,r)}}}function QL(e,t,n,i,o,r){var s;function a(t){const n=r[t];if(n){const i=Hy.applyInjectedText(e[t],n),o=n.map(e=>e.options),r=n.map(e=>e.column-1);return new jd([i.length],[],0,r,o)}return null}if(-1===i){const t=[];for(let n=0,i=e.length;n<i;n++)t[n]=a(n);return t}const l=Math.round(i*t.typicalHalfwidthCharacterWidth);2!==o&&3!==o||(o=1);const c=document.createElement("div");fb.applyFontInfoSlow(c,t);const h=fh(1e4),u=[],d=[],p=[],f=[],g=[];for(let _=0;_<e.length;_++){const i=Hy.applyInjectedText(e[_],r[_]);let s=0,a=0,c=l;if(0!==o)if(s=Hr(i),-1===s)s=0;else{for(let t=0;t<s;t++){const e=9===i.charCodeAt(t)?n-a%n:1;a+=e}const e=Math.ceil(t.spaceWidth*a);e+t.typicalFullwidthCharacterWidth>l?(s=0,a=0):c=l-e}const m=i.substr(s),b=WL(m,a,n,c,h);u[_]=s,d[_]=a,p[_]=m,f[_]=b[0],g[_]=b[1]}const m=h.build(),b=null!==(s=null===zL||void 0===zL?void 0:zL.createHTML(m))&&void 0!==s?s:m;c.innerHTML=b,c.style.position="absolute",c.style.top="10000",c.style.wordWrap="break-word",document.body.appendChild(c);let v=document.createRange();const y=Array.prototype.slice.call(c.children,0);let w=[];for(let _=0;_<e.length;_++){const e=y[_],t=HL(v,e,p[_],f[_]);if(null===t){w[_]=a(_);continue}const n=u[_],i=d[_],o=g[_],s=[];for(let r=0,a=t.length;r<a;r++)s[r]=o[t[r]];if(0!==n)for(let r=0,a=t.length;r<a;r++)t[r]+=n;let l,c;const h=r[_];h?(l=h.map(e=>e.options),c=h.map(e=>e.column-1)):(l=null,c=null),w[_]=new jd(t,s,i,c,l)}return document.body.removeChild(c),w}function WL(e,t,n,i,o){o.appendASCIIString('<div style="width:'),o.appendASCIIString(String(i)),o.appendASCIIString('px;">');const r=e.length;let s=t,a=0,l=[],c=[],h=0<r?e.charCodeAt(0):0;o.appendASCIIString("<span>");for(let u=0;u<r;u++){0!==u&&u%16384===0&&o.appendASCIIString("</span><span>"),l[u]=a,c[u]=s;const t=h;h=u+1<r?e.charCodeAt(u+1):0;let i=1,d=1;switch(t){case 9:i=n-s%n,d=i;for(let e=1;e<=i;e++)e<i?o.write1(160):o.appendASCII(32);break;case 32:32===h?o.write1(160):o.appendASCII(32);break;case 60:o.appendASCIIString("&lt;");break;case 62:o.appendASCIIString("&gt;");break;case 38:o.appendASCIIString("&amp;");break;case 0:o.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:o.write1(65533);break;default:_s(t)&&d++,t<32?o.write1(9216+t):o.write1(t)}a+=i,s+=d}return o.appendASCIIString("</span>"),l[e.length]=a,c[e.length]=s,o.appendASCIIString("</div>"),[l,c]}function HL(e,t,n,i){if(n.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),r=[];try{UL(e,o,i,0,null,n.length-1,null,r)}catch(s){return null}return 0===r.length?null:(r.push(n.length),r)}function UL(e,t,n,i,o,r,s,a){if(i===r)return;if(o=o||YL(e,t,n[i],n[i+1]),s=s||YL(e,t,n[r],n[r+1]),Math.abs(o[0].top-s[0].top)<=.1)return;if(i+1===r)return void a.push(r);const l=i+(r-i)/2|0,c=YL(e,t,n[l],n[l+1]);UL(e,t,n,i,o,l,c,a),UL(e,t,n,l,c,r,s,a)}function YL(e,t,n,i){return e.setStart(t[n/16384|0].firstChild,n%16384),e.setEnd(t[i/16384|0].firstChild,i%16384),e.getClientRects()}var GL=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},KL=function(e,t){return function(n,i){t(n,i,e)}};let qL=0;class JL{constructor(e,t,n,i,o){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=i,this.listenersToRemove=o}dispose(){nt(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let $L=class e extends st{constructor(e,t,n,i,o,r,s,a,l,c){super(),this._onDidDispose=this._register(new bt),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new bt),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new bt),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new bt),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new bt),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new bt),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new bt),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new bt),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new bt),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new bt),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new bt),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new bt),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new XL),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new XL),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new bt),this.onWillType=this._onWillType.event,this._onDidType=this._register(new bt),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new bt),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new bt),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new bt),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new bt),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new bt),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new bt),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new bt),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new bt),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new bt),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new bt),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new bt),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new bt),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new bt),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new bt),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new bt),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new bt),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new bt),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const h=Object.assign({},t);let u;this._domElement=e,this._overflowWidgetsDomNode=h.overflowWidgetsDomNode,delete h.overflowWidgetsDomNode,this._id=++qL,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=n.isSimpleWidget||!1,this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(h,c)),this._register(this._configuration.onDidChange(e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(129)){const e=t.get(129);this._onDidLayoutChange.fire(e)}})),this._contextKeyService=this._register(s.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=o,this._commandService=r,this._themeService=a,this._register(new ZL(this,this._contextKeyService)),this._register(new eI(this,this._contextKeyService)),this._instantiationService=i.createChild(new SL([og,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new tI(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},u=Array.isArray(n.contributions)?n.contributions:$m.getEditorContributions();for(const p of u)if(this._contributions[p.id])Oe(new Error("Cannot have two contributions with the same id "+p.id));else try{const e=this._instantiationService.createInstance(p.ctor,this);this._contributions[p.id]=e}catch(d){Oe(d)}$m.getEditorActions().forEach(e=>{if(this._actions[e.id])return void Oe(new Error("Cannot have two actions with the same id "+e.id));const t=new ZD(e.id,e.label,e.alias,ma(e.precondition),()=>this._instantiationService.invokeFunction(t=>Promise.resolve(e.runEditorCommand(t,this,null))),this._contextKeyService);this._actions[t.id]=t}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new fb(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Ya.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,n=e.length;t<n;t++){const n=e[t];this._contributions[n].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e)}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Kx.getWordAtPosition(this._modelData.model,this._configuration.options.get(115),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let n=0;return e&&e.lineEnding&&"\n"===e.lineEnding?n=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const n=this.hasTextFocus(),i=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus();const o={oldModelUrl:i?i.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(i)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(let n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(e,t,n){const i=e.model.validatePosition({lineNumber:t,column:n}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber)}getTopForLineNumber(t){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,1):-1}getTopForPosition(t,n){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,n):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map(e=>Mn.lift(e)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return aE.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!Nn.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,i){if(!this._modelData)return;if(!Mn.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",n,r,t,i)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Mn(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,i){if(!Nn.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Mn(e.lineNumber,e.column,e.lineNumber,e.column),t,n,i)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=Bn.isISelection(e),n=Mn.isIRange(e);if(!t&&!n)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(n){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new Bn(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,i){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Mn(e,1,t,1),n,!1,i)}revealRange(e,t=0,n=!1,i=!0){this._revealRange(e,n?1:0,i,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,i){if(!Mn.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Mn.lift(e),t,n,i)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,n=e.length;t<n;t++)if(!Bn.isISelection(e[t]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,n)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e={},t=Object.keys(this._contributions);for(const o of t){const t=this._contributions[o];"function"===typeof t.saveViewState&&(e[o]=t.saveViewState())}const n=this._modelData.viewModel.saveCursorState(),i=this._modelData.viewModel.saveState();return{cursorState:n,viewState:i,contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const e=t.cursorState;Array.isArray(e)?this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]);const n=t.contributionsState||{},i=Object.keys(this._contributions);for(let t=0,r=i.length;t<r;t++){const e=i[t],o=this._contributions[e];"function"===typeof o.restoreViewState&&o.restoreViewState(n[e])}const o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],t=Object.keys(this._actions);for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push(this._actions[i])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter(e=>e.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=n;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=n;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=n;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=n;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const i=this.getAction(t);i?Promise.resolve(i.run()).then(void 0,Oe):this._modelData&&(this._triggerEditorCommand(e,t,n)||this._triggerCommand(t,n))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,n,i,o){this._modelData&&this._modelData.viewModel.compositionType(t,n,i,o,e)}_paste(e,t,n,i,o){if(!this._modelData||0===t.length)return;const r=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,n,i,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new Mn(r.lineNumber,r.column,s.lineNumber,s.column),mode:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){const i=$m.getEditorCommand(t);return!!i&&(n=n||{},n.source=e,this._instantiationService.invokeFunction(e=>{Promise.resolve(i.runEditorCommand(e,this,n)).then(void 0,Oe)}),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(80)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(80)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,n){if(!this._modelData)return!1;if(this._configuration.options.get(80))return!1;let i;return i=n?Array.isArray(n)?()=>n:n:()=>null,this._modelData.viewModel.executeEdits(e,t,i),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,pe(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){const e=this._configuration.options,t=e.get(129);return t}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId()),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const n=this._modelData.model.validatePosition(t),i=this._configuration.options,o=i.get(129),r=e._getVerticalOffsetForPosition(this._modelData,n.lineNumber,n.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(n.lineNumber,n.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft();return{top:r,left:s,height:i.get(58)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){fb.applyFontInfoSlow(e,this._configuration.options.get(43))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const n=new xL(this._id,this._configuration,e,VL.create(),ML.create(this._configuration.options),e=>No(e));t.push(e.onDidChangeDecorations(e=>this._onDidChangeModelDecorations.fire(e))),t.push(e.onDidChangeLanguage(t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)})),t.push(e.onDidChangeLanguageConfiguration(e=>this._onDidChangeModelLanguageConfiguration.fire(e))),t.push(e.onDidChangeContent(e=>this._onDidChangeModelContent.fire(e))),t.push(e.onDidChangeOptions(e=>this._onDidChangeModelOptions.fire(e))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.onEvent(e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(m("cursors.maximum","The number of cursors has been limited to {0}.",$D.MAX_CURSOR_COUNT));const t=[];for(let o=0,r=e.selections.length;o<r;o++)t[o]=e.selections[o].getPosition();const n={position:t[0],secondaryPositions:t.slice(1),reason:e.reason,source:e.source};this._onDidChangeCursorPosition.fire(n);const i={selection:e.selections[0],secondarySelections:e.selections.slice(1),modelVersionId:e.modelVersionId,oldSelections:e.oldSelections,oldModelVersionId:e.oldModelVersionId,source:e.source,reason:e.reason};this._onDidChangeCursorSelection.fire(i);break}}}));const[i,o]=this._createView(n);if(o){this._domElement.appendChild(i.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,n=t.length;e<n;e++){const n=t[e];i.addContentWidget(this._contentWidgets[n])}t=Object.keys(this._overlayWidgets);for(let e=0,n=t.length;e<n;e++){const n=t[e];i.addOverlayWidget(this._overlayWidgets[n])}i.render(!1,!0),i.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new JL(e,n,i,o,t)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,n,i)=>{this._paste("keyboard",e,t,n,i)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,n,i)=>{this._compositionType("keyboard",e,t,n,i)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,n,i)=>{const o={text:e,pasteOnNewLine:t,multicursorText:n,mode:i};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,n,i)=>{if(n||i){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:n,positionDelta:i};this._commandService.executeCommand("compositionType",o)}else{const n={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",n)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new CS(e.coordinatesConverter);n.onKeyDown=e=>this._onKeyDown.fire(e),n.onKeyUp=e=>this._onKeyUp.fire(e),n.onContextMenu=e=>this._onContextMenu.fire(e),n.onMouseMove=e=>this._onMouseMove.fire(e),n.onMouseLeave=e=>this._onMouseLeave.fire(e),n.onMouseDown=e=>this._onMouseDown.fire(e),n.onMouseUp=e=>this._onMouseUp.fire(e),n.onMouseDrag=e=>this._onMouseDrag.fire(e),n.onMouseDrop=e=>this._onMouseDrop.fire(e),n.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),n.onMouseWheel=e=>this._onMouseWheel.fire(e);const i=new yD(t,this._configuration,this._themeService,e,n,this._overflowWidgetsDomNode);return[i,!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};$L=GL([KL(3,_i),KL(4,xi),KL(5,va),KL(6,og),KL(7,Em),KL(8,Sg),KL(9,kL)],$L);class XL extends st{constructor(){super(),this._onDidChangeToTrue=this._register(new bt),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new bt),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class ZL extends st{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=aS.editorSimpleInput.bindTo(t),this._editorFocus=aS.focus.bindTo(t),this._textInputFocus=aS.textInputFocus.bindTo(t),this._editorTextFocus=aS.editorTextFocus.bindTo(t),this._editorTabMovesFocus=aS.tabMovesFocus.bindTo(t),this._editorReadonly=aS.readOnly.bindTo(t),this._inDiffEditor=aS.inDiffEditor.bindTo(t),this._editorColumnSelection=aS.columnSelection.bindTo(t),this._hasMultipleSelections=aS.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=aS.hasNonEmptySelection.bindTo(t),this._canUndo=aS.canUndo.bindTo(t),this._canRedo=aS.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(128)),this._editorReadonly.set(e.get(80)),this._inDiffEditor.set(e.get(53)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(e=>!e.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class eI extends st{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=aS.languageId.bindTo(t),this._hasCompletionItemProvider=aS.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=aS.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=aS.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=aS.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=aS.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=aS.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=aS.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=aS.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=aS.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=aS.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=aS.hasReferenceProvider.bindTo(t),this._hasRenameProvider=aS.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=aS.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=aS.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=aS.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=aS.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=aS.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=aS.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=aS.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(lc.onDidChange(n)),this._register(_c.onDidChange(n)),this._register(yc.onDidChange(n)),this._register(gc.onDidChange(n)),this._register(mc.onDidChange(n)),this._register(bc.onDidChange(n)),this._register(vc.onDidChange(n)),this._register(uc.onDidChange(n)),this._register(pc.onDidChange(n)),this._register(dc.onDidChange(n)),this._register(sc.onDidChange(n)),this._register(ac.onDidChange(n)),this._register(Cc.onDidChange(n)),this._register(Ac.onDidChange(n)),this._register(hc.onDidChange(n)),this._register(wc.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(lc.has(e)),this._hasCodeActionsProvider.set(_c.has(e)),this._hasCodeLensProvider.set(yc.has(e)),this._hasDefinitionProvider.set(gc.has(e)),this._hasDeclarationProvider.set(mc.has(e)),this._hasImplementationProvider.set(bc.has(e)),this._hasTypeDefinitionProvider.set(vc.has(e)),this._hasHoverProvider.set(uc.has(e)),this._hasDocumentHighlightProvider.set(pc.has(e)),this._hasDocumentSymbolProvider.set(dc.has(e)),this._hasReferenceProvider.set(sc.has(e)),this._hasRenameProvider.set(ac.has(e)),this._hasSignatureHelpProvider.set(hc.has(e)),this._hasInlayHintsProvider.set(wc.has(e)),this._hasDocumentFormattingProvider.set(Cc.has(e)||Ac.has(e)),this._hasDocumentSelectionFormattingProvider.set(Ac.has(e)),this._hasMultipleDocumentFormattingProvider.set(Cc.all(e).length+Ac.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(Ac.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===mo.walkThroughSnippet)}):this.reset()}}class tI extends st{constructor(e){super(),this._onChange=this._register(new bt),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(gr(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const nI=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),iI=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function oI(e){return nI+encodeURIComponent(e.toString())+iI}const rI=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),sI=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function aI(e){return rI+encodeURIComponent(e.toString())+sI}Mm((e,t)=>{const n=e.getColor(Yw);n&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${n}; }`);const i=e.getColor(Uw);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${oI(i)}") repeat-x bottom left; }`);const o=e.getColor(Hw);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const r=e.getColor(qw);r&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }`);const s=e.getColor(Kw);s&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${oI(s)}") repeat-x bottom left; }`);const a=e.getColor(Gw);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(Xw);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=e.getColor($w);c&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${oI(c)}") repeat-x bottom left; }`);const h=e.getColor(Jw);h&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${h}; }`);const u=e.getColor(e_);u&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${u}; }`);const d=e.getColor(Zw);d&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${aI(d)}") no-repeat bottom left; }`);const p=e.getColor(YC);p&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${p.rgba.a}; }`);const f=e.getColor(UC);f&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${f}; }`);const g=e.getColor(n_)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${g}}`)});n("7115");class lI{constructor(e,t,n){const i=e=>this.emitter.fire(e);this.emitter=new bt({onFirstListenerAdd:()=>e.addEventListener(t,i,n),onLastListenerRemove:()=>e.removeEventListener(t,i,n)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function cI(e){return e.preventDefault(),e.stopPropagation(),e}n("c901");var hI=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let uI=!1;var dI;(function(e){e["North"]="north",e["South"]="south",e["East"]="east",e["West"]="west"})(dI||(dI={}));let pI=4;const fI=new bt;let gI=300;const mI=new bt;class bI{constructor(){this.disposables=new rt}get onPointerMove(){return this.disposables.add(new lI(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new lI(window,"mouseup")).event}dispose(){this.disposables.dispose()}}hI([bb],bI.prototype,"onPointerMove",null),hI([bb],bI.prototype,"onPointerUp",null);class vI{constructor(e){this.el=e,this.disposables=new rt}get onPointerMove(){return this.disposables.add(new lI(this.el,vb.Change)).event}get onPointerUp(){return this.disposables.add(new lI(this.el,vb.End)).event}dispose(){this.disposables.dispose()}}hI([bb],vI.prototype,"onPointerMove",null),hI([bb],vI.prototype,"onPointerUp",null);class yI{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}hI([bb],yI.prototype,"onPointerMove",null),hI([bb],yI.prototype,"onPointerUp",null);class wI extends st{constructor(e,t,n){super(),this.hoverDelay=gI,this.hoverDelayer=this._register(new ro(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new bt),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new bt),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new bt),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new bt),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new bt),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new rt),this.orthogonalStartDragHandleDisposables=this._register(new rt),this.orthogonalEndSashDisposables=this._register(new rt),this.orthogonalEndDragHandleDisposables=this._register(new rt),this.el=mr(e,_r(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add("orthogonal-edge-"+n.orthogonalEdge),b["f"]&&this.el.classList.add("mac");const i=this._register(new lI(this.el,"mousedown")).event;this._register(i(e=>this.onPointerStart(e,new bI),this));const o=this._register(new lI(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const r=this._register(new lI(this.el,"mouseenter")).event;this._register(r(()=>wI.onMouseEnter(this)));const s=this._register(new lI(this.el,"mouseleave")).event;this._register(s(()=>wI.onMouseLeave(this))),this._register(wb.addTarget(this.el));const a=pt.map(this._register(new lI(this.el,vb.Start)).event,e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})});this._register(a(e=>this.onPointerStart(e,new vI(this.el)),this));const l=this._register(new lI(this.el,vb.Tap)).event,c=pt.map(pt.filter(pt.debounce(l,(e,t)=>{var n;return{event:t,count:(null!==(n=null===e||void 0===e?void 0:e.count)&&void 0!==n?n:0)+1}},250),({count:e})=>2===e),({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})});this._register(c(this.onPointerDoublePress,this)),"number"===typeof n.size?(this.size=n.size,0===n.orientation?this.el.style.width=this.size+"px":this.el.style.height=this.size+"px"):(this.size=pI,this._register(fI.event(e=>{this.size=e,this.layout()}))),this._register(mI.event(e=>this.hoverDelay=e)),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",uI),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=mr(this.el,_r(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(ot(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new lI(this._orthogonalStartDragHandle,"mouseenter")).event(()=>wI.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new lI(this._orthogonalStartDragHandle,"mouseleave")).event(()=>wI.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=mr(this.el,_r(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(ot(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new lI(this._orthogonalEndDragHandle,"mouseenter")).event(()=>wI.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new lI(this._orthogonalEndDragHandle,"mouseleave")).event(()=>wI.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){ur.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const i=this.getOrthogonalSash(e);i&&(n=!0,e.__orthogonalSashEvent=!0,i.onPointerStart(e,new yI(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new yI(t))),!this.state)return;const i=Er("iframe");for(const p of i)p.style.pointerEvents="none";const o=e.pageX,r=e.pageY,s=e.altKey,a={startX:o,currentX:o,startY:r,currentY:r,altKey:s};this.el.classList.add("active"),this._onDidStart.fire(a);const l=ir(this.el),c=()=>{let e="";e=n?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":b["f"]?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":b["f"]?"col-resize":"ew-resize",l.textContent=`* { cursor: ${e} !important; }`},h=new rt;c(),n||this.onDidEnablementChange(c,null,h);const u=e=>{ur.stop(e,!1);const t={startX:o,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:s};this._onDidChange.fire(t)},d=e=>{ur.stop(e,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),h.dispose();for(const t of i)t.style.pointerEvents="auto"};t.onPointerMove(u,null,h),t.onPointerUp(d,null,h),h.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&wI.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&wI.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){wI.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}class _I{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const CI=[];function AI(e,t,n){t instanceof _I||(t=new _I(t,[],n)),CI.push([e,t])}function EI(){return CI}const xI=Ai("IEditorCancelService"),SI=new ig("cancellableOperation",!1,m("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));AI(xI,class{constructor(){this._tokens=new WeakMap}add(e,t){let n,i=this._tokens.get(e);return i||(i=e.invokeWithinContext(e=>{const t=SI.bindTo(e.get(og)),n=new ht;return{key:t,tokens:n}}),this._tokens.set(e,i)),i.key.set(!0),n=i.tokens.push(t),()=>{n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);Km(new class extends Ym{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:SI})}runEditorCommand(e,t){e.get(xI).cancel(t)}});class kI{constructor(e,t,n){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=n}static capture(e){let t=null,n=0;if(0!==e.getScrollTop()){const i=e.getVisibleRanges();if(i.length>0){t=i[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-o}}return new kI(t,n,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}n("c6b4");const DI={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:hx.text,TERMINALS:"Terminals"};class LI{constructor(e){this.data=e}update(){}getData(){return this.data}}const II={CurrentDragAndDropData:void 0};n("154c");class NI extends st{constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof ym&&this._register(t.onDidChange(e=>{this.element&&this.handleActionChangeEvent(e)}))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new wm)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(wb.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,Bi&&this._register(Eo(e,hr.DRAG_START,e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(DI.TEXT,this._action.label)}))),this._register(Eo(t,vb.Tap,e=>this.onClick(e,!0))),this._register(Eo(t,hr.MOUSE_DOWN,e=>{n||ur.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")})),b["f"]&&this._register(Eo(t,hr.CONTEXT_MENU,e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)})),this._register(Eo(t,hr.CLICK,e=>{ur.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)})),this._register(Eo(t,hr.DBLCLICK,e=>{ur.stop(e,!0)})),[hr.MOUSE_UP,hr.MOUSE_OUT].forEach(e=>{this._register(Eo(t,e,e=>{ur.stop(e),t.classList.remove("active")}))})}onClick(e,t=!1){var n;ur.stop(e,!0);const i=la(this._context)?(null===(n=this.options)||void 0===n?void 0:n.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class MI extends NI{constructor(e,t,n={}){super(e,t,n),this.options=n,this.options.icon=void 0!==n.icon&&n.icon,this.options.label=void 0===n.label||n.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=mr(this.element,_r("a.action-label"))),this.label&&(this._action.id===_m.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(mr(this.element,_r("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=m({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var BI=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class TI extends st{constructor(e,t={}){var n,i,o,r,s,a;let l,c;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new bt),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new bt({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new bt),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new bt),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(n=t.context)&&void 0!==n?n:null,this._orientation=null!==(i=this.options.orientation)&&void 0!==i?i:0,this._triggerKeys={keyDown:null!==(r=null===(o=this.options.triggerKeys)||void 0===o?void 0:o.keyDown)&&void 0!==r&&r,keys:null!==(a=null===(s=this.options.triggerKeys)||void 0===s?void 0:s.keys)&&void 0!==a?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new wm,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._register(this._actionRunner.onBeforeRun(e=>this._onBeforeRun.fire(e))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:l=[15],c=[17];break;case 1:l=[16],c=[18],this.domNode.className+=" vertical";break}this._register(Eo(this.domNode,hr.KEY_DOWN,e=>{const t=new Ki(e);let n=!0;const i="number"===typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;l&&(t.equals(l[0])||t.equals(l[1]))?n=this.focusPrevious():c&&(t.equals(c[0])||t.equals(c[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&i instanceof NI&&i.trapsArrowNavigation?n=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())})),this._register(Eo(this.domNode,hr.KEY_UP,e=>{const t=new Ki(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(gr(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{nr()!==this.domNode&&Jo(nr(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(Jo(nr(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const n=Array.isArray(e)?e:[e];let i=ra(t.index)?t.index:null;n.forEach(e=>{const n=document.createElement("li");let o;n.className="action-item",n.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(Eo(n,hr.CONTEXT_MENU,e=>{ur.stop(e,!0)})),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new MI(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(n),this.focusable&&o instanceof NI&&0===this.viewItems.length&&o.setFocusable(!0),null===i||i<0||i>=this.actionsList.children.length?(this.actionsList.appendChild(n),this.viewItems.push(o),this._actionIds.push(e.id)):(this.actionsList.insertBefore(n,this.actionsList.children[i]),this.viewItems.splice(i,0,o),this._actionIds.splice(i,0,e.id),i++)}),"number"===typeof this.focusedItem&&this.focus(this.focusedItem)}clear(){nt(this.viewItems),this.viewItems=[],this._actionIds=[],_o(this.actionsList)}length(){return this.viewItems.length}focus(e){let t=!1,n=void 0;if(void 0===e?t=!0:"number"===typeof e?n=e:"boolean"===typeof e&&(t=e),t&&"undefined"===typeof this.focusedItem){const e=this.viewItems.findIndex(e=>e.isEnabled());this.focusedItem=-1===e?void 0:e,this.updateFocus()}else void 0!==n&&(this.focusedItem=n),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if("undefined"===typeof this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){if("undefined"===typeof this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){"undefined"===typeof this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let n=0;n<this.viewItems.length;n++){const i=this.viewItems[n],o=i;if(n===this.focusedItem){let n=!0;ha(o.focus)||(n=!1),this.options.focusOnlyEnabledItems&&ha(i.isEnabled)&&!i.isEnabled()&&(n=!1),n?o.focus(e):this.actionsList.focus({preventScroll:t})}else ha(o.blur)&&o.blur()}}doTrigger(e){if("undefined"===typeof this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof NI){const n=null===t._context||void 0===t._context?e:t._context;this.run(t._action,n)}}run(e,t){return BI(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){nt(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}const OI={IconContribution:"base.contributions.icons"};class RI{constructor(){this._onDidChange=new bt,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:m("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:m("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${$l.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,i){const o=this.iconsById[e];if(o){if(n&&!o.description){o.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=n),this._onDidChange.fire()}return o}let r={id:e,description:n,defaults:t,deprecationMessage:i};this.iconsById[e]=r;let s={$ref:"#/definitions/icons"};return i&&(s.deprecationMessage=i),n&&(s.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=s,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{while(Sm.isThemeIcon(e.defaults))e=this.iconsById[e.defaults.id];return"codicon codicon-"+(e?e.id:"")};let n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const i=Object.keys(this.iconsById).map(e=>this.iconsById[e]);for(const o of i.filter(e=>!!e.description).sort(e))n.push(`|<i class="${t(o)}"></i>|${o.id}|${Sm.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(const o of i.filter(e=>!Sm.isThemeIcon(e.defaults)).sort(e))n.push(`|<i class="${t(o)}"></i>|${o.id}|`);return n.join("\n")}}const PI=new RI;function FI(e,t,n,i){return PI.registerIcon(e,t,n,i)}function jI(){return PI}function zI(){for(const e of Gl.all)PI.registerIcon(e.id,e.definition,e.description);Gl.onDidRegister(e=>PI.registerIcon(e.id,e.definition,e.description))}Np.add(OI.IconContribution,PI),zI();const VI="vscode://schemas/icons";let QI=Np.as(Mp.JSONContribution);QI.registerSchema(VI,PI.getIconSchema());const WI=new uo(()=>QI.notifySchemaChanged(VI),200);PI.onDidChange(()=>{WI.isScheduled()||WI.schedule()});FI("widget-close",Jl.close,m("widgetClose","Icon for the close action in widgets."));var HI,UI=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const YI=3;class GI{constructor(e,t,n,i){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=n,this.modifiedLineEnd=i}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class KI{constructor(e){this.entries=e}}const qI=FI("diff-review-insert",Jl.add,m("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),JI=FI("diff-review-remove",Jl.remove,m("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),$I=FI("diff-review-close",Jl.close,m("diffReviewCloseIcon","Icon for 'Close' in diff review."));class XI extends st{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=mb(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=mb(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new TI(this.actionBarContainer.domNode)),this._actionBar.push(new ym("diffreview.close",m("label.close","Close"),"close-diff-review "+Sm.asClassName($I),!0,()=>UI(this,void 0,void 0,(function*(){return this.hide()}))),{label:!1,icon:!0}),this.domNode=mb(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=mb(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new mk(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(ko(this.domNode.domNode,"click",e=>{e.preventDefault();let t=$o(e.target,"diff-review-row");t&&this._goToRow(t)})),this._register(ko(this.domNode.domNode,"keydown",e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,n=this._diffs.length;e<n;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Nn(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,n=this._diffs.length;e<n;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Nn(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1,t=this._getCurrentFocusedRow();if(t){let n=parseInt(t.getAttribute("data-line"),10);isNaN(n)||(e=n)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new Nn(e,1)),this._diffEditor.revealPosition(new Nn(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){let e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){let t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,n){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(n),this._content.setHeight(n),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const e=this._diffEditor.getLineChanges();if(!e||0===e.length)return[];const t=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel();return t&&n?XI._mergeAdjacent(e,t.getLineCount(),n.getLineCount()):[]}static _mergeAdjacent(e,t,n){if(!e||0===e.length)return[];let i=[],o=0;for(let l=0,c=e.length;l<c;l++){const r=e[l],s=r.originalStartLineNumber,a=r.originalEndLineNumber,h=r.modifiedStartLineNumber,u=r.modifiedEndLineNumber;let d=[],p=0;{const t=0===a?s:s-1,n=0===u?h:h-1;let i=1,o=1;if(l>0){const t=e[l-1];i=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-YI+1,c=n-YI+1;if(r<i){const e=i-r;r+=e,c+=e}if(c<o){const e=o-c;r+=e,c+=e}d[p++]=new GI(r,t,c,n)}0!==a&&(d[p++]=new GI(s,a,0,0)),0!==u&&(d[p++]=new GI(0,0,h,u));{const i=0===a?s+1:a+1,o=0===u?h+1:u+1;let r=t,f=n;if(l+1<c){const t=e[l+1];r=0===t.originalEndLineNumber?t.originalStartLineNumber:t.originalStartLineNumber-1,f=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1}let g=i+YI-1,m=o+YI-1;if(g>r){const e=r-g;g+=e,m+=e}if(m>f){const e=f-m;g+=e,m+=e}d[p++]=new GI(i,g,o,m)}i[o++]=new KI(d)}let r=i[0].entries,s=[],a=0;for(let l=1,c=i.length;l<c;l++){const e=i[l].entries,t=r[r.length-1],n=e[0];0===t.getType()&&0===n.getType()&&n.originalLineStart<=t.originalLineEnd?(r[r.length-1]=new GI(t.originalLineStart,n.originalLineEnd,t.modifiedLineStart,n.modifiedLineEnd),r=r.concat(e.slice(1))):(s[a++]=new KI(r),r=e)}return s[a++]=new KI(r),s}_findDiffIndex(e){const t=e.lineNumber;for(let n=0,i=this._diffs.length;n<i;n++){const e=this._diffs[n].entries,i=e[e.length-1].modifiedLineEnd;if(t<=i)return n}return 0}_render(){const e=this._diffEditor.getOriginalEditor().getOptions(),t=this._diffEditor.getModifiedEditor().getOptions(),n=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel(),o=n.getOptions(),r=i.getOptions();if(!this._isVisible||!n||!i)return _o(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();this._diffEditor.updateOptions({readOnly:!0});const s=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[s]===this._currentDiff)return;this._currentDiff=this._diffs[s];const a=this._diffs[s].entries;let l=document.createElement("div");l.className="diff-review-table",l.setAttribute("role","list"),l.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),fb.applyFontInfoSlow(l,t.get(43));let c=0,h=0,u=0,d=0;for(let m=0,A=a.length;m<A;m++){const e=a[m],t=e.originalLineStart,n=e.originalLineEnd,i=e.modifiedLineStart,o=e.modifiedLineEnd;0!==t&&(0===c||t<c)&&(c=t),0!==n&&(0===h||n>h)&&(h=n),0!==i&&(0===u||i<u)&&(u=i),0!==o&&(0===d||o>d)&&(d=o)}let p=document.createElement("div");p.className="diff-review-row";let f=document.createElement("div");f.className="diff-review-cell diff-review-summary";const g=h-c+1,b=d-u+1;f.appendChild(document.createTextNode(`${s+1}/${this._diffs.length}: @@ -${c},${g} +${u},${b} @@`)),p.setAttribute("data-line",String(u));const v=e=>0===e?m("no_lines_changed","no lines changed"):1===e?m("one_line_changed","1 line changed"):m("more_lines_changed","{0} lines changed",e),y=v(g),w=v(b);p.setAttribute("aria-label",m({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",s+1,this._diffs.length,c,y,u,w)),p.appendChild(f),p.setAttribute("role","listitem"),l.appendChild(p);const _=t.get(58);let C=u;for(let m=0,A=a.length;m<A;m++){const s=a[m];XI._renderSection(l,s,C,_,this._width,e,n,o,t,i,r),0!==s.modifiedLineStart&&(C=s.modifiedLineEnd)}_o(this._content.domNode),this._content.domNode.appendChild(l),this.scrollbar.scanDomNode()}static _renderSection(e,t,n,i,o,r,s,a,l,c,h){const u=t.getType();let d="diff-review-row",p="";const f="diff-review-spacer";let g=null;switch(u){case 1:d="diff-review-row line-insert",p=" char-insert",g=qI;break;case 2:d="diff-review-row line-delete",p=" char-delete",g=JI;break}const b=t.originalLineStart,v=t.originalLineEnd,y=t.modifiedLineStart,w=t.modifiedLineEnd,_=Math.max(w-y,v-b),C=r.get(129),A=C.glyphMarginWidth+C.lineNumbersWidth,E=l.get(129),x=10+E.glyphMarginWidth+E.lineNumbersWidth;for(let S=0;S<=_;S++){const t=0===b?0:b+S,v=0===y?0:y+S,w=document.createElement("div");w.style.minWidth=o+"px",w.className=d,w.setAttribute("role","listitem"),0!==v&&(n=v),w.setAttribute("data-line",String(n));let _=document.createElement("div");_.className="diff-review-cell",_.style.height=i+"px",w.appendChild(_);const C=document.createElement("span");C.style.width=A+"px",C.style.minWidth=A+"px",C.className="diff-review-line-number"+p,0!==t?C.appendChild(document.createTextNode(String(t))):C.innerText=" ",_.appendChild(C);const E=document.createElement("span");E.style.width=x+"px",E.style.minWidth=x+"px",E.style.paddingRight="10px",E.className="diff-review-line-number"+p,0!==v?E.appendChild(document.createTextNode(String(v))):E.innerText=" ",_.appendChild(E);const k=document.createElement("span");if(k.className=f,g){const e=document.createElement("span");e.className=Sm.asClassName(g),e.innerText="  ",k.appendChild(e)}else k.innerText="  ";let D;if(_.appendChild(k),0!==v){let e=this._renderLine(c,l,h.tabSize,v);XI._ttPolicy&&(e=XI._ttPolicy.createHTML(e)),_.insertAdjacentHTML("beforeend",e),D=c.getLineContent(v)}else{let e=this._renderLine(s,r,a.tabSize,t);XI._ttPolicy&&(e=XI._ttPolicy.createHTML(e)),_.insertAdjacentHTML("beforeend",e),D=s.getLineContent(t)}0===D.length&&(D=m("blankLine","blank"));let L="";switch(u){case 0:L=t===v?m({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",D,t):m("equalLine","{0} original line {1} modified line {2}",D,t,v);break;case 1:L=m("insertLine","+ {0} modified line {1}",D,v);break;case 2:L=m("deleteLine","- {0} original line {1}",D,t);break}w.setAttribute("aria-label",L),e.appendChild(w)}}static _renderLine(e,t,n,i){const o=e.getLineContent(i),r=t.get(43),s=gd.createEmpty(o),a=Qd.isBasicASCII(o,e.mightContainNonBasicASCII()),l=Qd.containsRTL(o,a,e.mightContainRTL()),c=Ld(new Ad(r.isMonospace&&!t.get(29),r.canUseHalfwidthRightwardsArrow,o,!1,a,l,0,s,[],n,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(104),t.get(87),t.get(82),t.get(44)!==J.OFF,null));return c.html}}XI._ttPolicy=null===(HI=window.trustedTypes)||void 0===HI?void 0:HI.createPolicy("diffReview",{createHTML:e=>e}),Mm((e,t)=>{const n=e.getColor(FC);n&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${n}; }`);const i=e.getColor(jw);i&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${i} 0 -6px 6px -6px inset; }`)});class ZI extends Gm{constructor(){super({id:"editor.action.diffReview.next",label:m("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Pf.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const n=tN(e);n&&n.diffReviewNext()}}class eN extends Gm{constructor(){super({id:"editor.action.diffReview.prev",label:m("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Pf.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const n=tN(e);n&&n.diffReviewPrev()}}function tN(e){const t=e.get(xi),n=t.listDiffEditors(),i=t.getActiveCodeEditor();if(!i)return null;for(let o=0,r=n.length;o<r;o++){const e=n[o];if(e.getModifiedEditor().getId()===i.getId()||e.getOriginalEditor().getId()===i.getId())return e}return null}qm(ZI),qm(eN);const nN=Ai("contextViewService"),iN=Ai("contextMenuService");var oN=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class rN extends st{constructor(e,t,n,i,o,r){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=n,this.diff=i,this._contextMenuService=o,this._clipboardService=r,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=Jl.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const s=n.getOption(58),a=n.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=s+"px",this._diffActions.style.lineHeight=s+"px",this._marginDomNode.appendChild(this._diffActions);const l=[];l.push(new ym("diff.clipboard.copyDeletedContent",i.originalEndLineNumber>i.modifiedStartLineNumber?m("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):m("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,()=>oN(this,void 0,void 0,(function*(){const e=new Mn(i.originalStartLineNumber,1,i.originalEndLineNumber+1,1),t=i.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)}))));let c=0,h=void 0;i.originalEndLineNumber>i.modifiedStartLineNumber&&(h=new ym("diff.clipboard.copyDeletedLineContent",m("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",i.originalStartLineNumber),void 0,!0,()=>oN(this,void 0,void 0,(function*(){const e=i.originalModel.getLineContent(i.originalStartLineNumber+c);yield this._clipboardService.writeText(e)}))),l.push(h));const u=n.getOption(80);u||l.push(new ym("diff.inline.revertChange",m("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>oN(this,void 0,void 0,(function*(){const e=new Mn(i.originalStartLineNumber,1,i.originalEndLineNumber,i.originalModel.getLineMaxColumn(i.originalEndLineNumber)),t=i.originalModel.getValueInRange(e);if(0===i.modifiedEndLineNumber){const e=n.getModel().getLineMaxColumn(i.modifiedStartLineNumber);n.executeEdits("diffEditor",[{range:new Mn(i.modifiedStartLineNumber,e,i.modifiedStartLineNumber,e),text:a+t}])}else{const e=n.getModel().getLineMaxColumn(i.modifiedEndLineNumber);n.executeEdits("diffEditor",[{range:new Mn(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber,e),text:t}])}}))));const d=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(h&&(h.label=m("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",i.originalStartLineNumber+c)),l),autoSelectFirstItem:!0})};this._register(ko(this._diffActions,"mousedown",e=>{const{top:t,height:n}=Ho(this._diffActions);let i=Math.floor(s/3);e.preventDefault(),d(e.posx,t+n+i)})),this._register(n.onMouseMove(e=>{if(8===e.target.type||5===e.target.type){const t=e.target.detail.viewZoneId;t===this._viewZoneId?(this.visibility=!0,c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s)):this.visibility=!1}else this.visibility=!1})),this._register(n.onMouseDown(e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){const t=e.target.detail.viewZoneId;t===this._viewZoneId&&(e.event.preventDefault(),c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s),d(e.event.posx,e.event.posy+s))}}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,n){const{top:i}=Ho(e),o=t-i,r=Math.floor(o/n),s=r*n;if(this._diffActions.style.top=s+"px",this.diff.viewLineCounts){let e=0;for(let t=0;t<this.diff.viewLineCounts.length;t++)if(e+=this.diff.viewLineCounts[t],r<e)return t}return r}}const sN=Ai("clipboardService");class aN{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}aN.None=Object.freeze({report(){}});const lN=Ai("editorProgressService");var cN,hN=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},uN=function(e,t){return function(n,i){t(n,i,e)}};class dN{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(e=>!this._zonesMap[String(e.id)])}clean(e){this._zones.length>0&&e.changeViewZones(e=>{for(const t of this._zones)e.removeZone(t)}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,n,i){const o=i?kI.capture(e):null;e.changeViewZones(t=>{for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let i=0,o=n.zones.length;i<o;i++){const o=n.zones[i];o.suppressMouseDown=!0;const r=t.addZone(o);this._zones.push(r),this._zonesMap[String(r)]=!0,n.zones[i].diff&&o.marginDomNode&&(o.suppressMouseDown=!1,this._inlineDiffMargins.push(new rN(r,o.marginDomNode,e,n.zones[i].diff,this._contextMenuService,this._clipboardService)))}}),o&&o.restore(e),this._decorations=e.deltaDecorations(this._decorations,n.decorations),t&&t.setZones(n.overviewZones)}}let pN=0;const fN=FI("diff-insert",Jl.add,m("diffInsertIcon","Line decoration for inserts in the diff editor.")),gN=FI("diff-remove",Jl.remove,m("diffRemoveIcon","Line decoration for removals in the diff editor.")),mN=null===(cN=window.trustedTypes)||void 0===cN?void 0:cN.createPolicy("diffEditorWidget",{createHTML:e=>e});let bN=class e extends st{constructor(t,n,i,o,r,s,a,l,c,h,u,d){super(),this._editorProgressService=d,this._onDidDispose=this._register(new bt),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new bt),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new bt),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=r,this._codeEditorService=l,this._contextKeyService=this._register(s.createScoped(t)),this._instantiationService=a.createChild(new SL([og,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=h,this._id=++pN,this._state=0,this._updatingDiffProgress=null,this._domElement=t,n=n||{},this._options=MN(n,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),"undefined"!==typeof n.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",n.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new uo(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=mb(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(ko(this._overviewDomElement,"mousedown",e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new dN(u,o),this._modifiedEditorState=new dN(u,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new hb(this._containerDomElement,n.dimension,()=>this._onDidContainerSizeChanged())),n.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(n,i.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(n,i.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new XI(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new AN(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new xN(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange(t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const p=$m.getDiffEditorContributions();for(const e of p)try{this._register(a.createInstance(e.ctor,this))}catch(f){Oe(f)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=Dm(e.type),n}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,n){const i=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),n);this._register(i.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(e=>{i.getModel()&&(e.hasChanged(43)&&this._updateDecorationsRunner.schedule(),e.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const o=this._contextKeyService.createKey("isInDiffLeftEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>o.set(!0))),this._register(i.onDidBlurEditorWidget(()=>o.set(!1))),this._register(i.onDidContentSizeChange(t=>{const n=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,i=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:n,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),i}_createRightHandSideEditor(t,n){const i=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),n);this._register(i.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(e=>{i.getModel()&&(e.hasChanged(43)&&this._updateDecorationsRunner.schedule(),e.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(i.onDidChangeModelOptions(e=>{e.tabSize&&this._updateDecorationsRunner.schedule()}));const o=this._contextKeyService.createKey("isInDiffRightEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>o.set(!0))),this._register(i.onDidBlurEditorWidget(()=>o.set(!1))),this._register(i.onDidContentSizeChange(t=>{const n=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,i=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:n,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),i}_createInnerEditor(e,t,n,i){return e.createInstance($L,t,n,i)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Ya.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){const n=MN(t,this._options),i=BN(this._options,n);this._options=n;const o=i.ignoreTrimWhitespace||i.renderIndicators,r=this._isVisible&&(i.maxComputationTime||i.maxFileSize);o?this._beginUpdateDecorations():r&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),i.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new AN(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new xN(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),i.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,n=0){this._modifiedEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._modifiedEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._modifiedEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,i=!0){this._modifiedEditor.revealRange(e,t,n,i)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const e=this._originalEditor.saveViewState(),t=this._modifiedEditor.saveViewState();return{original:e,modified:t}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,n){this._modifiedEditor.trigger(e,t,n)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),i=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH,o=this._modifiedEditor.getLayoutInfo();o&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:i+e.ONE_OVERVIEW_WIDTH,height:t-n}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-n}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),n=this._modifiedEditor.getModel();if(!t||!n)return;this._diffComputationToken++;const i=this._diffComputationToken,o=1024*this._options.maxFileSize*1024,r=e=>{const t=e.getValueLength();return 0===o||t<=o};r(t)&&r(n)?(this._setState(1),this._editorWorkerService.computeDiff(t.uri,n.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(e=>{i===this._diffComputationToken&&t===this._originalEditor.getModel()&&n===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},e=>{i===this._diffComputationToken&&t===this._originalEditor.getModel()&&n===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(n.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=n.uri,this._notificationService.warn(m("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),i=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,n);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,i.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,i.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.wordWrapOverride1=this._options.diffWordWrap,n.revealHorizontalRightPadding=Me.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},n),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),n=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=n-i+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:n-i}),this._modifiedEditor.layout({width:t-o-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:n-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(n-i,t,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),n=this._modifiedEditor.getScrollHeight(),i=Math.max(0,e.height),o=Math.max(0,i-0),r=n>0?o/n:0,s=Math.max(0,Math.floor(e.height*r)),a=Math.floor(t*r);return{height:s,top:a}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e<t(n[0]))return null;let i=0,o=n.length-1;while(i<o){const r=Math.floor((i+o)/2),s=t(n[r]),a=r+1<=o?t(n[r+1]):1073741824;e<s?o=r-1:e>=a?i=r+1:(i=r,o=r)}return n[i]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.originalStartLineNumber);if(!t)return e;const n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.modifiedStartLineNumber);if(!t)return e;const n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};bN.ONE_OVERVIEW_WIDTH=15,bN.ENTIRE_DIFF_OVERVIEW_WIDTH=30,bN.UPDATE_DIFF_DECORATIONS_DELAY=200,bN=hN([uN(3,sN),uN(4,jc),uN(5,og),uN(6,_i),uN(7,xi),uN(8,Em),uN(9,Sg),uN(10,iN),uN(11,lN)],bN);class vN extends st{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(x_)||A_).transparent(2),n=(e.getColor(S_)||E_).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i}getEditorsDiffDecorations(e,t,n,i,o){o=o.sort((e,t)=>e.afterLineNumber-t.afterLineNumber),i=i.sort((e,t)=>e.afterLineNumber-t.afterLineNumber);const r=this._getViewZones(e,i,o,n),s=this._getOriginalEditorDecorations(e,t,n),a=this._getModifiedEditorDecorations(e,t,n);return{original:{decorations:s.decorations,overviewZones:s.overviewZones,zones:r.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.modified}}}}class yN{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class wN{constructor(e,t,n,i,o){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=n,this._originalEditor=i,this._modifiedEditor=o}static _getViewLineCount(e,t,n){const i=e.getModel(),o=e._getViewModel();if(i&&o){const e=NN(i,o,t,n);return e.endLineNumber-e.startLineNumber+1}return n-t+1}getViewZones(){const e=this._originalEditor.getOption(58),t=this._modifiedEditor.getOption(58),n=-1!==this._originalEditor.getOption(130).wrappingColumn,i=-1!==this._modifiedEditor.getOption(130).wrappingColumn,o=n||i,r=this._originalEditor.getModel(),s=this._originalEditor._getViewModel().coordinatesConverter,a=this._modifiedEditor._getViewModel().coordinatesConverter,l={original:[],modified:[]};let c=0,h=0,u=0,d=0,p=0,f=0;const g=(e,t)=>e.afterLineNumber-t.afterLineNumber,m=(e,t)=>{if(null===t.domNode&&e.length>0){const n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},b=new yN(this._modifiedForeignVZ),v=new yN(this._originalForeignVZ);let y=1,w=1;for(let _=0,C=this._lineChanges.length;_<=C;_++){const n=_<C?this._lineChanges[_]:null;null!==n?(u=n.originalStartLineNumber+(n.originalEndLineNumber>0?-1:0),d=n.modifiedStartLineNumber+(n.modifiedEndLineNumber>0?-1:0),h=n.originalEndLineNumber>0?wN._getViewLineCount(this._originalEditor,n.originalStartLineNumber,n.originalEndLineNumber):0,c=n.modifiedEndLineNumber>0?wN._getViewLineCount(this._modifiedEditor,n.modifiedStartLineNumber,n.modifiedEndLineNumber):0,p=Math.max(n.originalStartLineNumber,n.originalEndLineNumber),f=Math.max(n.modifiedStartLineNumber,n.modifiedEndLineNumber)):(u+=1e7+h,d+=1e7+c,p=u,f=d);let i=[],A=[];if(o){let e;e=n?n.originalEndLineNumber>0?n.originalStartLineNumber-y:n.modifiedStartLineNumber-w:r.getLineCount()-y;for(let t=0;t<e;t++){const e=y+t,n=w+t,o=s.getModelLineViewLineCount(e),r=a.getModelLineViewLineCount(n);o<r?i.push({afterLineNumber:e,heightInLines:r-o,domNode:null,marginDomNode:null}):o>r&&A.push({afterLineNumber:n,heightInLines:o-r,domNode:null,marginDomNode:null})}n&&(y=(n.originalEndLineNumber>0?n.originalEndLineNumber:n.originalStartLineNumber)+1,w=(n.modifiedEndLineNumber>0?n.modifiedEndLineNumber:n.modifiedStartLineNumber)+1)}while(b.current&&b.current.afterLineNumber<=f){let e;e=b.current.afterLineNumber<=d?u-d+b.current.afterLineNumber:p;let o=null;n&&n.modifiedStartLineNumber<=b.current.afterLineNumber&&b.current.afterLineNumber<=n.modifiedEndLineNumber&&(o=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),i.push({afterLineNumber:e,heightInLines:b.current.height/t,domNode:null,marginDomNode:o}),b.advance()}while(v.current&&v.current.afterLineNumber<=p){let t;t=v.current.afterLineNumber<=u?d-u+v.current.afterLineNumber:f,A.push({afterLineNumber:t,heightInLines:v.current.height/e,domNode:null}),v.advance()}if(null!==n&&DN(n)){const e=this._produceOriginalFromDiff(n,h,c);e&&i.push(e)}if(null!==n&&LN(n)){const e=this._produceModifiedFromDiff(n,h,c);e&&A.push(e)}let E=0,x=0;i=i.sort(g),A=A.sort(g);while(E<i.length&&x<A.length){const e=i[E],t=A[x],n=e.afterLineNumber-u,o=t.afterLineNumber-d;n<o?(m(l.original,e),E++):o<n?(m(l.modified,t),x++):e.shouldNotShrink?(m(l.original,e),E++):t.shouldNotShrink?(m(l.modified,t),x++):e.heightInLines>=t.heightInLines?(e.heightInLines-=t.heightInLines,x++):(t.heightInLines-=e.heightInLines,E++)}while(E<i.length)m(l.original,i[E]),E++;while(x<A.length)m(l.modified,A[x]),x++}return{original:wN._ensureDomNodes(l.original),modified:wN._ensureDomNodes(l.modified)}}static _ensureDomNodes(e){return e.map(e=>(e.domNode||(e.domNode=IN()),e))}}function _N(e,t,n,i,o){return{range:new Mn(e,t,n,i),options:o}}const CN={charDelete:LE.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:LE.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:LE.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:LE.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:LE.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:LE.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Sm.asClassName(fN),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:LE.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:LE.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Sm.asClassName(gN),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:LE.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class AN extends vN{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new wI(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(e=>this._onSashDrag(e)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth(),n=t-(this._dataSource.getOptions().renderOverviewRuler?bN.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*n);const o=Math.floor(.5*n);return i=this._disableSash?o:i||o,n>2*AN.MINIMUM_EDITOR_WIDTH?(i<AN.MINIMUM_EDITOR_WIDTH&&(i=AN.MINIMUM_EDITOR_WIDTH),i>n-AN.MINIMUM_EDITOR_WIDTH&&(i=n-AN.MINIMUM_EDITOR_WIDTH)):i=o,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth(),n=t-(this._dataSource.getOptions().renderOverviewRuler?bN.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/n);this._sashRatio=i/n,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,n){const i=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor(),r=new EN(e,t,n,i,o);return r.getViewZones()}_getOriginalEditorDecorations(e,t,n){const i=this._dataSource.getOriginalEditor(),o=String(this._removeColor),r={decorations:[],overviewZones:[]},s=i.getModel(),a=i._getViewModel();for(const l of e)if(LN(l)){r.decorations.push({range:new Mn(l.originalStartLineNumber,1,l.originalEndLineNumber,1073741824),options:n?CN.lineDeleteWithSign:CN.lineDelete}),DN(l)&&l.charChanges||r.decorations.push(_N(l.originalStartLineNumber,1,l.originalEndLineNumber,1073741824,CN.charDeleteWholeLine));const e=NN(s,a,l.originalStartLineNumber,l.originalEndLineNumber);if(r.overviewZones.push(new Zk(e.startLineNumber,e.endLineNumber,o)),l.charChanges)for(const n of l.charChanges)if(LN(n))if(t)for(let e=n.originalStartLineNumber;e<=n.originalEndLineNumber;e++){let t,i;t=e===n.originalStartLineNumber?n.originalStartColumn:s.getLineFirstNonWhitespaceColumn(e),i=e===n.originalEndLineNumber?n.originalEndColumn:s.getLineLastNonWhitespaceColumn(e),r.decorations.push(_N(e,t,e,i,CN.charDelete))}else r.decorations.push(_N(n.originalStartLineNumber,n.originalStartColumn,n.originalEndLineNumber,n.originalEndColumn,CN.charDelete))}return r}_getModifiedEditorDecorations(e,t,n){const i=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=i.getModel(),a=i._getViewModel();for(const l of e)if(DN(l)){r.decorations.push({range:new Mn(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824),options:n?CN.lineInsertWithSign:CN.lineInsert}),LN(l)&&l.charChanges||r.decorations.push(_N(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824,CN.charInsertWholeLine));const e=NN(s,a,l.modifiedStartLineNumber,l.modifiedEndLineNumber);if(r.overviewZones.push(new Zk(e.startLineNumber,e.endLineNumber,o)),l.charChanges)for(const n of l.charChanges)if(DN(n))if(t)for(let e=n.modifiedStartLineNumber;e<=n.modifiedEndLineNumber;e++){let t,i;t=e===n.modifiedStartLineNumber?n.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(e),i=e===n.modifiedEndLineNumber?n.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(e),r.decorations.push(_N(e,t,e,i,CN.charInsert))}else r.decorations.push(_N(n.modifiedStartLineNumber,n.modifiedStartColumn,n.modifiedEndLineNumber,n.modifiedEndColumn,CN.charInsert))}return r}}AN.MINIMUM_EDITOR_WIDTH=100;class EN extends wN{constructor(e,t,n,i,o){super(e,t,n,i,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null}_produceModifiedFromDiff(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null}}class xN extends vN{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,n,i){const o=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor(),s=new SN(e,t,n,o,r,i);return s.getViewZones()}_getOriginalEditorDecorations(e,t,n){const i=String(this._removeColor),o={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),s=r.getModel(),a=r._getViewModel();for(const l of e)if(LN(l)){o.decorations.push({range:new Mn(l.originalStartLineNumber,1,l.originalEndLineNumber,1073741824),options:CN.lineDeleteMargin});const e=NN(s,a,l.originalStartLineNumber,l.originalEndLineNumber);o.overviewZones.push(new Zk(e.startLineNumber,e.endLineNumber,i))}return o}_getModifiedEditorDecorations(e,t,n){const i=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=i.getModel(),a=i._getViewModel();for(const l of e)if(DN(l)){r.decorations.push({range:new Mn(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824),options:n?CN.lineInsertWithSign:CN.lineInsert});const e=NN(s,a,l.modifiedStartLineNumber,l.modifiedEndLineNumber);if(r.overviewZones.push(new Zk(e.startLineNumber,e.endLineNumber,o)),l.charChanges){for(const n of l.charChanges)if(DN(n))if(t)for(let e=n.modifiedStartLineNumber;e<=n.modifiedEndLineNumber;e++){let t,i;t=e===n.modifiedStartLineNumber?n.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(e),i=e===n.modifiedEndLineNumber?n.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(e),r.decorations.push(_N(e,t,e,i,CN.charInsert))}else r.decorations.push(_N(n.modifiedStartLineNumber,n.modifiedStartColumn,n.modifiedEndLineNumber,n.modifiedEndColumn,CN.charInsert))}else r.decorations.push(_N(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824,CN.charInsertWholeLine))}return r}layout(){return Math.max(5,this._decorationsLeft)}}class SN extends wN{constructor(e,t,n,i,o,r){super(e,t,n,i,o),this._originalModel=i.getModel(),this._renderIndicators=r,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,n){const i=document.createElement("div");return i.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n,domNode:document.createElement("div"),marginDomNode:i}}_produceModifiedFromDiff(e,t,n){const i=document.createElement("div");i.className="view-lines line-delete "+Bx;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const r={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:i,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let s=e.originalStartLineNumber;s<=e.originalEndLineNumber;s++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(s),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(r),r}_finalize(e){const t=this._modifiedEditor.getOptions(),n=this._modifiedEditor.getModel().getOptions().tabSize,i=t.get(43),o=t.get(29),r=i.typicalHalfwidthCharacterWidth,s=t.get(92),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),c=t.get(58),h=t.get(129),u=h.decorationsWidth,d=t.get(104),p=t.get(87),f=t.get(82),g=t.get(44),m=this._lineBreaksComputer.finalize();let b=0;for(let v=0;v<this._pendingLineChange.length;v++){const t=this._pendingLineChange[v],h=this._pendingViewZones[v],y=h.domNode;fb.applyFontInfoSlow(y,i);const w=h.marginDomNode;fb.applyFontInfoSlow(w,i);const _=[];if(t.charChanges)for(const e of t.charChanges)LN(e)&&_.push(new Wd(new Mn(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),"char-delete",0));const C=_.length>0,A=fh(1e4);let E=0,x=0,S=null;for(let r=t.originalStartLineNumber;r<=t.originalEndLineNumber;r++){const s=r-t.originalStartLineNumber,v=this._originalModel.getLineTokens(r),y=v.getLineContent(),k=m[b++],D=bd.filter(_,r,1,y.length+1);if(k){let t=0;for(const e of k.breakOffsets){const r=v.sliceAndInflate(t,e,0),s=y.substring(t,e);E=Math.max(E,this._renderOriginalLine(x++,s,r,bd.extractWrapped(D,t,e),C,a,l,i,o,c,u,d,p,f,g,n,A,w)),t=e}S||(S=[]);while(S.length<s)S[S.length]=1;S[s]=k.breakOffsets.length,h.heightInLines+=k.breakOffsets.length-1;const m=document.createElement("div");m.className="line-delete",e.original.push({afterLineNumber:r,afterColumn:0,heightInLines:k.breakOffsets.length-1,domNode:IN(),marginDomNode:m})}else E=Math.max(E,this._renderOriginalLine(x++,y,v,D,C,a,l,i,o,c,u,d,p,f,g,n,A,w))}E+=s;const k=A.build(),D=mN?mN.createHTML(k):k;if(y.innerHTML=D,h.minWidthInPx=E*r,S){const e=t.originalEndLineNumber-t.originalStartLineNumber;while(S.length<=e)S[S.length]=1}h.diff.viewLineCounts=S}e.original.sort((e,t)=>e.afterLineNumber-t.afterLineNumber)}_renderOriginalLine(e,t,n,i,o,r,s,a,l,c,h,u,d,p,f,g,m,b){m.appendASCIIString('<div class="view-line'),o||m.appendASCIIString(" char-delete"),m.appendASCIIString('" style="top:'),m.appendASCIIString(String(e*c)),m.appendASCIIString('px;width:1000000px;">');const v=Qd.isBasicASCII(t,r),y=Qd.containsRTL(t,v,s),w=kd(new Ad(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,y,0,n,i,g,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,u,d,p,f!==J.OFF,null),m);if(m.appendASCIIString("</div>"),this._renderIndicators){const t=document.createElement("div");t.className="delete-sign "+Sm.asClassName(gN),t.setAttribute("style",`position:absolute;top:${e*c}px;width:${h}px;height:${c}px;right:0;`),b.appendChild(t)}return w.characterMapping.getAbsoluteOffset(w.characterMapping.length)}}function kN(e,t){return F(e,t,["off","on","inherit"])}function DN(e){return e.modifiedEndLineNumber>0}function LN(e){return e.originalEndLineNumber>0}function IN(){const e=document.createElement("div");return e.className="diagonal-fill",e}function NN(e,t,n,i){const o=e.getLineCount();return n=Math.min(o,Math.max(1,n)),i=Math.min(o,Math.max(1,i)),t.coordinatesConverter.convertModelRangeToViewRange(new Mn(n,e.getLineMinColumn(n),i,e.getLineMaxColumn(i)))}function MN(e,t){return{enableSplitViewResizing:M(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:M(e.renderSideBySide,t.renderSideBySide),maxComputationTime:T(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:T(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:M(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:M(e.renderIndicators,t.renderIndicators),originalEditable:M(e.originalEditable,t.originalEditable),diffCodeLens:M(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:M(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:kN(e.diffWordWrap,t.diffWordWrap)}}function BN(e,t){return{enableSplitViewResizing:e.enableSplitViewResizing!==t.enableSplitViewResizing,renderSideBySide:e.renderSideBySide!==t.renderSideBySide,maxComputationTime:e.maxComputationTime!==t.maxComputationTime,maxFileSize:e.maxFileSize!==t.maxFileSize,ignoreTrimWhitespace:e.ignoreTrimWhitespace!==t.ignoreTrimWhitespace,renderIndicators:e.renderIndicators!==t.renderIndicators,originalEditable:e.originalEditable!==t.originalEditable,diffCodeLens:e.diffCodeLens!==t.diffCodeLens,renderOverviewRuler:e.renderOverviewRuler!==t.renderOverviewRuler,diffWordWrap:e.diffWordWrap!==t.diffWordWrap}}Mm((e,t)=>{const n=e.getColor(x_);n&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${n}; }`));const i=e.getColor(S_);i&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${i}; }`));const o=e.getColor(k_);o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const r=e.getColor(D_);r&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const s=e.getColor(jw);s&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${s}; }`);const a=e.getColor(L_);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(zw);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const c=e.getColor(Vw);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const h=e.getColor(Qw);h&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${h};\n\t\t\t}\n\t\t`);const u=e.getColor(I_);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${u} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${u} 50%, ${u} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)});const TN=Ai("themeService"),ON=Ai("keybindingService");class RN extends st{constructor(){super(),this._onCodeEditorAdd=this._register(new bt),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new bt),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new bt),this._onDiffEditorRemove=this._register(new bt),this._onDecorationTypeRegistered=this._register(new bt),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}setModelProperty(e,t,n){const i=e.toString();let o;this._modelProperties.has(i)?o=this._modelProperties.get(i):(o=new Map,this._modelProperties.set(i,o)),o.set(t,n)}getModelProperty(e,t){const n=e.toString();if(this._modelProperties.has(n)){const e=this._modelProperties.get(n);return e.get(t)}}}var PN=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},FN=function(e,t){return function(n,i){t(n,i,e)}};class jN{constructor(e,t,n){this._parent=e,this._editorId=t,this._styleSheet=n,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){const n=this._styleSheet.sheet;n.insertRule(e,t)}removeRulesContainingSelector(e){lr(e,this._styleSheet)}}class zN{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){const n=this._styleSheet.sheet;n.insertRule(e,t)}removeRulesContainingSelector(e){lr(e,this._styleSheet)}}let VN=class extends RN{constructor(e,t){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new zN(ir())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!er(t))return this._getOrCreateGlobalStyleSheet();const n=e.getId();if(!this._editorStyleSheets.has(n)){const e=new jN(this,n,ir(t));this._editorStyleSheets.set(n,e)}return this._editorStyleSheets.get(n)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,n,i,o){let r=this._decorationOptionProviders.get(t);if(!r){const s=this._getOrCreateStyleSheet(o),a={styleSheet:s,key:t,parentTypeKey:i,options:n||Object.create(null)};r=i?new QN(this._themeService,s,a):new WN(e,this._themeService,s,a),this._decorationOptionProviders.set(t,r),this._onDecorationTypeRegistered.fire(t)}r.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(t=>t.removeDecorations(e))))}resolveDecorationOptions(e,t){const n=this._decorationOptionProviders.get(e);if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)}};VN=PN([FN(1,Em)],VN);class QN{constructor(e,t,n){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=n.parentTypeKey,this.refCount=0,this._beforeContentRules=new UN(3,n,e),this._afterContentRules=new UN(4,n,e)}getOptions(e,t){const n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class WN{constructor(e,t,n,i){this._disposables=new rt,this.description=e,this._styleSheet=n,this._styleSheet.ref(),this.refCount=0;const o=e=>{const n=new UN(e,i,t);if(this._disposables.add(n),n.hasContent)return n.className},r=e=>{const n=new UN(e,i,t);return this._disposables.add(n),n.hasContent?{className:n.className,hasLetterSpacing:n.hasLetterSpacing}:null};this.className=o(0);const s=r(1);if(s&&(this.inlineClassName=s.className,this.inlineClassNameAffectsLetterSpacing=s.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),i.options.beforeInjectedText&&i.options.beforeInjectedText.contentText){const e=r(5);this.beforeInjectedText={content:i.options.beforeInjectedText.contentText,inlineClassName:null===e||void 0===e?void 0:e.className,inlineClassNameAffectsLetterSpacing:(null===e||void 0===e?void 0:e.hasLetterSpacing)||i.options.beforeInjectedText.affectsLetterSpacing}}if(i.options.afterInjectedText&&i.options.afterInjectedText.contentText){const e=r(6);this.afterInjectedText={content:i.options.afterInjectedText.contentText,inlineClassName:null===e||void 0===e?void 0:e.className,inlineClassNameAffectsLetterSpacing:(null===e||void 0===e?void 0:e.hasLetterSpacing)||i.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=o(2);const a=i.options;this.isWholeLine=Boolean(a.isWholeLine),this.stickiness=a.rangeBehavior;const l=a.light&&a.light.overviewRulerColor||a.overviewRulerColor,c=a.dark&&a.dark.overviewRulerColor||a.overviewRulerColor;"undefined"===typeof l&&"undefined"===typeof c||(this.overviewRuler={color:l||c,darkColor:c||l,position:a.overviewRulerLane||Ga.Center})}getOptions(e,t){return t?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const HN={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class UN{constructor(e,t,n){this._theme=n.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let i=YN.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(i=i+" "+YN.getClassName(this._providerArgs.parentTypeKey,e)),this._className=i,this._unThemedSelector=YN.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=n.onDidColorThemeChange(e=>{this._theme=n.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,n,i;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),n=this.getCSSTextForModelDecorationClassName(e.light),i=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),n=this.getCSSTextForModelDecorationInlineClassName(e.light),i=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;case 5:t=this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.beforeInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.beforeInjectedText);break;case 6:t=this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.afterInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const o=this._providerArgs.styleSheet;let r=!1;t.length>0&&(o.insertRule(`${this._unThemedSelector} {${t}}`,0),r=!0),n.length>0&&(o.insertRule(`.vs${this._unThemedSelector} {${n}}`,0),r=!0),i.length>0&&(o.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${i}}`,0),r=!0),this._hasContent=r}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if("undefined"!==typeof e){if(this.collectBorderSettingsCSSText(e,t),"undefined"!==typeof e.contentIconPath&&t.push(Tr(HN.contentIconPath,Dr(wn.revive(e.contentIconPath)))),"string"===typeof e.contentText){const n=e.contentText.match(/^.*$/m)[0],i=n.replace(/['\\]/g,"\\$&");t.push(Tr(HN.contentText,i))}this.collectCSSText(e,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return"undefined"!==typeof e.gutterIconPath&&(t.push(Tr(HN.gutterIconPath,Dr(wn.revive(e.gutterIconPath)))),"undefined"!==typeof e.gutterIconSize&&t.push(Tr(HN.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(Tr("box-sizing: border-box;")),!0)}collectCSSText(e,t,n){const i=n.length;for(let o of t){const t=this.resolveValue(e[o]);"string"===typeof t&&n.push(Tr(HN[o],t))}return n.length!==i}resolveValue(e){if(Ua(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class YN{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,n){let i=".monaco-editor ."+this.getClassName(e,n);return t&&(i=i+"."+this.getClassName(t,n)),3===n?i+="::before":4===n&&(i+="::after"),i}}var GN=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},KN=function(e,t){return function(n,i){t(n,i,e)}};let qN=class extends VN{constructor(e,t,n){super(e,n),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(e,t,n){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){const n=this.findModel(e,t.resource);if(!n){if(t.resource){const n=t.resource.scheme;if(n===mo.http||n===mo.https)return Sr(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"===typeof i.endLineNumber&&"number"===typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};qN=GN([KN(1,og),KN(2,Em)],qN);var JN=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},$N=function(e,t){return function(n,i){t(n,i,e)}};let XN=0,ZN=!1;function eM(e){if(!e){if(ZN)return;ZN=!0}dm(e||document.body)}let tM=class extends $L{constructor(e,t,n,i,o,r,s,a,l,c){const h=Object.assign({},t);h.ariaLabel=h.ariaLabel||Rg.editorViewAccessibleLabel,h.ariaLabel=h.ariaLabel+";"+Rg.accessibilityHelpMessage,super(e,h,{},n,i,o,r,a,l,c),this._standaloneKeybindingService=s instanceof qg?s:null,eM(h.ariaContainerElement)}addCommand(e,t,n){if(!this._standaloneKeybindingService)return null;let i="DYNAMIC_"+ ++XN,o=Pf.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return st.None;const t=e.id,n=e.label,i=Pf.and(Pf.equals("editorId",this.getId()),Pf.deserialize(e.precondition)),o=e.keybindings,r=Pf.and(i,Pf.deserialize(e.keybindingContext)),s=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...n)=>Promise.resolve(e.run(this,...n)),c=new rt,h=this.getId()+":"+t;if(c.add(ya.registerCommand(h,l)),s){let e={command:{id:h,title:n},when:i,group:s,order:a};c.add(jm.appendMenuItem(Pm.EditorContext,e))}if(Array.isArray(o))for(const d of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(h,d,l,r));let u=new ZD(h,n,n,i,l,this._contextKeyService);return this._actions[t]=u,c.add(ot(()=>{delete this._actions[t]})),c}_triggerCommand(e,t){if(this._codeEditorService instanceof qN)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};tM=JN([$N(2,_i),$N(3,xi),$N(4,va),$N(5,og),$N(6,ON),$N(7,Em),$N(8,Sg),$N(9,kL)],tM);let nM=class extends tM{constructor(e,t,n,i,o,r,s,a,l,c,h,u,d,p,f){const g=Object.assign({},t);nm(u,g,!1);const m=c.registerEditorContainer(e);"string"===typeof g.theme&&c.setTheme(g.theme),"undefined"!==typeof g.autoDetectHighContrast&&c.setAutoDetectHighContrast(Boolean(g.autoDetectHighContrast));let b,v=g.model;if(delete g.model,super(e,g,i,o,r,s,a,c,h,d),this._contextViewService=l,this._configurationService=u,this._standaloneThemeService=c,this._register(n),this._register(m),"undefined"===typeof v?(b=oM(p,f,g.value||"",g.language||hx.text,void 0),this._ownsModel=!0):(b=v,this._ownsModel=!1),this._attachModel(b),b){let e={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){nm(this._configurationService,e,!1),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};nM=JN([$N(3,_i),$N(4,xi),$N(5,va),$N(6,og),$N(7,ON),$N(8,nN),$N(9,TN),$N(10,Sg),$N(11,yf),$N(12,kL),$N(13,zl),$N(14,zc)],nM);let iM=class extends bN{constructor(e,t,n,i,o,r,s,a,l,c,h,u,d,p,f){const g=Object.assign({},t);nm(u,g,!0);const m=c.registerEditorContainer(e);"string"===typeof g.theme&&c.setTheme(g.theme),"undefined"!==typeof g.autoDetectHighContrast&&c.setAutoDetectHighContrast(Boolean(g.autoDetectHighContrast)),super(e,g,{},f,a,o,i,l,c,h,d,p),this._contextViewService=s,this._configurationService=u,this._standaloneThemeService=c,this._register(n),this._register(m),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){nm(this._configurationService,e,!0),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(tM,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function oM(e,t,n,i,o){if(n=n||"",!i){const i=n.indexOf("\n");let r=n;return-1!==i&&(r=n.substring(0,i)),rM(e,n,t.createByFilepathOrFirstLine(o||null,r),o)}return rM(e,n,t.create(i),o)}function rM(e,t,n,i){return e.createModel(t,n,i)}iM=JN([$N(3,_i),$N(4,og),$N(5,ON),$N(6,nN),$N(7,jc),$N(8,xi),$N(9,TN),$N(10,Sg),$N(11,yf),$N(12,iN),$N(13,lN),$N(14,sN)],iM);const sM={ModesRegistry:"editor.modesRegistry"};class aM{constructor(){this._onDidChangeLanguages=new bt,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t<n;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}const lM=new aM;Np.add(sM.ModesRegistry,lM);const cM="plaintext",hM=".txt",uM=new Xl(cM,1);lM.registerLanguage({id:cM,extensions:[hM],aliases:[m("plainText.alias","Plain Text"),"text"],mimetypes:[hx.text]}),Wh.register(uM,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0);const dM=Object.prototype.hasOwnProperty;class pM extends st{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new bt),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(lM.onDidChangeLanguages(e=>this._initializeFromRegistry())))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=lM.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach(e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier}),t.mimetypes.forEach(e=>{this._mimeTypesMap[e]=t.identifier})}),Np.as(Rp.Configuration).registerOverrideIdentifiers(lM.getLanguages().map(e=>e.id)),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let n;if(dM.call(this._languages,t))n=this._languages[t];else{const e=this._getLanguageId(t);n={identifier:new Xl(t,e),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=n}this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i="text/x-"+n,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)fx({id:n,mime:i,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)fx({id:n,mime:i,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)fx({id:n,mime:i,filepattern:a},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);Vr(t)||fx({id:n,mime:i,firstline:t},this._warnOnOverwrite)}catch(s){Oe(s)}}e.aliases.push(n);let o=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const a of o)a&&0!==a.length&&e.aliases.push(a);let r=null!==o&&o.length>0;if(r&&null===o[0]);else{let t=(r?o[0]:null)||n;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!dM.call(this._mimeTypesMap,e)||dM.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return dM.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map(e=>e.trim()).map(e=>dM.call(this._mimeTypesMap,e)?this._mimeTypesMap[e].language:e).filter(e=>dM.call(this._languages,e)):[]}getLanguageIdentifier(e){if(e===Tc||0===e)return Oc;let t;if("string"===typeof e)t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return dM.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let n=mx(e,t);return this.extractModeIds(n.join(","))}}class fM{constructor(e,t){let n;this._selector=t,this.languageIdentifier=this._selector(),this._onDidChange=new bt({onFirstListenerAdd:()=>{n=e(()=>this._evaluate())},onLastListenerRemove:()=>{n.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class gM extends st{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new bt),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onLanguagesMaybeChanged=this._register(new bt({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._encounteredLanguages=new Set,this._registry=this._register(new pM(!0,e)),this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const n=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return ju(n,null)}getModeId(e){const t=this._registry.extractModeIds(e);return ju(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new fM(this.onLanguagesMaybeChanged,()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)})}createByFilepathOrFirstLine(e,t){return new fM(this.onLanguagesMaybeChanged,()=>{const n=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(n)})}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||Oc;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._encounteredLanguages.has(e)){this._encounteredLanguages.add(e);const t=this.getLanguageIdentifier(e)||Oc;this._onDidEncounterLanguage.fire(t)}}}const mM=Ai("undoRedoService");class bM{constructor(e,t){this.resource=e,this.elements=t}}class vM{constructor(){this.id=vM._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}vM._ID=0,vM.None=new vM;class yM{constructor(){this.id=yM._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}yM._ID=0,yM.None=new yM;class wM{constructor(e,t,n){this._legend=e,this._themeService=t,this._logService=n,this._hashTable=new AM,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,n){const i=this._hashTable.get(e,t,n.id);let o;if(i)o=i.metadata,this._logService.getLevel()===qu.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Zl.getForeground(o)}, fontStyle ${Zl.getFontStyle(o).toString(2)}`);else{let i=this._legend.tokenTypes[e];const r=[];if(i){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&r.push(this._legend.tokenModifiers[t]),e>>=1;e>0&&this._logService.getLevel()===qu.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const s=this._themeService.getColorTheme().getTokenStyleMetadata(i,r,n.language);if("undefined"===typeof s)o=2147483647;else{if(o=0,"undefined"!==typeof s.italic){const e=(s.italic?1:0)<<11;o|=1|e}if("undefined"!==typeof s.bold){const e=(s.bold?2:0)<<11;o|=2|e}if("undefined"!==typeof s.underline){const e=(s.underline?4:0)<<11;o|=4|e}if(s.foreground){const e=s.foreground<<14;o|=8|e}0===o&&(o=2147483647)}}else this._logService.getLevel()===qu.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,i="not-in-legend";this._hashTable.add(e,t,n.id,o),this._logService.getLevel()===qu.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${i}) / ${t} (${r.join(" ")}): foreground ${Zl.getForeground(o)}, fontStyle ${Zl.getFontStyle(o).toString(2)}`)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0)}}function _M(e,t,n){const i=e.data,o=e.data.length/5|0,r=Math.max(Math.ceil(o/1024),400),s=[];let a=0,l=1,c=0;while(a<o){const e=a;let h=Math.min(e+r,o);if(h<o){let t=h;while(t-1>e&&0===i[5*t])t--;if(t-1===e){let e=h;while(e+1<o&&0===i[5*e])e++;h=e}else h=t}let u=new Uint32Array(4*(h-e)),d=0,p=0,f=0,g=0,m=0;while(a<h){const e=5*a,o=i[e],r=i[e+1],s=l+o,h=0===o?c+r:r,b=i[e+2],v=i[e+3],y=i[e+4],w=t.getMetadata(v,y,n);2147483647!==w&&(0===p&&(p=s),f===s&&m>h&&(t.warnOverlappingSemanticTokens(s,h+1),g<h?u[d-4+2]=h:d-=4),u[d]=s-p,u[d+1]=h,u[d+2]=h+b,u[d+3]=w,d+=4,f=s,g=h,m=h+b),l=s,c=h,a++}d!==u.length&&(u=u.subarray(0,d));const b=new Oy(p,new By(u));s.push(b)}return s}class CM{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class AM{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=AM._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<AM._SIZES.length?2/3*this._currentLength:0),this._elements=[],AM._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let n=0;n<t;n++)e[n]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,n){return this._hash2(this._hash2(e,t),n)%this._currentLength}get(e,t,n){const i=this._hashFunc(e,t,n);let o=this._elements[i];while(o){if(o.tokenTypeIndex===e&&o.tokenModifierSet===t&&o.languageId===n)return o;o=o.next}return null}add(e,t,n,i){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=AM._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<AM._SIZES.length?2/3*this._currentLength:0),this._elements=[],AM._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;while(e){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new CM(e,t,n,i))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}function EM(e){for(let t=0,n=e.length;t<n;t+=4){const n=e[t+0],i=e[t+1],o=e[t+2],r=e[t+3];e[t+0]=r,e[t+1]=o,e[t+2]=i,e[t+3]=n}}function xM(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return b["e"]()||EM(t),Us["a"].wrap(t)}function SM(e){const t=new Uint32Array(kM(e));let n=0;if(t[n++]=e.id,"full"===e.type)t[n++]=1,t[n++]=e.data.length,t.set(e.data,n),n+=e.data.length;else{t[n++]=2,t[n++]=e.deltas.length;for(const i of e.deltas)t[n++]=i.start,t[n++]=i.deleteCount,i.data?(t[n++]=i.data.length,t.set(i.data,n),n+=i.data.length):t[n++]=0}return xM(t)}function kM(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const n of e.deltas)n.data&&(t+=n.data.length)}return t}AM._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];var DM=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function LM(e){return e&&!!e.data}function IM(e){return e&&Array.isArray(e.edits)}function NM(e,t,n){const i=MM(e);return i?{provider:i,request:Promise.resolve(i.provideDocumentSemanticTokens(e,t,n))}:null}function MM(e){const t=Lc.ordered(e);return t.length>0?t[0]:null}function BM(e){const t=Ic.ordered(e);return t.length>0?t[0]:null}ya.registerCommand("_provideDocumentSemanticTokensLegend",(e,...t)=>DM(void 0,void 0,void 0,(function*(){const[n]=t;ca(n instanceof wn);const i=e.get(zl).getModel(n);if(!i)return;const o=MM(i);return o?o.getLegend():e.get(va).executeCommand("_provideDocumentRangeSemanticTokensLegend",n)}))),ya.registerCommand("_provideDocumentSemanticTokens",(e,...t)=>DM(void 0,void 0,void 0,(function*(){const[n]=t;ca(n instanceof wn);const i=e.get(zl).getModel(n);if(!i)return;const o=NM(i,null,At.None);if(!o)return e.get(va).executeCommand("_provideDocumentRangeSemanticTokens",n,i.getFullModelRange());const{provider:r,request:s}=o;let a;try{a=yield s}catch(c){return void Re(c)}if(!a||!LM(a))return;const l=SM({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l}))),ya.registerCommand("_provideDocumentRangeSemanticTokensLegend",(e,...t)=>DM(void 0,void 0,void 0,(function*(){const[n]=t;ca(n instanceof wn);const i=e.get(zl).getModel(n);if(!i)return;const o=BM(i);return o?o.getLegend():void 0}))),ya.registerCommand("_provideDocumentRangeSemanticTokens",(e,...t)=>DM(void 0,void 0,void 0,(function*(){const[n,i]=t;ca(n instanceof wn),ca(Mn.isIRange(i));const o=e.get(zl).getModel(n);if(!o)return;const r=BM(o);if(!r)return;let s;try{s=yield r.provideDocumentRangeSemanticTokens(o,Mn.lift(i),At.None)}catch(a){return void Re(a)}return s&&LM(s)?SM({id:0,type:"full",data:s.data}):void 0})));var TM=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},OM=function(e,t){return function(n,i){t(n,i,e)}};function RM(e){return e.toString()}function PM(e){const t=new al,n=e.createSnapshot();let i;while(i=n.read())t.update(i);return t.digest()}class FM{constructor(e,t,n){this._modelEventListeners=new rt,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>n(e,t)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageIdentifier)),this.model.setMode(e.languageIdentifier)}}const jM=b["d"]||b["f"]?1:2;class zM{constructor(e,t,n,i,o,r,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=o,this.sha1=r,this.versionId=s,this.alternativeVersionId=a}}let VM=class e extends st{constructor(e,t,n,i,o){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=n,this._logService=i,this._undoRedoService=o,this._onModelAdded=this._register(new bt),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new bt),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new bt),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new UM(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new HM(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){var n;let i=Le.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let o=i;if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=t),o<1&&(o=1)}let r=Le.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=jM;const a=e.eol;"\r\n"===a?s=2:"\n"===a&&(s=1);let l=Le.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=Le.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let h=Le.largeFileOptimizations;e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(h="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let u=Le.bracketPairColorizationOptions;return(null===(n=e.editor)||void 0===n?void 0:n.bracketPairColorization)&&"object"===typeof e.editor.bracketPairColorization&&(u={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:i,indentSize:o,insertSpaces:r,detectIndentation:c,defaultEOL:s,trimAutoWhitespace:l,largeFileOptimizations:h,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"string"===typeof n&&"auto"!==n?n:3===b["a"]||2===b["a"]?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(t,n,i){let o=this._modelCreationOptionsByLanguageAndResource[t+n];if(!o){const r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:n}),s=this._getEOL(n,t);o=e._readModelOptions({editor:r,eol:s},i),this._modelCreationOptionsByLanguageAndResource[t+n]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,o=n.length;i<o;i++){const o=n[i],r=this._models[o],s=r.model.getLanguageIdentifier().language,a=r.model.uri,l=t[s+a],c=this.getCreationOptions(s,a,r.model.isForSimpleWidget);e._setModelOptionsForModel(r.model,c,l)}}static _setModelOptionsForModel(e,t,n){n&&n.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),n&&n.detectIndentation===t.detectIndentation&&n.insertSpaces===t.insertSpaces&&n.tabSize===t.tabSize&&n.indentSize===t.indentSize&&n.trimAutoWhitespace===t.trimAutoWhitespace&&Oa(n.bracketPairColorizationOptions,t.bracketPairColorizationOptions)||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(RM(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(RM(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(RM(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];this._disposedModels.forEach(e=>{e.sharesUndoRedoStack||t.push(e)}),t.sort((e,t)=>e.time-t.time);while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const o=this.getCreationOptions(t.language,n,i),r=new vE(e,o,t,n,this._undoRedoService);if(n&&this._disposedModels.has(RM(n))){const e=this._removeDisposedModel(n),t=this._undoRedoService.getElements(n),i=PM(r)===e.sha1;if(i||e.sharesUndoRedoStack){for(const e of t.past)lv(e)&&e.matchesResource(n)&&e.setModel(r);for(const e of t.future)lv(e)&&e.matchesResource(n)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(n,!0,e=>lv(e)&&e.matchesResource(n)),i&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=RM(r.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const a=new FM(r,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[s]=a,a}createModel(e,t,n,i=!1){let o;return t?(o=this._createModelData(e,t.languageIdentifier,n,i),this.setMode(o.model,t)):o=this._createModelData(e,uM,n,i),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const n=this._models[RM(e.uri)];n&&n.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push(this._models[i].model)}return e}getModel(e){const t=RM(e),n=this._models[t];return n?n.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===mo.file||e.scheme===mo.vscodeRemote||e.scheme===mo.userData||e.scheme===mo.vscodeNotebookCell||"fake-fs"===e.scheme}_onWillDispose(t){const n=RM(t.uri),i=this._models[n],o=this._undoRedoService.getUriComparisonKey(t.uri)!==t.uri.toString();let r=!1,s=0;if(o||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(t.uri)){const e=this._undoRedoService.getElements(t.uri);if(e.past.length>0||e.future.length>0){for(const n of e.past)lv(n)&&n.matchesResource(t.uri)&&(r=!0,s+=n.heapSize(t.uri),n.setModel(t.uri));for(const n of e.future)lv(n)&&n.matchesResource(t.uri)&&(r=!0,s+=n.heapSize(t.uri),n.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r)if(!o&&s>a){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,e=>lv(e)&&e.matchesResource(t.uri)),this._insertDisposedModel(new zM(t.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,PM(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[n],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageIdentifier().language+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,n){const i=n.oldLanguage,o=t.getLanguageIdentifier().language,r=this.getCreationOptions(i,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldModeId:i})}};VM.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,VM=TM([OM(0,yf),OM(1,ku),OM(2,Em),OM(3,Ku),OM(4,mM)],VM);const QM="editor.semanticHighlighting";function WM(e,t,n){var i;const o=null===(i=n.getValue(QM,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri}))||void 0===i?void 0:i.enabled;return"boolean"===typeof o?o:t.getColorTheme().semanticHighlighting}class HM extends st{constructor(e,t,n,i){super(),this._watchers=Object.create(null),this._semanticStyling=i;const o=e=>{this._watchers[e.uri.toString()]=new GM(e,t,this._semanticStyling)},r=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},s=()=>{for(let i of e.getModels()){const e=this._watchers[i.uri.toString()];WM(i,t,n)?e||o(i):e&&r(i,e)}};this._register(e.onModelAdded(e=>{WM(e,t,n)&&o(e)})),this._register(e.onModelRemoved(e=>{const t=this._watchers[e.uri.toString()];t&&r(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(QM)&&s()})),this._register(t.onDidColorThemeChange(s))}}class UM extends st{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new wM(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class YM{constructor(e,t,n){this._provider=e,this.resultId=t,this.data=n}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class GM extends st{constructor(e,t,n){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=n,this._fetchDocumentSemanticTokens=this._register(new uo(()=>this._fetchDocumentSemanticTokensNow(),GM.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const i=()=>{nt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of Lc.all(e))"function"===typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};i(),this._register(Lc.onDidChange(()=>{i(),this._fetchDocumentSemanticTokens.schedule()})),this._register(t.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=new xt,t=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=NM(this._model,t,e.token);if(!n)return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const{provider:i,request:o}=n;this._currentDocumentRequestCancellationTokenSource=e;const r=[],s=this._model.onDidChangeContent(e=>{r.push(e)}),a=this._semanticStyling.get(i);o.then(e=>{this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),this._setDocumentSemanticTokens(i,e||null,a,r)},e=>{const t=e&&(je(e)||"string"===typeof e.message&&-1!==e.message.indexOf("busy"));t||Oe(e),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),r.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _copy(e,t,n,i,o){for(let r=0;r<o;r++)n[i+r]=e[t+r]}_setDocumentSemanticTokens(e,t,n,i){const o=this._currentDocumentResponse,r=()=>{i.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&n){if(!t)return this._model.setSemanticTokens(null,!0),void r();if(IM(t)){if(!o)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const o of t.edits)e+=(o.data?o.data.length:0)-o.deleteCount;const n=o.data,i=new Uint32Array(n.length+e);let r=n.length,s=i.length;for(let o=t.edits.length-1;o>=0;o--){const e=t.edits[o],a=r-(e.start+e.deleteCount);a>0&&(GM._copy(n,r-a,i,s-a,a),s-=a),e.data&&(GM._copy(e.data,0,i,s-e.data.length,e.data.length),s-=e.data.length),r=e.start}r>0&&GM._copy(n,0,i,0,r),t={resultId:t.resultId,data:i}}}if(LM(t)){this._currentDocumentResponse=new YM(e,t.resultId,t.data);const o=_M(t,n,this._model.getLanguageIdentifier());if(i.length>0)for(const e of i)for(const t of o)for(const n of e.changes)t.applyEdit(n.range,n.text);this._model.setSemanticTokens(o,!0)}else this._model.setSemanticTokens(null,!0);r()}else this._model.setSemanticTokens(null,!1)}}GM.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300;class KM{constructor(e,t,n,i,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}}function qM(e){if(!e||!Array.isArray(e))return[];let t=[],n=0;for(let i=0,o=e.length;i<o;i++){let o=e[i],r=-1;if("string"===typeof o.fontStyle){r=0;let e=o.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++){let n=e[t];switch(n){case"italic":r|=1;break;case"bold":r|=2;break;case"underline":r|=4;break}}}let s=null;"string"===typeof o.foreground&&(s=o.foreground);let a=null;"string"===typeof o.background&&(a=o.background),t[n++]=new KM(o.token||"",i,r,s,a)}return t}function JM(e,t){e.sort((e,t)=>{let n=nB(e.token,t.token);return 0!==n?n:e.index-t.index});let n=0,i="000000",o="ffffff";while(e.length>=1&&""===e[0].token){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(i=t.foreground),null!==t.background&&(o=t.background)}let r=new XM;for(let h of t)r.getId(h);let s=r.getId(i),a=r.getId(o),l=new iB(n,s,a),c=new oB(l);for(let h=0,u=e.length;h<u;h++){let t=e[h];c.insert(t.token,t.fontStyle,r.getId(t.foreground),r.getId(t.background))}return new ZM(r,c)}const $M=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class XM{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match($M);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=sw.fromHex("#"+e),n)}getColorMap(){return this._id2color.slice(0)}}class ZM{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(qM(e),t)}static createFromParsedTokenTheme(e,t){return JM(e,t)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let n=this._cache.get(t);if("undefined"===typeof n){let e=this._match(t),i=tB(t);n=(e.metadata|i<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}}const eB=/\b(comment|string|regex|regexp)\b/;function tB(e){let t=e.match(eB);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function nB(e,t){return e<t?-1:e>t?1:0}class iB{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new iB(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class oB{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;let t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));let o=this._children.get(t);return"undefined"!==typeof o?o.match(n):this._mainRule}insert(e,t,n,i){if(""===e)return void this._mainRule.acceptOverwrite(t,n,i);let o,r,s=e.indexOf(".");-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);"undefined"===typeof a&&(a=new oB(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,n,i)}}function rB(e){let t=[];for(let n=1,i=e.length;n<i;n++){let i=e[n];t[n]=`.mtk${n} { color: ${i}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.join("\n")}const sB={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[t_]:"#FFFFFE",[n_]:"#000000",[b_]:"#E5EBF1",[RC]:"#D3D3D3",[PC]:"#939393",[v_]:"#ADD6FF4D"}},aB={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[t_]:"#1E1E1E",[n_]:"#D4D4D4",[b_]:"#3A3D41",[RC]:"#404040",[PC]:"#707070",[v_]:"#ADD6FF26"}},lB={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[t_]:"#000000",[n_]:"#FFFFFF",[RC]:"#FFFFFF",[PC]:"#FFFFFF"}};function cB(){const e=new bt,t=jI();return t.onDidChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const e={},n=n=>{let i=n.defaults;while(Sm.isThemeIcon(i)){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}const o=i.fontId;if(o){const r=t.getIconFont(o);if(r)return e[o]=r,`.codicon-${n.id}:before { content: '${i.fontCharacter}'; font-family: ${Lr(o)}; }`}return`.codicon-${n.id}:before { content: '${i.fontCharacter}'; }`},i=[];for(let o of t.getIcons()){const e=n(o);e&&i.push(e)}for(let t in e){const n=e[t],o=n.definition.src.map(e=>`${Dr(e.location)} format('${e.format}')`).join(", ");i.push(`@font-face { src: ${o}; font-family: ${Lr(t)}; font-display: block; }`)}return i.join("\n")}}}const hB="vs",uB="vs-dark",dB="hc-black",pB=Np.as(uw.ColorContribution),fB=Np.as(Lm.ThemingContribution);class gB{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let n=t.base;e.length>0?(mB(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,sw.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=bB(this.themeData.base);for(let n in t.colors)e.has(n)||e.set(n,sw.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){const n=this.getColors().get(e);return n||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=pB.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case hB:return bm.LIGHT;case dB:return bm.HIGH_CONTRAST;default:return bm.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let n=bB(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=ZM.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){const i=this.tokenTheme._match([e].concat(t).join(".")),o=i.metadata,r=Zl.getForeground(o),s=Zl.getFontStyle(o);return{foreground:r,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s)}}}function mB(e){return e===hB||e===uB||e===dB}function bB(e){switch(e){case hB:return sB;case uB:return aB;case dB:return lB}}function vB(e){let t=bB(e);return new gB(e,t)}class yB extends st{constructor(){super(),this._onColorThemeChange=this._register(new bt),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(hB,vB(hB)),this._knownThemes.set(uB,vB(uB)),this._knownThemes.set(dB,vB(dB));const e=cB();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(hB),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),Nr("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(e){return er(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=ir(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),st.None}_registerShadowDomContainer(e){const t=ir(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!mB(t.base)&&!mB(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new gB(e,t)),mB(e)&&this._knownThemes.forEach(t=>{t.base===e&&t.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(hB),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(dB):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},n={addRule:n=>{t[n]||(e.push(n),t[n]=!0)}};fB.getThemingParticipants().forEach(e=>e(this._theme,n,this._environment));const i=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(rB(i)),this._themeCSS=e.join("\n"),this._updateCSS(),Nc.setColorMap(i),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var wB=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},_B=function(e,t){return function(n,i){t(n,i,e)}};const CB="data-keybinding-context";class AB{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value["_contextId"]=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return"undefined"===typeof t&&this._parent?this._parent.getValue(e):t}}class EB extends AB{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}EB.INSTANCE=new EB;class xB extends AB{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=Vs.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(e=>{if(6===e.source){const e=Array.from(Ue.map(this._values,([e])=>e));this._values.clear(),n.fire(new DB(e))}else{const t=[];for(const n of e.affectedKeys){const e="config."+n,i=this._values.findSuperstr(e);void 0!==i&&(t.push(...Ue.map(i,([e])=>e)),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}n.fire(new DB(t))}})}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(xB._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(xB._keyPrefix.length),n=this._configurationService.getValue(t);let i=void 0;switch(typeof n){case"number":case"boolean":case"string":i=n;break;default:i=Array.isArray(n)?JSON.stringify(n):n}return this._values.set(e,i),i}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}xB._keyPrefix="config.";class SB{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){"undefined"===typeof this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class kB{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class DB{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class LB{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class IB{constructor(e){this._onDidChangeContext=new vt({merge:e=>new LB(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new SB(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new MB(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId),n=hg.contextMatchesRules(t,e);return n}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new kB(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new kB(e))}getContext(e){return this._isDisposed?EB.INSTANCE:this.getContextValuesContainer(BB(e))}}let NB=class extends IB{constructor(e){super(0),this._contexts=new Map,this._toDispose=new rt,this._lastContextId=0;const t=new xB(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?EB.INSTANCE:this._contexts.get(e)||EB.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new AB(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};NB=wB([_B(0,yf)],NB);class MB extends IB{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new at,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(CB)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", "))}this._domNode.setAttribute(CB,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(CB),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?EB.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function BB(e){while(e){if(e.hasAttribute(CB)){const t=e.getAttribute(CB);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}ya.registerCommand(rg,(function(e,t,n){e.get(og).createKey(String(t),n)})),ya.registerCommand({id:"getContextKeyInfo",handler(){return[...ig.all()].sort((e,t)=>e.key.localeCompare(t.key))},description:{description:m("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),ya.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let n of ig.all())t.has(n.key)||(t.add(n.key),e.push(n));e.sort((e,t)=>e.key.localeCompare(t.key))}));var TB;n("c3b4"),n("6d8f");function OB(e){let t=e.definition;while(t instanceof Jl)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}(function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function n(e){return e.end-e.start<=0}function i(e,i){return!n(t(e,i))}function o(e,t){const i=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return n(o)||i.push(o),n(r)||i.push(r),i}e.intersect=t,e.isEmpty=n,e.intersects=i,e.relativeComplement=o})(TB||(TB={}));var RB;n("f743");function PB(e,t,n){const i=n.mode===RB.ALIGN?n.offset:n.offset+n.size,o=n.mode===RB.ALIGN?n.offset+n.size:n.offset;return 0===n.position?t<=e-i?i:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-i?i:0}(function(e){e[e["AVOID"]=0]="AVOID",e[e["ALIGN"]=1]="ALIGN"})(RB||(RB={}));class FB extends st{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=st.None,this.toDisposeOnSetContainer=st.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=_r(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Ar(this.view),this.setContainer(e,t),this._register(ot(()=>this.setContainer(null,1)))}setContainer(e,t){var n;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(n=this.shadowRootHostElement)||void 0===n||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=_r(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=jB,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(_r("slot"))}else this.container.appendChild(this.view);const n=new rt;FB.BUBBLE_UP_EVENTS.forEach(e=>{n.add(ko(this.container,e,e=>{this.onDOMEvent(e,!1)}))}),FB.BUBBLE_DOWN_EVENTS.forEach(e=>{n.add(ko(this.container,e,e=>{this.onDOMEvent(e,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),_o(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Cr(this.view),this.toDisposeOnClean=e.render(this.view)||st.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||b["c"]&&zi.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(cr(t)){let n=Ho(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const n=Yo(this.view),i=qo(this.view),o=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0,s=this.delegate.anchorAxisAlignment||0;let a,l;if(0===s){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1},s={offset:e.left,size:e.width,position:0===r?0:1,mode:RB.ALIGN};a=PB(window.innerHeight,i,t)+window.pageYOffset,TB.intersects({start:a,end:a+i},{start:t.offset,end:t.offset+t.size})&&(s.mode=RB.AVOID),l=PB(window.innerWidth,n,s)}else{const t={offset:e.left,size:e.width,position:0===r?0:1},s={offset:e.top,size:e.height,position:0===o?0:1,mode:RB.ALIGN};l=PB(window.innerWidth,n,t),TB.intersects({start:l,end:l+n},{start:t.offset,end:t.offset+t.size})&&(s.mode=RB.AVOID),a=PB(window.innerHeight,i,s)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===r?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const c=Ho(this.container);this.view.style.top=a-(this.useFixedPosition?Ho(this.view).top:c.top)+"px",this.view.style.left=l-(this.useFixedPosition?Ho(this.view).left:c.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null===t||void 0===t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),Ar(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Jo(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}FB.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],FB.BUBBLE_DOWN_EVENTS=["click"];let jB='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tfont-display: block;\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';function zB(...e){return function(t,n){for(let i=0,o=e.length;i<o;i++){const o=e[i](t,n);if(o)return o}return null}}const VB=QB.bind(void 0,!0);function QB(e,t,n){if(!n||n.length<t.length)return null;let i;return i=e?ns(n,t):0===n.indexOf(t),i?t.length>0?[{start:0,end:t.length}]:[]:null}function WB(e,t){const n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function HB(e,t){return UB(e.toLowerCase(),t.toLowerCase(),0,0)}function UB(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]===t[i]){let o=null;return(o=UB(e,t,n+1,i+1))?XB({start:i,end:i+1},o):null}return UB(e,t,n,i+1)}function YB(e){return 97<=e&&e<=122}function GB(e){return 65<=e&&e<=90}function KB(e){return 48<=e&&e<=57}function qB(e){return 32===e||9===e||10===e||13===e}const JB=new Set;function $B(e){return YB(e)||GB(e)||KB(e)}function XB(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function ZB(e,t){for(let n=t;n<e.length;n++){const t=e.charCodeAt(n);if(GB(t)||KB(t)||n>0&&!$B(e.charCodeAt(n-1)))return n}return e.length}function eT(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;{let o=null,r=i+1;o=eT(e,t,n+1,i+1);while(!o&&(r=ZB(t,r))<t.length)o=eT(e,t,n+1,r),r++;return null===o?null:XB({start:i,end:i+1},o)}}function tT(e){let t=0,n=0,i=0,o=0,r=0;for(let h=0;h<e.length;h++)r=e.charCodeAt(h),GB(r)&&t++,YB(r)&&n++,$B(r)&&i++,KB(r)&&o++;const s=t/e.length,a=n/e.length,l=i/e.length,c=o/e.length;return{upperPercent:s,lowerPercent:a,alphaPercent:l,numericPercent:c}}function nT(e){const{upperPercent:t,lowerPercent:n}=e;return 0===n&&t>.6}function iT(e){const{upperPercent:t,lowerPercent:n,alphaPercent:i,numericPercent:o}=e;return n>.2&&t<.8&&i>.6&&o<.2}function oT(e){let t=0,n=0,i=0,o=0;for(let r=0;r<e.length;r++)i=e.charCodeAt(r),GB(i)&&t++,YB(i)&&n++,qB(i)&&o++;return 0!==t&&0!==n||0!==o?t<=5:e.length<=30}function rT(e,t){if(!t)return null;if(t=t.trim(),0===t.length)return null;if(!oT(e))return null;if(t.length>60)return null;const n=tT(t);if(!iT(n)){if(!nT(n))return null;t=t.toLowerCase()}let i=null,o=0;e=e.toLowerCase();while(o<t.length&&null===(i=eT(e,t,0,o)))o=ZB(t,o+1);return i}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(e=>JB.add(e.charCodeAt(0)));const sT=zB(VB,rT,WB),aT=zB(VB,rT,HB),lT=new Hs(1e4);function cT(e,t,n=!1){if("string"!==typeof e||"string"!==typeof t)return null;let i=lT.get(e);i||(i=new RegExp(jr(e),"i"),lT.set(e,i));const o=i.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:n?aT(e,t):sT(e,t)}const hT=128;function uT(){const e=[],t=[];for(let n=0;n<=hT;n++)t[n]=0;for(let n=0;n<=hT;n++)e.push(t.slice(0));return e}function dT(e){const t=[];for(let n=0;n<=e;n++)t[n]=0;return t}const pT=dT(2*hT),fT=dT(2*hT),gT=uT(),mT=uT(),bT=uT(),vT=!1;function yT(e,t,n,i){e=e.substr(t),n=n.substr(i)}function wT(e,t){if(t<0||t>=e.length)return!1;const n=e.codePointAt(t);switch(n){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!Cs(n)}}function _T(e,t){if(t<0||t>=e.length)return!1;const n=e.charCodeAt(t);switch(n){case 32:case 9:return!0;default:return!1}}function CT(e,t,n){return t[e]!==n[e]}function AT(e,t,n,i,o,r,s=!1){while(t<n&&o<r)e[t]===i[o]&&(s&&(pT[t]=o),t+=1),o+=1;return t===n}var ET;function xT(e,t,n,i,o,r,s){const a=e.length>hT?hT:e.length,l=i.length>hT?hT:i.length;if(n>=a||r>=l||a-n>l-r)return;if(!AT(t,n,a,o,r,l,!0))return;ST(a,l,n,r,t,o);let c=1,h=1,u=n,d=r;const p=[!1];for(c=1,u=n;u<a;c++,u++){const s=pT[u],f=fT[u],g=u+1<a?fT[u+1]:l;for(h=s-r+1,d=s;d<g;h++,d++){let a=Number.MIN_SAFE_INTEGER,g=!1;d<=f&&(a=kT(e,t,u,n,i,o,d,l,r,0===gT[c-1][h-1],p));let m=0;a!==Number.MAX_SAFE_INTEGER&&(g=!0,m=a+mT[c-1][h-1]);const b=d>s,v=b?mT[c][h-1]+(gT[c][h-1]>0?-5:0):0,y=d>s+1&&gT[c][h-1]>0,w=y?mT[c][h-2]+(gT[c][h-2]>0?-5:0):0;if(y&&(!b||w>=v)&&(!g||w>=m))mT[c][h]=w,bT[c][h]=3,gT[c][h]=0;else if(b&&(!g||v>=m))mT[c][h]=v,bT[c][h]=2,gT[c][h]=0;else{if(!g)throw new Error("not possible");mT[c][h]=m,bT[c][h]=1,gT[c][h]=gT[c-1][h-1]+1}}}if(vT&&yT(e,n,i,r),!p[0]&&!s)return;c--,h--;const f=[mT[c][h],r];let g=0,m=0;while(c>=1){let e=h;do{const t=bT[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);g>1&&t[n+c-1]===o[r+h-1]&&!CT(e+r-1,i,o)&&g+1>gT[c][e]&&(e=h),e===h?g++:g=1,m||(m=e),c--,h=e-1,f.push(h)}l===a&&(f[0]+=2);const b=m-a;return f[0]-=b,f}function ST(e,t,n,i,o,r){let s=e-1,a=t-1;while(s>=n&&a>=i)o[s]===r[a]&&(fT[s]=a,s--),a--}function kT(e,t,n,i,o,r,s,a,l,c,h){if(t[n]!==r[s])return Number.MIN_SAFE_INTEGER;let u=1,d=!1;return s===n-i?u=e[n]===o[s]?7:5:!CT(s,o,r)||0!==s&&CT(s-1,o,r)?!wT(r,s)||0!==s&&wT(r,s-1)?(wT(r,s-1)||_T(r,s-1))&&(u=5,d=!0):u=5:(u=e[n]===o[s]?7:5,d=!0),u>1&&n===i&&(h[0]=!0),d||(d=CT(s,o,r)||wT(r,s-1)||_T(r,s-1)),n===i?s>l&&(u-=d?3:5):u+=c?d?2:0:d?0:1,s+1===a&&(u-=d?3:5),u}(function(e){function t(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}e.Default=[-100,0],e.isDefault=t})(ET||(ET={}));const DT="$(",LT=new RegExp(`\\$\\(${$l.iconNameExpression}(?:${$l.iconModifierExpression})?\\)`,"g"),IT=new RegExp("(\\\\)?"+LT.source,"g");function NT(e){return e.replace(IT,(e,t)=>t?e:"\\"+e)}new RegExp("\\\\"+LT.source,"g");const MT=new RegExp(`(\\s)?(\\\\)?${LT.source}(\\s)?`,"g");function BT(e){return-1===e.indexOf(DT)?e:e.replace(MT,(e,t,n,i)=>n?e:t||i||"")}function TT(e){const t=e.indexOf(DT);return-1===t?{text:e}:OT(e,t)}function OT(e,t){const n=[];let i="";function o(e){if(e){i+=e;for(const t of e)n.push(c)}}let r,s,a=-1,l="",c=0,h=t;const u=e.length;o(e.substr(0,t));while(h<u){if(r=e[h],s=e[h+1],r===DT[0]&&s===DT[1])a=h,o(l),l=DT,h++;else if(")"===r&&-1!==a){const e=h-a+1;c+=e,a=-1,l=""}else-1!==a?/^[a-z0-9\-]$/i.test(r)?l+=r:(o(l),a=-1,l=""):o(r);h++}return o(l),{text:i,iconOffsets:n}}function RT(e,t,n=!1){const{text:i,iconOffsets:o}=t;if(!o||0===o.length)return cT(e,i,n);const r=Pr(i," "),s=i.length-r.length,a=cT(e,r,n);if(a)for(const l of a){const e=o[l.start+s]+s;l.start+=e,l.end+=e}return a}const PT=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,FT=/(&amp;)?(&amp;)([^\s&])/g,jT=Kl("menu-selection",Jl.check),zT=Kl("menu-submenu",Jl.chevronRight);var VT;(function(e){e[e["Right"]=0]="Right",e[e["Left"]=1]="Left"})(VT||(VT={}));class QT extends TI{constructor(e,t,n={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const i=document.createElement("div");i.classList.add("monaco-menu"),i.setAttribute("role","presentation"),super(i,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,n,o),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...b["f"]||b["d"]?[10]:[]],keyDown:!0}}),this.menuElement=i,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new rt),this.initializeStyleSheet(e),this._register(wb.addTarget(i)),Eo(i,hr.KEY_DOWN,e=>{const t=new Ki(e);t.equals(2)&&e.preventDefault()}),n.enableMnemonics&&this.menuDisposables.add(Eo(i,hr.KEY_DOWN,e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){ur.stop(e,!0);const n=this.mnemonics.get(t);if(1===n.length&&(n[0]instanceof HT&&n[0].container&&this.focusItemByElement(n[0].container),n[0].onClick(e)),n.length>1){const e=n.shift();e&&e.container&&(this.focusItemByElement(e.container),n.push(e)),this.mnemonics.set(t,n)}}})),b["d"]&&this._register(Eo(i,hr.KEY_DOWN,e=>{const t=new Ki(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ur.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ur.stop(e,!0))})),this._register(Eo(this.domNode,hr.MOUSE_OUT,e=>{let t=e.relatedTarget;Jo(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())})),this._register(Eo(this.actionsList,hr.MOUSE_OVER,e=>{let t=e.target;if(t&&Jo(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})),this._register(wb.addTarget(this.actionsList)),this._register(Eo(this.actionsList,vb.Tap,e=>{let t=e.initialTarget;if(t&&Jo(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new mk(i,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this._register(Eo(i,vb.Change,e=>{ur.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})})),this._register(Eo(r,hr.MOUSE_UP,e=>{e.preventDefault()})),i.style.maxHeight=Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)+"px",t=t.filter(e=>{var t;return!(null===(t=n.submenuIds)||void 0===t?void 0:t.has(e.id))}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(e=>!(e instanceof UT)).forEach((e,t,n)=>{e.updatePositionInSet(t+1,n.length)})}initializeStyleSheet(e){er(e)?(this.styleSheet=ir(e),this.styleSheet.textContent=GT):(QT.globalStyleSheet||(QT.globalStyleSheet=ir(),QT.globalStyleSheet.textContent=GT),this.styleSheet=QT.globalStyleSheet)}style(e){const t=this.getContainer(),n=e.foregroundColor?""+e.foregroundColor:"",i=e.backgroundColor?""+e.backgroundColor:"",o=e.borderColor?"1px solid "+e.borderColor:"",r=e.shadowColor?"0 2px 4px "+e.shadowColor:"";t.style.border=o,this.domNode.style.color=n,this.domNode.style.backgroundColor=i,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach(t=>{(t instanceof WT||t instanceof UT)&&t.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t<this.actionsList.children.length;t++){let n=this.actionsList.children[t];if(e===n){this.focusedItem=t;break}}}updateFocus(e){super.updateFocus(e,!0),"undefined"!==typeof this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,n){if(e instanceof _m)return new UT(t.context,e,{icon:!0});if(e instanceof Cm){const i=new HT(e,e.actions,n,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}));if(t.enableMnemonics){const e=i.getMnemonic();if(e&&i.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(i),this.mnemonics.set(e,t)}}return i}{const n={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const i=t.getKeyBinding(e);if(i){const e=i.getLabel();e&&(n.keybinding=e)}}const i=new WT(t.context,e,n);if(t.enableMnemonics){const e=i.getMnemonic();if(e&&i.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(i),this.mnemonics.set(e,t)}}return i}}}class WT extends NI{constructor(e,t,n={}){if(n.isMenu=!0,super(t,t,n),this.options=n,this.options.icon=void 0!==n.icon&&n.icon,this.options.label=void 0===n.label||n.label,this.cssClass="",this.options.label&&n.enableMnemonics){let e=this.getAction().label;if(e){let t=PT.exec(e);t&&(this.mnemonic=(t[1]?t[1]:t[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new uo(()=>{this.element&&(this._register(Eo(this.element,hr.MOUSE_UP,e=>{if(ur.stop(e,!0),Bi){const t=new Zi(e);if(t.rightButton)return;this.onClick(e)}else setTimeout(()=>{this.onClick(e)},0)})),this._register(Eo(this.element,hr.CONTEXT_MENU,e=>{ur.stop(e,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=mr(this.element,_r("a.action-menu-item")),this._action.id===_m.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",""+this.mnemonic)),this.check=mr(this.item,_r("span.menu-item-check"+jT.cssSelector)),this.check.setAttribute("role","none"),this.label=mr(this.item,_r("span.action-label")),this.options.label&&this.options.keybinding&&(mr(this.item,_r("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",""+e),this.item.setAttribute("aria-setsize",""+t))}updateLabel(){if(this.label&&this.options.label){_o(this.label);let e=BT(this.getAction().label);if(e){const t=YT(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const n=PT.exec(e);if(n){e=Or(e),FT.lastIndex=0;let t=FT.exec(e);while(t&&t[1])t=FT.exec(e);const i=e=>e.replace(/&amp;&amp;/g,"&amp;");t?this.label.append(Pr(i(e.substr(0,t.index))," "),_r("u",{"aria-hidden":"true"},t[3]),Fr(i(e.substr(t.index+t[0].length))," ")):this.label.innerText=i(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=m({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){this.item&&(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,i=e&&this.menuStyle.selectionBorderColor?"thin solid "+this.menuStyle.selectionBorderColor:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=n?n.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=i)}style(e){this.menuStyle=e,this.applyStyle()}}class HT extends WT{constructor(e,t,n,i){super(e,e,i),this.submenuActions=t,this.parentData=n,this.submenuOptions=i,this.mysubmenu=null,this.submenuDisposables=this._register(new rt),this.mouseOver=!1,this.expandDirection=i&&void 0!==i.expandDirection?i.expandDirection:VT.Right,this.showScheduler=new uo(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new uo(()=>{this.element&&!Jo(nr(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=mr(this.item,_r("span.submenu-indicator"+zT.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Eo(this.element,hr.KEY_UP,e=>{let t=new Ki(e);(t.equals(17)||t.equals(3))&&(ur.stop(e,!0),this.createSubmenu(!0))})),this._register(Eo(this.element,hr.KEY_DOWN,e=>{let t=new Ki(e);nr()===this.item&&(t.equals(17)||t.equals(3))&&ur.stop(e,!0)})),this._register(Eo(this.element,hr.MOUSE_OVER,e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Eo(this.element,hr.MOUSE_LEAVE,e=>{this.mouseOver=!1})),this._register(Eo(this.element,hr.FOCUS_OUT,e=>{this.element&&!Jo(nr(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(e){ur.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(t){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,i){const o={top:0,left:0};return o.left=PB(e.width,t.width,{position:i===VT.Right?0:1,offset:n.left,size:n.width}),o.left>=n.left&&o.left<n.left+n.width&&(n.left+10+t.width<=e.width&&(o.left=n.left+10),n.top+=10,n.height=0),o.top=PB(e.height,t.height,{position:0,offset:n.top,size:0}),o.top+t.height===n.top&&o.top+n.height+t.height<=e.height&&(o.top+=n.height),o}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=mr(this.element,_r("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),n=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new QT(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new Am],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const i=this.element.getBoundingClientRect(),o={top:i.top-n,left:i.left,height:i.height+2*n,width:i.width},r=this.submenuContainer.getBoundingClientRect(),{top:s,left:a}=this.calculateSubmenuMenuLayout(new Qo(window.innerWidth,window.innerHeight),Qo.lift(r),o,this.expandDirection);this.submenuContainer.style.left=a-r.left+"px",this.submenuContainer.style.top=s-r.top+"px",this.submenuDisposables.add(Eo(this.submenuContainer,hr.KEY_UP,e=>{let t=new Ki(e);t.equals(15)&&(ur.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Eo(this.submenuContainer,hr.KEY_DOWN,e=>{let t=new Ki(e);t.equals(15)&&ur.stop(e,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t?""+t:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class UT extends MI{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?""+e.separatorColor:"")}}function YT(e){const t=PT,n=t.exec(e);if(!n)return e;const i=!n[1];return e.replace(t,i?"$2$3":"").trim()}let GT=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${OB(jT)}\n${OB(zT)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;n("1a7b");function KT(e,t){const n=Object.create(null);for(let i in t){const o=t[i];o&&(n[i]=AC(o,e))}return n}function qT(e,t,n){function i(){const i=KT(e.getColorTheme(),t);"function"===typeof n?n(i):n.style(i)}return i(),e.onDidColorThemeChange(i)}function JT(e,t,n){return qT(t,Object.assign(Object.assign({},$T),n||{}),e)}const $T={listFocusBackground:N_,listFocusForeground:M_,listFocusOutline:B_,listActiveSelectionBackground:T_,listActiveSelectionForeground:O_,listActiveSelectionIconForeground:R_,listFocusAndSelectionBackground:T_,listFocusAndSelectionForeground:O_,listInactiveSelectionBackground:P_,listInactiveSelectionIconForeground:j_,listInactiveSelectionForeground:F_,listInactiveFocusBackground:z_,listInactiveFocusOutline:V_,listHoverBackground:Q_,listHoverForeground:W_,listDropBackground:H_,listSelectionOutline:vw,listHoverOutline:vw,listFilterWidgetBackground:Y_,listFilterWidgetOutline:G_,listFilterWidgetNoMatchesOutline:K_,listMatchesShadow:yw,treeIndentGuidesStroke:q_,tableColumnsBorder:J_},XT={shadowColor:yw,borderColor:tC,foregroundColor:nC,backgroundColor:iC,selectionForegroundColor:oC,selectionBackgroundColor:rC,selectionBorderColor:sC,separatorColor:aC};function ZT(e,t,n){return qT(t,Object.assign(Object.assign({},XT),n),e)}class eO{constructor(e,t,n,i,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=i,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let n;this.focusToReturn=document.activeElement;let i=cr(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:i=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(i.className+=" "+o),this.options.blockMouse&&(this.block=i.appendChild(_r(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",Eo(this.block,hr.MOUSE_DOWN,e=>e.stopPropagation()));const r=new rt,s=e.actionRunner||new wm;return s.onBeforeRun(this.onActionRun,this,r),s.onDidRun(this.onDidActionRun,this,r),n=new QT(i,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),r.add(ZT(n,this.themeService)),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,r),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,r),r.add(Eo(window,hr.BLUR,()=>this.contextViewService.hideContextView(!0))),r.add(Eo(window,hr.MOUSE_DOWN,e=>{if(e.defaultPrevented)return;let t=new Zi(e),n=t.target;if(!t.rightButton){while(n){if(n===i)return;n=n.parentElement}this.contextViewService.hideContextView(!0)}})),it(r,n)},focus:()=>{n&&n.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},i,!!i)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!je(e.error)&&this.notificationService.error(e.error)}}var tO=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},nO=function(e,t){return function(n,i){t(n,i,e)}};let iO=class extends st{constructor(e,t,n,i,o){super(),this.contextMenuHandler=new eO(n,e,t,i,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),Ir.getInstance().resetKeyStatus()}};iO=tO([nO(0,Qm),nO(1,Sg),nO(2,nN),nO(3,ON),nO(4,Em)],iO);const oO=Ai("layoutService");var rO=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},sO=function(e,t){return function(n,i){t(n,i,e)}};let aO=class extends st{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=st.None,this.container=e.container,this.contextView=this._register(new FB(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,n){t?t!==this.container&&(this.container=t,this.setContainer(t,n?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const i=ot(()=>{this.currentViewDisposable===i&&this.hideContextView()});return this.currentViewDisposable=i,i}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};aO=rO([sO(0,oO)],aO);const lO=Ai("dialogService");class cO{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class hO{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing.set(this._hashFn(t),i),i.incoming.set(this._hashFn(e),n)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes.get(t);return n||(n=new cO(e),this._nodes.set(t,n)),n}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t}, (incoming)[${[...n.incoming.keys()].join(", ")}], (outgoing)[${[...n.outgoing.keys()].join(",")}]`);return e.join("\n")}findCycleSlow(){for(let[e,t]of this._nodes){const n=new Set([e]),i=this._findCycle(t,n);if(i)return i}}_findCycle(e,t){for(let[n,i]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);const e=this._findCycle(i,t);if(e)return e;t.delete(n)}}}const uO=!1;class dO extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:"UNABLE to detect cycle, dumping graph: \n"+e.toString()}}class pO{constructor(e=new SL,t=!1,n){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=n,this._services.set(_i,this)}createChild(e){return new pO(e,this._strict,this)}invokeFunction(e,...t){let n=fO.traceInvocation(e),i=!1;try{const o={get:(e,t)=>{if(i)throw Qe("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(e,n);if(!o&&t!==Ei)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}};return e(o,...t)}finally{i=!0,n.stop()}}createInstance(e,...t){let n,i;return e instanceof _I?(n=fO.traceCreation(e.ctor),i=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=fO.traceCreation(e),i=this._createInstance(e,t,n)),n.stop(),i}_createInstance(e,t=[],n){let i=wi.getServiceDependencies(e).sort((e,t)=>e.index-t.index),o=[];for(const s of i){let t=this._getOrCreateServiceInstance(s.id,n);if(!t&&this._strict&&!s.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${s.id}.`);o.push(t)}let r=i.length>0?i[0].index:t.length;if(t.length!==r){let e=r-t.length;t=e>0?t.concat(new Array(e)):t.slice(0,r)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof _I)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let n=this._getServiceInstanceOrDescriptor(e);return n instanceof _I?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){const i=new hO(e=>e.id.toString());let o=0;const r=[{id:e,desc:t,_trace:n}];while(r.length){const e=r.pop();if(i.lookupOrInsertNode(e),o++>1e3)throw new dO(i);for(let t of wi.getServiceDependencies(e.desc.ctor)){let n=this._getServiceInstanceOrDescriptor(t.id);if(!n&&t.optional,n instanceof _I){const o={id:t.id,desc:n,_trace:e._trace.branch(t.id,!0)};i.insertEdge(e,o),r.push(o)}}}while(1){const e=i.roots();if(0===e.length){if(!i.isEmpty())throw new dO(i);break}for(const{data:t}of e){const e=this._getServiceInstanceOrDescriptor(t.id);if(e instanceof _I){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}i.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],i,o){if(this._services.get(e)instanceof _I)return this._createServiceInstance(t,n,i,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,i,o);throw new Error("illegalState - creating UNKNOWN service instance "+t.name)}_createServiceInstance(e,t=[],n,i){if(n){const n=new fo(()=>this._createInstance(e,t,i));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let i=n.value,o=i[t];return"function"!==typeof o||(o=o.bind(i),e[t]=o),o},set(e,t,i){return n.value[t]=i,!0}})}return this._createInstance(e,t,i)}}class fO{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return uO?new fO(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):fO._None}static traceCreation(e){return uO?new fO(0,e.name):fO._None}branch(e,t){let n=new fO(2,e.toString());return this._dep.push([e,t,n]),n}stop(){let e=Date.now()-this._start;fO._totals+=e;let t=!1;function n(e,i){let o=[],r=new Array(e+1).join("\t");for(const[s,a,l]of i._dep)if(a&&l){t=!0,o.push(`${r}CREATES -> ${s}`);let i=n(e+1,l);i&&o.push(i)}else o.push(`${r}uses -> ${s}`);return o.join("\n")}this.type,this.name,n(1,this),e.toFixed(2),fO._totals.toFixed(2)}}fO._None=new class extends fO{constructor(){super(-1,null)}stop(){}branch(){return this}},fO._totals=0;const gO=Ai("labelService");n("dff0");class mO{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(i=>i.splice(e,t,n))}}class bO extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function vO(e,t){const n=[];for(let i of t){if(e.start>=i.range.end)continue;if(e.end<i.range.start)break;const t=TB.intersect(e,i.range);TB.isEmpty(t)||n.push({range:t,size:i.size})}return n}function yO({start:e,end:t},n){return{start:e+n,end:t+n}}function wO(e){const t=[];let n=null;for(let i of e){const e=i.range.start,o=i.range.end,r=i.size;n&&r===n.size?n.range.end=o:(n={range:{start:e,end:o},size:r},t.push(n))}return t}function _O(...e){return wO(e.reduce((e,t)=>e.concat(t),[]))}class CO{constructor(){this.groups=[],this._size=0}splice(e,t,n=[]){const i=n.length-t,o=vO({start:0,end:e},this.groups),r=vO({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(e=>({range:yO(e.range,i),size:e.size})),s=n.map((t,n)=>({range:{start:e+n,end:e+n+1},size:t.size}));this.groups=_O(o,s,r),this._size=this.groups.reduce((e,t)=>e+t.size*(t.range.end-t.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,n=0;for(let i of this.groups){const o=i.range.end-i.range.start,r=n+o*i.size;if(e<r)return t+Math.floor((e-n)/i.size);t+=o,n=r}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,n=0;for(let i of this.groups){const o=i.range.end-i.range.start,r=n+o;if(e<r)return t+(e-n)*i.size;t+=o*i.size,n=r}return-1}}function AO(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(t){}}class EO{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const n=_r(".monaco-list-row"),i=this.getRenderer(e),o=i.renderTemplate(n);t={domNode:n,templateId:e,templateData:o}}return t}release(e){e&&this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:n}=e;t&&(t.classList.remove("scrolling"),AO(t));const i=this.getTemplateCache(n);i.push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const n of e){const e=this.getRenderer(t);e.disposeTemplate(n.templateData),n.templateData=null}}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error("No renderer found for "+e);return t}}var xO=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};const SO={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class kO{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class DO{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class LO{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){const n=e.files.item(t);n&&(n.size||n.type)&&this.files.push(n)}}}getData(){return{types:this.types,files:this.files}}}function IO(e,t){return Array.isArray(e)&&Array.isArray(t)?Iu(e,t):e===t}class NO{constructor(e){(null===e||void 0===e?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,n)=>n,(null===e||void 0===e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null===e||void 0===e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null===e||void 0===e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class MO{constructor(e,t,n,i=SO){if(this.virtualDelegate=t,this.domId="list_id_"+ ++MO.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new ro(50),this.splicing=!1,this.dragOverAnimationStopDisposable=st.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=st.None,this.onDragLeaveTimeout=st.None,this.disposables=new rt,this._onDidChangeContentHeight=new bt,this._horizontalScrolling=!1,i.horizontalScrolling&&i.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new CO;for(const r of n)this.renderers.set(r.templateId,r);this.cache=this.disposables.add(new EO(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!==typeof i.mouseSupport||i.mouseSupport),this._horizontalScrolling=Ra(i,e=>e.horizontalScrolling,SO.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight="undefined"===typeof i.additionalScrollHeight?0:i.additionalScrollHeight,this.accessibilityProvider=new NO(i.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const o=Ra(i,e=>e.transformOptimization,SO.transformOptimization);o&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(wb.addTarget(this.rowsContainer)),this.scrollable=new tk(Ra(i,e=>e.smoothScrolling,!1)?125:0,e=>No(e)),this.scrollableElement=this.disposables.add(new gk(this.rowsContainer,{alwaysConsumeMouseWheel:Ra(i,e=>e.alwaysConsumeMouseWheel,SO.alwaysConsumeMouseWheel),horizontal:1,vertical:Ra(i,e=>e.verticalScrollMode,SO.verticalScrollMode),useShadows:Ra(i,e=>e.useShadows,SO.useShadows),mouseWheelScrollSensitivity:i.mouseWheelScrollSensitivity,fastScrollSensitivity:i.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(Eo(this.rowsContainer,vb.Change,e=>this.onTouchChange(e))),this.disposables.add(Eo(this.scrollableElement.getDomNode(),"scroll",e=>e.target.scrollTop=0)),this.disposables.add(Eo(this.domNode,"dragover",e=>this.onDragOver(this.toDragEvent(e)))),this.disposables.add(Eo(this.domNode,"drop",e=>this.onDrop(this.toDragEvent(e)))),this.disposables.add(Eo(this.domNode,"dragleave",e=>this.onDragLeave(this.toDragEvent(e)))),this.disposables.add(Eo(this.domNode,"dragend",e=>this.onDragEnd(e))),this.setRowLineHeight=Ra(i,e=>e.setRowLineHeight,SO.setRowLineHeight),this.setRowHeight=Ra(i,e=>e.setRowHeight,SO.setRowHeight),this.supportDynamicHeights=Ra(i,e=>e.supportDynamicHeights,SO.supportDynamicHeights),this.dnd=Ra(i,e=>e.dnd,SO.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Go(this.domNode)}),this.rowsContainer.style.width=Math.max(this.scrollWidth||0,this.renderWidth)+"px"}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.mouseWheelScrollSensitivity&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},r=TB.intersect(i,o),s=new Map;for(let _=r.start;_<r.end;_++){const e=this.items[_];if(e.dragStartDisposable.dispose(),e.row){let t=s.get(e.templateId);t||(t=[],s.set(e.templateId,t));const n=this.renderers.get(e.templateId);n&&n.disposeElement&&n.disposeElement(e.element,_,e.row.templateData,e.size),t.push(e.row)}e.row=null}const a={start:e+t,end:this.items.length},l=TB.intersect(a,i),c=TB.relativeComplement(a,i),h=n.map(e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:st.None}));let u;0===e&&t>=this.items.length?(this.rangeMap=new CO,this.rangeMap.splice(0,0,h),u=this.items,this.items=h):(this.rangeMap.splice(e,t,h),u=this.items.splice(e,t,...h));const d=n.length-t,p=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),f=yO(l,d),g=TB.intersect(p,f);for(let _=g.start;_<g.end;_++)this.updateItemInDOM(this.items[_],_);const m=TB.relativeComplement(f,p);for(const _ of m)for(let e=_.start;e<_.end;e++)this.removeItemFromDOM(e);const b=c.map(e=>yO(e,d)),v={start:e,end:e+n.length},y=[v,...b].map(e=>TB.intersect(p,e)),w=this.getNextToLastElement(y);for(const _ of y)for(let e=_.start;e<_.end;e++){const t=this.items[e],n=s.get(t.templateId),i=null===n||void 0===n?void 0:n.pop();this.insertItemInDOM(e,w,i)}for(const _ of s.values())for(const e of _)this.cache.release(e);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),u.map(e=>e.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=this._scrollHeight+"px",this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=No(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth()):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)"undefined"!==typeof t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){const e=this.scrollableElement.getScrollDimensions();return e.height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:"number"===typeof e?e:Ko(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),"undefined"!==typeof t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"===typeof t?t:Go(this.domNode)})}render(e,t,n,i,o,r=!1){const s=this.getRenderRange(t,n),a=TB.relativeComplement(s,e),l=TB.relativeComplement(e,s),c=this.getNextToLastElement(a);if(r){const t=TB.intersect(e,s);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}for(const h of a)for(let e=h.start;e<h.end;e++)this.insertItemInDOM(e,c);for(const h of l)for(let e=h.start;e<h.end;e++)this.removeItemFromDOM(e);void 0!==i&&(this.rowsContainer.style.left=`-${i}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=Math.max(o,this.renderWidth)+"px"),this.lastRenderTop=t,this.lastRenderHeight=n}insertItemInDOM(e,t,n){const i=this.items[e];i.row||(i.row=null!==n&&void 0!==n?n:this.cache.alloc(i.templateId));const o=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",o);const r=this.accessibilityProvider.isChecked(i.element);"undefined"!==typeof r&&i.row.domNode.setAttribute("aria-checked",String(!!r)),i.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(i.row.domNode,t):this.rowsContainer.appendChild(i.row.domNode)),this.updateItemInDOM(i,e);const s=this.renderers.get(i.templateId);if(!s)throw new Error("No renderer found for template id "+i.templateId);s&&s.renderElement(i.element,e,i.row.templateData,i.size);const a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=Eo(i.row.domNode,"dragstart",e=>this.onDragStart(i.element,a,e))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Bi?"-moz-fit-content":"fit-content",e.width=Go(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=this.elementTop(t)+"px",this.setRowHeight&&(e.row.domNode.style.height=e.size+"px"),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=e.size+"px"),e.row.domNode.setAttribute("data-index",""+t),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){const e=this.scrollableElement.getScrollPosition();return e.scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return pt.map(this.disposables.add(new lI(this.domNode,"click")).event,e=>this.toMouseEvent(e))}get onMouseDblClick(){return pt.map(this.disposables.add(new lI(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return pt.filter(pt.map(this.disposables.add(new lI(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e)),e=>1===e.browserEvent.button)}get onMouseDown(){return pt.map(this.disposables.add(new lI(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e))}get onContextMenu(){return pt.any(pt.map(this.disposables.add(new lI(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e)),pt.map(this.disposables.add(new lI(this.domNode,vb.Contextmenu)).event,e=>this.toGestureEvent(e)))}get onTouchStart(){return pt.map(this.disposables.add(new lI(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e))}get onTap(){return pt.map(this.disposables.add(new lI(this.rowsContainer,vb.Tap)).event,e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n="undefined"===typeof t?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){if(!n.dataTransfer)return;const i=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(DI.TEXT,t),n.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(i,n)),"undefined"===typeof e&&(e=String(i.length));const t=_r(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),n.dataTransfer.setDragImage(t,-10,-10),setTimeout(()=>document.body.removeChild(t),0)}this.currentDragData=new kO(i),II.CurrentDragAndDropData=new DO(i),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,n)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),II.CurrentDragAndDropData&&"vscode-ui"===II.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(II.CurrentDragAndDropData)this.currentDragData=II.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new LO}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"===typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let n;if(e.browserEvent.dataTransfer.dropEffect="boolean"!==typeof t&&0===t.effect?"copy":"move",n="boolean"!==typeof t&&t.feedback?t.feedback:"undefined"===typeof e.index?[-1]:[e.index],n=Ou(n).filter(e=>e>=-1&&e<this.length).sort((e,t)=>e-t),n=-1===n[0]?[-1]:n,IO(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=ot(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const e of n){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=ot(()=>{for(const e of n){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=lo(()=>this.clearDragOverFeedback(),100),this.currentDragData&&(null===(n=(t=this.dnd).onDragLeave)||void 0===n||n.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,II.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,II.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=st.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=Wo(this.domNode).top;this.dragOverAnimationDisposable=kr(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=lo(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let n=e;while(n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n)){const e=n.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){const i=this.getRenderRange(e,t);let o,r;e===this.elementTop(i.start)?(o=i.start,r=0):i.end-i.start>1&&(o=i.start+1,r=this.elementTop(o)-e);let s=0;while(1){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e<a.end;e++){const t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),s+=t,l=l||0!==t}if(!l){0!==s&&this.eventuallyUpdateScrollDimensions();const t=TB.relativeComplement(i,a);for(const e of t)for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);const l=TB.relativeComplement(a,i);for(const e of l)for(let t=e.start;t<e.end;t++){const e=t+1,n=e<this.items.length?this.items[e].row:null,i=n?n.domNode:null;this.insertItemInDOM(t,i)}for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"===typeof o){const t=this.scrollable.getFutureScrollPosition().scrollTop-e,i=this.elementTop(o)-r+t;this.setScrollTop(i,n)}return void this._onDidChangeContentHeight.fire(this.contentHeight)}}}probeDynamicHeight(e){const t=this.items[e];if(this.virtualDelegate.getDynamicHeight){const e=this.virtualDelegate.getDynamicHeight(t.element);if(null!==e){const n=t.size;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-n}}if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth)return 0;if(this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;const n=t.size;if(!this.setRowHeight&&t.row){let e=t.row.domNode.offsetHeight;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-n}const i=this.cache.alloc(t.templateId);i.domNode.style.height="",this.rowsContainer.appendChild(i.domNode);const o=this.renderers.get(t.templateId);return o&&(o.renderElement(t.element,e,i.templateData,void 0),o.disposeElement&&o.disposeElement(t.element,e,i.templateData,void 0)),t.size=i.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(i.domNode),this.cache.release(i),t.size-n}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const n=this.items[t.end];return n&&n.row?n.row.domNode:null}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const t=this.renderers.get(e.row.templateId);t&&(t.disposeElement&&t.disposeElement(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),nt(this.disposables)}}MO.InstanceCount=0,xO([bb],MO.prototype,"onMouseClick",null),xO([bb],MO.prototype,"onMouseDblClick",null),xO([bb],MO.prototype,"onMouseMiddleClick",null),xO([bb],MO.prototype,"onMouseDown",null),xO([bb],MO.prototype,"onContextMenu",null),xO([bb],MO.prototype,"onTouchStart",null),xO([bb],MO.prototype,"onTap",null);var BO,TO=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},OO=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class RO{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return"template:"+this.trait.trait}renderTemplate(e){return e}renderElement(e,t,n){const i=this.renderedElements.findIndex(e=>e.templateData===n);if(i>=0){const e=this.renderedElements[i];this.trait.unrender(n),e.index=t}else{const e={index:t,templateData:n};this.renderedElements.push(e)}this.trait.renderIndex(t,n)}splice(e,t,n){const i=[];for(const o of this.renderedElements)o.index<e?i.push(o):o.index>=e+t&&i.push({index:o.index+n-t,templateData:o.templateData});this.renderedElements=i}renderIndexes(e){for(const{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){const t=this.renderedElements.findIndex(t=>t.templateData===e);t<0||this.renderedElements.splice(t,1)}}class PO{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new bt,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new RO(this)}splice(e,t,n){var i;t=Math.max(0,Math.min(t,this.length-e));const o=n.length-t,r=e+t,s=[...this.sortedIndexes.filter(t=>t<e),...n.map((t,n)=>t?n+e:-1).filter(e=>-1!==e),...this.sortedIndexes.filter(e=>e>=r).map(e=>e+o)],a=this.length+o;if(this.sortedIndexes.length>0&&0===s.length&&a>0){const t=null!==(i=this.sortedIndexes.find(t=>t>=e))&&void 0!==i?i:a-1;s.push(Math.min(t,a-1))}this.renderer.splice(e,t,n.length),this._set(s,s),this.length=a}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(iR),t)}_set(e,t,n){const i=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=tR(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:n}),i}get(){return this.indexes}contains(e){return Nu(this.sortedIndexes,e,iR)>=0}dispose(){nt(this._onChange)}}TO([bb],PO.prototype,"renderer",null);class FO extends PO{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class jO{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,n.map(()=>!1));const i=this.trait.get().map(e=>this.identityProvider.getId(this.view.element(e)).toString()),o=n.map(e=>i.indexOf(this.identityProvider.getId(e).toString())>-1);this.trait.splice(e,t,o)}}function zO(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function VO(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&(!!e.parentElement&&VO(e.parentElement))}class QO{constructor(e,t,n){this.list=e,this.view=t,this.disposables=new rt,this.multipleSelectionDisposables=new rt,this.onKeyDown.filter(e=>3===e.keyCode).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(e=>16===e.keyCode).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(e=>18===e.keyCode).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(e=>11===e.keyCode).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(e=>12===e.keyCode).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(e=>9===e.keyCode).on(this.onEscape,this,this.disposables),!1!==n.multipleSelectionSupport&&this.onKeyDown.filter(e=>(b["f"]?e.metaKey:e.ctrlKey)&&31===e.keyCode).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return pt.chain(this.disposables.add(new lI(this.view.domNode,"keydown")).event).filter(e=>!zO(e.target)).map(e=>new Ki(e))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter(e=>(b["f"]?e.metaKey:e.ctrlKey)&&31===e.keyCode).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(zu(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}TO([bb],QO.prototype,"onKeyDown",null),function(e){e[e["Idle"]=0]="Idle",e[e["Typing"]=1]="Typing"}(BO||(BO={}));const WO=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class HO{constructor(e,t,n,i){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.delegate=i,this.enabled=!1,this.state=BO.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new rt,this.disposables=new rt,this.updateOptions(e.options)}updateOptions(e){const t="undefined"===typeof e.enableKeyboardNavigation||!!e.enableKeyboardNavigation;t?this.enable():this.disable(),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=pt.chain(this.enabledDisposables.add(new lI(this.view.domNode,"keydown")).event).filter(e=>!zO(e.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(e=>new Ki(e)).filter(e=>this.delegate.mightProducePrintableCharacter(e)).forEach(e=>{e.stopPropagation(),e.preventDefault()}).map(e=>e.browserEvent.key).event,t=pt.debounce(e,()=>null,800),n=pt.reduce(pt.any(e,t),(e,t)=>null===t?null:(e||"")+t);n(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const n=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));n&&pm(n)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=BO.Idle,void(this.triggered=!1);const t=this.list.getFocus(),n=t.length>0?t[0]:0,i=this.state===BO.Idle?1:0;this.state=BO.Typing;for(let o=0;o<this.list.length;o++){const t=(n+o+i)%this.list.length,r=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(t)),s=r&&r.toString();if("undefined"===typeof s||VB(e,s))return this.previouslyFocused=n,this.list.setFocus([t]),void this.list.reveal(t)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class UO{constructor(e,t){this.list=e,this.view=t,this.disposables=new rt;const n=pt.chain(this.disposables.add(new lI(t.domNode,"keydown")).event).filter(e=>!zO(e.target)).map(e=>new Ki(e));n.filter(e=>2===e.keyCode&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const n=this.view.domElement(t[0]);if(!n)return;const i=n.querySelector("[tabIndex]");if(!i||!(i instanceof HTMLElement)||-1===i.tabIndex)return;const o=window.getComputedStyle(i);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),i.focus())}dispose(){this.disposables.dispose()}}function YO(e){return b["f"]?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function GO(e){return e.browserEvent.shiftKey}function KO(e){return e instanceof MouseEvent&&2===e.button}const qO={isSelectionSingleChangeEvent:YO,isSelectionRangeChangeEvent:GO};class JO{constructor(e){this.list=e,this.disposables=new rt,this._onPointer=new bt,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||qO),this.mouseSupport="undefined"===typeof e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(wb.addTarget(e.getHTMLElement()))),pt.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||qO))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){VO(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(VO(e.browserEvent.target))return;const t="undefined"===typeof e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(zO(e.browserEvent.target)||VO(e.browserEvent.target))return;const t=e.index;return"undefined"===typeof t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),KO(e.browserEvent)||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e))}onDoubleClick(e){if(zO(e.browserEvent.target)||VO(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if("undefined"===typeof n){const e=this.list.getFocus()[0];n=null!==e&&void 0!==e?e:t,this.list.setAnchor(n)}const i=Math.min(n,t),o=Math.max(n,t),r=zu(i,o+1),s=this.list.getSelection(),a=eR(tR(s,[n]),n);if(0===a.length)return;const l=tR(r,nR(s,a));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),i=n.filter(e=>e!==t);this.list.setFocus([t]),this.list.setAnchor(t),n.length===i.length?this.list.setSelection([...i,t],e.browserEvent):this.list.setSelection(i,e.browserEvent)}}dispose(){this.disposables.dispose()}}class $O{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&"."+this.selectorSuffix,n=[];e.listBackground&&(e.listBackground.isOpaque()?n.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):b["f"]),e.listFocusBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&n.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&n.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&n.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&n.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&n.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&n.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&n.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&n.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&n.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),this.styleElement.textContent=n.join("\n")}}const XO={listFocusBackground:sw.fromHex("#7FB0D0"),listActiveSelectionBackground:sw.fromHex("#0E639C"),listActiveSelectionForeground:sw.fromHex("#FFFFFF"),listActiveSelectionIconForeground:sw.fromHex("#FFFFFF"),listFocusAndSelectionBackground:sw.fromHex("#094771"),listFocusAndSelectionForeground:sw.fromHex("#FFFFFF"),listInactiveSelectionBackground:sw.fromHex("#3F3F46"),listInactiveSelectionIconForeground:sw.fromHex("#FFFFFF"),listHoverBackground:sw.fromHex("#2A2D2E"),listDropBackground:sw.fromHex("#383B3D"),treeIndentGuidesStroke:sw.fromHex("#a9a9a9"),tableColumnsBorder:sw.fromHex("#cccccc").transparent(.2)},ZO={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function eR(e,t){const n=e.indexOf(t);if(-1===n)return[];const i=[];let o=n-1;while(o>=0&&e[o]===t-(n-o))i.push(e[o--]);i.reverse(),o=n;while(o<e.length&&e[o]===t+(o-n))i.push(e[o++]);return i}function tR(e,t){const n=[];let i=0,o=0;while(i<e.length||o<t.length)if(i>=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]<t[o]?n.push(e[i++]):n.push(t[o++])}return n}function nR(e,t){const n=[];let i=0,o=0;while(i<e.length||o<t.length)if(i>=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]<t[o]?n.push(e[i++]):o++}return n}const iR=(e,t)=>e-t;class oR{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,i){let o=0;for(const r of this.renderers)r.renderElement(e,t,n[o++],i)}disposeElement(e,t,n,i){let o=0;for(const r of this.renderers)r.disposeElement&&r.disposeElement(e,t,n[o],i),o+=1}disposeTemplate(e){let t=0;for(const n of this.renderers)n.disposeTemplate(e[t++])}}class rR{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){const i=this.accessibilityProvider.getAriaLabel(e);i?n.setAttribute("aria-label",i):n.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"===typeof o?n.setAttribute("aria-level",""+o):n.removeAttribute("aria-level")}disposeTemplate(e){}}class sR{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements(),n=t.indexOf(e)>-1?t:[e];return n}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,n,i){return this.dnd.onDragOver(e,t,n,i)}onDragLeave(e,t,n,i){var o,r;null===(r=(o=this.dnd).onDragLeave)||void 0===r||r.call(o,e,t,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,n,i){this.dnd.drop(e,t,n,i)}}class aR{constructor(e,t,n,i,o=ZO){var r;this.user=e,this._options=o,this.focus=new PO("focused"),this.anchor=new PO("anchor"),this.eventBufferer=new wt,this._ariaLabel="",this.disposables=new rt,this._onDidDispose=new bt,this.onDidDispose=this._onDidDispose.event;const s=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new FO("listbox"!==s),Ta(o,XO,!1);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new rR(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),i=i.map(e=>new oR(e.templateId,[...a,e]));const l=Object.assign(Object.assign({},o),{dnd:o.dnd&&new sR(this,o.dnd)});if(this.view=new MO(t,n,i,l),this.view.domNode.setAttribute("role",s),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=ir(this.view.domNode);this.styleController=new $O(e,this.view.domId)}if(this.spliceable=new mO([new jO(this.focus,this.view,o.identityProvider),new jO(this.selection,this.view,o.identityProvider),new jO(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new UO(this,this.view)),("boolean"!==typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new QO(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||WO;this.typeLabelController=new HO(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return pt.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return pt.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=pt.chain(this.disposables.add(new lI(this.view.domNode,"keydown")).event).map(e=>new Ki(e)).filter(t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode).map(cI).filter(()=>!1).event,n=pt.chain(this.disposables.add(new lI(this.view.domNode,"keyup")).event).forEach(()=>e=!1).map(e=>new Ki(e)).filter(e=>58===e.keyCode||e.shiftKey&&68===e.keyCode).map(cI).map(({browserEvent:e})=>{const t=this.getFocus(),n=t.length?t[0]:void 0,i="undefined"!==typeof n?this.view.element(n):void 0,o="undefined"!==typeof n?this.view.domElement(n):this.view.domNode;return{index:n,element:i,anchor:o,browserEvent:e}}).event,i=pt.chain(this.view.onContextMenu).filter(t=>!e).map(({element:e,index:t,browserEvent:n})=>({element:e,index:t,anchor:{x:n.pageX+1,y:n.pageY},browserEvent:n})).event;return pt.any(t,n,i)}get onKeyDown(){return this.disposables.add(new lI(this.view.domNode,"keydown")).event}get onDidFocus(){return pt.signal(this.disposables.add(new lI(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new JO(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(t=this.keyboardController)||void 0===t||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new bO(this.user,"Invalid start index: "+e);if(t<0)throw new bO(this.user,"Invalid delete count: "+t);0===t&&0===n.length||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const n of e)if(n<0||n>=this.length)throw new bO(this.user,"Invalid index "+n);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if("undefined"!==typeof e){if(e<0||e>=this.length)throw new bO(this.user,"Invalid index "+e);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return ju(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return"undefined"===typeof e?void 0:this.element(e)}setFocus(e,t){for(const n of e)if(n<0||n>=this.length)throw new bO(this.user,"Invalid index "+n);this.focus.set(e,t)}focusNext(e=1,t=!1,n,i){if(0===this.length)return;const o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,i);r>-1&&this.setFocus([r],n)}focusPrevious(e=1,t=!1,n,i){if(0===this.length)return;const o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,i);r>-1&&this.setFocus([r],n)}focusNextPage(e,t){return OO(this,void 0,void 0,(function*(){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=0===n?0:n-1;const i=this.view.element(n),o=this.getFocusedElements()[0];if(o!==i){const i=this.findPreviousIndex(n,!1,t);i>-1&&o!==this.view.element(i)?this.setFocus([i],e):this.setFocus([n],e)}else{const i=this.view.getScrollTop();this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(n)),this.view.getScrollTop()!==i&&(this.setFocus([]),yield ao(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return OO(this,void 0,void 0,(function*(){let n;const i=this.view.getScrollTop();n=0===i?this.view.indexAt(i):this.view.indexAfter(i-1);const o=this.view.element(n),r=this.getFocusedElements()[0];if(r!==o){const i=this.findNextIndex(n,!1,t);i>-1&&r!==this.view.element(i)?this.setFocus([i],e):this.setFocus([n],e)}else{const n=i;this.view.setScrollTop(i-this.view.renderHeight),this.view.getScrollTop()!==n&&(this.setFocus([]),yield ao(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(0===this.length)return;const i=this.findNextIndex(e,!1,n);i>-1&&this.setFocus([i],t)}findNextIndex(e,t=!1,n){for(let i=0;i<this.length;i++){if(e>=this.length&&!t)return-1;if(e%=this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let i=0;i<this.length;i++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!n||n(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new bO(this.user,"Invalid index "+e);const n=this.view.getScrollTop(),i=this.view.elementTop(e),o=this.view.elementHeight(e);if(ra(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*ll(t,0,1)+i)}else{const e=i+o,t=n+this.view.renderHeight;i<n&&e>=t||(i<n||e>=t&&o>=this.view.renderHeight?this.view.setScrollTop(i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new bO(this.user,"Invalid index "+e);const t=this.view.getScrollTop(),n=this.view.elementTop(e),i=this.view.elementHeight(e);if(n<t||n+i>t+this.view.renderHeight)return null;const o=i-this.view.renderHeight;return Math.abs((t-n)/o)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(e=>this.view.element(e)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let n;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}TO([bb],aR.prototype,"onDidChangeFocus",null),TO([bb],aR.prototype,"onDidChangeSelection",null),TO([bb],aR.prototype,"onContextMenu",null),TO([bb],aR.prototype,"onKeyDown",null),TO([bb],aR.prototype,"onDidFocus",null);class lR{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{data:t,disposable:st.None}}renderElement(e,t,n,i){if(n.disposable&&n.disposable.dispose(),!n.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,n.data,i);const r=new xt,s=o.resolve(e,r.token);n.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,n.data),s.then(t=>this.renderer.renderElement(t,e,n.data,i))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class cR{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function hR(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new cR(e,t.accessibilityProvider)})}class uR{constructor(e,t,n,i,o={}){const r=()=>this.model,s=i.map(e=>new lR(e,r));this.list=new aR(e,t,n,s,hR(r,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return pt.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return pt.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return pt.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,zu(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}n("b400");const dR={separatorBorder:sw.transparent};class pR{constructor(e,t,n,i){this.container=e,this.view=t,this.disposable=i,this._cachedVisibleSize=void 0,"number"===typeof n?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return"undefined"===typeof this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=ll(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"===typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class fR extends pR{layoutContainer(e){this.container.style.top=e+"px",this.container.style.height=this.size+"px"}}class gR extends pR{layoutContainer(e){this.container.style.left=e+"px",this.container.style.width=this.size+"px"}}var mR,bR;(function(e){e[e["Idle"]=0]="Idle",e[e["Busy"]=1]="Busy"})(mR||(mR={})),function(e){function t(e){return{type:"split",index:e}}function n(e){return{type:"invisible",cachedVisibleSize:e}}e.Distribute={type:"distribute"},e.Split=t,e.Invisible=n}(bR||(bR={}));class vR extends st{constructor(e,t={}){var n,i;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=mR.Idle,this._onDidSashChange=this._register(new bt),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new bt),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=aa(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!aa(t.proportionalLayout)||!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=mr(this.el,_r(".sash-container")),this.viewContainer=_r(".split-view-container"),this.scrollable=new tk(125,No),this.scrollableElement=this._register(new gk(this.viewContainer,{vertical:0===this.orientation?null!==(n=t.scrollbarVisibility)&&void 0!==n?n:1:2,horizontal:1===this.orientation?null!==(i=t.scrollbarVisibility)&&void 0!==i?i:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft})),mr(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||dR),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((e,t)=>{const n=aa(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},i=e.view;this.doAddView(i,n,t,!0)}),this.contentSize=this.viewItems.reduce((e,t)=>e+t.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,i){this.doAddView(e,t,n,i)}layout(e,t){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let i=0;i<this.viewItems.length;i++){const t=this.viewItems[i];t.size=ll(Math.round(this.proportions[i]*e),t.minimumSize,t.maximumSize)}else{const t=zu(this.viewItems.length),i=t.filter(e=>1===this.viewItems[e].priority),o=t.filter(e=>2===this.viewItems[e].priority);this.resize(this.viewItems.length-1,e-n,void 0,i,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:n}){for(const s of this.viewItems)s.enabled=!1;const i=this.sashItems.findIndex(t=>t.sash===e),o=it(Eo(document.body,"keydown",e=>r(this.sashDragState.current,e.altKey)),Eo(document.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(e,t)=>{const n=this.viewItems.map(e=>e.size);let r,s,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){const e=i===this.sashItems.length-1;if(e){const e=this.viewItems[i];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[i+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}}if(!t){const e=zu(i,-1),t=zu(i+1,this.viewItems.length),o=e.reduce((e,t)=>e+(this.viewItems[t].minimumSize-n[t]),0),a=e.reduce((e,t)=>e+(this.viewItems[t].viewMaximumSize-n[t]),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce((e,t)=>e+(n[t]-this.viewItems[t].minimumSize),0),c=0===t.length?Number.NEGATIVE_INFINITY:t.reduce((e,t)=>e+(n[t]-this.viewItems[t].viewMaximumSize),0),h=Math.max(o,c),u=Math.min(l,a),d=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"===typeof d){const e=this.viewItems[d],t=Math.floor(e.viewMinimumSize/2);r={index:d,limitDelta:e.visible?h-t:h+t,size:e.size}}if("number"===typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);s={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:i,sizes:n,minDelta:a,maxDelta:l,alt:t,snapBefore:r,snapAfter:s,disposable:o}};r(t,n)}onSashChange({current:e}){const{index:t,start:n,sizes:i,alt:o,minDelta:r,maxDelta:s,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-n,h=this.resize(t,c,i,void 0,void 0,r,s,a,l);if(o){const e=t===this.sashItems.length-1,n=this.viewItems.map(e=>e.size),i=e?t:t+1,o=this.viewItems[i],r=o.size-o.maximumSize,s=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-h,n,void 0,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t="number"===typeof t?t:e.size,t=ll(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(this.state!==mR.Idle)throw new Error("Cant modify splitview");if(this.state=mR.Busy,e<0||e>=this.viewItems.length)return;const n=zu(this.viewItems.length).filter(t=>t!==e),i=[...n.filter(e=>1===this.viewItems[e].priority),e],o=n.filter(e=>2===this.viewItems[e].priority),r=this.viewItems[e];t=Math.round(t),t=ll(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(i,o),this.state=mR.Idle}distributeViewSizes(){const e=[];let t=0;for(const s of this.viewItems)s.maximumSize-s.minimumSize>0&&(e.push(s),t+=s.size);const n=Math.floor(t/e.length);for(const s of e)s.size=ll(n,s.minimumSize,s.maximumSize);const i=zu(this.viewItems.length),o=i.filter(e=>1===this.viewItems[e].priority),r=i.filter(e=>2===this.viewItems[e].priority);this.relayout(o,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,i){if(this.state!==mR.Idle)throw new Error("Cant modify splitview");this.state=mR.Busy;const o=_r(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(n));const r=e.onDidChange(e=>this.onViewChange(c,e)),s=ot(()=>this.viewContainer.removeChild(o)),a=it(r,s);let l;l="number"===typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const c=0===this.orientation?new fR(o,e,l,a):new gR(o,e,l,a);if(this.viewItems.splice(n,0,c),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new wI(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new wI(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),i=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=pt.map(t.onDidStart,i),r=o(this.onSashStart,this),s=pt.map(t.onDidChange,i),a=s(this.onSashChange,this),l=pt.map(t.onDidEnd,()=>this.sashItems.findIndex(e=>e.sash===t)),c=l(this.onSashEnd,this),h=t.onDidReset(()=>{const e=this.sashItems.findIndex(e=>e.sash===t),n=zu(e,-1),i=zu(e+1,this.viewItems.length),o=this.findFirstSnapIndex(n),r=this.findFirstSnapIndex(i);("number"!==typeof o||this.viewItems[o].visible)&&("number"!==typeof r||this.viewItems[r].visible)&&this._onDidSashReset.fire(e)}),u=it(r,a,c,h,t),d={sash:t,disposable:u};this.sashItems.splice(n-1,0,d)}let h;o.appendChild(e.element),"number"!==typeof t&&"split"===t.type&&(h=[t.index]),i||this.relayout([n],h),this.state=mR.Idle,i||"number"===typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const n=this.viewItems.reduce((e,t)=>e+t.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(e=>e.size),i,o,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const c=zu(e,-1),h=zu(e+1,this.viewItems.length);if(o)for(const C of o)Qu(c,C),Qu(h,C);if(i)for(const C of i)Wu(c,C),Wu(h,C);const u=c.map(e=>this.viewItems[e]),d=c.map(e=>n[e]),p=h.map(e=>this.viewItems[e]),f=h.map(e=>n[e]),g=c.reduce((e,t)=>e+(this.viewItems[t].minimumSize-n[t]),0),m=c.reduce((e,t)=>e+(this.viewItems[t].maximumSize-n[t]),0),b=0===h.length?Number.POSITIVE_INFINITY:h.reduce((e,t)=>e+(n[t]-this.viewItems[t].minimumSize),0),v=0===h.length?Number.NEGATIVE_INFINITY:h.reduce((e,t)=>e+(n[t]-this.viewItems[t].maximumSize),0),y=Math.max(g,v,r),w=Math.min(b,m,s);let _=!1;if(a){const e=this.viewItems[a.index],n=t>=a.limitDelta;_=n!==e.visible,e.setVisible(n,a.size)}if(!_&&l){const e=this.viewItems[l.index],n=t<l.limitDelta;_=n!==e.visible,e.setVisible(n,l.size)}if(_)return this.resize(e,t,n,i,o,r,s);t=ll(t,y,w);for(let C=0,A=t;C<u.length;C++){const e=u[C],t=ll(d[C]+A,e.minimumSize,e.maximumSize),n=t-d[C];A-=n,e.size=t}for(let C=0,A=t;C<p.length;C++){const e=p[C],t=ll(f[C]-A,e.minimumSize,e.maximumSize),n=t-f[C];A+=n,e.size=t}return t}distributeEmptySpace(e){const t=this.viewItems.reduce((e,t)=>e+t.size,0);let n=this.size-t;const i=zu(this.viewItems.length-1,-1),o=i.filter(e=>1===this.viewItems[e].priority),r=i.filter(e=>2===this.viewItems[e].priority);for(const s of r)Qu(i,s);for(const s of o)Wu(i,s);"number"===typeof e&&Wu(i,e);for(let s=0;0!==n&&s<i.length;s++){const e=this.viewItems[i[s]],t=ll(e.size+n,e.minimumSize,e.maximumSize),o=t-e.size;n-=o,e.size=t}}layoutViews(){this.contentSize=this.viewItems.reduce((e,t)=>e+t.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(e=>e.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(t=>e=t.size-t.minimumSize>0||e);e=!1;const n=this.viewItems.map(t=>e=t.maximumSize-t.size>0||e),i=[...this.viewItems].reverse();e=!1;const o=i.map(t=>e=t.size-t.minimumSize>0||e).reverse();e=!1;const r=i.map(t=>e=t.maximumSize-t.size>0||e).reverse();let s=0;for(let a=0;a<this.sashItems.length;a++){const{sash:e}=this.sashItems[a],i=this.viewItems[a];s+=i.size;const l=!(t[a]&&r[a+1]),c=!(n[a]&&o[a+1]);if(l&&c){const n=zu(a,-1),i=zu(a+1,this.viewItems.length),r=this.findFirstSnapIndex(n),l=this.findFirstSnapIndex(i),c="number"===typeof r&&!this.viewItems[r].visible,h="number"===typeof l&&!this.viewItems[l].visible;c&&o[a]&&(s>0||this.startSnappingEnabled)?e.state=1:h&&t[a]&&(s<this.contentSize||this.endSnappingEnabled)?e.state=2:e.state=0}else e.state=l&&!c?1:!l&&c?2:3}}getSashPosition(e){let t=0;for(let n=0;n<this.sashItems.length;n++)if(t+=this.viewItems[n].size,this.sashItems[n].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const e=this.viewItems[t];if(e.visible&&e.snap)return t}for(const t of e){const e=this.viewItems[t];if(e.visible&&e.maximumSize-e.minimumSize>0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach(e=>e.dispose()),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}var yR;n("acff");class wR{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=wR.TemplateId,this.renderedTemplates=new Set;const i=new Map(t.map(e=>[e.templateId,e]));this.renderers=[];for(const o of e){const e=i.get(o.templateId);if(!e)throw new Error(`Table cell renderer for template id ${o.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=mr(e,_r(".monaco-table-tr")),n=[],i=[];for(let r=0;r<this.columns.length;r++){const e=this.renderers[r],o=mr(t,_r(".monaco-table-td",{"data-col-index":r}));o.style.width=this.getColumnSize(r)+"px",n.push(o),i.push(e.renderTemplate(o))}const o={container:e,cellContainers:n,cellTemplateData:i};return this.renderedTemplates.add(o),o}renderElement(e,t,n,i){for(let o=0;o<this.columns.length;o++){const r=this.columns[o],s=r.project(e),a=this.renderers[o];a.renderElement(s,t,n.cellTemplateData[o],i)}}disposeElement(e,t,n,i){for(let o=0;o<this.columns.length;o++){const r=this.renderers[o];if(r.disposeElement){const s=this.columns[o],a=s.project(e);r.disposeElement(a,t,n.cellTemplateData[o],i)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++){const n=this.renderers[t];n.disposeTemplate(e.cellTemplateData[t])}_o(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:n}of this.renderedTemplates)n[e].style.width=t+"px"}}function _R(e){return{getHeight(t){return e.getHeight(t)},getTemplateId(){return wR.TemplateId}}}wR.TemplateId="row";class CR{constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new bt,this.onDidLayout=this._onDidLayout.event,this.element=_r(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}get minimumSize(){var e;return null!==(e=this.column.minimumWidth)&&void 0!==e?e:120}get maximumSize(){var e;return null!==(e=this.column.maximumWidth)&&void 0!==e?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return null!==(e=this.column.onDidChangeWidthConstraints)&&void 0!==e?e:pt.None}layout(e){this._onDidLayout.fire([this.index,e])}}class AR{constructor(e,t,n,i,o,r){this.virtualDelegate=n,this.domId="table_id_"+ ++AR.InstanceCount,this.cachedHeight=0,this.domNode=mr(t,_r(".monaco-table."+this.domId));const s=i.map((e,t)=>new CR(e,t)),a={size:s.reduce((e,t)=>e+t.column.weight,0),views:s.map(e=>({size:e.column.weight,view:e}))};this.splitview=new vR(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a}),this.splitview.el.style.height=n.headerRowHeight+"px",this.splitview.el.style.lineHeight=n.headerRowHeight+"px";const l=new wR(i,o,e=>this.splitview.getViewSize(e));this.list=new aR(e,this.domNode,_R(n),[l],r),this.columnLayoutDisposable=pt.any(...s.map(e=>e.onDidLayout))(([e,t])=>l.layoutColumn(e,t)),this.styleElement=ir(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}AR.InstanceCount=0,function(e){e[e["Unknown"]=0]="Unknown",e[e["Twistie"]=1]="Twistie",e[e["Element"]=2]="Element"}(yR||(yR={}));class ER extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class xR{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function SR(e){return"object"===typeof e&&"visibility"in e&&"data"in e}function kR(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function DR(e){return"boolean"===typeof e.collapsible}class LR{constructor(e,t,n,i={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new wt,this._onDidChangeCollapseState=new bt,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new bt,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new bt,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault="undefined"!==typeof i.collapseByDefault&&i.collapseByDefault,this.filter=i.filter,this.autoExpandSingleChildren="undefined"!==typeof i.autoExpandSingleChildren&&i.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=Ue.empty(),i={}){if(0===e.length)throw new ER(this.user,"Invalid tree location");i.diffIdentityProvider?this.spliceSmart(i.diffIdentityProvider,e,t,n,i):this.spliceSimple(e,t,n,i)}spliceSmart(e,t,n,i,o,r){var s;void 0===i&&(i=Ue.empty()),void 0===r&&(r=null!==(s=o.diffDepth)&&void 0!==s?s:0);const{parentNode:a}=this.getParentNodeWithListIndex(t),l=[...i],c=t[t.length-1],h=new Jh({getElements:()=>a.children.map(t=>e.getId(t.element).toString())},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+n)].map(t=>e.getId(t.element).toString())}).ComputeDiff(!1);if(h.quitEarly)return this.spliceSimple(t,n,l,o);const u=t.slice(0,-1),d=(t,n,i)=>{if(r>0)for(let s=0;s<i;s++)t--,n--,this.spliceSmart(e,[...u,t,0],Number.MAX_SAFE_INTEGER,l[n].children,o,r-1)};let p=Math.min(a.children.length,c+n),f=l.length;for(const g of h.changes.sort((e,t)=>t.originalStart-e.originalStart))d(p,f,p-(g.originalStart+g.originalLength)),p=g.originalStart,f=g.modifiedStart-c,this.spliceSimple([...u,p],g.originalLength,Ue.slice(l,f,f+g.modifiedLength),o);d(p,f,p)}spliceSimple(e,t,n=Ue.empty(),{onDidCreateNode:i,onDidDeleteNode:o}){const{parentNode:r,listIndex:s,revealed:a,visible:l}=this.getParentNodeWithListIndex(e),c=[],h=Ue.map(n,e=>this.createTreeNode(e,r,r.visible?1:0,a,c,i)),u=e[e.length-1],d=r.children.length>0;let p=0;for(let _=u;_>=0&&_<r.children.length;_--){const e=r.children[_];if(e.visible){p=e.visibleChildIndex;break}}const f=[];let g=0,m=0;for(const _ of h)f.push(_),m+=_.renderNodeCount,_.visible&&(_.visibleChildIndex=p+g++);const b=Uu(r.children,u,t,f);let v=0;for(const _ of b)_.visible&&v++;if(0!==v)for(let _=u+f.length;_<r.children.length;_++){const e=r.children[_];e.visible&&(e.visibleChildIndex-=v)}if(r.visibleChildrenCount+=g-v,a&&l){const e=b.reduce((e,t)=>e+(t.visible?t.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(r,m-e),this.list.splice(s,e,c)}if(b.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};b.forEach(e)}const y=r.children.length>0;d!==y&&this.setCollapsible(e.slice(0,-1),y),this._onDidSplice.fire({insertedNodes:f,deletedNodes:b});let w=r;while(w){if(2===w.visibility){this.refilter();break}w=w.parent}}rerender(e){if(0===e.length)throw new ER(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:i}=this.getTreeNodeWithListIndex(e);t.visible&&i&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:n,revealed:i}=this.getTreeNodeWithListIndex(e);return n&&i?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const n=this.getTreeNode(e);"undefined"===typeof t&&(t=!n.collapsible);const i={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,i))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){const i=this.getTreeNode(e);"undefined"===typeof t&&(t=!i.collapsed);const o={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}_setCollapseState(e,t){const{node:n,listIndex:i,revealed:o}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(n,i,o,t);if(n!==this.root&&this.autoExpandSingleChildren&&r&&!DR(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let i=-1;for(let e=0;e<n.children.length;e++){const t=n.children[e];if(t.visible){if(i>-1){i=-1;break}i=e}}i>-1&&this._setCollapseState([...e,i],t)}return r}_setListNodeCollapseState(e,t,n,i){const o=this._setNodeCollapseState(e,i,!1);if(!n||!e.visible||!o)return o;const r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,n){let i;if(e===this.root?i=!1:(DR(t)?(i=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(i=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):i=!1,i&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!DR(t)&&t.recursive)for(const o of e.children)i=this._setNodeCollapseState(o,t,!0)||i;return i}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);while(t.parent)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,n,i,o,r){const s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"===typeof e.collapsible?e.collapsible:"undefined"!==typeof e.collapsed,collapsed:"undefined"===typeof e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,n);s.visibility=a,i&&o.push(s);const l=e.children||Ue.empty(),c=i&&0!==a&&!s.collapsed,h=Ue.map(l,e=>this.createTreeNode(e,s,a,c,o,r));let u=0,d=1;for(const p of h)s.children.push(p),d+=p.renderNodeCount,p.visible&&(p.visibleChildIndex=u++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=u,s.visible=2===a?u>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=d):(s.renderNodeCount=0,i&&o.pop()),r&&r(s),s}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,i=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;i&&n.push(e)}const r=n.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const r of e.children)s=this._updateNodeAfterFilterChange(r,o,n,i&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o),e.visible?e.collapsed||(e.renderNodeCount+=n.length-r):(e.renderNodeCount=0,i&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)while(e)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const n=this.filter?this.filter.filter(e.element,t):1;return"boolean"===typeof n?(e.filterData=void 0,n?1:0):SR(n)?(e.filterData=n.data,kR(n.visibility)):(e.filterData=void 0,kR(n))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[n,...i]=e;return!(n<0||n>t.children.length)&&this.hasTreeNode(i,t.children[n])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[n,...i]=e;if(n<0||n>t.children.length)throw new ER(this.user,"Invalid tree location");return this.getTreeNode(i,t.children[n])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:n,revealed:i,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new ER(this.user,"Invalid tree location");const s=t.children[r];return{node:s,listIndex:n,revealed:i,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,i=!0,o=!0){const[r,...s]=e;if(r<0||r>t.children.length)throw new ER(this.user,"Invalid tree location");for(let a=0;a<r;a++)n+=t.children[a].renderNodeCount;return i=i&&!t.collapsed,o=o&&t.visible,0===s.length?{parentNode:t,listIndex:n,revealed:i,visible:o}:this.getParentNodeWithListIndex(s,t.children[r],n+1,i,o)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let n=e;while(n.parent)t.push(n.parent.children.indexOf(n)),n=n.parent;return t.reverse()}getParentNodeLocation(e){return 0===e.length?void 0:1===e.length?[]:Lu(e)[0]}}const IR=Kl("tree-item-expanded",Jl.chevronDown),NR=Kl("tree-filter-on-type-on",Jl.listFilter),MR=Kl("tree-filter-on-type-off",Jl.listSelection),BR=Kl("tree-filter-clear",Jl.close),TR=Kl("tree-item-loading",Jl.loading);var OR;n("72b1");class RR extends kO{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function PR(e){return e instanceof kO?new RR(e):e}class FR{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=st.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(PR(e),t)}onDragOver(e,t,n,i,o=!0){const r=this.dnd.onDragOver(PR(e),t&&t.element,n,i),s=this.autoExpandNode!==t;if(s&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),"undefined"===typeof t)return r;if(s&&"boolean"!==typeof r&&r.autoExpand&&(this.autoExpandDisposable=lo(()=>{const e=this.modelProvider(),n=e.getNodeLocation(t);e.isCollapsed(n)&&e.setCollapsed(n,!1),this.autoExpandNode=void 0},500)),"boolean"===typeof r||!r.accept||"undefined"===typeof r.bubble||r.feedback){if(!o){const e="boolean"===typeof r?r:r.accept,t="boolean"===typeof r?void 0:r.effect;return{accept:e,effect:t,feedback:[n]}}return r}if(1===r.bubble){const n=this.modelProvider(),o=n.getNodeLocation(t),r=n.getParentNodeLocation(o),s=n.getNode(r),a=r&&n.getListIndex(r);return this.onDragOver(e,s,a,i,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),c=a.getListIndex(l),h=a.getListRenderCount(l);return Object.assign(Object.assign({},r),{feedback:zu(c,c+h)})}drop(e,t,n,i){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(PR(e),t&&t.element,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function jR(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new FR(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const n=e(),i=n.getNodeLocation(t),o=n.getParentNodeLocation(i),r=n.getNode(o);return r.visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}class zR{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}(function(e){e["None"]="none",e["OnHover"]="onHover",e["Always"]="always"})(OR||(OR={}));class VR{constructor(e,t=[]){this._elements=t,this.onDidChange=pt.forEach(e,e=>this._elements=e)}get elements(){return this._elements}}class QR{constructor(e,t,n,i,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=i,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=QR.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new ef,this.activeIndentNodes=new Set,this.indentGuidesDisposable=st.None,this.disposables=new rt,this.templateId=e.templateId,this.updateOptions(o),pt.map(n,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if("undefined"!==typeof e.indent&&(this.indent=ll(e.indent,0,40)),"undefined"!==typeof e.renderIndentGuides){const t=e.renderIndentGuides!==OR.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new rt;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}"undefined"!==typeof e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=mr(e,_r(".monaco-tl-row")),n=mr(t,_r(".monaco-tl-indent")),i=mr(t,_r(".monaco-tl-twistie")),o=mr(t,_r(".monaco-tl-contents")),r=this.renderer.renderTemplate(o);return{container:e,indent:n,twistie:i,indentGuidesDisposable:st.None,templateData:r}}renderElement(e,t,n,i){"number"===typeof i&&(this.renderedNodes.set(e,{templateData:n,height:i}),this.renderedElements.set(e.element,e));const o=QR.DefaultIndent+(e.depth-1)*this.indent;n.twistie.style.paddingLeft=o+"px",n.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,n),"number"===typeof i&&this.renderIndentGuides(e,n),this.renderer.renderElement(e,t,n.templateData,i)}disposeElement(e,t,n,i){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.templateData,i),"number"===typeof i&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...IR.classNamesArray);let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...IR.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(_o(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new rt,i=this.modelProvider();let o=e;while(1){const e=i.getNodeLocation(o),r=i.getParentNodeLocation(e);if(!r)break;const s=i.getNode(r),a=_r(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(s)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(s,a),n.add(ot(()=>this.renderedIndentGuides.delete(s,a))),o=s}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,n=this.modelProvider();e.forEach(e=>{const i=n.getNodeLocation(e);try{const o=n.getParentNodeLocation(i);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(n.getNode(o))}catch(o){}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.remove("active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),nt(this.disposables)}}QR.DefaultIndent=8;class WR{constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new rt,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const n=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return n;let i;if(i="boolean"===typeof n?n?1:0:SR(n)?kR(n.visibility):n,0===i)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:ET.Default,visibility:!0};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),i=Array.isArray(n)?n:[n];for(const o of i){const e=o&&o.toString();if("undefined"===typeof e)return{data:ET.Default,visibility:!0};const t=xT(this._pattern,this._lowercasePattern,0,e,e.toLowerCase(),0,!0);if(t)return this._matchCount++,1===i.length?{data:t,visibility:!0}:{data:{label:e,score:t},visibility:!0}}return this.tree.options.filterOnType?2:{data:ET.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){nt(this.disposables)}}class HR{constructor(e,t,n,i,o){this.tree=e,this.view=n,this.filter=i,this.keyboardNavigationDelegate=o,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new bt,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new bt,this.enabledDisposables=new rt,this.disposables=new rt,this.domNode=_r(".monaco-list-type-filter."+this.positionClassName),this.domNode.draggable=!0,this.disposables.add(Eo(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=mr(n.getHTMLElement(),_r(".monaco-list-type-filter-message")),this.labelDomNode=mr(this.domNode,_r("span.label"));const r=mr(this.domNode,_r(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=mr(r,_r("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(Eo(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=mr(r,_r("button.clear"+BR.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=m("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),"undefined"!==typeof e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new lI(this.view.getHTMLElement(),"keydown")),t=pt.chain(e.event).filter(e=>!zO(e.target)||e.target===this.filterOnTypeDomNode).filter(e=>"Dead"!==e.key&&!/^Media/.test(e.key)).map(e=>new Ki(e)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(b["f"]?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey).forEach(e=>{e.stopPropagation(),e.preventDefault()}).event,n=this.enabledDisposables.add(new lI(this.clearDomNode,"click"));pt.chain(pt.any(t,n.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"===typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(b["f"]?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,e=>!ET.isDefault(e.filterData));const n=this.tree.getFocus();if(n.length>0){const e=n[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=Ho(e),n=e.clientWidth,i=n/2,o=this.domNode.clientWidth,r=new rt;let s=this.positionClassName;const a=()=>{switch(s){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=n-o-6+"px";break}},l=e=>{e.preventDefault();const n=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),s=n<i?"nw":"ne",a()},c=()=>{this.positionClassName=s,this.domNode.className="monaco-list-type-filter "+this.positionClassName,this.domNode.style.top="",this.domNode.style.left="",nt(r)};a(),this.domNode.classList.remove(s),this.domNode.classList.add("dragging"),r.add(ot(()=>this.domNode.classList.remove("dragging"))),r.add(Eo(document,"dragover",e=>l(e))),r.add(Eo(this.domNode,"dragend",()=>c())),II.CurrentDragAndDropData=new LI("vscode-ui"),r.add(ot(()=>II.CurrentDragAndDropData=void 0))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...MR.classNamesArray),this.filterOnTypeDomNode.classList.add(...NR.classNamesArray),this.filterOnTypeDomNode.title=m("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...NR.classNamesArray),this.filterOnTypeDomNode.classList.add(...MR.classNamesArray),this.filterOnTypeDomNode.title=m("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=m("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=m("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!ET.isDefault(e.filterData))}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),nt(this.disposables)}}function UR(e){let t=yR.Unknown;return Xo(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=yR.Twistie:Xo(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=yR.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function YR(e,t){t(e),e.children.forEach(e=>YR(e,t))}class GR{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new bt,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var n;!(null===(n=t)||void 0===n?void 0:n.__forceEvent)&&Iu(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),n=t=>e.delete(t);return t.forEach(e=>YR(e,n)),void this.set([...e.values()])}const n=new Set,i=e=>n.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>YR(e,i));const o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>YR(e,r));const s=[];for(const a of this.nodes){const e=this.identityProvider.getId(a.element).toString(),t=n.has(e);if(t){const t=o.get(e);t&&s.push(t)}else s.push(a)}if(this.nodes.length>0&&0===s.length){const e=this.getFirstViewElementWithTrait();e&&s.push(e)}this._set(s,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class KR extends JO{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(zO(e.browserEvent.target)||VO(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,i=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"===typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!i&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const n=this.tree.model,r=n.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([r]),n.setCollapsed(r,void 0,s),o&&i)return}super.onViewPointer(e)}onDoubleClick(e){const t=e.browserEvent.target.classList.contains("monaco-tl-twistie");!t&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class qR extends aR{constructor(e,t,n,i,o,r,s,a){super(e,t,n,i,a),this.focusTrait=o,this.selectionTrait=r,this.anchorTrait=s}createMouseController(e){return new KR(this,e.tree)}splice(e,t,n=[]){if(super.splice(e,t,n),0===n.length)return;const i=[],o=[];let r;n.forEach((t,n)=>{this.focusTrait.has(t)&&i.push(e+n),this.selectionTrait.has(t)&&o.push(e+n),this.anchorTrait.has(t)&&(r=e+n)}),i.length>0&&super.setFocus(Ru([...super.getFocus(),...i])),o.length>0&&super.setSelection(Ru([...super.getSelection(),...o])),"number"===typeof r&&super.setAnchor(r)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(e=>this.element(e)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||("undefined"===typeof e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class JR{constructor(e,t,n,i,o={}){this._options=o,this.eventBufferer=new wt,this.disposables=new rt,this._onWillRefilter=new bt,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new bt;const r=new zR(n),s=new _t,a=new _t,l=new VR(a.event);this.renderers=i.map(e=>new QR(e,()=>this.model,s.event,l,o));for(let u of this.renderers)this.disposables.add(u);let c;o.keyboardNavigationLabelProvider&&(c=new WR(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:c}),this.disposables.add(c)),this.focus=new GR(()=>this.view.getFocusedElements()[0],o.identityProvider),this.selection=new GR(()=>this.view.getSelectedElements()[0],o.identityProvider),this.anchor=new GR(()=>this.view.getAnchorElement(),o.identityProvider),this.view=new qR(e,t,r,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},jR(()=>this.model,o)),{tree:this})),this.model=this.createModel(e,this.view,o),s.input=this.model.onDidChangeCollapseState;const h=pt.forEach(this.model.onDidSplice,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})});if(h(()=>null,null,this.disposables),a.input=pt.chain(pt.any(h,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]}).event,!1!==o.keyboardSupport){const e=pt.chain(this.view.onKeyDown).filter(e=>!zO(e.target)).map(e=>new Ki(e));e.filter(e=>15===e.keyCode).on(this.onLeftArrow,this,this.disposables),e.filter(e=>17===e.keyCode).on(this.onRightArrow,this,this.disposables),e.filter(e=>10===e.keyCode).on(this.onSpace,this,this.disposables)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||WO;this.typeFilterController=new HR(this,this.model,this.view,c,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=ir(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===OR.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return pt.map(this.view.onMouseDblClick,UR)}get onPointer(){return pt.map(this.view.onPointer,UR)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return"undefined"===typeof this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return"undefined"===typeof this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===OR.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t="."+this.view.domId,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join("\n"),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const n=e.map(e=>this.model.getNode(e));this.selection.set(n,t);const i=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(i,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const n=e.map(e=>this.model.getNode(e));this.focus.set(n,t);const i=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(i,t,!0)}focusNext(e=1,t=!1,n,i=this.focusNavigationFilter){this.view.focusNext(e,t,n,i)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const n=this.model.getListIndex(e);-1!==n&&this.view.reveal(n,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n),o=this.model.setCollapsed(i,!0);if(!o){const e=this.model.getParentNodeLocation(i);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n),o=this.model.setCollapsed(i,!1);if(!o){if(!n.children.some(e=>e.visible))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n),o=e.browserEvent.altKey;this.model.setCollapsed(i,void 0,o)}dispose(){nt(this.disposables),this.view.dispose()}}class $R{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new LR(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(e,t){return n.sorter.compare(e.element,t.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=Ue.empty(),n={}){const i=this.getElementLocation(e);this._setChildren(i,this.preserveCollapseState(t),n)}_setChildren(e,t=Ue.empty(),n){const i=new Set,o=new Set,r=e=>{var t;if(null===e.element)return;const r=e;if(i.add(r.element),this.nodes.set(r.element,r),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.add(e),this.nodesByIdentity.set(e,r)}null===(t=n.onDidCreateNode)||void 0===t||t.call(n,r)},s=e=>{var t;if(null===e.element)return;const r=e;if(i.has(r.element)||this.nodes.delete(r.element),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=n.onDidDeleteNode)||void 0===t||t.call(n,r)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},n),{onDidCreateNode:r,onDidDeleteNode:s}))}preserveCollapseState(e=Ue.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),Ue.map(e,e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const n=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(n)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const n="boolean"===typeof e.collapsible?e.collapsible:t.collapsible,i="undefined"!==typeof e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:n,collapsed:i,children:this.preserveCollapseState(e.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getElementLocation(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new ER(this.user,"Tree element not found: "+e);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new ER(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new ER(this.user,"Tree element not found: "+e);const n=this.model.getNodeLocation(t),i=this.model.getParentNodeLocation(n),o=this.model.getNode(i);return o.element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new ER(this.user,"Tree element not found: "+e);return this.model.getNodeLocation(t)}}function XR(e){const t=[e.element],n=e.incompressible||!1;return{element:{elements:t,incompressible:n},children:Ue.map(Ue.from(e.children),XR),collapsible:e.collapsible,collapsed:e.collapsed}}function ZR(e){const t=[e.element],n=e.incompressible||!1;let i,o;while(1){if([o,i]=Ue.consume(Ue.from(e.children),2),1!==o.length)break;if(o[0].incompressible)break;e=o[0],t.push(e.element)}return{element:{elements:t,incompressible:n},children:Ue.map(Ue.concat(o,i),ZR),collapsible:e.collapsible,collapsed:e.collapsed}}function eP(e,t=0){let n;return n=t<e.element.elements.length-1?[eP(e,t+1)]:Ue.map(Ue.from(e.children),e=>eP(e,0)),0===t&&e.element.incompressible?{element:e.element.elements[t],children:n,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:n,collapsible:e.collapsible,collapsed:e.collapsed}}function tP(e){return eP(e,0)}function nP(e,t,n){return e.element===t?Object.assign(Object.assign({},e),{children:n}):Object.assign(Object.assign({},e),{children:Ue.map(Ue.from(e.children),e=>nP(e,t,n))})}const iP=e=>({getId(t){return t.elements.map(t=>e.getId(t).toString()).join("\0")}});class oP{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new $R(e,t,n),this.enabled="undefined"===typeof n.compressionEnabled||n.compressionEnabled,this.identityProvider=n.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=Ue.empty(),n){const i=n.diffIdentityProvider&&iP(n.diffIdentityProvider);if(null===e){const e=Ue.map(t,this.enabled?ZR:XR);return void this._setChildren(null,e,{diffIdentityProvider:i,diffDepth:1/0})}const o=this.nodes.get(e);if(!o)throw new Error("Unknown compressed tree node");const r=this.model.getNode(o),s=this.model.getParentNodeLocation(o),a=this.model.getNode(s),l=tP(r),c=nP(l,e,t),h=(this.enabled?ZR:XR)(c),u=a.children.map(e=>e===r?h:e);this._setChildren(a.element,u,{diffIdentityProvider:i,diffDepth:r.depth-a.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode(),n=t.children,i=Ue.map(n,tP),o=Ue.map(i,e?ZR:XR);this._setChildren(null,o,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){const i=new Set,o=e=>{for(const t of e.element.elements)i.add(t),this.nodes.set(t,e.element)},r=e=>{for(const t of e.element.elements)i.has(t)||this.nodes.delete(t)};this.model.setChildren(e,t,Object.assign(Object.assign({},n),{onDidCreateNode:o,onDidDeleteNode:r}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if("undefined"===typeof e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return null===n?null:n.elements[n.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getCompressedNode(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new ER(this.user,"Tree element not found: "+e);return t}}const rP=e=>e[e.length-1];class sP{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new sP(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function aP(e,t){return{splice(n,i,o){t.splice(n,i,o.map(t=>e.map(t)))},updateElementHeight(e,n){t.updateElementHeight(e,n)}}}function lP(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId(n){return t.identityProvider.getId(e(n))}},sorter:t.sorter&&{compare(e,n){return t.sorter.compare(e.elements[0],n.elements[0])}},filter:t.filter&&{filter(n,i){return t.filter.filter(e(n),i)}}})}class cP{constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||rP;const i=e=>this.elementMapper(e.elements);this.nodeMapper=new xR(e=>new sP(i,e)),this.model=new oP(e,aP(this.nodeMapper,t),lP(i,n))}get onDidSplice(){return pt.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(e=>this.nodeMapper.map(e)),deletedNodes:t.map(e=>this.nodeMapper.map(e))}))}get onDidChangeCollapseState(){return pt.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return pt.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=Ue.empty(),n={}){this.model.setChildren(e,t,n)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var hP=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class uP extends JR{constructor(e,t,n,i,o={}){super(e,t,n,i,o)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=Ue.empty(),n){this.model.setChildren(e,t,n)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new $R(e,t,n)}}class dP{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,n,i){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,i)):(n.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,n.data,i))}disposeElement(e,t,n,i){n.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(n.compressedTreeNode,t,n.data,i):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.data,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}function pP(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(n){let i;try{i=e().getCompressedTreeNode(n)}catch(o){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return 1===i.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}hP([bb],dP.prototype,"compressedTreeNodeProvider",null);class fP extends uP{constructor(e,t,n,i,o={}){const r=()=>this,s=i.map(e=>new dP(r,e));super(e,t,n,s,pP(r,o))}setChildren(e,t=Ue.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new cP(e,t,n)}updateOptions(e={}){super.updateOptions(e),"undefined"!==typeof e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var gP=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function mP(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function bP(e,t){return!!t.parent&&(t.parent===e||bP(e,t.parent))}function vP(e,t){return e===t||bP(e,t)||bP(t,e)}class yP{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new yP(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class wP{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...TR.classNamesArray),!0):(t.classList.remove(...TR.classNamesArray),!1)}disposeElement(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function _P(e){return{browserEvent:e.browserEvent,elements:e.elements.map(e=>e.element)}}function CP(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class AP extends kO{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function EP(e){return e instanceof kO?new AP(e):e}class xP{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(EP(e),t)}onDragOver(e,t,n,i,o=!0){return this.dnd.onDragOver(EP(e),t&&t.element,n,i)}drop(e,t,n,i){this.dnd.drop(EP(e),t&&t.element,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function SP(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new xP(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var n;return!!(null===(n=e.accessibilityProvider)||void 0===n?void 0:n.isChecked(t.element))}:void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter(t,n){return e.filter.filter(t.element,n)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}),sorter:void 0,expandOnlyOnTwistieClick:"undefined"===typeof e.expandOnlyOnTwistieClick?void 0:"function"!==typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function kP(e,t){t(e),e.children.forEach(e=>kP(e,t))}class DP{constructor(e,t,n,i,o,r={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new bt,this._onDidChangeNodeSlowState=new bt,this.nodeMapper=new xR(e=>new yP(e)),this.disposables=new rt,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren="undefined"!==typeof r.autoExpandSingleChildren&&r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,n,i,r),this.root=mP({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return pt.map(this.tree.onDidChangeFocus,_P)}get onDidChangeSelection(){return pt.map(this.tree.onDidChangeSelection,_P)}get onMouseDblClick(){return pt.map(this.tree.onMouseDblClick,CP)}get onPointer(){return pt.map(this.tree.onPointer,CP)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,n,i,o){const r=new zR(n),s=i.map(e=>new wP(e,this.nodeMapper,this._onDidChangeNodeSlowState.event)),a=SP(o)||{};return new uP(e,t,r,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return gP(this,void 0,void 0,(function*(){this.refreshPromises.forEach(e=>e.cancel()),this.refreshPromises.clear(),this.root.element=e;const n=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&"number"===typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,n=!1,i,o){return gP(this,void 0,void 0,(function*(){if("undefined"===typeof this.root.element)throw new ER(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield pt.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,i,o),n)try{this.tree.rerender(r)}catch(s){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}expand(e,t=!1){return gP(this,void 0,void 0,(function*(){if("undefined"===typeof this.root.element)throw new ER(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield pt.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n))return!1;if(n.refreshPromise&&(yield this.root.refreshPromise,yield pt.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n))return!1;const i=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(yield this.root.refreshPromise,yield pt.toPromise(this._onDidRender.event)),i}))}setSelection(e,t){const n=e.map(e=>this.getDataNode(e));this.tree.setSelection(n,t)}getSelection(){const e=this.tree.getSelection();return e.map(e=>e.element)}setFocus(e,t){const n=e.map(e=>this.getDataNode(e));this.tree.setFocus(n,t)}getFocus(){const e=this.tree.getFocus();return e.map(e=>e.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new ER(this.user,"Data tree node not found: "+e);return t}refreshAndRenderNode(e,t,n,i){return gP(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,n),this.render(e,n,i)}))}refreshNode(e,t,n){return gP(this,void 0,void 0,(function*(){let i;return this.subTreeRefreshPromises.forEach((o,r)=>{!i&&vP(r,e)&&(i=o.then(()=>this.refreshNode(e,t,n)))}),i||this.doRefreshSubTree(e,t,n)}))}doRefreshSubTree(e,t,n){return gP(this,void 0,void 0,(function*(){let i;e.refreshPromise=new Promise(e=>i=e),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const o=yield this.doRefreshNode(e,t,n);e.stale=!1,yield go.settled(o.map(e=>this.doRefreshSubTree(e,t,n)))}finally{i()}}))}doRefreshNode(e,t,n){return gP(this,void 0,void 0,(function*(){let i;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=ao(800);t.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},e=>null),i=this.doGetChildren(e).finally(()=>t.cancel())}else i=Promise.resolve(Ue.empty());try{const o=yield i;return this.setChildren(e,o,t,n)}catch(o){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),je(o))return[];throw o}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=io(()=>gP(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)}))),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Oe))}setChildren(e,t,n,i){const o=[...t];if(0===e.children.length&&0===o.length)return[];const r=new Map,s=new Map;for(const c of e.children)if(r.set(c.element,c),this.identityProvider){const e=this.tree.isCollapsed(c);s.set(c.id,{node:c,collapsed:e})}const a=[],l=o.map(t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const n=mP({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(n.collapsedByDefault=!1,a.push(n)),n}const l=this.identityProvider.getId(t).toString(),c=s.get(l);if(c){const e=c.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,n?c.collapsed?(e.children.forEach(e=>kP(e,e=>this.nodes.delete(e.element))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const h=mP({element:t,parent:e,id:l,hasChildren:o});return i&&i.viewState.focus&&i.viewState.focus.indexOf(l)>-1&&i.focus.push(h),i&&i.viewState.selection&&i.viewState.selection.indexOf(l)>-1&&i.selection.push(h),i&&i.viewState.expanded&&i.viewState.expanded.indexOf(l)>-1?a.push(h):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(h.collapsedByDefault=!1,a.push(h)),h});for(const c of r.values())kP(c,e=>this.nodes.delete(e.element));for(const c of l)this.nodes.set(c.element,c);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,n){const i=e.children.map(e=>this.asTreeElement(e,t)),o=n&&Object.assign(Object.assign({},n),{diffIdentityProvider:n.diffIdentityProvider&&{getId(e){return n.diffIdentityProvider.getId(e.element)}}});this.tree.setChildren(e===this.root?null:e,i,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return n=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?Ue.map(e.children,e=>this.asTreeElement(e,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class LP{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new LP(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class IP{constructor(e,t,n,i){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderCompressedElements(e,t,n,i){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...TR.classNamesArray),!0):(t.classList.remove(...TR.classNamesArray),!1)}disposeElement(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)}disposeCompressedElements(e,t,n,i){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=nt(this.disposables)}}function NP(e){const t=e&&SP(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(e=>e.element))}})})}class MP extends DP{constructor(e,t,n,i,o,r,s={}){super(e,t,n,o,r,s),this.compressionDelegate=i,this.compressibleNodeMapper=new xR(e=>new LP(e)),this.filter=s.filter}createTree(e,t,n,i,o){const r=new zR(n),s=i.map(e=>new IP(e,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),a=NP(o)||{};return new fP(e,t,r,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),i=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},o=i(this.tree.getSelection()),r=i(this.tree.getFocus());super.render(e,t);const s=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const h=e=>{const t=e.element;if(t)for(let i=0;i<t.elements.length;i++){const e=n(t.elements[i].element),h=t.elements[t.elements.length-1].element;o.has(e)&&-1===s.indexOf(h)&&(s.push(h),a=!0),r.has(e)&&-1===l.indexOf(h)&&(l.push(h),c=!0)}e.children.forEach(h)};h(this.tree.getCompressedTreeNode(e===this.root?null:e)),a&&this.setSelection(s),c&&this.setFocus(l)}processChildren(e){return this.filter&&(e=Ue.filter(e,e=>{const t=this.filter.filter(e,1),n=BP(t);if(2===n)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===n})),super.processChildren(e)}}function BP(e){return"boolean"===typeof e?e?1:0:SR(e)?kR(e.visibility):kR(e)}class TP extends JR{constructor(e,t,n,i,o,r={}){super(e,t,n,i,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,n){return new $R(e,t,n)}}new ig("isWindows",b["i"],m("isWindows","Whether the operating system is Windows"));const OP="inputFocus";var RP=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},PP=function(e,t){return function(n,i){t(n,i,e)}};const FP=Ai("listService");let jP=class{constructor(e){this._themeService=e,this.disposables=new rt,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new $O(ir(),"");this.disposables.add(JT(e,this._themeService))}if(this.lists.some(t=>t.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:t};return this.lists.push(n),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),it(e.onDidFocus(()=>this._lastFocusedWidget=e),ot(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(e=>e!==n),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};jP=RP([PP(0,Em)],jP);const zP=new ig("listFocus",!0),VP=new ig("listSupportsMultiselect",!0),QP=(Pf.and(zP,Pf.not(OP)),new ig("listHasSelectionOrFocus",!1)),WP=new ig("listDoubleSelection",!1),HP=new ig("listMultiSelection",!1),UP=new ig("listSelectionNavigation",!1),YP="listAutomaticKeyboardNavigation";function GP(e,t){const n=e.createScoped(t.getHTMLElement());return zP.bindTo(n),n}const KP="workbench.list.multiSelectModifier",qP="workbench.list.openMode",JP="workbench.list.horizontalScrolling",$P="workbench.list.keyboardNavigation",XP="workbench.list.automaticKeyboardNavigation",ZP="workbench.tree.indent",eF="workbench.tree.renderIndentGuides",tF="workbench.list.smoothScrolling",nF="workbench.list.mouseWheelScrollSensitivity",iF="workbench.list.fastScrollSensitivity",oF="workbench.tree.expandMode";function rF(e){return"alt"===e.getValue(KP)}class sF extends st{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=rF(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(KP)&&(this.useAltAsMultipleSelectionModifier=rF(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:YO(e)}isSelectionRangeChangeEvent(e){return GO(e)}}function aF(e,t,n){var i;const o=new rt,r=Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter(e){return n.mightProducePrintableCharacter(e)}},smoothScrolling:Boolean(t.getValue(tF)),mouseWheelScrollSensitivity:t.getValue(nF),fastScrollSensitivity:t.getValue(iF),multipleSelectionController:null!==(i=e.multipleSelectionController)&&void 0!==i?i:o.add(new sF(t))});return[r,o]}let lF=class extends aR{constructor(e,t,n,i,o,r,s,a,l,c){const h="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(JP)),[u,d]=aF(o,l,c);super(e,t,n,i,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},KT(a.getColorTheme(),$T)),u),{horizontalScrolling:h})),this.disposables.add(d),this.contextKeyService=GP(r,this),this.themeService=a,this.listSupportsMultiSelect=VP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);const p=UP.bindTo(this.contextKeyService);p.set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=QP.bindTo(this.contextKeyService),this.listDoubleSelection=WP.bindTo(this.contextKeyService),this.listMultiSelection=HP.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=rF(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(KP)&&(this._useAltAsMultipleSelectionModifier=rF(l));let t={};if(e.affectsConfiguration(JP)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(JP));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tF)){const e=Boolean(l.getValue(tF));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(nF)){const e=l.getValue(nF);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(iF)){const e=l.getValue(iF);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new dF(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=JT(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};lF=RP([PP(5,og),PP(6,FP),PP(7,Em),PP(8,yf),PP(9,ON)],lF);let cF=class extends uR{constructor(e,t,n,i,o,r,s,a,l,c){const h="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(JP)),[u,d]=aF(o,l,c);super(e,t,n,i,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},KT(a.getColorTheme(),$T)),u),{horizontalScrolling:h})),this.disposables=new rt,this.disposables.add(d),this.contextKeyService=GP(r,this),this.themeService=a,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=VP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);const p=UP.bindTo(this.contextKeyService);p.set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=rF(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add(JT(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(KP)&&(this._useAltAsMultipleSelectionModifier=rF(l));let t={};if(e.affectsConfiguration(JP)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(JP));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tF)){const e=Boolean(l.getValue(tF));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(nF)){const e=l.getValue(nF);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(iF)){const e=l.getValue(iF);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new dF(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=JT(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};cF=RP([PP(5,og),PP(6,FP),PP(7,Em),PP(8,yf),PP(9,ON)],cF);let hF=class extends AR{constructor(e,t,n,i,o,r,s,a,l,c,h){const u="undefined"!==typeof r.horizontalScrolling?r.horizontalScrolling:Boolean(c.getValue(JP)),[d,p]=aF(r,c,h);super(e,t,n,i,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},KT(l.getColorTheme(),$T)),d),{horizontalScrolling:u})),this.disposables=new rt,this.disposables.add(p),this.contextKeyService=GP(s,this),this.themeService=l,this.listSupportsMultiSelect=VP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==r.multipleSelectionSupport);const f=UP.bindTo(this.contextKeyService);f.set(Boolean(r.selectionNavigation)),this.listHasSelectionOrFocus=QP.bindTo(this.contextKeyService),this.listDoubleSelection=WP.bindTo(this.contextKeyService),this.listMultiSelection=HP.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=rF(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(c.onDidChangeConfiguration(e=>{e.affectsConfiguration(KP)&&(this._useAltAsMultipleSelectionModifier=rF(c));let t={};if(e.affectsConfiguration(JP)&&void 0===this.horizontalScrolling){const e=Boolean(c.getValue(JP));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(tF)){const e=Boolean(c.getValue(tF));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(nF)){const e=c.getValue(nF);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(iF)){const e=c.getValue(iF);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new pF(this,Object.assign({configurationService:c},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=JT(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};hF=RP([PP(6,og),PP(7,FP),PP(8,Em),PP(9,yf),PP(10,ON)],hF);class uF extends st{constructor(e,t){var n;super(),this.widget=e,this._onDidOpen=this._register(new bt),this.onDidOpen=this._onDidOpen.event,this._register(pt.filter(this.widget.onDidChangeSelection,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onSelectionFromKeyboard(e))),this._register(this.widget.onPointer(e=>this.onPointer(e.element,e.browserEvent))),this._register(this.widget.onMouseDblClick(e=>this.onMouseDblClick(e.element,e.browserEvent))),"boolean"!==typeof(null===t||void 0===t?void 0:t.openOnSingleClick)&&(null===t||void 0===t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null===t||void 0===t?void 0:t.configurationService.getValue(qP)),this._register(null===t||void 0===t?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick="doubleClick"!==(null===t||void 0===t?void 0:t.configurationService.getValue(qP))}))):this.openOnSingleClick=null===(n=null===t||void 0===t?void 0:t.openOnSingleClick)||void 0===n||n}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,n="boolean"!==typeof t.preserveFocus||t.preserveFocus,i="boolean"===typeof t.pinned?t.pinned:!n,o=!1;this._open(this.getSelectedElement(),n,i,o,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;const n=2===t.detail;if(n)return;const i=1===t.button,o=!0,r=i,s=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,r,s,t)}onMouseDblClick(e,t){if(!t)return;const n=t.target,i=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16;if(i)return;const o=!1,r=!0,s=t.ctrlKey||t.metaKey||t.altKey;this._open(e,o,r,s,t)}_open(e,t,n,i,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:i,element:e,browserEvent:o})}}class dF extends uF{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class pF extends uF{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class fF extends uF{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function gF(e,t){let n=!1;return i=>{if(n)return n=!1,!1;const o=t.softDispatch(i,e);return o&&o.enterChord?(n=!0,!1):(n=!1,!0)}}let mF=class extends uP{constructor(e,t,n,i,o,r,s,a,l,c,h){const{options:u,getAutomaticKeyboardNavigation:d,disposable:p}=_F(t,o,r,l,c,h);super(e,t,n,i,u),this.disposables.add(p),this.internals=new CF(this,o,d,o.overrideStyles,r,s,a,l,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};mF=RP([PP(5,og),PP(6,FP),PP(7,Em),PP(8,yf),PP(9,ON),PP(10,kL)],mF);let bF=class extends fP{constructor(e,t,n,i,o,r,s,a,l,c,h){const{options:u,getAutomaticKeyboardNavigation:d,disposable:p}=_F(t,o,r,l,c,h);super(e,t,n,i,u),this.disposables.add(p),this.internals=new CF(this,o,d,o.overrideStyles,r,s,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};bF=RP([PP(5,og),PP(6,FP),PP(7,Em),PP(8,yf),PP(9,ON),PP(10,kL)],bF);let vF=class extends TP{constructor(e,t,n,i,o,r,s,a,l,c,h,u){const{options:d,getAutomaticKeyboardNavigation:p,disposable:f}=_F(t,r,s,c,h,u);super(e,t,n,i,o,d),this.disposables.add(f),this.internals=new CF(this,r,p,r.overrideStyles,s,a,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};vF=RP([PP(6,og),PP(7,FP),PP(8,Em),PP(9,yf),PP(10,ON),PP(11,kL)],vF);let yF=class extends DP{constructor(e,t,n,i,o,r,s,a,l,c,h,u){const{options:d,getAutomaticKeyboardNavigation:p,disposable:f}=_F(t,r,s,c,h,u);super(e,t,n,i,o,d),this.disposables.add(f),this.internals=new CF(this,r,p,r.overrideStyles,s,a,l,c,u),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};yF=RP([PP(6,og),PP(7,FP),PP(8,Em),PP(9,yf),PP(10,ON),PP(11,kL)],yF);let wF=class extends MP{constructor(e,t,n,i,o,r,s,a,l,c,h,u,d){const{options:p,getAutomaticKeyboardNavigation:f,disposable:g}=_F(t,s,a,h,u,d);super(e,t,n,i,o,r,p),this.disposables.add(g),this.internals=new CF(this,s,f,s.overrideStyles,a,l,c,h,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function _F(e,t,n,i,o,r){var s;const a=()=>{let e=Boolean(n.getContextKeyValue(YP));return e&&(e=Boolean(i.getValue(XP))),e},l=r.isScreenReaderOptimized(),c=t.simpleKeyboardNavigation||l?"simple":i.getValue($P),h=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(i.getValue(JP)),[u,d]=aF(t,i,o),p=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},u),{indent:"number"===typeof i.getValue(ZP)?i.getValue(ZP):void 0,renderIndentGuides:i.getValue(eF),smoothScrolling:Boolean(i.getValue(tF)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===c,filterOnType:"filter"===c,horizontalScrolling:h,keyboardNavigationEventFilter:gF(e,o),additionalScrollHeight:p,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(s=t.expandOnlyOnTwistieClick)&&void 0!==s?s:"doubleClick"===i.getValue(oF)})}}wF=RP([PP(7,og),PP(8,FP),PP(9,Em),PP(10,yf),PP(11,ON),PP(12,kL)],wF);let CF=class{constructor(e,t,n,i,o,r,s,a,l){this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=GP(o,e),this.listSupportsMultiSelect=VP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);const c=UP.bindTo(this.contextKeyService);c.set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=QP.bindTo(this.contextKeyService),this.hasDoubleSelection=WP.bindTo(this.contextKeyService),this.hasMultiSelection=HP.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=rF(a);const h=new Set;h.add(YP);const u=()=>{const t=l.isScreenReaderOptimized(),n=t?"simple":a.getValue($P);e.updateOptions({simpleKeyboardNavigation:"simple"===n,filterOnType:"filter"===n})};this.updateStyleOverrides(i),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const t=e.getSelection(),n=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(t.length>0||n.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)})}),e.onDidChangeFocus(()=>{const t=e.getSelection(),n=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||n.length>0)}),a.onDidChangeConfiguration(i=>{let o={};if(i.affectsConfiguration(KP)&&(this._useAltAsMultipleSelectionModifier=rF(a)),i.affectsConfiguration(ZP)){const e=a.getValue(ZP);o=Object.assign(Object.assign({},o),{indent:e})}if(i.affectsConfiguration(eF)){const e=a.getValue(eF);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(i.affectsConfiguration(tF)){const e=Boolean(a.getValue(tF));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(i.affectsConfiguration($P)&&u(),i.affectsConfiguration(XP)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:n()})),i.affectsConfiguration(JP)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(JP));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(i.affectsConfiguration(oF)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(oF)})),i.affectsConfiguration(nF)){const e=a.getValue(nF);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(i.affectsConfiguration(iF)){const e=a.getValue(iF);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)}),this.contextKeyService.onDidChangeContext(t=>{t.affectsSome(h)&&e.updateOptions({automaticKeyboardNavigation:n()})}),l.onDidChangeScreenReaderOptimized(()=>u())),this.navigator=new fF(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){nt(this.styler),this.styler=e?JT(this.tree,this.themeService,e):st.None}dispose(){this.disposables=nt(this.disposables),nt(this.styler),this.styler=void 0}};CF=RP([PP(4,og),PP(5,FP),PP(6,Em),PP(7,yf),PP(8,kL)],CF);const AF=Np.as(Rp.Configuration);var EF,xF;AF.registerConfiguration({id:"workbench",order:7,title:m("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[KP]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[m("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:m({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[qP]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[JP]:{type:"boolean",default:!1,description:m("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[ZP]:{type:"number",default:8,minimum:0,maximum:40,description:m("tree indent setting","Controls tree indentation in pixels.")},[eF]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:m("render tree indent guides","Controls whether the tree should render indent guides.")},[tF]:{type:"boolean",default:!1,description:m("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[nF]:{type:"number",default:1,description:m("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[iF]:{type:"number",default:5,description:m("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[$P]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[m("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),m("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),m("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:m("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[XP]:{type:"boolean",default:!0,markdownDescription:m("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[oF]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}}),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(EF||(EF={})),function(e){function t(e,t){return t-e}e.compare=t;const n=Object.create(null);function i(e){return n[e]||""}function o(t){switch(t){case Cp.Error:return e.Error;case Cp.Warning:return e.Warning;case Cp.Info:return e.Info;case Cp.Ignore:return e.Hint}}function r(t){switch(t){case e.Error:return Cp.Error;case e.Warning:return Cp.Warning;case e.Info:return Cp.Info;case e.Hint:return Cp.Ignore}}n[e.Error]=m("sev.error","Error"),n[e.Warning]=m("sev.warning","Warning"),n[e.Info]=m("sev.info","Info"),e.toString=i,e.fromSeverity=o,e.toSeverity=r}(EF||(EF={})),function(e){const t="";function n(e){return i(e,!0)}function i(e,n){let i=[t];return e.source?i.push(e.source.replace("¦","\\¦")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("¦","\\¦")):i.push(e.code.value.replace("¦","\\¦")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(EF.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("¦","\\¦")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("¦")}e.makeKey=n,e.makeKeyOptionalMessage=i}(xF||(xF={}));const SF=Ai("markerService");class kF{constructor(){this._byResource=new Qs,this._byOwner=new Map}set(e,t,n){let i=this._byResource.get(e);i||(i=new Map,this._byResource.set(e,i)),i.set(t,n);let o=this._byOwner.get(t);o||(o=new Qs,this._byOwner.set(t,o)),o.set(e,n)}get(e,t){let n=this._byResource.get(e);return null===n||void 0===n?void 0:n.get(t)}delete(e,t){let n=!1,i=!1,o=this._byResource.get(e);o&&(n=o.delete(t));let r=this._byOwner.get(t);if(r&&(i=r.delete(e)),n!==i)throw new Error("illegal state");return n&&i}values(e){var t,n,i,o;return"string"===typeof e?null!==(n=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==n?n:Ue.empty():wn.isUri(e)?null!==(o=null===(i=this._byResource.get(e))||void 0===i?void 0:i.values())&&void 0!==o?o:Ue.empty():Ue.map(Ue.concat(...this._byOwner.values()),e=>e[1])}}class DF{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Qs,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===mo.inMemory||e.scheme===mo.walkThrough||e.scheme===mo.walkThroughSnippet)return t;for(const{severity:n}of this._service.read({resource:e}))n===EF.Error?t.errors+=1:n===EF.Warning?t.warnings+=1:n===EF.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class LF{constructor(){this._onMarkerChanged=new yt({delay:0,merge:LF._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new kF,this._stats=new DF(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(Bu(n)){const n=this._data.delete(t,e);n&&this._onMarkerChanged.fire([t])}else{const i=[];for(const o of n){const n=LF._toMarker(e,t,o);n&&i.push(n)}this._data.set(t,e,i),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:h,relatedInformation:u,tags:d}=n;if(r)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,h=h>0?h:l,{resource:t,owner:e,code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:h,relatedInformation:u,tags:d}}read(e=Object.create(null)){let{owner:t,resource:n,severities:i,take:o}=e;if((!o||o<0)&&(o=-1),t&&n){const e=this._data.get(n,t);if(e){const t=[];for(const n of e)if(LF._accept(n,i)){const e=t.push(n);if(o>0&&e===o)break}return t}return[]}if(t||n){const e=this._data.values(null!==n&&void 0!==n?n:t),r=[];for(const t of e)for(const e of t)if(LF._accept(e,i)){const t=r.push(e);if(o>0&&t===o)return r}return r}{const e=[];for(let t of this._data.values())for(let n of t)if(LF._accept(n,i)){const t=e.push(n);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new Qs;for(let n of e)for(let e of n)t.set(e,!0);return Array.from(t.keys())}}var IF,NF=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};(function(e){e[e["None"]=0]="None",e[e["Initialized"]=1]="Initialized",e[e["Closed"]=2]="Closed"})(IF||(IF={}));class MF extends st{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new bt),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=IF.None,this.cache=new Map,this.flushDelayer=new so(MF.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,n;null===(t=e.changed)||void 0===t||t.forEach((e,t)=>this.accept(t,e)),null===(n=e.deleted)||void 0===n||n.forEach(e=>this.accept(e,void 0))}accept(e,t){if(this.state===IF.Closed)return;let n=!1;if(la(t))n=this.cache.delete(e);else{const i=this.cache.get(e);i!==t&&(this.cache.set(e,t),n=!0)}n&&this._onDidChangeStorage.fire(e)}get(e,t){const n=this.cache.get(e);return la(n)?t:n}getBoolean(e,t){const n=this.get(e);return la(n)?t:"true"===n}getNumber(e,t){const n=this.get(e);return la(n)?t:parseInt(n,10)}set(e,t){return NF(this,void 0,void 0,(function*(){if(this.state===IF.Closed)return;if(la(t))return this.delete(e);const n=String(t),i=this.cache.get(e);return i!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())):void 0}))}delete(e){return NF(this,void 0,void 0,(function*(){if(this.state===IF.Closed)return;const t=this.cache.delete(e);return t?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return NF(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var e;if(!this.hasPending)while(this.whenFlushedCallbacks.length)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()})}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}MF.DEFAULT_FLUSH_DELAY=100;class BF{constructor(){this.onDidChangeItemsExternal=pt.None,this.items=new Map}updateItems(e){return NF(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach((e,t)=>this.items.set(t,e)),e.delete&&e.delete.forEach(e=>this.items.delete(e))}))}}const TF="__$__targetStorageMarker",OF=Ai("storageService");var RF;(function(e){e[e["NONE"]=0]="NONE",e[e["SHUTDOWN"]=1]="SHUTDOWN"})(RF||(RF={}));class PF extends st{constructor(e={flushInterval:PF.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new vt),this._onDidChangeTarget=this._register(new vt),this._onWillSaveState=this._register(new bt),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===TF?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,n){var i;return null===(i=this.getStorage(t))||void 0===i?void 0:i.get(e,n)}getBoolean(e,t,n){var i;return null===(i=this.getStorage(t))||void 0===i?void 0:i.getBoolean(e,n)}getNumber(e,t,n){var i;return null===(i=this.getStorage(t))||void 0===i?void 0:i.getNumber(e,n)}store(e,t,n,i){la(t)?this.remove(e,n):this.withPausedEmitters(()=>{var o;this.updateKeyTarget(e,n,i),null===(o=this.getStorage(n))||void 0===o||o.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var n;this.updateKeyTarget(e,t,void 0),null===(n=this.getStorage(t))||void 0===n||n.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n){var i,o;const r=this.getKeyTargets(t);"number"===typeof n?r[e]!==n&&(r[e]=n,null===(i=this.getStorage(t))||void 0===i||i.set(TF,JSON.stringify(r))):"number"===typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(TF,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(TF,e);if(t)try{return JSON.parse(t)}catch(n){}return Object.create(null)}}PF.DEFAULT_FLUSH_INTERVAL=6e4;class FF extends PF{constructor(){super(),this.globalStorage=this._register(new MF(new BF)),this.workspaceStorage=this._register(new MF(new BF)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.globalStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e)))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}var jF=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},zF=function(e,t){return function(n,i){t(n,i,e)}};let VF=class{constructor(e){this._commandService=e}createMenu(e,t,n){return new QF(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},n),this._commandService,t,this)}};VF=jF([zF(0,va)],VF);let QF=class e{constructor(e,t,n,i,o){this._id=e,this._options=t,this._commandService=n,this._contextKeyService=i,this._menuService=o,this._disposables=new rt,this._menuGroups=[],this._contextKeys=new Set,this._build();const r=new uo(()=>{this._build(),this._onDidChange.fire(this)},t.eventDebounceDelay);this._disposables.add(r),this._disposables.add(jm.onDidChangeMenu(t=>{t.has(e)&&r.schedule()}));const s=this._disposables.add(new rt),a=()=>{const e=new uo(()=>this._onDidChange.fire(this),t.eventDebounceDelay);s.add(e),s.add(i.onDidChangeContext(t=>{t.affectsSome(this._contextKeys)&&e.schedule()}))};this._onDidChange=new bt({onFirstListenerAdd:a,onLastListenerRemove:s.clear.bind(s)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=jm.getMenuItems(this._id);let n;t.sort(e._compareMenuItems);for(const e of t){const t=e.group||"";n&&n[0]===t||(n=[t,[]],this._menuGroups.push(n)),n[1].push(e),this._collectContextKeys(e)}}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),Rm(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const n=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(n,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&jm.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let n of this._menuGroups){const[i,o]=n,r=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const n=Rm(t)?new Vm(t.command,t.alt,e,this._contextKeyService,this._commandService):new zm(t,this._menuService,this._contextKeyService,e);r.push(n)}r.length>0&&t.push([i,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}static _compareMenuItems(t,n){let i=t.group,o=n.group;if(i!==o){if(!i)return 1;if(!o)return-1;if("navigation"===i)return-1;if("navigation"===o)return 1;let e=i.localeCompare(o);if(0!==e)return e}let r=t.order||0,s=n.order||0;return r<s?-1:r>s?1:e._compareTitles(Rm(t)?t.command.title:t.title,Rm(n)?n.command.title:n.title)}static _compareTitles(e,t){const n="string"===typeof e?e:e.original,i="string"===typeof t?t:t.original;return n.localeCompare(i)}};QF=jF([zF(2,va),zF(3,og),zF(4,Fm)],QF);var WF=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},HF=function(e,t){return function(n,i){t(n,i,e)}};class UF extends st{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(ot(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const n=[...this._markersData.keys()];this._markersData.clear();const i=this.model.deltaDecorations(n,t);for(let o=0;o<i.length;o++)this._markersData.set(i[o],e[o]);return 0!==n.length||0!==i.length}getMarker(e){return this._markersData.get(e.id)}}let YF=class extends st{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new bt),this._markerDecorations=new Qs,e.getModels().forEach(e=>this._onModelAdded(e)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)})}_onModelAdded(e){const t=new UF(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==mo.inMemory&&e.uri.scheme!==mo.internal&&e.uri.scheme!==mo.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map(e=>e.owner).forEach(t=>this._markerService.remove(t,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let n=t.map(t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)}));e.update(t,n)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let n=Mn.lift(t);if(t.severity!==EF.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),n=e.validateRange(n),n.isEmpty()){let t=e.getWordAtPosition(n.getStartPosition());if(t)n=new Mn(n.startLineNumber,t.startColumn,n.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===t||(n=n.endColumn>=t?new Mn(n.startLineNumber,t-1,n.endLineNumber,t):new Mn(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){let i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i<n.endColumn&&(n=new Mn(n.startLineNumber,i,n.endLineNumber,n.endColumn),t.startColumn=i)}return n}_createDecorationOption(e){let t,n,i,o=void 0,r=void 0;switch(e.severity){case EF.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",n=0;break;case EF.Warning:t="squiggly-warning",o=km(qC),n=20,i={color:km(hC),position:Ka.Inline};break;case EF.Info:t="squiggly-info",o=km(JC),n=10;break;case EF.Error:default:t="squiggly-error",o=km(KC),n=30,i={color:km(cC),position:Ka.Inline};break}return e.tags&&(-1!==e.tags.indexOf(1)&&(r="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(r="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:o,position:Ga.Right},minimap:i,zIndex:n,inlineClassName:r}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};YF=WF([HF(0,zl),HF(1,SF)],YF);var GF=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},KF=function(e,t){return function(n,i){t(n,i,e)}};let qF=class extends st{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new bt,this._accessibilityModeEnabledContext=DL.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire())})),n(),this.onDidChangeScreenReaderOptimized(()=>n())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};qF=GF([KF(0,og),KF(1,yf)],qF);var JF=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class $F{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return JF(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(o){}const n=document.activeElement,i=document.body.appendChild(_r("textarea",{"aria-hidden":!0}));i.style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=e,i.focus(),i.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(i)}))}readText(e){return JF(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return""}}))}readFindText(){return JF(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return JF(this,void 0,void 0,(function*(){this.findText=e}))}}var XF=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},ZF=function(e,t){return function(n,i){t(n,i,e)}},ej=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const tj=!1;function nj(e){return e.scheme===mo.file?e.fsPath:e.path}let ij=0;class oj{constructor(e,t,n,i,o,r,s){this.id=++ij,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=i,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class rj{constructor(e,t){this.resourceLabel=e,this.reason=t}}class sj{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements){const n=0===i.reason?e:t;n.push(i.resourceLabel)}let n=[];return e.length>0&&n.push(m({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(m({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class aj{constructor(e,t,n,i,o,r,s){this.id=++ij,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=i,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"===typeof this.actual.split}removeResource(e,t,n){this.removedResources||(this.removedResources=new sj),this.removedResources.has(t)||this.removedResources.set(t,new rj(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new sj),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new rj(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class lj{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(" * [UNDO] "+this._past[t]);for(let t=this._future.length-1;t>=0;t--)e.push(" * [REDO] "+this._future[t]);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(const n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(const t of this._future)1===t.type&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let n=0,i=this._past.length;n<i;n++)t.push(this._past[n].id);for(let n=this._future.length-1;n>=0;n--)t.push(this._future[n].id);return new bM(e,t)}restoreSnapshot(e){const t=e.elements.length;let n=!0,i=0,o=-1;for(let s=0,a=this._past.length;s<a;s++,i++){const r=this._past[s];n&&(i>=t||r.id!==e.elements[i])&&(n=!1,o=0),n||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let s=this._future.length-1;s>=0;s--,i++){const o=this._future[s];n&&(i>=t||o.id!==e.elements[i])&&(n=!1,r=s),n||1!==o.type||o.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==r&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const n of this._past)e.push(n.actual);for(const n of this._future)t.push(n.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class cj{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;t<n;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const hj=new lj("","");hj.locked=!0;let uj=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){let t=[];for(const n of this._editStacks)t.push(n[1].toString())}pushElement(e,t=vM.None,n=yM.None){if(0===e.type){const i=nj(e.resource),o=this.getUriComparisonKey(e.resource);this._pushElement(new oj(e,i,o,t.id,t.nextOrder(),n.id,n.nextOrder()))}else{const i=new Set,o=[],r=[];for(const t of e.resources){const e=nj(t),n=this.getUriComparisonKey(t);i.has(n)||(i.add(n),o.push(e),r.push(n))}1===o.length?this._pushElement(new oj(e,o[0],r[0],t.id,t.nextOrder(),n.id,n.nextOrder())):this._pushElement(new aj(e,o,r,t.id,t.nextOrder(),n.id,n.nextOrder()))}tj&&this._print("pushElement")}_pushElement(e){for(let t=0,n=e.strResources.length;t<n;t++){const n=e.resourceLabels[t],i=e.strResources[t];let o;this._editStacks.has(i)?o=this._editStacks.get(i):(o=new lj(n,i),this._editStacks.set(i,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);if(e.hasFutureElements())return null;const n=e.getClosestPastElement();return n?n.actual:null}return null}_splitPastWorkspaceElement(e,t){const n=e.actual.split(),i=new Map;for(const o of n){const e=nj(o.resource),t=this.getUriComparisonKey(o.resource),n=new oj(o,e,t,0,0,0,0);i.set(n.strResource,n)}for(const o of e.strResources){if(t&&t.has(o))continue;const n=this._editStacks.get(o);n.splitPastWorkspaceElement(e,i)}}_splitFutureWorkspaceElement(e,t){const n=e.actual.split(),i=new Map;for(const o of n){const e=nj(o.resource),t=this.getUriComparisonKey(o.resource),n=new oj(o,e,t,0,0,0,0);i.set(n.strResource,n)}for(const o of e.strResources){if(t&&t.has(o))continue;const n=this._editStacks.get(o);n.splitFutureWorkspaceElement(e,i)}}removeElements(e){const t="string"===typeof e?e:this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);e.dispose(),this._editStacks.delete(t)}tj&&this._print("removeElements")}setElementsValidFlag(e,t,n){const i=this.getUriComparisonKey(e);if(this._editStacks.has(i)){const e=this._editStacks.get(i);e.setElementsValidFlag(t,n)}tj&&this._print("setElementsValidFlag")}createSnapshot(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const n=this._editStacks.get(t);return n.createSnapshot(e)}return new bM(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const n=this._editStacks.get(t);n.restoreSnapshot(e),n.hasPastElements()||n.hasFutureElements()||(n.dispose(),this._editStacks.delete(t))}tj&&this._print("restoreSnapshot")}getElements(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.getElements()}return{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(const[i,o]of this._editStacks){const r=o.getClosestPastElement();r&&(r.sourceId===e&&(!t||r.sourceOrder>t.sourceOrder)&&(t=r,n=i))}return[t,n]}canUndo(e){if(e instanceof yM){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasPastElements()}return!1}_onError(e,t){Oe(e);for(const n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,i,o){const r=this._acquireLocks(n);let s;try{s=t()}catch(a){return r(),i.dispose(),this._onError(a,e)}return s?s.then(()=>(r(),i.dispose(),o()),t=>(r(),i.dispose(),this._onError(t,e))):(r(),i.dispose(),o())}_invokeWorkspacePrepare(e){return ej(this,void 0,void 0,(function*(){if("undefined"===typeof e.actual.prepareUndoRedo)return st.None;const t=e.actual.prepareUndoRedo();return"undefined"===typeof t?st.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||"undefined"===typeof e.actual.prepareUndoRedo)return t(st.None);const n=e.actual.prepareUndoRedo();return n?tt(n)?t(n):n.then(e=>t(e)):t(st.None)}_getAffectedEditStacks(e){const t=[];for(const n of e.strResources)t.push(this._editStacks.get(n)||hj);return new cj(t)}_tryToSplitAndUndo(e,t,n,i){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(i),new dj(this._undo(e,0,!0));for(const o of t.strResources)this.removeElements(o);return this._notificationService.warn(i),new dj}_checkWorkspaceUndo(e,t,n,i){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,m({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(i&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,m({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const s of n.editStacks)s.getClosestPastElement()!==t&&o.push(s.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,m({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const s of n.editStacks)s.locked&&r.push(s.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,m({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,m({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){const i=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,i,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,i,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const n=t.getClosestPastElement();if(n){if(n===e){const n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,n,i){return ej(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(Cp.Info,m("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[m({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",n.editStacks.length),m("nok","Undo this File"),m("cancel","Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,n,!1);if(r)return r.returnValue;i=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(s){return this._onError(s,t)}const r=this._checkWorkspaceUndo(e,t,n,!0);if(r)return o.dispose(),r.returnValue;for(const e of n.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,o,()=>this._continueUndoInGroup(t.groupId,i))}))}_resourceUndo(e,t,n){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,i=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new cj([e]),i,()=>this._continueUndoInGroup(t.groupId,n))));{const e=m({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,o]of this._editStacks){const r=o.getClosestPastElement();r&&(r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,n=i))}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);return n?this._undo(n,0,t):void 0}undo(e){if(e instanceof yM){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"===typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;const i=this._editStacks.get(e),o=i.getClosestPastElement();if(!o)return;if(o.groupId){const[e,i]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&i)return this._undo(i,t,n)}const r=o.sourceId!==t||o.confirmBeforeUndo;if(r&&!n)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,n):this._resourceUndo(i,o,n)}finally{tj&&this._print("undo")}}_confirmAndContinueUndo(e,t,n){return ej(this,void 0,void 0,(function*(){const i=yield this._dialogService.show(Cp.Info,m("confirmDifferentSource","Would you like to undo '{0}'?",n.label),[m("confirmDifferentSource.yes","Yes"),m("cancel","Cancel")],{cancelId:1});if(1!==i.choice)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(const[i,o]of this._editStacks){const r=o.getClosestFutureElement();r&&(r.sourceId===e&&(!t||r.sourceOrder<t.sourceOrder)&&(t=r,n=i))}return[t,n]}canRedo(e){if(e instanceof yM){const[,t]=this._findClosestRedoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasFutureElements()}return!1}_tryToSplitAndRedo(e,t,n,i){if(t.canSplit())return this._splitFutureWorkspaceElement(t,n),this._notificationService.warn(i),new dj(this._redo(e));for(const o of t.strResources)this.removeElements(o);return this._notificationService.warn(i),new dj}_checkWorkspaceRedo(e,t,n,i){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,m({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(i&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,m({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const s of n.editStacks)s.getClosestFutureElement()!==t&&o.push(s.resourceLabel);if(o.length>0)return this._tryToSplitAndRedo(e,t,null,m({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const s of n.editStacks)s.locked&&r.push(s.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,m({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,m({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const n=this._getAffectedEditStacks(t),i=this._checkWorkspaceRedo(e,t,n,!1);return i?i.returnValue:this._executeWorkspaceRedo(e,t,n)}_executeWorkspaceRedo(e,t,n){return ej(this,void 0,void 0,(function*(){let i;try{i=yield this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const o=this._checkWorkspaceRedo(e,t,n,!0);if(o)return i.dispose(),o.returnValue;for(const e of n.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,i,()=>this._continueRedoInGroup(t.groupId))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new cj([e]),n,()=>this._continueRedoInGroup(t.groupId))));{const e=m({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,o]of this._editStacks){const r=o.getClosestFutureElement();r&&(r.groupId===e&&(!t||r.groupOrder<t.groupOrder)&&(t=r,n=i))}return[t,n]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);return t?this._redo(t):void 0}redo(e){if(e instanceof yM){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return"string"===typeof e?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),n=t.getClosestFutureElement();if(n){if(n.groupId){const[e,t]=this._findClosestRedoElementInGroup(n.groupId);if(n!==e&&t)return this._redo(t)}try{return 1===n.type?this._workspaceRedo(e,n):this._resourceRedo(t,n)}finally{tj&&this._print("redo")}}}};uj=XF([ZF(0,lO),ZF(1,Sg)],uj);class dj{constructor(e){this.returnValue=e}}AI(mM,uj);n("88cb");const pj=new RegExp(`(\\\\)?\\$\\((${$l.iconNameExpression}(?:${$l.iconModifierExpression})?)\\)`,"g");function fj(e){const t=new Array;let n,i=0,o=0;while(null!==(n=pj.exec(e))){o=n.index||0,t.push(e.substring(i,o)),i=(n.index||0)+n[0].length;const[,r,s]=n;t.push(r?`$(${s})`:gj({id:s}))}return i<e.length&&t.push(e.substring(i)),t}function gj(e){const t=_r("span");return t.classList.add(...$l.asClassNameArray(e)),t}n("e635");const mj={buttonBackground:sw.fromHex("#0E639C"),buttonHoverBackground:sw.fromHex("#006BB3"),buttonForeground:sw.white};class bj extends st{constructor(e,t){super(),this._onDidClick=this._register(new bt),this.options=t||Object.create(null),Ta(this.options,mj,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(wb.addTarget(this._element)),[hr.CLICK,vb.Tap].forEach(e=>{this._register(Eo(this._element,e,e=>{this.enabled?this._onDidClick.fire(e):ur.stop(e)}))}),this._register(Eo(this._element,hr.KEY_DOWN,e=>{const t=new Ki(e);let n=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),n=!0):t.equals(9)&&(this._element.blur(),n=!0),n&&ur.stop(t,!0)})),this._register(Eo(this._element,hr.MOUSE_OVER,e=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(Eo(this._element,hr.MOUSE_OUT,e=>{this.applyStyles()})),this.focusTracker=this._register(gr(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const n=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=n?"1px":"",this._element.style.borderStyle=n?"solid":"",this._element.style.borderColor=n}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?br(this._element,...fj(e)):this._element.textContent=e,"string"===typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}n("f5ab");const vj={badgeBackground:sw.fromHex("#4D4D4D"),badgeForeground:sw.fromHex("#FFFFFF")};class yj{constructor(e,t){this.count=0,this.options=t||Object.create(null),Ta(this.options,vj,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=mr(e,_r(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=Tr(this.countFormat,this.count),this.element.title=Tr(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",n=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}}}n("2adc");const wj="done",_j="active",Cj="infinite",Aj="discrete",Ej={progressBarBackground:sw.fromHex("#0E70C0")};class xj extends st{constructor(e,t){super(),this.options=t||Object.create(null),Ta(this.options,Ej,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new uo(()=>Cr(this.element),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(_j,Cj,Aj),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(wj),this.element.classList.contains(Cj)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Aj,wj),this.element.classList.add(_j,Cj),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}class Sj{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}new Sj("id#");n("358f");const kj={},Dj=new Sj("quick-input-button-icon-");function Lj(e){if(!e)return;let t;const n=e.dark.toString();return kj[n]?t=kj[n]:(t=Dj.nextId(),ar("."+t,"background-image: "+Dr(e.light||e.dark)),ar(`.vs-dark .${t}, .hc-black .${t}`,"background-image: "+Dr(e.dark)),kj[n]=t),t}const Ij={ctrlCmd:!1,alt:!1};var Nj,Mj;function Bj(e,t={}){const n=Oj(t);return n.textContent=e,n}function Tj(e,t={}){const n=Oj(t);return Pj(n,Fj(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),n}function Oj(e){const t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}(function(e){e[e["Blur"]=1]="Blur",e[e["Gesture"]=2]="Gesture",e[e["Other"]=3]="Other"})(Nj||(Nj={})),function(e){e[e["NONE"]=0]="NONE",e[e["FIRST"]=1]="FIRST",e[e["SECOND"]=2]="SECOND",e[e["LAST"]=3]="LAST"}(Mj||(Mj={}));class Rj{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function Pj(e,t,n,i){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&i)o=document.createElement("code");else if(5===t.type&&n){const e=document.createElement("a");e.href="#",n.disposables.add(ko(e,"click",e=>{n.callback(String(t.index),e)})),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach(e=>{Pj(o,e,n,i)})}function Fj(e,t){const n={type:1,children:[]};let i=0,o=n;const r=[],s=new Rj(e);while(!s.eos()){let e=s.next();const n="\\"===e&&0!==zj(s.peek(),t);if(n&&(e=s.next()),!n&&jj(e,t)&&e===s.peek()){s.advance(),2===o.type&&(o=r.pop());const n=zj(e,t);if(o.type===n||5===o.type&&6===n)o=r.pop();else{const e={type:n,children:[]};5===n&&(e.index=i,i++),o.children.push(e),r.push(o),o=e}}else if("\n"===e)2===o.type&&(o=r.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),r.push(o),o=t}else o.content+=e}return 2===o.type&&(o=r.pop()),r.length,n}function jj(e,t){return 0!==zj(e,t)}function zj(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}n("eba9");const Vj=_r,Qj={inputBackground:sw.fromHex("#3C3C3C"),inputForeground:sw.fromHex("#CCCCCC"),inputValidationInfoBorder:sw.fromHex("#55AAFF"),inputValidationInfoBackground:sw.fromHex("#063B49"),inputValidationWarningBorder:sw.fromHex("#B89500"),inputValidationWarningBackground:sw.fromHex("#352A05"),inputValidationErrorBorder:sw.fromHex("#BE1100"),inputValidationErrorBackground:sw.fromHex("#5A1D1D")};class Wj extends zS{constructor(e,t,n){var i;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new bt),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new bt),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n||Object.create(null),Ta(this.options,Qj,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(i=this.options.tooltip)&&void 0!==i?i:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=mr(e,Vj(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",r=mr(this.element,Vj(".ibwrapper"));if(this.input=mr(r,Vj(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight="number"===typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=mr(r,Vj("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new fk(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),mr(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(e=>this.input.scrollTop=e.scrollTop));const t=this._register(new lI(document,"selectionchange")),n=pt.filter(t.event,()=>{const e=document.getSelection();return(null===e||void 0===e?void 0:e.anchorNode)===r});this._register(n(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new TI(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"===typeof this.cachedHeight?this.cachedHeight:qo(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return Yo(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const e=parseFloat(this.mirror.style.paddingLeft||"")||0,n=parseFloat(this.mirror.style.paddingRight||"")||0;t=e+n}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!==typeof this.cachedContentHeight||"number"!==typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=n.border?"1px solid "+n.border:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null===e||void 0===e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,n=()=>e.style.width=Yo(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=mr(t,Vj(".monaco-inputbox-container")),n();const i={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?Tj(this.message.content,i):Bj(this.message.content,i);o.classList.add(this.classForType(this.message.type));const r=this.stylesForType(this.message.type);return o.style.backgroundColor=r.background?r.background.toString():"",o.style.color=r.foreground?r.foreground.toString():"",o.style.border=r.border?"1px solid "+r.border:"",mr(e,o),null},onHide:()=>{this.state="closed"},layout:n}),t=3===this.message.type?m("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?m("alertWarningMessage","Warning: {0}",this.message.content):m("alertInfoMessage","Info: {0}",this.message.content),pm(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=e.charCodeAt(e.length-1),n=10===t?" ":"",i=(e+n).replace(/\u000c/g,"");i?this.mirror.textContent=e+n:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",n=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=qo(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,n=t.selectionStart,i=t.selectionEnd,o=t.value;null!==n&&null!==i&&(this.value=o.substr(0,n)+e+o.substr(i),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}const Hj=_r;class Uj extends st{constructor(e){super(),this.parent=e,this.onKeyDown=e=>Eo(this.inputBox.inputElement,hr.KEY_DOWN,t=>{e(new Ki(t))}),this.onMouseDown=e=>Eo(this.inputBox.inputElement,hr.MOUSE_DOWN,t=>{e(new Zi(t))}),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=mr(this.parent,Hj(".quick-input-box")),this.inputBox=this._register(new Wj(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Cp.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Cp.Info?1:e===Cp.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Cp.Info?1:e===Cp.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class Yj{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],n="",i){e||(e=""),i&&(e=Yj.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===n&&Oa(this.highlights,t)||(this.text=e,this.title=n,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const n of this.highlights){if(n.end===n.start)continue;if(t<n.start){const i=this.text.substring(t,n.start);e.push(_r("span",void 0,...this.supportIcons?fj(i):[i])),t=n.end}const i=this.text.substring(n.start,n.end),o=_r("span.highlight",void 0,...this.supportIcons?fj(i):[i]);n.extraClasses&&o.classList.add(n.extraClasses),e.push(o),t=n.end}if(t<this.text.length){const n=this.text.substring(t);e.push(_r("span",void 0,...this.supportIcons?fj(n):[n]))}br(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let n=0,i=0;return e.replace(/\r\n|\r|\n/g,(e,o)=>{i="\r\n"===e?-1:0,o+=n;for(const n of t)n.end<=o||(n.start>=o&&(n.start+=i),n.end>=o&&(n.end+=i));return n+=i,"⏎"})}}class Gj{constructor(e="",t=!1){var n,i,o;if(this.value=e,"string"!==typeof this.value)throw Ve("value");"boolean"===typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(n=t.isTrusted)&&void 0!==n?n:void 0,this.supportThemeIcons=null!==(i=t.supportThemeIcons)&&void 0!==i&&i,this.supportHtml=null!==(o=t.supportHtml)&&void 0!==o&&o)}appendText(e,t=0){return this.value+=qj(this.supportThemeIcons?NT(e):e).replace(/([ \t]+)/g,(e,t)=>"&nbsp;".repeat(t.length)).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function Kj(e){return e instanceof Gj||!(!e||"object"!==typeof e)&&("string"===typeof e.value&&("boolean"===typeof e.isTrusted||void 0===e.isTrusted)&&("boolean"===typeof e.supportThemeIcons||void 0===e.supportThemeIcons))}function qj(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var Jj=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function $j(e,t){ia(t)?e.title=t:(null===t||void 0===t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}class Xj{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}update(e,t){var n;return Jj(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let i;if(void 0===e||ia(e)||e instanceof HTMLElement)i=e;else if(ha(e.markdown)){this._hoverWidget||this.show(m("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new xt;const n=this._cancellationTokenSource.token;if(i=yield e.markdown(n),this.isDisposed||n.isCancellationRequested)return}else i=null!==(n=e.markdown)&&void 0!==n?n:e.markdownNotSupportedFallback;this.show(i,t)}))}show(e,t){const n=this._hoverWidget;if(this.hasContent(e)){const i={content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n};this._hoverWidget=this.hoverDelegate.showHover(i,t)}null===n||void 0===n||n.dispose()}hasContent(e){return!!e&&(!Kj(e)||this.hasContent(e.value))}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}function Zj(e,t,n){let i,o;const r=(t,n)=>{var r;t&&(null===o||void 0===o||o.dispose(),o=void 0),n&&(null===i||void 0===i||i.dispose(),i=void 0),null===(r=e.onDidHideHover)||void 0===r||r.call(e)},s=(s,a)=>{if(i)return;const l=e=>{const n=e.type===hr.MOUSE_DOWN;r(n,n||e.fromElement===t)},c=Eo(t,hr.MOUSE_LEAVE,l,!0),h=Eo(t,hr.MOUSE_DOWN,l,!0),u={targetElements:[t],dispose:()=>{}};let d;if(void 0===e.placement||"mouse"===e.placement){const e=e=>u.x=e.x+10;d=Eo(t,hr.MOUSE_MOVE,e,!0)}const p=()=>Jj(this,void 0,void 0,(function*(){!i||o&&!o.isDisposed||(o=new Xj(e,u,s>0),yield o.update(n,a)),null===d||void 0===d||d.dispose()})),f=new uo(p,s);f.schedule(),i=ot(()=>{f.dispose(),null===d||void 0===d||d.dispose(),h.dispose(),c.dispose()})},a=Eo(t,hr.MOUSE_OVER,()=>s(e.delay),!0),l={show:e=>{s(0,e)},hide:()=>{r(!0,!0)},update:e=>Jj(this,void 0,void 0,(function*(){n=e,yield null===o||void 0===o?void 0:o.update(n)})),dispose:()=>{a.dispose(),r(!0,!0)}};return l}n("8c32");class ez{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class tz extends st{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new ez(mr(e,_r(".monaco-icon-label")))),this.labelContainer=mr(this.domNode.element,_r(".monaco-icon-label-container"));const n=mr(this.labelContainer,_r("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new ez(mr(this.labelContainer,_r("span.monaco-icon-description-container")))),(null===t||void 0===t?void 0:t.supportHighlights)||(null===t||void 0===t?void 0:t.supportIcons)?this.nameNode=new oz(n,!!t.supportIcons):this.nameNode=new nz(n),(null===t||void 0===t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new Yj(mr(this.descriptionContainer.element,_r("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new ez(mr(this.descriptionContainer.element,_r("span.label-description")))),this.hoverDelegate=null===t||void 0===t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,n){const i=["monaco-icon-label"];n&&(n.extraClasses&&i.push(...n.extraClasses),n.italic&&i.push("italic"),n.strikethrough&&i.push("strikethrough")),this.domNode.className=i.join(" "),this.setupHover((null===n||void 0===n?void 0:n.descriptionTitle)?this.labelContainer:this.element,null===n||void 0===n?void 0:n.title),this.nameNode.setLabel(e,n),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof Yj?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null===n||void 0===n?void 0:n.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null===n||void 0===n?void 0:n.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const n=Zj(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}else $j(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class nz{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Oa(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=mr(this.container,_r("a.label-name",{id:null===t||void 0===t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n<e.length;n++){const i=e[n],o=(null===t||void 0===t?void 0:t.domId)&&`${null===t||void 0===t?void 0:t.domId}_${n}`;mr(this.container,_r("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":n,role:"treeitem"},i)),n<e.length-1&&mr(this.container,_r("span.label-separator",void 0,(null===t||void 0===t?void 0:t.separator)||"/"))}}}}function iz(e,t,n){if(!n)return;let i=0;return e.map(e=>{const o={start:i,end:i+e.length},r=n.map(e=>TB.intersect(o,e)).filter(e=>!TB.isEmpty(e)).map(({start:e,end:t})=>({start:e-i,end:t-i}));return i=o.end+t.length,r})}class oz{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Oa(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new Yj(mr(this.container,_r("a.label-name",{id:null===t||void 0===t?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(e,null===t||void 0===t?void 0:t.matches,void 0,null===t||void 0===t?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const n=(null===t||void 0===t?void 0:t.separator)||"/",i=iz(e,n,null===t||void 0===t?void 0:t.matches);for(let o=0;o<e.length;o++){const r=e[o],s=i?i[o]:void 0,a=(null===t||void 0===t?void 0:t.domId)&&`${null===t||void 0===t?void 0:t.domId}_${o}`,l=_r("a.label-name",{id:a,"data-icon-label-count":e.length,"data-icon-label-index":o,role:"treeitem"}),c=new Yj(mr(this.container,l),this.supportIcons);c.set(r,s,void 0,null===t||void 0===t?void 0:t.labelEscapeNewLines),o<e.length-1&&mr(l,_r("span.label-separator",void 0,n))}}}}n("d557");const rz=_r;class sz{constructor(e,t,n){this.os=t,this.keyElements=new Set,this.options=n||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=mr(e,rz(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&sz.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(mr(this.domNode,rz("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){_o(this.domNode),this.keyElements.clear()}renderPart(e,t,n){const i=wg.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,i.ctrlKey,Boolean(null===n||void 0===n?void 0:n.ctrlKey),i.separator),t.shiftKey&&this.renderKey(e,i.shiftKey,Boolean(null===n||void 0===n?void 0:n.shiftKey),i.separator),t.altKey&&this.renderKey(e,i.altKey,Boolean(null===n||void 0===n?void 0:n.altKey),i.separator),t.metaKey&&this.renderKey(e,i.metaKey,Boolean(null===n||void 0===n?void 0:n.metaKey),i.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null===n||void 0===n?void 0:n.keyCode),"")}renderKey(e,t,n,i){mr(e,this.createKeyElement(t,n?".highlight":"")),i&&mr(e,rz("span.monaco-keybinding-key-separator",void 0,i))}renderUnbound(e){mr(e,this.createKeyElement(m("unbound","Unbound")))}createKeyElement(e,t=""){const n=rz("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(n),n}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=null===(e=this.labelBackground)||void 0===e?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow="inset 0 -1px 0 "+this.labelShadow);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&Oa(e.firstPart,t.firstPart)&&Oa(e.chordPart,t.chordPart)}}const az=new fo(()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}});function lz(e,t,n=!1){const i=e||"",o=t||"",r=az.value.collator.compare(i,o);return az.value.collatorIsNumeric&&0===r&&i!==o?i<o?-1:1:r}function cz(e,t,n){const i=e.toLowerCase(),o=t.toLowerCase(),r=hz(e,t,n);if(r)return r;const s=i.endsWith(n),a=o.endsWith(n);if(s!==a)return s?-1:1;const l=lz(i,o);return 0!==l?l:i.localeCompare(o)}function hz(e,t,n){const i=e.toLowerCase(),o=t.toLowerCase(),r=i.startsWith(n),s=o.startsWith(n);if(r!==s)return r?-1:1;if(r&&s){if(i.length<o.length)return-1;if(i.length>o.length)return 1}return 0}var uz=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},dz=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const pz=_r;class fz{constructor(e){this.hidden=!1,this._onChecked=new bt,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class gz{get templateId(){return gz.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=mr(e,pz(".quick-input-list-entry"));const n=mr(t.entry,pz("label.quick-input-list-label"));t.toDisposeTemplate.push(ko(n,hr.CLICK,e=>{t.checkbox.offsetParent||e.preventDefault()})),t.checkbox=mr(n,pz("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(ko(t.checkbox,hr.CHANGE,e=>{t.element.checked=t.checkbox.checked}));const i=mr(n,pz(".quick-input-list-rows")),o=mr(i,pz(".quick-input-list-row")),r=mr(i,pz(".quick-input-list-row"));t.label=new tz(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const s=mr(o,pz(".quick-input-list-entry-keybinding"));t.keybinding=new sz(s,b["a"]);const a=mr(r,pz(".quick-input-list-label-meta"));return t.detail=new Yj(a,!0),t.separator=mr(t.entry,pz(".quick-input-list-separator")),t.actionBar=new TI(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){n.toDisposeElement=nt(n.toDisposeElement),n.element=e,n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(e=>n.checkbox.checked=e));const{labelHighlights:i,descriptionHighlights:o,detailHighlights:r}=e,s=Object.create(null);s.matches=i||[],s.descriptionTitle=e.saneDescription,s.descriptionMatches=o||[],s.extraClasses=e.item.iconClasses,s.italic=e.item.italic,s.strikethrough=e.item.strikethrough,n.label.setLabel(e.saneLabel,e.saneDescription,s),n.keybinding.set(e.item.keybinding),n.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),n.actionBar.clear();const a=e.item.buttons;a&&a.length?(n.actionBar.push(a.map((t,n)=>{let i=t.iconClass||(t.iconPath?Lj(t.iconPath):void 0);t.alwaysVisible&&(i=i?i+" always-visible":"always-visible");const o=new ym("id-"+n,"",i,!0,()=>dz(this,void 0,void 0,(function*(){e.fireButtonTriggered({button:t,item:e.item})})));return o.tooltip=t.tooltip||"",o}),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){n.toDisposeElement=nt(n.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=nt(e.toDisposeElement),e.toDisposeTemplate=nt(e.toDisposeTemplate)}}gz.ID="listelement";class mz{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return gz.ID}}var bz;(function(e){e[e["First"]=1]="First",e[e["Second"]=2]="Second",e[e["Last"]=3]="Last",e[e["Next"]=4]="Next",e[e["Previous"]=5]="Previous",e[e["NextPage"]=6]="NextPage",e[e["PreviousPage"]=7]="PreviousPage"})(bz||(bz={}));class vz{constructor(e,t,n){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new bt,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new bt,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new bt,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new bt,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new bt,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new bt,this.onKeyDown=this._onKeyDown.event,this._onLeave=new bt,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=mr(this.parent,pz(".quick-input-list"));const i=new mz,o=new wz;this.list=n.createList("QuickInput",this.container,i,[new gz],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(e=>{const t=new Ki(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(b["f"]?e.metaKey:e.ctrlKey)&&this.list.setFocus(zu(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const n=this.list.getFocus();1===n.length&&n[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(t)})),this.disposables.push(this.list.onMouseDown(e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()})),this.disposables.push(Eo(this.container,hr.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(e=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(e=>{"number"===typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return pt.map(this.list.onDidChangeFocus,e=>e.elements.map(e=>e.item))}get onDidChangeSelection(){return pt.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(e=>e.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,i=e.length;n<i;n++){const i=e[n];if(!i.hidden){if(!i.checked)return!1;t=!0}}return t}getCheckedCount(){let e=0;const t=this.elements;for(let n=0,i=t.length;n<i;n++)t[n].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let n=0,i=t.length;n<i;n++)t[n].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(t=>{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=nt(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce((n,i,o)=>{var r,s,a;if("separator"!==i.type){const l=o&&e[o-1],c=i.label&&i.label.replace(/\r?\n/g," "),h=i.meta&&i.meta.replace(/\r?\n/g," "),u=i.description&&i.description.replace(/\r?\n/g," "),d=i.detail&&i.detail.replace(/\r?\n/g," "),p=i.ariaLabel||[c,u,d].map(e=>ql(e)).filter(e=>!!e).join(", ");n.push(new fz({index:o,item:i,saneLabel:c,saneMeta:h,saneAriaLabel:p,saneDescription:u,saneDetail:d,labelHighlights:null===(r=i.highlights)||void 0===r?void 0:r.label,descriptionHighlights:null===(s=i.highlights)||void 0===s?void 0:s.description,detailHighlights:null===(a=i.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return n},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(e=>e.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((e,t,n)=>(e.set(t.item,n),e),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e))),e.length>0){const e=this.list.getFocus()[0];"number"===typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const n of e)t.add(n);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===bz.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=bz.First),e===bz.Previous&&0===this.list.getFocus()[0]&&(e=bz.Last),e===bz.Second&&this.list.length<2&&(e=bz.First),e){case bz.First:this.list.focusFirst();break;case bz.Second:this.list.focusNth(1);break;case bz.Last:this.list.focusLast();break;case bz.Next:this.list.focusNext();break;case bz.Previous:this.list.focusPrevious();break;case bz.NextPage:this.list.focusNextPage();break;case bz.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];"number"===typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(e=e.trim(),e&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let t;this.elements.forEach(n=>{const i=this.matchOnLabel?ma(RT(e,TT(n.saneLabel))):void 0,o=this.matchOnDescription?ma(RT(e,TT(n.saneDescription||""))):void 0,r=this.matchOnDetail?ma(RT(e,TT(n.saneDetail||""))):void 0,s=this.matchOnMeta?ma(RT(e,TT(n.saneMeta||""))):void 0;if(i||o||r||s?(n.labelHighlights=i,n.descriptionHighlights=o,n.detailHighlights=r,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0,!this.sortByLabel){const e=n.index&&this.inputElements[n.index-1];t=e&&"separator"===e.type?e:t,t&&!n.hidden&&(n.separator=t,t=void 0)}})}else this.elements.forEach(e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0});const t=this.elements.filter(e=>!e.hidden);if(this.sortByLabel&&e){const n=e.toLowerCase();t.sort((e,t)=>yz(e,t,n))}return this.elementsToIndexes=t.reduce((e,t,n)=>(e.set(t.item,n),e),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const n of e)n.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=nt(this.elementDisposables),this.disposables=nt(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}function yz(e,t,n){const i=e.labelHighlights||[],o=t.labelHighlights||[];return i.length&&!o.length?-1:!i.length&&o.length?1:0===i.length&&0===o.length?0:cz(e.saneLabel,t.saneLabel,n)}uz([bb],vz.prototype,"onDidChangeFocus",null),uz([bb],vz.prototype,"onDidChangeSelection",null);class wz{getWidgetAriaLabel(){return m("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var _z=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const Cz=_r,Az=Kl("quick-input-back",Jl.arrowLeft),Ez={iconClass:Az.classNames,tooltip:m("quickInput.back","Back"),handle:-1};class xz extends st{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=xz.noPromptMessage,this._severity=Cp.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new bt),this.onDidHideEmitter=this._register(new bt),this.onDisposeEmitter=this._register(new bt),this.visibleDisposables=this._register(new rt),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!b["c"];this._ignoreFocusOut=e&&!b["c"],t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Nj.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||"&nbsp;"===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new co,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter(e=>e===Ez);this.ui.leftActionBar.push(e.map((e,t)=>{const n=new ym("id-"+t,"",e.iconClass||Lj(e.iconPath),!0,()=>_z(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return n.tooltip=e.tooltip||"",n}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter(e=>e!==Ez);this.ui.rightActionBar.push(t.map((e,t)=>{const n=new ym("id-"+t,"",e.iconClass||Lj(e.iconPath),!0,()=>_z(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return n.tooltip=e.tooltip||"",n}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,br(this.ui.message,...fj(n))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?m("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Cp.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?""+t.foreground:"",this.ui.message.style.backgroundColor=t.background?""+t.background:"",this.ui.message.style.border=t.border?"1px solid "+t.border:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}xz.noPromptMessage=m("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Sz extends xz{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new bt),this.onWillAcceptEmitter=this._register(new bt),this.onDidAcceptEmitter=this._register(new bt),this.onDidCustomEmitter=this._register(new bt),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?Mj.NONE:Mj.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new bt),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new bt),this.onDidTriggerItemButtonEmitter=this._register(new bt),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Ij:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(bz.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e;const t=this.ui.list.filter(this.filterValue(this.ui.inputBox.value));t&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(bz.Next),this.canSelectMany&&this.ui.list.domFocus(),ur.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(bz.Previous):this.ui.list.focus(bz.Last),this.canSelectMany&&this.ui.list.domFocus(),ur.stop(e,!0);break;case 12:this.ui.list.focus(bz.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ur.stop(e,!0);break;case 11:this.ui.list.focus(bz.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ur.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(bz.First),ur.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(bz.Last),ur.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Iu(e,this._activeItems,(e,t)=>e===t)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&Iu(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Iu(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return Eo(this.ui.container,hr.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Ki(e),n=t.keyCode,i=this._quickNavigate.keybindings,o=i.some(e=>{const[i,o]=e.getParts();return!o&&(i.shiftKey&&4===n?!(t.ctrlKey||t.altKey||t.metaKey):!(!i.altKey||6!==n)||(!(!i.ctrlKey||5!==n)||!(!i.metaKey||57!==n)))});o&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const n={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const i=this.ariaLabel||this.placeholder||Sz.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==i&&(this.ui.inputBox.ariaLabel=i),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Mj.NONE:this._itemActivation=Mj.FIRST;break;case Mj.SECOND:this.ui.list.focus(bz.Second),this._itemActivation=Mj.FIRST;break;case Mj.LAST:this.ui.list.focus(bz.Last),this._itemActivation=Mj.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(bz.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Sz.DEFAULT_ARIA_LABEL=m("quickInputBox.ariaLabel","Type to narrow down results.");class kz extends st{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new bt),this.onDidCustomEmitter=this._register(new bt),this.onDidTriggerButtonEmitter=this._register(new bt),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new bt),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new bt),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(Eo(window,hr.KEY_DOWN,e,!0)),this._register(Eo(window,hr.KEY_UP,e,!0)),this._register(Eo(window,hr.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=mr(this.parentElement,Cz(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=ir(e),n=mr(e,Cz(".quick-input-titlebar")),i=this._register(new TI(n));i.domNode.classList.add("quick-input-left-action-bar");const o=mr(n,Cz(".quick-input-title")),r=this._register(new TI(n));r.domNode.classList.add("quick-input-right-action-bar");const s=mr(e,Cz(".quick-input-description")),a=mr(e,Cz(".quick-input-header")),l=mr(a,Cz("input.quick-input-check-all"));l.type="checkbox",this._register(ko(l,hr.CHANGE,e=>{const t=l.checked;A.setAllVisibleChecked(t)})),this._register(Eo(l,hr.CLICK,e=>{(e.x||e.y)&&d.setFocus()}));const c=mr(a,Cz(".quick-input-description")),h=mr(a,Cz(".quick-input-and-message")),u=mr(h,Cz(".quick-input-filter")),d=this._register(new Uj(u));d.setAttribute("aria-describedby",this.idPrefix+"message");const p=mr(u,Cz(".quick-input-visible-count"));p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true");const f=new yj(p,{countFormat:m({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),g=mr(u,Cz(".quick-input-count"));g.setAttribute("aria-live","polite");const b=new yj(g,{countFormat:m({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),v=mr(a,Cz(".quick-input-action")),y=new bj(v);y.label=m("ok","OK"),this._register(y.onDidClick(e=>{this.onDidAcceptEmitter.fire()}));const w=mr(a,Cz(".quick-input-action")),_=new bj(w);_.label=m("custom","Custom"),this._register(_.onDidClick(e=>{this.onDidCustomEmitter.fire()}));const C=mr(h,Cz(`#${this.idPrefix}message.quick-input-message`)),A=this._register(new vz(e,this.idPrefix+"list",this.options));this._register(A.onChangedAllVisibleChecked(e=>{l.checked=e})),this._register(A.onChangedVisibleCount(e=>{f.setCount(e)})),this._register(A.onChangedCheckedCount(e=>{b.setCount(e)})),this._register(A.onLeave(()=>{setTimeout(()=>{d.setFocus(),this.controller instanceof Sz&&this.controller.canSelectMany&&A.clearFocus()},0)})),this._register(A.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const E=new xj(e);E.getContainer().classList.add("quick-input-progress");const x=gr(e);return this._register(x),this._register(Eo(e,hr.FOCUS,e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0},!0)),this._register(x.onDidBlur(()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Nj.Blur),this.previousFocusElement=void 0})),this._register(Eo(e,hr.FOCUS,e=>{d.setFocus()})),this._register(Eo(e,hr.KEY_DOWN,t=>{const n=new Ki(t);switch(n.keyCode){case 3:ur.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:ur.stop(t,!0),this.hide(Nj.Gesture);break;case 2:if(!n.altKey&&!n.ctrlKey&&!n.metaKey){const i=[".action-label.codicon"];e.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list");const o=e.querySelectorAll(i.join(", "));n.shiftKey&&n.target===o[0]?(ur.stop(t,!0),o[o.length-1].focus()):n.shiftKey||n.target!==o[o.length-1]||(ur.stop(t,!0),o[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:i,titleBar:n,title:o,description1:s,description2:c,rightActionBar:r,checkAll:l,filterContainer:u,inputBox:d,visibleCountContainer:p,visibleCount:f,countContainer:g,count:b,okContainer:v,ok:y,message:C,customButtonContainer:w,customButton:_,list:A,progressBar:E,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},n=At.None){return new Promise((i,o)=>{let r=e=>{r=i,t.onKeyMods&&t.onKeyMods(s.keyMods),i(e)};if(n.isCancellationRequested)return void r(void 0);const s=this.createQuickPick();let a;const l=[s,s.onDidAccept(()=>{if(s.canSelectMany)r(s.selectedItems.slice()),s.hide();else{const e=s.activeItems[0];e&&(r(e),s.hide())}}),s.onDidChangeActive(e=>{const n=e[0];n&&t.onDidFocus&&t.onDidFocus(n)}),s.onDidChangeSelection(e=>{if(!s.canSelectMany){const t=e[0];t&&(r(t),s.hide())}}),s.onDidTriggerItemButton(e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=s.items.indexOf(e.item);if(-1!==t){const e=s.items.slice(),n=e.splice(t,1),i=s.activeItems.filter(e=>e!==n[0]),o=s.keepScrollPosition;s.keepScrollPosition=!0,s.items=e,i&&(s.activeItems=i),s.keepScrollPosition=o}}}))),s.onDidChangeValue(e=>{!a||e||1===s.activeItems.length&&s.activeItems[0]===a||(s.activeItems=[a])}),n.onCancellationRequested(()=>{s.hide()}),s.onDidHide(()=>{nt(l),r(void 0)})];s.title=t.title,s.canSelectMany=!!t.canPickMany,s.placeholder=t.placeHolder,s.ignoreFocusOut=!!t.ignoreFocusLost,s.matchOnDescription=!!t.matchOnDescription,s.matchOnDetail=!!t.matchOnDetail,s.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,s.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,s.quickNavigate=t.quickNavigate,s.contextKey=t.contextKey,s.busy=!0,Promise.all([e,t.activeItem]).then(([e,t])=>{a=t,s.busy=!1,s.items=e,s.canSelectMany&&(s.selectedItems=e.filter(e=>"separator"!==e.type&&e.picked)),a&&(s.activeItems=[a])}),s.show(),Promise.resolve(e).then(void 0,e=>{o(e),s.hide()})})}createQuickPick(){const e=this.getUI();return new Sz(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=e,n&&n.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Cp.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),br(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const i=this.options.backKeybindingLabel();Ez.tooltip=i?m("quickInput.backWithKeybinding","Back ({0})",i):m("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const n=this.controller;if(n){const i=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",i||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),n.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=this.titleBarOffset+"px";const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,kz.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,contrastBorder:i,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=n?n.toString():"",this.ui.container.style.border=i?"1px solid "+i:"",this.ui.container.style.boxShadow=o?"0 0 8px 2px "+o:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const s=r.join("\n");s!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=s)}}}var Dz;kz.MAX_WIDTH=600,function(e){e[e["PRESERVE"]=0]="PRESERVE",e[e["LAST"]=1]="LAST"}(Dz||(Dz={}));const Lz={Quickaccess:"workbench.contributions.quickaccess"};class Iz{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),ot(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Mu([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){const t=e&&this.providers.find(t=>e.startsWith(t.prefix))||void 0;return t||this.defaultProvider}}Np.add(Lz.Quickaccess,new Iz);const Nz=Ai("quickInputService");var Mz=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Bz=function(e,t){return function(n,i){t(n,i,e)}};let Tz=class extends st{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Np.as(Lz.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){var i;const[o,r]=this.getOrInstantiateProvider(e),s=this.visibleQuickAccess,a=null===s||void 0===s?void 0:s.descriptor;if(s&&r&&a===r)return e===r.prefix||(null===n||void 0===n?void 0:n.preserveValue)||(s.picker.value=e),void this.adjustValueSelection(s.picker,r,n);if(r&&!(null===n||void 0===n?void 0:n.preserveValue)){let t=void 0;if(s&&a&&a!==r){const e=s.value.substr(a.prefix.length);e&&(t=`${r.prefix}${e}`)}if(!t){const e=null===o||void 0===o?void 0:o.defaultFilterValue;e===Dz.LAST?t=this.lastAcceptedPickerValues.get(r):"string"===typeof e&&(t=`${r.prefix}${e}`)}"string"===typeof t&&(e=t)}const l=new rt,c=l.add(this.quickInputService.createQuickPick());c.value=e,this.adjustValueSelection(c,r,n),c.placeholder=null===r||void 0===r?void 0:r.placeholder,c.quickNavigate=null===n||void 0===n?void 0:n.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!s,("number"===typeof(null===n||void 0===n?void 0:n.itemActivation)||(null===n||void 0===n?void 0:n.quickNavigateConfiguration))&&(c.itemActivation=null!==(i=null===n||void 0===n?void 0:n.itemActivation)&&void 0!==i?i:Mj.SECOND),c.contextKey=null===r||void 0===r?void 0:r.contextKey,c.filterValue=e=>e.substring(r?r.prefix.length:0),(null===r||void 0===r?void 0:r.placeholder)&&(c.ariaLabel=null===r||void 0===r?void 0:r.placeholder);let h=void 0,u=void 0;t&&(h=new Promise(e=>u=e),l.add(He(c.onWillAccept)(e=>{e.veto(),c.hide()}))),l.add(this.registerPickerListeners(c,o,r,e));const d=l.add(new xt);return o&&l.add(o.provide(c,d.token)),He(c.onDidHide)(()=>{0===c.selectedItems.length&&d.cancel(),l.dispose(),null===u||void 0===u||u(c.selectedItems)}),c.show(),t?h:void 0}adjustValueSelection(e,t,n){var i;let o;o=(null===n||void 0===n?void 0:n.preserveValue)?[e.value.length,e.value.length]:[null!==(i=null===t||void 0===t?void 0:t.prefix.length)&&void 0!==i?i:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,n,i){const o=new rt,r=this.visibleQuickAccess={picker:e,descriptor:n,value:i};return o.add(ot(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),o.add(e.onDidChangeValue(e=>{const[n]=this.getOrInstantiateProvider(e);n!==t?this.show(e,{preserveValue:!0}):r.value=e})),n&&o.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}};Tz=Mz([Bz(0,Nz),Bz(1,_i)],Tz);var Oz=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Rz=function(e,t){return function(n,i){t(n,i,e)}};let Pz=class extends Bm{constructor(e,t,n,i,o){super(n),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=i,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Tz))),this._quickAccess}createController(e=this.layoutService,t){var n,i;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,n,i,o)=>this.instantiationService.createInstance(lF,e,t,n,i,o),styles:this.computeStyles()},r=this._register(new kz(Object.assign(Object.assign({},o),t)));return r.layout(e.dimension,null!==(i=null===(n=e.offset)||void 0===n?void 0:n.top)&&void 0!==i?i:0),this._register(e.onDidLayout(t=>{var n,i;return r.layout(t,null!==(i=null===(n=e.offset)||void 0===n?void 0:n.top)&&void 0!==i?i:0)})),this._register(r.onShow(()=>this.resetContextKeys())),this._register(r.onHide(()=>this.resetContextKeys())),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new ig(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},n=At.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},KT(this.theme,{quickInputBackground:s_,quickInputForeground:a_,quickInputTitleBackground:l_,contrastBorder:bw,widgetShadow:yw})),inputBox:KT(this.theme,{inputForeground:_w,inputBackground:ww,inputBorder:Cw,inputValidationInfoBackground:Aw,inputValidationInfoForeground:Ew,inputValidationInfoBorder:xw,inputValidationWarningBackground:Sw,inputValidationWarningForeground:kw,inputValidationWarningBorder:Dw,inputValidationErrorBackground:Lw,inputValidationErrorForeground:Iw,inputValidationErrorBorder:Nw}),countBadge:KT(this.theme,{badgeBackground:Pw,badgeForeground:Fw,badgeBorder:bw}),button:KT(this.theme,{buttonForeground:Tw,buttonBackground:Ow,buttonHoverBackground:Rw,buttonBorder:bw}),progressBar:KT(this.theme,{progressBarBackground:Ww}),keybindingLabel:KT(this.theme,{keybindingLabelBackground:u_,keybindingLabelForeground:d_,keybindingLabelBorder:p_,keybindingLabelBottomBorder:f_,keybindingLabelShadow:yw}),list:KT(this.theme,{listBackground:s_,listInactiveFocusForeground:X_,listInactiveSelectionIconForeground:Z_,listInactiveFocusBackground:eC,listFocusOutline:vw,listInactiveFocusOutline:vw,pickerGroupBorder:h_,pickerGroupForeground:c_})}}};Pz=Oz([Rz(0,_i),Rz(1,og),Rz(2,Em),Rz(3,kL),Rz(4,oO)],Pz);var Fz=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},jz=function(e,t){return function(n,i){t(n,i,e)}};let zz=class extends Pz{constructor(e,t,n,i,o,r){super(t,n,i,o,r),this.host=void 0;const s=Qz.get(e);this.host={_serviceBrand:void 0,get container(){return s.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};zz=Fz([jz(1,_i),jz(2,og),jz(3,Em),jz(4,kL),jz(5,oO)],zz);let Vz=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const n=t=this.instantiationService.createInstance(zz,e);this.mapEditorToService.set(e,t),He(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},n=At.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}};Vz=Fz([jz(0,_i),jz(1,xi)],Vz);class Qz{constructor(e){this.editor=e,this.widget=new Wz(this.editor)}static get(e){return e.getContribution(Qz.ID)}dispose(){this.widget.dispose()}}Qz.ID="editor.controller.quickInput";class Wz{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Wz.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}var Hz;Wz.ID="editor.contrib.quickInputWidget",Jm(Qz.ID,Qz),function(e){const t=new SL;class n{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=n;let i=[];function o(e,t){let o=new n(e,t);return i.push(o),o}function r(e){let t=new SL;for(const[i,o]of EI())t.set(i,o);for(let i in e)e.hasOwnProperty(i)&&t.set(Ai(i),e[i]);i.forEach(n=>t.set(n.id,n.get(e)));let n=new pO(t,!0);return t.set(_i,n),[t,n]}e.init=r,e.instantiationService=o(_i,()=>new pO(t,!0));const s=new $g;e.configurationService=o(yf,()=>s),e.resourceConfigurationService=o(Su,()=>new Xg(s)),e.resourcePropertiesService=o(ku,()=>new Zg(s)),e.contextService=o(Dg,()=>new tm),e.labelService=o(gO,()=>new om),e.telemetryService=o(Qm,()=>new em),e.dialogService=o(lO,()=>new Yg),e.notificationService=o(Sg,()=>new Gg),e.markerService=o(SF,()=>new LF),e.modeService=o(zc,e=>new gM),e.standaloneThemeService=o(TN,()=>new yB),e.logService=o(Ku,()=>new Zu(new Xu)),e.undoRedoService=o(mM,t=>new uj(e.dialogService.get(t),e.notificationService.get(t))),e.modelService=o(zl,t=>new VM(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t))),e.markerDecorationsService=o(mm,t=>new YF(e.modelService.get(t),e.markerService.get(t))),e.contextKeyService=o(og,t=>new NB(e.configurationService.get(t))),e.codeEditorService=o(xi,t=>new qN(null,e.contextKeyService.get(t),e.standaloneThemeService.get(t))),e.editorProgressService=o(lN,()=>new Ug),e.storageService=o(OF,()=>new FF),e.editorWorkerService=o(jc,t=>new sd(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t)))}(Hz||(Hz={}));class Uz extends st{constructor(e,t){super();const[n,i]=Hz.init(t);this._serviceCollection=n,this._instantiationService=i;const o=this.get(yf),r=this.get(Sg),s=this.get(Qm),a=this.get(Em),l=this.get(Ku),c=this.get(og);let h=(e,n)=>{let i=null;return t&&(i=t[e.toString()]),i||(i=n()),this._serviceCollection.set(e,i),i};h(kL,()=>new qF(c,o)),h(FP,()=>new jP(a));let u=h(va,()=>new Kg(this._instantiationService)),d=h(ON,()=>this._register(new qg(c,u,s,r,l,e))),p=h(oO,()=>new rm(Hz.codeEditorService.get(xi),e));h(Nz,()=>new Vz(i,Hz.codeEditorService.get(xi)));let f=h(nN,()=>this._register(new aO(p)));h(sN,()=>new $F),h(iN,()=>{const e=new iO(s,r,f,d,a);return e.configure({blockMouse:!1}),this._register(e)}),h(Fm,()=>new VF(u)),h(Ep,()=>new im(Hz.modelService.get(zl)))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function Yz(e,t,n){let i=new Uz(e,t),o=null;i.has(Vc)||(o=new Hg(Hz.modelService.get()),i.set(Vc,o)),i.has(Ca)||i.set(Ca,new La(i.get(xi),i.get(va)));let r=n(i);return o&&o.setEditor(r),r}function Gz(e,t,n){return Yz(e,n||{},n=>new nM(e,t,n,n.get(_i),n.get(xi),n.get(va),n.get(og),n.get(ON),n.get(nN),n.get(TN),n.get(Sg),n.get(yf),n.get(kL),n.get(zl),n.get(zc)))}function Kz(e){return Hz.codeEditorService.get().onCodeEditorAdd(t=>{e(t)})}function qz(e,t,n){return Yz(e,n||{},n=>new iM(e,t,n,n.get(_i),n.get(og),n.get(ON),n.get(nN),n.get(jc),n.get(xi),n.get(TN),n.get(Sg),n.get(yf),n.get(iN),n.get(lN),n.get(sN)))}function Jz(e,t){return new Fa(e,t)}function $z(e,t,n){return oM(Hz.modelService.get(),Hz.modeService.get(),e,t,n)}function Xz(e,t){Hz.modelService.get().setMode(e,Hz.modeService.get().create(t))}function Zz(e,t,n){e&&Hz.markerService.get().changeOne(t,e.uri,n)}function eV(e){return Hz.markerService.get().read(e)}function tV(e){return Hz.markerService.get().onMarkerChanged(e)}function nV(e){return Hz.modelService.get().getModel(e)}function iV(){return Hz.modelService.get().getModels()}function oV(e){return Hz.modelService.get().onModelAdded(e)}function rV(e){return Hz.modelService.get().onModelRemoved(e)}function sV(e){return Hz.modelService.get().onModelModeChanged(t=>{e({model:t.model,oldLanguage:t.oldModeId})})}function aV(e){return pd(Hz.modelService.get(),e)}function lV(e,t){const n=Hz.standaloneThemeService.get();return n.registerEditorContainer(e),bp.colorizeElement(n,Hz.modeService.get(),e,t)}function cV(e,t,n){const i=Hz.standaloneThemeService.get();return i.registerEditorContainer(document.body),bp.colorize(Hz.modeService.get(),e,t,n)}function hV(e,t,n=4){const i=Hz.standaloneThemeService.get();return i.registerEditorContainer(document.body),bp.colorizeModelLine(e,t,n)}function uV(e){let t=Nc.get(e);return t||{getInitialState:()=>Bc,tokenize:(t,n,i,o)=>Rc(e,t,i,o)}}function dV(e,t){let n=Hz.modeService.get();n.triggerMode(t);let i=uV(t),o=Wr(e),r=[],s=i.getInitialState();for(let a=0,l=o.length;a<l;a++){let e=o[a],t=i.tokenize(e,!0,s,0);r[a]=t.tokens,s=t.endState}return r}function pV(e,t){Hz.standaloneThemeService.get().defineTheme(e,t)}function fV(e){Hz.standaloneThemeService.get().setTheme(e)}function gV(){db()}function mV(e,t){return ya.registerCommand({id:e,handler:t})}function bV(){return{create:Gz,onDidCreateEditor:Kz,createDiffEditor:qz,createDiffNavigator:Jz,createModel:$z,setModelLanguage:Xz,setModelMarkers:Zz,getModelMarkers:eV,onDidChangeMarkers:tV,getModels:iV,getModel:nV,onDidCreateModel:oV,onWillDisposeModel:rV,onDidChangeModelLanguage:sV,createWebWorker:aV,colorizeElement:lV,colorize:cV,colorizeModelLine:hV,tokenize:dV,defineTheme:pV,setTheme:fV,remeasureFonts:gV,registerCommand:mV,AccessibilitySupport:Pn,ContentWidgetPositionPreference:Qn,CursorChangeReason:Wn,DefaultEndOfLine:Hn,EditorAutoIndentStrategy:Yn,EditorOption:Gn,EndOfLinePreference:Kn,EndOfLineSequence:qn,MinimapPosition:ni,MouseTargetType:ii,OverlayWidgetPositionPreference:oi,OverviewRulerLane:ri,RenderLineNumbersType:si,RenderMinimap:ai,ScrollbarVisibility:ci,ScrollType:li,TextEditorCursorBlinkingStyle:fi,TextEditorCursorStyle:gi,TrackedRangeStickiness:mi,WrappingIndent:bi,ConfigurationChangedEvent:S,BareFontInfo:Qa,FontInfo:Ha,TextModelResolvedOptions:qa,FindMatch:Ja,EditorType:Ya,EditorOptions:Me}}function vV(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const n of t)if(!e(n))return!1;return!0}function yV(e,t){return"boolean"===typeof e?e:t}function wV(e,t){return"string"===typeof e?e:t}function _V(e){const t={};for(const n of e)t[n]=!0;return t}function CV(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const n=_V(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}}function AV(e,t){t=t.replace(/@@/g,"");let n,i=0;do{n=!1,t=t.replace(/@(\w+)/g,(function(i,o){n=!0;let r="";if("string"===typeof e[o])r=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?ep(e,"language definition does not contain attribute '"+o+"', used at: "+t):ep(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return Jd(r)?"":"(?:"+r+")"})),i++}while(n&&i<5);t=t.replace(/\x01/g,"@");let o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function EV(e,t,n,i){if(i<0)return e;if(i<t.length)return t[i];if(i>=100){i-=100;let e=n.split(".");if(e.unshift(n),i<e.length)return e[i]}return null}function xV(e,t,n,i){let o=-1,r=n,s=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);let a,l="~",c=r;if(r&&0!==r.length?/^\w*$/.test(c)?l="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(l=s[1],c=s[2])):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){let n=e[c];if(!n)throw ep(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!vV((function(e){return"string"===typeof e}),n))throw ep(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);let i=CV(n,e.ignoreCase);a=function(e){return"@"===l?i(e):!i(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){let t=AV(e,"^"+c+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,n,i,o){let r=AV(e,"^"+tp(e,c,n,i,o)+"$");return r.test(t)};else if(c.indexOf("$")<0){let t=$d(e,c);a=function(e){return"=="===l?e===t:e!==t}}else{let t=$d(e,c);a=function(n,i,o,r,s){let a=tp(e,t,i,o,r);return"=="===l?n===a:n!==a}}else{let t=CV(c.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:n,value:i,test:function(e,t,n,i){return a(e,e,t,n,i)}}:{name:n,value:i,test:function(e,t,n,i){let r=EV(e,t,n,o);return a(r||"",e,t,n,i)}}}function SV(e,t,n){if(n){if("string"===typeof n)return n;if(n.token||""===n.token){if("string"!==typeof n.token)throw ep(e,"a 'token' attribute must be of type string, in rule: "+t);{let i={token:n.token};if(n.token.indexOf("$")>=0&&(i.tokenSubst=!0),"string"===typeof n.bracket)if("@open"===n.bracket)i.bracket=1;else{if("@close"!==n.bracket)throw ep(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);i.bracket=-1}if(n.next){if("string"!==typeof n.next)throw ep(e,"the next state must be a string value in rule: "+t);{let o=n.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!ip(e,tp(e,o,"",[],""))))throw ep(e,"the next state '"+n.next+"' is not defined in rule: "+t);i.next=o}}return"number"===typeof n.goBack&&(i.goBack=n.goBack),"string"===typeof n.switchTo&&(i.switchTo=n.switchTo),"string"===typeof n.log&&(i.log=n.log),"string"===typeof n.nextEmbedded&&(i.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),i}}if(Array.isArray(n)){let i=[];for(let o=0,r=n.length;o<r;o++)i[o]=SV(e,t,n[o]);return{group:i}}if(n.cases){let i=[];for(let r in n.cases)if(n.cases.hasOwnProperty(r)){const o=SV(e,t,n.cases[r]);"@default"===r||"@"===r||""===r?i.push({test:void 0,value:o,name:r}):"@eos"===r?i.push({test:function(e,t,n,i){return i},value:o,name:r}):i.push(xV(e,t,r,o))}const o=e.defaultToken;return{test:function(e,t,n,r){for(const o of i){const i=!o.test||o.test(e,t,n,r);if(i)return o.value}return o}}}throw ep(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}class kV{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let n;if("string"===typeof t)n=t;else{if(!(t instanceof RegExp))throw ep(e,"rules must start with a match string or regular expression: "+this.name);n=t.source}this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n,this.regex=AV(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=SV(e,this.name,t)}}function DV(e,t){if(!t||"object"!==typeof t)throw new Error("Monarch: expecting a language definition object");let n={};n.languageId=e,n.includeLF=yV(t.includeLF,!1),n.noThrow=!1,n.maxStack=100,n.start="string"===typeof t.start?t.start:null,n.ignoreCase=yV(t.ignoreCase,!1),n.unicode=yV(t.unicode,!1),n.tokenPostfix=wV(t.tokenPostfix,"."+n.languageId),n.defaultToken=wV(t.defaultToken,"source"),n.usesEmbedded=!1;let i=t;function o(e,r,s){for(const a of s){let s=a.include;if(s){if("string"!==typeof s)throw ep(n,"an 'include' attribute must be a string at: "+e);if("@"===s[0]&&(s=s.substr(1)),!t.tokenizer[s])throw ep(n,"include target '"+s+"' is not defined at: "+e);o(e+"."+s,r,t.tokenizer[s])}else{const t=new kV(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(i,a[0]),a.length>=3)if("string"===typeof a[1])t.setAction(i,{token:a[1],next:a[2]});else{if("object"!==typeof a[1])throw ep(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(i,e)}}else t.setAction(i,a[1]);else{if(!a.regex)throw ep(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"===typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=yV(a.matchOnlyAtLineStart,!1)),t.setRegex(i,a.regex),t.setAction(i,a.action)}r.push(t)}}}if(i.languageId=e,i.includeLF=n.includeLF,i.ignoreCase=n.ignoreCase,i.unicode=n.unicode,i.noThrow=n.noThrow,i.usesEmbedded=n.usesEmbedded,i.stateNames=t.tokenizer,i.defaultToken=n.defaultToken,!t.tokenizer||"object"!==typeof t.tokenizer)throw ep(n,"a language definition must define the 'tokenizer' attribute as an object");n.tokenizer=[];for(let s in t.tokenizer)if(t.tokenizer.hasOwnProperty(s)){n.start||(n.start=s);const e=t.tokenizer[s];n.tokenizer[s]=new Array,o("tokenizer."+s,n.tokenizer[s],e)}if(n.usesEmbedded=i.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw ep(n,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let s of t.brackets){let e=s;if(e&&Array.isArray(e)&&3===e.length&&(e={token:e[2],open:e[0],close:e[1]}),e.open===e.close)throw ep(n,"open and close brackets in a 'brackets' attribute must be different: "+e.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!==typeof e.open||"string"!==typeof e.token||"string"!==typeof e.close)throw ep(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array");r.push({token:e.token+n.tokenPostfix,open:$d(n,e.open),close:$d(n,e.close)})}return n.brackets=r,n.noThrow=!0,n}function LV(e){lM.registerLanguage(e)}function IV(){let e=[];return e=e.concat(lM.getLanguages()),e}function NV(e){let t=Hz.modeService.get().getLanguageIdentifier(e);return t?t.id:0}function MV(e,t){let n=Hz.modeService.get().onDidEncounterLanguage(i=>{i.language===e&&(n.dispose(),t())});return n}function BV(e,t){let n=Hz.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error("Cannot set configuration for unknown language "+e);return Wh.register(n,t,100)}class TV{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n,i){if("function"===typeof this._actual.tokenize)return OV.adaptTokenize(this._languageIdentifier.language,this._actual,e,n,i);throw new Error("Not supported!")}tokenize2(e,t,n){let i=this._actual.tokenizeEncoded(e,n);return new Rn(i.tokens,i.endState)}}class OV{constructor(e,t,n){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,n){let i=[],o=0;for(let r=0,s=e.length;r<s;r++){const s=e[r];let a=s.startIndex;0===r?a=0:a<o&&(a=o),i[r]=new Tn(a+n,s.scopes,t),o=a}return i}static adaptTokenize(e,t,n,i,o){let r,s=t.tokenize(n,i),a=OV._toClassicTokens(s.tokens,e,o);return r=s.endState.equals(i)?i:s.endState,new On(a,r)}tokenize(e,t,n,i){return OV.adaptTokenize(this._languageIdentifier.language,this._actual,e,n,i)}_toBinaryTokens(e,t){const n=this._languageIdentifier.id,i=this._standaloneThemeService.getColorTheme().tokenTheme;let o=[],r=0,s=0;for(let l=0,c=e.length;l<c;l++){const a=e[l],c=i.match(n,a.scopes);if(r>0&&o[r-1]===c)continue;let h=a.startIndex;0===l?h=0:h<s&&(h=s),o[r++]=h+t,o[r++]=c,s=h}let a=new Uint32Array(r);for(let l=0;l<r;l++)a[l]=o[l];return a}tokenize2(e,t,n,i){let o,r=this._actual.tokenize(e,n),s=this._toBinaryTokens(r.tokens,i);return o=r.endState.equals(n)?n:r.endState,new Rn(s,o)}}function RV(e){return"tokenizeEncoded"in e}function PV(e){return e&&"function"===typeof e.then}function FV(e){if(e){const t=[null];for(let n=1,i=e.length;n<i;n++)t[n]=sw.fromHex(e[n]);Hz.standaloneThemeService.get().setColorMapOverride(t)}else Hz.standaloneThemeService.get().setColorMapOverride(null)}function jV(e,t){let n=Hz.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error("Cannot set tokens provider for unknown language "+e);const i=e=>RV(e)?new TV(n,e):new OV(Hz.standaloneThemeService.get(),n,e);return PV(t)?Nc.registerPromise(e,t.then(e=>i(e))):Nc.register(e,i(t))}function zV(e,t){const n=t=>fp(Hz.modeService.get(),Hz.standaloneThemeService.get(),e,DV(e,t));return PV(t)?Nc.registerPromise(e,t.then(e=>n(e))):Nc.register(e,n(t))}function VV(e,t){return sc.register(e,t)}function QV(e,t){return ac.register(e,t)}function WV(e,t){return hc.register(e,t)}function HV(e,t){return uc.register(e,{provideHover:(e,n,i)=>{let o=e.getWordAtPosition(n);return Promise.resolve(t.provideHover(e,n,i)).then(e=>{if(e)return!e.range&&o&&(e.range=new Mn(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn)),e.range||(e.range=new Mn(n.lineNumber,n.column,n.lineNumber,n.column)),e})}})}function UV(e,t){return dc.register(e,t)}function YV(e,t){return pc.register(e,t)}function GV(e,t){return fc.register(e,t)}function KV(e,t){return gc.register(e,t)}function qV(e,t){return bc.register(e,t)}function JV(e,t){return vc.register(e,t)}function $V(e,t){return yc.register(e,t)}function XV(e,t,n){return _c.register(e,{providedCodeActionKinds:null===n||void 0===n?void 0:n.providedCodeActionKinds,provideCodeActions:(e,n,i,o)=>{let r=Hz.markerService.get().read({resource:e.uri}).filter(e=>Mn.areIntersectingOrTouching(e,n));return t.provideCodeActions(e,n,{markers:r,only:i.only},o)},resolveCodeAction:t.resolveCodeAction})}function ZV(e,t){return Cc.register(e,t)}function eQ(e,t){return Ac.register(e,t)}function tQ(e,t){return Ec.register(e,t)}function nQ(e,t){return xc.register(e,t)}function iQ(e,t){return lc.register(e,t)}function oQ(e,t){return Sc.register(e,t)}function rQ(e,t){return Dc.register(e,t)}function sQ(e,t){return mc.register(e,t)}function aQ(e,t){return kc.register(e,t)}function lQ(e,t){return Lc.register(e,t)}function cQ(e,t){return Ic.register(e,t)}function hQ(e,t){return cc.register(e,t)}function uQ(e,t){return wc.register(e,t)}function dQ(){return{register:LV,getLanguages:IV,onLanguage:MV,getEncodedLanguageId:NV,setLanguageConfiguration:BV,setColorMap:FV,setTokensProvider:jV,setMonarchTokensProvider:zV,registerReferenceProvider:VV,registerRenameProvider:QV,registerCompletionItemProvider:iQ,registerSignatureHelpProvider:WV,registerHoverProvider:HV,registerDocumentSymbolProvider:UV,registerDocumentHighlightProvider:YV,registerLinkedEditingRangeProvider:GV,registerDefinitionProvider:KV,registerImplementationProvider:qV,registerTypeDefinitionProvider:JV,registerCodeLensProvider:$V,registerCodeActionProvider:XV,registerDocumentFormattingEditProvider:ZV,registerDocumentRangeFormattingEditProvider:eQ,registerOnTypeFormattingEditProvider:tQ,registerLinkProvider:nQ,registerColorProvider:oQ,registerFoldingRangeProvider:rQ,registerDeclarationProvider:sQ,registerSelectionRangeProvider:aQ,registerDocumentSemanticTokensProvider:lQ,registerDocumentRangeSemanticTokensProvider:cQ,registerInlineCompletionsProvider:hQ,registerInlayHintsProvider:uQ,DocumentHighlightKind:Un,CompletionItemKind:jn,CompletionItemTag:zn,CompletionItemInsertTextRule:Fn,SymbolKind:di,SymbolTag:pi,IndentAction:Jn,CompletionTriggerKind:Vn,SignatureHelpTriggerKind:ui,InlayHintKind:$n,InlineCompletionTriggerKind:Xn,FoldingRangeKind:rc}}class pQ{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"===typeof e?e.toLowerCase():e._lower}}var fQ,gQ=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function mQ(e){const t=[],n=new Set,i=Cc.ordered(e);for(const r of i)t.push(r),r.extensionId&&n.add(pQ.toKey(r.extensionId));const o=Ac.ordered(e);for(const r of o){if(r.extensionId){if(n.has(pQ.toKey(r.extensionId)))continue;n.add(pQ.toKey(r.extensionId))}t.push({displayName:r.displayName,extensionId:r.extensionId,provideDocumentFormattingEdits(e,t,n){return r.provideDocumentRangeFormattingEdits(e,e.getFullModelRange(),t,n)}})}return t}class bQ{static setFormatterSelector(e){const t=bQ._selectors.unshift(e);return{dispose:t}}static select(e,t,n){return gQ(this,void 0,void 0,(function*(){if(0===e.length)return;const i=Ue.first(bQ._selectors);return i?yield i(e,t,n):void 0}))}}function vQ(e,t,n,i,o){return gQ(this,void 0,void 0,(function*(){const r=Ac.ordered(t);for(const s of r){let r=yield Promise.resolve(s.provideDocumentRangeFormattingEdits(t,n,i,o)).catch(Re);if(Tu(r))return yield e.computeMoreMinimalEdits(t.uri,r)}}))}function yQ(e,t,n,i){return gQ(this,void 0,void 0,(function*(){const o=mQ(t);for(const r of o){let o=yield Promise.resolve(r.provideDocumentFormattingEdits(t,n,i)).catch(Re);if(Tu(o))return yield e.computeMoreMinimalEdits(t.uri,o)}}))}function wQ(e,t,n,i,o){const r=Ec.ordered(t);return 0===r.length||r[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(r[0].provideOnTypeFormattingEdits(t,n,i,o,At.None)).catch(Re).then(n=>e.computeMoreMinimalEdits(t.uri,n))}bQ._selectors=new ht,ya.registerCommand("_executeFormatRangeProvider",(function(e,...t){const[n,i,o]=t;ca(wn.isUri(n)),ca(Mn.isIRange(i));const r=e.get(zl).getModel(n);if(!r)throw Ve("resource");return vQ(e.get(jc),r,Mn.lift(i),o,At.None)})),ya.registerCommand("_executeFormatDocumentProvider",(function(e,...t){const[n,i]=t;ca(wn.isUri(n));const o=e.get(zl).getModel(n);if(!o)throw Ve("resource");return yQ(e.get(jc),o,i,At.None)})),ya.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){const[n,i,o,r]=t;ca(wn.isUri(n)),ca(Nn.isIPosition(i)),ca("string"===typeof o);const s=e.get(zl).getModel(n);if(!s)throw Ve("resource");return wQ(e.get(jc),s,Nn.lift(i),o,r)})),Me.wrappingIndent.defaultValue=0,Me.glyphMargin.defaultValue=!1,Me.autoIndent.defaultValue=3,Me.overviewRulerLanes.defaultValue=2,bQ.setFormatterSelector((e,t,n)=>Promise.resolve(e[0]));const _Q=yi();_Q.editor=bV(),_Q.languages=dQ();const CQ=_Q.CancellationTokenSource,AQ=_Q.Emitter,EQ=_Q.KeyCode,xQ=_Q.KeyMod,SQ=_Q.Position,kQ=_Q.Range,DQ=_Q.Selection,LQ=_Q.SelectionDirection,IQ=_Q.MarkerSeverity,NQ=_Q.MarkerTag,MQ=_Q.Uri,BQ=_Q.Token,TQ=_Q.editor,OQ=_Q.languages;function RQ(){}((null===(fQ=b["b"].MonacoEnvironment)||void 0===fQ?void 0:fQ.globalAPI)||"function"===typeof define&&n("e6b2"))&&(self.monaco=_Q),"undefined"!==typeof self.require&&"function"===typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});var PQ={name:"MonacoEditor",props:{diffEditor:{type:Boolean,default:!1},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"100%"},original:String,value:[String,Object],language:{type:String,default:"javascript"},theme:{type:String,default:"vs"},readOnly:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},editorMounted:{type:Function,default:RQ},editorBeforeMount:{type:Function,default:RQ}},watch:{options:{deep:!0,handler:function(e){this.editor&&this.editor.updateOptions(e)}},keyIndex:function(){this.editor&&this.value!==this._getValue()&&this._setValue(this.value)},language:function(){if(this.editor)if(this.diffEditor){var e=this.editor.getModel(),t=e.original,n=e.modified;TQ.setModelLanguage(t,this.language),TQ.setModelLanguage(n,this.language)}else TQ.setModelLanguage(this.editor.getModel(),this.language)},theme:function(){this.editor&&TQ.setTheme(this.theme)},style:function(){var e=this;this.editor&&this.$nextTick((function(){e.editor.layout()}))}},computed:{style:function(){return{width:/^\d+$/.test(this.width)?"".concat(this.width,"px"):this.width,height:/^\d+$/.test(this.height)?"".concat(this.height,"px"):this.height}}},mounted:function(){this.initMonaco()},beforeDestroy:function(){this.editor&&this.editor.dispose()},render:function(){var e=arguments[0];return e("div",{class:"monaco_editor_container",style:this.style})},methods:{initMonaco:function(){var e=this.value,t=this.language,n=this.theme,i=this.readOnly,o=this.options;Object.assign(o,this._editorBeforeMount()),this.editor=TQ[this.diffEditor?"createDiffEditor":"create"](this.$el,Object(u["a"])({value:e,language:t,theme:n,readOnly:i},o)),this.diffEditor&&this._setModel(this.value,this.original),this._editorMounted(this.editor)},_getEditor:function(){return this.editor?this.diffEditor?this.editor.modifiedEditor:this.editor:null},_setModel:function(e,t){var n=this.language,i=TQ.createModel(t,n),o=TQ.createModel(e,n);this.editor.setModel({original:i,modified:o})},_setValue:function(e){var t=this._getEditor();if(t)return t.setValue(e)},_getValue:function(){var e=this._getEditor();return e?e.getValue():""},_editorBeforeMount:function(){var e=this.editorBeforeMount(i);return e||{}},_editorMounted:function(e){var t=this;this.editorMounted(e,i),this.diffEditor?e.onDidUpdateDiff((function(e){var n=t._getValue();t._emitChange(n,e)})):e.onDidChangeModelContent((function(e){var n=t._getValue();t._emitChange(n,e)}))},_emitChange:function(e,t){this.$emit("change",e,t),this.$emit("input",e)}}},FQ=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bpmn-tools"},[n("div",[e.toolbar.includes("open")?n("el-upload",{staticStyle:{"margin-right":"10px",display:"inline-block"},attrs:{action:"","before-upload":e.handleBeforeUpload}},[n("el-tooltip",{attrs:{effect:"dark",content:e.t("wf.toolbar.open"),placement:"bottom"}},[n("el-button",{attrs:{size:"mini",icon:"el-icon-folder-opened"}})],1)],1):e._e(),e.toolbar.includes("create")?n("el-tooltip",{attrs:{effect:"dark",content:e.t("wf.toolbar.create"),placement:"bottom"}},[n("el-button",{attrs:{size:"mini",icon:"el-icon-circle-plus"},on:{click:e.handleCreate}})],1):e._e(),e.toolbar.includes("fit")?n("el-tooltip",{attrs:{effect:"dark",content:e.t("wf.toolbar.fit"),placement:"bottom"}},[n("el-button",{attrs:{size:"mini",icon:"el-icon-rank"},on:{click:function(t){return e.$emit("fit","init")}}})],1):e._e(),e.toolbar.includes("zoom-in")?n("el-tooltip",{attrs:{effect:"dark",content:e.t("wf.toolbar.zoomIn"),placement:"bottom"}},[n("el-button",{attrs:{size:"mini",icon:"el-icon-zoom-in"},on:{click:function(t){return e.$emit("fit",!0)}}})],1):e._e(),e.toolbar.includes("zoom-out")?n("el-tooltip",{attrs:{effect:"dark",content:e.t("wf.toolbar.zoomOut"),placement:"bottom"}},[n("el-button",{attrs:{size:"mini",icon:"el-icon-zoom-out"},on:{click:function(t){return e.$emit("fit",!1)}}})],1):e._e(),e.toolbar.includes("undo")?n("el-tooltip",{attrs:{effect:"dark",content:e.t("wf.toolbar.undo"),placement:"bottom"}},[n("el-button",{attrs:{size:"mini",icon:"el-icon-refresh-left"},on:{click:function(t){return e.$emit("undo")}}})],1):e._e(),e.toolbar.includes("redo")?n("el-tooltip",{attrs:{effect:"dark",content:e.t("wf.toolbar.redo"),placement:"bottom"}},[n("el-button",{attrs:{size:"mini",icon:"el-icon-refresh-right"},on:{click:function(t){return e.$emit("redo")}}})],1):e._e()],1),n("div",[e.toolbar.includes("download-xml")||e.toolbar.includes("download-svg")?n("el-popover",{staticStyle:{margin:"0 10px"},attrs:{placement:"bottom",width:"200px",trigger:"hover"}},[n("el-button",{attrs:{slot:"reference",size:"mini",icon:"el-icon-download"},slot:"reference"},[e._v(e._s(e.t("wf.toolbar.download"))+" ")]),n("div",{staticStyle:{padding:"10px",display:"flex"}},[e.toolbar.includes("download-xml")?n("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-download"},on:{click:function(t){return e.$emit("download","xml",!0)}}},[e._v(e._s(e.t("wf.toolbar.downloadXml")))]):e._e(),e.toolbar.includes("download-svg")?n("el-button",{attrs:{size:"mini",type:"warning",icon:"el-icon-picture"},on:{click:function(t){return e.$emit("download","svg",!0)}}},[e._v(e._s(e.t("wf.toolbar.downloadSvg")))]):e._e()],1)],1):e._e(),e.toolbar.includes("import")?n("el-button",{attrs:{size:"mini",icon:"el-icon-upload"},on:{click:function(t){return e.$emit("import")}}},[e._v(e._s(e.t("wf.toolbar.importXml")))]):e._e(),e.toolbar.includes("preview")?n("el-button",{attrs:{size:"mini",icon:"el-icon-view"},on:{click:function(t){return e.$emit("preview","preview")}}},[e._v(e._s(e.t("wf.toolbar.previewXml")))]):e._e(),e.toolbar.includes("get")?n("el-button",{attrs:{size:"mini",icon:"el-icon-finished"},on:{click:function(t){return e.$emit("preview","get")}}},[e._v(e._s(e.t("wf.toolbar.getXml")))]):e._e(),e._t("toolbar")],2)])},jQ=[],zQ=n("6b5e"),VQ={name:"bpmn-tools",mixins:[zQ["a"]],props:{toolbar:{type:Array,default:function(){return[]}}},methods:{handleBeforeUpload:function(e){var t=this,n=new FileReader;return n.readAsText(e,"utf-8"),n.onload=function(){t.$emit("open",n.result)},!1},handleCreate:function(){var e=this;this.$confirm("确定要新建吗?","警告",{type:"warning"}).then((function(){e.$emit("create")})).catch((function(){}))}}},QQ=VQ,WQ=(n("4775"),n("e3d4")),HQ=Object(WQ["a"])(QQ,FQ,jQ,!1,null,"8e05a63e",null),UQ=HQ.exports,YQ=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-tabs",{attrs:{stretch:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[n("el-tab-pane",{staticStyle:{padding:"0 10px"},attrs:{label:e.t("wf.panel.node.tab"),name:"node"}},[n("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.t("wf.panel.node.tab"))+" "),e.openAllCollapse?n("i",{staticClass:"el-icon-open",on:{click:function(t){return e.handleChangeCollapse("close")}}}):n("i",{staticClass:"el-icon-turn-off",on:{click:function(t){return e.handleChangeCollapse("open")}}})]),e.element?n("node-panel",{ref:"node",attrs:{modeler:e.modeler,element:e.element,"form-option":e.formOption,"ex-form-option":e.exFormOption,"indep-form-option":e.indepFormOption,"user-option":e.userOption,"group-option":e.groupOption,"button-option":e.buttonOption,nodes:e.nodes}}):n("div",{staticStyle:{"margin-top":"50%","text-align":"center","font-size":"14px"}},[n("img",{staticStyle:{height:"100px"},attrs:{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQgMzEuNjcpIj4KICAgICAgPGVsbGlwc2UgZmlsbC1vcGFjaXR5PSIuOCIgZmlsbD0iI0Y1RjVGNyIgY3g9IjY3Ljc5NyIgY3k9IjEwNi44OSIgcng9IjY3Ljc5NyIgcnk9IjEyLjY2OCIvPgogICAgICA8cGF0aCBkPSJNMTIyLjAzNCA2OS42NzRMOTguMTA5IDQwLjIyOWMtMS4xNDgtMS4zODYtMi44MjYtMi4yMjUtNC41OTMtMi4yMjVoLTUxLjQ0Yy0xLjc2NiAwLTMuNDQ0LjgzOS00LjU5MiAyLjIyNUwxMy41NiA2OS42NzR2MTUuMzgzaDEwOC40NzVWNjkuNjc0eiIgZmlsbD0iI0FFQjhDMiIvPgogICAgICA8cGF0aCBkPSJNMTAxLjUzNyA4Ni4yMTRMODAuNjMgNjEuMTAyYy0xLjAwMS0xLjIwNy0yLjUwNy0xLjg2Ny00LjA0OC0xLjg2N0gzMS43MjRjLTEuNTQgMC0zLjA0Ny42Ni00LjA0OCAxLjg2N0w2Ljc2OSA4Ni4yMTR2MTMuNzkyaDk0Ljc2OFY4Ni4yMTR6IiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMy41NikiLz4KICAgICAgPHBhdGggZD0iTTMzLjgzIDBoNjcuOTMzYTQgNCAwIDAgMSA0IDR2OTMuMzQ0YTQgNCAwIDAgMS00IDRIMzMuODNhNCA0IDAgMCAxLTQtNFY0YTQgNCAwIDAgMSA0LTR6IiBmaWxsPSIjRjVGNUY3Ii8+CiAgICAgIDxwYXRoIGQ9Ik00Mi42NzggOS45NTNoNTAuMjM3YTIgMiAwIDAgMSAyIDJWMzYuOTFhMiAyIDAgMCAxLTIgMkg0Mi42NzhhMiAyIDAgMCAxLTItMlYxMS45NTNhMiAyIDAgMCAxIDItMnpNNDIuOTQgNDkuNzY3aDQ5LjcxM2EyLjI2MiAyLjI2MiAwIDEgMSAwIDQuNTI0SDQyLjk0YTIuMjYyIDIuMjYyIDAgMCAxIDAtNC41MjR6TTQyLjk0IDYxLjUzaDQ5LjcxM2EyLjI2MiAyLjI2MiAwIDEgMSAwIDQuNTI1SDQyLjk0YTIuMjYyIDIuMjYyIDAgMCAxIDAtNC41MjV6TTEyMS44MTMgMTA1LjAzMmMtLjc3NSAzLjA3MS0zLjQ5NyA1LjM2LTYuNzM1IDUuMzZIMjAuNTE1Yy0zLjIzOCAwLTUuOTYtMi4yOS02LjczNC01LjM2YTcuMzA5IDcuMzA5IDAgMCAxLS4yMjItMS43OVY2OS42NzVoMjYuMzE4YzIuOTA3IDAgNS4yNSAyLjQ0OCA1LjI1IDUuNDJ2LjA0YzAgMi45NzEgMi4zNyA1LjM3IDUuMjc3IDUuMzdoMzQuNzg1YzIuOTA3IDAgNS4yNzctMi40MjEgNS4yNzctNS4zOTNWNzUuMWMwLTIuOTcyIDIuMzQzLTUuNDI2IDUuMjUtNS40MjZoMjYuMzE4djMzLjU2OWMwIC42MTctLjA3NyAxLjIxNi0uMjIxIDEuNzg5eiIgZmlsbD0iI0RDRTBFNiIvPgogICAgPC9nPgogICAgPHBhdGggZD0iTTE0OS4xMjEgMzMuMjkybC02LjgzIDIuNjVhMSAxIDAgMCAxLTEuMzE3LTEuMjNsMS45MzctNi4yMDdjLTIuNTg5LTIuOTQ0LTQuMTA5LTYuNTM0LTQuMTA5LTEwLjQwOEMxMzguODAyIDguMTAyIDE0OC45MiAwIDE2MS40MDIgMCAxNzMuODgxIDAgMTg0IDguMTAyIDE4NCAxOC4wOTdjMCA5Ljk5NS0xMC4xMTggMTguMDk3LTIyLjU5OSAxOC4wOTctNC41MjggMC04Ljc0NC0xLjA2Ni0xMi4yOC0yLjkwMnoiIGZpbGw9IiNEQ0UwRTYiLz4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE0OS42NSAxNS4zODMpIiBmaWxsPSIjRkZGIj4KICAgICAgPGVsbGlwc2UgY3g9IjIwLjY1NCIgY3k9IjMuMTY3IiByeD0iMi44NDkiIHJ5PSIyLjgxNSIvPgogICAgICA8cGF0aCBkPSJNNS42OTggNS42M0gwTDIuODk4LjcwNHpNOS4yNTkuNzA0aDQuOTg1VjUuNjNIOS4yNTl6Ii8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K"}}),n("p",[e._v(e._s(e.t("wf.panel.node.message")))])])],1),n("el-tab-pane",{staticStyle:{padding:"0 10px"},attrs:{label:e.t("wf.panel.process.tab"),name:"process"}},[e.rootElement?n("process-panel",{ref:"process",attrs:{modeler:e.modeler,element:e.rootElement,nodes:e.nodes}}):e._e()],1)],1)},GQ=[],KQ=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-collapse",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[n("el-collapse-item",{attrs:{name:"1"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.basic.title"))+" "),n("i",{staticClass:"el-icon-info"})])]),n("wf-basic",{attrs:{modeler:e.modeler,element:e.element,nodes:e.nodes}})],2),"bpmn:StartEvent"==e.type?[e.getEventDefinitions(null)?e._e():n("el-collapse-item",{attrs:{name:"5"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.form.title"))+" "),n("i",{staticClass:"el-icon-s-order"})])]),n("wf-form",{attrs:{modeler:e.modeler,element:e.element,"user-option":e.userOption,"form-option":e.formOption,"ex-form-option":e.exFormOption,"indep-form-option":e.indepFormOption}})],2)]:e._e(),"bpmn:UserTask"==e.type?[n("el-collapse-item",{attrs:{name:"2"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.assignee.title"))+" "),n("i",{staticClass:"el-icon-user-solid"})])]),n("wf-assignee",{attrs:{modeler:e.modeler,element:e.element,"user-option":e.userOption,"group-option":e.groupOption}})],2),n("el-collapse-item",{attrs:{name:"3"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.multiInstance.title"))+" "),n("i",{staticClass:"el-icon-s-data"})])]),n("wf-multi-instance",{attrs:{type:"UserTask",modeler:e.modeler,element:e.element}})],2),n("el-collapse-item",{attrs:{name:"4"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.listener.taskTitle"))+" "),n("i",{staticClass:"el-icon-warning"})])]),n("wf-listener",{attrs:{type:"Task",modeler:e.modeler,element:e.element}})],2),n("el-collapse-item",{attrs:{name:"5"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.form.title"))+" "),n("i",{staticClass:"el-icon-s-order"})])]),n("wf-form",{attrs:{modeler:e.modeler,element:e.element,"user-option":e.userOption,"form-option":e.formOption,"ex-form-option":e.exFormOption,"indep-form-option":e.indepFormOption}})],2),e.buttonOption&&e.buttonOption.length>0?n("el-collapse-item",{attrs:{name:"6"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.button.title"))+" "),n("i",{staticClass:"el-icon-s-help"})])]),n("wf-button",{attrs:{modeler:e.modeler,element:e.element,"button-option":e.buttonOption}})],2):e._e()]:e._e(),"bpmn:SequenceFlow"==e.type?[n("el-collapse-item",{attrs:{name:"2"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.condition.title"))+" "),n("i",{staticClass:"el-icon-s-promotion"})])]),n("wf-condition",{attrs:{modeler:e.modeler,element:e.element}})],2)]:e._e(),"bpmn:SubProcess"==e.type?[n("el-collapse-item",{attrs:{name:"2"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.assignee.title"))+" "),n("i",{staticClass:"el-icon-user-solid"})])]),n("wf-assignee",{attrs:{modeler:e.modeler,element:e.element,"user-option":e.userOption,"group-option":e.groupOption}})],2),n("el-collapse-item",{attrs:{name:"3"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.multiInstance.title"))+" "),n("i",{staticClass:"el-icon-s-data"})])]),n("wf-multi-instance",{attrs:{type:"SubProcess",modeler:e.modeler,element:e.element}})],2)]:e._e(),["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent"].includes(e.type)?[e.getEventDefinitions(null)?n("el-collapse-item",{attrs:{name:"7"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.event.title"))+" "),n("i",{staticClass:"el-icon-s-finance"})])]),n("wf-event",{attrs:{modeler:e.modeler,element:e.element}})],2):e._e()]:e._e(),["bpmn:CallActivity"].includes(e.type)?[n("el-collapse-item",{attrs:{name:"8"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.call.title"))+" "),n("i",{staticClass:"el-icon-s-finance"})])]),n("wf-call",{attrs:{modeler:e.modeler,element:e.element}})],2),n("el-collapse-item",{attrs:{name:"3"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.multiInstance.title"))+" "),n("i",{staticClass:"el-icon-s-data"})])]),n("wf-multi-instance",{attrs:{type:"SubProcess",modeler:e.modeler,element:e.element}})],2)]:e._e(),n("el-collapse-item",{attrs:{name:"99"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.node.listener.executionTitle"))+" "),n("i",{staticClass:"el-icon-question"})])]),n("wf-listener",{attrs:{type:"Execution",modeler:e.modeler,element:e.element}})],2)],2)},qQ=[],JQ=n("bf8d"),$Q=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.formData,"label-position":"left","label-width":"90px","label-suffix":":",size:"mini"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.node.basic.id"),prop:"id",rules:{required:!0,trigger:"change"}}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.basic.id")},on:{input:function(t){return e.updateProperties({id:e.formData.id})}},model:{value:e.formData.id,callback:function(t){e.$set(e.formData,"id",t)},expression:"formData.id"}})],1),["bpmn:TextAnnotation","bpmn:Association"].includes(e.element.type)?e._e():n("el-form-item",{attrs:{label:e.t("wf.panel.node.basic.name")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.basic.name")},on:{input:function(t){return e.updateProperties({name:e.formData.name||void 0})}},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),["bpmn:TextAnnotation"].includes(e.element.type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.basic.text")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.basic.text")},on:{input:function(t){return e.updateProperties({text:e.formData.text||void 0})}},model:{value:e.formData.text,callback:function(t){e.$set(e.formData,"text",t)},expression:"formData.text"}})],1):e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.basic.description")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.basic.description")},on:{input:e.updateDocumentation},model:{value:e.formData.description,callback:function(t){e.$set(e.formData,"description",t)},expression:"formData.description"}})],1),"bpmn:UserTask"==e.element.type?[n("el-divider"),n("el-form-item",{attrs:{label:e.t("wf.panel.node.basic.rollbackNode.label"),"label-width":"90px"}},[n("el-select",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.basic.rollbackNode.placeholder")},on:{change:function(t){return e.updateProperties({rollbackNode:e.formData.rollbackNode||void 0})}},model:{value:e.formData.rollbackNode,callback:function(t){e.$set(e.formData,"rollbackNode",t)},expression:"formData.rollbackNode"}},[e._l(e.nodes,(function(t){return["bpmn:UserTask"==t.nodeType&&t.id!=e.formData.id?n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}}):e._e()]}))],2)],1),n("el-form-item",{attrs:{"label-width":"190px"},scopedSlots:e._u([{key:"label",fn:function(){return[n("el-tooltip",{attrs:{effect:"dark",placement:"top"},scopedSlots:e._u([{key:"content",fn:function(){return[e._v(" "+e._s(e.t("wf.panel.node.basic.rollbackNode.backToRejecterText"))+" ")]},proxy:!0}],null,!1,637318204)},[n("span",[e._v(e._s(e.t("wf.panel.node.basic.rollbackNode.backToRejecter"))+" "),n("i",{staticClass:"el-icon-question"}),e._v(":")])])]},proxy:!0}],null,!1,3680016680)},[n("el-switch",{attrs:{"active-value":"true","inactive-value":"false"},on:{change:function(t){return e.updateProperties({backToRejecter:e.formData.backToRejecter||void 0})}},model:{value:e.formData.backToRejecter,callback:function(t){e.$set(e.formData,"backToRejecter",t)},expression:"formData.backToRejecter"}})],1)]:e._e()],2)},XQ=[],ZQ={name:"wf-basic",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=e.name;"bpmn:StartEvent"==this.element.type&&t.includes("请先点击")&&(this.updateProperties({name:"开始"}),this.$set(this.formData,"name","开始"))},deep:!0,immediate:!0}}},eW=ZQ,tW=Object(WQ["a"])(eW,$Q,XQ,!1,null,null,null),nW=tW.exports,iW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.$refs["user-option"].visible=!0}}},[e._v(e._s(e.t("wf.panel.node.assignee.v2.configure")))]),n("el-table",{staticStyle:{"margin-top":"5px"},attrs:{data:e.data,border:"",size:"mini"}},[n("el-table-column",{attrs:{prop:"type",label:e.t("wf.panel.node.assignee.v2.type"),align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[e._v(" "+e._s(e.typeDic[n.type])+" ")]}}])}),n("el-table-column",{attrs:{prop:"text",label:e.t("wf.panel.node.assignee.v2.value"),align:"center","show-overflow-tooltip":""}})],1),n("user-option",{ref:"user-option",attrs:{"user-option":e.option},on:{submit:e.handleSubmit}})],1)},oW=[],rW=(n("8d60"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{ref:"wf-dialog",attrs:{"custom-class":"wf-dialog",visible:e.visible,title:e.t("wf.panel.node.assignee.v2.configure"),width:"60%","before-close":e.handleClose,"append-to-body":""},on:{"update:visible":function(t){e.visible=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[n("el-button",{attrs:{size:"mini"},on:{click:e.handleClose}},[e._v(e._s(e.t("wf.panel.node.assignee.v2.cancel")))]),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleSubmit}},[e._v(e._s(e.t("wf.panel.node.assignee.v2.submit")))])]},proxy:!0}])},[e.visible?n("el-table",{staticClass:"avue-crud",attrs:{data:e.data,border:"",size:"mini"}},[n("el-table-column",{attrs:{align:"center","header-align":"center",width:"80"},scopedSlots:e._u([{key:"header",fn:function(){return[n("el-button",{attrs:{circle:"",type:"primary",size:"mini",icon:"el-icon-plus"},on:{click:function(t){return e.data.push({})}}})]},proxy:!0},{key:"default",fn:function(t){var i=t.$index;return[n("el-button",{attrs:{circle:"",type:"danger",size:"mini",icon:"el-icon-delete"},on:{click:function(t){return e.data.splice(i,1)}}})]}}],null,!1,1747691334)}),n("el-table-column",{attrs:{label:e.t("wf.panel.node.assignee.v2.type"),prop:"type",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row,o=t.$index;return[n("el-select",{attrs:{size:"mini",placeholder:e.t("wf.panel.node.assignee.v2.type")},on:{change:function(t){return e.handleTypeChange(o)}},model:{value:i.type,callback:function(t){e.$set(i,"type",t)},expression:"row.type"}},e._l(e.t("wf.panel.node.assignee.v2.typeList"),(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value,disabled:Boolean(e.data.find((function(e){return e.type==t.value})))}})})),1)]}}],null,!1,1715292828)}),n("el-table-column",{attrs:{label:e.t("wf.panel.node.assignee.v2.value"),prop:"text",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row,o=t.$index;return["user"==i.type?[n("el-input",{attrs:{size:"mini",placeholder:e.t("wf.panel.node.assignee.v2.typeDic.user"),readonly:""},nativeOn:{click:function(t){return e.handleSelect(o,"user-select")}},scopedSlots:e._u([{key:"append",fn:function(){return[n("el-button",{attrs:{icon:"el-icon-plus"}})]},proxy:!0}],null,!0),model:{value:i.text,callback:function(t){e.$set(i,"text",t)},expression:"row.text"}})]:"role"==i.type?[n("avue-input-tree",{ref:"role_"+o,attrs:{size:"mini",dataType:"string",multiple:"",clearable:"",placeholder:e.t("wf.panel.node.assignee.v2.typeDic.role"),dic:e.roleList,props:e.roleProps||{label:"roleName",value:"id"}},on:{change:function(t){return e.handleChange(o,"role_"+o)}},model:{value:i.value,callback:function(t){e.$set(i,"value",t)},expression:"row.value"}})]:"dept"==i.type?[n("avue-input-tree",{ref:"dept_"+o,attrs:{size:"mini",dataType:"string",multiple:"",clearable:"",placeholder:e.t("wf.panel.node.assignee.v2.typeDic.dept"),dic:e.deptList,props:e.deptProps||{label:"deptName",value:"id"}},on:{change:function(t){return e.handleChange(o,"dept_"+o)}},model:{value:i.value,callback:function(t){e.$set(i,"value",t)},expression:"row.value"}})]:"post"==i.type?[n("avue-input-tree",{ref:"post_"+o,attrs:{size:"mini",dataType:"string",multiple:"",clearable:"",placeholder:e.t("wf.panel.node.assignee.v2.typeDic.post"),dic:e.postList,props:e.postProps||{label:"postName",value:"id"}},on:{change:function(t){return e.handleChange(o,"post_"+o)}},model:{value:i.value,callback:function(t){e.$set(i,"value",t)},expression:"row.value"}})]:"custom"==i.type?[n("el-select",{attrs:{size:"mini",filterable:"",clearable:"",placeholder:e.t("wf.panel.node.assignee.v2.customRemark"),"allow-create":""},on:{change:function(t){return e.handleCustomChange(t,o)}},model:{value:i.value,callback:function(t){e.$set(i,"value",t)},expression:"row.value"}},e._l(e.customList,(function(e){return n("el-option",{key:e.expression,attrs:{value:e.expression,label:e.name}})})),1)]:e._e()]}}],null,!1,2538700089)})],1):e._e(),n("user-select",{ref:"user-select",attrs:{"user-url":e.userUrl,"custom-option":e.customOption,"default-checked":e.defaultChecked},on:{confirm:e.handleSelectConfirm}})],1)}),sW=[],aW=(n("2c50"),n("adae"),n("37fd"),n("7352"),n("f9ae")),lW={mixins:[zQ["a"]],props:{userOption:Object},components:{UserSelect:aW["a"]},computed:{userUrl:function(){return this.userOption.userUrl},roleUrl:function(){return this.userOption.roleUrl},deptUrl:function(){return this.userOption.deptUrl},postUrl:function(){return this.userOption.postUrl},customUrl:function(){return this.userOption.customUrl},customOption:function(){return this.userOption.customOption},roleProps:function(){return this.customOption?this.customOption.roleProps:null},deptProps:function(){return this.customOption?this.customOption.deptProps:null},postProps:function(){return this.customOption?this.customOption.postProps:null}},watch:{visible:function(e){this.init||(this.getRoleList(),this.getDeptList(),this.getPostList(),this.getCustomList(),this.init=!0),e&&this.userOption&&this.userOption.data&&this.$set(this,"data",JSON.parse(JSON.stringify(this.userOption.data)))}},data:function(){return{init:!1,visible:!1,data:[],roleList:[],deptList:[],postList:[],customList:[],selectIndex:0,defaultChecked:""}},methods:{handleSelect:function(e,t){this.selectIndex=e,this.defaultChecked=this.data[e].value,this.$refs[t].visible=!0},handleSelectConfirm:function(e,t){this.$set(this.data[this.selectIndex],"value",e),this.$set(this.data[this.selectIndex],"text",t)},handleTypeChange:function(e){this.$set(this.data,e,{type:this.data[e].type})},handleChange:function(e,t){var n=this;this.$nextTick((function(){var i=n.$refs[t].labelShow.join(",");i&&n.$set(n.data[e],"text",i)}))},handleCustomChange:function(e,t){var n=this.customList.find((function(t){return t.expression==e}));n?this.$set(this.data[t],"text",n.name):this.$set(this.data[t],"text",e)},getRoleList:function(){var e=this;this.$axios.get(this.roleUrl).then((function(t){e.roleList=e.roleProps?e.getAsVal(t,e.roleProps.records):t.data.data}))},getDeptList:function(){var e=this;this.$axios.get(this.deptUrl).then((function(t){e.deptList=e.deptProps?e.getAsVal(t,e.deptProps.records):t.data.data}))},getPostList:function(){var e=this;this.$axios.get(this.postUrl,{params:{size:-1}}).then((function(t){e.postList=e.postProps?e.getAsVal(t,e.postProps.records):t.data.data.records}))},getCustomList:function(){var e=this,t={size:-1,type:"user",status:1};this.$axios.get(this.customUrl,{params:t}).then((function(t){e.customList=t.data.data.records}))},handleSubmit:function(){this.$emit("submit",this.data.filter((function(e){return e.type&&e.value}))),this.visible=!1},handleClose:function(e){this.visible=!1,e&&"function"==typeof e&&e()},getAsVal:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=this.deepClone(e);return this.validatenull(n)||n.split(".").forEach((function(e){i=t.validatenull(i[e])?"":i[e]})),i}}},cW=lW,hW=(n("e460"),Object(WQ["a"])(cW,rW,sW,!1,null,null,null)),uW=hW.exports,dW={name:"wf-select-v2",mixins:[JQ["a"],zQ["a"]],components:{UserOption:uW},data:function(){var e=this;return{extensionType:"flowable:Assignee",data:[],typeDic:e.t("wf.panel.node.assignee.v2.typeDic"),option:{}}},watch:{formData:{handler:function(e){var t=this.getExtensionElementsEq(this.extensionType),n=t.map((function(e){var t=e.type,n=e.value,i=e.text;return{type:t,value:n,text:i}}));this.$set(this,"data",n),this.$set(this,"option",Object(u["a"])(Object(u["a"])({},this.userOption),{},{data:n}))},deep:!0,immediate:!0}},methods:{handleSubmit:function(e){this.$set(this,"data",e),this.$set(this.option,"data",e),this.setExtensionElements(this.extensionType,e);var t=this.element.businessObject.assignee;"${assignee}"!=t&&this.updateProperties({assignee:void 0}),this.updateProperties({candidateUsers:void 0}),this.updateProperties({candidateGroups:void 0})}}},pW=dW,fW=Object(WQ["a"])(pW,iW,oW,!1,null,null,null),gW=fW.exports,mW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleOpen}},[e._v(e._s(e.t("wf.panel.node.listener.add")))]),n("el-table",{ref:"table",staticStyle:{"margin-top":"5px"},attrs:{data:e.listener,border:"",size:"mini","highlight-current-row":""},on:{"row-click":e.rowClick}},[n("el-table-column",{attrs:{prop:"event",label:e.t("wf.panel.node.listener.event"),align:"center"}}),n("el-table-column",{attrs:{prop:"listenerType",label:e.t("wf.panel.node.listener.type"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(e.t("wf.panel.node.listener.listenerType")[t.row.listenerType]))])]}}])}),n("el-table-column",{attrs:{prop:"value",label:e.t("wf.panel.node.listener.value"),align:"center"}}),n("el-table-column",{attrs:{label:e.t("wf.panel.node.listener.operations"),align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(n){return e.handleOpen(!1,t.row)}}},[e._v(e._s(e.t("wf.panel.node.listener.edit")))]),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(n){return e.handleDelete(t.$index)}}},[e._v(e._s(e.t("wf.panel.node.listener.delete")))])]}}])})],1),n("el-drawer",{attrs:{visible:e.listenerVisible,title:e.isAdd?e.t("wf.panel.node.listener.add"):e.t("wf.panel.node.listener.edit"),"append-to-body":"","before-close":e.handleClose,size:"50%"},on:{"update:visible":function(t){e.listenerVisible=t}}},[n("el-form",{ref:"form",staticStyle:{padding:"0 20px"},attrs:{model:e.form,rules:e.rules,size:"mini","label-suffix":":","label-position":"left","label-width":"100px"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.node.listener.event"),prop:"event"}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.t("wf.panel.node.listener.event")},model:{value:e.form.event,callback:function(t){e.$set(e.form,"event",t)},expression:"form.event"}},["Task"==e.type?e._l(e.eventTypeTask,(function(e){return n("el-option",{key:e,attrs:{label:e,value:e}})})):e._l(e.eventTypeExecution,(function(e){return n("el-option",{key:e,attrs:{label:e,value:e}})}))],2)],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.listener.type"),prop:"listenerType"}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.t("wf.panel.node.listener.type")},model:{value:e.form.listenerType,callback:function(t){e.$set(e.form,"listenerType",t)},expression:"form.listenerType"}},e._l(e.t("wf.panel.node.listener.listenerType"),(function(e,t){return n("el-option",{key:t,attrs:{label:e,value:t}})})),1)],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.listener.value"),prop:"value"}},[n("el-input",{attrs:{placeholder:e.t("wf.panel.node.listener.value")},model:{value:e.form.value,callback:function(t){e.$set(e.form,"value",t)},expression:"form.value"}})],1),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleSubmit}},[e._v(e._s(e.t("wf.panel.node.listener.submit")))])],1)],1)],1),n("wf-field",{staticStyle:{"margin-top":"20px"},attrs:{row:e.currentListener},on:{"row-save":e.fieldSave,"row-update":e.fieldUpdate,"row-del":e.fieldDel}})],1)},bW=[],vW=n("6d21"),yW=(n("d927"),n("b105"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return Object.keys(e.row).length>0?n("div",[n("p",[e._v("字段注入")]),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleOpen}},[e._v(e._s(e.t("wf.panel.node.listener.add")))]),n("el-table",{staticStyle:{"margin-top":"5px"},attrs:{data:e.data,border:"",size:"mini"}},[n("el-table-column",{attrs:{prop:"name",label:e.t("wf.panel.node.listener.name"),align:"center"}}),n("el-table-column",{attrs:{prop:"type",label:e.t("wf.panel.node.listener.type"),align:"center"}}),n("el-table-column",{attrs:{prop:"value",label:e.t("wf.panel.node.listener.value"),align:"center"}}),n("el-table-column",{attrs:{label:e.t("wf.panel.node.listener.operations"),align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(n){return e.handleOpen(!1,t.row,t.$index)}}},[e._v(e._s(e.t("wf.panel.node.listener.edit")))]),n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(n){return e.handleDelete(t.$index)}}},[e._v(e._s(e.t("wf.panel.node.listener.delete")))])]}}],null,!1,4286326991)})],1),n("el-drawer",{attrs:{visible:e.visible,title:e.isAdd?e.t("wf.panel.node.listener.add"):e.t("wf.panel.node.listener.edit"),"append-to-body":"","before-close":e.handleClose,size:"50%"},on:{"update:visible":function(t){e.visible=t}}},[n("el-form",{ref:"form",staticStyle:{padding:"0 20px"},attrs:{model:e.form,rules:e.rules,size:"mini","label-suffix":":","label-position":"left","label-width":"100px"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.node.listener.name"),prop:"name"}},[n("el-input",{attrs:{placeholder:e.t("wf.panel.node.listener.name")},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.listener.type"),prop:"type"}},[n("el-radio-group",{model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[n("el-radio",{attrs:{label:"string"}},[e._v("String")]),n("el-radio",{attrs:{label:"expression"}},[e._v("Expression")])],1)],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.listener.value"),prop:"value"}},[n("el-input",{attrs:{placeholder:e.t("wf.panel.node.listener.value")},model:{value:e.form.value,callback:function(t){e.$set(e.form,"value",t)},expression:"form.value"}})],1),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleSubmit}},[e._v(e._s(e.t("wf.panel.node.listener.submit")))])],1)],1)],1)],1):e._e()}),wW=[],_W={name:"wf-field",mixins:[zQ["a"]],props:{row:{type:Object,default:function(){return{}}}},computed:{data:function(){return this.row.fields||[]}},data:function(){return{form:{},rules:{name:[{required:!0}],type:[{required:!0}],value:[{required:!0}]},visible:!1,isAdd:!0,rowIndex:0}},methods:{handleSubmit:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var n=JSON.parse(JSON.stringify(e.form));e.isAdd?e.$emit("row-save",n):e.$emit("row-update",n,e.rowIndex),e.handleClose()}}))},handleOpen:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.visible=!0,this.isAdd=e,this.rowIndex=n,e||this.$set(this,"form",JSON.parse(JSON.stringify(t)))},handleClose:function(e){e&&e(),this.visible=!1,this.form={}},handleDelete:function(e){var t=this;this.$confirm(this.t("wf.panel.node.listener.message"),this.t("wf.panel.node.listener.warning"),{type:"warning"}).then((function(){t.$emit("row-del",{},e)})).catch((function(){}))}}},CW=_W,AW=Object(WQ["a"])(CW,yW,wW,!1,null,null,null),EW=AW.exports,xW={name:"wf-listener",components:{WfField:EW},mixins:[JQ["a"],zQ["a"]],props:{type:{type:String,required:!0,validator:function(e){return["Execution","Task"].includes(e)}}},data:function(){return{listener:[],listenerVisible:!1,eventTypeExecution:["start","take","end"],eventTypeTask:["create","assignment","complete","delete"],isAdd:!0,form:{listenerType:"class"},rules:{event:{required:!0,trigger:"change"},listenerType:{required:!0,trigger:"change"},value:{required:!0,trigger:"blur"}},currentListener:{}}},watch:{formData:{handler:function(e){var t=this,n=e.extensionElements,i=[];n&&n.values&&n.values.length>0&&n.values.forEach((function(e){if(e.$type.includes(t.type)||e.$type.includes(t.type.toLowerCase())){var n={id:d(16),event:e.event};if(e.class?(n.value=e.class,n.listenerType="class"):e.expression?(n.value=e.expression,n.listenerType="expression"):e.delegateExpression&&(n.value=e.delegateExpression,n.listenerType="delegateExpression"),e.fields){var o=[];e.fields.forEach((function(e){e.string?o.push({name:e.name,type:"string",value:e.string}):e.expression&&o.push({name:e.name,type:"expression",value:e.expression})})),n.fields=o}i.push(n)}})),this.listener=i,setTimeout((function(){var e=i[0];i.length>0&&t.$refs.table.setCurrentRow(e),t.rowClick(e)}))},deep:!0,immediate:!0}},mounted:function(){this.form.event=this["eventType".concat(this.type)][0]},methods:{handleSubmit:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var n=e.form;e.isAdd?(n.id=d(16),e.listener.push(n)):e.listener.splice(e.listener.findIndex((function(e){return e.id==n.id})),1,n),e.changeExtensionElements(),e.handleClose()}}))},handleDelete:function(e){var t=this;this.$confirm(this.t("wf.panel.node.listener.message"),this.t("wf.panel.node.listener.warning"),{type:"warning"}).then((function(){t.$delete(t.listener,e),t.changeExtensionElements()})).catch((function(){}))},changeExtensionElements:function(){var e=this,t=this.modeler.get("bpmnFactory"),n=[];this.listener.forEach((function(i){var o,r=i.listenerType,s=i.value,a=i.event,l=i.fields,c=(o={},Object(vW["a"])(o,r,s),Object(vW["a"])(o,"event",a),o);if(l&&l.length>0){var h=[];l.forEach((function(t){var n;h.push(e.createElement("flowable:Field",(n={},Object(vW["a"])(n,t.type,t.value),Object(vW["a"])(n,"name",t.name),n)))})),c.fields=h}var u=t.create("flowable:".concat(e.type,"Listener"),c);n.push(u)}));var i=[],o=this.element.businessObject.extensionElements;o&&o.values&&o.values.length>0&&o.values.forEach((function(t){t.$type.includes(e.type)||t.$type.includes(e.type.toLowerCase())||i.push(t)})),this.updateProperties({extensionElements:t.create("bpmn:ExtensionElements",{values:n.concat(i)})})},handleOpen:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;this.listenerVisible=!0,this.isAdd=e,e||this.$set(this,"form",JSON.parse(JSON.stringify(t)))},handleClose:function(){this.listenerVisible=!1,this.form={id:"",event:this["eventType".concat(this.type)][0],listenerType:"class",value:""}},rowClick:function(e){this.currentListener=e},fieldSave:function(e){var t=this.currentListener.fields;t||(t=[]),t.push(e),this.changeExtensionElements()},fieldUpdate:function(e,t){this.$set(this.currentListener.fields,t,e),this.changeExtensionElements()},fieldDel:function(e,t){this.$delete(this.currentListener.fields,t),this.changeExtensionElements()}}},SW=xW,kW=Object(WQ["a"])(SW,mW,bW,!1,null,null,null),DW=kW.exports,LW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.multiInstance,"label-position":"left","label-width":"90px","label-suffix":":",size:"mini"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.node.multiInstance.type")}},[n("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:e.t("wf.panel.node.multiInstance.type")},on:{change:e.handleMultiInstance},model:{value:e.multiInstance.isSequential,callback:function(t){e.$set(e.multiInstance,"isSequential",t)},expression:"multiInstance.isSequential"}},[n("el-option",{attrs:{label:e.t("wf.panel.node.multiInstance.parallel"),value:"Parallel"}}),n("el-option",{attrs:{label:e.t("wf.panel.node.multiInstance.sequential"),value:"Sequential"}})],1)],1),e.multiInstance.isSequential?n("div",[n("el-form-item",{attrs:{label:e.t("wf.panel.node.multiInstance.completionCondition")}},[n("el-slider",{attrs:{"show-input":"",min:0,max:100,"format-tooltip":function(e){return e+"%"}},on:{change:function(t){e.updateFormalExpression("completionCondition","${nrOfCompletedInstances/nrOfInstances >= "+t/100+"}")}},model:{value:e.multiInstance.completionCondition,callback:function(t){e.$set(e.multiInstance,"completionCondition",t)},expression:"multiInstance.completionCondition"}})],1)],1):e._e()],1)},IW=[],NW=(n("8120"),{name:"multi-instance",mixins:[JQ["a"],zQ["a"]],props:{type:{type:String,required:!0,validator:function(e){return["UserTask","SubProcess"].includes(e)}}},watch:{formData:{handler:function(e){var t=e.loopCharacteristics;if(t){var n=t.isSequential,i=t.completionCondition,o=t.loopCardinality,r=t.collection,s=t.elementVariable;if(n?this.$set(this.multiInstance,"isSequential","Sequential"):this.$set(this.multiInstance,"isSequential","Parallel"),i){var a=i.body;a.includes("${")&&a.includes(">=")?this.$set(this.multiInstance,"completionCondition",100*Number(a.substring(a.indexOf(">=")+2,a.indexOf("}")).trim())):this.$set(this.multiInstance,"completionCondition",a)}else this.$delete(this.multiInstance,"completionCondition");o?this.$set(this.multiInstance,"loopCardinality",o.body):this.$delete(this.multiInstance,"loopCardinality"),this.$set(this.multiInstance,"collection",r),this.$set(this.multiInstance,"elementVariable",s)}else this.$set(this,"multiInstance",{})},deep:!0,immediate:!0}},data:function(){return{multiInstance:{}}},methods:{handleMultiInstance:function(e){var t,n;e?(t=this.modeler.get("bpmnFactory").create("bpmn:MultiInstanceLoopCharacteristics"),"Sequential"===e&&(t.isSequential=!0),t["elementVariable"]="assignee",t["collection"]="${wfMultiInstanceHandler.getList(execution)}",t["completionCondition"]=this.modeler.get("bpmnFactory").create("bpmn:FormalExpression",{body:"${nrOfCompletedInstances/nrOfInstances >= 100}"}),this.$set(this.multiInstance,"completionCondition",100),n="${assignee}"):(t=void 0,n=void 0),"bpmn:UserTask"==this.element.type&&this.updateProperties({assignee:n}),this.updateProperties({loopCharacteristics:t})},updateMultiInstanceProperties:function(e){var t=this.element.businessObject.loopCharacteristics;if(t)for(var n in e)t[n]=e[n];this.updateProperties({loopCharacteristics:t})},updateFormalExpression:function(e,t){t=e&&t?this.modeler.get("bpmnFactory").create("bpmn:FormalExpression",{body:t}):void 0;var n=this.element.businessObject.loopCharacteristics;n[e]=t,this.updateProperties({loopCharacteristics:n})}}}),MW=NW,BW=Object(WQ["a"])(MW,LW,IW,!1,null,null,null),TW=BW.exports,OW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.form,"label-position":"left","label-width":"100px","label-suffix":":",size:"mini"}},["ex-form"==e.mode?[n("el-form-item",{scopedSlots:e._u([{key:"label",fn:function(){return[n("el-tooltip",{attrs:{effect:"dark",placement:"top"},scopedSlots:e._u([{key:"content",fn:function(){return[e._v(" "+e._s(e.t("wf.panel.node.form.remark.r1"))+" "+e._s("/workflow/process/external/"+e.form.exFormKey+"/start")+" "+e._s(e.t("wf.panel.node.form.router"))),n("br"),e._v(" "+e._s(e.t("wf.panel.node.form.remark.r2"))+" "+e._s("/workflow/process/external/"+e.form.exFormKey+"/detail")+" "+e._s(e.t("wf.panel.node.form.router"))),n("br"),e._v(" "+e._s(e.t("wf.panel.node.form.remark.r7"))+" "+e._s("/pages/plugin/workflow/pages/external/"+e.form.exFormKey+"/{type}")+" "+e._s(e.t("wf.panel.node.form.router"))),n("br"),e._v(" "+e._s(e.t("wf.panel.node.form.remark.r3"))),n("br"),e._v(" "+e._s(e.t("wf.panel.node.form.remark.r4"))+" ")]},proxy:!0}],null,!1,30100958)},[n("span",[e._v(e._s(e.t("wf.panel.node.form.exFormKey"))),n("i",{staticClass:"el-icon-question"}),e._v(":")])])]},proxy:!0}],null,!1,4246962041)},[n("el-input",{attrs:{readonly:"",placeholder:e.t("wf.panel.node.form.exFormKey")},on:{input:function(t){return e.handleUpdateProperties("exFormKey",e.form.exFormKey)}},model:{value:e.form.exFormKey,callback:function(t){e.$set(e.form,"exFormKey",t)},expression:"form.exFormKey"}})],1),n("el-form-item",{scopedSlots:e._u([{key:"label",fn:function(){return[n("el-tooltip",{attrs:{effect:"dark",placement:"top"},scopedSlots:e._u([{key:"content",fn:function(){return[e._v(" "+e._s(e.t("wf.panel.node.form.remark.r5"))),n("br"),e._v(" "+e._s(e.t("wf.panel.node.form.remark.r6"))+" ")]},proxy:!0}],null,!1,40483769)},[n("span",[e._v(e._s(e.t("wf.panel.node.form.exFormUrl"))),n("i",{staticClass:"el-icon-question"}),e._v(":")])])]},proxy:!0}],null,!1,2906194759)},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.form.exFormUrl")},on:{input:function(t){return e.handleUpdateProperties("exFormUrl",e.form.exFormUrl)}},model:{value:e.form.exFormUrl,callback:function(t){e.$set(e.form,"exFormUrl",t)},expression:"form.exFormUrl"}})],1),n("el-form-item",{attrs:{"label-width":"110px"},scopedSlots:e._u([{key:"label",fn:function(){return[n("el-tooltip",{attrs:{effect:"dark",placement:"top"},scopedSlots:e._u([{key:"content",fn:function(){return[e._v(" "+e._s(e.t("wf.panel.node.form.remark.r5"))),n("br"),e._v(" "+e._s(e.t("wf.panel.node.form.remark.r6"))+" ")]},proxy:!0}],null,!1,40483769)},[n("span",[e._v(e._s(e.t("wf.panel.node.form.exAppFormUrl"))),n("i",{staticClass:"el-icon-question"}),e._v(":")])])]},proxy:!0}],null,!1,2217135558)},[n("el-input",{attrs:{clearable:"",placeholder:"/pages/xxx"},on:{input:function(t){return e.handleUpdateProperties("exAppFormUrl",e.form.exAppFormUrl)}},model:{value:e.form.exAppFormUrl,callback:function(t){e.$set(e.form,"exAppFormUrl",t)},expression:"form.exAppFormUrl"}})],1)]:"indep"==e.mode?[n("avue-form",{attrs:{option:e.indepOption},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}})]:e._e(),e.column&&e.column.length>0?[n("el-table",{staticStyle:{"margin-top":"5px"},attrs:{data:e.column,border:"","row-key":"prop","default-expand-all":"",size:"mini"}},[n("el-table-column",{attrs:{prop:"label",label:e.t("wf.panel.node.form.label"),width:"120","header-align":"center",align:e.align,"show-overflow-tooltip":""}}),n("el-table-column",{attrs:{prop:"prop",label:e.t("wf.panel.node.form.prop"),align:"center","show-overflow-tooltip":""}}),n("el-table-column",{attrs:{prop:"readable",label:e.t("wf.panel.node.form.readable"),align:"center"},scopedSlots:e._u([{key:"header",fn:function(){return[e._v(" "+e._s(e.t("wf.panel.node.form.readable"))+" "),n("el-checkbox",{on:{change:function(t){return e.handleCheckAll(t,"readable")}},model:{value:e.readableCheckAll,callback:function(t){e.readableCheckAll=t},expression:"readableCheckAll"}})]},proxy:!0},{key:"default",fn:function(t){var i=t.row;return[n("el-checkbox",{on:{change:function(t){return e.handleCheckChange(i,"readable")}},model:{value:i.readable,callback:function(t){e.$set(i,"readable",t)},expression:"row.readable"}})]}}],null,!1,2807236954)}),n("el-table-column",{attrs:{prop:"writable",label:e.t("wf.panel.node.form.writable"),align:"center"},scopedSlots:e._u([{key:"header",fn:function(){return[e._v(" "+e._s(e.t("wf.panel.node.form.writable"))+" "),n("el-checkbox",{on:{change:function(t){return e.handleCheckAll(t,"writable")}},model:{value:e.writableCheckAll,callback:function(t){e.writableCheckAll=t},expression:"writableCheckAll"}})]},proxy:!0},{key:"default",fn:function(t){var i=t.row;return[n("el-checkbox",{on:{change:function(t){return e.handleCheckChange(i,"writable")}},model:{value:i.writable,callback:function(t){e.$set(i,"writable",t)},expression:"row.writable"}})]}}],null,!1,4030978032)})],1)]:e.column&&0!=e.column.length||"indep"==e.mode?e._e():[n("el-tag",{attrs:{type:"danger",size:"mini"}},[n("i",{staticClass:"el-icon-question"}),e._v(" "+e._s(e.t("wf.panel.node.form.unknown")))])],n("el-divider"),"bpmn:UserTask"==e.element.type?[n("el-form-item",{attrs:{label:e.t("wf.panel.node.examine.hideAttachment"),"label-width":"130px"}},[n("el-switch",{on:{change:function(t){return e.handleUpdateProperties("hideAttachment",e.form.hideAttachment)}},model:{value:e.form.hideAttachment,callback:function(t){e.$set(e.form,"hideAttachment",t)},expression:"form.hideAttachment"}})],1)]:e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.examine.hideCopy"),"label-width":"130px"}},[n("el-switch",{on:{change:function(t){return e.handleUpdateProperties("hideCopy",e.form.hideCopy)}},model:{value:e.form.hideCopy,callback:function(t){e.$set(e.form,"hideCopy",t)},expression:"form.hideCopy"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.examine.hideAssignee"),"label-width":"130px"}},[n("el-switch",{on:{change:function(t){return e.handleUpdateProperties("hideExamine",e.form.hideExamine)}},model:{value:e.form.hideExamine,callback:function(t){e.$set(e.form,"hideExamine",t)},expression:"form.hideExamine"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.examine.copyUser"),"label-width":"130px"}},[n("el-input",{attrs:{size:"mini",placeholder:e.t("wf.panel.node.assignee.v2.typeDic.user"),clearable:""},on:{clear:e.handleUserClear},scopedSlots:e._u([{key:"append",fn:function(){return[n("el-button",{attrs:{icon:"el-icon-plus"},on:{click:e.handleUserSelect}})]},proxy:!0}]),model:{value:e.form.$copyUser,callback:function(t){e.$set(e.form,"$copyUser",t)},expression:"form.$copyUser"}})],1),n("user-select",{ref:"user-select",attrs:{"user-url":e.userUrl,"custom-option":e.customOption,"default-checked":e.defaultChecked},on:{confirm:e.handleUserSelectConfirm}})],2)},RW=[],PW=n("cf9a"),FW=PW["a"],jW=Object(WQ["a"])(FW,OW,RW,!1,null,null,null),zW=jW.exports,VW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.form,"label-position":"left","label-width":"90px","label-suffix":":",size:"mini"}},[n("el-table",{staticStyle:{"margin-top":"5px"},attrs:{data:e.column,border:"",size:"mini"}},[n("el-table-column",{attrs:{prop:"label",label:e.t("wf.panel.node.button.label"),align:"center",width:"90","show-overflow-tooltip":""}}),n("el-table-column",{attrs:{prop:"prop",label:e.t("wf.panel.node.button.prop"),align:"center","show-overflow-tooltip":""}}),n("el-table-column",{attrs:{prop:"display",label:e.t("wf.panel.node.button.display"),align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("el-checkbox",{on:{change:function(t){return e.setExtensionElements(e.extensionType,e.column)}},model:{value:i.display,callback:function(t){e.$set(i,"display",t)},expression:"row.display"}})]}}])})],1)],1)},QW=[],WW={name:"wf-button",mixins:[JQ["a"],zQ["a"]],data:function(){return{extensionType:"flowable:Button",form:{},column:[]}},watch:{formData:{handler:function(e){var t=e.extensionElements,n=[];if(this.buttonOption&&this.buttonOption.length>0){var i=JSON.parse(JSON.stringify(this.buttonOption)),o=[];if(t&&t.values&&t.values.length>0){var r=this.getExtensionElementsEq(this.extensionType);i.forEach((function(e){var t=r.find((function(t){return t.prop==e.prop}));t&&(e.display=JSON.parse(t.display)),o.push(e)}))}else i.forEach((function(e){return o.push(e)}));this.setExtensionElements(this.extensionType,o),n=i}this.$set(this,"column",n)},deep:!0,immediate:!0}}},HW=WW,UW=Object(WQ["a"])(HW,VW,QW,!1,null,null,null),YW=UW.exports,GW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.condition,"label-position":"left","label-width":"90px","label-suffix":":",size:"mini"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.node.condition.conditionExpression")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.condition.conditionExpression")},on:{input:function(t){return e.updateFormalExpression("conditionExpression",e.condition.conditionExpression)}},model:{value:e.condition.conditionExpression,callback:function(t){e.$set(e.condition,"conditionExpression",t)},expression:"condition.conditionExpression"}})],1)],1)},KW=[],qW={name:"wf-condition",mixins:[JQ["a"],zQ["a"]],data:function(){return{condition:{}}},watch:{formData:{handler:function(e){var t=e.conditionExpression;t?this.$set(this.condition,"conditionExpression",t.body):this.$delete(this.condition,"conditionExpression")},deep:!0,immediate:!0}}},JW=qW,$W=Object(WQ["a"])(JW,GW,KW,!1,null,null,null),XW=$W.exports,ZW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",["bpmn:TimerEventDefinition"==e.type?n("wf-timer-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e(),"bpmn:SignalEventDefinition"==e.type?n("wf-signal-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e(),"bpmn:MessageEventDefinition"==e.type?n("wf-message-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e(),"bpmn:ConditionalEventDefinition"==e.type?n("wf-conditional-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e(),"bpmn:ErrorEventDefinition"==e.type?n("wf-error-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e(),"bpmn:TerminateEventDefinition"==e.type?n("wf-terminate-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e(),"bpmn:CompensateEventDefinition"==e.type?n("wf-compensate-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e(),"bpmn:EscalationEventDefinition"==e.type?n("wf-escalation-event",{attrs:{modeler:e.modeler,element:e.element}}):e._e()],1)},eH=[],tH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.timer,"label-position":"left","label-suffix":":","label-width":"115px",size:"mini"}},[["bpmn:StartEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({isInterrupting:e.timer.isInterrupting})}},model:{value:e.timer.isInterrupting,callback:function(t){e.$set(e.timer,"isInterrupting",t)},expression:"timer.isInterrupting"}})],1):e._e(),["bpmn:BoundaryEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({cancelActivity:e.timer.cancelActivity})}},model:{value:e.timer.cancelActivity,callback:function(t){e.$set(e.timer,"cancelActivity",t)},expression:"timer.cancelActivity"}})],1):e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.timer.timeCycle")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.event.timer.timeCycle")},on:{input:function(t){e.setEventDefinitions(e.type,{timeCycle:e.createElement(e.expressionType,{body:e.timer.timeCycle})})}},model:{value:e.timer.timeCycle,callback:function(t){e.$set(e.timer,"timeCycle",t)},expression:"timer.timeCycle"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.timer.timeDate")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.event.timer.timeDate")},on:{input:function(t){e.setEventDefinitions(e.type,{timeDate:e.createElement(e.expressionType,{body:e.timer.timeDate})})}},model:{value:e.timer.timeDate,callback:function(t){e.$set(e.timer,"timeDate",t)},expression:"timer.timeDate"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.timer.timeDuration")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.event.timer.timeDuration")},on:{input:function(t){e.setEventDefinitions(e.type,{timeDuration:e.createElement(e.expressionType,{body:e.timer.timeDuration})})}},model:{value:e.timer.timeDuration,callback:function(t){e.$set(e.timer,"timeDuration",t)},expression:"timer.timeDuration"}})],1)],1)},nH=[],iH={name:"wf-timer-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=e.isInterrupting,n=e.cancelActivity;void 0==t&&(t=!0),void 0==n&&(n=!0),this.$set(this.timer,"isInterrupting",t),this.$set(this.timer,"cancelActivity",n);var i=this.getEventDefinitions(this.type);if(i&&i.length>0){var o=i[0],r=o.timeCycle,s=o.timeDate,a=o.timeDuration;r&&this.$set(this.timer,"timeCycle",r.body),s&&this.$set(this.timer,"timeDate",s.body),a&&this.$set(this.timer,"timeDuration",a.body)}},deep:!0,immediate:!0}},data:function(){return{type:"bpmn:TimerEventDefinition",expressionType:"bpmn:Expression",timer:{}}}},oH=iH,rH=Object(WQ["a"])(oH,tH,nH,!1,null,null,null),sH=rH.exports,aH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.signal,"label-position":"left","label-suffix":":","label-width":"115px",size:"mini"}},[n("avue-crud",{staticStyle:{"margin-bottom":"10px"},attrs:{data:e.signalList,option:e.option},on:{"row-save":e.handleAdd,"row-update":e.handleEdit,"row-del":e.handleDelete},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}}),["bpmn:StartEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({isInterrupting:e.signal.isInterrupting})}},model:{value:e.signal.isInterrupting,callback:function(t){e.$set(e.signal,"isInterrupting",t)},expression:"signal.isInterrupting"}})],1):e._e(),["bpmn:BoundaryEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({cancelActivity:e.signal.cancelActivity})}},model:{value:e.signal.cancelActivity,callback:function(t){e.$set(e.signal,"cancelActivity",t)},expression:"signal.cancelActivity"}})],1):e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.signalRef")}},[n("el-select",{attrs:{clearable:"",filterable:"","allow-create":"",placeholder:e.t("wf.panel.node.event.signalRef")},on:{change:function(t){e.setEventDefinitions(e.type,{signalRef:t?e.createElement(e.signalType,{id:t,name:t}):void 0})}},model:{value:e.signal.signalRef,callback:function(t){e.$set(e.signal,"signalRef",t)},expression:"signal.signalRef"}},e._l(e.signalList,(function(e,t){return n("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1)],1)},lH=[],cH={name:"wf-signal-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=e.isInterrupting,n=e.cancelActivity;void 0==t&&(t=!0),void 0==n&&(n=!0),this.$set(this.signal,"isInterrupting",t),this.$set(this.signal,"cancelActivity",n);var i=this.getRootElements(this.signalType);this.$set(this,"signalList",i);var o=this.getEventDefinitions(this.type);if(o&&o.length>0){var r=o[0].signalRef;r&&(i.find((function(e){return e.id==r.id}))?this.$set(this.signal,"signalRef",r.id):this.setEventDefinitions(this.type,{signalRef:void 0}))}},deep:!0,immediate:!0}},data:function(){return{type:"bpmn:SignalEventDefinition",signalType:"bpmn:Signal",signal:{},signalList:[],form:{},option:{size:"mini",tip:!1,border:!0,dialogType:"drawer",viewBtn:!1,menuWidth:"150px",align:"center",refreshBtn:!1,filterBtn:!1,searchShowBtn:!1,columnBtn:!1,addBtnText:"新 增 信 号",column:[{label:"ID",prop:"id",overHidden:!0,span:24,editDisabled:!0,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]},{label:"Name",prop:"name",overHidden:!0,span:24,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]}]}}},methods:{handleAdd:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements();if(-1!=s.findIndex((function(t){return t.$type==i.signalType&&t.id==e.id})))return this.$message.error("ID:".concat(o," 已存在")),void n();s.unshift(this.createElement(this.signalType,{id:o,name:r})),this.signalList.push(e),t()},handleEdit:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements(),a=s.findIndex((function(t){return t.$type==i.signalType&&t.id==e.id}));s.splice(a,1,this.createElement(this.signalType,{id:o,name:r})),this.signalList.splice(t,1,e),n()},handleDelete:function(e){var t=this;this.$confirm("确定要删除此项吗?","警告",{type:"warning"}).then((function(){var n=t.signalList.findIndex((function(t){return t.id==e.id})),i=t.getRootElements(),o=i.findIndex((function(n){return n.$type==t.signalType&&n.id==e.id}));i.splice(o,1),t.signalList.splice(n,1)})).catch((function(){}))}}},hH=cH,uH=Object(WQ["a"])(hH,aH,lH,!1,null,null,null),dH=uH.exports,pH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.message,"label-position":"left","label-suffix":":","label-width":"115px",size:"mini"}},[n("avue-crud",{staticStyle:{"margin-bottom":"10px"},attrs:{data:e.messageList,option:e.option},on:{"row-save":e.handleAdd,"row-update":e.handleEdit,"row-del":e.handleDelete},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}}),["bpmn:StartEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({isInterrupting:e.message.isInterrupting})}},model:{value:e.message.isInterrupting,callback:function(t){e.$set(e.message,"isInterrupting",t)},expression:"message.isInterrupting"}})],1):e._e(),["bpmn:BoundaryEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({cancelActivity:e.message.cancelActivity})}},model:{value:e.message.cancelActivity,callback:function(t){e.$set(e.message,"cancelActivity",t)},expression:"message.cancelActivity"}})],1):e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.messageRef")}},[n("el-select",{attrs:{clearable:"",filterable:"","allow-create":"",placeholder:e.t("wf.panel.node.event.messageRef")},on:{change:function(t){e.setEventDefinitions(e.type,{messageRef:t?e.createElement(e.messageType,{id:t,name:t}):void 0})}},model:{value:e.message.messageRef,callback:function(t){e.$set(e.message,"messageRef",t)},expression:"message.messageRef"}},e._l(e.messageList,(function(e,t){return n("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1)],1)},fH=[],gH={name:"wf-message-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=e.isInterrupting,n=e.cancelActivity;void 0==t&&(t=!0),void 0==n&&(n=!0),this.$set(this.message,"isInterrupting",t),this.$set(this.message,"cancelActivity",n);var i=this.getRootElements(this.messageType);this.$set(this,"messageList",i);var o=this.getEventDefinitions(this.type);if(o&&o.length>0){var r=o[0].messageRef;r&&(i.find((function(e){return e.id==r.id}))?this.$set(this.message,"messageRef",r.id):this.setEventDefinitions(this.type,{messageRef:void 0}))}},deep:!0,immediate:!0}},data:function(){return{type:"bpmn:MessageEventDefinition",messageType:"bpmn:Message",message:{},messageList:[],form:{},option:{size:"mini",tip:!1,border:!0,dialogType:"drawer",viewBtn:!1,menuWidth:"150px",align:"center",refreshBtn:!1,filterBtn:!1,searchShowBtn:!1,columnBtn:!1,addBtnText:"新 增 消 息",column:[{label:"ID",prop:"id",overHidden:!0,span:24,editDisabled:!0,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]},{label:"Name",prop:"name",overHidden:!0,span:24,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]}]}}},methods:{handleAdd:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements();if(-1!=s.findIndex((function(t){return t.$type==i.messageType&&t.id==e.id})))return this.$message.error("ID:".concat(o," 已存在")),void n();s.unshift(this.createElement(this.messageType,{id:o,name:r})),this.messageList.push(e),t()},handleEdit:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements(),a=s.findIndex((function(t){return t.$type==i.messageType&&t.id==e.id}));s.splice(a,1,this.createElement(this.messageType,{id:o,name:r})),this.messageList.splice(t,1,e),n()},handleDelete:function(e){var t=this;this.$confirm("确定要删除此项吗?","警告",{type:"warning"}).then((function(){var n=t.messageList.findIndex((function(t){return t.id==e.id})),i=t.getRootElements(),o=i.findIndex((function(n){return n.$type==t.messageType&&n.id==e.id}));i.splice(o,1),t.messageList.splice(n,1)})).catch((function(){}))}}},mH=gH,bH=Object(WQ["a"])(mH,pH,fH,!1,null,null,null),vH=bH.exports,yH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.error,"label-position":"left","label-suffix":":","label-width":"115px",size:"mini"}},[n("avue-crud",{staticStyle:{"margin-bottom":"10px"},attrs:{data:e.errorList,option:e.option},on:{"row-save":e.handleAdd,"row-update":e.handleEdit,"row-del":e.handleDelete},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}}),["bpmn:StartEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({isInterrupting:e.error.isInterrupting})}},model:{value:e.error.isInterrupting,callback:function(t){e.$set(e.error,"isInterrupting",t)},expression:"error.isInterrupting"}})],1):e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.errorRef")}},[n("el-select",{attrs:{clearable:"",filterable:"","allow-create":"",placeholder:e.t("wf.panel.node.event.errorRef")},on:{change:function(t){e.setEventDefinitions(e.type,{errorRef:t?e.createElement(e.errorType,{id:t,name:t}):void 0})}},model:{value:e.error.errorRef,callback:function(t){e.$set(e.error,"errorRef",t)},expression:"error.errorRef"}},e._l(e.errorList,(function(e,t){return n("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1)],1)},wH=[],_H={name:"wf-error-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=e.isInterrupting;void 0==t&&(t=!0),this.$set(this.error,"isInterrupting",t);var n=this.getRootElements(this.errorType);this.$set(this,"errorList",n);var i=this.getEventDefinitions(this.type);if(i&&i.length>0){var o=i[0].errorRef;n.find((function(e){return e.id==o.id}))?this.$set(this.error,"errorRef",o.id):this.setEventDefinitions(this.type,{errorRef:void 0})}},deep:!0,immediate:!0}},data:function(){return{type:"bpmn:ErrorEventDefinition",errorType:"bpmn:Error",error:{},errorList:[],form:{},option:{size:"mini",tip:!1,border:!0,dialogType:"drawer",viewBtn:!1,menuWidth:"150px",align:"center",refreshBtn:!1,filterBtn:!1,searchShowBtn:!1,columnBtn:!1,addBtnText:"新 增 错 误",column:[{label:"ID",prop:"id",overHidden:!0,span:24,editDisabled:!0,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]},{label:"Name",prop:"name",overHidden:!0,span:24,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]}]}}},methods:{handleAdd:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements();if(-1!=s.findIndex((function(t){return t.$type==i.errorType&&t.id==e.id})))return this.$error.error("ID:".concat(o," 已存在")),void n();s.unshift(this.createElement(this.errorType,{id:o,name:r})),this.errorList.push(e),t()},handleEdit:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements(),a=s.findIndex((function(t){return t.$type==i.errorType&&t.id==e.id}));s.splice(a,1,this.createElement(this.errorType,{id:o,name:r})),this.errorList.splice(t,1,e),n()},handleDelete:function(e){var t=this;this.$confirm("确定要删除此项吗?","警告",{type:"warning"}).then((function(){var n=t.errorList.findIndex((function(t){return t.id==e.id})),i=t.getRootElements(),o=i.findIndex((function(n){return n.$type==t.errorType&&n.id==e.id}));i.splice(o,1),t.errorList.splice(n,1)})).catch((function(){}))}}},CH=_H,AH=Object(WQ["a"])(CH,yH,wH,!1,null,null,null),EH=AH.exports,xH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.terminate,"label-position":"left","label-suffix":":","label-width":"115px",size:"mini"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.terminateAll")}},[n("el-switch",{on:{change:function(t){e.element.businessObject.eventDefinitions[0].$attrs["flowable:terminateAll"]=t}},model:{value:e.terminate.terminateAll,callback:function(t){e.$set(e.terminate,"terminateAll",t)},expression:"terminate.terminateAll"}})],1)],1)},SH=[],kH={name:"wf-terminate-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=this.getEventDefinitions(this.type);if(t&&t.length>0){var n=t[0].$attrs["flowable:terminateAll"];n&&this.$set(this.terminate,"terminateAll",JSON.parse(n))}},deep:!0,immediate:!0}},data:function(){return{terminate:{}}}},DH=kH,LH=Object(WQ["a"])(DH,xH,SH,!1,null,null,null),IH=LH.exports,NH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.compensate,"label-position":"left","label-suffix":":","label-width":"115px",size:"mini"}},[n("avue-crud",{staticStyle:{"margin-bottom":"10px"},attrs:{data:e.compensateList,option:e.option},on:{"row-save":e.handleAdd,"row-update":e.handleEdit,"row-del":e.handleDelete},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}}),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.activityRef")}},[n("el-select",{attrs:{clearable:"",filterable:"","allow-create":"",placeholder:e.t("wf.panel.node.event.activityRef")},on:{change:function(t){e.setEventDefinitions(e.type,{activityRef:t?e.createElement(e.compensateType,{id:t,name:t}):void 0})}},model:{value:e.compensate.activityRef,callback:function(t){e.$set(e.compensate,"activityRef",t)},expression:"compensate.activityRef"}},e._l(e.compensateList,(function(e,t){return n("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1)],1)},MH=[],BH={name:"wf-compensate-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=this.getRootElements(this.compensateType);this.$set(this,"compensateList",t);var n=this.getEventDefinitions(this.type);if(n&&n.length>0){var i=n[0].activityRef;t.find((function(e){return e.id==i.id}))?this.$set(this.compensate,"activityRef",i.id):this.setEventDefinitions(this.type,{activityRef:void 0})}},deep:!0,immediate:!0}},data:function(){return{type:"bpmn:CompensateEventDefinition",compensateType:"bpmn:Activity",compensate:{},compensateList:[],form:{},option:{size:"mini",tip:!1,border:!0,dialogType:"drawer",viewBtn:!1,menuWidth:"150px",align:"center",refreshBtn:!1,filterBtn:!1,searchShowBtn:!1,columnBtn:!1,addBtnText:"新 增 活 动",column:[{label:"ID",prop:"id",overHidden:!0,span:24,editDisabled:!0,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]},{label:"Name",prop:"name",overHidden:!0,span:24,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母"}]}]}}},methods:{handleAdd:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements();if(-1!=s.findIndex((function(t){return t.$type==i.compensateType&&t.id==e.id})))return this.$message.error("ID:".concat(o," 已存在")),void n();s.unshift(this.createElement(this.compensateType,{id:o,name:r})),this.compensateList.push(e),t()},handleEdit:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements(),a=s.findIndex((function(t){return t.$type==i.compensateType&&t.id==e.id}));s.splice(a,1,this.createElement(this.compensateType,{id:o,name:r})),this.compensateList.splice(t,1,e),n()},handleDelete:function(e){var t=this;this.$confirm("确定要删除此项吗?","警告",{type:"warning"}).then((function(){var n=t.compensateList.findIndex((function(t){return t.id==e.id})),i=t.getRootElements(),o=i.findIndex((function(n){return n.$type==t.compensateType&&n.id==e.id}));i.splice(o,1),t.compensateList.splice(n,1)})).catch((function(){}))}}},TH=BH,OH=Object(WQ["a"])(TH,NH,MH,!1,null,null,null),RH=OH.exports,PH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.conditional,"label-position":"left","label-suffix":":","label-width":"115px",size:"mini"}},[["bpmn:StartEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({isInterrupting:e.conditional.isInterrupting})}},model:{value:e.conditional.isInterrupting,callback:function(t){e.$set(e.conditional,"isInterrupting",t)},expression:"conditional.isInterrupting"}})],1):e._e(),["bpmn:BoundaryEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({cancelActivity:e.conditional.cancelActivity})}},model:{value:e.conditional.cancelActivity,callback:function(t){e.$set(e.conditional,"cancelActivity",t)},expression:"conditional.cancelActivity"}})],1):e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.condition")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.event.condition")},on:{input:function(t){e.setEventDefinitions(e.type,{condition:e.createElement(e.conditionType,{body:e.conditional.condition})})}},model:{value:e.conditional.condition,callback:function(t){e.$set(e.conditional,"condition",t)},expression:"conditional.condition"}})],1)],1)},FH=[],jH={name:"wf-conditional-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=e.isInterrupting,n=e.cancelActivity;void 0==t&&(t=!0),void 0==n&&(n=!0),this.$set(this.conditional,"isInterrupting",t),this.$set(this.conditional,"cancelActivity",n);var i=this.getEventDefinitions(this.type);if(i&&i.length>0){var o=i[0].condition;o&&this.$set(this.conditional,"condition",o.body)}},deep:!0,immediate:!0}},data:function(){return{type:"bpmn:ConditionalEventDefinition",conditionType:"bpmn:FormalExpression",conditional:{}}}},zH=jH,VH=Object(WQ["a"])(zH,PH,FH,!1,null,null,null),QH=VH.exports,WH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.escalation,"label-position":"left","label-suffix":":","label-width":"120px",size:"mini"}},[n("avue-crud",{staticStyle:{"margin-bottom":"10px"},attrs:{data:e.escalationList,option:e.option},on:{"row-save":e.handleAdd,"row-update":e.handleEdit,"row-del":e.handleDelete},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}}),["bpmn:BoundaryEvent"].includes(e.formData.$type)?n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.isInterrupting")}},[n("el-switch",{on:{change:function(t){return e.updateProperties({cancelActivity:e.escalation.cancelActivity})}},model:{value:e.escalation.cancelActivity,callback:function(t){e.$set(e.escalation,"cancelActivity",t)},expression:"escalation.cancelActivity"}})],1):e._e(),n("el-form-item",{attrs:{label:e.t("wf.panel.node.event.escalationRef")}},[n("el-select",{attrs:{clearable:"",filterable:"","allow-create":"",placeholder:e.t("wf.panel.node.event.escalationRef")},on:{change:function(t){e.setEventDefinitions(e.type,{escalationRef:t?e.createElement(e.escalationType,{id:t,name:t}):void 0})}},model:{value:e.escalation.escalationRef,callback:function(t){e.$set(e.escalation,"escalationRef",t)},expression:"escalation.escalationRef"}},e._l(e.escalationList,(function(e,t){return n("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1),n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.event.escalationRef")},on:{input:function(t){e.setEventDefinitions(e.type,{escalationRef:e.createElement(e.escalationType,{id:t,name:t})})}},model:{value:e.escalation.escalationRef,callback:function(t){e.$set(e.escalation,"escalationRef",t)},expression:"escalation.escalationRef"}})],1)],1)},HH=[],UH={name:"wf-escalation-event",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=e.cancelActivity;void 0==t&&(t=!0),this.$set(this.escalation,"cancelActivity",t);var n=this.getRootElements(this.escalationType);this.$set(this,"escalationList",n);var i=this.getEventDefinitions(this.type);if(i&&i.length>0){var o=i[0].escalationRef;n.find((function(e){return e.id==o.id}))?this.$set(this.escalation,"escalationRef",o.id):this.setEventDefinitions(this.type,{escalationRef:void 0})}},deep:!0,immediate:!0}},data:function(){return{type:"bpmn:EscalationEventDefinition",escalationType:"bpmn:Escalation",escalation:{},escalationList:[],form:{},option:{size:"mini",tip:!1,border:!0,dialogType:"drawer",viewBtn:!1,menuWidth:"150px",align:"center",refreshBtn:!1,filterBtn:!1,searchShowBtn:!1,columnBtn:!1,addBtnText:"新 增 升 级",column:[{label:"ID",prop:"id",overHidden:!0,span:24,editDisabled:!0,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母,且不能包含中文"}]},{label:"Name",prop:"name",overHidden:!0,span:24,rules:[{required:!0,trigger:"blur"},{pattern:/^[a-zA-Z][a-zA-Z0-9_]*$/,message:"开头必须是字母,且不能包含中文"}]}]}}},methods:{handleAdd:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements();if(-1!=s.findIndex((function(t){return t.$type==i.escalationType&&t.id==e.id})))return this.$escalation.escalation("ID:".concat(o," 已存在")),void n();s.unshift(this.createElement(this.escalationType,{id:o,name:r})),this.escalationList.push(e),t()},handleEdit:function(e,t,n){var i=this,o=e.id,r=e.name,s=this.getRootElements(),a=s.findIndex((function(t){return t.$type==i.escalationType&&t.id==e.id}));s.splice(a,1,this.createElement(this.escalationType,{id:o,name:r})),this.escalationList.splice(t,1,e),n()},handleDelete:function(e){var t=this;this.$confirm("确定要删除此项吗?","警告",{type:"warning"}).then((function(){var n=t.escalationList.findIndex((function(t){return t.id==e.id})),i=t.getRootElements(),o=i.findIndex((function(n){return n.$type==t.escalationType&&n.id==e.id}));i.splice(o,1),t.escalationList.splice(n,1)})).catch((function(){}))}}},YH=UH,GH=Object(WQ["a"])(YH,WH,HH,!1,null,null,null),KH=GH.exports,qH={name:"wf-event",mixins:[JQ["a"]],components:{WfTimerEvent:sH,WfSignalEvent:dH,WfMessageEvent:vH,WfErrorEvent:EH,WfTerminateEvent:IH,WfCompensateEvent:RH,WfConditionalEvent:QH,WfEscalationEvent:KH},watch:{formData:{handler:function(){var e=this.getEventDefinitions();e&&e.length>0&&this.$set(this,"type",e[0].$type)},deep:!0,immediate:!0}},data:function(){return{type:""}}},JH=qH,$H=Object(WQ["a"])(JH,ZW,eH,!1,null,null,null),XH=$H.exports,ZH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.formData,"label-position":"left","label-width":"90px","label-suffix":":",size:"mini"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.node.call.calledElement"),prop:"callElement"}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.node.call.calledElement")},on:{input:function(t){return e.updateProperties({calledElement:e.formData.calledElement,calledElementType:"key"})}},model:{value:e.formData.calledElement,callback:function(t){e.$set(e.formData,"calledElement",t)},expression:"formData.calledElement"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.call.inheritVariables")}},[n("el-switch",{attrs:{"active-value":"true","inactive-value":"false"},on:{change:function(t){return e.updateProperties({inheritVariables:e.formData.inheritVariables||void 0})}},model:{value:e.formData.inheritVariables,callback:function(t){e.$set(e.formData,"inheritVariables",t)},expression:"formData.inheritVariables"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.node.call.sameDeployment")}},[n("el-switch",{attrs:{"active-value":"true","inactive-value":"false"},on:{change:function(t){return e.updateProperties({sameDeployment:e.formData.sameDeployment||void 0})}},model:{value:e.formData.sameDeployment,callback:function(t){e.$set(e.formData,"sameDeployment",t)},expression:"formData.sameDeployment"}})],1)],1)},eU=[],tU={name:"wf-call",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){this.clearExtensionElements()},deep:!0,immediate:!0}}},nU=tU,iU=Object(WQ["a"])(nU,ZH,eU,!1,null,null,null),oU=iU.exports,rU={name:"node-panel",mixins:[JQ["a"],zQ["a"]],components:{WfBasic:nW,WfAssignee:gW,WfListener:DW,WfMultiInstance:TW,WfForm:zW,WfButton:YW,WfCondition:XW,WfEvent:XH,WfCall:oU},computed:{type:function(){return this.element.type}},data:function(){return{activeName:["1"]}},methods:{changeCollapse:function(e){this.activeName="close"==e?[]:["1","2","3","4","5","6","7","8","9","99"]}}},sU=rU,aU=Object(WQ["a"])(sU,KQ,qQ,!1,null,null,null),lU=aU.exports,cU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-collapse",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[n("el-collapse-item",{attrs:{name:"1"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.process.basic.label"))+" "),n("i",{staticClass:"el-icon-info"})])]),n("wf-basic",{attrs:{modeler:e.modeler,element:e.element,nodes:e.nodes}})],2),n("el-collapse-item",{attrs:{name:"2"}},[n("template",{slot:"title"},[n("span",[e._v(e._s(e.t("wf.panel.process.sn.label"))+" "),n("i",{staticClass:"el-icon-warning"})])]),n("wf-serial",{attrs:{modeler:e.modeler,element:e.element}})],2)],1)},hU=[],uU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{attrs:{model:e.formData,"label-position":"left","label-width":"110px","label-suffix":":",size:"mini"}},[n("el-form-item",{attrs:{label:e.t("wf.panel.process.basic.key")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.process.basic.key")},on:{input:function(t){return e.updateProperties({id:e.formData.id})}},model:{value:e.formData.id,callback:function(t){e.$set(e.formData,"id",t)},expression:"formData.id"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.process.basic.name")}},[n("el-input",{attrs:{clearable:"",placeholder:e.t("wf.panel.process.basic.name")},on:{input:function(t){return e.updateProperties({name:e.formData.name})}},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.process.basic.description")}},[n("el-input",{attrs:{placeholder:e.t("wf.panel.process.basic.description"),clearable:""},on:{input:e.updateDocumentation},model:{value:e.formData.description,callback:function(t){e.$set(e.formData,"description",t)},expression:"formData.description"}})],1),n("el-divider"),n("el-form-item",{attrs:{label:e.t("wf.panel.process.basic.skipFirstNode"),"label-width":"120px"}},[n("el-switch",{on:{change:function(t){return e.updateProperties({skipFirstNode:e.formData.skipFirstNode||void 0})}},model:{value:e.formData.skipFirstNode,callback:function(t){e.$set(e.formData,"skipFirstNode",t)},expression:"formData.skipFirstNode"}})],1),n("el-form-item",{attrs:{label:e.t("wf.panel.process.basic.rollbackNode.label"),"label-width":"120px"}},[n("el-select",{attrs:{clearable:"",placeholder:e.t("wf.panel.process.basic.rollbackNode.placeholder")},on:{change:function(t){return e.updateProperties({rollbackNode:e.formData.rollbackNode||void 0})}},model:{value:e.formData.rollbackNode,callback:function(t){e.$set(e.formData,"rollbackNode",t)},expression:"formData.rollbackNode"}},[e._l(e.nodes,(function(t){return["bpmn:UserTask"==t.nodeType?n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}}):e._e()]}))],2)],1)],1)},dU=[],pU={name:"wf-basic",mixins:[JQ["a"],zQ["a"]]},fU=pU,gU=Object(WQ["a"])(fU,uU,dU,!1,null,null,null),mU=gU.exports,bU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.visible=!0}}},[e._v(e._s(e.t("wf.panel.process.sn.configure")))]),e.serial&&e.serial.prefix&&e.serial.dateFormat&&e.serial.suffixLength?n("div",{staticStyle:{"margin-top":"10px"}},[n("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px","text-align":"left"}},[e._v(e._s(e.t("wf.panel.process.sn.format"))+":")]),n("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"100px"}},[e._v(e._s(e.serial.prefix)+e._s(e.serial.connector)+e._s(e.serial.dateFormat)+e._s(e.serial.connector)+e._s((e.serial.start?e.serial.start.toString():"1").padStart(e.serial.suffixLength,"0")))])]):e._e(),n("el-drawer",{attrs:{visible:e.visible,title:e.t("wf.panel.process.sn.label"),size:"50%","append-to-body":""},on:{"update:visible":function(t){e.visible=t}}},[e.visible?n("avue-form",{attrs:{option:e.option,defaults:e.defaults},on:{"update:defaults":function(t){e.defaults=t},submit:e.handleSerialSubmit},model:{value:e.serial,callback:function(t){e.serial=t},expression:"serial"}}):e._e()],1)],1)},vU=[],yU=(n("2b9c"),{name:"wf-basic",mixins:[JQ["a"],zQ["a"]],watch:{formData:{handler:function(e){var t=this.getExtensionElementsEq(this.extensionType);t.length>0&&(this.serial=t[0])},deep:!0,immediate:!0},visible:function(e){var t=this;e&&(this.option={labelWidth:110,labelPosition:"right",column:[{label:this.t("wf.panel.process.sn.name"),prop:"name",span:24,rules:[{required:!0,trigger:"blur"}]},{label:this.t("wf.panel.process.sn.prefix"),prop:"prefix",span:24,rules:[{required:!0,trigger:"blur"}]},{label:this.t("wf.panel.process.sn.dateFormat"),prop:"dateFormat",span:24,value:"yyyyMMdd",rules:[{required:!0,trigger:"blur"}]},{label:this.t("wf.panel.process.sn.suffixLength"),prop:"suffixLength",type:"number",span:24,minRows:2,maxRows:10,value:5,event:{change:function(e){if(e){for(var n="",i=0;i<e;i++)n+="9";t.defaults.startSequence.maxRows=Number(n),t.serial.startSequence>Number(n)&&(t.serial.startSequence=Number(n))}}},rules:[{required:!0,trigger:"blur"}]},{label:this.t("wf.panel.process.sn.initialValue"),prop:"startSequence",type:"number",span:24,minRows:0,value:0,rules:[{required:!0,trigger:"blur"}]},{label:this.t("wf.panel.process.sn.connector"),prop:"connector",span:24},{label:this.t("wf.panel.process.sn.resetCycle.label"),prop:"cycle",type:"select",span:24,dicData:this.t("wf.panel.process.sn.resetCycle.dicData"),value:"none",rules:[{required:!0,trigger:"change"}]}]})}},data:function(){return{extensionType:"flowable:Serial",visible:!1,serial:{},defaults:{},option:{}}},methods:{handleSerialSubmit:function(e,t){var n=this.deepClone(this.serial);for(var i in n)i.startsWith("$")&&delete n[i];this.setExtensionElements(this.extensionType,[n]),t(),this.visible=!1}}}),wU=yU,_U=Object(WQ["a"])(wU,bU,vU,!1,null,null,null),CU=_U.exports,AU={name:"process",mixins:[JQ["a"],zQ["a"]],components:{WfBasic:mU,WfSerial:CU},data:function(){return{activeName:["1","2","99"]}}},EU=AU,xU=Object(WQ["a"])(EU,cU,hU,!1,null,null,null),SU=xU.exports,kU={name:"panel",components:{NodePanel:lU,ProcessPanel:SU},mixins:[zQ["a"]],props:{modeler:{type:Object,required:!0},formOption:[Object,String],exFormOption:[Object,String],indepFormOption:[Object,String],userOption:Object,groupOption:Object,buttonOption:Array},data:function(){return{activeTab:"process",openAllCollapse:!0,rootElement:null,element:null,nodes:[]}},watch:{modeler:{handler:function(){this.addEventListener()},immediate:!0}},methods:{addEventListener:function(){var e=this;this.modeler.on("root.added",(function(t){var n=t.element;"bpmn:Process"==n.type&&(e.rootElement=n),e.handleGetNodes()})),this.modeler.on("selection.changed",(function(t){var n=t.newSelection;0==n.length?(e.element=null,e.activeTab="process",e.$nextTick((function(){}))):1==n.length?(e.element=n[0],e.activeTab="node"):(e.element=null,e.activeTab="process"),e.handleGetNodes()}))},handleGetNodes:function(){var e=[],t=this.modeler.get("elementRegistry");t.forEach((function(t){["bpmn:StartEvent","bpmn:UserTask","bpmn:SequenceFlow"].includes(t.type)&&e.push(Object(u["a"])(Object(u["a"])({},t.businessObject),{},{nodeType:t.type}))})),this.nodes=e},handleChangeCollapse:function(e){var t=this.$refs.node;t?(this.openAllCollapse=!this.openAllCollapse,t.changeCollapse(e)):this.$message.error(this.t("wf.panel.node.message"))}}},DU=kU,LU=Object(WQ["a"])(DU,YQ,GQ,!1,null,null,null),IU=LU.exports,NU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"wf-design__config"},[n("div",{staticClass:"wf-design__config--icon",on:{click:function(t){e.visible=!0}}},[n("i",{staticClass:"el-icon-setting"})]),n("el-drawer",{attrs:{visible:e.visible,title:e.t("wf.config.title"),size:"50%"},on:{"update:visible":function(t){e.visible=t}}},[n("el-form",{attrs:{model:e.option,"label-suffix":":","label-width":"110px",size:"mini"}},[n("el-form-item",{attrs:{label:e.t("wf.config.lang.label")}},[n("el-select",{on:{change:e.handleChangeLanguage},model:{value:e.configOption.lang,callback:function(t){e.$set(e.configOption,"lang",t)},expression:"configOption.lang"}},[n("el-option",{attrs:{label:e.t("wf.config.lang.chinese"),value:"zh"}}),n("el-option",{attrs:{label:e.t("wf.config.lang.english"),value:"en"}})],1)],1),n("el-form-item",{attrs:{label:e.t("wf.config.mode.label")}},[n("el-radio-group",{model:{value:e.configOption.mode,callback:function(t){e.$set(e.configOption,"mode",t)},expression:"configOption.mode"}},[n("el-radio",{attrs:{label:"edit"}},[e._v(e._s(e.t("wf.config.mode.design")))]),n("el-radio",{attrs:{label:"view"}},[e._v(e._s(e.t("wf.config.mode.view")))])],1)],1),"edit"==e.option.mode?[n("el-form-item",{attrs:{label:e.t("wf.config.engine.label")}},[n("el-radio-group",{model:{value:e.configOption.engine,callback:function(t){e.$set(e.configOption,"engine",t)},expression:"configOption.engine"}},[n("el-radio",{attrs:{label:"flowable"}},[e._v(e._s(e.t("wf.config.engine.flowable")))]),n("el-radio",{attrs:{label:"camunda"}},[e._v(e._s(e.t("wf.config.engine.camunda")))]),n("el-radio",{attrs:{label:"activiti"}},[e._v(e._s(e.t("wf.config.engine.activiti")))])],1)],1),n("el-form-item",{attrs:{label:e.t("wf.config.form.label")}},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.formVisible=!0}}},[e._v(e._s(e.t("wf.config.form.configure")))]),n("span",[e._v(" "+e._s(e.t("wf.config.form.remark")))])],1),n("el-form-item",{attrs:{label:e.t("wf.config.button.label")}},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.buttonVisible=!e.buttonVisible}}},[e._v(e._s(e.buttonVisible?e.t("wf.config.button.cancel"):e.t("wf.config.button.configure")))]),e.init?n("avue-dynamic",{directives:[{name:"show",rawName:"v-show",value:e.buttonVisible,expression:"buttonVisible"}],staticStyle:{"margin-top":"5px"},attrs:{children:e.t("wf.config.button.option")},model:{value:e.configOption.button,callback:function(t){e.$set(e.configOption,"button",t)},expression:"configOption.button"}}):e._e()],1),n("el-form-item",{attrs:{label:e.t("wf.config.user.label")}},[n("el-radio-group",{model:{value:e.configOption.user.version,callback:function(t){e.$set(e.configOption.user,"version",t)},expression:"configOption.user.version"}},[n("el-radio",{attrs:{label:"v1"}},[e._v("v1")]),n("el-radio",{attrs:{label:"v2"}},[e._v("v2")])],1)],1),n("el-form-item",{attrs:{label:e.t("wf.config.lint.label")}},[n("el-switch",{model:{value:e.configOption.lint,callback:function(t){e.$set(e.configOption,"lint",t)},expression:"configOption.lint"}})],1),n("el-form-item",{attrs:{label:e.t("wf.config.toolbar.label")}},[n("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v(e._s(e.t("wf.config.toolbar.checkAll")))]),n("el-checkbox-group",{on:{change:e.handleCheckChange},model:{value:e.configOption.toolbar,callback:function(t){e.$set(e.configOption,"toolbar",t)},expression:"configOption.toolbar"}},e._l(e.t("wf.config.toolbar.list"),(function(t,i){return n("el-checkbox",{key:i,attrs:{label:t.value}},[e._v(e._s(t.label))])})),1)],1)]:e._e(),"view"==e.option.mode?[n("el-form-item",{attrs:{label:e.t("wf.config.highlight.label")}},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.option.flows,border:"",size:"mini"}},[n("el-table-column",{attrs:{align:"center",width:"100",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(n){return e.configOption.flows.splice(t.$index,1)}}})]}}],null,!1,3118442395)},[n("template",{slot:"header"},[n("el-button",{attrs:{type:"primary",size:"mini",circle:"",plain:"",icon:"el-icon-plus"},on:{click:function(t){return e.configOption.flows.push({})}}})],1)],2),n("el-table-column",{attrs:{prop:"id",label:e.t("wf.config.highlight.nodeId"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.t("wf.config.highlight.nodeId"),clearable:""},model:{value:i.id,callback:function(t){e.$set(i,"id",t)},expression:"row.id"}},e._l(e.flows,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)]}}],null,!1,550112507)}),n("el-table-column",{attrs:{prop:"class",label:e.t("wf.config.highlight.nodeClass"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.t("wf.config.highlight.nodeClass"),clearable:""},model:{value:i.class,callback:function(t){e.$set(i,"class",t)},expression:"row.class"}},e._l(e.t("wf.config.highlight.classes"),(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)]}}],null,!1,4185959507)}),n("el-table-column",{attrs:{prop:"tooltip",label:"tooltip",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("el-input",{attrs:{placeholder:"tooltip"},model:{value:i.tooltip,callback:function(t){e.$set(i,"tooltip",t)},expression:"row.tooltip"}})]}}],null,!1,681190754)})],1)],1)]:e._e(),n("el-form-item",{attrs:{label:e.t("wf.config.minimap")}},[n("el-switch",{model:{value:e.configOption.minimap,callback:function(t){e.$set(e.configOption,"minimap",t)},expression:"configOption.minimap"}})],1),n("el-form-item",{attrs:{label:e.t("wf.config.simulation")}},[n("el-switch",{model:{value:e.configOption.simulation,callback:function(t){e.$set(e.configOption,"simulation",t)},expression:"configOption.simulation"}})],1)],2)],1),n("el-dialog",{attrs:{visible:e.formVisible,title:e.t("wf.config.form.title"),fullscreen:"","append-to-body":""},on:{"update:visible":function(t){e.formVisible=t}}},[n("avue-form-design",{ref:"formDesign",staticStyle:{height:"88vh"},attrs:{toolbar:["import","preview","clear"],"include-fields":["group","dynamic","input","textarea","number","map","radio","checkbox","select","cascader","tree","date","time","timerange","daterange","datetimerange","ueditor","icon","switch","slider","color"],options:e.option.form}},[n("template",{slot:"toolbar"},[n("el-button",{attrs:{type:"text",icon:"el-icon-download"},on:{click:e.handleGetData}},[e._v(e._s(e.t("wf.config.form.submit")))])],1)],2)],1)],1)},MU=[],BU=(n("ef61"),{name:"wf-config",mixins:[zQ["a"]],props:{option:{type:Object,required:!0},modeler:{type:Object,required:!0}},data:function(){return{configOption:this.option,visible:!1,checkAll:!1,checkList:["open","create","fit","zoom-in","zoom-out","undo","redo","import","preview","get","download-xml","download-svg"],isIndeterminate:!0,flows:[],formVisible:!1,buttonVisible:!1,init:!0}},watch:{modeler:{handler:function(e){var t=this;if("edit"!=this.option.mode){var n=[];this.$nextTick((function(){var e=t.modeler.get("elementRegistry");e.forEach((function(e){["bpmn:StartEvent","bpmn:EndEvent","bpmn:UserTask","bpmn:SequenceFlow"].includes(e.type)&&n.push(e.businessObject)}))})),this.flows=n}},immediate:!0}},mounted:function(){var e=this;this.handleCheckChange(this.configOption.toolbar),Object.keys(this.configOption).filter((function(e){return!["toolbar","xml"].includes(e)})).forEach((function(t){e.$watch("configOption.".concat(t),(function(){e.$emit("change",!0),e.$emit("update:option",e.configOption)}),{deep:!0})})),this.$watch("configOption.toolbar",(function(){e.$emit("change",!1),e.$emit("update:option",e.configOption)}))},methods:{handleGetData:function(){var e=this;this.$refs.formDesign.getData("string").then((function(t){e.configOption.form=t,e.formVisible=!1}))},handleCheckAllChange:function(e){this.configOption.toolbar=e?this.checkList:[],this.isIndeterminate=!1},handleCheckChange:function(e){var t=this.t("wf.config.toolbar.list"),n=e.length;this.checkAll=n===t.length,this.isIndeterminate=n>0&&n<t.length},handleCopy:function(e){var t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),document.body.removeChild(t),this.$message.success(this.t("wf.config.message.copySuccess"))},handleChangeLanguage:function(e){this.$i18n.locale=e,this.init=!1,this.init=!0}}}),TU=BU,OU=Object(WQ["a"])(TU,NU,MU,!1,null,null,null),RU=OU.exports,PU=n("9ea0"),FU=n.n(PU);function jU(e,t){return t={exports:{}},e(t,t.exports),t.exports}var zU=jU((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),o=2;i===1/0;o*=2)i=Math.log(Math.pow(2,e/o))/Math.log(n)*o;var r=i-Math.floor(i),s="";for(o=0;o<Math.floor(i);o++){var a=Math.floor(Math.random()*n).toString(n);s=a+s}if(r){var l=Math.pow(n,r);a=Math.floor(Math.random()*l).toString(n);s=a+s}var c=parseInt(s,n);return c!==1/0&&c>=Math.pow(2,e)?t(e,n):s};t.rack=function(e,n,i){var o=function(o){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var a=t(e,n)}while(Object.hasOwnProperty.call(r,a));return r[a]=o,a},r=o.hats={};return o.get=function(e){return o.hats[e]},o.set=function(e,t){return o.hats[e]=t,o},o.bits=e||128,o.base=n||16,o}}));function VU(e){if(!(this instanceof VU))return new VU(e);e=e||[128,36,1],this._seed=e.length?zU.rack(e[0],e[1],e[2]):e}VU.prototype.next=function(e){return this._seed(e||!0)},VU.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},VU.prototype.claim=function(e,t){this._seed.set(e,t||!0)},VU.prototype.assigned=function(e){return this._seed.get(e)||!1},VU.prototype.unclaim=function(e){delete this._seed.hats[e]},VU.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var QU=VU,WU=n("c201"),HU=n("7299");function UU(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(n){}return e}function YU(e,t){return t.appendChild(UU(e,t))}function GU(e,t){return YU(t,e),e}var KU=2,qU={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":KU,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":KU,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function JU(e,t){return qU[t]?e.style[t]:e.getAttributeNS(null,t)}function $U(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=qU[i];o?(o===KU&&"number"===typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function XU(e,t){var n,i,o=Object.keys(t);for(n=0,i;i=o[n];n++)$U(e,i,t[i])}function ZU(e,t,n){if("string"===typeof t){if(void 0===n)return JU(e,t);$U(e,t,n)}else XU(e,t);return e}function eY(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}var tY=/\s+/,nY=Object.prototype.toString;function iY(e){return"undefined"!==typeof e}function oY(e){return new rY(e)}function rY(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function sY(e){var t=e.parentNode;return t&&t.removeChild(e),e}function aY(e){var t;while(t=e.firstChild)sY(t);return e}function lY(e){return e.cloneNode(!0)}rY.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array(),n=eY(t,e);return~n||t.push(e),iY(this.el.className.baseVal)?this.el.className.baseVal=t.join(" "):this.el.className=t.join(" "),this},rY.prototype.remove=function(e){if("[object RegExp]"===nY.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=eY(t,e);return~n&&t.splice(n,1),this.el.className.baseVal=t.join(" "),this},rY.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},rY.prototype.toggle=function(e,t){return this.list?(iY(t)?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(iY(t)?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},rY.prototype.array=function(){var e=this.el.getAttribute("class")||"",t=e.replace(/^\s+|\s+$/g,""),n=t.split(tY);return""===n[0]&&n.shift(),n},rY.prototype.has=rY.prototype.contains=function(e){return this.list?this.list.contains(e):!!~eY(this.array(),e)};var cY={svg:"http://www.w3.org/2000/svg"},hY='<svg xmlns="'+cY.svg+'"';function uY(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(cY.svg)&&(e=hY+e.substring(4)):(e=hY+">"+e+"</svg>",t=!0);var n=dY(e);if(!t)return n;var i=document.createDocumentFragment(),o=n.firstChild;while(o.firstChild)i.appendChild(o.firstChild);return i}function dY(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function pY(e,t){var n;return"<"===e.charAt(0)?(n=uY(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(cY.svg,e),t&&ZU(n,t),n}var fY=pY("svg");function gY(e,t){var n,i,o=Object.keys(t);for(n=0;i=o[n];n++)e[i]=t[i];return e}function mY(e,t,n,i,o,r){var s=fY.createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return gY(s,e);case 6:return gY(s,{a:e,b:t,c:n,d:i,e:o,f:r})}}function bY(e){return e?fY.createSVGTransformFromMatrix(e):fY.createSVGTransform()}var vY=/([&<>]{1})/g,yY=/([\n\r"]{1})/g,wY={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function _Y(e,t){function n(e,t){return wY[t]||t}return e.replace(t,n)}function CY(e,t){var n,i,o,r,s;switch(e.nodeType){case 3:t.push(_Y(e.textContent,vY));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(o=e.attributes,n=0,i=o.length;n<i;++n)r=o.item(n),t.push(" ",r.name,'="',_Y(r.value,yY),'"');if(e.hasChildNodes()){for(t.push(">"),s=e.childNodes,n=0,i=s.length;n<i;++n)CY(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",_Y(e.nodeValue,vY),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function AY(e,t){var n=uY(t);if(aY(e),t){xY(n)||(n=n.documentElement);for(var i=kY(n.childNodes),o=0;o<i.length;o++)YU(i[o],e)}}function EY(e){var t=e.firstChild,n=[];while(t)CY(t,n),t=t.nextSibling;return n.join("")}function xY(e){return"#document-fragment"===e.nodeName}function SY(e,t){if(void 0!==t){try{AY(e,t)}catch(n){throw new Error("error parsing SVG: "+n.message)}return e}return EY(e)}function kY(e){return Array.prototype.slice.call(e)}function DY(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function LY(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(DY(e,i))}function IY(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),LY(n,t)),n.consolidate()}var NY=/^class /;function MY(e){return NY.test(e.toString())}function BY(e){return"[object Array]"===Object.prototype.toString.call(e)}function TY(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function OY(){var e=Array.prototype.slice.call(arguments);1===e.length&&BY(e[0])&&(e=e[0]);var t=e.pop();return t.$inject=e,t}var RY=/constructor\s*[^(]*\(\s*([^)]*)\)/m,PY=/^(?:async )?(?:function\s*)?[^(]*\(\s*([^)]*)\)/m,FY=/\/\*([^*]*)\*\//m;function jY(e){if("function"!==typeof e)throw new Error('Cannot annotate "'+e+'". Expected a function!');var t=e.toString().match(MY(e)?RY:PY);return t&&t[1]&&t[1].split(",").map((function(e){return t=e.match(FY),t?t[1].trim():e.trim()}))||[]}function zY(){var e=[];this.factory=function(t,n){return e.push([t,"factory",n]),this},this.value=function(t,n){return e.push([t,"value",n]),this},this.type=function(t,n){return e.push([t,"type",n]),this},this.forEach=function(t){e.forEach(t)}}function VY(e,t){t=t||{get:function(e,t){if(n.push(e),!1===t)return null;throw s('No provider for "'+e+'"!')}};var n=[],i=this._providers=Object.create(t._providers||null),o=this._instances=Object.create(null),r=o.injector=this,s=function(e){var t=n.join(" -> ");return n.length=0,new Error(t?e+" (Resolving: "+t+")":e)},a=function(e,r){if(!i[e]&&-1!==e.indexOf(".")){var l=e.split("."),c=a(l.shift());while(l.length)c=c[l.shift()];return c}if(TY(o,e))return o[e];if(TY(i,e)){if(-1!==n.indexOf(e))throw n.push(e),s("Cannot resolve circular dependency!");return n.push(e),o[e]=i[e][0](i[e][1]),n.pop(),o[e]}return t.get(e,r)},l=function(e,t){if("undefined"===typeof t&&(t={}),"function"!==typeof e){if(!BY(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=OY(e.slice())}var n=e.$inject||jY(e),i=n.map((function(e){return TY(t,e)?t[e]:a(e)}));return{fn:e,dependencies:i}},c=function(e){var t=l(e),n=t.fn,i=t.dependencies,o=Function.prototype.bind.apply(n,[null].concat(i));return new o},h=function(e,t,n){var i=l(e,n),o=i.fn,r=i.dependencies;return o.apply(t,r)},u=function(e){return OY((function(t){return e.get(t)}))},d=function(e,t){if(t&&t.length){var n,o,s,a,l=Object.create(null),c=Object.create(null),h=[],d=[],p=[];for(var f in i)n=i[f],-1!==t.indexOf(f)&&("private"===n[2]?(o=h.indexOf(n[3]),-1===o?(s=n[3].createChild([],t),a=u(s),h.push(n[3]),d.push(s),p.push(a),l[f]=[a,f,"private",s]):l[f]=[p[o],f,"private",d[o]]):l[f]=[n[2],n[1]],c[f]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach((function(e){-1!==n[1].$scope.indexOf(e)&&(l[f]=[n[2],n[1]],c[e]=!0)}));t.forEach((function(e){if(!c[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(l)}return new VY(e,r)},p={factory:h,type:c,value:function(e){return e}};e.forEach((function(e){function t(e,t){return"value"!==e&&BY(t)&&(t=OY(t.slice())),t}if(e instanceof zY)e.forEach((function(e){var n=e[0],o=e[1],r=e[2];i[n]=[p[o],t(o,r),o]}));else if("object"===typeof e)if(e.__exports__){var n=Object.keys(e).reduce((function(t,n){return"__"!==n.substring(0,2)&&(t[n]=e[n]),t}),Object.create(null)),o=new VY((e.__modules__||[]).concat([n]),r),s=OY((function(e){return o.get(e)}));e.__exports__.forEach((function(e){i[e]=[s,e,"private",o]}))}else Object.keys(e).forEach((function(n){if("private"!==e[n][2]){var o=e[n][0],r=e[n][1];i[n]=[p[o],t(o,r),o]}else i[n]=e[n]}))})),this.get=a,this.invoke=h,this.instantiate=c,this.createChild=d}var QY=1e3;function WY(e,t){var n=this;t=t||QY,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,o=t.element,r=t.gfx,s=t.attrs;if(n.canRender(o))return"render.shape"===i?n.drawShape(r,o,s):n.drawConnection(r,o,s)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function HY(e){return e.join(",").replace(/,?([A-z]),?/g,"$1")}function UY(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function YY(e,t){var n=pY("polyline");return ZU(n,{points:UY(e)}),t&&ZU(n,t),n}function GY(e,t){return ZU(e,{points:UY(t)}),e}function KY(e){return Object(WU["filter"])(e,(function(t){return!Object(WU["find"])(e,(function(e){return e!==t&&qY(t,e)}))}))}function qY(e,t){if(t){if(e===t)return t;if(e.parent)return qY(e.parent,t)}}function JY(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function $Y(e,t,n){n=n||0,Object(WU["isArray"])(e)||(e=[e]),Object(WU["forEach"])(e,(function(e,i){var o=t(e,i,n);Object(WU["isArray"])(o)&&o.length&&$Y(o,t,n+1)}))}function XY(e,t,n){var i=[],o=[];return $Y(e,(function(e,r,s){JY(i,e,t);var a=e.children;if((-1===n||s<n)&&a&&JY(o,a,t))return a})),i}function ZY(e,t){return XY(e,!t,-1)}function eG(e,t,n){Object(WU["isUndefined"])(t)&&(t=!0),Object(WU["isObject"])(t)&&(n=t,t=!0),n=n||{};var i=rG(n.allShapes),o=rG(n.allConnections),r=rG(n.enclosedElements),s=rG(n.enclosedConnections),a=rG(n.topLevel,t&&Object(WU["groupBy"])(e,(function(e){return e.id})));function l(e){a[e.source.id]&&a[e.target.id]&&(a[e.id]=[e]),i[e.source.id]&&i[e.target.id]&&(s[e.id]=r[e.id]=e),o[e.id]=e}function c(e){if(r[e.id]=e,!e.waypoints)return i[e.id]=e,Object(WU["forEach"])(e.incoming,l),Object(WU["forEach"])(e.outgoing,l),e.children;s[e.id]=o[e.id]=e}return $Y(e,c),{allShapes:i,allConnections:o,topLevel:a,enclosedConnections:s,enclosedElements:r}}function tG(e,t){var n,i,o,r;return t=!!t,Object(WU["isArray"])(e)||(e=[e]),Object(WU["forEach"])(e,(function(e){var s=e;e.waypoints&&!t&&(s=tG(e.waypoints,!0));var a=s.x,l=s.y,c=s.height||0,h=s.width||0;(a<n||void 0===n)&&(n=a),(l<i||void 0===i)&&(i=l),(a+h>o||void 0===o)&&(o=a+h),(l+c>r||void 0===r)&&(r=l+c)})),{x:n,y:i,height:r-i,width:o-n}}function nG(e,t){var n={};return Object(WU["forEach"])(e,(function(e){var i=e;i.waypoints&&(i=tG(i)),!Object(WU["isNumber"])(t.y)&&i.x>t.x&&(n[e.id]=e),!Object(WU["isNumber"])(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(Object(WU["isNumber"])(t.width)&&Object(WU["isNumber"])(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:Object(WU["isNumber"])(t.width)&&Object(WU["isNumber"])(t.height)||(n[e.id]=e))})),n}function iG(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function oG(e){return!(!e||!e.isFrame)}function rG(e,t){return Object(WU["assign"])({},e||{},t||{})}WY.prototype.canRender=function(){},WY.prototype.drawShape=function(){},WY.prototype.drawConnection=function(){},WY.prototype.getShapePath=function(){},WY.prototype.getConnectionPath=function(){};var sG=1;function aG(e,t){WY.call(this,e,sG),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}function lG(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){var i=this.style(t,n);return Object(WU["assign"])(i,{class:e})},this.style=function(t,n){Object(WU["isArray"])(t)||n||(n=t,t=[]);var i=Object(WU["reduce"])(t,(function(t,n){return Object(WU["assign"])(t,e[n]||{})}),{});return n?Object(WU["assign"])(i,n):i},this.computeStyle=function(e,n,i){return Object(WU["isArray"])(n)||(i=n,n=[]),t.style(n||[],Object(WU["assign"])({},i,e||{}))}}FU()(aG,WY),aG.prototype.canRender=function(){return!0},aG.prototype.drawShape=function(e,t,n){var i=pY("rect");return ZU(i,{x:0,y:0,width:t.width||0,height:t.height||0}),oG(t)?ZU(i,Object(WU["assign"])({},this.FRAME_STYLE,n||{})):ZU(i,Object(WU["assign"])({},this.SHAPE_STYLE,n||{})),GU(e,i),i},aG.prototype.drawConnection=function(e,t,n){var i=YY(t.waypoints,Object(WU["assign"])({},this.CONNECTION_STYLE,n||{}));return GU(e,i),i},aG.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width,o=e.height,r=[["M",t,n],["l",i,0],["l",0,o],["l",-i,0],["z"]];return HY(r)},aG.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,o=[];for(t=0;n=i[t];t++)n=n.original||n,o.push([0===t?"M":"L",n.x,n.y]);return HY(o)},aG.$inject=["eventBus","styles"];var cG={__init__:["defaultRenderer"],defaultRenderer:["type",aG],styles:["type",lG]};function hG(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function uG(e,t,n){if(e&&t){"number"!==typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function dG(e,t){return e&&t?e.indexOf(t):-1}function pG(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function fG(e,t,n,i){if("undefined"===typeof i&&(i=5),!e||!t||!n)return!1;var o=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),r=pG(e,t);return Math.abs(o/r)<=i}var gG=2;function mG(e,t){var n;return n=Object(WU["isArray"])(e)?e:[e,t],bG(n)?"h":!!vG(n)&&"v"}function bG(e,t){var n;n=Object(WU["isArray"])(e)?e:[e,t];var i=n.slice().shift();return Object(WU["every"])(n,(function(e){return Math.abs(i.y-e.y)<=gG}))}function vG(e,t){var n;n=Object(WU["isArray"])(e)?e:[e,t];var i=n.slice().shift();return Object(WU["every"])(n,(function(e){return Math.abs(i.x-e.x)<=gG}))}function yG(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function wG(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var _G=n("fd0a"),CG=n.n(_G);function AG(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function EG(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function xG(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function SG(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function kG(e){return EG({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function DG(e,t,n){n=n||0,Object(WU["isObject"])(n)||(n={x:n,y:n});var i=xG(e),o=xG(t),r=i.bottom+n.y<=o.top,s=i.left-n.x>=o.right,a=i.top-n.y>=o.bottom,l=i.right+n.x<=o.left,c=r?"top":a?"bottom":null,h=l?"left":s?"right":null;return h&&c?c+"-"+h:h||c||"intersect"}function LG(e,t,n){var i=IG(e,t);return 1===i.length||2===i.length&&pG(i[0],i[1])<1?EG(i[0]):i.length>1?(i=Object(WU["sortBy"])(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=100-t,t=(t<10?"0":"")+t,e.segment2+"#"+t})),EG(i[n?0:i.length-1])):null}function IG(e,t){return CG()(e,t)}function NG(e){e=e.slice();var t,n,i,o=0;while(e[o])t=e[o],n=e[o-1],i=e[o+1],0===pG(t,i)||fG(n,i,t)?e.splice(o,1):o++;return e}function MG(e,t){return Math.round(e*t)/t}function BG(e){return Object(WU["isNumber"])(e)?e+"px":e}function TG(e){while(e.parent)e=e.parent;return e}function OG(e){e=Object(WU["assign"])({},{width:"100%",height:"100%"},e);var t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),Object(WU["assign"])(n.style,{position:"relative",overflow:"hidden",width:BG(e.width),height:BG(e.height)}),t.appendChild(n),n}function RG(e,t,n){var i=pY("g");oY(i).add(t);var o=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[o]||null),i}var PG="base",FG="djs-element-hidden",jG=0,zG=1,VG={shape:["x","y","width","height"],connection:["waypoints"]};function QG(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function WG(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}QG.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],QG.prototype._init=function(e){var t=this._eventBus,n=this._container=OG(e),i=this._svg=pY("svg");ZU(i,{width:"100%",height:"100%"}),GU(n,i);var o=this._viewport=RG(i,"viewport");this._layers={},this._planes={},!1!==e.deferUpdate&&(this._viewboxChanged=Object(WU["debounce"])(Object(WU["bind"])(this._viewboxChanged,this),300)),t.on("diagram.init",(function(){t.fire("canvas.init",{svg:i,viewport:o})}),this),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","plane.set"],(function(){delete this._cachedViewbox}),this),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},QG.prototype._destroy=function(e){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});var t=this._container.parentNode;t&&t.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._activePlane,delete this._viewport},QG.prototype._clear=function(){var e=this,t=this._elementRegistry.getAll();t.forEach((function(t){var n=iG(t);"root"===n?e.setRootElementForPlane(null,e.findPlane(t),!0):e._removeElement(t,n)})),this._activePlane=null,this._planes={},delete this._cachedViewbox},QG.prototype.getDefaultLayer=function(){return this.getLayer(PG,jG)},QG.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");var n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),"undefined"!==typeof t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},QG.prototype._createLayer=function(e,t){"undefined"===typeof t&&(t=zG);var n=Object(WU["reduce"])(this._layers,(function(e,n){return t>=n.index&&e++,e}),0);return{group:RG(this._viewport,"layer-"+e,n),index:t}},QG.prototype.getPlane=function(e){if(!e)throw new Error("must specify a name");return this._planes[e]},QG.prototype.createPlane=function(e,t){if(!e)throw new Error("must specify a name");if(this._planes[e])throw new Error("plane "+e+" already exists");t||(t={id:"__implicitroot"+e,children:[],isImplicit:!0});var n=this.getLayer(e,jG);oY(n).add(FG);var i=this._planes[e]={layer:n,name:e,rootElement:null};return this.setRootElementForPlane(t,i),i},QG.prototype.setActivePlane=function(e){if(!e)throw new Error("must specify a plane");return"string"===typeof e&&(e=this.getPlane(e)),this._activePlane&&oY(this._activePlane.layer).add(FG),this._activePlane=e,oY(e.layer).remove(FG),e.rootElement&&this._elementRegistry.updateGraphics(e.rootElement,this._svg,!0),this._eventBus.fire("plane.set",{plane:e}),e},QG.prototype.getActiveLayer=function(){return this.getActivePlane().layer},QG.prototype.getActivePlane=function(){var e=this._activePlane;return e||(e=this.createPlane(PG),this.setActivePlane(PG)),e},QG.prototype.findPlane=function(e){"string"===typeof e&&(e=this._elementRegistry.get(e));var t=TG(e);return Object(WU["find"])(this._planes,(function(e){return e.rootElement===t}))},QG.prototype.getContainer=function(){return this._container},QG.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),i=this._elementRegistry._elements[e.id],i&&(Object(WU["forEach"])([i.gfx,i.secondaryGfx],(function(e){e&&(n?oY(e).add(t):oY(e).remove(t))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},QG.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},QG.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},QG.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));var n=this.getGraphics(e);return oY(n).has(t)},QG.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},QG.prototype.getRootElement=function(){var e=this.getActivePlane();return e.rootElement},QG.prototype.setRootElement=function(e,t){var n=this._activePlane;if(n)return this.setRootElementForPlane(e,n,t);var i=this.createPlane(PG,e);return this.setActivePlane(i),i.rootElement},QG.prototype.setRootElementForPlane=function(e,t,n){"string"===typeof t&&(t=this.getPlane(t)),e&&this._ensureValid("root",e);var i=t.rootElement,o=this._elementRegistry,r=this._eventBus;if(i){if(!n)throw new Error("rootElement already set, need to specify override");r.fire("root.remove",{element:i}),r.fire("root.removed",{element:i}),o.remove(i)}if(e){var s=t.layer;r.fire("root.add",{element:e}),o.add(e,s),r.fire("root.added",{element:e,gfx:s}),t===this._activePlane&&this._elementRegistry.updateGraphics(e,this._svg,!0)}return t.rootElement=e,e},QG.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element with id "+t.id+" already exists");var n=VG[e],i=Object(WU["every"])(n,(function(e){return"undefined"!==typeof t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},QG.prototype._setParent=function(e,t,n){uG(t.children,e,n),e.parent=t},QG.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();var o=this._eventBus,r=this._graphicsFactory;this._ensureValid(e,t),o.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);var s=r.create(e,t,i);return this._elementRegistry.add(t,s),r.update(e,t,s),o.fire(e+".added",{element:t,gfx:s}),t},QG.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},QG.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},QG.prototype._removeElement=function(e,t){var n=this._elementRegistry,i=this._graphicsFactory,o=this._eventBus;if(e=n.get(e.id||e),e)return o.fire(t+".remove",{element:e}),i.remove(e),hG(e.parent&&e.parent.children,e),e.parent=null,o.fire(t+".removed",{element:e}),n.remove(e),e},QG.prototype.removeShape=function(e){return this._removeElement(e,"shape")},QG.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},QG.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},QG.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},QG.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},QG.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,n,i,o,r,s,a=this._viewport,l=this.getSize();return e?(this._changeViewbox((function(){o=Math.min(l.width/e.width,l.height/e.height);var t=this._svg.createSVGMatrix().scale(o).translate(-e.x,-e.y);IY(a,t)})),e):(t=this._activePlane&&this._activePlane.layer.getBBox()||{},i=IY(a),n=i?i.matrix:mY(),o=MG(n.a,1e3),r=MG(-n.e||0,1e3),s=MG(-n.f||0,1e3),e=this._cachedViewbox={x:r?r/o:0,y:s?s/o:0,width:l.width/o,height:l.height/o,scale:o,inner:{width:t.width||0,height:t.height||0,x:t.x||0,y:t.y||0},outer:l},e)},QG.prototype.scroll=function(e){var t=this._viewport,n=t.getCTM();return e&&this._changeViewbox((function(){e=Object(WU["assign"])({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),WG(t,n)})),{x:n.e,y:n.f}},QG.prototype.scrollToElement=function(e,t){var n=100;"string"===typeof e&&(e=this._elementRegistry.get(e));var i=this.findPlane(e);i!==this._activePlane&&this.setActivePlane(i),t||(t={}),"number"===typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};var o,r,s=tG(e),a=xG(s),l=this.viewbox(),c=this.zoom();l.y+=t.top/c,l.x+=t.left/c,l.width-=(t.right+t.left)/c,l.height-=(t.bottom+t.top)/c;var h=xG(l),u=s.width<l.width&&s.height<l.height;if(u){var d=Math.max(0,a.right-h.right),p=Math.min(0,a.left-h.left),f=Math.max(0,a.bottom-h.bottom),g=Math.min(0,a.top-h.top);o=d||p,r=f||g}else o=s.x-l.x,r=s.y-l.y;this.scroll({dx:-o*c,dy:-r*c})},QG.prototype.zoom=function(e,t){return e?"fit-viewport"===e?this._fitViewport(t):(this._changeViewbox((function(){"object"!==typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),MG(i.a,1e3)):this.viewbox(e).scale;var n,i},QG.prototype._fitViewport=function(e){var t,n,i=this.viewbox(),o=i.outer,r=i.inner;return r.x>=0&&r.y>=0&&r.x+r.width<=o.width&&r.y+r.height<=o.height&&!e?n={x:0,y:0,width:Math.max(r.width+r.x,o.width),height:Math.max(r.height+r.y,o.height)}:(t=Math.min(1,o.width/r.width,o.height/r.height),n={x:r.x+(e?r.width/2-o.width/t/2:0),y:r.y+(e?r.height/2-o.height/t/2:0),width:o.width/t,height:o.height/t}),this.viewbox(n),this.viewbox(!1).scale},QG.prototype._setZoom=function(e,t){var n,i,o,r,s,a=this._svg,l=this._viewport,c=a.createSVGMatrix(),h=a.createSVGPoint();o=l.getCTM();var u=o.a;return t?(n=Object(WU["assign"])(h,t),i=n.matrixTransform(o.inverse()),r=c.translate(i.x,i.y).scale(1/u*e).translate(-i.x,-i.y),s=o.multiply(r)):s=c.scale(e),WG(this._viewport,s),s},QG.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},QG.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();if(e.waypoints){var i=this.getGraphics(e);t=i.getBBox()}else t=e;var o=t.x*n.scale-n.x*n.scale,r=t.y*n.scale-n.y*n.scale,s=t.width*n.scale,a=t.height*n.scale;return{x:o,y:r,width:s,height:a}},QG.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var HG="data-element-id";function UG(e){this._elements={},this._eventBus=e}UG.$inject=["eventBus"],UG.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),ZU(t,HG,i),n&&ZU(n,HG,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},UG.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(ZU(i.gfx,HG,""),i.secondaryGfx&&ZU(i.secondaryGfx,HG,""),delete t[n])},UG.prototype.updateId=function(e,t){this._validateId(t),"string"===typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},UG.prototype.updateGraphics=function(e,t,n){var i=e.id||e,o=this._elements[i];return n?o.secondaryGfx=t:o.gfx=t,ZU(t,HG,i),t},UG.prototype.get=function(e){var t;t="string"===typeof e?e:e&&ZU(e,HG);var n=this._elements[t];return n&&n.element},UG.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},UG.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var o=n[i],r=t[o],s=r.element,a=r.gfx;if(e(s,a))return s}},UG.prototype.getAll=function(){return this.filter((function(e){return e}))},UG.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],o=i.element,r=i.gfx;return e(o,r)}))},UG.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},UG.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")};var YG=n("ea3c"),GG=n.n(YG),KG=new GG.a({name:"children",enumerable:!0,collection:!0},{name:"parent"}),qG=new GG.a({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),JG=new GG.a({name:"attachers",collection:!0},{name:"host"}),$G=new GG.a({name:"outgoing",collection:!0},{name:"source"}),XG=new GG.a({name:"incoming",collection:!0},{name:"target"});function ZG(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),KG.bind(this,"parent"),qG.bind(this,"labels"),$G.bind(this,"outgoing"),XG.bind(this,"incoming")}function eK(){ZG.call(this),KG.bind(this,"children"),JG.bind(this,"host"),JG.bind(this,"attachers")}function tK(){eK.call(this)}function nK(){eK.call(this),qG.bind(this,"labelTarget")}function iK(){ZG.call(this),$G.bind(this,"source"),XG.bind(this,"target")}FU()(eK,ZG),FU()(tK,eK),FU()(nK,eK),FU()(iK,ZG);var oK={connection:iK,shape:eK,label:nK,root:tK};function rK(e,t){var n=oK[e];if(!n)throw new Error("unknown type: <"+e+">");return Object(WU["assign"])(new n,t)}function sK(){this._uid=12}sK.prototype.createRoot=function(e){return this.create("root",e)},sK.prototype.createLabel=function(e){return this.create("label",e)},sK.prototype.createShape=function(e){return this.create("shape",e)},sK.prototype.createConnection=function(e){return this.create("connection",e)},sK.prototype.create=function(e,t){return t=Object(WU["assign"])({},t||{}),t.id||(t.id=e+"_"+this._uid++),rK(e,t)};var aK="__fn",lK=1e3,cK=Array.prototype.slice;function hK(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function uK(){}function dK(e,t){return e.apply(null,t)}function pK(e){return e.childNodes[0]}function fK(e){return e.parentNode.childNodes[1]}function gK(e,t,n,i,o){var r=bY();r.setTranslate(t,n);var s=bY();s.setRotate(i||0,0,0);var a=bY();a.setScale(o||1,o||1),IY(e,[r,s,a])}function mK(e,t,n){var i=bY();i.setTranslate(t,n),IY(e,i)}function bK(e,t){var n=bY();n.setRotate(t,0,0),IY(e,n)}function vK(e,t){this._eventBus=e,this._elementRegistry=t}function yK(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}hK.prototype.on=function(e,t,n,i){if(e=Object(WU["isArray"])(e)?e:[e],Object(WU["isFunction"])(t)&&(i=n,n=t,t=lK),!Object(WU["isNumber"])(t))throw new Error("priority must be a number");var o=n;i&&(o=Object(WU["bind"])(n,i),o[aK]=n[aK]||n);var r=this;e.forEach((function(e){r._addListener(e,{priority:t,callback:o,next:null})}))},hK.prototype.once=function(e,t,n,i){var o=this;if(Object(WU["isFunction"])(t)&&(i=n,n=t,t=lK),!Object(WU["isNumber"])(t))throw new Error("priority must be a number");function r(){r.__isTomb=!0;var t=n.apply(i,arguments);return o.off(e,r),t}r[aK]=n,this.on(e,t,r)},hK.prototype.off=function(e,t){e=Object(WU["isArray"])(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},hK.prototype.createEvent=function(e){var t=new uK;return t.init(e),t},hK.prototype.fire=function(e,t){var n,i,o,r;if(r=cK.call(arguments),"object"===typeof e&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(i=this._listeners[e],i){n=t instanceof uK?t:this.createEvent(t),r[0]=n;var s=n.type;e!==s&&(n.type=e);try{o=this._invokeListeners(n,r,i)}finally{e!==s&&(n.type=s)}return void 0===o&&n.defaultPrevented&&(o=!1),o}},hK.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},hK.prototype._destroy=function(){this._listeners={}},hK.prototype._invokeListeners=function(e,t,n){var i;while(n){if(e.cancelBubble)break;i=this._invokeListener(e,t,n),n=n.next}return i},hK.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=dK(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(o){if(!this.handleError(o))throw o}return i},hK.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){while(i){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},hK.prototype._getListeners=function(e){return this._listeners[e]},hK.prototype._setListeners=function(e,t){this._listeners[e]=t},hK.prototype._removeListener=function(e,t){var n,i,o,r=this._getListeners(e);if(t)while(r)n=r.next,o=r.callback,o!==t&&o[aK]!==t||(i?i.next=n:this._setListeners(e,n)),i=r,r=n;else this._setListeners(e,null)},uK.prototype.stopPropagation=function(){this.cancelBubble=!0},uK.prototype.preventDefault=function(){this.defaultPrevented=!0},uK.prototype.init=function(e){Object(WU["assign"])(this,e||{})},vK.$inject=["eventBus","elementRegistry"],vK.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=fK(n),t||(t=pY("g"),oY(t).add("djs-children"),GU(n.parentNode,t))):t=n,t},vK.prototype._clear=function(e){var t=pK(e);return Object(HU["clear"])(t),t},vK.prototype._createContainer=function(e,t,n,i){var o=pY("g");oY(o).add("djs-group"),"undefined"!==typeof n?yK(o,t,t.childNodes[n]):GU(t,o);var r=pY("g");oY(r).add("djs-element"),oY(r).add("djs-"+e),i&&oY(r).add("djs-frame"),GU(o,r);var s=pY("g");return oY(s).add("djs-visual"),GU(r,s),r},vK.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,oG(t))},vK.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=Object(WU["reduce"])(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),Object(WU["forEach"])(t,(function(e){var t=e.children;if(t){var o=n._getChildrenContainer(e);Object(WU["forEach"])(t.slice().reverse(),(function(e){var t=i.getGraphics(e);yK(t.parentNode,o)}))}}))},vK.prototype.drawShape=function(e,t){var n=this._eventBus;return n.fire("render.shape",{gfx:e,element:t})},vK.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},vK.prototype.drawConnection=function(e,t){var n=this._eventBus;return n.fire("render.connection",{gfx:e,element:t})},vK.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},vK.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),mK(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?ZU(n,"display","none"):ZU(n,"display","block")}},vK.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);sY(t.parentNode)};var wK={__depends__:[cG],__init__:["canvas"],canvas:["type",QG],elementRegistry:["type",UG],elementFactory:["type",sK],eventBus:["type",hK],graphicsFactory:["type",vK]};function _K(e){var t=[],n=[];function i(e){return t.indexOf(e)>=0}function o(e){t.push(e)}function r(e){i(e)||((e.__depends__||[]).forEach(r),i(e)||(o(e),(e.__init__||[]).forEach((function(e){n.push(e)}))))}e.forEach(r);var s=new VY(t);return n.forEach((function(e){try{s["string"===typeof e?"get":"invoke"](e)}catch(t){throw t}})),s}function CK(e){e=e||{};var t={config:["value",e]},n=[t,wK].concat(e.modules||[]);return _K(n)}function AK(e,t){this.injector=t=t||CK(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}function EK(){}function xK(e,t){this.model=e,this.properties=t}AK.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},AK.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},EK.prototype.get=function(e){return this.$model.properties.get(this,e)},EK.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},xK.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(EK.prototype);Object(WU["forEach"])(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var o=e.ns.name;function r(e){n.define(this,"$type",{value:o,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),Object(WU["forEach"])(e,Object(WU["bind"])((function(e,t){this.set(t,e)}),this))}return r.prototype=i,r.hasType=i.$instanceOf=this.model.hasType,n.defineModel(r,t),n.defineDescriptor(r,e),r};var SK={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},kK={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function DK(e,t){var n=kK[e];return n?n(t):t}function LK(e){return!!SK[e]}function IK(e){return!!kK[e]}function NK(e,t){var n,i,o=e.split(/:/);if(1===o.length)n=e,i=t;else{if(2!==o.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=o[1],i=o[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}function MK(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function BK(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,Object(WU["forEach"])(e,Object(WU["bind"])(this.registerPackage,this))}function TK(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function OK(e){this.model=e}function RK(e){return"undefined"===typeof e}function PK(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function FK(e){this.properties=new OK(this),this.factory=new xK(this,this.properties),this.registry=new BK(e,this.properties),this.typeCache={}}MK.prototype.build=function(){return Object(WU["pick"])(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},MK.prototype.addProperty=function(e,t,n){"boolean"===typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},MK.prototype.replaceProperty=function(e,t,n){var i=e.ns,o=this.properties,r=this.propertiesByName,s=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var a=o.indexOf(e);if(-1===a)throw new Error("property <"+i.name+"> not found in property list");o.splice(a,1),this.addProperty(t,n?void 0:a,s),r[i.name]=r[i.localName]=t},MK.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,o=t.split("#"),r=NK(o[0],i),s=NK(o[1],r.prefix).name,a=this.propertiesByName[s];if(!a)throw new Error("refined property <"+s+"> not found");this.replaceProperty(a,e,n),delete e.redefines},MK.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},MK.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},MK.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},MK.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},MK.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},MK.prototype.hasProperty=function(e){return this.propertiesByName[e]},MK.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,o=e.name;o in n||(Object(WU["forEach"])(e.properties,Object(WU["bind"])((function(n){n=Object(WU["assign"])({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,o=n.redefines;i||o?this.redefineProperty(n,i||o,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[o]=e)},BK.prototype.getPackage=function(e){return this.packageMap[e]},BK.prototype.getPackages=function(){return this.packages},BK.prototype.registerPackage=function(e){e=Object(WU["assign"])({},e);var t=this.packageMap;TK(t,e,"prefix"),TK(t,e,"uri"),Object(WU["forEach"])(e.types,Object(WU["bind"])((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},BK.prototype.registerType=function(e,t){e=Object(WU["assign"])({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Object(WU["assign"])(e.meta||{})});var n=NK(e.name,t.prefix),i=n.name,o={};Object(WU["forEach"])(e.properties,Object(WU["bind"])((function(e){var t=NK(e.name,n.prefix),i=t.name;LK(e.type)||(e.type=NK(e.type,t.prefix).name),Object(WU["assign"])(e,{ns:t,name:i}),o[i]=e}),this)),Object(WU["assign"])(e,{ns:n,name:i,propertiesByName:o}),Object(WU["forEach"])(e.extends,Object(WU["bind"])((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},BK.prototype.mapTypes=function(e,t,n){var i=LK(e.name)?{name:e.name}:this.typeMap[e.name],o=this;function r(e){return s(e,!0)}function s(n,i){var r=NK(n,LK(n)?"":e.prefix);o.mapTypes(r,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");Object(WU["forEach"])(i.superClass,n?r:s),t(i,!n),Object(WU["forEach"])(i.traits,r)},BK.prototype.getEffectiveDescriptor=function(e){var t=NK(e),n=new MK(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},BK.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},OK.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),o=i&&i.name;RK(n)?i?delete e[o]:delete e.$attrs[t]:i?o in e?e[o]=n:PK(e,i,n):e.$attrs[t]=n},OK.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&PK(e,n,[]),e[i]},OK.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},OK.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},OK.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},FK.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},FK.prototype.getType=function(e){var t=this.typeCache,n=Object(WU["isString"])(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},FK.prototype.createAny=function(e,t,n){var i=NK(e),o={$type:e,$instanceOf:function(e){return e===this.$type}},r={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(o,r),this.properties.defineModel(o,this),this.properties.define(o,"$parent",{enumerable:!1,writable:!0}),this.properties.define(o,"$instanceOf",{enumerable:!1,writable:!0}),Object(WU["forEach"])(n,(function(e,t){Object(WU["isObject"])(e)&&void 0!==e.value?o[e.name]=e.value:o[t]=e})),o},FK.prototype.getPackage=function(e){return this.registry.getPackage(e)},FK.prototype.getPackages=function(){return this.registry.getPackages()},FK.prototype.getElementDescriptor=function(e){return e.$descriptor},FK.prototype.hasType=function(e,t){void 0===t&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},FK.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},FK.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var jK=String.fromCharCode,zK=Object.prototype.hasOwnProperty,VK=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,QK={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function WK(e,t,n,i){return i?zK.call(QK,i)?QK[i]:"&"+i+";":jK(t||parseInt(n,16))}function HK(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(VK,WK):e}Object.keys(QK).forEach((function(e){QK[e.toUpperCase()]=QK[e]}));var UK="http://www.w3.org/2001/XMLSchema-instance",YK="xsi",GK="xsi:type",KK="non-whitespace outside of root node";function qK(e){return new Error(e)}function JK(e){return"missing namespace for prefix <"+e+">"}function $K(e){return{get:e,enumerable:!0}}function XK(e){var t,n={};for(t in e)n[t]=e[t];return n}function ZK(e){return e+"$uri"}function eq(e){var t,n,i={};for(t in e)n=e[t],i[n]=n,i[ZK(n)]=t;return i}function tq(){return{line:0,column:0}}function nq(e){throw e}function iq(e){if(!this)return new iq(e);var t,n,i,o,r,s,a,l,c,h=e&&e["proxy"],u=nq,d=tq,p=!1,f=!1,g=null,m=!1;function b(e){e instanceof Error||(e=qK(e)),g=e,u(e,d)}function v(e){r&&(e instanceof Error||(e=qK(e)),r(e,d))}function y(e){var r,u,g,y,w,_,C,A,E,x,S,k=f?[]:null,D=f?eq(c):null,L=[],I=0,N=!1,M=!1,B=0,T=0,O="",R=0;function P(){if(null!==S)return S;var e,t,n,i,o,r,s,a,l,h,u,d=f&&D["xmlns"],g=f&&p?[]:null,m=R,b=O,y=b.length,w={},_={};e:for(;m<y;m++)if(l=!1,h=b.charCodeAt(m),!(32===h||h<14&&h>8)){for((h<65||h>122||h>90&&h<97)&&95!==h&&58!==h&&(v("illegal first char attribute name"),l=!0),u=m+1;u<y;u++)if(h=b.charCodeAt(u),!(h>96&&h<123||h>64&&h<91||h>47&&h<59||46===h||45===h||95===h)){if(32===h||h<14&&h>8){v("missing attribute value"),m=u;continue e}if(61===h)break;v("illegal attribute name char"),l=!0}if(a=b.substring(m,u),"xmlns:xmlns"===a&&(v("illegal declaration of xmlns"),l=!0),h=b.charCodeAt(u+1),34===h)u=b.indexOf('"',m=u+2),-1===u&&(u=b.indexOf("'",m),-1!==u&&(v("attribute value quote missmatch"),l=!0));else if(39===h)u=b.indexOf("'",m=u+2),-1===u&&(u=b.indexOf('"',m),-1!==u&&(v("attribute value quote missmatch"),l=!0));else for(v("missing attribute value quotes"),l=!0,u+=1;u<y;u++)if(h=b.charCodeAt(u+1),32===h||h<14&&h>8)break;for(-1===u&&(v("missing closing quotes"),u=y,l=!0),l||(r=b.substring(m,u)),m=u;u+1<y;u++){if(h=b.charCodeAt(u+1),32===h||h<14&&h>8)break;m===u&&(v("illegal character after attribute end"),l=!0)}if(m=u+1,!l)if(a in _)v("attribute <"+a+"> already defined");else if(_[a]=!0,f)if(p){if(o="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null,null!==o){if(e=HK(r),t=ZK(o),s=c[e],!s){if("xmlns"===o||t in D&&D[t]!==e)do{s="ns"+I++}while("undefined"!==typeof D[s]);else s=o;c[e]=s}D[o]!==s&&(i||(D=XK(D),i=!0),D[o]=s,"xmlns"===o&&(D[ZK(s)]=e,d=s),D[t]=e),w[a]=r;continue}g.push(a,r)}else h=a.indexOf(":"),-1!==h?(n=D[a.substring(0,h)])?(a=d===n?a.substr(h+1):n+a.substr(h),a===GK&&(h=r.indexOf(":"),-1!==h?(n=r.substring(0,h),n=D[n]||n,r=n+r.substring(h)):r=d+":"+r),w[a]=r):v(JK(a.substring(0,h))):w[a]=r;else w[a]=r}if(p)for(m=0,y=g.length;m<y;m++){if(a=g[m++],r=g[m],h=a.indexOf(":"),-1!==h){if(!(n=D[a.substring(0,h)])){v(JK(a.substring(0,h)));continue}a=d===n?a.substr(h+1):n+a.substr(h),a===GK&&(h=r.indexOf(":"),-1!==h?(n=r.substring(0,h),n=D[n]||n,r=n+r.substring(h)):r=d+":"+r)}w[a]=r}return S=w}function F(){var t,n,i=/(\r\n|\r|\n)/g,o=0,r=0,s=0,a=T;while(B>=s){if(t=i.exec(e),!t)break;if(a=t[0].length+t.index,a>B)break;o+=1,s=a}return-1==B?(r=a,n=e.substring(T)):0===T?n=e.substring(T,B):(r=B-s,n=-1==T?e.substring(B):e.substring(B,T+1)),{data:n,line:o,column:r}}d=F,h&&(x=Object.create({},{name:$K((function(){return A})),originalName:$K((function(){return E})),attrs:$K(P),ns:$K((function(){return D}))}));while(-1!==T){if(B=60===e.charCodeAt(T)?T:e.indexOf("<",T),-1===B)return L.length?b("unexpected end of file"):0===T?b("missing start tag"):void(T<e.length&&e.substring(T).trim()&&v(KK));if(T!==B)if(L.length){if(t&&(t(e.substring(T,B),HK,d),m))return}else if(e.substring(T,B).trim()&&(v(KK),m))return;if(w=e.charCodeAt(B+1),33===w){if(y=e.charCodeAt(B+2),91===y&&"CDATA["===e.substr(B+3,6)){if(T=e.indexOf("]]>",B),-1===T)return b("unclosed cdata");if(o&&(o(e.substring(B+9,T),d),m))return;T+=3;continue}if(45===y&&45===e.charCodeAt(B+3)){if(T=e.indexOf("--\x3e",B),-1===T)return b("unclosed comment");if(s&&(s(e.substring(B+4,T),HK,d),m))return;T+=3;continue}}if(63!==w){for(u=B+1;;u++){if(_=e.charCodeAt(u),isNaN(_))return T=-1,b("unclosed tag");if(34===_)y=e.indexOf('"',u+1),u=-1!==y?y:u;else if(39===_)y=e.indexOf("'",u+1),u=-1!==y?y:u;else if(62===_){T=u;break}}if(33!==w){if(S={},47===w){if(N=!1,M=!0,!L.length)return b("missing open tag");if(u=A=L.pop(),y=B+2+u.length,e.substring(B+2,y)!==u)return b("closing tag mismatch");for(;y<T;y++)if(w=e.charCodeAt(y),!(32===w||w>8&&w<14))return b("close tag")}else{if(47===e.charCodeAt(T-1)?(u=A=e.substring(B+1,T-1),N=!0,M=!0):(u=A=e.substring(B+1,T),N=!0,M=!1),!(w>96&&w<123||w>64&&w<91||95===w||58===w))return b("illegal first char nodeName");for(y=1,g=u.length;y<g;y++)if(w=u.charCodeAt(y),!(w>96&&w<123||w>64&&w<91||w>47&&w<59||45===w||95===w||46==w)){if(32===w||w<14&&w>8){A=u.substring(0,y),S=null;break}return b("invalid nodeName")}M||L.push(A)}if(f){if(r=D,N&&(M||k.push(r),null===S&&(p=-1!==u.indexOf("xmlns",y))&&(R=y,O=u,P(),p=!1)),E=A,w=A.indexOf(":"),-1!==w){if(C=D[A.substring(0,w)],!C)return b("missing namespace on <"+E+">");A=A.substr(w+1)}else C=D["xmlns"];C&&(A=C+":"+A)}if(N&&(R=y,O=u,n&&(h?n(x,HK,M,d):n(A,P,HK,M,d),m)))return;if(M){if(i&&(i(h?x:A,HK,N,d),m))return;f&&(D=N?r:k.pop())}T+=1}else{if(l&&(l(e.substring(B,T+1),HK,d),m))return;T+=1}}else{if(T=e.indexOf("?>",B),-1===T)return b("unclosed question");if(a&&(a(e.substring(B,T+2),d),m))return;T+=2}}}this["on"]=function(e,c){if("function"!==typeof c)throw qK("required args <name, cb>");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":i=c;break;case"error":u=c;break;case"warn":r=c;break;case"cdata":o=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw qK("unsupported event: "+e)}return this},this["ns"]=function(e){if("undefined"===typeof e&&(e={}),"object"!==typeof e)throw qK("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n[UK]=YK,f=!0,c=n,this},this["parse"]=function(e){if("string"!==typeof e)throw qK("required args <xml=string>");return g=null,y(e),d=tq,m=!1,g},this["stop"]=function(){m=!0}}function oq(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var rq={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},sq="xsi:type";function aq(e){return e.xml&&e.xml.serialize}function lq(e){return aq(e)===sq}function cq(e){return"property"===aq(e)}function hq(e){return e.charAt(0).toUpperCase()+e.slice(1)}function uq(e,t){return oq(t)?e.prefix+":"+hq(e.localName):e.name}function dq(e,t){var n=e.name,i=e.localName,o=t.xml&&t.xml.typePrefix;return o&&0===i.indexOf(o)?e.prefix+":"+i.slice(o.length):n}function pq(e,t){var n=NK(e),i=t.getPackage(n.prefix);return dq(n,i)}function fq(e){return new Error(e)}function gq(e){return e.$descriptor}function mq(e){Object(WU["assign"])(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw fq("expected element");var t,n=this.elementsById,i=gq(e),o=i.idProperty;if(o&&(t=e.get(o.name),t)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw fq("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function bq(){}function vq(){}function yq(){}function wq(e,t){this.property=e,this.context=t}function _q(e,t){this.element=t,this.propertyDesc=e}function Cq(){}function Aq(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Eq(e,t,n){Aq.call(this,e,t,n)}function xq(e,t,n){this.model=e,this.context=n}function Sq(e){e instanceof FK&&(e={model:e}),Object(WU["assign"])(this,{lax:!1},e)}function kq(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}bq.prototype.handleEnd=function(){},bq.prototype.handleText=function(){},bq.prototype.handleNode=function(){},vq.prototype=Object.create(bq.prototype),vq.prototype.handleNode=function(){return this},yq.prototype=Object.create(bq.prototype),yq.prototype.handleText=function(e){this.body=(this.body||"")+e},wq.prototype=Object.create(yq.prototype),wq.prototype.handleNode=function(e){if(this.element)throw fq("expected no sub nodes");return this.element=this.createReference(e),this},wq.prototype.handleEnd=function(){this.element.id=this.body},wq.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},_q.prototype=Object.create(yq.prototype),_q.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=DK(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Cq.prototype=Object.create(yq.prototype),Cq.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},Aq.prototype=Object.create(Cq.prototype),Aq.prototype.addReference=function(e){this.context.addReference(e)},Aq.prototype.handleText=function(e){var t=this.element,n=gq(t),i=n.bodyProperty;if(!i)throw fq("unexpected body text <"+e+">");yq.prototype.handleText.call(this,e)},Aq.prototype.handleEnd=function(){var e=this.body,t=this.element,n=gq(t),i=n.bodyProperty;i&&void 0!==e&&(e=DK(i.type,e),t.set(i.name,e))},Aq.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,o=gq(i),r=this.context,s=new i({}),a=this.model;return Object(WU["forEach"])(n,(function(e,n){var i,l=o.propertiesByName[n];l&&l.isReference?l.isMany?(i=e.split(" "),Object(WU["forEach"])(i,(function(e){r.addReference({element:s,property:l.ns.name,id:e})}))):r.addReference({element:s,property:l.ns.name,id:e}):(l?e=DK(l.type,e):"xmlns"!==n&&(t=NK(n,o.ns.prefix),a.getPackage(t.prefix)&&r.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},Aq.prototype.getPropertyForNode=function(e){var t,n,i=e.name,o=NK(i),r=this.type,s=this.model,a=gq(r),l=o.name,c=a.propertiesByName[l];if(c&&!c.isAttr)return lq(c)&&(t=e.attributes[sq],t)?(t=pq(t,s),n=s.getType(t),Object(WU["assign"])({},c,{effectiveType:gq(n).name})):c;var h=s.getPackage(o.prefix);if(h){if(t=uq(o,h),n=s.getType(t),c=Object(WU["find"])(a.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})),c)return Object(WU["assign"])({},c,{effectiveType:gq(n).name})}else if(c=Object(WU["find"])(a.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})),c)return c;throw fq("unrecognized element <"+o.name+">")},Aq.prototype.toString=function(){return"ElementDescriptor["+gq(this.type).name+"]"},Aq.prototype.valueHandler=function(e,t){return new _q(e,t)},Aq.prototype.referenceHandler=function(e){return new wq(e,this.context)},Aq.prototype.handler=function(e){return"Element"===e?new xq(this.model,e,this.context):new Aq(this.model,e,this.context)},Aq.prototype.handleChild=function(e){var t,n,i,o;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,IK(n))return this.valueHandler(t,i);o=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var r=o.element;return void 0!==r&&(t.isMany?i.get(t.name).push(r):i.set(t.name,r),t.isReference?(Object(WU["assign"])(r,{element:i}),this.context.addReference(r)):r.$parent=i),o},Eq.prototype=Object.create(Aq.prototype),Eq.prototype.createElement=function(e){var t=e.name,n=NK(t),i=this.model,o=this.type,r=i.getPackage(n.prefix),s=r&&uq(n,r)||t;if(!o.hasType(s))throw fq("unexpected element <"+e.originalName+">");return Aq.prototype.createElement.call(this,e)},xq.prototype=Object.create(Cq.prototype),xq.prototype.createElement=function(e){var t=e.name,n=NK(t),i=n.prefix,o=e.ns[i+"$uri"],r=e.attributes;return this.model.createAny(t,o,r)},xq.prototype.handleChild=function(e){var t,n=new xq(this.model,"Element",this.context).handleNode(e),i=this.element,o=n.element;return void 0!==o&&(t=i.$children=i.$children||[],t.push(o),o.$parent=i),n},xq.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Sq.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Aq?(i=t,t={}):"string"===typeof t?(i=this.handler(t),t={}):"string"===typeof i&&(i=this.handler(i));var o=this.model,r=this.lax,s=new mq(Object(WU["assign"])({},t,{rootHandler:i})),a=new iq({proxy:!0}),l=kq();function c(e,t,n){var i=t(),o=i.line,r=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+o+"\n\tcolumn: "+r+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw fq(l)}function h(e,t){return c(e,t,!0)}function u(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var o=t.element,r=n[t.id],a=gq(o).propertiesByName[t.property];if(r||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=o.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),r?l[c]=r:l.splice(c,1)}else o.set(a.name,r)}}function d(){l.pop().handleEnd()}i.context=s,l.push(i);var p=/^<\?xml /i,f=/ encoding="([^"]+)"/i,g=/^utf-8$/i;function m(e){if(p.test(e)){var t=f.exec(e),n=t&&t[1];n&&!g.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}}function b(e,t){var n=l.peek();try{l.push(n.handleNode(e))}catch(i){c(i,t,r)&&l.push(new vq)}}function v(e,t){try{l.peek().handleText(e)}catch(n){h(n,t)}}function y(e,t){e.trim()&&v(e,t)}var w=o.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return a.ns(w).on("openTag",(function(e,t,n,i){var o=e.attrs||{},r=Object.keys(o).reduce((function(e,n){var i=t(o[n]);return e[n]=i,e}),{}),s={name:e.name,originalName:e.originalName,attributes:r,ns:e.ns};b(s,i)})).on("question",m).on("closeTag",d).on("cdata",v).on("text",(function(e,t,n){y(t(e),n)})).on("error",c).on("warn",h),new Promise((function(t,n){var o;try{a.parse(e),u()}catch(d){o=d}var r=i.element;o||r||(o=fq("failed to parse document as <"+i.type.$descriptor.name+">"));var l=s.warnings,c=s.references,h=s.elementsById;return o?(o.warnings=l,n(o)):t({rootElement:r,elementsById:h,references:c,warnings:l})}))},Sq.prototype.handler=function(e){return new Eq(this.model,e)};var Dq='<?xml version="1.0" encoding="UTF-8"?>\n',Lq=/<|>|'|"|&|\n\r|\n/g,Iq=/<|>|&/g;function Nq(e){var t={},n={},i={},o=[],r=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?o.push(e):r.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,o=this.getNSKey(t);i[o]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){function t(e){var t=n.getNSKey(e);return i[t]}var n=this,s=[].concat(o,r);return s.filter(t)}}function Mq(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Bq(e,t){return oq(t)?Mq(e):e}function Tq(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Oq(e){return Object(WU["isString"])(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function Rq(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){var t="xmlns"+(e.prefix?":"+e.prefix:"");return{name:t,value:e.uri}}))}function Pq(e,t){return t.isGeneric?Object(WU["assign"])({localName:t.ns.localName},e):Object(WU["assign"])({localName:Bq(t.ns.localName,t.$pkg)},e)}function Fq(e,t){return Object(WU["assign"])({localName:t.ns.localName},e)}function jq(e){var t=e.$descriptor;return Object(WU["filter"])(t.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!Object(WU["has"])(e,n))return!1;var i=e[n];return i!==t.default&&(null!==i&&(!t.isMany||i.length))}))}var zq={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Vq={"<":"lt",">":"gt","&":"amp"};function Qq(e,t,n){return e=Object(WU["isString"])(e)?e:""+e,e.replace(t,(function(e){return"&"+n[e]+";"}))}function Wq(e){return Qq(e,Lq,zq)}function Hq(e){return Qq(e,Iq,Vq)}function Uq(e){return Object(WU["filter"])(e,(function(e){return e.isAttr}))}function Yq(e){return Object(WU["filter"])(e,(function(e){return!e.isAttr}))}function Gq(e){this.tagName=e}function Kq(){}function qq(e){this.tagName=e}function Jq(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function $q(e,t){Jq.call(this,e,t)}function Xq(){this.value="",this.write=function(e){this.value+=e}}function Zq(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function eJ(e){function t(t,n){var i=n||new Xq,o=new Zq(i,e.format);if(e.preamble&&o.append(Dq),(new Jq).build(t).serializeTo(o),!n)return i.value}return e=Object(WU["assign"])({format:!1,preamble:!0},e||{}),{toXML:t}}function tJ(e,t){FK.call(this,e,t)}Gq.prototype.build=function(e){return this.element=e,this},Gq.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},Kq.prototype.serializeValue=Kq.prototype.serializeTo=function(e){e.append(this.escape?Hq(this.value):this.value)},Kq.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Iq)&&(this.escape=!0),this},Tq(qq,Kq),qq.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},Jq.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,o=this.propertyDescriptor,r=i.isGeneric;return t=r?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=o?this.nsPropertyTagName(o):this.nsTagName(i),this.tagName=this.addTagName(this.ns),r||(n=jq(e),this.parseAttributes(Uq(n)),this.parseContainments(Yq(n))),this.parseGenericAttributes(e,t),this},Jq.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Pq(t,e)},Jq.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Fq(t,e)},Jq.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Jq.prototype.nsAttributeName=function(e){var t;if(t=Object(WU["isString"])(e)?NK(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:Object(WU["assign"])({localName:t.localName},n)},Jq.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return Object(WU["forEach"])(e,(function(o,r){var s;"$body"===r?n.push((new Kq).build({type:"String"},o)):"$children"===r?Object(WU["forEach"])(o,(function(e){n.push(new Jq(t).build(e))})):0!==r.indexOf("$")&&(s=t.parseNsAttribute(e,r,o),s&&i.push({name:r,value:o}))})),i},Jq.prototype.parseNsAttribute=function(e,t,n){var i,o=e.$model,r=NK(t);if("xmlns"===r.prefix&&(i={prefix:r.localName,uri:n}),r.prefix||"xmlns"!==r.localName||(i={uri:n}),!i)return{name:t,value:n};if(o&&o.getPackage(n))this.logNamespace(i,!0,!0);else{var s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},Jq.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,o=[];return Object(WU["forEach"])(i,(function(t,i){var r=n.parseNsAttribute(e,i,t);r&&o.push(r)})),o},Jq.prototype.parseGenericAttributes=function(e,t){var n=this;Object(WU["forEach"])(t,(function(e){if(e.name!==sq)try{n.addAttribute(n.nsAttributeName(e.name),e.value)}catch(t){}}))},Jq.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;Object(WU["forEach"])(e,(function(e){var o=i.get(e.name),r=e.isReference,s=e.isMany;if(s||(o=[o]),e.isBody)n.push((new Kq).build(e,o[0]));else if(IK(e.type))Object(WU["forEach"])(o,(function(i){n.push(new qq(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(r)Object(WU["forEach"])(o,(function(i){n.push(new Gq(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=lq(e),l=cq(e);Object(WU["forEach"])(o,(function(i){var o;o=a?new $q(t,e):l?new Jq(t,e):new Jq(t),n.push(o.build(i))}))}}))},Jq.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Nq(t):n=t),n},Jq.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),o=e.uri,r=e.prefix,s=i.byUri(o);return s&&!n||i.add(e,t),i.mapPrefix(r,o),e},Jq.prototype.logNamespaceUsed=function(e,t){var n,i,o,r=this.element,s=r.$model,a=this.getNamespaces(t),l=e.prefix,c=e.uri;if(!l&&!c)return{localName:e.localName};if(o=rq[l]||s&&(s.getPackage(l)||{}).uri,c=c||o||a.uriByPrefix(l),!c)throw new Error("no namespace uri given for prefix <"+l+">");if(e=a.byUri(c),!e){n=l,i=1;while(a.uriByPrefix(n))n=l+"_"+i++;e=this.logNamespace({prefix:n,uri:c},o===c)}return l&&a.mapPrefix(l,c),e},Jq.prototype.parseAttributes=function(e){var t=this,n=this.element;Object(WU["forEach"])(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var o=[];Object(WU["forEach"])(i,(function(e){o.push(e.id)})),i=o.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},Jq.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Oq(e)},Jq.prototype.addAttribute=function(e,t){var n=this.attrs;Object(WU["isString"])(t)&&(t=Wq(t)),n.push({name:e,value:t})},Jq.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=Rq(n).concat(t)),Object(WU["forEach"])(t,(function(t){e.append(" ").append(Oq(t.name)).append('="').append(t.value).append('"')}))},Jq.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==Kq;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),Object(WU["forEach"])(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Tq($q,Jq),$q.prototype.parseNsAttributes=function(e){var t=Jq.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var o=e.$model.getPackage(i.uri),r=o.xml&&o.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(sq),(i.prefix?i.prefix+":":"")+r+n.ns.localName),t},$q.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},tJ.prototype=Object.create(FK.prototype),tJ.prototype.fromXML=function(e,t,n){Object(WU["isString"])(t)||(n=t,t="bpmn:Definitions");var i=new Sq(Object(WU["assign"])({model:this,lax:!0},n)),o=i.handler(t);return i.fromXML(e,o)},tJ.prototype.toXML=function(e,t){var n=new eJ(t);return new Promise((function(t,i){try{var o=n.toXML(e);return t({xml:o})}catch(r){return i(r)}}))};var nJ="BPMN20",iJ="http://www.omg.org/spec/BPMN/20100524/MODEL",oJ="bpmn",rJ=[],sJ=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],aJ=[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],lJ={tagAlias:"lowerCase",typePrefix:"t"},cJ={name:nJ,uri:iJ,prefix:oJ,associations:rJ,types:sJ,enumerations:aJ,xml:lJ},hJ="BPMNDI",uJ="http://www.omg.org/spec/BPMN/20100524/DI",dJ="bpmndi",pJ=[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],fJ=[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],gJ=[],mJ={name:hJ,uri:uJ,prefix:dJ,types:pJ,enumerations:fJ,associations:gJ},bJ="DC",vJ="http://www.omg.org/spec/DD/20100524/DC",yJ="dc",wJ=[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],_J=[],CJ={name:bJ,uri:vJ,prefix:yJ,types:wJ,associations:_J},AJ="DI",EJ="http://www.omg.org/spec/DD/20100524/DI",xJ="di",SJ=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],kJ=[],DJ={tagAlias:"lowerCase"},LJ={name:AJ,uri:EJ,prefix:xJ,types:SJ,associations:kJ,xml:DJ},IJ="bpmn.io colors for BPMN",NJ="http://bpmn.io/schema/bpmn/biocolor/1.0",MJ="bioc",BJ=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],TJ=[],OJ=[],RJ={name:IJ,uri:NJ,prefix:MJ,types:BJ,enumerations:TJ,associations:OJ},PJ="BPMN in Color",FJ="http://www.omg.org/spec/BPMN/non-normative/color/1.0",jJ="color",zJ=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],VJ=[],QJ=[],WJ={name:PJ,uri:FJ,prefix:jJ,types:zJ,enumerations:VJ,associations:QJ},HJ={bpmn:cJ,bpmndi:mJ,dc:CJ,di:LJ,bioc:RJ,color:WJ};function UJ(e,t){var n=Object(WU["assign"])({},HJ,e);return new tJ(n,t)}var YJ=UJ;function GJ(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}var KJ=new GG.a({name:"bpmnElement",enumerable:!0},{name:"di",configurable:!0});function qJ(e,t){return e.$instanceOf(t)}function JJ(e){return Object(WU["find"])(e.rootElements,(function(e){return qJ(e,"bpmn:Process")||qJ(e,"bpmn:Collaboration")}))}function $J(e,t){var n={},i=[];function o(e,t){return function(n){e(n,t)}}function r(e){n[e.id]=e}function s(e){return n[e.id]}function a(n,i){var o=n.gfx;if(o)throw new Error(t("already rendered {element}",{element:GJ(n)}));return e.element(n,i)}function l(t,n){return e.root(t,n)}function c(e,t){try{var n=e.di&&a(e,t);return r(e),n}catch(i){h(i.message,{element:e,error:i})}}function h(t,n){e.error(t,n)}function u(e){var n=e.bpmnElement;n?n.di?h(t("multiple DI elements defined for {element}",{element:GJ(n)}),{element:n}):(KJ.bind(n,"di"),n.di=e):h(t("no bpmnElement referenced in {element}",{element:GJ(e)}),{element:e})}function d(e){p(e.plane)}function p(e){u(e),Object(WU["forEach"])(e.planeElement,f)}function f(e){u(e)}function g(e,n){var o=e.diagrams;if(n&&-1===o.indexOf(n))throw new Error(t("diagram not part of bpmn:Definitions"));if(!n&&o&&o.length&&(n=o[0]),!n)throw new Error(t("no diagram to display"));d(n);var r=n.plane;if(!r)throw new Error(t("no plane for {element}",{element:GJ(n)}));var s=r.bpmnElement;if(!s){if(s=JJ(e),!s)throw new Error(t("no process or collaboration to display"));h(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:GJ(r),rootElement:GJ(s)})),r.bpmnElement=s,u(r)}var a=l(s,r);if(qJ(s,"bpmn:Process"))b(s,a);else{if(!qJ(s,"bpmn:Collaboration"))throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:GJ(r),rootElement:GJ(s)}));P(s,a),v(e.rootElements,a)}m(i)}function m(){var e;while(i.length)e=i.shift(),e()}function b(e,t){T(e,t),S(e.ioSpecification,t),x(e.artifacts,t),r(e)}function v(e,t){var n=Object(WU["filter"])(e,(function(e){return!s(e)&&qJ(e,"bpmn:Process")&&e.laneSets}));n.forEach(o(b,t))}function y(e,t){c(e,t)}function w(e,t){Object(WU["forEach"])(e,o(y,t))}function _(e,t){c(e,t)}function C(e,t){c(e,t)}function A(e,t){c(e,t)}function E(e,t){c(e,t)}function x(e,t){Object(WU["forEach"])(e,(function(e){qJ(e,"bpmn:Association")?i.push((function(){E(e,t)})):E(e,t)}))}function S(e,t){e&&(Object(WU["forEach"])(e.dataInputs,o(C,t)),Object(WU["forEach"])(e.dataOutputs,o(A,t)))}function k(e,t){T(e,t),x(e.artifacts,t)}function D(e,t){var n=c(e,t);qJ(e,"bpmn:SubProcess")&&k(e,n||t),qJ(e,"bpmn:Activity")&&S(e.ioSpecification,t),i.push((function(){Object(WU["forEach"])(e.dataInputAssociations,o(_,t)),Object(WU["forEach"])(e.dataOutputAssociations,o(_,t))}))}function L(e,t){c(e,t)}function I(e,t){c(e,t)}function N(e,t){i.push((function(){var n=c(e,t);e.childLaneSet&&M(e.childLaneSet,n||t),F(e)}))}function M(e,t){Object(WU["forEach"])(e.lanes,o(N,t))}function B(e,t){Object(WU["forEach"])(e,o(M,t))}function T(e,t){O(e.flowElements,t),e.laneSets&&B(e.laneSets,t)}function O(e,n){Object(WU["forEach"])(e,(function(e){qJ(e,"bpmn:SequenceFlow")?i.push((function(){L(e,n)})):qJ(e,"bpmn:BoundaryEvent")?i.unshift((function(){D(e,n)})):qJ(e,"bpmn:FlowNode")?D(e,n):qJ(e,"bpmn:DataObject")||(qJ(e,"bpmn:DataStoreReference")||qJ(e,"bpmn:DataObjectReference")?I(e,n):h(t("unrecognized flowElement {element} in context {context}",{element:GJ(e),context:n?GJ(n.businessObject):"null"}),{element:e,context:n}))}))}function R(e,t){var n=c(e,t),i=e.processRef;i&&b(i,n||t)}function P(e){Object(WU["forEach"])(e.participants,o(R)),x(e.artifacts),i.push((function(){w(e.messageFlows)}))}function F(e){Object(WU["forEach"])(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}return{handleDeferred:m,handleDefinitions:g,handleSubProcess:k,registerDi:u}}function XJ(e,t,n){var i,o,r,s,a=[];function l(e,t){var n={root:function(e){return i.add(e)},element:function(e,t){return i.add(e,t)},error:function(e,t){a.push({message:e,context:t})}},o=new $J(n,r);o.handleDefinitions(e,t)}return new Promise((function(c,h){try{return i=e.get("bpmnImporter"),o=e.get("eventBus"),r=e.get("translate"),o.fire("import.render.start",{definitions:t}),l(t,n),o.fire("import.render.complete",{error:s,warnings:a}),c({warnings:a})}catch(u){return u.warnings=a,h(u)}}))}function ZJ(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var t=arguments.length;if(!(t>=1&&Object(WU["isFunction"])(arguments[t-1])))return e.apply(this,arguments);var n=arguments[t-1],i=Array.prototype.slice.call(arguments,0,-1);e.apply(this,i).then((function(e){var t=Object.keys(e)[0];return n(null,e[t])}),(function(e){return n(e,e.warnings)}))}}var e$='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21" style="vertical-align:middle"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',t$=e$;function n$(e){return e.join(";")}var i$,o$=n$(["color: #404040"]),r$=n$(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"]),s$=n$(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"]),a$=n$(["position: absolute","left: 50%","top: 40%","transform: translate(-50%)","width: 260px","padding: 10px","background: white","box-shadow: 0 1px 4px rgba(0,0,0,0.3)","font-family: Helvetica, Arial, sans-serif","font-size: 14px","display: flex","line-height: 1.3"]),l$='<div class="bjs-powered-by-lightbox" style="'+r$+'"><div class="backdrop" style="'+s$+'"></div><div class="notice" style="'+a$+'"><a href="https://bpmn.io" target="_blank" rel="noopener" style="margin: 15px 20px 15px 10px; align-self: center;'+o$+'">'+t$+'</a><span>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';function c$(){i$||(i$=Object(HU["domify"])(l$),HU["delegate"].bind(i$,".backdrop","click",(function(e){document.body.removeChild(i$)}))),document.body.appendChild(i$)}function h$(e){e=Object(WU["assign"])({},p$,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),m$(this._container),this._init(this._container,this._moddle,e)}function u$(e,t){return e.warnings=t,e}function d$(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/,n=t.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}FU()(h$,AK),h$.prototype.importXML=ZJ((function(e,t){var n=this;function i(e){var t=n.get("eventBus").createEvent(e);return Object.defineProperty(t,"context",{enumerable:!0,get:function(){return{warnings:e.warnings,references:e.references,elementsById:e.elementsById}}}),t}return new Promise((function(o,r){e=n._emit("import.parse.start",{xml:e})||e,n._moddle.fromXML(e,"bpmn:Definitions").then((function(e){var s=e.rootElement,a=e.references,l=e.warnings,c=e.elementsById;s=n._emit("import.parse.complete",i({error:null,definitions:s,elementsById:c,references:a,warnings:l}))||s,n.importDefinitions(s,t).then((function(e){var t=[].concat(l,e.warnings||[]);return n._emit("import.done",{error:null,warnings:t}),o({warnings:t})})).catch((function(e){var t=[].concat(l,e.warnings||[]);return n._emit("import.done",{error:e,warnings:t}),r(u$(e,t))}))})).catch((function(e){return n._emit("import.parse.complete",{error:e}),e=d$(e),n._emit("import.done",{error:e,warnings:e.warnings}),r(e)}))}))})),h$.prototype.importDefinitions=ZJ((function(e,t){var n=this;return new Promise((function(i,o){n._setDefinitions(e),n.open(t).then((function(e){var t=e.warnings;return i({warnings:t})})).catch((function(e){return o(e)}))}))})),h$.prototype.open=ZJ((function(e){var t=this._definitions,n=e,i=this;return new Promise((function(o,r){if(!t){var s=new Error("no XML imported");return r(u$(s,[]))}if("string"===typeof e&&(n=g$(t,e),!n)){var a=new Error("BPMNDiagram <"+e+"> not found");return r(u$(a,[]))}try{i.clear()}catch(l){return r(u$(l,[]))}XJ(i,t,n).then((function(e){var t=e.warnings;return o({warnings:t})})).catch((function(e){return r(e)}))}))})),h$.prototype.saveXML=ZJ((function(e){e=e||{};var t=this,n=this._definitions;return new Promise((function(i){if(!n)return i({error:new Error("no definitions loaded")});n=t._emit("saveXML.start",{definitions:n})||n,t._moddle.toXML(n,e).then((function(e){var n=e.xml;return n=t._emit("saveXML.serialized",{xml:n})||n,i({xml:n})}))})).catch((function(e){return{error:e}})).then((function(e){t._emit("saveXML.done",e);var n=e.error;return n?Promise.reject(n):e}))})),h$.prototype.saveSVG=ZJ((function(e){e=e||{};var t=this;return new Promise((function(e,n){var i,o;t._emit("saveSVG.start");try{var r=t.get("canvas"),s=r.getDefaultLayer(),a=Object(HU["query"])("defs",r._svg),l=SY(s),c=a?"<defs>"+SY(a)+"</defs>":"",h=s.getBBox();i='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+h.width+'" height="'+h.height+'" viewBox="'+h.x+" "+h.y+" "+h.width+" "+h.height+'" version="1.1">'+c+l+"</svg>"}catch(u){o=u}return t._emit("saveSVG.done",{error:o,svg:i}),o?n(o):e({svg:i})}))})),h$.prototype._setDefinitions=function(e){this._definitions=e},h$.prototype.getModules=function(){return this._modules},h$.prototype.clear=function(){this.getDefinitions()&&(this.get("elementRegistry").forEach((function(e){var t=e.businessObject;t&&t.di&&delete t.di})),AK.prototype.clear.call(this))},h$.prototype.destroy=function(){AK.prototype.destroy.call(this),Object(HU["remove"])(this._container)},h$.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},h$.prototype.off=function(e,t){this.get("eventBus").off(e,t)},h$.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"===typeof e&&(e=Object(HU["query"])(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},h$.prototype.getDefinitions=function(){return this._definitions},h$.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},h$.prototype._init=function(e,t,n){var i=n.modules||this.getModules(),o=n.additionalModules||[],r=[{bpmnjs:["value",this],moddle:["value",t]}],s=[].concat(r,i,o),a=Object(WU["assign"])(Object(WU["omit"])(n,["additionalModules"]),{canvas:Object(WU["assign"])({},n.canvas,{container:e}),modules:s});AK.call(this,a),n&&n.container&&this.attachTo(n.container)},h$.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},h$.prototype._createContainer=function(e){var t=Object(HU["domify"])('<div class="bjs-container"></div>');return Object(WU["assign"])(t.style,{width:f$(e.width),height:f$(e.height),position:e.position}),t},h$.prototype._createModdle=function(e){var t=Object(WU["assign"])({},this._moddleExtensions,e.moddleExtensions);return new YJ(t)},h$.prototype._modules=[];var p$={width:"100%",height:"100%",position:"relative"};function f$(e){return e+(Object(WU["isNumber"])(e)?"px":"")}function g$(e,t){return t&&Object(WU["find"])(e.diagrams,(function(e){return e.id===t}))||null}function m$(e){var t=t$,n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position: absolute; bottom: 15px; right: 15px; z-index: 100; '+o$+'">'+t+"</a>",i=Object(HU["domify"])(n);e.appendChild(i),HU["event"].bind(i,"click",(function(e){c$(),e.preventDefault()}))}function b$(e){h$.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.elementsById)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}function v$(e,t){var n=y$(e);return n&&"function"===typeof n.$instanceOf&&n.$instanceOf(t)}function y$(e){return e&&e.businessObject||e}function w$(e){return!v$(e,"bpmn:CallActivity")&&(v$(e,"bpmn:SubProcess")?y$(e).di&&!!y$(e).di.isExpanded:!v$(e,"bpmn:Participant")||!!y$(e).processRef)}function _$(e){return e&&!1!==y$(e).isInterrupting}function C$(e){return e&&!!y$(e).triggeredByEvent}function A$(e,t){var n=y$(e),i=!1;return n.eventDefinitions&&Object(WU["forEach"])(n.eventDefinitions,(function(e){v$(e,t)&&(i=!0)})),i}function E$(e){return A$(e,"bpmn:ErrorEventDefinition")}function x$(e){return A$(e,"bpmn:EscalationEventDefinition")}function S$(e){return A$(e,"bpmn:CompensateEventDefinition")}function k$(e){return v$(e,"bpmn:FlowElement")||v$(e,"bpmn:Participant")||v$(e,"bpmn:Lane")||v$(e,"bpmn:SequenceFlow")||v$(e,"bpmn:MessageFlow")||v$(e,"bpmn:DataInput")||v$(e,"bpmn:DataOutput")?"name":v$(e,"bpmn:TextAnnotation")?"text":v$(e,"bpmn:Group")?"categoryValueRef":void 0}function D$(e){var t=e["categoryValueRef"];return t&&t.value||""}function L$(e){var t=e.businessObject,n=k$(t);if(n)return"categoryValueRef"===n?D$(t):t[n]||""}function I$(e,t,n){var i=e.businessObject,o=k$(i);return o&&("categoryValueRef"===o?i["categoryValueRef"].value=t:i[o]=t),e}function N$(e,t,n){function i(e,t){return Object(WU["every"])(t,(function(t,n){return e[n]==t}))}return Object(WU["some"])(e.eventDefinitions,(function(o){return o.$type===t&&i(e,n)}))}function M$(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}function B$(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function T$(e){return e.businessObject.di}function O$(e){return e.businessObject}function R$(e,t){var n=T$(e);return n.get("color:background-color")||n.get("bioc:fill")||t||"white"}function P$(e,t){var n=T$(e);return n.get("color:border-color")||n.get("bioc:stroke")||t||"black"}function F$(e,t,n){var i=T$(e),o=i.get("label");return o&&o.get("color:color")||t||P$(e,n)}function j$(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2,o=[["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]];return HY(o)}function z$(e,t){var n=e.x,i=e.y,o=e.width,r=e.height,s=[["M",n+t,i],["l",o-2*t,0],["a",t,t,0,0,1,t,t],["l",0,r-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-o,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-r],["a",t,t,0,0,1,t,-t],["z"]];return HY(s)}function V$(e){var t=e.width,n=e.height,i=e.x,o=e.y,r=t/2,s=n/2,a=[["M",i+r,o],["l",r,s],["l",-r,s],["l",-r,-s],["z"]];return HY(a)}function Q$(e){var t=e.x,n=e.y,i=e.width,o=e.height,r=[["M",t,n],["l",i,0],["l",0,o],["l",-i,0],["z"]];return HY(r)}FU()(b$,h$),b$.prototype._createModdle=function(e){var t=h$.prototype._createModdle.call(this,e);return t.ids=new QU([32,36,1]),t},b$.prototype._collectIds=function(e,t){var n,i=e.$model,o=i.ids;for(n in o.clear(),t)o.claim(n,t[n])};var W$=new QU,H$=10,U$=3,Y$=.95,G$=.35,K$=10;function q$(e,t,n,i,o,r,s){WY.call(this,t,s);var a=e&&e.defaultFillColor,l=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor,h=W$.next(),u={},d=n.computeStyle;function p(e,t){var n=Object(WU["assign"])({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},r=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var s=pY("marker");ZU(t.element,n),GU(s,t.element),ZU(s,{id:e,viewBox:"0 0 20 20",refX:i.x,refY:i.y,markerWidth:20*r,markerHeight:20*r,orient:"auto"});var a=Object(HU["query"])("defs",o._svg);a||(a=pY("defs"),GU(o._svg,a)),GU(a,s),u[e]=s}function f(e){return e.replace(/[^0-9a-zA-z]+/g,"_")}function g(e,t,n){var i=e+"-"+f(t)+"-"+f(n)+"-"+h;return u[i]||m(i,e,t,n),"url(#"+i+")"}function m(e,t,n,i){if("sequenceflow-end"===t){var o=pY("path");ZU(o,{d:"M 1 5 L 11 10 L 1 15 Z"}),p(e,{element:o,ref:{x:11,y:10},scale:.5,attrs:{fill:i,stroke:i}})}if("messageflow-start"===t){var r=pY("circle");ZU(r,{cx:6,cy:6,r:3.5}),p(e,{element:r,attrs:{fill:n,stroke:i},ref:{x:6,y:6}})}if("messageflow-end"===t){var s=pY("path");ZU(s,{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"}),p(e,{element:s,attrs:{fill:n,stroke:i,strokeLinecap:"butt"},ref:{x:8.5,y:5}})}if("association-start"===t){var a=pY("path");ZU(a,{d:"M 11 5 L 1 10 L 11 15"}),p(e,{element:a,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}if("association-end"===t){var l=pY("path");ZU(l,{d:"M 1 5 L 11 10 L 1 15"}),p(e,{element:l,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}if("conditional-flow-marker"===t){var c=pY("path");ZU(c,{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"}),p(e,{element:c,attrs:{fill:n,stroke:i},ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===t){var h=pY("path");ZU(h,{d:"M 6 4 L 10 16"}),p(e,{element:h,attrs:{stroke:i},ref:{x:0,y:10},scale:.5})}}function b(e,t,n,i,o){Object(WU["isObject"])(i)&&(o=i,i=0),i=i||0,o=d(o,{stroke:"black",strokeWidth:2,fill:"white"}),"none"===o.fill&&delete o.fillOpacity;var r=t/2,s=n/2,a=pY("circle");return ZU(a,{cx:r,cy:s,r:Math.round((t+n)/4-i)}),ZU(a,o),GU(e,a),a}function v(e,t,n,i,o,r){Object(WU["isObject"])(o)&&(r=o,o=0),o=o||0,r=d(r,{stroke:"black",strokeWidth:2,fill:"white"});var s=pY("rect");return ZU(s,{x:o,y:o,width:t-2*o,height:n-2*o,rx:i,ry:i}),ZU(s,r),GU(e,s),s}function y(e,t,n,i){var o=t/2,r=n/2,s=[{x:o,y:0},{x:t,y:r},{x:o,y:n},{x:0,y:r}],a=s.map((function(e){return e.x+","+e.y})).join(" ");i=d(i,{stroke:"black",strokeWidth:2,fill:"white"});var l=pY("polygon");return ZU(l,{points:a}),ZU(l,i),GU(e,l),l}function w(e,t,n){n=d(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"});var i=YY(t,n);return GU(e,i),i}function _(e,t,n){n=d(n,["no-fill"],{strokeWidth:2,stroke:"black"});var i=pY("path");return ZU(i,{d:t}),ZU(i,n),GU(e,i),i}function C(e,t,n,i){return _(t,n,Object(WU["assign"])({"data-marker":e},i))}function A(e){return function(t,n){return N[e](t,n)}}function E(e){return N[e]}function x(e,t){var n=O$(e),i=M$(n);return n.eventDefinitions&&n.eventDefinitions.length>1?n.parallelMultiple?E("bpmn:ParallelMultipleEventDefinition")(t,e,i):E("bpmn:MultipleEventDefinition")(t,e,i):N$(n,"bpmn:MessageEventDefinition")?E("bpmn:MessageEventDefinition")(t,e,i):N$(n,"bpmn:TimerEventDefinition")?E("bpmn:TimerEventDefinition")(t,e,i):N$(n,"bpmn:ConditionalEventDefinition")?E("bpmn:ConditionalEventDefinition")(t,e):N$(n,"bpmn:SignalEventDefinition")?E("bpmn:SignalEventDefinition")(t,e,i):N$(n,"bpmn:EscalationEventDefinition")?E("bpmn:EscalationEventDefinition")(t,e,i):N$(n,"bpmn:LinkEventDefinition")?E("bpmn:LinkEventDefinition")(t,e,i):N$(n,"bpmn:ErrorEventDefinition")?E("bpmn:ErrorEventDefinition")(t,e,i):N$(n,"bpmn:CancelEventDefinition")?E("bpmn:CancelEventDefinition")(t,e,i):N$(n,"bpmn:CompensateEventDefinition")?E("bpmn:CompensateEventDefinition")(t,e,i):N$(n,"bpmn:TerminateEventDefinition")?E("bpmn:TerminateEventDefinition")(t,e,i):null}function S(e,t,n){n=Object(WU["assign"])({size:{width:100}},n);var i=r.createText(t||"",n);return oY(i).add("djs-label"),GU(e,i),i}function k(e,t,n){var i=O$(t);return S(e,i.name,{box:t,align:n,padding:5,style:{fill:F$(t,c,l)}})}function D(e,t){var n={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return S(e,L$(t),{box:n,fitBox:!0,style:Object(WU["assign"])({},r.getExternalStyle(),{fill:F$(t,c,l)})})}function L(e,t,n){var i=S(e,t,{box:{height:30,width:n.height},align:"center-middle",style:{fill:F$(n,c,l)}}),o=-1*n.height;gK(i,0,-o,270)}function I(e){for(var t=e.waypoints,n="m "+t[0].x+","+t[0].y,i=1;i<t.length;i++)n+="L"+t[i].x+","+t[i].y+" ";return n}var N=this.handlers={"bpmn:Event":function(e,t,n){return"fillOpacity"in n||(n.fillOpacity=Y$),b(e,t.width,t.height,n)},"bpmn:StartEvent":function(e,t){var n={fill:R$(t,a),stroke:P$(t,l)},i=O$(t);i.isInterrupting||(n={strokeDasharray:"6",strokeLinecap:"round",fill:R$(t,a),stroke:P$(t,l)});var o=E("bpmn:Event")(e,t,n);return x(t,e),o},"bpmn:MessageEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),r=n?P$(t,l):R$(t,a),s=n?R$(t,a):P$(t,l),c=_(e,o,{strokeWidth:1,fill:r,stroke:s});return c},"bpmn:TimerEventDefinition":function(e,t){var n=b(e,t.width,t.height,.2*t.height,{strokeWidth:2,fill:R$(t,a),stroke:P$(t,l)}),o=i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}});_(e,o,{strokeWidth:2,strokeLinecap:"square",stroke:P$(t,l)});for(var r=0;r<12;r++){var s=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),c=t.width/2,h=t.height/2;_(e,s,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*r+","+h+","+c+")",stroke:P$(t,l)})}return n},"bpmn:EscalationEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),r=n?P$(t,l):"none";return _(e,o,{strokeWidth:1,fill:r,stroke:P$(t,l)})},"bpmn:ConditionalEventDefinition":function(e,t){var n=i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}});return _(e,n,{strokeWidth:1,stroke:P$(t,l)})},"bpmn:LinkEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),r=n?P$(t,l):"none";return _(e,o,{strokeWidth:1,fill:r,stroke:P$(t,l)})},"bpmn:ErrorEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),r=n?P$(t,l):"none";return _(e,o,{strokeWidth:1,fill:r,stroke:P$(t,l)})},"bpmn:CancelEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),r=n?P$(t,l):"none",s=_(e,o,{strokeWidth:1,fill:r,stroke:P$(t,l)});return bK(s,45),s},"bpmn:CompensateEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),r=n?P$(t,l):"none";return _(e,o,{strokeWidth:1,fill:r,stroke:P$(t,l)})},"bpmn:SignalEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),r=n?P$(t,l):"none";return _(e,o,{strokeWidth:1,fill:r,stroke:P$(t,l)})},"bpmn:MultipleEventDefinition":function(e,t,n){var o=i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),r=n?P$(t,l):"none";return _(e,o,{strokeWidth:1,fill:r})},"bpmn:ParallelMultipleEventDefinition":function(e,t){var n=i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}});return _(e,n,{strokeWidth:1,fill:P$(t,l),stroke:P$(t,l)})},"bpmn:EndEvent":function(e,t){var n=E("bpmn:Event")(e,t,{strokeWidth:4,fill:R$(t,a),stroke:P$(t,l)});return x(t,e,!0),n},"bpmn:TerminateEventDefinition":function(e,t){var n=b(e,t.width,t.height,8,{strokeWidth:4,fill:P$(t,l),stroke:P$(t,l)});return n},"bpmn:IntermediateEvent":function(e,t){var n=E("bpmn:Event")(e,t,{strokeWidth:1,fill:R$(t,a),stroke:P$(t,l)});return b(e,t.width,t.height,U$,{strokeWidth:1,fill:R$(t,"none"),stroke:P$(t,l)}),x(t,e),n},"bpmn:IntermediateCatchEvent":A("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":A("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return n=n||{},"fillOpacity"in n||(n.fillOpacity=Y$),v(e,t.width,t.height,H$,n)},"bpmn:Task":function(e,t){var n={fill:R$(t,a),stroke:P$(t,l)},i=E("bpmn:Activity")(e,t,n);return k(e,t,"center-middle"),M(e,t),i},"bpmn:ServiceTask":function(e,t){var n=E("bpmn:Task")(e,t),o=i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});_(e,o,{strokeWidth:1,fill:R$(t,a),stroke:P$(t,l)});var r=i.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}});_(e,r,{strokeWidth:0,fill:R$(t,a)});var s=i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return _(e,s,{strokeWidth:1,fill:R$(t,a),stroke:P$(t,l)}),n},"bpmn:UserTask":function(e,t){var n=E("bpmn:Task")(e,t),o=15,r=12,s=i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:o,y:r}});_(e,s,{strokeWidth:.5,fill:R$(t,a),stroke:P$(t,l)});var c=i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:o,y:r}});_(e,c,{strokeWidth:.5,fill:R$(t,a),stroke:P$(t,l)});var h=i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:o,y:r}});return _(e,h,{strokeWidth:.5,fill:P$(t,l),stroke:P$(t,l)}),n},"bpmn:ManualTask":function(e,t){var n=E("bpmn:Task")(e,t),o=i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return _(e,o,{strokeWidth:.5,fill:R$(t,a),stroke:P$(t,l)}),n},"bpmn:SendTask":function(e,t){var n=E("bpmn:Task")(e,t),o=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return _(e,o,{strokeWidth:1,fill:P$(t,l),stroke:R$(t,a)}),n},"bpmn:ReceiveTask":function(e,t){var n,o=O$(t),r=E("bpmn:Task")(e,t);return o.instantiate?(b(e,28,28,4.4,{strokeWidth:1}),n=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):n=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),_(e,n,{strokeWidth:1,fill:R$(t,a),stroke:P$(t,l)}),r},"bpmn:ScriptTask":function(e,t){var n=E("bpmn:Task")(e,t),o=i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return _(e,o,{strokeWidth:1,stroke:P$(t,l)}),n},"bpmn:BusinessRuleTask":function(e,t){var n=E("bpmn:Task")(e,t),o=i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),r=_(e,o);ZU(r,{strokeWidth:1,fill:R$(t,"#aaaaaa"),stroke:P$(t,l)});var s=i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),a=_(e,s);return ZU(a,{strokeWidth:1,stroke:P$(t,l)}),n},"bpmn:SubProcess":function(e,t,n){n=Object(WU["assign"])({fill:R$(t,a),stroke:P$(t,l)},n);var i=E("bpmn:Activity")(e,t,n),o=w$(t);return C$(t)&&ZU(i,{strokeDasharray:"1,2"}),k(e,t,o?"center-top":"center-middle"),o?M(e,t):M(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return E("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,t){var i=E("bpmn:SubProcess")(e,t),o=n.style(["no-fill","no-events"],{stroke:P$(t,l)});return v(e,t.width,t.height,H$-2,U$,o),i},"bpmn:CallActivity":function(e,t){return E("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n={fillOpacity:Y$,fill:R$(t,a),stroke:P$(t,l)},i=E("bpmn:Lane")(e,t,n),o=w$(t);if(o){w(e,[{x:30,y:0},{x:30,y:t.height}],{stroke:P$(t,l)});var r=O$(t).name;L(e,r,t)}else{var s=O$(t).name;S(e,s,{box:t,align:"center-middle",style:{fill:F$(t,c,l)}})}var h=!!O$(t).participantMultiplicity;return h&&E("ParticipantMultiplicityMarker")(e,t),i},"bpmn:Lane":function(e,t,n){var i=v(e,t.width,t.height,0,Object(WU["assign"])({fill:R$(t,a),fillOpacity:G$,stroke:P$(t,l)},n)),o=O$(t);if("bpmn:Lane"===o.$type){var r=o.name;L(e,r,t)}return i},"bpmn:InclusiveGateway":function(e,t){var n=E("bpmn:Gateway")(e,t);return b(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:R$(t,a),stroke:P$(t,l)}),n},"bpmn:ExclusiveGateway":function(e,t){var n=E("bpmn:Gateway")(e,t),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return T$(t).isMarkerVisible&&_(e,o,{strokeWidth:1,fill:P$(t,l),stroke:P$(t,l)}),n},"bpmn:ComplexGateway":function(e,t){var n=E("bpmn:Gateway")(e,t),o=i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}});return _(e,o,{strokeWidth:1,fill:P$(t,l),stroke:P$(t,l)}),n},"bpmn:ParallelGateway":function(e,t){var n=E("bpmn:Gateway")(e,t),o=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}});return _(e,o,{strokeWidth:1,fill:P$(t,l),stroke:P$(t,l)}),n},"bpmn:EventBasedGateway":function(e,t){var n=O$(t),o=E("bpmn:Gateway")(e,t);b(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none",stroke:P$(t,l)});var r=n.eventGatewayType,s=!!n.instantiate;function a(){var n=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}}),o={strokeWidth:2,fill:R$(t,"none"),stroke:P$(t,l)};_(e,n,o)}if("Parallel"===r){var c=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),h=_(e,c);ZU(h,{strokeWidth:1,fill:"none"})}else if("Exclusive"===r){if(!s){var u=b(e,t.width,t.height,.26*t.height);ZU(u,{strokeWidth:1,fill:"none",stroke:P$(t,l)})}a()}return o},"bpmn:Gateway":function(e,t){var n={fill:R$(t,a),fillOpacity:Y$,stroke:P$(t,l)};return y(e,t.width,t.height,n)},"bpmn:SequenceFlow":function(e,t){var n,i=I(t),o=R$(t,a),r=P$(t,l),s={strokeLinejoin:"round",markerEnd:g("sequenceflow-end",o,r),stroke:P$(t,l)},c=_(e,i,s),h=O$(t);return t.source&&(n=t.source.businessObject,h.conditionExpression&&n.$instanceOf("bpmn:Activity")&&ZU(c,{markerStart:g("conditional-flow-marker",o,r)}),n.default&&(n.$instanceOf("bpmn:Gateway")||n.$instanceOf("bpmn:Activity"))&&n.default===h&&ZU(c,{markerStart:g("conditional-default-flow-marker",o,r)})),c},"bpmn:Association":function(e,t,n){var i=O$(t),o=R$(t,a),r=P$(t,l);return n=Object(WU["assign"])({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",stroke:P$(t,l)},n||{}),"One"!==i.associationDirection&&"Both"!==i.associationDirection||(n.markerEnd=g("association-end",o,r)),"Both"===i.associationDirection&&(n.markerStart=g("association-start",o,r)),w(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){var n=R$(t,a),i=P$(t,l);return E("bpmn:Association")(e,t,{markerEnd:g("association-end",n,i)})},"bpmn:DataOutputAssociation":function(e,t){var n=R$(t,a),i=P$(t,l);return E("bpmn:Association")(e,t,{markerEnd:g("association-end",n,i)})},"bpmn:MessageFlow":function(e,t){var n=O$(t),o=T$(t),r=R$(t,a),s=P$(t,l),h=I(t),u={markerEnd:g("messageflow-end",r,s),markerStart:g("messageflow-start",r,s),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px",stroke:P$(t,l)},d=_(e,h,u);if(n.messageRef){var p=d.getPointAtLength(d.getTotalLength()/2),f=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:p.x,y:p.y}}),m={strokeWidth:1};"initiating"===o.messageVisibleKind?(m.fill="white",m.stroke="black"):(m.fill="#888",m.stroke="white");var b=_(e,f,m),v=n.messageRef.name,y=S(e,v,{align:"center-top",fitBox:!0,style:{fill:P$(t,c,l)}}),w=b.getBBox(),C=y.getBBox(),A=p.x-C.width/2,E=p.y+w.height/2+K$;gK(y,A,E,0)}return d},"bpmn:DataObject":function(e,t){var n=i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),o=_(e,n,{fill:R$(t,a),fillOpacity:Y$,stroke:P$(t,l)}),r=O$(t);return B$(r)&&B(e,t),o},"bpmn:DataObjectReference":A("bpmn:DataObject"),"bpmn:DataInput":function(e,t){var n=i.getRawPath("DATA_ARROW"),o=E("bpmn:DataObject")(e,t);return _(e,n,{strokeWidth:1}),o},"bpmn:DataOutput":function(e,t){var n=i.getRawPath("DATA_ARROW"),o=E("bpmn:DataObject")(e,t);return _(e,n,{strokeWidth:1,fill:"black"}),o},"bpmn:DataStoreReference":function(e,t){var n=i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),o=_(e,n,{strokeWidth:2,fill:R$(t,a),fillOpacity:Y$,stroke:P$(t,l)});return o},"bpmn:BoundaryEvent":function(e,t){var n=O$(t),i=n.cancelActivity,o={strokeWidth:1,fill:R$(t,a),stroke:P$(t,l)};i||(o.strokeDasharray="6",o.strokeLinecap="round");var r=Object(WU["assign"])({},o,{fillOpacity:1}),s=Object(WU["assign"])({},o,{fill:"none"}),c=E("bpmn:Event")(e,t,r);return b(e,t.width,t.height,U$,s),x(t,e),c},"bpmn:Group":function(e,t){var n=v(e,t.width,t.height,H$,{stroke:P$(t,l),strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"});return n},label:function(e,t){return D(e,t)},"bpmn:TextAnnotation":function(e,t){var n={fill:"none",stroke:"none"},o=v(e,t.width,t.height,0,0,n),r=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}});_(e,r,{stroke:P$(t,l)});var s=O$(t).text||"";return S(e,s,{box:t,align:"left-top",padding:5,style:{fill:F$(t,c,l)}}),o},ParticipantMultiplicityMarker:function(e,t){var n=i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:t.width/2/t.width,my:(t.height-15)/t.height}});C("participant-multiplicity",e,n,{strokeWidth:2,fill:R$(t,a),stroke:P$(t,l)})},SubProcessMarker:function(e,t){var n=v(e,14,14,0,{strokeWidth:1,fill:R$(t,a),stroke:P$(t,l)});mK(n,t.width/2-7.5,t.height-20);var o=i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}});C("sub-process",e,o,{fill:R$(t,a),stroke:P$(t,l)})},ParallelMarker:function(e,t,n){var o=i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.parallel)/t.width,my:(t.height-20)/t.height}});C("parallel",e,o,{fill:R$(t,a),stroke:P$(t,l)})},SequentialMarker:function(e,t,n){var o=i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}});C("sequential",e,o,{fill:R$(t,a),stroke:P$(t,l)})},CompensationMarker:function(e,t,n){var o=i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}});C("compensation",e,o,{strokeWidth:1,fill:R$(t,a),stroke:P$(t,l)})},LoopMarker:function(e,t,n){var o=i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.loop)/t.width,my:(t.height-7)/t.height}});C("loop",e,o,{strokeWidth:1,fill:R$(t,a),stroke:P$(t,l),strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var o=i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.adhoc)/t.width,my:(t.height-15)/t.height}});C("adhoc",e,o,{strokeWidth:1,fill:P$(t,l),stroke:P$(t,l)})}};function M(e,t,n){var i,o=O$(t),r=n&&-1!==n.indexOf("SubProcessMarker");i=r?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},Object(WU["forEach"])(n,(function(n){E(n)(e,t,i)})),o.isForCompensation&&E("CompensationMarker")(e,t,i),"bpmn:AdHocSubProcess"===o.$type&&E("AdhocMarker")(e,t,i);var s=o.loopCharacteristics,a=s&&s.isSequential;s&&(void 0===a&&E("LoopMarker")(e,t,i),!1===a&&E("ParallelMarker")(e,t,i),!0===a&&E("SequentialMarker")(e,t,i))}function B(e,t){var n=(t.height-18)/t.height,o=i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:n}});_(e,o,{strokeWidth:2})}this._drawPath=_}FU()(q$,WY),q$.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],q$.prototype.canRender=function(e){return v$(e,"bpmn:BaseElement")},q$.prototype.drawShape=function(e,t){var n=t.type,i=this.handlers[n];return i(e,t)},q$.prototype.drawConnection=function(e,t){var n=t.type,i=this.handlers[n];return i(e,t)},q$.prototype.getShapePath=function(e){return v$(e,"bpmn:Event")?j$(e):v$(e,"bpmn:Activity")?z$(e,H$):v$(e,"bpmn:Gateway")?V$(e):Q$(e)};var J$=0,$$={width:150,height:50};function X$(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function Z$(e){return Object(WU["isObject"])(e)?Object(WU["assign"])({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function eX(e,t){var n;t.textContent=e;try{var i,o=""===e;return t.textContent=o?"dummy":e,n=t.getBBox(),i={width:n.width+2*n.x,height:n.height},o&&(i.width=0),i}catch(r){return{width:0,height:0}}}function tX(e,t,n){for(var i,o=e.shift(),r=o;;){if(i=eX(r,n),i.width=r?i.width:0," "===r||""===r||i.width<Math.round(t)||r.length<2)return nX(e,r,o,i);r=rX(r,i.width,t)}}function nX(e,t,n,i){if(t.length<n.length){var o=n.slice(t.length).trim();e.unshift(o)}return{width:i.width,height:i.height,text:t}}var iX="­";function oX(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),o=[],r=0;if(i.length>1)while(n=i.shift()){if(!(n.length+r<t)){"-"!==n&&n!==iX||o.pop();break}o.push(n),r+=n.length}var s=o[o.length-1];return s&&s===iX&&(o[o.length-1]="-"),o.join("")}function rX(e,t,n){var i=Math.max(e.length*(n/t),1),o=oX(e,i);return o||(o=e.slice(0,Math.max(Math.round(i-1),1))),o}function sX(){var e=document.getElementById("helper-svg");return e||(e=pY("svg"),ZU(e,{id:"helper-svg",width:0,height:0,style:"visibility: hidden; position: fixed"}),document.body.appendChild(e)),e}function aX(e){this._config=Object(WU["assign"])({},{size:$$,padding:J$,style:{},align:"center-top"},e||{})}function lX(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}aX.prototype.createText=function(e,t){return this.layoutText(e,t).element},aX.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},aX.prototype.layoutText=function(e,t){var n=Object(WU["assign"])({},this._config.size,t.box),i=Object(WU["assign"])({},this._config.style,t.style),o=X$(t.align||this._config.align),r=Z$(void 0!==t.padding?t.padding:this._config.padding),s=t.fitBox||!1,a=lX(i),l=e.split(/\u00AD?\r?\n/),c=[],h=n.width-r.left-r.right,u=pY("text");ZU(u,{x:0,y:0}),ZU(u,i);var d=sX();GU(d,u);while(l.length)c.push(tX(l,h,u));"middle"===o.vertical&&(r.top=r.bottom=0);var p=Object(WU["reduce"])(c,(function(e,t,n){return e+(a||t.height)}),0)+r.top+r.bottom,f=Object(WU["reduce"])(c,(function(e,t,n){return t.width>e?t.width:e}),0),g=r.top;"middle"===o.vertical&&(g+=(n.height-p)/2),g-=(a||c[0].height)/4;var m=pY("text");ZU(m,i),Object(WU["forEach"])(c,(function(e){var t;switch(g+=a||e.height,o.horizontal){case"left":t=r.left;break;case"right":t=(s?f:h)-r.right-e.width;break;default:t=Math.max(((s?f:h)-e.width)/2+r.left,0)}var n=pY("tspan");ZU(n,{x:t,y:g}),n.textContent=e.text,GU(m,n)})),sY(u);var b={width:f,height:p};return{dimensions:b,element:m}};var cX=12,hX=1.2,uX=30;function dX(e){var t=Object(WU["assign"])({fontFamily:"Arial, sans-serif",fontSize:cX,fontWeight:"normal",lineHeight:hX},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=Object(WU["assign"])({},t,{fontSize:n},e&&e.externalStyle||{}),o=new aX({style:t});this.getExternalLabelBounds=function(e,t){var n=o.getDimensions(t,{box:{width:90,height:30,x:e.width/2+e.x,y:e.height/2+e.y},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=o.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(uX,Math.round(i.height))}},this.createText=function(e,t){return o.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}function pX(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,o=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var r={};if(t.position){for(var s=t.containerHeight/o.height*t.yScaleFactor,a=t.containerWidth/o.width*t.xScaleFactor,l=0;l<o.heightElements.length;l++)r["y"+l]=o.heightElements[l]*s;for(var c=0;c<o.widthElements.length;c++)r["x"+c]=o.widthElements[c]*a}var h=bX(o.d,{mx:n,my:i,e:r});return h}}dX.$inject=["config.textRenderer"];var fX=/\{([^{}]+)\}/g,gX=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function mX(e,t,n){var i=n;return t.replace(gX,(function(e,t,n,o,r){t=t||o,i&&(t in i&&(i=i[t]),"function"==typeof i&&r&&(i=i()))})),i=(null==i||i==n?e:i)+"",i}function bX(e,t){return String(e).replace(fX,(function(e,n){return mX(e,n,t)}))}var vX={__init__:["bpmnRenderer"],bpmnRenderer:["type",q$],textRenderer:["type",dX],pathMap:["type",pX]};function yX(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}var wX={translate:["value",yX]},_X={width:90,height:20},CX=15;function AX(e){return v$(e,"bpmn:Event")||v$(e,"bpmn:Gateway")||v$(e,"bpmn:DataStoreReference")||v$(e,"bpmn:DataObjectReference")||v$(e,"bpmn:DataInput")||v$(e,"bpmn:DataOutput")||v$(e,"bpmn:SequenceFlow")||v$(e,"bpmn:MessageFlow")||v$(e,"bpmn:Group")}function EX(e){return LX(e.label)}function xX(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],o=SX(e),r=Math.atan((i.y-n.y)/(i.x-n.x)),s=o.x,a=o.y;return Math.abs(r)<Math.PI/2?a-=CX:s+=CX,{x:s,y:a}}function SX(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}function kX(e){return e.waypoints?xX(e.waypoints):v$(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+_X.height/2}:{x:e.x+e.width/2,y:e.y+e.height+_X.height/2}}function DX(e,t){var n,i,o,r=e.di,s=r.label;return s&&s.bounds?(o=s.bounds,i={width:Math.max(_X.width,o.width),height:o.height},n={x:o.x+o.width/2,y:o.y+o.height/2}):(n=kX(t),i=_X),Object(WU["assign"])({x:n.x-i.width/2,y:n.y-i.height/2},i)}function LX(e){return e&&!!e.labelTarget}function IX(e,t){return Object(WU["assign"])({id:e.id,type:e.$type,businessObject:e},t)}function NX(e,t,n){var i=e.di.waypoint;return!i||i.length<2?[kG(t),kG(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function MX(e,t,n,i){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:GJ(n),referenced:GJ(t),property:i}))}function BX(e,t,n,i,o,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._translate=o,this._textRenderer=r}function TX(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function OX(e){return v$(e,"bpmn:Group")}BX.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate","textRenderer"],BX.prototype.add=function(e,t){var n,i,o,r=e.di,s=this._translate;if(v$(r,"bpmndi:BPMNPlane"))n=this._elementFactory.createRoot(IX(e)),this._canvas.setRootElement(n);else if(v$(r,"bpmndi:BPMNShape")){var a=!w$(e),l=OX(e);i=t&&(t.hidden||t.collapsed);var c=e.di.bounds;n=this._elementFactory.createShape(IX(e,{collapsed:a,hidden:i,x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),isFrame:l})),v$(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,n),v$(e,"bpmn:Lane")&&(o=0),v$(e,"bpmn:DataStoreReference")&&(TX(t,kG(c))||(t=this._canvas.getRootElement())),this._canvas.addShape(n,t,o)}else{if(!v$(r,"bpmndi:BPMNEdge"))throw new Error(s("unknown di {di} for element {semantic}",{di:GJ(r),semantic:GJ(e)}));var h=this._getSource(e),u=this._getTarget(e);i=t&&(t.hidden||t.collapsed),n=this._elementFactory.createConnection(IX(e,{hidden:i,source:h,target:u,waypoints:NX(e,h,u)})),v$(e,"bpmn:DataAssociation")&&(t=null),v$(e,"bpmn:SequenceFlow")&&(o=0),this._canvas.addConnection(n,t,o)}return AX(e)&&L$(n)&&this.addLabel(e,n),this._eventBus.fire("bpmnElement.added",{element:n}),n},BX.prototype._attachBoundary=function(e,t){var n=this._translate,i=e.attachedToRef;if(!i)throw new Error(n("missing {semantic}#attachedToRef",{semantic:GJ(e)}));var o=this._elementRegistry.get(i.id),r=o&&o.attachers;if(!o)throw MX(n,e,i,"attachedToRef");t.host=o,r||(o.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},BX.prototype.addLabel=function(e,t){var n,i,o;return n=DX(e,t),i=L$(t),i&&(n=this._textRenderer.getExternalLabelBounds(n,i)),o=this._elementFactory.createLabel(IX(e,{id:e.id+"_label",labelTarget:t,type:"label",hidden:t.hidden||!L$(t),x:Math.round(n.x),y:Math.round(n.y),width:Math.round(n.width),height:Math.round(n.height)})),this._canvas.addShape(o,t.parent)},BX.prototype._getEnd=function(e,t){var n,i,o=e.$type,r=this._translate;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===o&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===o||"target"===t&&"bpmn:DataInputAssociation"===o)&&(i=e.$parent),n=i&&this._getElement(i),n)return n;throw i?MX(r,e,i,t+"Ref"):new Error(r("{semantic}#{side} Ref not specified",{semantic:GJ(e),side:t}))},BX.prototype._getSource=function(e){return this._getEnd(e,"source")},BX.prototype._getTarget=function(e){return this._getEnd(e,"target")},BX.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var RX={__depends__:[wX],bpmnImporter:["type",BX]},PX={__depends__:[vX,RX]};function FX(e){e&&"function"===typeof e.stopPropagation&&e.stopPropagation()}function jX(e){return e.originalEvent||e.srcEvent}function zX(e,t){FX(e,t),FX(jX(e),t)}function VX(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function QX(){return/mac/i.test(navigator.platform)}function WX(e,t){return(jX(e)||e).button===t}function HX(e){return WX(e,0)}function UX(e){return WX(e,1)}function YX(e){var t=jX(e)||e;return!!HX(e)&&(QX()?t.metaKey:t.ctrlKey)}function GX(e){var t=jX(e)||e;return HX(e)&&t.shiftKey}function KX(e){return!0}function qX(e){return HX(e)||UX(e)}var JX=500;function $X(e,t,n){var i=this;function o(n,i,o){var r,s,l;a(n,i)||(o?s=t.getGraphics(o):(r=i.delegateTarget||i.target,r&&(s=r,o=t.get(s))),s&&o&&(l=e.fire(n,{element:o,gfx:s,originalEvent:i}),!1===l&&(i.stopPropagation(),i.preventDefault())))}var r={};function s(e){return r[e]}function a(e,t){var n=c[e]||HX;return!n(t)}var l={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":KX,"element.mousedown":qX,"element.mouseup":qX,"element.click":qX,"element.dblclick":qX};function h(e,t,n){var i=l[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return o(i,t,n)}var u="svg, .djs-element";function d(e,t,n,i){var s=r[n]=function(e){o(n,e)};i&&(c[n]=i),s.$delegate=HU["delegate"].bind(e,u,t,s)}function p(e,t,n){var i=s(n);i&&HU["delegate"].unbind(e,t,i.$delegate)}function f(e){Object(WU["forEach"])(l,(function(t,n){d(e,n,t)}))}function g(e){Object(WU["forEach"])(l,(function(t,n){p(e,n,t)}))}e.on("canvas.destroy",(function(e){g(e.svg)})),e.on("canvas.init",(function(e){f(e.svg)})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],JX,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",JX,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var m=w("djs-hit djs-hit-stroke"),b=w("djs-hit djs-hit-click-stroke"),v=w("djs-hit djs-hit-all"),y={all:v,"click-stroke":b,stroke:m};function w(e,t){return t=Object(WU["assign"])({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function _(e,t){var n=y[t];if(!n)throw new Error("invalid hit type <"+t+">");return ZU(e,n),e}function C(e,t){GU(e,t)}this.removeHits=function(e){var t=Object(HU["queryAll"])(".djs-hit",e);Object(WU["forEach"])(t,sY)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,o=e.isFrame;return i?this.createWaypointsHit(t,i):(n=o?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=YY(t);return _(n,"stroke"),C(e,n),n},this.createBoxHit=function(e,t,n){n=Object(WU["assign"])({x:0,y:0},n);var i=pY("rect");return _(i,t),ZU(i,n),C(e,i),i},this.updateDefaultHit=function(e,t){var n=Object(HU["query"])(".djs-hit",t);if(n)return e.waypoints?GY(n,e.waypoints):ZU(n,{width:e.width,height:e.height}),n},this.fire=o,this.triggerMouseEvent=h,this.mouseHandler=s,this.registerEvent=d,this.unregisterEvent=p}$X.$inject=["eventBus","elementRegistry","styles"];var XX={__init__:["interactionEvents"],interactionEvents:["type",$X]},ZX=500;function eZ(e,t,n){this.offset=6;var i=t.cls("djs-outline",["no-fill"]),o=this;function r(e,t){var n=pY("rect");return ZU(n,Object(WU["assign"])({x:10,y:10,width:100,height:100},i)),GU(e,n),n}e.on(["shape.added","shape.changed"],ZX,(function(e){var t=e.element,n=e.gfx,i=Object(HU["query"])(".djs-outline",n);i||(i=r(n,t)),o.updateShapeOutline(i,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,i=Object(HU["query"])(".djs-outline",n);i||(i=r(n,t)),o.updateConnectionOutline(i,t)}))}eZ.prototype.updateShapeOutline=function(e,t){ZU(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},eZ.prototype.updateConnectionOutline=function(e,t){var n=tG(t);ZU(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},eZ.$inject=["eventBus","styles","elementRegistry"];var tZ={__init__:["outline"],outline:["type",eZ]};function nZ(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","plane.set"],(function(e){n.select(null)}))}nZ.$inject=["eventBus","canvas"],nZ.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},nZ.prototype.get=function(){return this._selectedElements},nZ.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},nZ.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();Object(WU["isArray"])(e)||(e=e?[e]:[]);var o=this._canvas;e=e.filter((function(e){var t=o.findPlane(e);return t===o.getActivePlane()})),t?Object(WU["forEach"])(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var iZ="hover",oZ="selected";function rZ(e,t,n,i){function o(e,n){t.addMarker(e,n)}function r(e,n){t.removeMarker(e,n)}this._multiSelectionBox=null,e.on("element.hover",(function(e){o(e.element,iZ)})),e.on("element.out",(function(e){r(e.element,iZ)})),e.on("selection.changed",(function(e){function t(e){r(e,oZ)}function n(e){o(e,oZ)}var i=e.oldSelection,s=e.newSelection;Object(WU["forEach"])(i,(function(e){-1===s.indexOf(e)&&t(e)})),Object(WU["forEach"])(s,(function(e){-1===i.indexOf(e)&&n(e)}))}))}function sZ(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,o=n.elements,r=n.hints||{},s=r.autoSelect;if(i){if(!1===s)return;Object(WU["isArray"])(s)?t.select(s):t.select(o.filter(aZ))}})),e.on("connect.end",500,(function(e){var n=e.context,i=n.canExecute,o=n.hover;i&&o&&t.select(o)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],o=i.get(e.context.shape.id),r=Object(WU["find"])(n,(function(e){return o.id===e.id}));r||t.select(o)})),e.on("element.click",(function(e){if(HX(e)){var i=e.element;i===n.getRootElement()&&(i=null);var o=t.isSelected(i),r=t.get().length>1,s=YX(e)||GX(e);if(o&&r)return s?t.deselect(i):t.select(i);o?t.deselect(i):t.select(i,s)}}))}function aZ(e){return!e.hidden}rZ.$inject=["eventBus","canvas","selection","styles"],sZ.$inject=["eventBus","selection","canvas","elementRegistry"];var lZ={__init__:["selectionVisuals","selectionBehavior"],__depends__:[XX,tZ],selection:["type",nZ],selectionVisuals:["type",rZ],selectionBehavior:["type",sZ]};function cZ(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}cZ.prototype.next=function(){return this._prefix+ ++this._counter};var hZ=new cZ("ov"),uZ=500;function dZ(e,t,n,i){this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=hZ,this._overlayDefaults=Object(WU["assign"])({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=pZ(n.getContainer()),this._init()}function pZ(e){var t=Object(HU["domify"])('<div class="djs-overlay-container" style="position: absolute; width: 0; height: 0;" />');return e.insertBefore(t,e.firstChild),t}function fZ(e,t,n){Object(WU["assign"])(e.style,{left:t+"px",top:n+"px"})}function gZ(e,t){e.style.display=!1===t?"none":""}function mZ(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}dZ.$inject=["config.overlays","eventBus","canvas","elementRegistry"],dZ.prototype.get=function(e){if(Object(WU["isString"])(e)&&(e={id:e}),Object(WU["isString"])(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?Object(WU["filter"])(t.overlays,Object(WU["matchPattern"])({type:e.type})):t.overlays.slice():[]}return e.type?Object(WU["filter"])(this._overlays,Object(WU["matchPattern"])({type:e.type})):e.id?this._overlays[e.id]:null},dZ.prototype.add=function(e,t,n){if(Object(WU["isObject"])(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=Object(WU["assign"])({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},dZ.prototype.remove=function(e){var t=this.get(e)||[];Object(WU["isArray"])(t)||(t=[t]);var n=this;Object(WU["forEach"])(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Object(HU["remove"])(e.html),Object(HU["remove"])(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},dZ.prototype.show=function(){gZ(this._overlayRoot)},dZ.prototype.hide=function(){gZ(this._overlayRoot,!1)},dZ.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Object(HU["clear"])(this._overlayRoot)},dZ.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,o=t.y;if(t.waypoints){var r=tG(t);i=r.x,o=r.y}fZ(n,i,o),Object(HU["attr"])(e.html,"data-container-id",t.id)},dZ.prototype._updateOverlay=function(e){var t,n,i=e.position,o=e.htmlContainer,r=e.element,s=i.left,a=i.top;void 0!==i.right&&(t=r.waypoints?tG(r).width:r.width,s=-1*i.right+t);void 0!==i.bottom&&(n=r.waypoints?tG(r).height:r.height,a=-1*i.bottom+n);fZ(o,s||0,a||0)},dZ.prototype._createOverlayContainer=function(e){var t=Object(HU["domify"])('<div class="djs-overlays" style="position: absolute" />');this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},dZ.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";mZ(this._overlayRoot,n)},dZ.prototype._getOverlayContainer=function(e,t){var n=Object(WU["find"])(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},dZ.prototype._addOverlay=function(e){var t,n,i=e.id,o=e.element,r=e.html;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),Object(WU["isString"])(r)&&(r=Object(HU["domify"])(r)),n=this._getOverlayContainer(o),t=Object(HU["domify"])('<div class="djs-overlay" data-overlay-id="'+i+'" style="position: absolute">'),t.appendChild(r),e.type&&Object(HU["classes"])(t).add("djs-overlay-"+e.type);var s=this._canvas.findPlane(o),a=this._canvas.getActivePlane();e.plane=s,s!==a&&gZ(t,!1),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},dZ.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=e.plane,o=n&&n.minZoom,r=n&&n.maxZoom,s=e.htmlContainer,a=this._canvas.getActivePlane(),l=!0;(i!==a||n&&(Object(WU["isDefined"])(o)&&o>t.scale||Object(WU["isDefined"])(r)&&r<t.scale))&&(l=!1),gZ(s,l),this._updateOverlayScale(e,t)},dZ.prototype._updateOverlayScale=function(e,t){var n,i,o,r=e.scale,s=e.htmlContainer,a="";!0!==r&&(!1===r?(n=1,i=1):(n=r.min,i=r.max),Object(WU["isDefined"])(n)&&t.scale<n&&(o=(1/t.scale||1)*n),Object(WU["isDefined"])(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),Object(WU["isDefined"])(o)&&(a="scale("+o+","+o+")"),mZ(s,a)},dZ.prototype._updateOverlaysVisibilty=function(e){var t=this;Object(WU["forEach"])(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},dZ.prototype._init=function(){var e=this._eventBus,t=this;function n(e){t._updateRoot(e),t._updateOverlaysVisibilty(e),t.show()}e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){n(e.viewbox)})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element,i=t.get({element:n});Object(WU["forEach"])(i,(function(e){t.remove(e.id)}));var o=t._getOverlayContainer(n);if(o){Object(HU["remove"])(o.html);var r=t._overlayContainers.indexOf(o);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",uZ,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(Object(WU["forEach"])(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&Object(HU["classes"])(n.html)[e.add?"add":"remove"](e.marker)})),e.on("plane.set",(function(e){Object(WU["forEach"])(t._overlays,(function(t){gZ(t.htmlContainer,t.plane===e.plane)}))})),e.on("diagram.clear",this.clear,this)};var bZ={__init__:["overlays"],overlays:["type",dZ]};function vZ(e){h$.call(this,e)}function yZ(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function wZ(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function _Z(e,t){return e=Object(WU["isArray"])(e)?e:[e],-1!==e.indexOf(t.key)||-1!==e.indexOf(t.keyCode)}function CZ(e){return e.shiftKey}FU()(vZ,h$),vZ.prototype._modules=[PX,wX,lZ,bZ],vZ.prototype._moddleExtensions={};var AZ="keyboard.keydown",EZ="keyboard.keyup",xZ="input-handle-modified-keys",SZ=1e3;function kZ(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}function DZ(e){return e&&(Object(HU["matches"])(e,"input, textarea")||"true"===e.contentEditable)}kZ.$inject=["config.keyboard","eventBus"],kZ.prototype._keydownHandler=function(e){this._keyHandler(e,AZ)},kZ.prototype._keyupHandler=function(e){this._keyHandler(e,EZ)},kZ.prototype._keyHandler=function(e,t){var n;if(!this._isEventIgnored(e)){var i={keyEvent:e};n=this._eventBus.fire(t||AZ,i),n&&e.preventDefault()}},kZ.prototype._isEventIgnored=function(e){return DZ(e.target)&&this._isModifiedKeyIgnored(e)},kZ.prototype._isModifiedKeyIgnored=function(e){if(!wZ(e))return!0;var t=this._getAllowedModifiers(e.target);return!t.includes(e.key)},kZ.prototype._getAllowedModifiers=function(e){var t=Object(HU["closest"])(e,"["+xZ+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(xZ).split(",")},kZ.prototype.bind=function(e){this.unbind(),this._node=e,HU["event"].bind(e,"keydown",this._keydownHandler,!0),HU["event"].bind(e,"keyup",this._keyupHandler,!0),this._fire("bind")},kZ.prototype.getBinding=function(){return this._node},kZ.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),HU["event"].unbind(e,"keydown",this._keydownHandler,!0),HU["event"].unbind(e,"keyup",this._keyupHandler,!0)),this._node=null},kZ.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},kZ.prototype.addListener=function(e,t,n){Object(WU["isFunction"])(e)&&(n=t,t=e,e=SZ),this._eventBus.on(n||AZ,e,t)},kZ.prototype.removeListener=function(e,t){this._eventBus.off(t||AZ,e)},kZ.prototype.hasModifier=yZ,kZ.prototype.isCmd=wZ,kZ.prototype.isShift=CZ,kZ.prototype.isKey=_Z;var LZ=500,IZ=67,NZ=86,MZ=89,BZ=90,TZ=["c","C",IZ],OZ=["v","V",NZ],RZ=["y","Y",MZ],PZ=["z","Z",BZ];function FZ(e,t){var n=this;e.on("editorActions.init",LZ,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}FZ.$inject=["eventBus","keyboard"],FZ.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){var n=e.keyEvent;if(wZ(n)&&!CZ(n)&&_Z(PZ,n))return t.trigger("undo"),!0})),n("redo",(function(e){var n=e.keyEvent;if(wZ(n)&&(_Z(RZ,n)||_Z(PZ,n)&&CZ(n)))return t.trigger("redo"),!0})),n("copy",(function(e){var n=e.keyEvent;if(wZ(n)&&_Z(TZ,n))return t.trigger("copy"),!0})),n("paste",(function(e){var n=e.keyEvent;if(wZ(n)&&_Z(OZ,n))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(_Z(["+","Add","="],n)&&wZ(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(_Z(["-","Subtract"],n)&&wZ(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(_Z("0",n)&&wZ(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){var n=e.keyEvent;if(_Z(["Backspace","Delete","Del"],n))return t.trigger("removeSelection"),!0}))};var jZ={__init__:["keyboard","keyboardBindings"],keyboard:["type",kZ],keyboardBindings:["type",FZ]},zZ={moveSpeed:50,moveSpeedAccelerated:200};function VZ(e,t,n){var i=this;function o(e){var n=e.keyEvent,o=i._config;if(t.isCmd(n)&&t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var r,s=t.isShift(n)?o.moveSpeedAccelerated:o.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":r="left";break;case"ArrowUp":case"Up":r="up";break;case"ArrowRight":case"Right":r="right";break;case"ArrowDown":case"Down":r="down";break}return i.moveCanvas({speed:s,direction:r}),!0}}this._config=Object(WU["assign"])({},zZ,e||{}),t.addListener(o),this.moveCanvas=function(e){var t=0,i=0,o=e.speed,r=o/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r;break}n.scroll({dx:t,dy:i})}}VZ.$inject=["config.keyboardMove","keyboard","canvas"];var QZ={__depends__:[jZ],__init__:["keyboardMove"],keyboardMove:["type",VZ]},WZ=/^djs-cursor-.*$/;function HZ(e){var t=Object(HU["classes"])(document.body);t.removeMatching(WZ),e&&t.add("djs-cursor-"+e)}function UZ(){HZ(null)}var YZ=5e3;function GZ(e,t){function n(){return!1}return t=t||"element.click",e.once(t,YZ,n),function(){e.off(t,n)}}function KZ(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function qZ(e,t){return{x:e.x-t.x,y:e.y-t.y}}var JZ=15;function $Z(e,t){var n;function i(i){var o=n.start,r=n.button,s=VX(i),a=qZ(s,o);if(!n.dragging&&XZ(a)>JZ&&(n.dragging=!0,0===r&&GZ(e),HZ("grab")),n.dragging){var l=n.last||n.start;a=qZ(s,l),t.scroll({dx:a.x,dy:a.y}),n.last=s}i.preventDefault()}function o(e){HU["event"].unbind(document,"mousemove",i),HU["event"].unbind(document,"mouseup",o),n=null,UZ()}function r(e){if(!Object(HU["closest"])(e.target,".djs-draggable")){var t=e.button;if(!(t>=2||e.ctrlKey||e.shiftKey||e.altKey))return n={button:t,start:VX(e)},HU["event"].bind(document,"mousemove",i),HU["event"].bind(document,"mouseup",o),!0}}e.on("element.mousedown",500,(function(e){return r(e.originalEvent)})),this.isActive=function(){return!!n}}function XZ(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}$Z.$inject=["eventBus","canvas"];var ZZ={__init__:["moveCanvas"],moveCanvas:["type",$Z]};function e0(e){return Math.log(e)/Math.log(10)}function t0(e,t){var n=e0(e.min),i=e0(e.max),o=Math.abs(n)+Math.abs(i);return o/t}function n0(e,t){return Math.max(e.min,Math.min(e.max,t))}var i0=Math.sign||function(e){return e>=0?1:-1},o0={min:.2,max:4},r0=10,s0=.1,a0=.75;function l0(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Object(WU["bind"])(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||a0;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}l0.$inject=["config.zoomScroll","eventBus","canvas"],l0.prototype.scroll=function(e){this._canvas.scroll(e)},l0.prototype.reset=function(){this._canvas.zoom("fit-viewport")},l0.prototype.zoom=function(e,t){var n=t0(o0,2*r0);this._totalDelta+=e,Math.abs(this._totalDelta)>s0&&(this._zoom(e,t,n),this._totalDelta=0)},l0.prototype._handleWheel=function(e){if(!Object(HU["closest"])(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey,o=e.shiftKey,r=-1*this._scale;if(r*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var s=t.getBoundingClientRect(),a={x:e.clientX-s.left,y:e.clientY-s.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*i0(e.deltaY)*r,this.zoom(n,a)}else n=o?{dx:r*e.deltaY,dy:0}:{dx:r*e.deltaX,dy:r*e.deltaY},this.scroll(n)}},l0.prototype.stepZoom=function(e,t){var n=t0(o0,r0);this._zoom(e,t,n)},l0.prototype._zoom=function(e,t,n){var i=this._canvas,o=e>0?1:-1,r=e0(i.zoom()),s=Math.round(r/n)*n;s+=n*o;var a=Math.pow(10,s);i.zoom(n0(o0,a),t)},l0.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return"undefined"===typeof e&&(e=!i),i!==e&&HU["event"][e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},l0.prototype._init=function(e){this.toggle(e)};var c0={__init__:["zoomScroll"],zoomScroll:["type",l0]};function h0(e){vZ.call(this,e)}FU()(h0,vZ),h0.prototype._navigationModules=[QZ,ZZ,c0],h0.prototype._modules=[].concat(vZ.prototype._modules,h0.prototype._navigationModules);var u0=n("c87e"),d0=n.n(u0),p0=.2,f0=4,g0=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];function m0(){}function b0(e,t){return t.get(e,!1)}function v0(e){e.preventDefault(),"function"===typeof e.stopPropagation?e.stopPropagation():e.srcEvent&&"function"===typeof e.srcEvent.stopPropagation&&e.srcEvent.stopPropagation(),"function"===typeof e.stopImmediatePropagation&&e.stopImmediatePropagation()}function y0(e){function t(t){Object(WU["forEach"])(g0,(function(t){HU["event"].bind(e,t,v0,!0)}))}function n(t){setTimeout((function(){Object(WU["forEach"])(g0,(function(t){HU["event"].unbind(e,t,v0,!0)}))}),500)}HU["event"].bind(e,"touchstart",t,!0),HU["event"].bind(e,"touchend",n,!0),HU["event"].bind(e,"touchcancel",n,!0);var i=new d0.a.Manager(e,{inputClass:d0.a.TouchInput,recognizers:[],domEvents:!0}),o=new d0.a.Tap,r=new d0.a.Pan({threshold:10}),s=new d0.a.Press,a=new d0.a.Pinch,l=new d0.a.Tap({event:"doubletap",taps:2});return a.requireFailure(r),a.requireFailure(s),i.add([r,s,a,l,o]),i.reset=function(e){var t=this.recognizers,n=this.session;n.stopped||(m0("recognizer","stop"),i.stop(e),setTimeout((function(){var e,i;for(m0("recognizer","reset"),e=0;i=t[e];e++)i.reset(),i.state=8;n.curRecognizer=null}),0))},i.on("hammer.input",(function(e){e.srcEvent.defaultPrevented&&i.reset(!0)})),i}function w0(e,t,n,i,o){var r,s=b0("dragging",e),a=b0("move",e),l=b0("contextPad",e),c=b0("palette",e);function h(e){return function(t){m0("element",e,t),o.fire(e,t)}}function u(e){var t=Object(HU["closest"])(e,"svg, .djs-element",!0);return t}function d(e){function n(e){m0("canvas","grab start");var n=0,i=0;function o(e){var o=e.deltaX-n,r=e.deltaY-i;t.scroll({dx:o,dy:r}),n=e.deltaX,i=e.deltaY}function s(e){r.off("panmove",o),r.off("panend",s),r.off("pancancel",s),m0("canvas","grab end")}r.on("panmove",o),r.on("panend",s),r.on("pancancel",s)}function o(e){var o=u(e.target),r=o&&i.get(o);if(a&&t.getRootElement()!==r)return m0("element","move start",r,e,!0),a.start(e,r,!0);n(e)}function s(e){m0("canvas","zoom start");var n=t.zoom(),i=e.center;function o(e){var o=1-(1-e.scale)/1.5,r=Math.max(p0,Math.min(f0,o*n));t.zoom(r,i),v0(e)}function s(e){r.off("pinchmove",o),r.off("pinchend",s),r.off("pinchcancel",s),r.reset(!0),m0("canvas","zoom end")}r.on("pinchmove",o),r.on("pinchend",s),r.on("pinchcancel",s)}r=y0(e),r.on("doubletap",h("element.dblclick")),r.on("tap",h("element.click")),r.on("panstart",o),r.on("press",o),r.on("pinchstart",s)}s&&n.on("drag.move",(function(e){var t=e.originalEvent;if(t&&!(t instanceof MouseEvent)){var n=VX(t),o=document.elementFromPoint(n.x,n.y),r=u(o),a=r&&i.get(r);a!==e.hover&&(e.hover&&s.out(e),a&&(s.hover({element:a,gfx:r}),e.hover=a,e.hoverGfx=r))}})),l&&n.on("contextPad.create",(function(e){var t=e.pad.html,n=y0(t);n.on("panstart",(function(e){m0("context-pad","panstart",e),l.trigger("dragstart",e,!0)})),n.on("press",(function(e){m0("context-pad","press",e),l.trigger("dragstart",e,!0)})),n.on("tap",(function(e){m0("context-pad","tap",e),l.trigger("click",e)}))})),c&&n.on("palette.create",(function(e){var t=e.container,n=y0(t);n.on("panstart",(function(e){m0("palette","panstart",e),c.trigger("dragstart",e,!0)})),n.on("press",(function(e){m0("palette","press",e),c.trigger("dragstart",e,!0)})),n.on("tap",(function(e){m0("palette","tap",e),c.trigger("click",e)}))})),n.on("canvas.init",(function(e){d(e.svg)}))}function _0(e,t){var n=this;t.on("canvas.init",(function(e){n.addBBoxMarker(e.svg)}))}w0.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],_0.$inject=["canvas","eventBus"],_0.prototype.addBBoxMarker=function(e){var t={fill:"none",class:"outer-bound-marker"},n=pY("rect");ZU(n,{x:-1e4,y:1e4,width:10,height:10}),ZU(n,t),GU(e,n);var i=pY("rect");ZU(i,{x:1e4,y:1e4,width:10,height:10}),ZU(i,t),GU(e,i)};var C0={__depends__:[XX],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",w0],touchFix:["type",_0]},A0={__depends__:[C0]};function E0(e){return e&&e[e.length-1]}function x0(e){return e.y}function S0(e){return e.x}var k0={left:S0,center:S0,right:function(e){return e.x+e.width},top:x0,middle:x0,bottom:function(e){return e.y+e.height}};function D0(e){this._modeling=e}D0.$inject=["modeling"],D0.prototype._getOrientationDetails=function(e){var t=["top","bottom","middle"],n="x",i="width";return-1!==t.indexOf(e)&&(n="y",i="height"),{axis:n,dimension:i}},D0.prototype._isType=function(e,t){return-1!==t.indexOf(e)},D0.prototype._alignmentPosition=function(e,t){var n,i,o,r=this._getOrientationDetails(e),s=r.axis,a=r.dimension,l={},c={},h=!1;function u(e,t){return Math.round((e[s]+t[s]+t[a])/2)}if(this._isType(e,["left","top"]))l[e]=t[0][s];else if(this._isType(e,["right","bottom"]))o=E0(t),l[e]=o[s]+o[a];else if(this._isType(e,["center","middle"])){if(Object(WU["forEach"])(t,(function(e){var t=e[s]+Math.round(e[a]/2);c[t]?c[t].elements.push(e):c[t]={elements:[e],center:t}})),n=Object(WU["sortBy"])(c,(function(e){return e.elements.length>1&&(h=!0),e.elements.length})),h)return l[e]=E0(n).center,l;i=t[0],t=Object(WU["sortBy"])(t,(function(e){return e[s]+e[a]})),o=E0(t),l[e]=u(i,o)}return l},D0.prototype.trigger=function(e,t){var n=this._modeling,i=Object(WU["filter"])(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(!(i.length<2)){var o=k0[t],r=Object(WU["sortBy"])(i,o),s=this._alignmentPosition(t,r);n.alignElements(r,s)}};var L0={__init__:["alignElements"],alignElements:["type",D0]},I0=10,N0=50,M0=250;function B0(e,t,n,i){var o;while(o=O0(e,n,t))n=i(t,n,o);return n}function T0(e){return function(t,n,i){var o={x:n.x,y:n.y};return["x","y"].forEach((function(r){var s=e[r];if(s){var a="x"===r?"width":"height",l=s.margin,c=s.minDistance;o[r]=l<0?Math.min(i[r]+l-t[a]/2,n[r]-c+l):Math.max(i[r]+i[a]+l+t[a]/2,n[r]+c+l)}})),o}}function O0(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},o=P0(e,n);return Object(WU["find"])(o,(function(e){if(e===n)return!1;var t=DG(e,i,I0);return"intersect"===t}))}function R0(e,t){function n(t){return t.source===e?1:-1}t||(t={});var i=t.defaultDistance||N0,o=t.direction||"e",r=t.filter,s=t.getWeight||n,a=t.maxDistance||M0,l=t.reference||"start";function c(e,t){return"n"===o?"start"===l?xG(e).top-xG(t).bottom:"center"===l?xG(e).top-kG(t).y:xG(e).top-xG(t).top:"w"===o?"start"===l?xG(e).left-xG(t).right:"center"===l?xG(e).left-kG(t).x:xG(e).left-xG(t).left:"s"===o?"start"===l?xG(t).top-xG(e).bottom:"center"===l?kG(t).y-xG(e).bottom:xG(t).bottom-xG(e).bottom:"start"===l?xG(t).left-xG(e).right:"center"===l?kG(t).x-xG(e).right:xG(t).right-xG(e).right}r||(r=V0);var h=e.incoming.filter(r).map((function(t){var n=s(t),i=n<0?c(t.source,e):c(e,t.source);return{id:t.source.id,distance:i,weight:n}})),u=e.outgoing.filter(r).map((function(t){var n=s(t),i=n>0?c(e,t.target):c(t.target,e);return{id:t.target.id,distance:i,weight:n}})),d=h.concat(u).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),p=Object(WU["reduce"])(d,(function(e,t){var n=t.distance,i=t.weight;return n<0||n>a||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]<e[String(n)])&&(e.distance=n)),e}),{});return p.distance||i}function P0(e){var t=F0(e);return e.host&&(t=t.concat(F0(e.host))),e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(F0(t))}),[]))),t}function F0(e){return z0(e).concat(j0(e))}function j0(e){return e.incoming.map((function(e){return e.source}))}function z0(e){return e.outgoing.map((function(e){return e.target}))}function V0(){return!0}var Q0=100;function W0(e,t,n){e.on("autoPlace",Q0,(function(e){var t=e.shape,n=e.source;return H0(n,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,o){e.fire("autoPlace.start",{source:n,shape:i});var r=e.fire("autoPlace",{source:n,shape:i}),s=t.appendShape(n,i,r,n.parent,o);return e.fire("autoPlace.end",{source:n,shape:s}),s}}function H0(e,t,n){n||(n={});var i=n.defaultDistance||N0,o=kG(e),r=xG(e);return{x:r.right+i+t.width/2,y:o.y}}function U0(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}W0.$inject=["eventBus","modeling","canvas"],U0.$inject=["eventBus","selection"];var Y0={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",W0],autoPlaceSelectionBehavior:["type",U0]};function G0(e,t){return Object(WU["some"])(t,(function(t){return v$(e,t)}))}function K0(e,t){"string"===typeof t&&(t=[t]);while(e=e.parent)if(G0(e,t))return e;return null}function q0(e,t){return v$(t,"bpmn:TextAnnotation")?X0(e,t):G0(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?Z0(e,t):v$(t,"bpmn:FlowNode")?J0(e,t):void 0}function J0(e,t){var n=xG(e),i=kG(e),o=R0(e,{filter:function(e){return v$(e,"bpmn:SequenceFlow")}}),r=30,s=80,a="left";v$(e,"bpmn:BoundaryEvent")&&(a=DG(e,e.host,-25),-1!==a.indexOf("top")&&(r*=-1));var l={x:n.right+o+t.width/2,y:i.y+$0(a,s)},c={y:{margin:r,minDistance:s}};return B0(e,t,l,T0(c))}function $0(e,t){return-1!=e.indexOf("top")?-1*t:-1!=e.indexOf("bottom")?t:0}function X0(e,t){var n=xG(e),i={x:n.right+t.width/2,y:n.top-50-t.height/2},o={y:{margin:-30,minDistance:20}};return B0(e,t,i,T0(o))}function Z0(e,t){var n=xG(e),i={x:n.right-10+t.width/2,y:n.bottom+40+t.width/2},o={x:{margin:30,minDistance:30}};return B0(e,t,i,T0(o))}function e1(e){e.on("autoPlace",(function(e){var t=e.shape,n=e.source;return q0(n,t)}))}e1.$inject=["eventBus"];var t1={__depends__:[Y0],__init__:["bpmnAutoPlace"],bpmnAutoPlace:["type",e1]},n1=1e3;function i1(e){this._eventBus=e}function o1(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}i1.$inject=["eventBus"],i1.prototype.on=function(e,t,n,i,o,r){if((Object(WU["isFunction"])(t)||Object(WU["isNumber"])(t))&&(r=o,o=i,i=n,n=t,t=null),Object(WU["isFunction"])(n)&&(r=o,o=i,i=n,n=n1),Object(WU["isObject"])(o)&&(r=o,o=!1),!Object(WU["isFunction"])(i))throw new Error("handlerFn must be a function");Object(WU["isArray"])(e)||(e=[e]);var s=this._eventBus;Object(WU["forEach"])(e,(function(e){var a=["commandStack",e,t].filter((function(e){return e})).join(".");s.on(a,n,o?o1(i,r):i,r)}))};var r1=["canExecute","preExecute","preExecuted","execute","executed","postExecute","postExecuted","revert","reverted"];function s1(e,t,n,i){i1.call(this,e),this._elementRegistry=t,this._modeling=n,this._rules=i;var o=this;this.postExecuted(["shape.create"],(function(e){var t=e.context,n=t.hints||{},i=t.shape,r=t.parent||t.newParent;!1!==n.autoResize&&o._expand([i],r)})),this.postExecuted(["elements.move"],(function(e){var t=e.context,n=Object(WU["flatten"])(Object(WU["values"])(t.closure.topLevel)),i=t.hints,r=!i||i.autoResize;if(!1!==r){var s=Object(WU["groupBy"])(n,(function(e){return e.parent.id}));Object(WU["forEach"])(s,(function(e,t){Object(WU["isArray"])(r)&&(e=e.filter((function(e){return Object(WU["find"])(r,Object(WU["matchPattern"])({id:e.id}))}))),o._expand(e,t)}))}})),this.postExecuted(["shape.toggleCollapse"],(function(e){var t=e.context,n=t.hints,i=t.shape;n&&!1===n.autoResize||i.collapsed||o._expand(i.children||[],i)})),this.postExecuted(["shape.resize"],(function(e){var t=e.context,n=t.hints,i=t.shape,r=i.parent;n&&!1===n.autoResize||r&&o._expand([i],r)}))}function a1(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}function l1(e,t){var n="";return e=xG(e),t=xG(t),e.top>t.top&&(n=n.concat("n")),e.right<t.right&&(n=n.concat("w")),e.bottom<t.bottom&&(n=n.concat("s")),e.left>t.left&&(n=n.concat("e")),n}function c1(e){e.invoke(s1,this)}function h1(e){i1.call(this,e),this.init()}function u1(e){h1.call(this,e);var t=this;this.addRule("element.autoResize",(function(e){return t.canResize(e.elements,e.target)}))}function d1(e,t){u1.call(this,e),this._modeling=t}Object(WU["forEach"])(r1,(function(e){i1.prototype[e]=function(t,n,i,o,r){(Object(WU["isFunction"])(t)||Object(WU["isNumber"])(t))&&(r=o,o=i,i=n,n=t,t=null),this.on(t,e,n,i,o,r)}})),s1.$inject=["eventBus","elementRegistry","modeling","rules"],FU()(s1,i1),s1.prototype._getOptimalBounds=function(e,t){var n=this.getOffset(t),i=this.getPadding(t),o=xG(tG(e)),r=xG(t),s={};return o.top-r.top<i.top&&(s.top=o.top-n.top),o.left-r.left<i.left&&(s.left=o.left-n.left),r.right-o.right<i.right&&(s.right=o.right+n.right),r.bottom-o.bottom<i.bottom&&(s.bottom=o.bottom+n.bottom),SG(Object(WU["assign"])({},r,s))},s1.prototype._expand=function(e,t){"string"===typeof t&&(t=this._elementRegistry.get(t));var n=this._rules.allowed("element.autoResize",{elements:e,target:t});if(n){var i=this._getOptimalBounds(e,t);if(a1(i,t)){var o=l1(Object(WU["pick"])(t,["x","y","width","height"]),i);this.resize(t,i,{autoResize:o});var r=t.parent;r&&this._expand([t],r)}}},s1.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},s1.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},s1.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},c1.$inject=["injector"],FU()(c1,s1),c1.prototype.resize=function(e,t,n){v$(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)},h1.$inject=["eventBus"],FU()(h1,i1),h1.prototype.addRule=function(e,t,n){var i=this;"string"===typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},h1.prototype.init=function(){},u1.$inject=["eventBus"],FU()(u1,h1),u1.prototype.canResize=function(e,t){return!1},FU()(d1,u1),d1.$inject=["eventBus","modeling"],d1.prototype.canResize=function(e,t){if(!v$(t,"bpmn:Participant")&&!v$(t,"bpmn:Lane")&&!v$(t,"bpmn:SubProcess"))return!1;var n=!0;return Object(WU["forEach"])(e,(function(e){(v$(e,"bpmn:Lane")||e.labelTarget)&&(n=!1)})),n};var p1={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",c1],bpmnAutoResizeProvider:["type",d1]},f1=1500;function g1(e,t,n){var i=this,o=n.get("dragging",!1);function r(t){if(!t.hover){var n=t.originalEvent,r=i._findTargetGfx(n),s=r&&e.get(r);r&&s&&(t.stopPropagation(),o.hover({element:s,gfx:r}),o.move(n))}}o&&t.on("drag.start",(function(e){t.once("drag.move",f1,(function(e){r(e)}))})),function(){var e,n;t.on("element.hover",(function(t){e=t.gfx,n=t.element})),t.on("element.hover",f1,(function(i){n&&t.fire("element.out",{element:n,gfx:e})})),t.on("element.out",(function(){e=null,n=null}))}(),this._findTargetGfx=function(e){var t,n;if(e instanceof MouseEvent)return t=VX(e),n=document.elementFromPoint(t.x,t.y),m1(n)}}function m1(e){return Object(HU["closest"])(e,"svg, .djs-element",!0)}g1.$inject=["elementRegistry","eventBus","injector"];var b1={__init__:["hoverFix"],hoverFix:["type",g1]},v1=Math.round,y1="djs-drag-active";function w1(e){e.preventDefault()}function _1(e){return"undefined"!==typeof TouchEvent&&e instanceof TouchEvent}function C1(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function A1(e,t,n,i){var o,r={threshold:5,trapClick:!0};function s(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function a(t,n){n=n||o;var i=e.createEvent(Object(WU["assign"])({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function l(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}function c(e,i){var r=o.payload,l=o.displacement,c=o.globalStart,h=VX(e),u=qZ(h,c),d=o.localStart,p=s(h),f=qZ(p,d);if(!o.active&&(i||C1(u)>o.threshold)){if(Object(WU["assign"])(r,{x:v1(d.x+l.x),y:v1(d.y+l.y),dx:0,dy:0},{originalEvent:e}),!1===a("start"))return m();o.active=!0,o.keepSelection||(r.previousSelection=n.get(),n.select(null)),o.cursor&&HZ(o.cursor),t.addMarker(t.getRootElement(),y1)}zX(e),o.active&&(Object(WU["assign"])(r,{x:v1(p.x+l.x),y:v1(p.y+l.y),dx:v1(f.x),dy:v1(f.y)},{originalEvent:e}),a("move"))}function h(e){var t,n=!0;o.active&&(e&&(o.payload.originalEvent=e,zX(e)),n=a("end")),!1===n&&a("rejected"),t=b(!0!==n),a("ended",t)}function u(e){27===e.which&&(w1(e),m())}function d(t){var n;o.active&&(n=GZ(e),setTimeout(n,400),w1(t)),h(t)}function p(e){c(e)}function f(e){var t=o.payload;t.hoverGfx=e.gfx,t.hover=e.element,a("hover")}function g(e){a("out");var t=o.payload;t.hoverGfx=null,t.hover=null}function m(e){var t;if(o){var n=o.active;n&&a("cancel"),t=b(e),n&&a("canceled",t)}}function b(i){var r,s;a("cleanup"),UZ(),s=o.trapClick?d:h,HU["event"].unbind(document,"mousemove",c),HU["event"].unbind(document,"dragstart",w1),HU["event"].unbind(document,"selectstart",w1),HU["event"].unbind(document,"mousedown",s,!0),HU["event"].unbind(document,"mouseup",s,!0),HU["event"].unbind(document,"keyup",u),HU["event"].unbind(document,"touchstart",p,!0),HU["event"].unbind(document,"touchcancel",m,!0),HU["event"].unbind(document,"touchmove",c,!0),HU["event"].unbind(document,"touchend",h,!0),e.off("element.hover",f),e.off("element.out",g),t.removeMarker(t.getRootElement(),y1);var b=o.payload.previousSelection;return!1!==i&&b&&!n.get().length&&l(b),r=o,o=null,r}function v(t,n,i,l){o&&m(!1),"string"===typeof n&&(l=i,i=n,n=null),l=Object(WU["assign"])({},r,l||{});var b,v,y,w,_,C=l.data||{};w=l.trapClick?d:h,t?(b=jX(t)||t,v=VX(t),zX(t),"dragstart"===b.type&&w1(b)):(b=null,v={x:0,y:0}),y=s(v),n||(n=y),_=_1(b),o=Object(WU["assign"])({prefix:i,data:C,payload:{},globalStart:v,displacement:qZ(n,y),localStart:y,isTouch:_},l),l.manual||(_?(HU["event"].bind(document,"touchstart",p,!0),HU["event"].bind(document,"touchcancel",m,!0),HU["event"].bind(document,"touchmove",c,!0),HU["event"].bind(document,"touchend",h,!0)):(HU["event"].bind(document,"mousemove",c),HU["event"].bind(document,"dragstart",w1),HU["event"].bind(document,"selectstart",w1),HU["event"].bind(document,"mousedown",w,!0),HU["event"].bind(document,"mouseup",w,!0)),HU["event"].bind(document,"keyup",u),e.on("element.hover",f),e.on("element.out",g)),a("init"),l.autoActivate&&c(t,!0)}e.on("diagram.destroy",m),this.init=v,this.move=c,this.hover=f,this.out=g,this.end=h,this.cancel=m,this.context=function(){return o},this.setOptions=function(e){Object(WU["assign"])(r,e)}}A1.$inject=["eventBus","canvas","selection","elementRegistry"];var E1={__depends__:[b1,lZ],dragging:["type",A1]};function x1(e,t,n){this._canvas=n,this._opts=Object(WU["assign"])({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function S1(e,t,n){return t<e&&e<n}x1.$inject=["config.autoScroll","eventBus","canvas"],x1.prototype.startScroll=function(e){var t=this._canvas,n=this._opts,i=this,o=t.getContainer().getBoundingClientRect(),r=[e.x,e.y,o.width-e.x,o.height-e.y];this.stopScroll();for(var s=0,a=0,l=0;l<4;l++)S1(r[l],n.scrollThresholdOut[l],n.scrollThresholdIn[l])&&(0===l?s=n.scrollStep:1==l?a=n.scrollStep:2==l?s=-n.scrollStep:3==l&&(a=-n.scrollStep));0===s&&0===a||(t.scroll({dx:s,dy:a}),this._scrolling=setTimeout((function(){i.startScroll(e)}),n.scrollRepeatTimeout))},x1.prototype.stopScroll=function(){clearTimeout(this._scrolling)},x1.prototype.setOptions=function(e){this._opts=Object(WU["assign"])({},this._opts,e)},x1.prototype._toBorderPoint=function(e){var t=this._canvas._container.getBoundingClientRect(),n=VX(e.originalEvent);return{x:n.x-t.left,y:n.y-t.top}};var k1={__depends__:[E1],__init__:["autoScroll"],autoScroll:["type",x1]};function D1(e){this._commandStack=e.get("commandStack",!1)}D1.$inject=["injector"],D1.prototype.allowed=function(e,t){var n=!0,i=this._commandStack;return i&&(n=i.canExecute(e,t)),void 0===n||n};var L1={__init__:["rules"],rules:["type",D1]},I1=Math.round,N1=Math.max;function M1(e,t){var n=e.x,i=e.y;return[["M",n,i],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}function B1(e){var t=[];return e.forEach((function(e,n){t.push([0===n?"M":"L",e.x,e.y])})),t}var T1=10;function O1(e,t){var n,i;for(n=0;i=e[n];n++)if(pG(i,t)<=T1)return{point:e[n],bendpoint:!0,index:n};return null}function R1(e,t){var n,i=CG()(M1(t,T1),B1(e)),o=i[0],r=i[i.length-1];return o?o!==r?o.segment2!==r.segment2?(n=N1(o.segment2,r.segment2)-1,{point:e[n],bendpoint:!0,index:n}):{point:{x:I1(o.x+r.x)/2,y:I1(o.y+r.y)/2},index:o.segment2}:{point:{x:I1(o.x),y:I1(o.y)},index:o.segment2}:null}function P1(e,t){return O1(e,t)||R1(e,t)}var F1="djs-bendpoint",j1="djs-segment-dragger";function z1(e,t){var n,i=VX(t),o=e._container.getBoundingClientRect();n={x:o.left,y:o.top};var r=e.viewbox();return{x:r.x+(i.x-n.x)/r.scale,y:r.y+(i.y-n.y)/r.scale}}function V1(e,t,n){var i=z1(e,n),o=P1(t,i);return o}function Q1(e,t){var n=pY("g");oY(n).add(F1),GU(e,n);var i=pY("circle");ZU(i,{cx:0,cy:0,r:4}),oY(i).add("djs-visual"),GU(n,i);var o=pY("circle");return ZU(o,{cx:0,cy:0,r:10}),oY(o).add("djs-hit"),GU(n,o),t&&oY(n).add(t),n}function W1(e,t,n,i){var o=pY("g");GU(e,o);var r=14,s=3,a=11,l=Y1(t,n,i),c=s+a,h=pY("rect");ZU(h,{x:-r/2,y:-s/2,width:r,height:s}),oY(h).add("djs-visual"),GU(o,h);var u=pY("rect");return ZU(u,{x:-l/2,y:-c/2,width:l,height:c}),oY(u).add("djs-hit"),GU(o,u),bK(o,"v"===i?90:0,0,0),o}function H1(e,t,n){var i=pY("g"),o=wG(t,n),r=mG(t,n);return GU(e,i),W1(i,t,n,r),oY(i).add(j1),oY(i).add("h"===r?"horizontal":"vertical"),mK(i,o.x,o.y),i}function U1(e){return Math.abs(Math.round(2*e/3))}function Y1(e,t,n){var i=t.x-e.x,o=t.y-e.y;return U1("h"===n?i:o)}var G1=n("f192"),K1=n.n(G1);function q1(e,t,n,i,o){function r(e,t,n){var i,o,r,s,a,l,c=e.index,h=e.point;return!(c<=0||e.bendpoint)&&(i=t[c-1],o=t[c],r=wG(i,o),s=mG(i,o),a=Math.abs(h.x-r.x),l=Math.abs(h.y-r.y),s&&a<=n&&l<=n)}function s(e,t){var n,i,o,r,s=e.waypoints;return t.index<=0||t.bendpoint?null:(n={start:s[t.index-1],end:s[t.index]},i=mG(n.start,n.end),i?(o="h"===i?n.end.x-n.start.x:n.end.y-n.start.y,r=U1(o)/2,r):null)}function a(e,n){var a,l=n.waypoints,c=V1(t,l,e);if(c)return a=s(n,c),r(c,l,a)?o.start(e,n,c.index):i.start(e,n,c.index,!c.bendpoint),!0}function l(e,t,i){HU["event"].bind(e,t,(function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()}))}function c(e,n){var i=t.getLayer("overlays"),o=Object(HU["query"])('.djs-bendpoints[data-element-id="'+K1()(e.id)+'"]',i);return!o&&n&&(o=pY("g"),ZU(o,{"data-element-id":e.id}),oY(o).add("djs-bendpoints"),GU(i,o),l(o,"mousedown",e),l(o,"click",e),l(o,"dblclick",e)),o}function h(e,t){return Object(HU["query"])('.djs-segment-dragger[data-segment-idx="'+e+'"]',t)}function u(e,t){t.waypoints.forEach((function(t,n){var i=Q1(e);GU(e,i),mK(i,t.x,t.y)})),Q1(e,"floating")}function d(e,t){for(var n,i,o,r=t.waypoints,s=1;s<r.length;s++)n=r[s-1],i=r[s],mG(n,i)&&(o=H1(e,n,i),ZU(o,{"data-segment-idx":s}),l(o,"mousemove",t))}function p(e){Object(WU["forEach"])(Object(HU["queryAll"])("."+F1,e),(function(e){sY(e)}))}function f(e){Object(WU["forEach"])(Object(HU["queryAll"])("."+j1,e),(function(e){sY(e)}))}function g(e){var t=c(e);return t||(t=c(e,!0),u(t,e),d(t,e)),t}function m(e){var t=c(e);t&&(f(t),p(t),d(t,e),u(t,e))}function b(e,t){var n=Object(HU["query"])(".floating",e),i=t.point;n&&mK(n,i.x,i.y)}function v(e,t,n){var i,o,r=h(t.index,e),s=n[t.index-1],a=n[t.index],l=t.point,c=wG(s,a),u=mG(s,a);r&&(i=J1(r),o={x:l.x-c.x,y:l.y-c.y},"v"===u&&(o={x:o.y,y:o.x}),mK(i,o.x,o.y))}e.on("connection.changed",(function(e){m(e.element)})),e.on("connection.remove",(function(e){var t=c(e.element);t&&sY(t)})),e.on("element.marker.update",(function(e){var t,n=e.element;n.waypoints&&(t=g(n),e.add?oY(t).add(e.marker):oY(t).remove(e.marker))})),e.on("element.mousemove",(function(e){var n,i,o=e.element,r=o.waypoints;if(r){if(n=c(o,!0),i=V1(t,r,e.originalEvent),!i)return;b(n,i),i.bendpoint||v(n,i,r)}})),e.on("element.mousedown",(function(e){if(HX(e)){var t=e.originalEvent,n=e.element;if(n.waypoints)return a(t,n)}})),e.on("selection.changed",(function(e){var t=e.newSelection,n=t[0];n&&n.waypoints&&g(n)})),e.on("element.hover",(function(e){var t=e.element;t.waypoints&&(g(t),n.registerEvent(e.gfx,"mousemove","element.mousemove"))})),e.on("element.out",(function(e){n.unregisterEvent(e.gfx,"mousemove","element.mousemove")})),e.on("element.updateId",(function(e){var t=e.element,n=e.newId;if(t.waypoints){var i=c(t);i&&ZU(i,{"data-element-id":n})}})),this.addHandles=g,this.updateHandles=m,this.getBendpointsContainer=c,this.getSegmentDragger=h}function J1(e){return Object(HU["query"])(".djs-visual",e)}q1.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];var $1=Math.round,X1="reconnectStart",Z1="reconnectEnd",e2="updateWaypoints";function t2(e,t,n,i,o,r){this._injector=e,this.start=function(e,t,r,s){var a,l=n.getGraphics(t),c=t.source,h=t.target,u=t.waypoints;a=s||0!==r?s||r!==u.length-1?e2:Z1:X1;var d=a===e2?"connection.updateWaypoints":"connection.reconnect",p=o.allowed(d,{connection:t,source:c,target:h});!1===p&&(p=o.allowed(d,{connection:t,source:h,target:c})),!1!==p&&i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:l,context:{allowed:p,bendpointIndex:r,connection:t,source:c,target:h,insert:s,type:a}}})},t.on("bendpoint.move.hover",(function(e){var t,n=e.context,i=n.connection,r=i.source,s=i.target,a=e.hover,l=n.type;if(n.hover=a,a){var c=l===e2?"connection.updateWaypoints":"connection.reconnect";if(t=n.allowed=o.allowed(c,{connection:i,source:l===X1?a:r,target:l===Z1?a:s}),t)return n.source=l===X1?a:r,void(n.target=l===Z1?a:s);!1===t&&(t=n.allowed=o.allowed(c,{connection:i,source:l===Z1?a:s,target:l===X1?a:r})),t&&(n.source=l===Z1?a:s,n.target=l===X1?a:r)}})),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],(function(e){var t=e.context,n=t.type;t.hover=null,t.source=null,t.target=null,n!==e2&&(t.allowed=!1)})),t.on("bendpoint.move.end",(function(e){var t=e.context,n=t.allowed,i=t.bendpointIndex,o=t.connection,s=t.insert,a=o.waypoints.slice(),l=t.source,c=t.target,h=t.type,u=t.hints||{},d={x:$1(e.x),y:$1(e.y)};if(!n)return!1;h===e2?(s?a.splice(i,0,d):a[i]=d,u.bendpointMove={insert:s,bendpointIndex:i},a=this.cropWaypoints(o,a),r.updateWaypoints(o,NG(a),u)):(h===X1?(u.docking="source",n2(t)&&(u.docking="target",u.newWaypoints=a.reverse())):h===Z1&&(u.docking="target",n2(t)&&(u.docking="source",u.newWaypoints=a.reverse())),r.reconnect(o,l,c,d,u))}),this)}function n2(e){var t=e.hover,n=e.source,i=e.target,o=e.type;return o===X1?t&&i&&t===i&&n!==i:o===Z1?t&&n&&t===n&&n!==i:void 0}t2.$inject=["injector","eventBus","canvas","dragging","rules","modeling"],t2.prototype.cropWaypoints=function(e,t){var n=this._injector.get("connectionDocking",!1);if(!n)return t;var i=e.waypoints;return e.waypoints=t,e.waypoints=n.getCroppedWaypoints(e),t=e.waypoints,e.waypoints=i,t};var i2="reconnectStart",o2="reconnectEnd",r2="updateWaypoints",s2="connect-ok",a2="connect-not-ok",l2="connect-hover",c2="djs-updating",h2="djs-element-hidden",u2=1100;function d2(e,t,n,i){this._injector=t;var o=t.get("connectionPreview",!1);n.on("bendpoint.move.start",(function(e){var t=e.context,n=t.bendpointIndex,o=t.connection,r=t.insert,s=o.waypoints,a=s.slice();t.waypoints=s,r&&a.splice(n,0,{x:e.x,y:e.y}),o.waypoints=a;var l=t.draggerGfx=Q1(i.getLayer("overlays"));oY(l).add("djs-dragging"),i.addMarker(o,h2),i.addMarker(o,c2)})),n.on("bendpoint.move.hover",(function(e){var t=e.context,n=t.allowed,o=t.hover,r=t.type;if(o){if(i.addMarker(o,l2),r===r2)return;n?(i.removeMarker(o,a2),i.addMarker(o,s2)):!1===n&&(i.removeMarker(o,s2),i.addMarker(o,a2))}})),n.on(["bendpoint.move.out","bendpoint.move.cleanup"],u2,(function(e){var t=e.context,n=t.hover,o=t.target;n&&(i.removeMarker(n,l2),i.removeMarker(n,o?s2:a2))})),n.on("bendpoint.move.move",(function(t){var n=t.context,i=n.allowed,r=n.bendpointIndex,s=n.draggerGfx,a=n.hover,l=n.type,c=n.connection,h=c.source,u=c.target,d=c.waypoints.slice(),p={x:t.x,y:t.y},f=n.hints||{},g={};o&&(f.connectionStart&&(g.connectionStart=f.connectionStart),f.connectionEnd&&(g.connectionEnd=f.connectionEnd),l===i2?n2(n)?(g.connectionEnd=g.connectionEnd||p,g.source=u,g.target=a||h,d=d.reverse()):(g.connectionStart=g.connectionStart||p,g.source=a||h,g.target=u):l===o2?n2(n)?(g.connectionStart=g.connectionStart||p,g.source=a||u,g.target=h,d=d.reverse()):(g.connectionEnd=g.connectionEnd||p,g.source=h,g.target=a||u):(g.noCropping=!0,g.noLayout=!0,d[r]=p),l===r2&&(d=e.cropWaypoints(c,d)),g.waypoints=d,o.drawPreview(n,i,g)),mK(s,t.x,t.y)}),this),n.on(["bendpoint.move.end","bendpoint.move.cancel"],u2,(function(e){var t=e.context,n=t.connection,r=t.draggerGfx,s=t.hover,a=t.target,l=t.waypoints;n.waypoints=l,sY(r),i.removeMarker(n,c2),i.removeMarker(n,h2),s&&(i.removeMarker(s,s2),i.removeMarker(s,a?s2:a2)),o&&o.cleanUp(t)}))}d2.$inject=["bendpointMove","injector","eventBus","canvas"];var p2="connect-hover",f2="djs-updating";function g2(e,t,n){return m2(e,t,e[t]+n)}function m2(e,t,n){return{x:"x"===t?n:e.x,y:"y"===t?n:e.y}}function b2(e,t,n,i){var o=Math.max(t[i],n[i]),r=Math.min(t[i],n[i]),s=20,a=Math.min(Math.max(r+s,e[i]),o-s);return m2(t,i,a)}function v2(e){return"x"===e?"y":"x"}function y2(e,t,n){var i,o;return e.original?e.original:(i=kG(t),o=v2(n),m2(e,o,i[o]))}function w2(e,t,n,i,o,r){var s=e.get("connectionDocking",!1);function a(e,t){if(!s)return t;var n,i=e.waypoints;return e.waypoints=t,n=s.getCroppedWaypoints(e),e.waypoints=i,n}function l(e){o.update("connection",e.connection,e.connectionGfx)}function c(e,t,n){var i=e.newWaypoints,o=e.segmentStartIndex+t,r=i[o],s=e.segmentEndIndex+t,a=i[s],l=v2(e.axis),c=b2(n,r,a,l);mK(e.draggerGfx,c.x,c.y)}function h(e,t){var n=0,i=e.filter((function(i,o){return!fG(e[o-1],e[o+1],i)||(n=o<=t?n-1:n,!1)}));return{waypoints:i,segmentOffset:n}}this.start=function(e,t,o){var r,s,a,l,c=n.getGraphics(t),h=o-1,u=o,d=t.waypoints,p=d[h],f=d[u],g=V1(n,d,e);s=mG(p,f),s&&(a="v"===s?"x":"y",0===h&&(p=y2(p,t.source,a)),u===d.length-1&&(f=y2(f,t.target,a)),l=g?g.point:{x:(p.x+f.x)/2,y:(p.y+f.y)/2},r={connection:t,segmentStartIndex:h,segmentEndIndex:u,segmentStart:p,segmentEnd:f,axis:a,dragPosition:l},i.init(e,l,"connectionSegment.move",{cursor:"x"===a?"resize-ew":"resize-ns",data:{connection:t,connectionGfx:c,context:r}}))},t.on("connectionSegment.move.start",(function(e){var t=e.context,i=e.connection,o=n.getLayer("overlays");t.originalWaypoints=i.waypoints.slice(),t.draggerGfx=H1(o,t.segmentStart,t.segmentEnd),oY(t.draggerGfx).add("djs-dragging"),n.addMarker(i,f2)})),t.on("connectionSegment.move.move",(function(e){var t,n,i=e.context,o=i.connection,r=i.segmentStartIndex,s=i.segmentEndIndex,h=i.segmentStart,u=i.segmentEnd,d=i.axis,p=i.originalWaypoints.slice(),f=g2(h,d,e["d"+d]),g=g2(u,d,e["d"+d]),m=p.length,b=0;p[r]=f,p[s]=g,r<2&&(t=DG(o.source,f),1===r?"intersect"===t&&(p.shift(),p[0]=f,b--):"intersect"!==t&&(p.unshift(h),b++)),s>m-3&&(n=DG(o.target,g),s===m-2?"intersect"===n&&(p.pop(),p[p.length-1]=g):"intersect"!==n&&p.push(u)),i.newWaypoints=o.waypoints=a(o,p),c(i,b,e),i.newSegmentStartIndex=r+b,l(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,p2)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,p2)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&sY(t.draggerGfx),n.removeMarker(i,f2)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context,n=t.connection;n.waypoints=t.originalWaypoints,l(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,o=t.newSegmentStartIndex;i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}}));var s=h(i,o),l=s.waypoints,c=a(n,l),u=s.segmentOffset,d={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:o+u}};r.updateWaypoints(n,c,d)}))}w2.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var _2=Math.abs,C2=Math.round;function A2(e,t,n){var i,o;for(n=void 0===n?10:n,i=0;i<t.length;i++)if(o=t[i],_2(o-e)<=n)return o}function E2(e){return{x:e.x,y:e.y}}function x2(e){return{x:e.x+e.width,y:e.y+e.height}}function S2(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:C2(e.x+e.width/2),y:C2(e.y+e.height/2)}}function k2(e,t){var n=e.snapped;return!!n&&("string"===typeof t?n[t]:n.x&&n.y)}function D2(e,t,n){if("string"!==typeof t)throw new Error("axis must be in [x, y]");if("number"!==typeof n&&!1!==n)throw new Error("value must be Number or false");var i,o=e[t],r=e.snapped=e.snapped||{};return!1===n?r[t]=!1:(r[t]=!0,i=n-o,e[t]+=i,e["d"+t]+=i),o}function L2(e){return e.children||[]}var I2=Math.abs,N2=Math.round,M2=10;function B2(e){function t(e,t){if(Object(WU["isArray"])(e)){var n=e.length;while(n--)if(I2(e[n]-t)<=M2)return e[n]}else{e=+e;var i=t%e;if(i<M2)return t-i;if(i>e-M2)return t-i+e}return t}function n(e){if(e.width)return{x:N2(e.width/2+e.x),y:N2(e.height/2+e.y)}}function i(e){var t=e.snapPoints,i=e.connection,o=i.waypoints,r=e.segmentStart,s=e.segmentStartIndex,a=e.segmentEnd,l=e.segmentEndIndex,c=e.axis;if(t)return t;var h=[o[s-1],r,a,o[l+1]];return s<2&&h.unshift(n(i.source)),l>o.length-3&&h.unshift(n(i.target)),e.snapPoints=t={horizontal:[],vertical:[]},Object(WU["forEach"])(h,(function(e){e&&(e=e.original||e,"y"===c&&t.horizontal.push(e.y),"x"===c&&t.vertical.push(e.x))})),t}function o(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var o=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},Object(WU["forEach"])(o,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}e.on("connectionSegment.move.move",1500,(function(e){var n,o,r=e.context,s=i(r),a=e.x,l=e.y;if(s){n=t(s.vertical,a),o=t(s.horizontal,l);var c=a-n,h=l-o;Object(WU["assign"])(e,{dx:e.dx-c,dy:e.dy-h,x:n,y:o}),(c||-1!==s.vertical.indexOf(a))&&D2(e,"x",n),(h||-1!==s.horizontal.indexOf(l))&&D2(e,"y",o)}})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,s=e.context,a=o(s),l=s.hover,c=l&&n(l),h=e.x,u=e.y;if(a){i=t(c?a.vertical.concat([c.x]):a.vertical,h),r=t(c?a.horizontal.concat([c.y]):a.horizontal,u);var d=h-i,p=u-r;Object(WU["assign"])(e,{dx:e.dx-d,dy:e.dy-p,x:e.x-d,y:e.y-p}),(d||-1!==a.vertical.indexOf(h))&&D2(e,"x",i),(p||-1!==a.horizontal.indexOf(u))&&D2(e,"y",r)}}))}B2.$inject=["eventBus"];var T2={__depends__:[E1,L1],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",q1],bendpointMove:["type",t2],bendpointMovePreview:["type",d2],connectionSegmentMove:["type",w2],bendpointSnapping:["type",B2]};function O2(e,t,n,i){function o(e,t){return i.allowed("connection.create",{source:e,target:t})}function r(e,t){return o(t,e)}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,s=e.hover;if(n.hover=s,t=n.canExecute=o(i,s),!Object(WU["isNil"])(t)){if(!1!==t)return n.source=i,void(n.target=s);t=n.canExecute=r(i,s),Object(WU["isNil"])(t)||!1!==t&&(n.source=s,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,o=t.connectionStart,r={x:e.x,y:e.y},s=t.source,a=t.target;if(!i)return!1;var l=null,c={connectionStart:R2(t)?r:o,connectionEnd:R2(t)?o:r};Object(WU["isObject"])(i)&&(l=i),n.connect(s,a,l,c)})),this.start=function(e,n,i,o){Object(WU["isObject"])(i)||(o=i,i=kG(n)),t.init(e,"connect",{autoActivate:o,data:{shape:n,context:{start:n,connectionStart:i}}})}}function R2(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}O2.$inject=["eventBus","dragging","modeling","rules"];var P2=1100,F2=900,j2="connect-ok",z2="connect-not-ok";function V2(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,o=t.hover,r=t.source,s=t.start,a=t.startPosition,l=t.target,c=t.connectionStart||a,h=t.connectionEnd||{x:e.x,y:e.y},u=c,d=h;R2(t)&&(u=h,d=c),i.drawPreview(t,n,{source:r||s,target:l||o,connectionStart:u,connectionEnd:d})})),t.on("connect.hover",F2,(function(e){var t=e.context,i=e.hover,o=t.canExecute;null!==o&&n.addMarker(i,o?j2:z2)})),t.on(["connect.out","connect.cleanup"],P2,(function(e){var t=e.hover;t&&(n.removeMarker(t,j2),n.removeMarker(t,z2))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}V2.$inject=["injector","eventBus","canvas"];var Q2={__depends__:[lZ,L1,E1],__init__:["connectPreview"],connect:["type",O2],connectPreview:["type",V2]},W2="djs-connection-preview";function H2(e,t,n,i){this._canvas=t,this._graphicsFactory=n,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}function U2(e){var t={};return function(n){var i=JSON.stringify(n),o=t[i];return o||(o=t[i]=e.apply(null,arguments)),o}}function Y2(e){return Object(WU["isObject"])(e)?e:{}}H2.$inject=["injector","canvas","graphicsFactory","elementFactory"],H2.prototype.drawPreview=function(e,t,n){n=n||{};var i,o=e.connectionPreviewGfx,r=e.getConnection,s=n.source,a=n.target,l=n.waypoints,c=n.connectionStart,h=n.connectionEnd,u=n.noLayout,d=n.noCropping,p=n.noNoop,f=this;o||(o=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),aY(o),r||(r=e.getConnection=U2((function(e,t,n){return f.getConnection(e,t,n)}))),t&&(i=r(t,s,a)),i?(i.waypoints=l||[],this._layouter&&!u&&(i.waypoints=this._layouter.layoutConnection(i,{source:s,target:a,connectionStart:c,connectionEnd:h,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[s?kG(s):c,a?kG(a):h]),this._connectionDocking&&(s||a)&&!d&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,s,a)),this._graphicsFactory.drawConnection(o,i)):!p&&this.drawNoopPreview(o,n)},H2.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,o=t.connectionStart||kG(n),r=t.connectionEnd||kG(i),s=this.cropWaypoints(o,r,n,i),a=this.createNoopConnection(s[0],s[1]);GU(e,a)},H2.prototype.cropWaypoints=function(e,t,n,i){var o=this._graphicsFactory,r=n&&o.getShapePath(n),s=i&&o.getShapePath(i),a=o.getConnectionPath({waypoints:[e,t]});return e=n&&LG(r,a,!0)||e,t=i&&LG(s,a,!1)||t,[e,t]},H2.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&sY(e.connectionPreviewGfx)},H2.prototype.getConnection=function(e){var t=Y2(e);return this._elementFactory.createConnection(t)},H2.prototype.createConnectionPreviewGfx=function(){var e=pY("g");return ZU(e,{pointerEvents:"none"}),oY(e).add(W2),GU(this._canvas.getActiveLayer(),e),e},H2.prototype.createNoopConnection=function(e,t){var n=pY("polyline");return ZU(n,{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"}),ZU(n,{points:[e.x,e.y,t.x,t.y]}),n};var G2={__init__:["connectionPreview"],connectionPreview:["type",H2]},K2=Math.min,q2=Math.max;function J2(e){e.preventDefault()}function $2(e){e.stopPropagation()}function X2(e){return e.nodeType===Node.TEXT_NODE}function Z2(e){return[].slice.call(e)}function e4(e){this.container=e.container,this.parent=Object(HU["domify"])('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),this.content=Object(HU["query"])("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=Object(WU["bind"])(this.autoResize,this),this.handlePaste=Object(WU["bind"])(this.handlePaste,this)}function t4(e){return e.replace(/\r\n|\r|\n/g,"\n")}function n4(e,t){this._eventBus=e,this._providers=[],this._textbox=new e4({container:t.getContainer(),keyHandler:Object(WU["bind"])(this._handleKey,this),resizeHandler:Object(WU["bind"])(this._handleResize,this)})}e4.prototype.create=function(e,t,n,i){var o=this,r=this.parent,s=this.content,a=this.container;i=this.options=i||{},t=this.style=t||{};var l=Object(WU["pick"])(t,["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);Object(WU["assign"])(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},l);var c=Object(WU["pick"])(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return Object(WU["assign"])(s.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&Object(WU["assign"])(s.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),s.innerText=n,HU["event"].bind(s,"keydown",this.keyHandler),HU["event"].bind(s,"mousedown",$2),HU["event"].bind(s,"paste",o.handlePaste),i.autoResize&&HU["event"].bind(s,"input",this.autoResize),i.resizable&&this.resizable(t),a.appendChild(r),this.setSelection(s.lastChild,s.lastChild&&s.lastChild.length),r},e4.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var o=this.autoResize(i);o&&this.resizeHandler(o)}},e4.prototype.insertText=function(e){e=t4(e);var t=document.execCommand("insertText",!1,e);t||this._insertTextIE(e)},e4.prototype._insertTextIE=function(e){var t,n,i=this.getSelection(),o=i.startContainer,r=i.endContainer,s=i.startOffset,a=i.endOffset,l=i.commonAncestorContainer,c=Z2(l.childNodes);if(X2(l)){var h=o.textContent;o.textContent=h.substring(0,s)+e+h.substring(a),t=o,n=s+e.length}else if(o===this.content&&r===this.content){var u=document.createTextNode(e);this.content.insertBefore(u,c[s]),t=u,n=u.textContent.length}else{var d=c.indexOf(o),p=c.indexOf(r);c.forEach((function(t,n){n===d?t.textContent=o.textContent.substring(0,s)+e+r.textContent.substring(a):n>d&&n<=p&&Object(HU["remove"])(t)})),t=o,n=s+e.length}t&&void 0!==n&&setTimeout((function(){self.setSelection(t,n)}))},e4.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight<e.offsetHeight-n){var i=e.getBoundingClientRect(),o=t.scrollHeight;e.style.height=o+"px",this.resizeHandler({width:i.width,height:i.height,dx:0,dy:o-i.height})}},e4.prototype.resizable=function(){var e=this,t=this.parent,n=this.resizeHandle,i=parseInt(this.style.minWidth)||0,o=parseInt(this.style.minHeight)||0,r=parseInt(this.style.maxWidth)||1/0,s=parseInt(this.style.maxHeight)||1/0;if(!n){var a,l,c,h;n=this.resizeHandle=Object(HU["domify"])('<div class="djs-direct-editing-resize-handle"></div>');var u=function(e){J2(e),$2(e),a=e.clientX,l=e.clientY;var n=t.getBoundingClientRect();c=n.width,h=n.height,HU["event"].bind(document,"mousemove",d),HU["event"].bind(document,"mouseup",p)},d=function(n){J2(n),$2(n);var u=K2(q2(c+n.clientX-a,i),r),d=K2(q2(h+n.clientY-l,o),s);t.style.width=u+"px",t.style.height=d+"px",e.resizeHandler({width:c,height:h,dx:n.clientX-a,dy:n.clientY-l})},p=function(e){J2(e),$2(e),HU["event"].unbind(document,"mousemove",d,!1),HU["event"].unbind(document,"mouseup",p,!1)};HU["event"].bind(n,"mousedown",u)}Object(WU["assign"])(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},e4.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),HU["event"].unbind(t,"keydown",this.keyHandler),HU["event"].unbind(t,"mousedown",$2),HU["event"].unbind(t,"input",this.autoResize),HU["event"].unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Object(HU["remove"])(n)),Object(HU["remove"])(e)},e4.prototype.getValue=function(){return this.content.innerText.trim()},e4.prototype.getSelection=function(){var e=window.getSelection(),t=e.getRangeAt(0);return t},e4.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},n4.$inject=["eventBus","canvas"],n4.prototype.registerProvider=function(e){this._providers.push(e)},n4.prototype.isActive=function(){return!!this._active},n4.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},n4.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},n4.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},n4.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),o=this.getValue(),r=e.context.text;o===r&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,o,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},n4.prototype.getValue=function(){return this._textbox.getValue()},n4.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},n4.prototype._handleResize=function(e){this._fire("resize",e)},n4.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=Object(WU["find"])(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};var i4={__depends__:[XX],__init__:["directEditing"],directEditing:["type",n4]},o4=".entry",r4=1e3;function s4(e,t,n){this._eventBus=t,this._overlays=n;var i=Object(WU["isDefined"])(e&&e.scale)?e.scale:{min:1,max:1.5};this._overlaysConfig={position:{right:-9,top:-6},scale:i},this._current=null,this._init()}function a4(e,t){var n=Object(HU["classes"])(e),i=Object(WU["isArray"])(t)?t:t.split(/\s+/g);i.forEach((function(e){n.add(e)}))}s4.$inject=["config.contextPad","eventBus","overlays"],s4.prototype._init=function(){var e=this._eventBus,t=this;e.on("selection.changed",(function(e){var n=e.newSelection;1===n.length?t.open(n[0]):t.close()})),e.on("elements.delete",(function(e){var n=e.elements;Object(WU["forEach"])(n,(function(e){t.isOpen(e)&&t.close()}))})),e.on("element.changed",(function(e){var n=e.element,i=t._current;i&&i.element===n&&t.open(n,!0)}))},s4.prototype.registerProvider=function(e,t){t||(t=e,e=r4),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},s4.prototype.getEntries=function(e){var t=this._getProviders(),n={};return Object(WU["forEach"])(t,(function(t){var i=t.getContextPadEntries(e);Object(WU["isFunction"])(i)?n=i(n):Object(WU["forEach"])(i,(function(e,t){n[t]=e}))})),n},s4.prototype.trigger=function(e,t,n){var i,o,r,s=this._current.element,a=this._current.entries,l=t.delegateTarget||t.target;if(!l)return t.preventDefault();if(i=a[Object(HU["attr"])(l,"data-action")],o=i.action,r=t.originalEvent||t,Object(WU["isFunction"])(o)){if("click"===e)return o(r,s,n)}else if(o[e])return o[e](r,s,n);t.preventDefault()},s4.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},s4.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},s4.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this.getPad(e),i=n.html;Object(WU["forEach"])(t,(function(e,t){var n,o=e.group||"default",r=Object(HU["domify"])(e.html||'<div class="entry" draggable="true"></div>');Object(HU["attr"])(r,"data-action",t),n=Object(HU["query"])("[data-group="+o+"]",i),n||(n=Object(HU["domify"])('<div class="group" data-group="'+o+'"></div>'),i.appendChild(n)),n.appendChild(r),e.className&&a4(r,e.className),e.title&&Object(HU["attr"])(r,"title",e.title),e.imageUrl&&r.appendChild(Object(HU["domify"])('<img src="'+e.imageUrl+'">'))})),Object(HU["classes"])(i).add("open"),this._current={element:e,pad:n,entries:t},this._eventBus.fire("contextPad.open",{current:this._current})},s4.prototype.getPad=function(e){if(this.isOpen())return this._current.pad;var t=this,n=this._overlays,i=Object(HU["domify"])('<div class="djs-context-pad"></div>'),o=Object(WU["assign"])({html:i},this._overlaysConfig);HU["delegate"].bind(i,o4,"click",(function(e){t.trigger("click",e)})),HU["delegate"].bind(i,o4,"dragstart",(function(e){t.trigger("dragstart",e)})),HU["event"].bind(i,"mousedown",(function(e){e.stopPropagation()})),this._overlayId=n.add(e,"context-pad",o);var r=n.get(this._overlayId);return this._eventBus.fire("contextPad.create",{element:e,pad:r}),r},s4.prototype.close=function(){this.isOpen()&&(this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},s4.prototype.isOpen=function(e){return!!this._current&&(!e||this._current.element===e)};var l4={__depends__:[XX,bZ],contextPad:["type",s4]},c4=["marker-start","marker-mid","marker-end"],h4=["circle","ellipse","line","path","polygon","polyline","rect"];function u4(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i,this._clonedMarkers={};var o=this;t.on("drag.cleanup",(function(){Object(WU["forEach"])(o._clonedMarkers,(function(e){sY(e)})),o._clonedMarkers={}}))}function d4(e,t,n){var i=p4(ZU(e,t));return Object(HU["query"])("marker#"+i,n||document)}function p4(e){return e.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]}function f4(e){return"url(#"+e+")"}function g4(e){return-1!==h4.indexOf(e.nodeName)}u4.$inject=["elementRegistry","eventBus","canvas","styles"],u4.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},u4.prototype.addDragger=function(e,t,n){n=n||this.getGfx(e);var i=lY(n),o=n.getBoundingClientRect();return this._cloneMarkers(pK(i)),ZU(i,this._styles.cls("djs-dragger",[],{x:o.top,y:o.left})),GU(t,i),i},u4.prototype.addFrame=function(e,t){var n=pY("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return GU(t,n),n},u4.prototype._cloneMarkers=function(e){var t=this;if(e.childNodes)for(var n=0;n<e.childNodes.length;n++)t._cloneMarkers(e.childNodes[n]);g4(e)&&c4.forEach((function(n){if(ZU(e,n)){var i=d4(e,n,t._canvas.getContainer());t._cloneMarker(e,i,n)}}))},u4.prototype._cloneMarker=function(e,t,n){var i=t.id,o=this._clonedMarkers[i];if(!o){o=lY(t);var r=i+"-clone";o.id=r,oY(o).add("djs-dragger").add("djs-dragger-marker"),this._clonedMarkers[i]=o;var s=Object(HU["query"])("defs",this._canvas._svg);s||(s=pY("defs"),GU(this._canvas._svg,s)),GU(s,o)}var a=f4(this._clonedMarkers[i].id);ZU(e,n,a)};var m4={__init__:["previewSupport"],previewSupport:["type",u4]},b4="drop-ok",v4="drop-not-ok",y4="attach-ok",w4="new-parent",_4="create",C4=2e3;function A4(e,t,n,i,o){function r(e,t,n,i,r){if(!t)return!1;e=Object(WU["filter"])(e,(function(t){var n=t.labelTarget;return!t.parent&&!(k4(t)&&-1!==e.indexOf(n))}));var s=Object(WU["find"])(e,(function(e){return!x4(e)})),a=!1,l=!1,c=!1;S4(e)&&(a=o.allowed("shape.attach",{position:n,shape:s,target:t})),a||(c=S4(e)?o.allowed("shape.create",{position:n,shape:s,source:i,target:t}):o.allowed("elements.create",{elements:e,position:n,target:t}));var h=r.connectionTarget;return c||a?(s&&i&&(l=o.allowed("connection.create",{source:h===i?s:i,target:h===i?i:s,hints:{targetParent:t,targetAttach:a}})),{attach:a,connect:l}):(null===c||null===a)&&null}function s(t,n){[y4,b4,v4,w4].forEach((function(i){i===n?e.addMarker(t,i):e.removeMarker(t,i)}))}function a(){var e=t.context();e&&e.prefix===_4&&t.cancel()}n.on(["create.move","create.hover"],(function(e){var t=e.context,n=t.elements,i=e.hover,o=t.source,a=t.hints||{};if(!i)return t.canExecute=!1,void(t.target=null);E4(e);var l={x:e.x,y:e.y},c=t.canExecute=i&&r(n,i,l,o,a);i&&null!==c&&(t.target=i,c&&c.attach?s(i,y4):s(i,c?w4:v4))})),n.on(["create.end","create.out","create.cleanup"],(function(e){var t=e.hover;t&&s(t,null)})),n.on("create.end",(function(e){var t=e.context,n=t.source,o=t.shape,r=t.elements,s=t.target,a=t.canExecute,l=a&&a.attach,c=a&&a.connect,h=t.hints||{};if(!1===a||!s)return!1;E4(e);var u={x:e.x,y:e.y};c?o=i.appendShape(n,o,u,s,{attach:l,connection:!0===c?{}:c,connectionTarget:h.connectionTarget}):(r=i.createElements(r,u,s,Object(WU["assign"])({},h,{attach:l})),o=Object(WU["find"])(r,(function(e){return!x4(e)}))),Object(WU["assign"])(t,{elements:r,shape:o}),Object(WU["assign"])(e,{elements:r,shape:o})})),n.on("create.init",(function(){n.on("elements.changed",a),n.once(["create.cancel","create.end"],C4,(function(){n.off("elements.changed",a)}))})),this.start=function(e,n,i){Object(WU["isArray"])(n)||(n=[n]);var o=Object(WU["find"])(n,(function(e){return!x4(e)}));if(o){i=Object(WU["assign"])({elements:n,hints:{},shape:o},i||{}),Object(WU["forEach"])(n,(function(e){Object(WU["isNumber"])(e.x)||(e.x=0),Object(WU["isNumber"])(e.y)||(e.y=0)}));var r=tG(n);Object(WU["forEach"])(n,(function(e){x4(e)&&(e.waypoints=Object(WU["map"])(e.waypoints,(function(e){return{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2}}))),Object(WU["assign"])(e,{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2})})),t.init(e,_4,{cursor:"grabbing",autoActivate:!0,data:{shape:o,elements:n,context:i}})}}}function E4(e){var t=e.context,n=t.createConstraints;n&&(n.left&&(e.x=Math.max(e.x,n.left)),n.right&&(e.x=Math.min(e.x,n.right)),n.top&&(e.y=Math.max(e.y,n.top)),n.bottom&&(e.y=Math.min(e.y,n.bottom)))}function x4(e){return!!e.waypoints}function S4(e){return e&&1===e.length&&!x4(e[0])}function k4(e){return!!e.labelTarget}A4.$inject=["canvas","dragging","eventBus","modeling","rules"];var D4=750;function L4(e,t,n,i,o){function r(e){var t=pY("g");ZU(t,o.cls("djs-drag-group",["no-events"]));var r=pY("g");return e.forEach((function(e){var o;e.hidden||(e.waypoints?(o=n._createContainer("connection",r),n.drawConnection(pK(o),e)):(o=n._createContainer("shape",r),n.drawShape(pK(o),e),mK(o,e.x,e.y)),i.addDragger(e,t,o))})),t}t.on("create.move",D4,(function(t){var n,i=t.hover,o=t.context,s=o.elements,a=o.dragGroup;a||(a=o.dragGroup=r(s)),i?(a.parentNode||(n=e.getActiveLayer(),GU(n,a)),mK(a,t.x,t.y)):sY(a)})),t.on("create.cleanup",(function(e){var t=e.context,n=t.dragGroup;n&&sY(n)}))}L4.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];var I4={__depends__:[E1,m4,L1,lZ],__init__:["create","createPreview"],create:["type",A4],createPreview:["type",L4]},N4="data-id",M4=["contextPad.close","canvas.viewbox.changing","commandStack.changed"],B4=1e3;function T4(e,t,n){var i=Object(WU["isDefined"])(e&&e.scale)?e.scale:{min:1,max:1.5};this._config={scale:i},this._eventBus=t,this._canvas=n,this._providers={},this._current={}}function O4(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}T4.$inject=["config.popupMenu","eventBus","canvas"],T4.prototype.registerProvider=function(e,t,n){n||(n=t,t=B4),this._eventBus.on("popupMenu.getProviders."+e,t,(function(e){e.providers.push(n)}))},T4.prototype.isEmpty=function(e,t){if(!e)throw new Error("element parameter is missing");if(!t)throw new Error("providerId parameter is missing");var n=this._getProviders(t);if(!n)return!0;var i=this._getEntries(e,n),o=this._getHeaderEntries(e,n),r=Object(WU["size"])(i)>0,s=o&&Object(WU["size"])(o)>0;return!r&&!s},T4.prototype.open=function(e,t,n){var i=this._getProviders(t);if(!e)throw new Error("Element is missing");if(!i||!i.length)throw new Error("No registered providers for: "+t);if(!n)throw new Error("the position argument is missing");this.isOpen()&&this.close(),this._emit("open");var o=this._current={className:t,element:e,position:n},r=this._getEntries(e,i),s=this._getHeaderEntries(e,i);o.entries=Object(WU["assign"])({},r,s),o.container=this._createContainer(),Object(WU["size"])(s)&&o.container.appendChild(this._createEntries(s,"djs-popup-header")),Object(WU["size"])(r)&&o.container.appendChild(this._createEntries(r,"djs-popup-body"));var a=this._canvas,l=a.getContainer();this._attachContainer(o.container,l,n.cursor),this._bindAutoClose()},T4.prototype.close=function(){this.isOpen()&&(this._emit("close"),this._unbindAutoClose(),Object(HU["remove"])(this._current.container),this._current.container=null)},T4.prototype.isOpen=function(){return!!this._current.container},T4.prototype.trigger=function(e){e.preventDefault();var t=e.delegateTarget||e.target,n=Object(HU["attr"])(t,N4),i=this._getEntry(n);if(i.action)return i.action.call(null,e,i)},T4.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(t),t.providers},T4.prototype._getEntries=function(e,t){var n={};return Object(WU["forEach"])(t,(function(t){if(t.getPopupMenuEntries){var i=t.getPopupMenuEntries(e);Object(WU["isFunction"])(i)?n=i(n):Object(WU["forEach"])(i,(function(e,t){n[t]=e}))}else Object(WU["forEach"])(t.getEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=Object(WU["omit"])(e,["id"])}))})),n},T4.prototype._getHeaderEntries=function(e,t){var n={};return Object(WU["forEach"])(t,(function(t){if(t.getPopupMenuHeaderEntries){var i=t.getPopupMenuHeaderEntries(e);Object(WU["isFunction"])(i)?n=i(n):Object(WU["forEach"])(i,(function(e,t){n[t]=e}))}else{if(!t.getHeaderEntries)return;Object(WU["forEach"])(t.getHeaderEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=Object(WU["omit"])(e,["id"])}))}})),n},T4.prototype._getEntry=function(e){var t=this._current.entries[e];if(!t)throw new Error("entry not found");return t},T4.prototype._emit=function(e){this._eventBus.fire("popupMenu."+e)},T4.prototype._createContainer=function(){var e=Object(HU["domify"])('<div class="djs-popup">'),t=this._current.position,n=this._current.className;return Object(WU["assign"])(e.style,{position:"absolute",left:t.x+"px",top:t.y+"px",visibility:"hidden"}),Object(HU["classes"])(e).add(n),e},T4.prototype._attachContainer=function(e,t,n){var i=this;HU["delegate"].bind(e,".entry","click",(function(e){i.trigger(e)})),this._updateScale(e),t.appendChild(e),n&&this._assureIsInbounds(e,n)},T4.prototype._updateScale=function(e){var t,n,i=this._canvas.zoom(),o=this._config.scale,r=i;!0!==o&&(!1===o?(t=1,n=1):(t=o.min,n=o.max),Object(WU["isDefined"])(t)&&i<t&&(r=t),Object(WU["isDefined"])(n)&&i>n&&(r=n)),O4(e,"scale("+r+")")},T4.prototype._assureIsInbounds=function(e,t){var n,i,o=this._canvas,r=o._container.getBoundingClientRect(),s=e.offsetLeft,a=e.offsetTop,l=e.scrollWidth,c=e.scrollHeight,h={},u={x:t.x-r.left,y:t.y-r.top};s+l>r.width&&(h.x=!0),a+c>r.height&&(h.y=!0),h.x&&h.y?(n=u.x-l+"px",i=u.y-c+"px"):h.x?(n=u.x-l+"px",i=u.y+"px"):h.y&&u.y<c?(n=u.x+"px",i="10px"):h.y&&(n=u.x+"px",i=u.y-c+"px"),Object(WU["assign"])(e.style,{left:n,top:i},{visibility:"visible","z-index":1e3})},T4.prototype._createEntries=function(e,t){var n=Object(HU["domify"])("<div>"),i=this;return Object(HU["classes"])(n).add(t),Object(WU["forEach"])(e,(function(e,t){var o=i._createEntry(e,t);n.appendChild(o)})),n},T4.prototype._createEntry=function(e,t){var n=Object(HU["domify"])("<div>"),i=Object(HU["classes"])(n);if(i.add("entry"),e.className&&e.className.split(" ").forEach((function(e){i.add(e)})),Object(HU["attr"])(n,N4,t),e.label){var o=Object(HU["domify"])("<span>");o.textContent=e.label,n.appendChild(o)}return e.imageUrl&&n.appendChild(Object(HU["domify"])('<img src="'+e.imageUrl+'" />')),!0===e.active&&i.add("active"),!0===e.disabled&&i.add("disabled"),e.title&&(n.title=e.title),n},T4.prototype._bindAutoClose=function(){this._eventBus.once(M4,this.close,this)},T4.prototype._unbindAutoClose=function(){this._eventBus.off(M4,this.close,this)};var R4={__init__:["popupMenu"],popupMenu:["type",T4]};function P4(){}P4.prototype.get=function(){return this._data},P4.prototype.set=function(e){this._data=e},P4.prototype.clear=function(){var e=this._data;return delete this._data,e},P4.prototype.isEmpty=function(){return!this._data};var F4={clipboard:["type",P4]};function j4(e){var t=this;function n(e){t._lastMoveEvent=e}this._lastMoveEvent=null,e.on("canvas.init",(function(e){var i=t._svg=e.svg;i.addEventListener("mousemove",n)})),e.on("canvas.destroy",(function(){t._lastMouseEvent=null,t._svg.removeEventListener("mousemove",n)}))}function z4(e,t){var n=document.createEvent("MouseEvent"),i=e,o=t,r=e,s=t;return n.initMouseEvent&&n.initMouseEvent("mousemove",!0,!0,window,0,i,o,r,s,!1,!1,!1,!1,0,null),n}j4.$inject=["eventBus"],j4.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||z4(0,0)};var V4={__init__:["mouse"],mouse:["type",j4]};function Q4(e,t,n,i,o,r,s,a){this._canvas=e,this._create=t,this._clipboard=n,this._elementFactory=i,this._eventBus=o,this._modeling=r,this._mouse=s,this._rules=a,o.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements;t.priority=1,t.id=n.id;var o=Object(WU["find"])(i,(function(e){return e===n.parent}));o&&(t.parent=n.parent.id),W4(n)&&(t.priority=2,t.host=n.host.id),H4(n)&&(t.priority=3,t.source=n.source.id,t.target=n.target.id,t.waypoints=Y4(n)),U4(n)&&(t.priority=4,t.labelTarget=n.labelTarget.id),Object(WU["forEach"])(["x","y","width","height"],(function(e){Object(WU["isNumber"])(n[e])&&(t[e]=n[e])})),t.hidden=n.hidden,t.collapsed=n.collapsed})),o.on("copyPaste.pasteElements",(function(e){var t=e.hints;Object(WU["assign"])(t,{createElementsBehavior:!1})}))}function W4(e){return!!e.host}function H4(e){return!!e.waypoints}function U4(e){return!!e.labelTarget}function Y4(e){return Object(WU["map"])(e.waypoints,(function(e){return e=G4(e),e.original&&(e.original=G4(e.original)),e}))}function G4(e){return Object(WU["assign"])({},e)}function K4(e,t){var n=t.indexOf(e);return-1===n?t:t.splice(n,1)}Q4.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"],Q4.prototype.copy=function(e){var t,n;return Object(WU["isArray"])(e)||(e=e?[e]:[]),t=this._eventBus.fire("copyPaste.canCopyElements",{elements:e}),n=!1===t?{}:this.createTree(Object(WU["isArray"])(t)?t:e),this._clipboard.set(n),this._eventBus.fire("copyPaste.elementsCopied",{elements:e,tree:n}),n},Q4.prototype.paste=function(e){var t=this._clipboard.get();if(!this._clipboard.isEmpty()){var n=e&&e.hints||{};this._eventBus.fire("copyPaste.pasteElements",{hints:n});var i=this._createElements(t);if(e&&e.element&&e.point)return this._paste(i,e.element,e.point,n);this._create.start(this._mouse.getLastMoveEvent(),i,{hints:n||{}})}},Q4.prototype._paste=function(e,t,n,i){Object(WU["forEach"])(e,(function(e){Object(WU["isNumber"])(e.x)||(e.x=0),Object(WU["isNumber"])(e.y)||(e.y=0)}));var o=tG(e);return Object(WU["forEach"])(e,(function(e){H4(e)&&(e.waypoints=Object(WU["map"])(e.waypoints,(function(e){return{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2}}))),Object(WU["assign"])(e,{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2})})),this._modeling.createElements(e,n,t,Object(WU["assign"])({},i))},Q4.prototype._createElements=function(e){var t=this,n=this._eventBus,i={},o=[];return Object(WU["forEach"])(e,(function(e,r){r=parseInt(r,10),e=Object(WU["sortBy"])(e,"priority"),Object(WU["forEach"])(e,(function(e){var r,s=Object(WU["assign"])({},Object(WU["omit"])(e,["priority"]));return i[e.parent]?s.parent=i[e.parent]:delete s.parent,n.fire("copyPaste.pasteElement",{cache:i,descriptor:s}),H4(s)?(s.source=i[e.source],s.target=i[e.target],r=i[e.id]=t.createConnection(s),void o.push(r)):U4(s)?(s.labelTarget=i[s.labelTarget],r=i[e.id]=t.createLabel(s),void o.push(r)):(s.host&&(s.host=i[s.host]),r=i[e.id]=t.createShape(s),void o.push(r))}))})),o},Q4.prototype.createConnection=function(e){var t=this._elementFactory.createConnection(Object(WU["omit"])(e,["id"]));return t},Q4.prototype.createLabel=function(e){var t=this._elementFactory.createLabel(Object(WU["omit"])(e,["id"]));return t},Q4.prototype.createShape=function(e){var t=this._elementFactory.createShape(Object(WU["omit"])(e,["id"]));return t},Q4.prototype.hasRelations=function(e,t){var n,i,o;return!(H4(e)&&(i=Object(WU["find"])(t,Object(WU["matchPattern"])({id:e.source.id})),o=Object(WU["find"])(t,Object(WU["matchPattern"])({id:e.target.id})),!i||!o))&&!(U4(e)&&(n=Object(WU["find"])(t,Object(WU["matchPattern"])({id:e.labelTarget.id})),!n))},Q4.prototype.createTree=function(e){var t=this._rules,n=this,i={},o=[],r=KY(e);function s(e,n){return t.allowed("element.copy",{element:e,elements:n})}function a(e,t){var n=Object(WU["find"])(o,(function(t){return e===t.element}));n?n.depth<t&&(o=l(n,o),o.push({element:n.element,depth:t})):o.push({element:e,depth:t})}function l(e,t){var n=t.indexOf(e);return-1!==n&&t.splice(n,1),t}return $Y(r,(function(e,t,n){if(!U4(e))return Object(WU["forEach"])(e.labels,(function(e){a(e,n)})),Object(WU["forEach"])([e.attachers,e.incoming,e.outgoing],i),a(e,n),e.children;function i(e){e&&e.length&&Object(WU["forEach"])(e,(function(e){Object(WU["forEach"])(e.labels,(function(e){a(e,n)})),a(e,n)}))}})),e=Object(WU["map"])(o,(function(e){return e.element})),o=Object(WU["map"])(o,(function(t){return t.descriptor={},n._eventBus.fire("copyPaste.copyElement",{descriptor:t.descriptor,element:t.element,elements:e}),t})),o=Object(WU["sortBy"])(o,(function(e){return e.descriptor.priority})),e=Object(WU["map"])(o,(function(e){return e.element})),Object(WU["forEach"])(o,(function(t){var o=t.depth;n.hasRelations(t.element,e)&&s(t.element,e)?(i[o]||(i[o]=[]),i[o].push(t.descriptor)):K4(t.element,e)})),i};var q4={__depends__:[F4,I4,V4,L1],__init__:["copyPaste"],copyPaste:["type",Q4]};function J4(e,t,n){Object(WU["isArray"])(n)||(n=[n]),Object(WU["forEach"])(n,(function(n){Object(WU["isUndefined"])(e[n])||(t[n]=e[n])}))}function $4(e,t){Object(WU["isArray"])(t)||(t=[t]),Object(WU["forEach"])(t,(function(t){e[t]&&delete e[t]}))}var X4=750;function Z4(e,t,n){var i;function o(e,t){var n=y$(e);e.default&&(i[e.default]={element:n,property:"default"}),e.host&&(y$(e).attachedToRef=y$(t[e.host])),i=Object(WU["omit"])(i,Object(WU["reduce"])(i,(function(t,i,o){var r=i.element,s=i.property;return o===e.id&&(r[s]=n,t.push(e.id)),t}),[]))}t.on("copyPaste.copyElement",X4,(function(e){var t=e.descriptor,n=e.element,i=t.oldBusinessObject=y$(n);if(t.type=n.type,J4(i,t,"name"),t.di={},J4(i.di,t.di,["fill","stroke","background-color","border-color","color"]),J4(i.di,t,"isExpanded"),e5(t))return t;i.default&&(t.default=i.default.id)})),t.on("moddleCopy.canCopyProperty",(function(t){var i,o=t.parent,r=t.property,s=t.propertyName;if("processRef"===s&&v$(o,"bpmn:Participant")&&v$(r,"bpmn:Process"))return i=e.create("bpmn:Process"),n.copyElement(r,i)})),t.on("copyPaste.pasteElements",(function(){i={}})),t.on("copyPaste.pasteElement",(function(t){var i,r=t.cache,s=t.descriptor,a=s.oldBusinessObject;e5(s)?s.businessObject=y$(r[s.labelTarget]):(i=e.create(a.$type),s.businessObject=n.copyElement(a,i),o(s,r),J4(s,i,["isExpanded","name"]),$4(s,"oldBusinessObject"))}))}function e5(e){return!!e.labelTarget}Z4.$inject=["bpmnFactory","eventBus","moddleCopy"];var t5=["artifacts","dataInputAssociations","dataOutputAssociations","default","flowElements","lanes","incoming","outgoing"];function n5(e,t,n){this._bpmnFactory=t,this._eventBus=e,this._moddle=n,e.on("moddleCopy.canCopyProperties",(function(e){var t=e.propertyNames;if(t&&t.length)return Object(WU["sortBy"])(t,(function(e){return"extensionElements"===e}))})),e.on("moddleCopy.canCopyProperty",(function(e){var t=e.parent,n=Object(WU["isObject"])(t)&&t.$descriptor,i=e.propertyName;return(!i||-1===t5.indexOf(i))&&(!(i&&n&&!Object(WU["find"])(n.properties,Object(WU["matchPattern"])({name:i})))&&void 0)})),e.on("moddleCopy.canSetCopiedProperty",(function(e){var t=e.property;if(o5(t,"bpmn:ExtensionElements")&&(!t.values||!t.values.length))return!1}))}function i5(e,t){return Object(WU["reduce"])(e.properties,(function(e,n){return t&&n.default?e:e.concat(n.name)}),[])}function o5(e,t){return e&&"function"===typeof e.$instanceOf&&e.$instanceOf(t)}n5.$inject=["eventBus","bpmnFactory","moddle"],n5.prototype.copyElement=function(e,t,n){var i=this;n&&!Object(WU["isArray"])(n)&&(n=[n]),n=n||i5(e.$descriptor);var o=this._eventBus.fire("moddleCopy.canCopyProperties",{propertyNames:n,sourceElement:e,targetElement:t});return!1===o||(Object(WU["isArray"])(o)&&(n=o),Object(WU["forEach"])(n,(function(n){var o;Object(WU["has"])(e,n)&&(o=e.get(n));var r=i.copyProperty(o,t,n),s=i._eventBus.fire("moddleCopy.canSetCopiedProperty",{parent:t,property:r,propertyName:n});!1!==s&&Object(WU["isDefined"])(r)&&t.set(n,r)}))),t},n5.prototype.copyProperty=function(e,t,n){var i=this,o=this._eventBus.fire("moddleCopy.canCopyProperty",{parent:t,property:e,propertyName:n});if(!1!==o){if(o)return Object(WU["isObject"])(o)&&o.$type&&!o.$parent&&(o.$parent=t),o;var r=this._moddle.getPropertyDescriptor(t,n);if(!r.isReference){if(r.isId)return this._copyId(e,t);if(Object(WU["isArray"])(e))return Object(WU["reduce"])(e,(function(e,r){return o=i.copyProperty(r,t,n),o?(o.$parent=t,e.concat(o)):e}),[]);if(Object(WU["isObject"])(e)&&e.$type){if(this._moddle.getElementDescriptor(e).isGeneric)return;return o=i._bpmnFactory.create(e.$type),o.$parent=t,o=i.copyElement(e,o),o}return e}}},n5.prototype._copyId=function(e,t){return this._moddle.ids.assigned(e)?void 0:(this._moddle.ids.claim(e,t),e)};var r5={__depends__:[q4],__init__:["bpmnCopyPaste","moddleCopy"],bpmnCopyPaste:["type",Z4],moddleCopy:["type",n5]},s5=Math.round;function a5(e){this._modeling=e}a5.$inject=["modeling"],a5.prototype.replaceElement=function(e,t,n){if(e.waypoints)return null;var i=this._modeling,o=t.width||e.width,r=t.height||e.height,s=t.x||e.x,a=t.y||e.y,l=s5(s+o/2),c=s5(a+r/2);return i.replaceShape(e,Object(WU["assign"])({},t,{x:l,y:c,width:o,height:r}),n)};var l5={__init__:["replace"],replace:["type",a5]};function c5(e,t,n){Object(WU["isArray"])(n)||(n=[n]),Object(WU["forEach"])(n,(function(n){Object(WU["isUndefined"])(e[n])||(t[n]=e[n])}))}var h5=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];function u5(e,t){var n,i=e&&Object(WU["has"])(e,"collapsed")?e.collapsed:!w$(e);return n=t&&(Object(WU["has"])(t,"collapsed")||Object(WU["has"])(t,"isExpanded"))?Object(WU["has"])(t,"collapsed")?t.collapsed:!t.isExpanded:i,i!==n&&(e.collapsed=i,!0)}function d5(e,t,n,i,o,r,s){function a(a,l,c){c=c||{};var h=l.type,u=a.businessObject;if(p5(u)&&"bpmn:SubProcess"===h&&u5(a,l))return i.toggleCollapse(a),a;var d=e.create(h),p={type:h,businessObject:d},f=i5(u.$descriptor),g=i5(d.$descriptor,!0),m=g5(f,g);Object(WU["assign"])(d,Object(WU["pick"])(l,h5));var b=Object(WU["filter"])(m,(function(e){return"eventDefinitions"===e?f5(a,l.eventDefinitionType):"loopCharacteristics"===e?!C$(d):!Object(WU["has"])(d,e)&&(("processRef"!==e||!1!==l.isExpanded)&&"triggeredByEvent"!==e)}));return d=n.copyElement(u,d,b),l.eventDefinitionType&&(f5(d,l.eventDefinitionType)||(p.eventDefinitionType=l.eventDefinitionType,p.eventDefinitionAttrs=l.eventDefinitionAttrs)),v$(u,"bpmn:Activity")&&(p5(u)?p.isExpanded=w$(u):l&&Object(WU["has"])(l,"isExpanded")&&(p.isExpanded=l.isExpanded),w$(u)&&!v$(u,"bpmn:Task")&&p.isExpanded&&(p.width=a.width,p.height=a.height)),p5(u)&&!p5(d)&&(c.moveChildren=!1),v$(u,"bpmn:Participant")&&(!0===l.isExpanded?d.processRef=e.create("bpmn:Process"):c.moveChildren=!1,p.width=a.width,p.height=t._getDefaultSize(d).height),r.allowed("shape.resize",{shape:d})||(p.height=t._getDefaultSize(d).height,p.width=t._getDefaultSize(d).width),d.name=u.name,G0(u,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&G0(d,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&(d.default=u.default),l.host&&!v$(u,"bpmn:BoundaryEvent")&&v$(d,"bpmn:BoundaryEvent")&&(p.host=l.host),"bpmn:DataStoreReference"!==p.type&&"bpmn:DataObjectReference"!==p.type||(p.x=a.x+(a.width-p.width)/2),p.di={},c5(u.di,p.di,["fill","stroke","background-color","border-color","color"]),p=o.replaceElement(a,p,c),!1!==c.select&&s.select(p),p}this.replaceElement=a}function p5(e){return v$(e,"bpmn:SubProcess")}function f5(e,t){var n=y$(e);return t&&n.get("eventDefinitions").some((function(e){return v$(e,t)}))}function g5(e,t){return e.filter((function(e){return-1!==t.indexOf(e)}))}d5.$inject=["bpmnFactory","elementFactory","moddleCopy","modeling","replace","rules","selection"];var m5={__depends__:[r5,l5,lZ],bpmnReplace:["type",d5]};function b5(e){return function(t){var n=t.target,i=y$(e),o=i.eventDefinitions&&i.eventDefinitions[0],r=i.$type===n.type,s=(o&&o.$type)===n.eventDefinitionType,a=i.triggeredByEvent===n.triggeredByEvent,l=void 0===n.isExpanded||n.isExpanded===w$(i);return!r||!s||!a||!l}}var v5=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],y5=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],w5=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Intermediate Catch Event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message Intermediate Throw Event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Intermediate Catch Event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Intermediate Throw Event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Intermediate Catch Event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link Intermediate Catch Event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link Intermediate Throw Event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation Intermediate Throw Event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal Intermediate Catch Event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal Intermediate Throw Event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],_5=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message End Event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation End Event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error End Event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel End Event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation End Event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal End Event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate End Event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],C5=[{label:"Exclusive Gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel Gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive Gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex Gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event based Gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],A5=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],E5=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],x5=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}}],S5=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"Send Task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive Task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"User Task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Manual Task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business Rule Task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Service Task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Script Task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call Activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub Process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],k5=[{label:"Data Store Reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],D5=[{label:"Data Object Reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],L5=[{label:"Message Boundary Event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Boundary Event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Boundary Event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Boundary Event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Error Boundary Event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel Boundary Event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Signal Boundary Event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Compensation Boundary Event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],I5=[{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Error Start Event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Escalation Start Event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Compensation Start Event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],N5=[{label:"Sequence Flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default Flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional Flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],M5=[{label:"Expanded Pool",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty Pool";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];function B5(e,t,n,i,o,r,s){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=o,this._rules=r,this._translate=s,this.register()}B5.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate"],B5.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},B5.prototype.getEntries=function(e){var t,n=e.businessObject,i=this._rules;if(!i.allowed("shape.replace",{element:e}))return[];var o=b5(e);return v$(n,"bpmn:DataObjectReference")?this._createEntries(e,k5):v$(n,"bpmn:DataStoreReference")?this._createEntries(e,D5):v$(n,"bpmn:StartEvent")&&!v$(n.$parent,"bpmn:SubProcess")?(t=Object(WU["filter"])(v5,o),this._createEntries(e,t)):v$(n,"bpmn:Participant")?(t=Object(WU["filter"])(M5,(function(e){return w$(n)!==e.target.isExpanded})),this._createEntries(e,t)):v$(n,"bpmn:StartEvent")&&C$(n.$parent)?(t=Object(WU["filter"])(I5,(function(t){var n=t.target,i=!1!==n.isInterrupting,r=y$(e).isInterrupting===i;return o(t)||!o(t)&&!r})),this._createEntries(e,t)):v$(n,"bpmn:StartEvent")&&!C$(n.$parent)&&v$(n.$parent,"bpmn:SubProcess")?(t=Object(WU["filter"])(y5,o),this._createEntries(e,t)):v$(n,"bpmn:EndEvent")?(t=Object(WU["filter"])(_5,(function(e){var t=e.target;return!("bpmn:CancelEventDefinition"==t.eventDefinitionType&&!v$(n.$parent,"bpmn:Transaction"))&&o(e)})),this._createEntries(e,t)):v$(n,"bpmn:BoundaryEvent")?(t=Object(WU["filter"])(L5,(function(e){var t=e.target;if("bpmn:CancelEventDefinition"==t.eventDefinitionType&&!v$(n.attachedToRef,"bpmn:Transaction"))return!1;var i=!1!==t.cancelActivity,r=n.cancelActivity==i;return o(e)||!o(e)&&!r})),this._createEntries(e,t)):v$(n,"bpmn:IntermediateCatchEvent")||v$(n,"bpmn:IntermediateThrowEvent")?(t=Object(WU["filter"])(w5,o),this._createEntries(e,t)):v$(n,"bpmn:Gateway")?(t=Object(WU["filter"])(C5,o),this._createEntries(e,t)):v$(n,"bpmn:Transaction")?(t=Object(WU["filter"])(E5,o),this._createEntries(e,t)):C$(n)&&w$(n)?(t=Object(WU["filter"])(x5,o),this._createEntries(e,t)):v$(n,"bpmn:SubProcess")&&w$(n)?(t=Object(WU["filter"])(A5,o),this._createEntries(e,t)):v$(n,"bpmn:AdHocSubProcess")&&!w$(n)?(t=Object(WU["filter"])(S5,(function(t){var n=t.target,i="bpmn:SubProcess"===n.type,o=!0===n.isExpanded;return b5(e,n)&&(!i||o)})),this._createEntries(e,t)):v$(n,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,N5):v$(n,"bpmn:FlowNode")?(t=Object(WU["filter"])(S5,o),v$(n,"bpmn:SubProcess")&&!w$(n)&&(t=Object(WU["filter"])(t,(function(e){return"Sub Process (collapsed)"!==e.label}))),this._createEntries(e,t)):[]},B5.prototype.getHeaderEntries=function(e){var t=[];return v$(e,"bpmn:Activity")&&!C$(e)&&(t=t.concat(this._getLoopEntries(e))),v$(e,"bpmn:DataObjectReference")&&(t=t.concat(this._getDataObjectIsCollection(e))),v$(e,"bpmn:Participant")&&(t=t.concat(this._getParticipantMultiplicity(e))),!v$(e,"bpmn:SubProcess")||v$(e,"bpmn:Transaction")||C$(e)||t.push(this._getAdHocEntry(e)),t},B5.prototype._createEntries=function(e,t){var n=[],i=this;return Object(WU["forEach"])(t,(function(t){var o=i._createMenuEntry(t,e);n.push(o)})),n},B5.prototype._createSequenceFlowEntries=function(e,t){var n=y$(e),i=[],o=this._modeling,r=this._moddle,s=this;return Object(WU["forEach"])(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(v$(n.sourceRef,"bpmn:ExclusiveGateway")||v$(n.sourceRef,"bpmn:InclusiveGateway")||v$(n.sourceRef,"bpmn:ComplexGateway")||v$(n.sourceRef,"bpmn:Activity"))&&i.push(s._createMenuEntry(t,e,(function(){o.updateProperties(e.source,{default:n})})));break;case"replace-with-conditional-flow":!n.conditionExpression&&v$(n.sourceRef,"bpmn:Activity")&&i.push(s._createMenuEntry(t,e,(function(){var t=r.create("bpmn:FormalExpression",{body:""});o.updateProperties(e,{conditionExpression:t})})));break;default:if(v$(n.sourceRef,"bpmn:Activity")&&n.conditionExpression)return i.push(s._createMenuEntry(t,e,(function(){o.updateProperties(e,{conditionExpression:void 0})})));if((v$(n.sourceRef,"bpmn:ExclusiveGateway")||v$(n.sourceRef,"bpmn:InclusiveGateway")||v$(n.sourceRef,"bpmn:ComplexGateway")||v$(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n)return i.push(s._createMenuEntry(t,e,(function(){o.updateProperties(e.source,{default:void 0})})))}})),i},B5.prototype._createMenuEntry=function(e,t,n){var i=this._translate,o=this._bpmnReplace.replaceElement,r=function(){return o(t,e.target)},s=e.label;s&&"function"===typeof s&&(s=s(t)),n=n||r;var a={label:i(s),className:e.className,id:e.actionName,action:n};return a},B5.prototype._getLoopEntries=function(e){var t=this,n=this._translate;function i(n,i){var o;i.active?o=void 0:(o=t._moddle.create(i.options.loopCharacteristics),i.options.isSequential&&(o.isSequential=i.options.isSequential)),t._modeling.updateProperties(e,{loopCharacteristics:o})}var o,r,s,a=y$(e),l=a.loopCharacteristics;l&&(o=l.isSequential,r=void 0===l.isSequential,s=void 0!==l.isSequential&&!l.isSequential);var c=[{id:"toggle-parallel-mi",className:"bpmn-icon-parallel-mi-marker",title:n("Parallel Multi Instance"),active:s,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},{id:"toggle-sequential-mi",className:"bpmn-icon-sequential-mi-marker",title:n("Sequential Multi Instance"),active:o,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},{id:"toggle-loop",className:"bpmn-icon-loop-marker",title:n("Loop"),active:r,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}];return c},B5.prototype._getDataObjectIsCollection=function(e){var t=this,n=this._translate;function i(n,i){t._modeling.updateModdleProperties(e,o,{isCollection:!i.active})}var o=e.businessObject.dataObjectRef,r=o.isCollection,s=[{id:"toggle-is-collection",className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:i}];return s},B5.prototype._getParticipantMultiplicity=function(e){var t=this,n=this._bpmnFactory,i=this._translate;function o(i,o){var r,s=o.active;s||(r=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:r})}var r=e.businessObject.participantMultiplicity,s=[{id:"toggle-participant-multiplicity",className:"bpmn-icon-parallel-mi-marker",title:i("Participant Multiplicity"),active:!!r,action:o}];return s},B5.prototype._getAdHocEntry=function(e){var t=this._translate,n=y$(e),i=v$(n,"bpmn:AdHocSubProcess"),o=this._bpmnReplace.replaceElement,r={id:"toggle-adhoc",className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:i,action:function(t,n){return o(e,i?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}};return r};var T5={__depends__:[R4,m5],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",B5]},O5=Math.max,R5=Math.min,P5=20;function F5(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function j5(e,t,n){var i=n.x,o=n.y,r={x:e.x,y:e.y,width:e.width,height:e.height};return-1!==t.indexOf("n")?(r.y=e.y+o,r.height=e.height-o):-1!==t.indexOf("s")&&(r.height=e.height+o),-1!==t.indexOf("e")?r.width=e.width+i:-1!==t.indexOf("w")&&(r.x=e.x+i,r.width=e.width-i),r}function z5(e,t){return{x:e.x+(t.left||0),y:e.y+(t.top||0),width:e.width-(t.left||0)+(t.right||0),height:e.height-(t.top||0)+(t.bottom||0)}}function V5(e,t,n){var i=t[e],o=n.min&&n.min[e],r=n.max&&n.max[e];return Object(WU["isNumber"])(o)&&(i=(/top|left/.test(e)?R5:O5)(i,o)),Object(WU["isNumber"])(r)&&(i=(/top|left/.test(e)?O5:R5)(i,r)),i}function Q5(e,t){if(!t)return e;var n=xG(e);return SG({top:V5("top",n,t),right:V5("right",n,t),bottom:V5("bottom",n,t),left:V5("left",n,t)})}function W5(e,t,n,i){var o=xG(t),r={top:/n/.test(e)?o.bottom-n.height:o.top,left:/w/.test(e)?o.right-n.width:o.left,bottom:/s/.test(e)?o.top+n.height:o.bottom,right:/e/.test(e)?o.left+n.width:o.right},s=i?xG(i):r,a={top:R5(r.top,s.top),left:R5(r.left,s.left),bottom:O5(r.bottom,s.bottom),right:O5(r.right,s.right)};return SG(a)}function H5(e,t){return"undefined"!==typeof e?e:P5}function U5(e,t){var n,i,o,r;return"object"===typeof t?(n=H5(t.left),i=H5(t.right),o=H5(t.top),r=H5(t.bottom)):n=i=o=r=H5(t),{x:e.x-n,y:e.y-o,width:e.width+n+i,height:e.height+o+r}}function Y5(e){return!e.waypoints&&"label"!==e.type}function G5(e,t){var n;if(n=void 0===e.length?Object(WU["filter"])(e.children,Y5):e,n.length)return U5(tG(n),t)}var K5=Math.abs;function q5(e,t){return F5(xG(t),xG(e))}var J5=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],$5=30;function X5(e,t){return t=t||[],e.children.filter((function(e){v$(e,"bpmn:Lane")&&(X5(e,t),t.push(e))})),t}function Z5(e){return e.children.filter((function(e){return v$(e,"bpmn:Lane")}))}function e3(e){return K0(e,J5)||e}function t3(e,t){var n=e3(e),i=v$(n,"bpmn:Process")?[]:[n],o=X5(n,i),r=xG(e),s=xG(t),a=q5(e,t),l=[];return o.forEach((function(t){if(t!==e){var n=0,i=a.right,o=0,c=a.left,h=xG(t);a.top&&(K5(h.bottom-r.top)<10&&(o=s.top-h.bottom),K5(h.top-r.top)<5&&(n=s.top-h.top)),a.bottom&&(K5(h.top-r.bottom)<10&&(n=s.bottom-h.top),K5(h.bottom-r.bottom)<5&&(o=s.bottom-h.bottom)),(n||i||o||c)&&l.push({shape:t,newBounds:z5(t,{top:n,right:i,bottom:o,left:c})})}})),l}function n3(e,t,n,i,o,r,s,a,l,c,h,u){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=o,this._elementFactory=r,this._connect=s,this._create=a,this._popupMenu=l,this._canvas=c,this._rules=h,this._translate=u,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context,n=t.shape;if(YX(e)&&i.isOpen(n)){var o=i.getEntries(n);o.replace&&o.replace.action.click(e,n)}}))}function i3(e,t,n){var i=e.$instanceOf(t),o=!1,r=e.eventDefinitions||[];return Object(WU["forEach"])(r,(function(e){e.$type===n&&(o=!0)})),i&&o}n3.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"],n3.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,o=this._connect,r=this._create,s=this._popupMenu,a=this._canvas,l=this._rules,c=this._autoPlace,h=this._translate,u={};if("label"===e.type)return u;var d=e.businessObject;function p(e,t){o.start(e,t)}function f(t){n.removeElements([e])}function g(e){var n=5,i=a.getContainer(),o=t.getPad(e).html,r=i.getBoundingClientRect(),s=o.getBoundingClientRect(),l=s.top-r.top,c=s.left-r.left,h={x:c,y:l+s.height+n};return h}function m(e,t,n,o){function s(t,n){var s=i.createShape(Object(WU["assign"])({type:e},o));r.start(t,s,{source:n})}"string"!==typeof n&&(o=n,n=h("Append {type}",{type:e.replace(/^bpmn:/,"")}));var a=c?function(t,n){var r=i.createShape(Object(WU["assign"])({type:e},o));c.append(n,r)}:s;return{group:"model",className:t,title:n,action:{dragstart:s,click:a}}}function b(e){return function(i,o){n.splitLane(o,e),t.open(o,!0)}}if(G0(d,["bpmn:Lane","bpmn:Participant"])&&w$(d)){var v=Z5(e);Object(WU["assign"])(u,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:h("Add Lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),v.length<2&&(e.height>=120&&Object(WU["assign"])(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:h("Divide into two Lanes"),action:{click:b(2)}}}),e.height>=180&&Object(WU["assign"])(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:h("Divide into three Lanes"),action:{click:b(3)}}})),Object(WU["assign"])(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:h("Add Lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}v$(d,"bpmn:FlowNode")&&(v$(d,"bpmn:EventBasedGateway")?Object(WU["assign"])(u,{"append.receive-task":m("bpmn:ReceiveTask","bpmn-icon-receive-task",h("Append ReceiveTask")),"append.message-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",h("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",h("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",h("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",h("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):i3(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?Object(WU["assign"])(u,{"append.compensation-activity":m("bpmn:Task","bpmn-icon-task",h("Append compensation activity"),{isForCompensation:!0})}):v$(d,"bpmn:EndEvent")||d.isForCompensation||i3(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||C$(d)||Object(WU["assign"])(u,{"append.end-event":m("bpmn:EndEvent","bpmn-icon-end-event-none",h("Append EndEvent")),"append.gateway":m("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",h("Append Gateway")),"append.append-task":m("bpmn:Task","bpmn-icon-task",h("Append Task")),"append.intermediate-event":m("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",h("Append Intermediate/Boundary Event"))})),s.isEmpty(e,"bpmn-replace")||Object(WU["assign"])(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:h("Change type"),action:{click:function(e,t){var n=Object(WU["assign"])(g(t),{cursor:{x:e.x,y:e.y}});s.open(t,"bpmn-replace",n)}}}}),G0(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Object(WU["assign"])(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:h("Connect using "+(d.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:p,dragstart:p}}}),v$(d,"bpmn:TextAnnotation")&&Object(WU["assign"])(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:h("Connect using Association"),action:{click:p,dragstart:p}}}),G0(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Object(WU["assign"])(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:h("Connect using DataInputAssociation"),action:{click:p,dragstart:p}}}),v$(d,"bpmn:Group")&&Object(WU["assign"])(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation")});var y=l.allowed("elements.delete",{elements:[e]});return Object(WU["isArray"])(y)&&(y=y[0]===e),y&&Object(WU["assign"])(u,{delete:{group:"edit",className:"bpmn-icon-trash",title:h("Remove"),action:{click:f}}}),u};var o3={__depends__:[i4,l4,lZ,Q2,I4,T5],__init__:["contextPadProvider"],contextPadProvider:["type",n3]},r3={horizontal:["x","width"],vertical:["y","height"]},s3=5;function a3(e){this._modeling=e,this._filters=[],this.registerFilter((function(e,t,n){var i,o=0,r=0;return Object(WU["forEach"])(e,(function(e){e.waypoints||e.labelTarget||(o+=e[n],r+=1)})),i=Math.round(o/r),Object(WU["filter"])(e,(function(e){return e[n]<i+50}))}))}a3.$inject=["modeling"],a3.prototype.registerFilter=function(e){if("function"!==typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},a3.prototype.trigger=function(e,t){var n,i,o=this._modeling;if(!(e.length<3)&&(this._setOrientation(t),i=this._filterElements(e),n=this._createGroups(i),!(n.length<=2)))return o.distributeElements(n,this._axis,this._dimension),n},a3.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,o=[].concat(e);return t.length?(Object(WU["forEach"])(t,(function(e){o=e(o,n,i)})),o):e},a3.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,o=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');var r=Object(WU["sortBy"])(e,i);return Object(WU["forEach"])(r,(function(e,r){var s,a=n._findRange(e,i,o),l=t[t.length-1];l&&n._hasIntersection(l.range,a)?t[t.length-1].elements.push(e):(s={range:a,elements:[e]},t.push(s))})),t},a3.prototype._setOrientation=function(e){var t=r3[e];this._axis=t[0],this._dimension=t[1]},a3.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},a3.prototype._findRange=function(e){var t=e[this._axis],n=e[this._dimension];return{min:t+s3,max:t+n-s3}};var l3={__init__:["distributeElements"],distributeElements:["type",a3]};function c3(e){e.registerFilter((function(e){return Object(WU["filter"])(e,(function(e){var t=G0(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:Participant","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)}))}))}c3.$inject=["distributeElements"];var h3={__depends__:[l3],__init__:["bpmnDistributeElements"],bpmnDistributeElements:["type",c3]},u3="is not a registered action",d3="is already registered";function p3(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function f3(e,t){return new Error(e+" "+t)}p3.$inject=["eventBus","injector"],p3.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),o=e.get("zoomScroll",!1),r=e.get("copyPaste",!1),s=e.get("canvas",!1),a=e.get("rules",!1),l=e.get("keyboardMove",!1),c=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),r&&i&&this.register("copy",(function(){var e=i.get();r.copy(e)})),r&&this.register("paste",(function(){r.paste()})),o&&this.register("stepZoom",(function(e){o.stepZoom(e.value)})),s&&this.register("zoom",(function(e){s.zoom(e.value)})),n&&i&&a&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,o=a.allowed("elements.delete",{elements:e});!1!==o&&(t=Object(WU["isArray"])(o)?o:e,t.length&&n.removeElements(t.slice()))}})),l&&this.register("moveCanvas",(function(e){l.moveCanvas(e)})),c&&this.register("moveSelection",(function(e){c.moveSelection(e.direction,e.accelerated)}))},p3.prototype.trigger=function(e,t){if(!this._actions[e])throw f3(e,u3);return this._actions[e](t)},p3.prototype.register=function(e,t){var n=this;if("string"===typeof e)return this._registerAction(e,t);Object(WU["forEach"])(e,(function(e,t){n._registerAction(t,e)}))},p3.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw f3(e,d3);this._actions[e]=t},p3.prototype.unregister=function(e){if(!this.isRegistered(e))throw f3(e,u3);this._actions[e]=void 0},p3.prototype.getActions=function(){return Object.keys(this._actions)},p3.prototype.isRegistered=function(e){return!!this._actions[e]};var g3={__init__:["editorActions"],editorActions:["type",p3]};function m3(e){e.invoke(p3,this)}FU()(m3,p3),m3.$inject=["injector"],m3.prototype._registerDefaultActions=function(e){p3.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),o=e.get("spaceTool",!1),r=e.get("lassoTool",!1),s=e.get("handTool",!1),a=e.get("globalConnect",!1),l=e.get("distributeElements",!1),c=e.get("alignElements",!1),h=e.get("directEditing",!1),u=e.get("searchPad",!1),d=e.get("modeling",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),o=n.filter((function(t){return t!==e}));return i.select(o),o})),o&&this._registerAction("spaceTool",(function(){o.toggle()})),r&&this._registerAction("lassoTool",(function(){r.toggle()})),s&&this._registerAction("handTool",(function(){s.toggle()})),a&&this._registerAction("globalConnectTool",(function(){a.toggle()})),i&&l&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&l.trigger(t,n)})),i&&c&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],o=e.type;t.length&&(n=Object(WU["filter"])(t,(function(e){return!v$(e,"bpmn:Lane")})),c.trigger(n,o))})),i&&d&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&d.setColor(t,e)})),i&&h&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&h.activate(e[0])})),u&&this._registerAction("find",(function(){u.toggle()})),t&&d&&this._registerAction("moveToOrigin",(function(){var e,i,o=t.getRootElement();i=v$(o,"bpmn:Collaboration")?n.filter((function(e){return v$(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==o&&!v$(e.parent,"bpmn:SubProcess")})),e=tG(i),d.moveElements(i,{x:-e.x,y:-e.y},o)}))};var b3={__depends__:[g3],editorActions:["type",m3]};function v3(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context,n=e.shape;G0(n,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}v3.$inject=["eventBus"];var y3=10;function w3(e,t,n){return n||(n="round"),Math[n](e/t)*t}var _3=1200,C3=800;function A3(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var o=this;t.on("diagram.init",C3,(function(){o.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],_3,(function(t){var n=t.originalEvent;if(!(!o.active||n&&wZ(n))){var i=t.context,r=i.gridSnappingContext;r||(r=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},r=x3(t,n,e);r&&(i.offset=r);var s=E3(t,n);s&&Object(WU["assign"])(i,s),k2(t,n)||o.snapEvent(t,n,i)}))}}))}function E3(e,t){var n=e.context,i=n.createConstraints,o=n.resizeConstraints||{},r=n.gridSnappingContext,s=r.snapConstraints;if(s&&s[t])return s[t];s||(s=r.snapConstraints={}),s[t]||(s[t]={});var a=n.direction;i&&(S3(t)?(s.x.min=i.left,s.x.max=i.right):(s.y.min=i.top,s.y.max=i.bottom));var l=o.min,c=o.max;return l&&(S3(t)?D3(a)?s.x.max=l.left:s.x.min=l.right:k3(a)?s.y.max=l.top:s.y.min=l.bottom),c&&(S3(t)?D3(a)?s.x.min=c.left:s.x.max=c.right:k3(a)?s.y.min=c.top:s.y.max=c.bottom),s[t]}function x3(e,t,n){var i=e.context,o=e.shape,r=i.gridSnappingContext,s=r.snapLocation,a=r.snapOffset;return a&&Object(WU["isNumber"])(a[t])?a[t]:(a||(a=r.snapOffset={}),Object(WU["isNumber"])(a[t])||(a[t]=0),o?(n.get(o.id)||(S3(t)?a[t]+=o[t]+o.width/2:a[t]+=o[t]+o.height/2),s?("x"===t?/left/.test(s)?a[t]-=o.width/2:/right/.test(s)&&(a[t]+=o.width/2):/top/.test(s)?a[t]-=o.height/2:/bottom/.test(s)&&(a[t]+=o.height/2),a[t]):a[t]):a[t])}function S3(e){return"x"===e}function k3(e){return-1!==e.indexOf("n")}function D3(e){return-1!==e.indexOf("w")}function L3(e,t){i1.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=t.hints||{},o=i.autoResize;if(o){var r=t.shape,s=t.newBounds;Object(WU["isString"])(o)?t.newBounds=n.snapComplex(s,o):t.newBounds=n.snapSimple(r,s)}}))}A3.prototype.snapEvent=function(e,t,n){var i=this.snapValue(e[t],n);D2(e,t,i)},A3.prototype.getGridSpacing=function(){return y3},A3.prototype.snapValue=function(e,t){var n,i,o=0;return t&&t.offset&&(o=t.offset),e+=o,e=w3(e,y3),t&&t.min&&(n=t.min,Object(WU["isNumber"])(n)&&(n=w3(n+o,y3,"ceil"),e=Math.max(e,n))),t&&t.max&&(i=t.max,Object(WU["isNumber"])(i)&&(i=w3(i+o,y3,"floor"),e=Math.min(e,i))),e-=o,e},A3.prototype.isActive=function(){return this.active},A3.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},A3.prototype.toggleActive=function(){this.setActive(!this.active)},A3.$inject=["elementRegistry","eventBus","config.gridSnapping"],L3.$inject=["eventBus","gridSnapping","modeling"],FU()(L3,i1),L3.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},L3.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},L3.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),o=/e/.test(t),r={};return r.width=n.snapValue(e.width,{min:e.width}),o&&(i?(r.x=n.snapValue(e.x,{max:e.x}),r.width+=n.snapValue(e.x-r.x,{min:e.x-r.x})):e.x=e.x+e.width-r.width),Object(WU["assign"])(e,r),e},L3.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),o=/s/.test(t),r={};return r.height=n.snapValue(e.height,{min:e.height}),i&&(o?(r.y=n.snapValue(e.y,{max:e.y}),r.height+=n.snapValue(e.y-r.y,{min:e.y-r.y})):e.y=e.y+e.height-r.height),Object(WU["assign"])(e,r),e};var I3=2e3;function N3(e,t){e.on(["spaceTool.move","spaceTool.end"],I3,(function(e){var n=e.context;if(n.initialized){var i,o=n.axis;"x"===o?(i=t.snapValue(e.dx),e.x=e.x+i-e.dx,e.dx=i):(i=t.snapValue(e.dy),e.y=e.y+i-e.dy,e.dy=i)}}))}N3.$inject=["eventBus","gridSnapping"];var M3={__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",L3],gridSnappingSpaceToolBehavior:["type",N3]},B3={__depends__:[M3],__init__:["gridSnapping"],gridSnapping:["type",A3]},T3=2e3;function O3(e,t){e.on("autoPlace",T3,(function(e){var n=e.source,i=kG(n),o=e.shape,r=q0(n,o);return["x","y"].forEach((function(e){var n={};r[e]!==i[e]&&(r[e]>i[e]?n.min=r[e]:n.max=r[e],v$(o,"bpmn:TextAnnotation")&&(R3(e)?n.offset=-o.width/2:n.offset=-o.height/2),r[e]=t.snapValue(r[e],n))})),r}))}function R3(e){return"x"===e}O3.$inject=["eventBus","gridSnapping"];var P3=1750;function F3(e,t,n){t.on(["create.start","shape.move.start"],P3,(function(t){var i=t.context,o=i.shape,r=e.getRootElement();if(v$(o,"bpmn:Participant")&&v$(r,"bpmn:Process")&&r.children.length){var s=i.createConstraints;s&&(o.width=n.snapValue(o.width,{min:o.width}),o.height=n.snapValue(o.height,{min:o.height}))}}))}F3.$inject=["canvas","eventBus","gridSnapping"];var j3=3e3;function z3(e,t,n){i1.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],j3,(function(e){var t=e.context,o=t.connection,r=t.hints||{},s=o.waypoints;r.connectionStart||r.connectionEnd||!1===r.createElementsBehavior||V3(s)&&n.updateWaypoints(o,i.snapMiddleSegments(s))}))}function V3(e){return e.length>3}function Q3(e){return"h"===e}function W3(e){return"v"===e}function H3(e,t,n){var i=mG(t,n),o={};return Q3(i)&&(o.y=e.snapValue(t.y)),W3(i)&&(o.x=e.snapValue(t.x)),("x"in o||"y"in o)&&(t=Object(WU["assign"])({},t,o),n=Object(WU["assign"])({},n,o)),[t,n]}z3.$inject=["eventBus","gridSnapping","modeling"],FU()(z3,i1),z3.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i<e.length-2;i++)t=H3(n,e[i],e[i+1]),e[i]=t[0],e[i+1]=t[1];return e};var U3={__init__:["gridSnappingAutoPlaceBehavior","gridSnappingCreateParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",O3],gridSnappingCreateParticipantBehavior:["type",F3],gridSnappingLayoutConnectionBehavior:["type",z3]},Y3={__depends__:[B3,U3],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",v3]},G3=30,K3=30;function q3(e,t){this._interactionEvents=t;var n=this;e.on(["interactionEvents.createHit","interactionEvents.updateHit"],(function(e){var t=e.element,i=e.gfx;return v$(t,"bpmn:Lane")?n.createParticipantHit(t,i):v$(t,"bpmn:Participant")?w$(t)?n.createParticipantHit(t,i):n.createDefaultHit(t,i):v$(t,"bpmn:SubProcess")?w$(t)?n.createSubProcessHit(t,i):n.createDefaultHit(t,i):void 0}))}q3.$inject=["eventBus","interactionEvents"],q3.prototype.createDefaultHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(e,t),!0},q3.prototype.createParticipantHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:G3,height:e.height}),!0},q3.prototype.createSubProcessHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:e.width,height:K3}),!0};var J3={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",q3]};function $3(e){e.invoke(FZ,this)}FU()($3,FZ),$3.$inject=["injector"],$3.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}FZ.prototype.registerBindings.call(this,e,t),n("selectElements",(function(n){var i=n.keyEvent;if(e.isKey(["a","A"],i)&&e.isCmd(i))return t.trigger("selectElements"),!0})),n("find",(function(n){var i=n.keyEvent;if(e.isKey(["f","F"],i)&&e.isCmd(i))return t.trigger("find"),!0})),n("spaceTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["s","S"],i)?(t.trigger("spaceTool"),!0):void 0})),n("lassoTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["l","L"],i)?(t.trigger("lassoTool"),!0):void 0})),n("handTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["h","H"],i)?(t.trigger("handTool"),!0):void 0})),n("globalConnectTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["c","C"],i)?(t.trigger("globalConnectTool"),!0):void 0})),n("directEditing",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["e","E"],i)?(t.trigger("directEditing"),!0):void 0}))};var X3={__depends__:[jZ],__init__:["keyboardBindings"],keyboardBindings:["type",$3]},Z3={moveSpeed:1,moveSpeedAccelerated:10},e8=1500,t8="left",n8="up",i8="right",o8="down",r8={ArrowLeft:t8,Left:t8,ArrowUp:n8,Up:n8,ArrowRight:i8,Right:i8,ArrowDown:o8,Down:o8},s8={left:function(e){return{x:-e,y:0}},up:function(e){return{x:0,y:-e}},right:function(e){return{x:e,y:0}},down:function(e){return{x:0,y:e}}};function a8(e,t,n,i,o){var r=this;this._config=Object(WU["assign"])({},Z3,e||{}),t.addListener(e8,(function(e){var n=e.keyEvent,i=r8[n.key];if(i&&!t.isCmd(n)){var o=t.isShift(n);return r.moveSelection(i,o),!0}})),this.moveSelection=function(e,t){var r=o.get();if(r.length){var s=this._config[t?"moveSpeedAccelerated":"moveSpeed"],a=s8[e](s),l=i.allowed("elements.move",{shapes:r});l&&n.moveElements(r,a)}}}a8.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];var l8={__depends__:[jZ,lZ],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",a8]};function c8(e,t,n,i){e.on("element.changed",(function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(iG(o)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}c8.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var h8={__init__:["changeSupport"],changeSupport:["type",c8]},u8=10;function d8(e,t,n,i){this._dragging=i,this._rules=t;var o=this;function r(e,t){var n,i=e.shape,r=e.direction,s=e.resizeConstraints;e.delta=t,n=j5(i,r,t),e.newBounds=Q5(n,s),e.canExecute=o.canResize(e)}function s(e){var t=e.resizeConstraints,n=e.minBounds;void 0===t&&(void 0===n&&(n=o.computeMinResizeBox(e)),e.resizeConstraints={min:xG(n)})}function a(e){var t=e.shape,i=e.canExecute,o=e.newBounds;if(i){if(o=AG(o),!p8(t,o))return;n.resizeShape(t,o)}}e.on("resize.start",(function(e){s(e.context)})),e.on("resize.move",(function(e){var t={x:e.dx,y:e.dy};r(e.context,t)})),e.on("resize.end",(function(e){a(e.context)}))}function p8(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}function f8(e,t){var n=kG(e),i=xG(e),o={x:n.x,y:n.y};return-1!==t.indexOf("n")?o.y=i.top:-1!==t.indexOf("s")&&(o.y=i.bottom),-1!==t.indexOf("e")?o.x=i.right:-1!==t.indexOf("w")&&(o.x=i.left),o}function g8(e){var t="resize-";return"n"===e||"s"===e?t+"ns":"e"===e||"w"===e?t+"ew":"nw"===e||"se"===e?t+"nwse":t+"nesw"}d8.prototype.canResize=function(e){var t=this._rules,n=Object(WU["pick"])(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)},d8.prototype.activate=function(e,t,n){var i,o,r=this._dragging;if("string"===typeof n&&(n={direction:n}),i=Object(WU["assign"])({shape:t},n),o=i.direction,!o)throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");r.init(e,f8(t,o),"resize",{autoActivate:!0,cursor:g8(o),data:{shape:t,context:i}})},d8.prototype.computeMinResizeBox=function(e){var t,n,i=e.shape,o=e.direction;return t=e.minDimensions||{width:u8,height:u8},n=G5(i,e.childrenBoxPadding),W5(o,i,t,n)},d8.$inject=["eventBus","rules","modeling","dragging"];var m8="djs-resizing",b8="resize-not-ok",v8=500;function y8(e,t,n){function i(e){var i=e.shape,o=e.newBounds,r=e.frame;r||(r=e.frame=n.addFrame(i,t.getActiveLayer()),t.addMarker(i,m8)),o.width>5&&ZU(r,{x:o.x,width:o.width}),o.height>5&&ZU(r,{y:o.y,height:o.height}),e.canExecute?oY(r).remove(b8):oY(r).add(b8)}function o(e){var n=e.shape,i=e.frame;i&&sY(e.frame),t.removeMarker(n,m8)}e.on("resize.move",v8,(function(e){i(e.context)})),e.on("resize.cleanup",(function(e){o(e.context)}))}y8.$inject=["eventBus","canvas","previewSupport"];var w8=-6,_8=4,C8=20,A8="djs-resizer",E8=["n","w","s","e","nw","ne","se","sw"];function x8(e,t,n,i){this._resize=i,this._canvas=t;var o=this;e.on("selection.changed",(function(e){var t=e.newSelection;o.removeResizers(),1===t.length&&Object(WU["forEach"])(t,Object(WU["bind"])(o.addResizer,o))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(o.removeResizers(),o.addResizer(t))}))}function S8(e){var t={x:0,y:0};return-1!==e.indexOf("e")?t.x=-w8:-1!==e.indexOf("w")&&(t.x=w8),-1!==e.indexOf("s")?t.y=-w8:-1!==e.indexOf("n")&&(t.y=w8),t}x8.prototype.makeDraggable=function(e,t,n){var i=this._resize;function o(t){HX(t)&&i.activate(t,e,n)}HU["event"].bind(t,"mousedown",o),HU["event"].bind(t,"touchstart",o)},x8.prototype._createResizer=function(e,t,n,i){var o=this._getResizersParent(),r=S8(i),s=pY("g");oY(s).add(A8),oY(s).add(A8+"-"+e.id),oY(s).add(A8+"-"+i),GU(o,s);var a=pY("rect");ZU(a,{x:-_8/2+r.x,y:-_8/2+r.y,width:_8,height:_8}),oY(a).add(A8+"-visual"),GU(s,a);var l=pY("rect");return ZU(l,{x:-C8/2+r.x,y:-C8/2+r.y,width:C8,height:C8}),oY(l).add(A8+"-hit"),GU(s,l),gK(s,t,n),s},x8.prototype.createResizer=function(e,t){var n=f8(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},x8.prototype.addResizer=function(e){var t=this,n=this._resize;n.canResize({shape:e})&&Object(WU["forEach"])(E8,(function(n){t.createResizer(e,n)}))},x8.prototype.removeResizers=function(){var e=this._getResizersParent();aY(e)},x8.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},x8.$inject=["eventBus","canvas","selection","resize"];var k8={__depends__:[L1,E1,m4],__init__:["resize","resizePreview","resizeHandles"],resize:["type",d8],resizePreview:["type",y8],resizeHandles:["type",x8]};function D8(e,t){var n=t.create("bpmn:CategoryValue"),i=t.create("bpmn:Category",{categoryValue:[n]});return uG(e.get("rootElements"),i),y$(i).$parent=e,y$(n).$parent=i,n}function L8(e,t,n,i,o,r,s){function a(e,t){(t||G0(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Group"])||I8(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=o,this._textRenderer=s,i.registerProvider(this),e.on("element.dblclick",(function(e){a(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open"],(function(e){i.isActive()&&i.complete()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){r.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute,o=e.isTouch;o||i&&(t.hints&&!1===t.hints.createElementsBehavior||a(n))})),e.on("autoPlace.end",500,(function(e){a(e.shape)}))}function I8(e){return v$(e,"bpmn:SubProcess")&&!w$(e)}function N8(e){return v$(e,"bpmn:SubProcess")&&w$(e)}function M8(e){return v$(e,"bpmn:Participant")&&!w$(e)}function B8(e){return v$(e,"bpmn:Participant")&&w$(e)}function T8(e){return!e||!e.trim()}L8.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],L8.prototype.activate=function(e){var t=L$(e);if(void 0!==t){var n={text:t},i=this.getEditingBBox(e);Object(WU["assign"])(n,i);var o={};return(G0(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||I8(e))&&Object(WU["assign"])(o,{centerVertically:!0}),AX(e)&&Object(WU["assign"])(o,{autoResize:!0}),v$(e,"bpmn:TextAnnotation")&&Object(WU["assign"])(o,{resizable:!0,autoResize:!0}),Object(WU["assign"])(n,{options:o}),n}},L8.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),o={x:i.x+i.width/2,y:i.y+i.height/2},r={x:i.x,y:i.y},s=t.zoom(),a=this._textRenderer.getDefaultStyle(),l=this._textRenderer.getExternalStyle(),c=l.fontSize*s,h=l.lineHeight,u=a.fontSize*s,d=a.lineHeight,p={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};(v$(e,"bpmn:Lane")||B8(e))&&(Object(WU["assign"])(r,{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o.y-30*s/2}),Object(WU["assign"])(p,{fontSize:u+"px",lineHeight:d,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:"rotate(-90deg)"})),(G0(e,["bpmn:Task","bpmn:CallActivity"])||M8(e)||I8(e))&&(Object(WU["assign"])(r,{width:i.width,height:i.height}),Object(WU["assign"])(p,{fontSize:u+"px",lineHeight:d,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),N8(e)&&(Object(WU["assign"])(r,{width:i.width,x:i.x}),Object(WU["assign"])(p,{fontSize:u+"px",lineHeight:d,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var f=90*s,g=7*s,m=4*s;if(n.labelTarget&&(Object(WU["assign"])(r,{width:f,height:i.height+g+m,x:o.x-f/2,y:i.y-g}),Object(WU["assign"])(p,{fontSize:c+"px",lineHeight:h,paddingTop:g+"px",paddingBottom:m+"px"})),AX(n)&&!EX(n)&&!LX(n)){var b=kX(e),v=t.getAbsoluteBBox({x:b.x,y:b.y,width:0,height:0}),y=c+g+m;Object(WU["assign"])(r,{width:f,height:y,x:v.x-f/2,y:v.y-y/2}),Object(WU["assign"])(p,{fontSize:c+"px",lineHeight:h,paddingTop:g+"px",paddingBottom:m+"px"})}return v$(e,"bpmn:TextAnnotation")&&(Object(WU["assign"])(r,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),Object(WU["assign"])(p,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:u+"px",lineHeight:d})),{bounds:r,style:p}},L8.prototype.update=function(e,t,n,i){var o,r;if(v$(e,"bpmn:TextAnnotation")&&(r=this._canvas.getAbsoluteBBox(e),o={x:e.x,y:e.y,width:e.width/r.width*i.width,height:e.height/r.height*i.height}),v$(e,"bpmn:Group")){var s=y$(e);if(!s.categoryValueRef){var a=this._canvas.getRootElement(),l=y$(a).$parent,c=D8(l,this._bpmnFactory);y$(e).categoryValueRef=c}}T8(t)&&(t=null),this._modeling.updateLabel(e,t,o)};var O8="djs-element-hidden",R8="djs-label-hidden";function P8(e,t,n,i){var o,r,s,a=this,l=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var n=e.active;if(o=n.element.label||n.element,v$(o,"bpmn:TextAnnotation")){r=t.getAbsoluteBBox(o),s=pY("g");var c=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:0,my:0}}),h=a.path=pY("path");ZU(h,{d:c,strokeWidth:2,stroke:F8(o)}),GU(s,h),GU(l,s),mK(s,o.x,o.y)}v$(o,"bpmn:TextAnnotation")||o.labelTarget?t.addMarker(o,O8):(v$(o,"bpmn:Task")||v$(o,"bpmn:CallActivity")||v$(o,"bpmn:SubProcess")||v$(o,"bpmn:Participant"))&&t.addMarker(o,R8)})),e.on("directEditing.resize",(function(e){if(v$(o,"bpmn:TextAnnotation")){var t=e.height,n=e.dy,s=Math.max(o.height/r.height*(t+n),0),l=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:s,position:{mx:0,my:0}});ZU(a.path,{d:l})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,O8),t.removeMarker(o,R8)),o=void 0,r=void 0,s&&(sY(s),s=void 0)}))}function F8(e,t){var n=y$(e);return n.di.get("stroke")||t||"black"}P8.$inject=["eventBus","canvas","elementRegistry","pathMap"];var j8={__depends__:[h8,k8,i4],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",L8],labelEditingPreview:["type",P8]},z8=["top","bottom","left","right"],V8=10;function Q8(e,t){function n(e){if(EX(e)){var t=U8(e);t&&i(e,t)}}function i(e,n){var i=kG(e),o=e.label,r=kG(o);if(o.parent){var s,a=xG(e);switch(n){case"top":s={x:i.x,y:a.top-V8-o.height/2};break;case"left":s={x:a.left-V8-o.width/2,y:i.y};break;case"bottom":s={x:i.x,y:a.bottom+V8+o.height/2};break;case"right":s={x:a.right+V8+o.width/2,y:i.y};break}var l=qZ(s,r);t.moveShape(o,l)}}i1.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,o=i.source,r=i.target,s=t.hints||{};!1!==s.createElementsBehavior&&(n(o),n(r))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape,o=t.hints||{};!1!==o.createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements,o=t.hints||{};!1!==o.createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function W8(e){var t,n=e.host,i=kG(e),o=DG(i,n);t=o.indexOf("-")>=0?o.split("-"):[o];var r=z8.filter((function(e){return-1===t.indexOf(e)}));return r}function H8(e){var t=kG(e),n=[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return Y8(t,e)}));return n}function U8(e){var t=kG(e.label),n=kG(e),i=Y8(n,t);if(G8(i)){var o=H8(e);if(e.host){var r=W8(e);o=o.concat(r)}var s=z8.filter((function(e){return-1===o.indexOf(e)}));if(-1===s.indexOf(i))return s[0]}}function Y8(e,t){return DG(t,e,5)}function G8(e){return-1!==z8.indexOf(e)}function K8(e,t,n){i1.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(v$(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function q8(e,t){e.invoke(i1,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape,o=Object(WU["filter"])(i.incoming.concat(i.outgoing),(function(e){return v$(e,"bpmn:Association")}));Object(WU["forEach"])(o,(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}FU()(Q8,i1),Q8.$inject=["eventBus","modeling"],FU()(K8,i1),K8.$inject=["eventBus","elementFactory","bpmnRules"],FU()(q8,i1),q8.$inject=["injector","modeling"];var J8=500;function $8(e,t){t.invoke(i1,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",J8,(function(e){var t=e.elements;t=t.filter((function(e){var t=e.host;return Z8(e,t)})),1===t.length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var o=t[i];e.elements[i]=n.replaceShape(t[i],o)}))}),!0),this.preExecute("elements.move",J8,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var o=t[0];Z8(o,i)&&(e.shapes=[n.replaceShape(o,i)])}}),!0)}function X8(e){var t=y$(e),n=t.eventDefinitions;return n&&n[0]}function Z8(e,t){return!LX(e)&&G0(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}$8.$inject=["bpmnReplace","injector"],FU()($8,i1),$8.prototype.replaceShape=function(e,t){var n=X8(e),i={type:"bpmn:BoundaryEvent",host:t};return n&&(i.eventDefinitionType=n.$type),this._bpmnReplace.replaceElement(e,i,{layoutConnection:!1})};var e6=2e3;function t6(e,t,n){function i(e){return Object(WU["filter"])(e.attachers,(function(e){return v$(e,"bpmn:BoundaryEvent")}))}i1.call(this,e),this.postExecute("connection.create",(function(e){var t=e.context.source,o=e.context.target,r=i(o);v$(t,"bpmn:EventBasedGateway")&&v$(o,"bpmn:ReceiveTask")&&r.length>0&&n.removeElements(r)})),this.postExecute("connection.reconnect",(function(e){var t=e.context.oldSource,o=e.context.newSource;v$(t,"bpmn:Gateway")&&v$(o,"bpmn:EventBasedGateway")&&Object(WU["forEach"])(o.outgoing,(function(e){var t=e.target,o=i(t);v$(t,"bpmn:ReceiveTask")&&o.length>0&&n.removeElements(o)}))})),e.on("moddleCopy.canCopyProperty",e6,(function(e){var n=e.parent,i=e.property,o=e.propertyName,r=t.getPropertyDescriptor(n,o);r&&r.isReference&&v$(i,"bpmn:RootElement")&&n.set(o,i)}))}t6.$inject=["eventBus","moddle","modeling"],FU()(t6,i1);var n6=500;function i6(e,t,n,i,o){function r(e){return G0(e,["bpmn:ReceiveTask","bpmn:SendTask"])||o6(e,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function s(t){var n=e.getDefinitions(),i=n.get("rootElements");return!!Object(WU["find"])(i,Object(WU["matchPattern"])({id:t.id}))}function a(e){return v$(e,"bpmn:ErrorEventDefinition")?"errorRef":v$(e,"bpmn:EscalationEventDefinition")?"escalationRef":v$(e,"bpmn:MessageEventDefinition")?"messageRef":v$(e,"bpmn:SignalEventDefinition")?"signalRef":void 0}function l(e){if(G0(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.get("messageRef");var t=e.get("eventDefinitions"),n=t[0];return n.get(a(n))}function c(e,t){if(G0(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.set("messageRef",t);var n=e.get("eventDefinitions"),i=n[0];return i.set(a(i),t)}n.invoke(i1,this),this.executed("shape.create",(function(t){var n=t.shape;if(r(n)){var i,o=y$(n),a=l(o);a&&!s(a)&&(i=e.getDefinitions().get("rootElements"),uG(i,a),t.addedRootElement=a)}}),!0),this.reverted("shape.create",(function(t){var n=t.addedRootElement;if(n){var i=e.getDefinitions().get("rootElements");hG(i,n)}}),!0),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element;if(r(n)){var i=y$(n),o=l(i);o&&(t.referencedRootElement=o)}})),t.on("copyPaste.pasteElement",n6,(function(e){var t=e.descriptor,n=t.businessObject;if(r(n)){var a=t.referencedRootElement;a&&(s(a)||(a=i.copyElement(a,o.create(a.$type))),c(n,a))}}))}function o6(e,t){return Object(WU["isArray"])(t)||(t=[t]),Object(WU["some"])(t,(function(t){return A$(e,t)}))}function r6(e){e.invoke(i1,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;v$(n,"bpmn:Lane")&&!v$(i,"bpmn:Lane")&&(t.parent=K0(n,"bpmn:Participant"))}))}i6.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"],FU()(i6,i1),r6.$inject=["injector"],FU()(r6,i1);var s6=1500,a6=2e3;function l6(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],s6,(function(t){var i=t.context,o=i.shape||t.shape,r=t.hover;v$(r,"bpmn:Lane")&&!G0(o,["bpmn:Lane","bpmn:Participant"])&&(t.hover=e3(r),t.hoverGfx=e.getGraphics(t.hover));var s=n.getRootElement();r!==s&&(o.labelTarget||v$(o,"bpmn:Group"))&&(t.hover=s,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],s6,(function(t){var n=t.hover;v$(n,"bpmn:Lane")&&(t.hover=e3(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],s6,(function(t){var n=t.context,i=t.hover,o=n.type;v$(i,"bpmn:Lane")&&/reconnect/.test(o)&&(t.hover=e3(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],s6,(function(e){var t=e.context,n=t.start;v$(n,"bpmn:Lane")&&(t.start=e3(n)||n)})),t.on("shape.move.start",a6,(function(e){var t=e.shape;v$(t,"bpmn:Lane")&&(e.shape=e3(t)||t)}))}function c6(e,t,n){i1.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context,i=n.shape;if(v$(i,"bpmn:DataObjectReference")&&"label"!==i.type){var o=t.create("bpmn:DataObject");i.businessObject.dataObjectRef=o}}))}l6.$inject=["elementRegistry","eventBus","canvas"],c6.$inject=["eventBus","bpmnFactory","moddle"],FU()(c6,i1);var h6=20,u6=20,d6=30,p6=2e3;function f6(e,t,n){function i(t){var i,o=t.parent,r=e.getRootElement();v$(r,"bpmn:Collaboration")?i=r:(i=n.makeCollaboration(),t.process=o),t.parent=i}i1.call(this,t),t.on(["create.start","shape.move.start"],p6,(function(t){var n=t.context,i=n.shape,o=e.getRootElement();if(v$(i,"bpmn:Participant")&&v$(o,"bpmn:Process")&&o.children.length){var r=o.children.filter((function(e){return!v$(e,"bpmn:Group")&&!LX(e)&&!b6(e)}));if(r.length){var s=tG(r),a=g6(i,s);Object(WU["assign"])(i,a),n.createConstraints=m6(i,s)}}})),t.on("create.start",p6,(function(n){var i=n.context,o=i.shape,r=e.getRootElement(),s=e.getGraphics(r);function a(e){e.element=r,e.gfx=s}v$(o,"bpmn:Participant")&&v$(r,"bpmn:Process")&&(t.on("element.hover",p6,a),t.once("create.cleanup",(function(){t.off("element.hover",a)})))})),this.preExecute("shape.create",(function(e){var t=e.parent,n=e.shape;v$(n,"bpmn:Participant")&&v$(t,"bpmn:Process")&&i(e)}),!0),this.execute("shape.create",(function(e){var t=e.process,n=e.shape;t&&(e.oldProcessRef=n.businessObject.processRef,n.businessObject.processRef=t.businessObject)}),!0),this.revert("shape.create",(function(e){var t=e.process,n=e.shape;t&&(n.businessObject.processRef=e.oldProcessRef)}),!0),this.postExecute("shape.create",(function(e){var t=e.process,i=e.shape;if(t){var o=t.children.slice();n.moveElements(o,{x:0,y:0},i)}}),!0),this.preExecute("elements.create",p6,(function(e){var t,n=e.elements,o=e.parent,r=v6(n);r&&v$(o,"bpmn:Process")&&(i(e),t=v6(n),e.oldProcessRef=t.businessObject.processRef,t.businessObject.processRef=o.businessObject)}),!0),this.revert("elements.create",(function(e){var t,n=e.elements,i=e.process;i&&(t=v6(n),t.businessObject.processRef=e.oldProcessRef)}),!0),this.postExecute("elements.create",(function(e){var t,i=e.elements,o=e.process;if(o){t=v6(i);var r=o.children.slice();n.moveElements(r,{x:0,y:0},t)}}),!0)}function g6(e,t){t={width:t.width+2*h6+d6,height:t.height+2*u6};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}function m6(e,t){return t=xG(t),{bottom:t.top+e.height/2-u6,left:t.right-e.width/2+h6,top:t.bottom-e.height/2+u6,right:t.left+e.width/2-h6-d6}}function b6(e){return!!e.waypoints}function v6(e){return Object(WU["find"])(e,(function(e){return v$(e,"bpmn:Participant")}))}f6.$inject=["canvas","eventBus","modeling"],FU()(f6,i1);var y6="__targetRef_placeholder";function w6(e,t){function n(e,t,n){var i=e.get("dataInputAssociations");return Object(WU["find"])(i,(function(e){return e!==n&&e.targetRef===t}))}function i(e,n){var i=e.get("properties"),o=Object(WU["find"])(i,(function(e){return e.name===y6}));return!o&&n&&(o=t.create("bpmn:Property",{name:y6}),uG(i,o)),o}function o(e,t){var o=i(e);o&&(n(e,o,t)||hG(e.get("properties"),o))}function r(e){var t,n=e.context,r=n.connection,s=r.businessObject,a=r.target,l=a&&a.businessObject,c=n.newTarget,h=c&&c.businessObject,u=n.oldTarget||n.target,d=u&&u.businessObject,p=r.businessObject;d&&d!==l&&o(d,s),h&&h!==l&&o(h,s),l?(t=i(l,!0),p.targetRef=t):p.targetRef=null}i1.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],_6(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],_6(r))}function _6(e){return function(t){var n=t.context,i=n.connection;if(v$(i,"bpmn:DataInputAssociation"))return e(t)}}function C6(e){this._bpmnUpdater=e}function A6(e,t,n,i){function o(){return n.filter((function(e){return v$(e,"bpmn:Participant")&&y$(e).processRef}))[0]}function r(e){return e.children.filter((function(e){return v$(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function s(e,n){var i=e.businessObject||e;if(n=n||o(),n){var r=n.businessObject||n;t.execute("dataStore.updateContainment",{dataStoreBo:i,newSemanticParent:r.processRef||r,newDiParent:r.di})}}i1.call(this,i),t.registerHandler("dataStore.updateContainment",C6),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;v$(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes,i=n.filter((function(e){return v$(e,"bpmn:DataStoreReference")}));i.length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!v$(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=n.parent;v$(n,"bpmn:DataStoreReference")&&"label"!==n.type&&v$(i,"bpmn:Collaboration")&&s(n)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,o=n.parent;if(!v$(i,"bpmn:Collaboration")&&v$(n,"bpmn:DataStoreReference")&&"label"!==n.type&&v$(o,"bpmn:Collaboration")){var r=v$(i,"bpmn:Participant")?i:x6(i,"bpmn:Participant");s(n,r)}})),this.postExecute("shape.delete",(function(t){var n=t.context,i=n.shape,o=e.getRootElement();G0(i,["bpmn:Participant","bpmn:SubProcess"])&&v$(o,"bpmn:Collaboration")&&r(o).filter((function(e){return E6(e,i)})).forEach((function(e){s(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot,o=r(n);o.forEach((function(e){v$(i,"bpmn:Process")&&s(e,i)}))}))}function E6(e,t){var n=e.businessObject||e,i=t.businessObject||t;while(n.$parent){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}function x6(e,t){while(e.parent){if(v$(e.parent,t))return e.parent;e=e.parent}}w6.$inject=["eventBus","bpmnFactory"],FU()(w6,i1),C6.$inject=["bpmnUpdater"],C6.prototype.execute=function(e){var t=e.dataStoreBo,n=e.newSemanticParent,i=e.newDiParent;e.oldSemanticParent=t.$parent,e.oldDiParent=t.di.$parent,this._bpmnUpdater.updateSemanticParent(t,n),this._bpmnUpdater.updateDiParent(t.di,i)},C6.prototype.revert=function(e){var t=e.dataStoreBo,n=e.oldSemanticParent,i=e.oldDiParent;this._bpmnUpdater.updateSemanticParent(t,n),this._bpmnUpdater.updateDiParent(t.di,i)},A6.$inject=["canvas","commandStack","elementRegistry","eventBus"],FU()(A6,i1);var S6=500;function k6(e,t,n){function i(e,t){var i,o,r,s=Z5(t),a=[],l=[];($Y(s,(function(t){return t.y>e.y?l.push(t):a.push(t),t.children})),s.length)&&(i=l.length&&a.length?e.height/2:e.height,a.length&&(o=n.calculateAdjustments(a,"y",i,e.y-10),n.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:i},"s")),l.length&&(r=n.calculateAdjustments(l,"y",-i,e.y+e.height+10),n.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:-i},"n")))}i1.call(this,e),this.postExecuted("shape.delete",S6,(function(e){var t=e.context,n=t.hints,o=t.shape,r=t.oldParent;v$(o,"bpmn:Lane")&&(n&&n.nested||i(o,r))}))}k6.$inject=["eventBus","modeling","spaceTool"],FU()(k6,i1);var D6=500;function L6(e,t){t.invoke(i1,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",D6,(function(e){var t=e.elements;t.filter((function(e){var t=e.host;return N6(e,t)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n.replaceShape(t[i])}))}),!0),this.preExecute("elements.move",D6,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,o){var r=e.host;N6(e,M6(t,r)?r:i)&&(t[o]=n.replaceShape(e))}))}),!0)}function I6(e){var t=y$(e),n=t.eventDefinitions;return n&&n[0]}function N6(e,t){return!LX(e)&&v$(e,"bpmn:BoundaryEvent")&&!t}function M6(e,t){return-1!==e.indexOf(t)}function B6(e,t,n){function i(e,i,o){var r,s,a,l,c,h,u,d,p=i.waypoints,f=e.outgoing.slice(),g=e.incoming.slice();d=Object(WU["isNumber"])(o.width)?kG(o):o;var m=P1(p,d);if(m){if(r=p.slice(0,m.index),s=p.slice(m.index+(m.bendpoint?1:0)),!r.length||!s.length)return;a=m.bendpoint?p[m.index]:d,1!==r.length&&T6(e,r[r.length-1])||r.push(O6(a)),1!==s.length&&T6(e,s[0])||s.unshift(O6(a))}l=i.source,c=i.target,t.canConnect(l,e,i)&&(n.reconnectEnd(i,e,r||d),h=i),t.canConnect(e,c,i)&&(h?u=n.connect(e,c,{type:i.type,waypoints:s}):(n.reconnectStart(i,e,s||d),u=i));var b=[].concat(h&&Object(WU["filter"])(g,(function(e){return e.source===h.source}))||[],u&&Object(WU["filter"])(f,(function(e){return e.target===u.target}))||[]);b.length&&n.removeElements(b)}i1.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,o=e.delta,r=i[0];if(r&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var s=kG(r),a={x:s.x+o.x,y:s.y+o.y},l=Object(WU["find"])(n.children,(function(e){var n=t.canInsert(i,e);return n&&P1(e.waypoints,a)}));l&&(e.targetFlow=l,e.position=a)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,o=e.position;n&&i(t[0],n,o)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,o=e.position;n&&i(t,n,o)}),!0)}function T6(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function O6(e){return Object(WU["assign"])({},e)}function R6(e,t){i1.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.source,o=n.target,r=o.incoming.slice();n.hints&&!1===n.hints.createElementsBehavior||v$(i,"bpmn:EventBasedGateway")&&o.incoming.length&&r.filter(P6).forEach((function(e){t.removeConnection(e)}))})),this.preExecuted("shape.replace",(function(e){var n,i,o=e.context.newShape;v$(o,"bpmn:EventBasedGateway")&&(n=o.outgoing.filter(P6).map((function(e){return e.target})),i=n.reduce((function(e,t){var n=t.incoming.filter(P6);return e.concat(n)}),[]),i.forEach((function(e){e.source!==o&&t.removeConnection(e)})))}))}function P6(e){return v$(e,"bpmn:SequenceFlow")}L6.$inject=["bpmnReplace","injector"],FU()(L6,i1),L6.prototype.replaceShape=function(e){var t,n=I6(e);return t=n?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:n.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},FU()(B6,i1),B6.$inject=["eventBus","bpmnRules","modeling"],R6.$inject=["eventBus","modeling"],FU()(R6,i1);var F6=2e3;function j6(e,t,n,i,o,r){function s(){var e=t.getRootElement(),n=y$(e);return n.$parent}function a(e){var t=y$(e),n=t.categoryValueRef;if(n){var i=n.$parent;n&&(hG(i.categoryValue,n),i&&!i.categoryValue.length&&l(i))}}function l(e){var t=s();hG(t.get("rootElements"),e)}function c(){return n.filter((function(e){return v$(e,"bpmn:Group")}))}function h(e,t){return e.some((function(e){var n=y$(e);return n.categoryValueRef&&n.categoryValueRef===t}))}o.invoke(i1,this),this.executed("shape.delete",(function(e){var t=e.context,n=t.shape;if(v$(n,"bpmn:Group")){var i=y$(n),o=i.categoryValueRef,r=c();h(r,o)||a(n)}})),this.reverted("shape.delete",(function(e){var t=e.context,n=t.shape;if(v$(n,"bpmn:Group")){var i=y$(n),o=i.categoryValueRef,r=s(),a=o?o.$parent:null;uG(a.get("categoryValue"),o),uG(r.get("rootElements"),a)}})),this.execute("shape.create",(function(t){var n=t.context,i=n.shape,o=y$(i);if(v$(o,"bpmn:Group")&&!o.categoryValueRef){var r=s(),a=D8(r,e);o.categoryValueRef=a}})),this.revert("shape.create",(function(e){var t=e.context,n=t.shape;v$(n,"bpmn:Group")&&(a(n),delete y$(n).categoryValueRef)})),i.on("moddleCopy.canCopyProperty",F6,(function(t){var n,i=t.property;if(v$(i,"bpmn:CategoryValue"))return n=D8(s(),e),r.copyElement(i,n)}))}function z6(e,t,n,i){var o,r,s,a,l;return o=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y),0==o?null:(r=e.y-n.y,s=e.x-n.x,l=(i.x-n.x)*r-(i.y-n.y)*s,a=l/o,{x:Math.round(e.x+a*(t.x-e.x)),y:Math.round(e.y+a*(t.y-e.y))})}function V6(e){function t(e,t,n){var i,o={x:n.x,y:n.y-50},r={x:n.x-50,y:n.y},s=z6(e,t,n,o),a=z6(e,t,n,r);i=s&&a?Q6(s,n)>Q6(a,n)?a:s:s||a,e.original=i}function n(e){var n=e.waypoints;t(n[0],n[1],kG(e.source)),t(n[n.length-1],n[n.length-2],kG(e.target))}e.on("bpmnElement.added",(function(e){var t=e.element;t.waypoints&&n(t)}))}function Q6(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function W6(e){i1.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=y$(e.context.shape);G0(n,t)&&!n.di.get("isHorizontal")&&n.di.set("isHorizontal",!0)}))}function H6(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function U6(e){return Math.atan((e[1].y-e[0].y)/(e[1].x-e[0].x))}function Y6(e,t){return t?{x:Math.cos(t)*e.x-Math.sin(t)*e.y,y:Math.sin(t)*e.x+Math.cos(t)*e.y}:e}function G6(e,t,n){var i=[{n:e[0]-n[0],lambda:t[0]},{n:e[1]-n[1],lambda:t[1]}],o=i[0].n*t[0]+i[1].n*t[1],r=i[0].lambda*t[0]+i[1].lambda*t[1];return-o/r}function K6(e,t){var n=t[0],i=t[1],o={x:i.x-n.x,y:i.y-n.y},r=G6([n.x,n.y],[o.x,o.y],[e.x,e.y]);return{x:n.x+r*o.x,y:n.y+r*o.y}}function q6(e,t){var n=K6(e,t),i={x:n.x-e.x,y:n.y-e.y};return H6(i)}function J6(e,t){return H6({x:e.x-t.x,y:e.y-t.y})}j6.$inject=["bpmnFactory","canvas","elementRegistry","eventBus","injector","moddleCopy"],FU()(j6,i1),V6.$inject=["eventBus"],W6.$inject=["eventBus"],FU()(W6,i1);var $6=Math.sqrt,X6=Math.min,Z6=Math.max,e9=Math.abs;function t9(e){return Math.pow(e,2)}function n9(e,t){return $6(t9(e.x-t.x)+t9(e.y-t.y))}function i9(e,t){var n,i,o,r,s,a,l,c,h,u,d,p=0;for(p=0;p<t.length-1;p++){if(n=t[p],i=t[p+1],c9(n,i)?l=[n]:(o=n9(e,n),r=n9(e,i),a=X6(o,r),l=o9(n,i,e,a)),l.length<1)throw new Error("expected between [1, 2] circle -> line intersections");1===l.length&&(c={type:"bendpoint",position:l[0],segmentIndex:p,bendpointIndex:c9(n,l[0])?p:p+1}),2===l.length&&(s=a9(l[0],l[1]),c={type:"segment",position:s,segmentIndex:p,relativeLocation:n9(n,s)/n9(n,i)}),h=n9(c.position,e),(!d||u>h)&&(d=c,u=h)}return d}function o9(e,t,n,i){var o=t.x-e.x,r=t.y-e.y,s=n.x-e.x,a=n.y-e.y,l=o*o+r*r,c=o*s+r*a,h=s*s+a*a-i*i,u=c/l,d=h/l,p=u*u-d;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var f=$6(p),g=-u+f,m=-u-f,b={x:e.x-o*g,y:e.y-r*g};if(0===p)return[b];var v={x:e.x-o*m,y:e.y-r*m};return[b,v].filter((function(n){return r9(n,e,t)}))}function r9(e,t,n){return s9(e.x,t.x,n.x)&&s9(e.y,t.y,n.y)}function s9(e,t,n){return e>=X6(t,n)-l9&&e<=Z6(t,n)+l9}function a9(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}var l9=.1;function c9(e,t){return e9(e.x-t.x)<=l9&&e9(e.y-t.y)<=l9}function h9(e,t,n,i){var o=n.segmentIndex,r=t.length-e.length;if(i.segmentMove){var s=i.segmentMove.segmentStartIndex,a=i.segmentMove.newSegmentStartIndex;return o===s?a:o>=a?o+r<a?a:o+r:o}if(i.bendpointMove){var l,c=i.bendpointMove.insert,h=i.bendpointMove.bendpointIndex;if(0===r)return o;if(o>=h&&(l=c?o+1:o-1),o<h&&(l=o,c&&"bendpoint"!==n.type&&h-1===o)){var u=d9(t,h);u<n.relativeLocation&&l++}return l}return 0===r?o:i.connectionStart?0===o?0:null:i.connectionEnd&&o===e.length-2?t.length-2:null}function u9(e,t,n,i){var o=0,r=0,s=p9(e),a=i9(s,n),l=a.segmentIndex,c=h9(n,t,a,i);if(null===c)return{x:o,y:r};if(c<0||c>t.length-2)return{x:o,y:r};var h=g9(n,l),u=g9(t,c),d=a.position,p=m9(h,d),f=f9(h,u);if("bendpoint"===a.type){var g=t.length-n.length,m=a.bendpointIndex,b=n[m];if(-1!==t.indexOf(b))return{x:o,y:r};if(0===g){var v=t[m];return{x:v.x-a.position.x,y:v.y-a.position.y}}g<0&&0!==m&&m<n.length-1&&(p=d9(n,m))}var y={x:(u[1].x-u[0].x)*p+u[0].x,y:(u[1].y-u[0].y)*p+u[0].y},w=Y6({x:s.x-d.x,y:s.y-d.y},f);return o=y.x+w.x-s.x,r=y.y+w.y-s.y,EG({x:o,y:r})}function d9(e,t){var n=J6(e[t-1],e[t]),i=J6(e[t],e[t+1]),o=n/(n+i);return o}function p9(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function f9(e,t){var n=U6(e),i=U6(t);return i-n}function g9(e,t){return[e[t],e[t+1]]}function m9(e,t){var n=J6(e[0],e[1]),i=J6(e[0],t);return 0===n?0:i/n}function b9(e,t,n){var i=KZ(t),o=KZ(n),r=qZ(e,i),s={x:r.x*(n.width/t.width),y:r.y*(n.height/t.height)};return EG({x:o.x+s.x,y:o.y+s.y})}function v9(e,t,n){var i=KZ(e),o=KZ(t),r=KZ(n),s=qZ(e,i),a=qZ(i,o),l=y9(i,t,n);if(l)return l;var c={x:a.x*(n.width/t.width),y:a.y*(n.height/t.height)},h={x:r.x+c.x,y:r.y+c.y};return EG({x:h.x+s.x-e.x,y:h.y+s.y-e.y})}function y9(e,t,n){var i=xG(t),o=xG(n);if(w9(i,o))return null;var r,s,a,l=DG(t,e);if("top"===l)r={x:0,y:o.bottom-i.bottom};else if("bottom"===l)r={x:0,y:o.top-i.top};else if("right"===l)r={x:o.left-i.left,y:0};else{if("left"!==l)return null;r={x:o.right-i.right,y:0}}return s={x:e.x+r.x,y:e.y+r.y},a=DG(n,s),a!==l?null:r}function w9(e,t){return _9(e,t)||C9(e,t)}function _9(e,t){return e.right!==t.right&&e.left!==t.left}function C9(e,t){return e.top!==t.top&&e.bottom!==t.bottom}var A9={width:90,height:20},E9="name",x9="text";function S9(e,t,n,i){function o(e){var t=e.context,n=t.connection,i=n.label,o=Object(WU["assign"])({},t.hints),r=t.newWaypoints||n.waypoints,s=t.oldWaypoints;return"undefined"===typeof o.startChanged&&(o.startChanged=!!o.connectionStart),"undefined"===typeof o.endChanged&&(o.endChanged=!!o.connectionEnd),u9(i,r,s,o)}i1.call(this,e),this.postExecute("element.updateProperties",(function(e){var n=e.context,o=n.element,r=n.properties;if(E9 in r&&t.updateLabel(o,r[E9]),x9 in r&&v$(o,"bpmn:TextAnnotation")){var s=i.getTextAnnotationBounds({x:o.x,y:o.y,width:o.width,height:o.height},r[x9]||"");t.updateLabel(o,r.text,s)}})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context,o=n.hints||{};if(!1!==o.createElementsBehavior){var r=n.shape||n.connection,s=r.businessObject;if(!LX(r)&&AX(r)&&L$(r)){var a=kX(r),l=i.getExternalLabelBounds(A9,L$(r));t.createLabel(r,a,{id:s.id+"_label",businessObject:s,width:l.width,height:l.height})}}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,o=n.hints||{};i&&!1!==o.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["label.create"],(function(e){var t,i,o=e.context,r=o.shape;r.labelTarget&&v$(r.labelTarget||r,"bpmn:BaseElement")&&(t=r.businessObject,i=t.di,i.label||(i.label=n.create("bpmndi:BPMNLabel",{bounds:n.create("dc:Bounds")})),Object(WU["assign"])(i.label.bounds,{x:r.x,y:r.y,width:r.width,height:r.height}))})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context,i=n.hints||{};if(!1!==i.labelBehavior){var r,s=n.connection,a=s.label;a&&a.parent&&(r=o(e),t.moveShape(a,r))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,o=y$(n);o&&AX(o)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n=e.context,i=n.shape,o=n.newBounds,r=n.oldBounds;if(EX(i)){var s=i.label,a=kG(s),l=L9(r),c=D9(a,l),h=k9(c,r,o);t.moveShape(s,h)}}))}function k9(e,t,n){var i=b9(e,t,n);return EG(qZ(i,e))}function D9(e,t){if(t.length){var n=I9(e,t);return K6(e,n)}}function L9(e){return[[{x:e.x,y:e.y},{x:e.x+(e.width||0),y:e.y}],[{x:e.x+(e.width||0),y:e.y},{x:e.x+(e.width||0),y:e.y+(e.height||0)}],[{x:e.x,y:e.y+(e.height||0)},{x:e.x+(e.width||0),y:e.y+(e.height||0)}],[{x:e.x,y:e.y},{x:e.x,y:e.y+(e.height||0)}]]}function I9(e,t){var n=t.map((function(t){return{line:t,distance:q6(e,t)}})),i=Object(WU["sortBy"])(n,"distance");return i[0].line}function N9(e,t,n){var i=R9(e),o=P9(i,t),r=i[0];return o.length?o[o.length-1]:b9(r.original||r,n,t)}function M9(e,t,n){var i=R9(e),o=P9(i,t),r=i[i.length-1];return o.length?o[0]:b9(r.original||r,n,t)}function B9(e,t,n){var i=R9(e),o=O9(t,n),r=i[0];return b9(r.original||r,o,t)}function T9(e,t,n){var i=R9(e),o=O9(t,n),r=i[i.length-1];return b9(r.original||r,o,t)}function O9(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function R9(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function P9(e,t){var n=Object(WU["map"])(e,j9);return Object(WU["filter"])(n,(function(e){return F9(e,t)}))}function F9(e,t){return"intersect"===DG(t,e,1)}function j9(e){return e.original||e}function z9(e,t){i1.call(this,e),this.postExecute("shape.replace",(function(e){var n=e.oldShape,i=e.newShape;if(V9(n,i)){var o=Q9(n);o.incoming.forEach((function(e){var o=M9(e,i,n);t.reconnectEnd(e,i,o)})),o.outgoing.forEach((function(e){var o=N9(e,i,n);t.reconnectStart(e,i,o)}))}}),!0)}function V9(e,t){return v$(e,"bpmn:Participant")&&w$(e)&&v$(t,"bpmn:Participant")&&!w$(t)}function Q9(e){var t=ZY([e],!1),n=[],i=[];return t.forEach((function(t){t!==e&&(t.incoming.forEach((function(e){v$(e,"bpmn:MessageFlow")&&n.push(e)})),t.outgoing.forEach((function(e){v$(e,"bpmn:MessageFlow")&&i.push(e)})))}),[]),{incoming:n,outgoing:i}}FU()(S9,i1),S9.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],z9.$inject=["eventBus","modeling"],FU()(z9,i1);var W9="flow elements must be children of pools/participants";function H9(e,t,n){function i(e,n,i){t.add({position:{x:e.x+5,y:e.y+5},type:"error",timeout:i||2e3,html:"<div>"+n+"</div>"})}e.on(["shape.move.rejected","create.rejected"],(function(e){var t=e.context,o=t.shape,r=t.target;v$(r,"bpmn:Collaboration")&&v$(o,"bpmn:FlowNode")&&i(e,n(W9))}))}function U9(e,t,n,i){i1.call(this,e);var o=i.get("dragging",!1);function r(e){var i,o,r=e.source,s=e.target,a=e.parent;a&&(v$(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(r,s)||(o=!0),n.canConnectMessageFlow(r,s)&&(i="bpmn:MessageFlow")),v$(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(r,s)||(o=!0),n.canConnectSequenceFlow(r,s)&&(i="bpmn:SequenceFlow")),v$(e,"bpmn:Association")&&!n.canConnectAssociation(r,s)&&(o=!0),o&&t.removeConnection(e),i&&t.connect(r,s,{type:i,waypoints:e.waypoints.slice()}))}function s(e){var i,r,s=e.context,l=s.connection,c=s.newSource||l.source,h=s.newTarget||l.target;i=n.canConnect(c,h),i&&i.type!==l.type&&(r=t.connect(c,h,{type:i.type,waypoints:l.waypoints.slice()}),t.removeConnection(l),s.connection=r,o&&a(l,r))}function a(e,t){var n,i=o.context(),r=i&&i.payload.previousSelection;r&&r.length&&(n=r.indexOf(e),-1!==n&&r.splice(n,1,t))}this.postExecuted("elements.move",(function(e){var t=e.closure,n=t.allConnections;Object(WU["forEach"])(n,r)}),!0),this.preExecute("connection.reconnect",s),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,o=i.properties,r=i.element,s=r.businessObject;o.default&&(n=Object(WU["find"])(r.outgoing,Object(WU["matchPattern"])({id:r.businessObject.default.id})),n&&t.updateProperties(n,{conditionExpression:void 0})),o.conditionExpression&&s.sourceRef.default===s&&t.updateProperties(r.source,{default:void 0})}))}function Y9(e,t){i1.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;v$(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;n&&!n.businessObject.participants.length&&t.makeProcess()}),!0)}function G9(e,t,n,i,o,r){i.invoke(i1,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=r,this.postExecuted(["elements.create"],500,(function(e){var n=e.context,i=n.parent,o=n.elements,r=t.canReplace(o,i);r&&this.replaceElements(o,r.replacements)}),this),this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,o=n.newHost,r=[];Object(WU["forEach"])(n.closure.topLevel,(function(e){r=C$(e)?r.concat(e.children):r.concat(e)})),1===r.length&&o&&(i=o);var s=t.canReplace(r,i);s&&this.replaceElements(r,s.replacements,o)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,o=i.oldShape,r=i.newShape,s=o.attachers;s&&s.length&&(n=t.canReplace(s,r),this.replaceElements(s,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;o.unclaimId(n.businessObject.id,n.businessObject),o.updateProperties(i,{id:n.id})}))}H9.$inject=["eventBus","tooltips","translate"],FU()(U9,i1),U9.$inject=["eventBus","modeling","bpmnRules","injector"],Y9.$inject=["eventBus","modeling"],FU()(Y9,i1),FU()(G9,i1),G9.prototype.replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,o=this._selection;Object(WU["forEach"])(t,(function(t){var o={type:t.newElementType},r=n.get(t.oldElementId),s=e.indexOf(r);e[s]=i.replaceElement(r,o,{select:!1})})),t&&o.select(e)},G9.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var K9=1500,q9={width:300,height:60},J9={width:300,height:150},$9={width:140,height:120},X9={width:50,height:30};function Z9(e){e.on("resize.start",K9,(function(e){var t=e.context,n=t.shape,i=t.direction,o=t.balanced;(v$(n,"bpmn:Lane")||v$(n,"bpmn:Participant"))&&(t.resizeConstraints=h7(n,i,o)),v$(n,"bpmn:Participant")&&(t.minDimensions=J9),v$(n,"bpmn:SubProcess")&&w$(n)&&(t.minDimensions=$9),v$(n,"bpmn:TextAnnotation")&&(t.minDimensions=X9)}))}Z9.$inject=["eventBus"];var e7=Math.abs,t7=Math.min,n7=Math.max;function i7(e,t,n,i){var o=e[t];e[t]=void 0===o?n:i(n,o)}function o7(e,t,n){return i7(e,t,n,t7)}function r7(e,t,n){return i7(e,t,n,n7)}var s7=20,a7=50,l7=20,c7=20;function h7(e,t,n){var i=e3(e),o=!0,r=!0,s=X5(i,[i]),a=xG(e),l={},c={};/e/.test(t)?c.right=a.left+q9.width:/w/.test(t)&&(c.left=a.right-q9.width),s.forEach((function(e){var i=xG(e);/n/.test(t)&&(i.top<a.top-10&&(o=!1),n&&e7(a.top-i.bottom)<10&&r7(l,"top",i.top+q9.height),e7(a.top-i.top)<5&&o7(c,"top",i.bottom-q9.height)),/s/.test(t)&&(i.bottom>a.bottom+10&&(r=!1),n&&e7(a.bottom-i.top)<10&&o7(l,"bottom",i.bottom-q9.height),e7(a.bottom-i.bottom)<5&&r7(c,"bottom",i.top+q9.height))}));var h=i.children.filter((function(e){return!e.hidden&&!e.waypoints&&(v$(e,"bpmn:FlowElement")||v$(e,"bpmn:Artifact"))}));return h.forEach((function(e){var n=xG(e);o&&/n/.test(t)&&o7(c,"top",n.top-l7),/e/.test(t)&&r7(c,"right",n.right+s7),r&&/s/.test(t)&&r7(c,"bottom",n.bottom+c7),/w/.test(t)&&o7(c,"left",n.left-a7)})),{min:c,max:l}}var u7=1001;function d7(e,t){e.on("resize.start",u7+500,(function(e){var t=e.context,n=t.shape;(v$(n,"bpmn:Lane")||v$(n,"bpmn:Participant"))&&(t.balanced=!YX(e))})),e.on("resize.end",u7,(function(e){var n=e.context,i=n.shape,o=n.canExecute,r=n.newBounds;if(v$(i,"bpmn:Lane")||v$(i,"bpmn:Participant"))return o&&(r=AG(r),t.resizeLane(i,r,n.balanced)),!1}))}function p7(e,t,n){i1.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var o=i.incoming[0],r=i.outgoing[0];if(v$(o,"bpmn:SequenceFlow")&&v$(r,"bpmn:SequenceFlow")&&t.canConnect(o.source,r.target,o)){var s=g7(o.waypoints,r.waypoints);n.reconnectEnd(o,r.target,s)}}}))}function f7(e){return e.original||e}function g7(e,t){var n=z6(f7(e[e.length-2]),f7(e[e.length-1]),f7(t[1]),f7(t[0]));return n?[].concat(e.slice(0,e.length-1),[n],t.slice(1)):[f7(e[0]),f7(t[t.length-1])]}d7.$inject=["eventBus","modeling"],FU()(p7,i1),p7.$inject=["eventBus","bpmnRules","modeling"];var m7=Math.max;function b7(e){e.on("spaceTool.getMinDimensions",(function(e){var t=e.shapes,n=e.axis,i=e.start,o={};return Object(WU["forEach"])(t,(function(e){var t=e.id;v$(e,"bpmn:Participant")&&(v7(n)?o[t]=J9:o[t]={width:J9.width,height:y7(e,i)}),v$(e,"bpmn:SubProcess")&&w$(e)&&(o[t]=$9),v$(e,"bpmn:TextAnnotation")&&(o[t]=X9)})),o}))}function v7(e){return"x"===e}function y7(e,t){var n;return w7(e)?(n=_7(e,t),m7(J9.height,n)):J9.height}function w7(e){return!!Z5(e).length}function _7(e,t){var n,i=Z5(e);return n=C7(i,t),e.height-n.height+q9.height}function C7(e,t){var n,i,o;for(n=0;n<e.length;n++)if(i=e[n],t>=i.y&&t<=i.y+i.height)return o=Z5(i),o.length?C7(o,t):i}function A7(e,t){e.invoke(i1,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(v$(i,"bpmn:SubProcess")&&v$(n,"bpmn:Task")&&w$(i)){var o=E7(i);t.createShape({type:"bpmn:StartEvent"},o,i)}}))}function E7(e){return{x:e.x+e.width/6,y:e.y+e.height/2}}b7.$inject=["eventBus"],A7.$inject=["injector","modeling"],FU()(A7,i1);var x7=500;function S7(e,t,n,i){function o(e){e.length&&e.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)}))}function r(e,t){var n,i,o=e.children,r=t;return n=k7(o).concat([e]),i=G5(n),i?(r.width=Math.max(i.width,r.width),r.height=Math.max(i.height,r.height),r.x=i.x+(i.width-r.width)/2,r.y=i.y+(i.height-r.height)/2):(r.x=e.x+(e.width-r.width)/2,r.y=e.y+(e.height-r.height)/2),r}function s(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}i1.call(this,e),this.executed(["shape.toggleCollapse"],x7,(function(e){var t=e.context,n=t.shape;v$(n,"bpmn:SubProcess")&&(n.collapsed?y$(n).di.isExpanded=!1:(o(n.children),y$(n).di.isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],x7,(function(e){var t=e.context,n=t.shape;n.collapsed?y$(n).di.isExpanded=!1:y$(n).di.isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],x7,(function(e){var i,o=e.context.shape,a=t._getDefaultSize(o);i=o.collapsed?s(o,a):r(o,a),n.resizeShape(o,i,null,{autoResize:!o.collapsed&&"nwse"})}))}function k7(e){return e.filter((function(e){return!e.hidden}))}function D7(e,t,n,i){t.invoke(i1,this),this.preExecute("shape.delete",(function(e){var t=e.context,o=t.shape,r=o.businessObject;LX(o)||(v$(o,"bpmn:Participant")&&w$(o)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context,n=t.connection,o=n.businessObject;i.unclaimId(o.id,o)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement(),i=t.businessObject;n.ids.unclaim(i.id)}))}FU()(S7,i1),S7.$inject=["eventBus","elementFactory","modeling"],FU()(D7,i1),D7.$inject=["canvas","injector","moddle","modeling"];var L7=500,I7=5e3;function N7(e,t,n){var i;function o(){return i=i||new M7,i.enter(),i}function r(){if(!i)throw new Error(n("out of bounds release"));return i}function s(){if(!i)throw new Error(n("out of bounds release"));var e=i.leave();return e&&(t.updateLaneRefs(i.flowNodes,i.lanes),i=null),e}i1.call(this,e);var a=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(a,I7,(function(e){o()})),this.postExecuted(a,L7,(function(e){s()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context,n=t.shape,i=r();n.labelTarget||(v$(n,"bpmn:Lane")&&i.addLane(n),v$(n,"bpmn:FlowNode")&&i.addFlowNode(n))}))}function M7(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}function B7(e,t){i1.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context,i=n.connection,o=i.source;T7(i,o)&&t.updateProperties(o,{default:null})}))}function T7(e,t){if(!v$(e,"bpmn:SequenceFlow"))return!1;var n=y$(t),i=y$(e);return n.get("default")===i}N7.$inject=["eventBus","modeling","translate"],FU()(N7,i1),FU()(B7,i1),B7.$inject=["eventBus","modeling"];var O7={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","rootElementReferenceBehavior","createBehavior","fixHoverBehavior","createDataObjectBehavior","createParticipantBehavior","dataStoreBehavior","dataInputAssociationBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","messageFlowBehavior","modelingFeedback","removeElementBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","toggleElementCollapseBehaviour","spaceToolBehavior","subProcessStartEventBehavior","unclaimIdBehavior","unsetDefaultFlowBehavior","updateFlowNodeRefsBehavior"],adaptiveLabelPositioningBehavior:["type",Q8],appendBehavior:["type",K8],associationBehavior:["type",q8],attachEventBehavior:["type",$8],boundaryEventBehavior:["type",t6],rootElementReferenceBehavior:["type",i6],createBehavior:["type",r6],fixHoverBehavior:["type",l6],createDataObjectBehavior:["type",c6],createParticipantBehavior:["type",f6],dataInputAssociationBehavior:["type",w6],dataStoreBehavior:["type",A6],deleteLaneBehavior:["type",k6],detachEventBehavior:["type",L6],dropOnFlowBehavior:["type",B6],eventBasedGatewayBehavior:["type",R6],groupBehavior:["type",j6],importDockingFix:["type",V6],isHorizontalFix:["type",W6],labelBehavior:["type",S9],messageFlowBehavior:["type",z9],modelingFeedback:["type",H9],replaceConnectionBehavior:["type",U9],removeParticipantBehavior:["type",Y9],replaceElementBehaviour:["type",G9],resizeBehavior:["type",Z9],resizeLaneBehavior:["type",d7],removeElementBehavior:["type",p7],toggleElementCollapseBehaviour:["type",S7],spaceToolBehavior:["type",b7],subProcessStartEventBehavior:["type",A7],unclaimIdBehavior:["type",D7],updateFlowNodeRefsBehavior:["type",N7],unsetDefaultFlowBehavior:["type",B7]};function R7(e,t){var n=DG(e,t,-15);return"intersect"!==n?n:null}function P7(e){h1.call(this,e)}function F7(e){return j7(e)?null:G0(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}function j7(e){return!e||LX(e)}function z7(e,t){return e===t}function V7(e){do{if(v$(e,"bpmn:Process"))return y$(e);if(v$(e,"bpmn:Participant"))return y$(e).processRef||y$(e)}while(e=e.parent)}function Q7(e){return v$(e,"bpmn:TextAnnotation")}function W7(e){return v$(e,"bpmn:Group")&&!e.labelTarget}function H7(e){return v$(e,"bpmn:BoundaryEvent")&&$7(e,"bpmn:CompensateEventDefinition")}function U7(e){return y$(e).isForCompensation}function Y7(e,t){var n=V7(e),i=V7(t);return n===i}function G7(e){return v$(e,"bpmn:InteractionNode")&&!v$(e,"bpmn:BoundaryEvent")&&(!v$(e,"bpmn:Event")||v$(e,"bpmn:ThrowEvent")&&X7(e,"bpmn:MessageEventDefinition"))}function K7(e){return v$(e,"bpmn:InteractionNode")&&!U7(e)&&(!v$(e,"bpmn:Event")||v$(e,"bpmn:CatchEvent")&&X7(e,"bpmn:MessageEventDefinition"))&&!(v$(e,"bpmn:BoundaryEvent")&&!$7(e,"bpmn:MessageEventDefinition"))}function q7(e){var t=e;while(t=t.parent){if(v$(t,"bpmn:FlowElementsContainer"))return y$(t);if(v$(t,"bpmn:Participant"))return y$(t).processRef}return null}function J7(e,t){var n=q7(e),i=q7(t);return n===i}function $7(e,t){var n=y$(e);return!!Object(WU["find"])(n.eventDefinitions||[],(function(e){return v$(e,t)}))}function X7(e,t){var n=y$(e);return(n.eventDefinitions||[]).every((function(e){return v$(e,t)}))}function Z7(e){return v$(e,"bpmn:FlowNode")&&!v$(e,"bpmn:EndEvent")&&!C$(e)&&!(v$(e,"bpmn:IntermediateThrowEvent")&&$7(e,"bpmn:LinkEventDefinition"))&&!H7(e)&&!U7(e)}function eee(e){return v$(e,"bpmn:FlowNode")&&!v$(e,"bpmn:StartEvent")&&!v$(e,"bpmn:BoundaryEvent")&&!C$(e)&&!(v$(e,"bpmn:IntermediateCatchEvent")&&$7(e,"bpmn:LinkEventDefinition"))&&!U7(e)}function tee(e){return v$(e,"bpmn:ReceiveTask")||v$(e,"bpmn:IntermediateCatchEvent")&&($7(e,"bpmn:MessageEventDefinition")||$7(e,"bpmn:TimerEventDefinition")||$7(e,"bpmn:ConditionalEventDefinition")||$7(e,"bpmn:SignalEventDefinition"))}function nee(e){return e.waypoints}function iee(e){var t=[];while(e)e=e.parent,e&&t.push(e);return t}function oee(e,t){var n=iee(t);return-1!==n.indexOf(e)}function ree(e,t,n){if(j7(e)||j7(t))return null;if(!v$(n,"bpmn:DataAssociation")){if(Cee(e,t))return{type:"bpmn:MessageFlow"};if(Aee(e,t))return{type:"bpmn:SequenceFlow"}}var i=Eee(e,t);return i||(H7(e)&&U7(t)?{type:"bpmn:Association",associationDirection:"One"}:!!_ee(e,t)&&{type:"bpmn:Association"})}function see(e,t,n){return!(!LX(e)&&!W7(e))||!(v$(t,"bpmn:Participant")&&!w$(t))&&(v$(e,"bpmn:Participant")?v$(t,"bpmn:Process")||v$(t,"bpmn:Collaboration"):G0(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:v$(e,"bpmn:Lane")?v$(t,"bpmn:Participant")||v$(t,"bpmn:Lane"):!(v$(e,"bpmn:BoundaryEvent")&&!aee(e))&&(v$(e,"bpmn:FlowElement")&&!v$(e,"bpmn:DataStoreReference")?v$(t,"bpmn:FlowElementsContainer")?w$(t):G0(t,["bpmn:Participant","bpmn:Lane"]):v$(e,"bpmn:DataStoreReference")&&v$(t,"bpmn:Collaboration")?Object(WU["some"])(y$(t).get("participants"),(function(e){return!!e.get("processRef")})):G0(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?G0(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!v$(e,"bpmn:MessageFlow")&&(v$(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)))}function aee(e){return y$(e).cancelActivity&&(uee(e)||dee(e))}function lee(e){return!LX(e)&&v$(e,"bpmn:BoundaryEvent")}function cee(e){return v$(e,"bpmn:Lane")}function hee(e){return!!lee(e)||(!(!v$(e,"bpmn:IntermediateThrowEvent")||!uee(e))||v$(e,"bpmn:IntermediateCatchEvent")&&dee(e))}function uee(e){var t=y$(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function dee(e){return pee(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function pee(e,t){return t.some((function(t){return $7(e,t)}))}function fee(e){return v$(e,"bpmn:ReceiveTask")&&Object(WU["find"])(e.incoming,(function(e){return v$(e.source,"bpmn:EventBasedGateway")}))}function gee(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var o=e[0];return!LX(o)&&(!!hee(o)&&(!C$(t)&&(!(!v$(t,"bpmn:Activity")||U7(t))&&(!(i&&!R7(i,t))&&(!fee(t)&&"attach")))))}function mee(e,t,n){if(!t)return!1;var i={replacements:[]};return Object(WU["forEach"])(e,(function(e){C$(t)||v$(e,"bpmn:StartEvent")&&"label"!==e.type&&see(e,t)&&(_$(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),(E$(e)||x$(e)||S$(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),pee(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&v$(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),v$(t,"bpmn:Transaction")||$7(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(v$(e,"bpmn:EndEvent")&&see(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),v$(e,"bpmn:BoundaryEvent")&&gee(e,t,null,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function bee(e,t){return!Object(WU["some"])(e,cee)&&(!t||e.every((function(e){return see(e,t)})))}function vee(e,t,n,i){return!!t&&(!(!LX(e)&&!W7(e))||!z7(n,t)&&((!n||!oee(n,t))&&(see(e,t,i)||xee(e,t,i))))}function yee(e,t){return v$(e,"bpmn:SubProcess")?w$(e)&&(!t||t.width>=100&&t.height>=80):v$(e,"bpmn:Lane")?!t||t.width>=130&&t.height>=60:v$(e,"bpmn:Participant")?!t||t.width>=250&&t.height>=50:!!Q7(e)||!!W7(e)}function wee(e,t){var n=Q7(e),i=Q7(t);return(n||i)&&n!==i}function _ee(e,t){return!nee(e)&&!nee(t)&&(!(!H7(e)||!U7(t))||!oee(t,e)&&!oee(e,t)&&(!!wee(e,t)||!!Eee(e,t)))}function Cee(e,t){return!(Iee(e)&&!Iee(t))&&(G7(e)&&K7(t)&&!Y7(e,t))}function Aee(e,t){return!(tee(t)&&t.incoming.length>0&&Lee(t.incoming)&&!v$(e,"bpmn:EventBasedGateway"))&&(Z7(e)&&eee(t)&&J7(e,t)&&!(v$(e,"bpmn:EventBasedGateway")&&!tee(t)))}function Eee(e,t){return G0(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&G0(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!G0(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!G0(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function xee(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(G0(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!LX(t)&&v$(e,"bpmn:FlowNode")&&!v$(e,"bpmn:BoundaryEvent")&&see(e,t.parent,n))}function See(e,t){return e&&t&&-1!==e.indexOf(t)}function kee(e,t){return!!LX(t)||!(v$(t,"bpmn:Lane")&&!See(e,t.parent))}function Dee(e){if(e&&e.source)return v$(e.source,"bpmn:EventBasedGateway")}function Lee(e){return e=e||[],e.some(Dee)}function Iee(e){return K0(e,"bpmn:Process")||K0(e,"bpmn:Collaboration")}FU()(P7,h1),P7.$inject=["eventBus"],P7.prototype.init=function(){this.addRule("connection.start",(function(e){var t=e.source;return F7(t)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},o=i.targetParent,r=i.targetAttach;if(r)return!1;o&&(n.parent=o);try{return ree(t,n)}finally{o&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection,n=e.source,i=e.target;return ree(n,i,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){var t=e.shape,n=e.newBounds;return yee(t,n)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return!(nee(i)&&!xee(t,i,n))&&Object(WU["every"])(t,(function(e){return nee(e)?ree(e.source,e.target,e):e.host?gee(e,e.host,null,n):vee(e,i,null,n)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return gee(n,t,null,i)||mee(n,t,i)||bee(n,t,i)||xee(n,t,i)})),this.addRule("shape.create",(function(e){return vee(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return gee(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element,n=e.elements;return kee(n,t)}))},P7.prototype.canConnectMessageFlow=Cee,P7.prototype.canConnectSequenceFlow=Aee,P7.prototype.canConnectDataAssociation=Eee,P7.prototype.canConnectAssociation=_ee,P7.prototype.canMove=bee,P7.prototype.canAttach=gee,P7.prototype.canReplace=mee,P7.prototype.canDrop=see,P7.prototype.canInsert=xee,P7.prototype.canCreate=vee,P7.prototype.canConnect=ree,P7.prototype.canResize=yee,P7.prototype.canCopy=kee;var Nee={__depends__:[L1],__init__:["bpmnRules"],bpmnRules:["type",P7]},Mee=2e3;function Bee(e,t){function n(){var e,n,i=t.getRootElement(),o=y$(i).di;e=ZY([i],!1),e=Object(WU["filter"])(e,(function(e){return e!==i&&!e.labelTarget})),n=Object(WU["map"])(e,T$),o.set("planeElement",n)}e.on("saveXML.start",Mee,n)}Bee.$inject=["eventBus","canvas"];var Tee={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",Bee]};function Oee(e){i1.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,o=n.parent,r=t.getOrdering(i,o);r&&(void 0!==r.parent&&(n.parent=r.parent),n.parentIndex=r.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,o=n.newParent||i.parent,r=t.getOrdering(i,o);r&&(void 0!==r.parent&&(n.newParent=r.parent),n.newParentIndex=r.index)}))}function Ree(e,t,n){Oee.call(this,e);var i=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:3,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function o(e){if(e.labelTarget)return{level:10};var t=Object(WU["find"])(i,(function(t){return G0(e,[t.type])}));return t&&t.order||{level:1}}function r(e){var t=e.order;if(t||(e.order=t=o(e)),!t)throw new Error("no order for <"+e.id+">");return t}function s(e,t,n){var i=t;while(i){if(G0(i,n))break;i=i.parent}if(!i)throw new Error("no parent for <"+e.id+"> in <"+(t&&t.id)+">");return i}this.getOrdering=function(e,n){if(e.labelTarget)return{parent:t.getRootElement(),index:-1};var i=r(e);i.containers&&(n=s(e,n,i.containers));var o=n.children.indexOf(e),a=Object(WU["findIndex"])(n.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&i.level<r(t).level}));return-1!==a&&-1!==o&&o<a&&(a-=1),{index:a,parent:n}}}Oee.prototype.getOrdering=function(e,t){return null},FU()(Oee,i1),Ree.$inject=["eventBus","canvas","translate"],FU()(Ree,Oee);var Pee={__depends__:[wX],__init__:["bpmnOrderingProvider"],bpmnOrderingProvider:["type",Ree]};function Fee(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}Fee.$inject=["eventBus","injector"],Fee.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";var n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction(n)},Fee.prototype.canExecute=function(e,t){var n={command:e,context:t},i=this._getHandler(e),o=this._fire(e,"canExecute",n);if(void 0===o){if(!i)return!1;i.canExecute&&(o=i.canExecute(t))}return o},Fee.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed",{trigger:"clear"})},Fee.prototype.undo=function(){var e,t=this._getUndoAction();if(t){this._currentExecution.trigger="undo",this._pushAction(t);while(t){if(this._internalUndo(t),e=this._getUndoAction(),!e||e.id!==t.id)break;t=e}this._popAction()}},Fee.prototype.redo=function(){var e,t=this._getRedoAction();if(t){this._currentExecution.trigger="redo",this._pushAction(t);while(t){if(this._internalExecute(t,!0),e=this._getRedoAction(),!e||e.id!==t.id)break;t=e}this._popAction()}},Fee.prototype.register=function(e,t){this._setHandler(e,t)},Fee.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");var n=this._injector.instantiate(t);this.register(e,n)},Fee.prototype.canUndo=function(){return!!this._getUndoAction()},Fee.prototype.canRedo=function(){return!!this._getRedoAction()},Fee.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},Fee.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},Fee.prototype._internalUndo=function(e){var t=this,n=e.command,i=e.context,o=this._getHandler(n);this._atomicDo((function(){t._fire(n,"revert",e),o.revert&&t._markDirty(o.revert(i)),t._revertedAction(e),t._fire(n,"reverted",e)}))},Fee.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);var i,o,r,s=t?[e+"."+t,t]:[e];for(n=this._eventBus.createEvent(n),i=0;o=s[i];i++)if(r=this._eventBus.fire("commandStack."+o,n),n.cancelBubble)break;return r},Fee.prototype._createId=function(){return this._uid++},Fee.prototype._atomicDo=function(e){var t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},Fee.prototype._internalExecute=function(e,t){var n=this,i=e.command,o=e.context,r=this._getHandler(i);if(!r)throw new Error("no command handler registered for <"+i+">");this._pushAction(e),t||(this._fire(i,"preExecute",e),r.preExecute&&r.preExecute(o),this._fire(i,"preExecuted",e)),this._atomicDo((function(){n._fire(i,"execute",e),r.execute&&n._markDirty(r.execute(o)),n._executedAction(e,t),n._fire(i,"executed",e)})),t||(this._fire(i,"postExecute",e),r.postExecute&&r.postExecute(o),this._fire(i,"postExecuted",e)),this._popAction(e)},Fee.prototype._pushAction=function(e){var t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in <execute> or <revert> phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},Fee.prototype._popAction=function(){var e=this._currentExecution,t=e.trigger,n=e.actions,i=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:Object(WU["uniqueBy"])("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},Fee.prototype._markDirty=function(e){var t=this._currentExecution;e&&(e=Object(WU["isArray"])(e)?e:[e],t.dirty=t.dirty.concat(e))},Fee.prototype._executedAction=function(e,t){var n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},Fee.prototype._revertedAction=function(e){this._stackIdx--},Fee.prototype._getHandler=function(e){return this._handlerMap[e]},Fee.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};var jee={commandStack:["type",Fee]},zee=new cZ("tt");function Vee(e){var t=Object(HU["domify"])('<div class="djs-tooltip-container" style="position: absolute; width: 0; height: 0;" />');return e.insertBefore(t,e.firstChild),t}function Qee(e,t,n){Object(WU["assign"])(e.style,{left:t+"px",top:n+"px"})}function Wee(e,t){e.style.display=!1===t?"none":""}var Hee="djs-tooltip",Uee="."+Hee;function Yee(e,t){this._eventBus=e,this._canvas=t,this._ids=zee,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=Vee(t.getContainer());var n=this;HU["delegate"].bind(this._tooltipRoot,Uee,"mousedown",(function(e){e.stopPropagation()})),HU["delegate"].bind(this._tooltipRoot,Uee,"mouseover",(function(e){n.trigger("mouseover",e)})),HU["delegate"].bind(this._tooltipRoot,Uee,"mouseout",(function(e){n.trigger("mouseout",e)})),this._init()}Yee.$inject=["eventBus","canvas"],Yee.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=Object(WU["assign"])({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Yee.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(Object(HU["attr"])(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Yee.prototype.get=function(e){return"string"!==typeof e&&(e=e.id),this._tooltips[e]},Yee.prototype.clearTimeout=function(e){if(e=this.get(e),e){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Yee.prototype.setTimeout=function(e){if(e=this.get(e),e){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Yee.prototype.remove=function(e){var t=this.get(e);t&&(Object(HU["remove"])(t.html),Object(HU["remove"])(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Yee.prototype.show=function(){Wee(this._tooltipRoot)},Yee.prototype.hide=function(){Wee(this._tooltipRoot,!1)},Yee.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Yee.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,o=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),Object(WU["isString"])(i)&&(i=Object(HU["domify"])(i)),t=Object(HU["domify"])('<div data-tooltip-id="'+n+'" class="'+Hee+'" style="position: absolute">'),t.appendChild(i),e.type&&Object(HU["classes"])(t).add("djs-tooltip-"+e.type),e.className&&Object(HU["classes"])(t).add(e.className),e.htmlContainer=t,o.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Yee.prototype._updateTooltip=function(e){var t=e.position,n=e.htmlContainer;Qee(n,t.x,t.y)},Yee.prototype._updateTooltipVisibilty=function(e){Object(WU["forEach"])(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,o=!0;n&&((n.minZoom>e.scale||n.maxZoom<e.scale)&&(o=!1),Wee(i,o))}))},Yee.prototype._init=function(){var e=this;function t(t){e._updateRoot(t),e._updateTooltipVisibilty(t),e.show()}this._eventBus.on("canvas.viewbox.changing",(function(t){e.hide()})),this._eventBus.on("canvas.viewbox.changed",(function(e){t(e.viewbox)}))};var Gee={__init__:["tooltips"],tooltips:["type",Yee]};function Kee(e,t){if("function"!==typeof t)throw new Error("removeFn iterator must be a function");if(e){var n;while(n=e[0])t(n);return e}}var qee=250,Jee=1400;function $ee(e,t,n){i1.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",Jee,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=Xee(n),t.validatedShapes=Xee(i)})),i&&t.on("shape.move.start",qee,(function(e){var t=e.context,n=t.shapes,o=[];Object(WU["forEach"])(n,(function(e){Object(WU["forEach"])(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||o.push(n),e.labelTarget&&o.push(e)}))})),Object(WU["forEach"])(o,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",Jee,(function(e){var t=e.context,n=t.closure,i=n.enclosedElements,o=[];Object(WU["forEach"])(i,(function(e){Object(WU["forEach"])(e.labels,(function(e){i[e.id]||o.push(e)}))})),n.addAll(o)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context,i=t.connection||t.shape;Kee(i.labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=dG(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,o=t.labelTargetIndex;i&&(uG(i.labels,n,o),n.labelTarget=i)}))}function Xee(e){return Object(WU["filter"])(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}FU()($ee,i1),$ee.$inject=["injector","eventBus","modeling"];var Zee={__init__:["labelSupport"],labelSupport:["type",$ee]},ete=251,tte=1401,nte="attach-ok";function ite(e,t,n,i,o){i1.call(this,t);var r=e.get("movePreview",!1);t.on("shape.move.start",tte,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=rte(n),t.validatedShapes=ste(i)})),r&&t.on("shape.move.start",ete,(function(e){var t=e.context,n=t.shapes,i=ote(n);Object(WU["forEach"])(i,(function(e){r.makeDraggable(t,e,!0),Object(WU["forEach"])(e.labels,(function(e){r.makeDraggable(t,e,!0)}))}))})),r&&t.on("shape.move.start",(function(e){var i=e.context,o=i.shapes;if(1===o.length){var r=o[0],s=r.host;s&&(n.addMarker(s,nte),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(s,nte)})))}})),this.preExecuted("elements.move",tte,(function(e){var t=e.context,n=t.closure,i=t.shapes,o=ote(i);Object(WU["forEach"])(o,(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t,n=e.context,i=n.shapes,r=n.newHost;r&&1!==i.length||(t=r?i:Object(WU["filter"])(i,(function(e){var t=e.host;return ate(e)&&!lte(i,t)})),Object(WU["forEach"])(t,(function(e){o.updateAttachment(e,r)})))})),this.postExecuted("elements.move",(function(e){var t=e.context.shapes;Object(WU["forEach"])(t,(function(e){Object(WU["forEach"])(e.attachers,(function(e){Object(WU["forEach"])(e.outgoing.slice(),(function(e){var t=i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target});t||o.removeConnection(e)})),Object(WU["forEach"])(e.incoming.slice(),(function(e){var t=i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target});t||o.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&o.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,r=t.newShape;Kee(n.attachers,(function(e){var t=i.allowed("elements.move",{target:r,shapes:[e]});"attach"===t?o.updateAttachment(e,r):o.removeShape(e)})),r.attachers.length&&Object(WU["forEach"])(r.attachers,(function(e){var t=v9(e,n,r);o.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,r=t.newBounds,s=n.attachers,a=t.hints||{};!1!==a.attachSupport&&Object(WU["forEach"])(s,(function(e){var t=v9(e,i,r);o.moveShape(e,t,e.parent),Object(WU["forEach"])(e.labels,(function(e){o.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;Kee(t.attachers,(function(e){o.removeShape(e)})),t.host&&o.updateAttachment(t,null)}))}function ote(e){return Object(WU["flatten"])(Object(WU["map"])(e,(function(e){return e.attachers||[]})))}function rte(e){var t=ote(e);return Object(WU["unionBy"])("id",e,t)}function ste(e){var t=Object(WU["groupBy"])(e,"id");return Object(WU["filter"])(e,(function(e){while(e){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}function ate(e){return!!e.host}function lte(e,t){return-1!==e.indexOf(t)}FU()(ite,i1),ite.$inject=["injector","eventBus","canvas","rules","modeling"];var cte={__depends__:[L1],__init__:["attachSupport"],attachSupport:["type",ite]},hte=250;function ute(e,t){this._eventBus=e,this._dragging=t,this._tools=[],this._active=null}function dte(e){var t=e.originalEvent&&e.originalEvent.target;return t&&Object(HU["closest"])(t,'.group[data-group="tools"]')}ute.$inject=["eventBus","dragging"],ute.prototype.registerTool=function(e,t){var n=this._tools;if(!t)throw new Error('A tool has to be registered with it\'s "events"');n.push(e),this.bindEvents(e,t)},ute.prototype.isActive=function(e){return e&&this._active===e},ute.prototype.length=function(e){return this._tools.length},ute.prototype.setActive=function(e){var t=this._eventBus;this._active!==e&&(this._active=e,t.fire("tool-manager.update",{tool:e}))},ute.prototype.bindEvents=function(e,t){var n=this._eventBus,i=this._dragging,o=[];n.on(t.tool+".init",(function(t){var n=t.context;if(!n.reactivate&&this.isActive(e))return this.setActive(null),void i.cancel();this.setActive(e)}),this),Object(WU["forEach"])(t,(function(e){o.push(e+".ended"),o.push(e+".canceled")})),n.on(o,hte,(function(e){this._active&&(dte(e)||this.setActive(null))}),this)};var pte={__depends__:[E1],__init__:["toolManager"],toolManager:["type",ute]};function fte(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}function gte(e,t){var n=[];return Object(WU["forEach"])(e.concat(t),(function(i){var o=i.incoming,r=i.outgoing;Object(WU["forEach"])(o.concat(r),(function(i){var o=i.source,r=i.target;(mte(e,o)||mte(e,r)||mte(t,o)||mte(t,r))&&(mte(n,i)||n.push(i))}))})),n}function mte(e,t){return-1!==e.indexOf(t)}function bte(e,t,n){var i=e.x,o=e.y,r=e.width,s=e.height,a=n.x,l=n.y;switch(t){case"n":return{x:i,y:o+l,width:r,height:s-l};case"s":return{x:i,y:o,width:r,height:s+l};case"w":return{x:i+a,y:o,width:r-a,height:s};case"e":return{x:i,y:o,width:r+a,height:s};default:throw new Error("unknown direction: "+t)}}var vte=Math.abs,yte=Math.round,wte={x:"width",y:"height"},_te="crosshair",Cte={n:"top",w:"left",s:"bottom",e:"right"},Ate=1500,Ete={n:"s",w:"e",s:"n",e:"w"},xte=20;function Ste(e,t,n,i,o,r,s){this._canvas=e,this._dragging=t,this._eventBus=n,this._modeling=i,this._rules=o,this._toolManager=r,this._mouse=s;var a=this;r.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),n.on("spaceTool.selection.end",(function(e){n.once("spaceTool.selection.ended",(function(){a.activateMakeSpace(e.originalEvent)}))})),n.on("spaceTool.move",Ate,(function(e){var t=e.context,n=t.initialized;n||(n=t.initialized=a.init(e,t)),n&&Dte(e)})),n.on("spaceTool.end",(function(e){var t=e.context,i=t.axis,o=t.direction,r=t.movingShapes,s=t.resizingShapes,l=t.start;if(t.initialized){Dte(e);var c={x:0,y:0};c[i]=yte(e["d"+i]),a.makeSpace(r,s,c,o,l),n.once("spaceTool.ended",(function(e){a.activateSelection(e.originalEvent,!0,!0)}))}}))}function kte(e){return{top:e.top-xte,right:e.right+xte,bottom:e.bottom+xte,left:e.left-xte}}function Dte(e){var t,n,i=e.context,o=i.spaceToolConstraints;o&&(Object(WU["isNumber"])(o.left)&&(t=Math.max(e.x,o.left),e.dx=e.dx+t-e.x,e.x=t),Object(WU["isNumber"])(o.right)&&(t=Math.min(e.x,o.right),e.dx=e.dx+t-e.x,e.x=t),Object(WU["isNumber"])(o.top)&&(n=Math.max(e.y,o.top),e.dy=e.dy+n-e.y,e.y=n),Object(WU["isNumber"])(o.bottom)&&(n=Math.min(e.y,o.bottom),e.dy=e.dy+n-e.y,e.y=n))}function Lte(e,t,n,i,o){var r=e.movingShapes,s=e.resizingShapes;if(s.length){var a,l,c={};return Object(WU["forEach"])(s,(function(e){var h,u,d,p=xG(e),f=Object(WU["filter"])(e.children,(function(e){return!Nte(e)&&!Mte(e)&&!Ite(r,e)&&!Ite(s,e)})),g=Object(WU["filter"])(e.children,(function(e){return!Nte(e)&&!Mte(e)&&Ite(r,e)}));f.length&&(u=kte(xG(tG(f))),h=i-p[Cte[n]]+u[Cte[n]],"n"===n?c.bottom=l=Object(WU["isNumber"])(l)?Math.min(l,h):h:"w"===n?c.right=l=Object(WU["isNumber"])(l)?Math.min(l,h):h:"s"===n?c.top=a=Object(WU["isNumber"])(a)?Math.max(a,h):h:"e"===n&&(c.left=a=Object(WU["isNumber"])(a)?Math.max(a,h):h)),g.length&&(d=kte(xG(tG(g))),h=i-d[Cte[Ete[n]]]+p[Cte[Ete[n]]],"n"===n?c.bottom=l=Object(WU["isNumber"])(l)?Math.min(l,h):h:"w"===n?c.right=l=Object(WU["isNumber"])(l)?Math.min(l,h):h:"s"===n?c.top=a=Object(WU["isNumber"])(a)?Math.max(a,h):h:"e"===n&&(c.left=a=Object(WU["isNumber"])(a)?Math.max(a,h):h));var m=o&&o[e.id];m&&("n"===n?(h=i+e[wte[t]]-m[wte[t]],c.bottom=l=Object(WU["isNumber"])(l)?Math.min(l,h):h):"w"===n?(h=i+e[wte[t]]-m[wte[t]],c.right=l=Object(WU["isNumber"])(l)?Math.min(l,h):h):"s"===n?(h=i-e[wte[t]]+m[wte[t]],c.top=a=Object(WU["isNumber"])(a)?Math.max(a,h):h):"e"===n&&(h=i-e[wte[t]]+m[wte[t]],c.left=a=Object(WU["isNumber"])(a)?Math.max(a,h):h))})),c}}function Ite(e,t){return-1!==e.indexOf(t)}function Nte(e){return!!e.waypoints}function Mte(e){return!!e.labelTarget}Ste.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"],Ste.prototype.activateSelection=function(e,t,n){this._dragging.init(e,"spaceTool.selection",{autoActivate:t,cursor:_te,data:{context:{reactivate:n}},trapClick:!1})},Ste.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:_te,data:{context:{}}})},Ste.prototype.makeSpace=function(e,t,n,i,o){return this._modeling.createSpace(e,t,n,i,o)},Ste.prototype.init=function(e,t){var n=vte(e.dx)>vte(e.dy)?"x":"y",i=e["d"+n],o=e[n]-i;if(vte(i)<5)return!1;i<0&&(i*=-1),YX(e)&&(i*=-1);var r=fte(n,i),s=this._canvas.getRootElement(),a=ZY(s,!0),l=this.calculateAdjustments(a,n,i,o),c=this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:r,shapes:l.resizingShapes,start:o}),h=Lte(l,n,r,o,c);return Object(WU["assign"])(t,l,{axis:n,direction:r,spaceToolConstraints:h,start:o}),HZ("resize-"+("x"===n?"ew":"ns")),!0},Ste.prototype.calculateAdjustments=function(e,t,n,i){var o=this._rules,r=[],s=[];return Object(WU["forEach"])(e,(function(e){if(e.parent&&!Nte(e)){var a=e[t],l=a+e[wte[t]];return n>0&&a>i||n<0&&l<i?r.push(e):a<i&&l>i&&o.allowed("shape.resize",{shape:e})?s.push(e):void 0}})),{movingShapes:r,resizingShapes:s}},Ste.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},Ste.prototype.isActive=function(){var e=this._dragging.context();return e&&/^spaceTool/.test(e.prefix)};var Bte="djs-dragging",Tte="djs-resizing",Ote=250,Rte=Math.max;function Pte(e,t,n,i,o){function r(e,t){Object(WU["forEach"])(e,(function(e){o.addDragger(e,t),n.addMarker(e,Bte)}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),o=e.context,r={x:"M 0,-10000 L 0,10000",y:"M -10000,0 L 10000,0"},s=pY("g");ZU(s,i.cls("djs-crosshair-group",["no-events"])),GU(t,s);var a=pY("path");ZU(a,"d",r.x),oY(a).add("djs-crosshair"),GU(s,a);var l=pY("path");ZU(l,"d",r.y),oY(l).add("djs-crosshair"),GU(s,l),o.crosshairGroup=s})),e.on("spaceTool.selection.move",(function(e){var t=e.context.crosshairGroup;mK(t,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context,n=t.crosshairGroup;n&&sY(n)})),e.on("spaceTool.move",Ote,(function(e){var s=e.context,a=s.line,l=s.axis,c=s.movingShapes,h=s.resizingShapes;if(s.initialized){if(!s.dragGroup){var u=n.getLayer("space");a=pY("path"),ZU(a,"d","M0,0 L0,0"),oY(a).add("djs-crosshair"),GU(u,a),s.line=a;var d=pY("g");ZU(d,i.cls("djs-drag-group",["no-events"])),GU(n.getActiveLayer(),d),r(c,d);var p=s.movingConnections=t.filter((function(e){var t=!1;Object(WU["forEach"])(c,(function(n){Object(WU["forEach"])(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;Object(WU["forEach"])(c,(function(t){Object(WU["forEach"])(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;Object(WU["forEach"])(h,(function(t){Object(WU["forEach"])(t.outgoing,(function(t){e===t&&(i=!0)}))}));var o=!1;return Object(WU["forEach"])(h,(function(t){Object(WU["forEach"])(t.incoming,(function(t){e===t&&(o=!0)}))})),Fte(e)&&(t||i)&&(n||o)}));r(p,d),s.dragGroup=d}if(!s.frameGroup){var f=pY("g");ZU(f,i.cls("djs-frame-group",["no-events"])),GU(n.getActiveLayer(),f);var g=[];Object(WU["forEach"])(h,(function(e){var t=o.addFrame(e,f),i=t.getBBox();g.push({element:t,initialBounds:i}),n.addMarker(e,Tte)})),s.frameGroup=f,s.frames=g}var m={x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y};ZU(a,{d:m[l]});var b={x:"y",y:"x"},v={x:e.dx,y:e.dy};v[b[s.axis]]=0,mK(s.dragGroup,v.x,v.y),Object(WU["forEach"])(s.frames,(function(e){var t,n,i=e.element,o=e.initialBounds;"e"===s.direction?ZU(i,{width:Rte(o.width+v.x,5)}):(t=Rte(o.width-v.x,5),ZU(i,{width:t,x:o.x+o.width-t})),"s"===s.direction?ZU(i,{height:Rte(o.height+v.y,5)}):(n=Rte(o.height-v.y,5),ZU(i,{height:n,y:o.y+o.height-n}))}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,o=t.movingConnections,r=t.resizingShapes,s=t.line,a=t.dragGroup,l=t.frameGroup;Object(WU["forEach"])(i,(function(e){n.removeMarker(e,Bte)})),Object(WU["forEach"])(o,(function(e){n.removeMarker(e,Bte)})),a&&(sY(s),sY(a)),Object(WU["forEach"])(r,(function(e){n.removeMarker(e,Tte)})),l&&sY(l)}))}function Fte(e){return e.waypoints}Pte.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];var jte={__init__:["spaceToolPreview"],__depends__:[E1,L1,pte,m4,V4],spaceTool:["type",Ste],spaceToolPreview:["type",Pte]};function zte(e){this._model=e}function Vte(e,t,n,i){i1.call(this,e),this._bpmnFactory=t,this._translate=i;var o=this;function r(e){var t,i=e.context,o=i.hints||{};i.cropped||!1===o.createElementsBehavior||(t=i.connection,t.waypoints=n.getCroppedWaypoints(t),i.cropped=!0)}function s(e){var t=e.context;o.updateParent(t.shape||t.connection,t.oldParent)}function a(e){var t=e.context,n=t.shape||t.connection,i=t.parent||t.newParent;o.updateParent(n,i)}function l(e){var t=e.context,n=t.oldRoot,i=n.children;Object(WU["forEach"])(i,(function(e){v$(e,"bpmn:BaseElement")&&o.updateParent(e)}))}function c(e){var t=e.context.shape;v$(t,"bpmn:BaseElement")&&o.updateBounds(t)}function h(e){o.updateConnection(e.context)}function u(e){o.updateConnectionWaypoints(e.context.connection)}function d(e){o.updateAttachment(e.context)}this.executed(["connection.layout","connection.create"],r),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Wte(s)),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Wte(a)),this.executed(["canvas.updateRoot"],l),this.reverted(["canvas.updateRoot"],l),this.executed(["shape.move","shape.create","shape.resize"],Wte((function(e){"label"!==e.context.shape.type&&c(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],Wte((function(e){"label"!==e.context.shape.type&&c(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&c({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Wte(h)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Wte(h)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Wte(u)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Wte(u)),this.executed("connection.reconnect",Wte((function(e){var t=e.context,n=t.connection,i=t.oldSource,o=t.newSource,r=y$(n),s=y$(i),a=y$(o);r.conditionExpression&&!G0(a,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=r.conditionExpression,delete r.conditionExpression),i!==o&&s.default===r&&(t.oldDefault=s.default,delete s.default)}))),this.reverted("connection.reconnect",Wte((function(e){var t=e.context,n=t.connection,i=t.oldSource,o=t.newSource,r=y$(n),s=y$(i),a=y$(o);t.oldConditionExpression&&(r.conditionExpression=t.oldConditionExpression),t.oldDefault&&(s.default=t.oldDefault,delete a.default)}))),this.executed(["element.updateAttachment"],Wte(d)),this.reverted(["element.updateAttachment"],Wte(d))}function Qte(e){while(e&&!v$(e,"bpmn:Definitions"))e=e.$parent;return e}function Wte(e){return function(t){var n=t.context,i=n.shape||n.connection;v$(i,"bpmn:BaseElement")&&e(t)}}function Hte(e,t,n){sK.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}function Ute(e,t,n){Object(WU["forEach"])(n,(function(n){void 0!==t[n]&&Yte(e,t,n)}))}function Yte(e,t,n){e[n]=t[n],delete t[n]}function Gte(e,t){this._modeling=e,this._canvas=t}function Kte(e){this._modeling=e}function qte(e,t){return Object(WU["some"])(e.outgoing,(function(e){return e.target===t}))}function Jte(e,t){this._canvas=e,this._layouter=t}zte.$inject=["moddle"],zte.prototype._needsId=function(e){return G0(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},zte.prototype._ensureId=function(e){var t;t=v$(e,"bpmn:Activity")?"Activity":v$(e,"bpmn:Event")?"Event":v$(e,"bpmn:Gateway")?"Gateway":G0(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e))},zte.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},zte.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},zte.prototype.createDiShape=function(e,t,n){return this.create("bpmndi:BPMNShape",Object(WU["assign"])({bpmnElement:e,bounds:this.createDiBounds(t)},n))},zte.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},zte.prototype.createDiWaypoints=function(e){var t=this;return Object(WU["map"])(e,(function(e){return t.createDiWaypoint(e)}))},zte.prototype.createDiWaypoint=function(e){return this.create("dc:Point",Object(WU["pick"])(e,["x","y"]))},zte.prototype.createDiEdge=function(e,t,n){return this.create("bpmndi:BPMNEdge",Object(WU["assign"])({bpmnElement:e},n))},zte.prototype.createDiPlane=function(e){return this.create("bpmndi:BPMNPlane",{bpmnElement:e})},FU()(Vte,i1),Vte.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],Vte.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},Vte.prototype.updateParent=function(e,t){if(!(e instanceof nK)&&!(v$(e,"bpmn:DataStoreReference")&&e.parent&&v$(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,o=n&&n.businessObject,r=o&&o.di;v$(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,o,t&&t.businessObject),v$(e,"bpmn:DataOutputAssociation")&&(o=e.source?e.source.businessObject:null),v$(e,"bpmn:DataInputAssociation")&&(o=e.target?e.target.businessObject:null),this.updateSemanticParent(i,o),v$(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,o),this.updateDiParent(i.di,r)}},Vte.prototype.updateBounds=function(e){var t=e.businessObject.di,n=e instanceof nK?this._getLabel(t):t,i=n.bounds;i||(i=this._bpmnFactory.createDiBounds(),n.set("bounds",i)),Object(WU["assign"])(i,{x:e.x,y:e.y,width:e.width,height:e.height})},Vte.prototype.updateFlowNodeRefs=function(e,t,n){var i,o;n!==t&&(v$(n,"bpmn:Lane")&&(i=n.get("flowNodeRef"),hG(i,e)),v$(t,"bpmn:Lane")&&(o=t.get("flowNodeRef"),uG(o,e)))},Vte.prototype.updateDiConnection=function(e,t,n){e.sourceElement&&e.sourceElement.bpmnElement!==t&&(e.sourceElement=t&&t.di),e.targetElement&&e.targetElement.bpmnElement!==n&&(e.targetElement=n&&n.di)},Vte.prototype.updateDiParent=function(e,t){if(t&&!v$(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(hG(n,e),e.$parent=null)}},Vte.prototype.getLaneSet=function(e){var t,n;return v$(e,"bpmn:Lane")?(t=e.childLaneSet,t||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(v$(e,"bpmn:Participant")&&(e=e.processRef),n=e.get("laneSets"),t=n[0],t||(t=this._bpmnFactory.create("bpmn:LaneSet"),t.$parent=e,n.push(t)),t)},Vte.prototype.updateSemanticParent=function(e,t,n){var i,o=this._translate;if(e.$parent!==t&&(!v$(e,"bpmn:DataInput")&&!v$(e,"bpmn:DataOutput")||(v$(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(v$(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(v$(e,"bpmn:FlowElement")){if(t)if(v$(t,"bpmn:Participant"))t=t.processRef;else if(v$(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(v$(t,"bpmn:Lane"));i="flowElements"}else if(v$(e,"bpmn:Artifact")){while(t&&!v$(t,"bpmn:Process")&&!v$(t,"bpmn:SubProcess")&&!v$(t,"bpmn:Collaboration")){if(v$(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(v$(e,"bpmn:MessageFlow"))i="messageFlows";else if(v$(e,"bpmn:Participant")){i="participants";var r,s=e.processRef;s&&(r=Qte(e.$parent||t),e.$parent&&(hG(r.get("rootElements"),s),s.$parent=null),t&&(uG(r.get("rootElements"),s),s.$parent=r))}else v$(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":v$(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(o("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var a;if(e.$parent&&(a=e.$parent.get(i),hG(a,e)),t?(a=t.get(i),a.push(e),e.$parent=t):e.$parent=null,n){var l=n.get(i);hG(a,e),t&&(l||(l=[],t.set(i,l)),l.push(e))}}},Vte.prototype.updateConnectionWaypoints=function(e){e.businessObject.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},Vte.prototype.updateConnection=function(e){var t,n=e.connection,i=y$(n),o=y$(n.source),r=y$(n.target);if(v$(i,"bpmn:DataAssociation"))v$(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=o,t=e.parent||e.newParent||r,this.updateSemanticParent(i,r,t)):v$(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t),i.targetRef=r);else{var s=v$(i,"bpmn:SequenceFlow");i.sourceRef!==o&&(s&&(hG(i.sourceRef&&i.sourceRef.get("outgoing"),i),o&&o.get("outgoing")&&o.get("outgoing").push(i)),i.sourceRef=o),i.targetRef!==r&&(s&&(hG(i.targetRef&&i.targetRef.get("incoming"),i),r&&r.get("incoming")&&r.get("incoming").push(i)),i.targetRef=r)}this.updateConnectionWaypoints(n),this.updateDiConnection(i.di,o,r)},Vte.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},FU()(Hte,sK),Hte.$inject=["bpmnFactory","moddle","translate"],Hte.prototype.baseCreate=sK.prototype.create,Hte.prototype.create=function(e,t){return"label"===e?this.baseCreate(e,Object(WU["assign"])({type:"label"},_X,t)):this.createBpmnElement(e,t)},Hte.prototype.createBpmnElement=function(e,t){var n,i=this._translate;t=t||{};var o,r,s=t.businessObject;if(!s){if(!t.type)throw new Error(i("no shape type specified"));s=this._bpmnFactory.create(t.type)}return s.di||(s.di="root"===e?this._bpmnFactory.createDiPlane(s,[],{id:s.id+"_di"}):"connection"===e?this._bpmnFactory.createDiEdge(s,[],{id:s.id+"_di"}):this._bpmnFactory.createDiShape(s,{},{id:s.id+"_di"})),v$(s,"bpmn:Group")&&(t=Object(WU["assign"])({isFrame:!0},t)),t.di&&(Object(WU["assign"])(s.di,t.di),delete t.di),Ute(s,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&Yte(s.di,t,"isExpanded"),v$(s,"bpmn:ExclusiveGateway")&&(s.di.isMarkerVisible=!0),t.eventDefinitionType&&(o=s.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),o.push(r),r.$parent=s,s.eventDefinitions=o,delete t.eventDefinitionType),n=this._getDefaultSize(s),t=Object(WU["assign"])({businessObject:s,id:s.id},n,t),this.baseCreate(e,t)},Hte.prototype._getDefaultSize=function(e){return v$(e,"bpmn:SubProcess")?w$(e)?{width:350,height:200}:{width:100,height:80}:v$(e,"bpmn:Task")?{width:100,height:80}:v$(e,"bpmn:Gateway")?{width:50,height:50}:v$(e,"bpmn:Event")?{width:36,height:36}:v$(e,"bpmn:Participant")?w$(e)?{width:600,height:250}:{width:400,height:60}:v$(e,"bpmn:Lane")?{width:400,height:100}:v$(e,"bpmn:DataObjectReference")?{width:36,height:50}:v$(e,"bpmn:DataStoreReference")?{width:50,height:50}:v$(e,"bpmn:TextAnnotation")?{width:100,height:30}:v$(e,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},Hte.prototype.createParticipantShape=function(e){return Object(WU["isObject"])(e)||(e={isExpanded:e}),e=Object(WU["assign"])({type:"bpmn:Participant"},e||{}),!1!==e.isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},Gte.$inject=["modeling","canvas"],Gte.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;Object(WU["forEach"])(n,(function(e){var n={x:0,y:0};i.left?n.x=i.left-e.x:i.right?n.x=i.right-e.width-e.x:i.center?n.x=i.center-Math.round(e.width/2)-e.x:i.top?n.y=i.top-e.y:i.bottom?n.y=i.bottom-e.height-e.y:i.middle&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},Gte.prototype.postExecute=function(e){},Kte.$inject=["modeling"],Kte.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,o=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:o.attach}),e.shape=i},Kte.prototype.postExecute=function(e){var t=e.hints||{};qte(e.source,e.shape)||(t.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},Jte.$inject=["canvas","layouter"],Jte.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,o=e.parent,r=e.parentIndex,s=e.hints;if(!n||!i)throw new Error("source and target required");if(!o)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,s)),this._canvas.addConnection(t,o,r),t},Jte.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var $te=Math.round;function Xte(e){this._modeling=e}function Zte(e){return!!e.waypoints}Xte.$inject=["modeling"],Xte.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,o=e.position,r=e.hints,s=this._modeling;Object(WU["forEach"])(t,(function(e){Object(WU["isNumber"])(e.x)||(e.x=0),Object(WU["isNumber"])(e.y)||(e.y=0)}));var a=tG(t);Object(WU["forEach"])(t,(function(e){Zte(e)&&(e.waypoints=Object(WU["map"])(e.waypoints,(function(e){return{x:$te(e.x-a.x-a.width/2+o.x),y:$te(e.y-a.y-a.height/2+o.y)}}))),Object(WU["assign"])(e,{x:$te(e.x-a.x-a.width/2+o.x),y:$te(e.y-a.y-a.height/2+o.y)})}));var l=KY(t),c={};Object(WU["forEach"])(t,(function(e){if(Zte(e))c[e.id]=Object(WU["isNumber"])(i)?s.createConnection(c[e.source.id],c[e.target.id],i,e,e.parent||n,r):s.createConnection(c[e.source.id],c[e.target.id],e,e.parent||n,r);else{var t=Object(WU["assign"])({},r);-1===l.indexOf(e)&&(t.autoResize=!1),c[e.id]=Object(WU["isNumber"])(i)?s.createShape(e,Object(WU["pick"])(e,["x","y","width","height"]),e.parent||n,i,t):s.createShape(e,Object(WU["pick"])(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=Object(WU["values"])(c)};var ene=Math.round;function tne(e){this._canvas=e}function nne(e){tne.call(this,e)}tne.$inject=["canvas"],tne.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,o=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?Object(WU["assign"])(t,n):Object(WU["assign"])(t,{x:n.x-ene(t.width/2),y:n.y-ene(t.height/2)}),this._canvas.addShape(t,i,o),t},tne.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},FU()(nne,tne),nne.$inject=["canvas"];var ine=tne.prototype.execute;nne.prototype.execute=function(e){var t=e.shape;return rne(t),t.labelTarget=e.labelTarget,ine.call(this,e)};var one=tne.prototype.revert;function rne(e){["width","height"].forEach((function(t){"undefined"===typeof e[t]&&(e[t]=0)}))}function sne(e,t){this._canvas=e,this._modeling=t}function ane(e,t){this._modeling=e,this._elementRegistry=t}function lne(e,t){this._canvas=e,this._modeling=t}function cne(e){return e.waypoints}function hne(e){this._modeling=e}nne.prototype.revert=function(e){return e.shape.labelTarget=null,one.call(this,e)},sne.$inject=["canvas","modeling"],sne.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=dG(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},sne.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,uG(n.children,t,i),this._canvas.addConnection(t,n),t},ane.$inject=["modeling","elementRegistry"],ane.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry,i=e.elements;Object(WU["forEach"])(i,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},lne.$inject=["canvas","modeling"],lne.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;Kee(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Kee(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),Kee(n.children,(function(e){cne(e)?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},lne.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=dG(i.children,n),t.removeShape(n),n},lne.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,o=e.oldParentIndex;return uG(i.children,n,o),t.addShape(n,i),n},hne.$inject=["modeling"];var une={x:"y",y:"x"};function dne(e,t){this._layouter=e,this._canvas=t}function pne(){}function fne(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function gne(e){this._modeling=e}function mne(e){this._helper=new gne(e)}function bne(e){this._modeling=e,this._helper=new gne(e)}function vne(e){this._modeling=e}function yne(e){return e.original||e}function wne(e,t){this._modeling=e,this._rules=t}function _ne(e){this._modeling=e}function Cne(e){this._modeling=e}function Ane(e){return Object(WU["assign"])({},e)}function Ene(e){return Object(WU["map"])(e.waypoints,(function(e){return e=Ane(e),e.original&&(e.original=Ane(e.original)),e}))}function xne(e){switch(e){case"n":return"y";case"w":return"x";case"s":return"y";case"e":return"x"}}function Sne(e,t,n){var i=xne(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i]<t:void 0}function kne(e,t){return-1!==e.indexOf(t)}function Dne(e){return{x:e.x,y:e.y,height:e.height,width:e.width}}function Lne(e){this._modeling=e}function Ine(e){var t={};return Object(WU["forEach"])(e,(function(e){t[e.id]=e.hidden,e.children&&(t=Object(WU["assign"])({},t,Ine(e.children)))})),t}function Nne(e,t){var n=[];return Object(WU["forEach"])(e,(function(e){e.hidden=t,n=n.concat(e),e.children&&(n=n.concat(Nne(e.children,e.collapsed||t)))})),n}function Mne(e,t){var n=[];return Object(WU["forEach"])(e,(function(e){e.hidden=t[e.id],n=n.concat(e),e.children&&(n=n.concat(Mne(e.children,t)))})),n}function Bne(e){this._modeling=e}function Tne(e,t){return hG(e&&e.attachers,t)}function One(e,t,n){if(e){var i=e.attachers;i||(e.attachers=i=[]),uG(i,t,n)}}function Rne(){}function Pne(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",(function(){i.registerHandlers(n)}))}function Fne(e){this._elementRegistry=e}function jne(e,t){return Object(WU["reduce"])(t,(function(t,n){return t[n]=e.get(n),t}),{})}function zne(e,t){Object(WU["forEach"])(t,(function(t,n){e.set(n,t)}))}function Vne(e,t){return t.filter((function(t){return v$(t,"bpmn:DataObjectReference")&&y$(t).dataObjectRef===e}))}hne.prototype.preExecute=function(e){var t=this._modeling,n=e.groups,i=e.axis,o=e.dimension;function r(e,t){e.range.min=Math.min(t[i],e.range.min),e.range.max=Math.max(t[i]+t[o],e.range.max)}function s(e){return e[i]+e[o]/2}function a(e){return e.length-1}function l(e){return e.max-e.min}function c(e,n){var o={y:0};o[i]=e-s(n),o[i]&&(o[une[i]]=0,t.moveElements([n],o,n.parent))}var h,u,d=n[0],p=a(n),f=n[p],g=0;Object(WU["forEach"])(n,(function(e,t){var h,u,d;e.elements.length<2?t&&t!==n.length-1&&(r(e,e.elements[0]),g+=l(e.range)):(h=Object(WU["sortBy"])(e.elements,i),u=h[0],t===p&&(u=h[a(h)]),d=s(u),e.range=null,Object(WU["forEach"])(h,(function(t){c(d,t),null!==e.range?r(e,t):e.range={min:t[i],max:t[i]+t[o]}})),t&&t!==n.length-1&&(g+=l(e.range)))})),u=Math.abs(f.range.min-d.range.max),h=Math.round((u-g)/(n.length-1)),h<n.length-1||Object(WU["forEach"])(n,(function(e,r){var s,a={};e!==d&&e!==f&&(s=n[r-1],e.range.max=0,Object(WU["forEach"])(e.elements,(function(n,r){a[une[i]]=0,a[i]=s.range.max-n[i]+h,e.range.min!==n[i]&&(a[i]+=n[i]-e.range.min),a[i]&&t.moveElements([n],a,n.parent),e.range.max=Math.max(n[i]+n[o],r?e.range.max:0)})))}))},hne.prototype.postExecute=function(e){},dne.$inject=["layouter","canvas"],dne.prototype.execute=function(e){var t=e.connection,n=t.waypoints;return Object(WU["assign"])(e,{oldWaypoints:n}),t.waypoints=this._layouter.layoutConnection(t,e.hints),t},dne.prototype.revert=function(e){var t=e.connection;return t.waypoints=e.oldWaypoints,t},pne.prototype.execute=function(e){var t=e.connection,n=e.delta,i=e.newParent||t.parent,o=e.newParentIndex,r=t.parent;return e.oldParent=r,e.oldParentIndex=hG(r.children,t),uG(i.children,t,o),t.parent=i,Object(WU["forEach"])(t.waypoints,(function(e){e.x+=n.x,e.y+=n.y,e.original&&(e.original.x+=n.x,e.original.y+=n.y)})),t},pne.prototype.revert=function(e){var t=e.connection,n=t.parent,i=e.oldParent,o=e.oldParentIndex,r=e.delta;return hG(n.children,t),uG(i.children,t,o),t.parent=i,Object(WU["forEach"])(t.waypoints,(function(e){e.x-=r.x,e.y-=r.y,e.original&&(e.original.x-=r.x,e.original.y-=r.y)})),t},fne.prototype.add=function(e,t){return this.addAll([e],t)},fne.prototype.addAll=function(e,t){var n=eG(e,!!t,this);return Object(WU["assign"])(this,n),this},gne.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},gne.prototype.moveClosure=function(e,t,n,i,o){var r=this._modeling,s=e.allShapes,a=e.allConnections,l=e.enclosedConnections,c=e.topLevel,h=!1;o&&o.parent===n&&(h=!0),Object(WU["forEach"])(s,(function(e){r.moveShape(e,t,c[e.id]&&!h&&n,{recurse:!1,layout:!1})})),Object(WU["forEach"])(a,(function(e){var i=!!s[e.source.id],o=!!s[e.target.id];l[e.id]&&i&&o?r.moveConnection(e,t,c[e.id]&&!h&&n):r.layoutConnection(e,{connectionStart:i&&B9(e,e.source,t),connectionEnd:o&&T9(e,e.target,t)})}))},gne.prototype.getClosure=function(e){return(new fne).addAll(e,!0)},mne.$inject=["modeling"],mne.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},mne.prototype.postExecute=function(e){var t,n=e.hints;n&&n.primaryShape&&(t=n.primaryShape,n.oldParent=t.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,t)},bne.$inject=["modeling"],bne.prototype.execute=function(e){var t=e.shape,n=e.delta,i=e.newParent||t.parent,o=e.newParentIndex,r=t.parent;return e.oldBounds=Object(WU["pick"])(t,["x","y","width","height"]),e.oldParent=r,e.oldParentIndex=hG(r.children,t),uG(i.children,t,o),Object(WU["assign"])(t,{parent:i,x:t.x+n.x,y:t.y+n.y}),t},bne.prototype.postExecute=function(e){var t=e.shape,n=e.delta,i=e.hints,o=this._modeling;!1!==i.layout&&(Object(WU["forEach"])(t.incoming,(function(e){o.layoutConnection(e,{connectionEnd:T9(e,t,n)})})),Object(WU["forEach"])(t.outgoing,(function(e){o.layoutConnection(e,{connectionStart:B9(e,t,n)})}))),!1!==i.recurse&&this.moveChildren(e)},bne.prototype.revert=function(e){var t=e.shape,n=e.oldParent,i=e.oldParentIndex,o=e.delta;return uG(n.children,t,i),Object(WU["assign"])(t,{parent:n,x:t.x-o.x,y:t.y-o.y}),t},bne.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},bne.prototype.getNewParent=function(e){return e.newParent||e.shape.parent},vne.$inject=["modeling"],vne.prototype.execute=function(e){var t=e.newSource,n=e.newTarget,i=e.connection,o=e.dockingOrPoints;if(!t&&!n)throw new Error("newSource or newTarget required");return Object(WU["isArray"])(o)&&(e.oldWaypoints=i.waypoints,i.waypoints=o),t&&(e.oldSource=i.source,i.source=t),n&&(e.oldTarget=i.target,i.target=n),i},vne.prototype.postExecute=function(e){var t=e.connection,n=e.newSource,i=e.newTarget,o=e.dockingOrPoints,r=e.hints||{},s={};r.connectionStart&&(s.connectionStart=r.connectionStart),r.connectionEnd&&(s.connectionEnd=r.connectionEnd),!1!==r.layoutConnection&&(!n||i&&"source"!==r.docking||(s.connectionStart=s.connectionStart||yne(Object(WU["isArray"])(o)?o[0]:o)),!i||n&&"target"!==r.docking||(s.connectionEnd=s.connectionEnd||yne(Object(WU["isArray"])(o)?o[o.length-1]:o)),r.newWaypoints&&(s.waypoints=r.newWaypoints),this._modeling.layoutConnection(t,s))},vne.prototype.revert=function(e){var t=e.oldSource,n=e.oldTarget,i=e.oldWaypoints,o=e.connection;return t&&(o.source=t),n&&(o.target=n),i&&(o.waypoints=i),o},wne.$inject=["modeling","rules"],wne.prototype.preExecute=function(e){var t,n=this,i=this._modeling,o=this._rules,r=e.oldShape,s=e.newData,a=e.hints||{};function l(e,t,n){return o.allowed("connection.reconnect",{connection:n,source:e,target:t})}var c,h={x:s.x,y:s.y},u={x:r.x,y:r.y,width:r.width,height:r.height};t=e.newShape=e.newShape||n.createShape(s,h,r.parent,a),r.host&&i.updateAttachment(t,r.host),!1!==a.moveChildren&&(c=r.children.slice(),i.moveElements(c,{x:0,y:0},t,a));var d=r.incoming.slice(),p=r.outgoing.slice();Object(WU["forEach"])(d,(function(e){var i=e.source,o=l(i,t,e);o&&n.reconnectEnd(e,t,M9(e,t,u),a)})),Object(WU["forEach"])(p,(function(e){var i=e.target,o=l(t,i,e);o&&n.reconnectStart(e,t,N9(e,t,u),a)}))},wne.prototype.postExecute=function(e){var t=e.oldShape;this._modeling.removeShape(t)},wne.prototype.execute=function(e){},wne.prototype.revert=function(e){},wne.prototype.createShape=function(e,t,n,i){return this._modeling.createShape(e,t,n,i)},wne.prototype.reconnectStart=function(e,t,n,i){this._modeling.reconnectStart(e,t,n,i)},wne.prototype.reconnectEnd=function(e,t,n,i){this._modeling.reconnectEnd(e,t,n,i)},_ne.$inject=["modeling"],_ne.prototype.execute=function(e){var t=e.shape,n=e.newBounds,i=e.minBounds;if(void 0===n.x||void 0===n.y||void 0===n.width||void 0===n.height)throw new Error("newBounds must have {x, y, width, height} properties");if(i&&(n.width<i.width||n.height<i.height))throw new Error("width and height cannot be less than minimum height and width");if(!i&&n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},Object(WU["assign"])(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},_ne.prototype.postExecute=function(e){var t=this._modeling,n=e.shape,i=e.oldBounds,o=e.hints||{};!1!==o.layout&&(Object(WU["forEach"])(n.incoming,(function(e){t.layoutConnection(e,{connectionEnd:M9(e,n,i)})})),Object(WU["forEach"])(n.outgoing,(function(e){t.layoutConnection(e,{connectionStart:N9(e,n,i)})})))},_ne.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return Object(WU["assign"])(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},Cne.$inject=["modeling"],Cne.prototype.preExecute=function(e){var t=e.delta,n=e.direction,i=e.movingShapes,o=e.resizingShapes,r=e.start,s={};this.moveShapes(i,t),Object(WU["forEach"])(o,(function(e){s[e.id]=Dne(e)})),this.resizeShapes(o,t,n),this.updateConnectionWaypoints(gte(i,o),t,n,r,i,o,s)},Cne.prototype.execute=function(){},Cne.prototype.revert=function(){},Cne.prototype.moveShapes=function(e,t){var n=this;Object(WU["forEach"])(e,(function(e){n._modeling.moveShape(e,t,null,{autoResize:!1,layout:!1,recurse:!1})}))},Cne.prototype.resizeShapes=function(e,t,n){var i=this;Object(WU["forEach"])(e,(function(e){var o=bte(e,n,t);i._modeling.resizeShape(e,o,null,{attachSupport:!1,autoResize:!1,layout:!1})}))},Cne.prototype.updateConnectionWaypoints=function(e,t,n,i,o,r,s){var a=this,l=o.concat(r);Object(WU["forEach"])(e,(function(e){var c=e.source,h=e.target,u=Ene(e),d=xne(n),p={labelBehavior:!1};kne(l,c)&&kne(l,h)?(u=Object(WU["map"])(u,(function(e){return Sne(e,i,n)&&(e[d]=e[d]+t[d]),e.original&&Sne(e.original,i,n)&&(e.original[d]=e.original[d]+t[d]),e})),a._modeling.updateWaypoints(e,u,{labelBehavior:!1})):(kne(l,c)||kne(l,h))&&(kne(o,c)?p.connectionStart=B9(e,c,t):kne(o,h)?p.connectionEnd=T9(e,h,t):kne(r,c)?p.connectionStart=N9(e,c,s[c.id]):kne(r,h)&&(p.connectionEnd=M9(e,h,s[h.id])),a._modeling.layoutConnection(e,p))}))},Lne.$inject=["modeling"],Lne.prototype.execute=function(e){var t=e.shape,n=t.children;e.oldChildrenVisibility=Ine(n),t.collapsed=!t.collapsed;var i=Nne(n,t.collapsed);return[t].concat(i)},Lne.prototype.revert=function(e){var t=e.shape,n=e.oldChildrenVisibility,i=t.children,o=Mne(i,n);return t.collapsed=!t.collapsed,[t].concat(o)},Bne.$inject=["modeling"],Bne.prototype.execute=function(e){var t=e.shape,n=e.newHost,i=t.host;return e.oldHost=i,e.attacherIdx=Tne(i,t),One(n,t),t.host=n,t},Bne.prototype.revert=function(e){var t=e.shape,n=e.newHost,i=e.oldHost,o=e.attacherIdx;return t.host=i,Tne(n,t),One(i,t,o),t},Rne.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},Rne.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t},Pne.$inject=["eventBus","elementFactory","commandStack"],Pne.prototype.getHandlers=function(){return{"shape.append":Kte,"shape.create":tne,"shape.delete":lne,"shape.move":bne,"shape.resize":_ne,"shape.replace":wne,"shape.toggleCollapse":Lne,spaceTool:Cne,"label.create":nne,"connection.create":Jte,"connection.delete":sne,"connection.move":pne,"connection.layout":dne,"connection.updateWaypoints":Rne,"connection.reconnect":vne,"elements.create":Xte,"elements.move":mne,"elements.delete":ane,"elements.distribute":hne,"elements.align":Gte,"element.updateAttachment":Bne}},Pne.prototype.registerHandlers=function(e){Object(WU["forEach"])(this.getHandlers(),(function(t,n){e.registerHandler(n,t)}))},Pne.prototype.moveShape=function(e,t,n,i,o){"object"===typeof i&&(o=i,i=null);var r={shape:e,delta:t,newParent:n,newParentIndex:i,hints:o||{}};this._commandStack.execute("shape.move",r)},Pne.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},Pne.prototype.moveElements=function(e,t,n,i){i=i||{};var o,r=i.attach,s=n;!0===r?(o=n,s=n.parent):!1===r&&(o=null);var a={shapes:e,delta:t,newParent:s,newHost:o,hints:i};this._commandStack.execute("elements.move",a)},Pne.prototype.moveConnection=function(e,t,n,i,o){"object"===typeof i&&(o=i,i=void 0);var r={connection:e,delta:t,newParent:n,newParentIndex:i,hints:o||{}};this._commandStack.execute("connection.move",r)},Pne.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},Pne.prototype.createConnection=function(e,t,n,i,o,r){"object"===typeof n&&(r=o,o=i,i=n,n=void 0),i=this._create("connection",i);var s={source:e,target:t,parent:o,parentIndex:n,connection:i,hints:r};return this._commandStack.execute("connection.create",s),s.connection},Pne.prototype.createShape=function(e,t,n,i,o){"number"!==typeof i&&(o=i,i=void 0),o=o||{};var r,s,a=o.attach;e=this._create("shape",e),a?(r=n.parent,s=n):r=n;var l={position:t,shape:e,parent:r,parentIndex:i,host:s,hints:o};return this._commandStack.execute("shape.create",l),l.shape},Pne.prototype.createElements=function(e,t,n,i,o){Object(WU["isArray"])(e)||(e=[e]),"number"!==typeof i&&(o=i,i=void 0),o=o||{};var r={position:t,elements:e,parent:n,parentIndex:i,hints:o};return this._commandStack.execute("elements.create",r),r.elements},Pne.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var o={labelTarget:e,position:t,parent:i||e.parent,shape:n};return this._commandStack.execute("label.create",o),o.shape},Pne.prototype.appendShape=function(e,t,n,i,o){o=o||{},t=this._create("shape",t);var r={source:e,position:n,target:i,shape:t,connection:o.connection,connectionParent:o.connectionParent,hints:o};return this._commandStack.execute("shape.append",r),r.shape},Pne.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},Pne.prototype.distributeElements=function(e,t,n){var i={groups:e,axis:t,dimension:n};this._commandStack.execute("elements.distribute",i)},Pne.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},Pne.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},Pne.prototype.replaceShape=function(e,t,n){var i={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",i),i.newShape},Pne.prototype.alignElements=function(e,t){var n={elements:e,alignment:t};this._commandStack.execute("elements.align",n)},Pne.prototype.resizeShape=function(e,t,n,i){var o={shape:e,newBounds:t,minBounds:n,hints:i};this._commandStack.execute("shape.resize",o)},Pne.prototype.createSpace=function(e,t,n,i,o){var r={delta:n,direction:i,movingShapes:e,resizingShapes:t,start:o};this._commandStack.execute("spaceTool",r)},Pne.prototype.updateWaypoints=function(e,t,n){var i={connection:e,newWaypoints:t,hints:n||{}};this._commandStack.execute("connection.updateWaypoints",i)},Pne.prototype.reconnect=function(e,t,n,i,o){var r={connection:e,newSource:t,newTarget:n,dockingOrPoints:i,hints:o||{}};this._commandStack.execute("connection.reconnect",r)},Pne.prototype.reconnectStart=function(e,t,n,i){i||(i={}),this.reconnect(e,t,e.target,n,Object(WU["assign"])(i,{docking:"source"}))},Pne.prototype.reconnectEnd=function(e,t,n,i){i||(i={}),this.reconnect(e,e.source,t,n,Object(WU["assign"])(i,{docking:"target"}))},Pne.prototype.connect=function(e,t,n,i){return this.createConnection(e,t,n||{},e.parent,i)},Pne.prototype._create=function(e,t){return t instanceof ZG?t:this._elementFactory.create(e,t)},Pne.prototype.toggleCollapse=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.toggleCollapse",n)},Fne.$inject=["elementRegistry"],Fne.prototype.execute=function(e){var t=e.element,n=e.moddleElement,i=e.properties;if(!n)throw new Error("<moddleElement> required");var o=e.changed||this.getVisualReferences(n).concat(t),r=e.oldProperties||jne(n,Object(WU["keys"])(i));return zne(n,i),e.oldProperties=r,e.changed=o,o},Fne.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,i=e.changed;return zne(n,t),i},Fne.prototype.getVisualReferences=function(e){var t=this._elementRegistry;return v$(e,"bpmn:DataObject")?Vne(e,t):[]};var Qne="default",Wne="id",Hne="di",Une={width:0,height:0};function Yne(e,t,n,i,o){this._elementRegistry=e,this._moddle=t,this._translate=n,this._modeling=i,this._textRenderer=o}function Gne(e,t){return Wne in e&&e[Wne]!==t[Wne]}function Kne(e,t){var n=Object(WU["keys"])(t);return Object(WU["reduce"])(n,(function(n,i){return n[i]=i!==Hne?e.get(i):qne(e.di,Object(WU["keys"])(t.di)),n}),{})}function qne(e,t){return Object(WU["reduce"])(t,(function(t,n){return t[n]=e.get(n),t}),{})}function Jne(e,t){Object(WU["forEach"])(t,(function(t,n){n!==Hne?e.set(n,t):e.di&&$ne(e.di,t)}))}function $ne(e,t){Object(WU["forEach"])(t,(function(t,n){e.set(n,t)}))}Yne.$inject=["elementRegistry","moddle","translate","modeling","textRenderer"],Yne.prototype.execute=function(e){var t=e.element,n=[t],i=this._translate;if(!t)throw new Error(i("element required"));var o=this._elementRegistry,r=this._moddle.ids,s=t.businessObject,a=Zne(e.properties),l=e.oldProperties||Kne(s,a);return Gne(a,s)&&(r.unclaim(s[Wne]),o.updateId(t,a[Wne]),r.claim(a[Wne],s)),Qne in a&&(a[Qne]&&n.push(o.get(a[Qne].id)),s[Qne]&&n.push(o.get(s[Qne].id))),Jne(s,a),e.oldProperties=l,e.changed=n,n},Yne.prototype.postExecute=function(e){var t=e.element,n=t.label,i=n&&y$(n).name;if(i){var o=this._textRenderer.getExternalLabelBounds(n,i);this._modeling.resizeShape(n,o,Une)}},Yne.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,o=t.businessObject,r=this._elementRegistry,s=this._moddle.ids;return Jne(o,i),Gne(n,o)&&(s.unclaim(n[Wne]),r.updateId(t,i[Wne]),s.claim(i[Wne],o)),e.changed};var Xne=["default"];function Zne(e){var t=Object(WU["assign"])({},e);return Xne.forEach((function(n){n in e&&(t[n]=y$(t[n]))})),t}function eie(e,t){this._canvas=e,this._modeling=t}function tie(e,t){this._modeling=e,this._spaceTool=t}function nie(e,t){this._modeling=e,this._translate=t}function iie(e,t){this._modeling=e,this._spaceTool=t}eie.$inject=["canvas","modeling"],eie.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,o=t.getRootElement(),r=o.businessObject,s=r.$parent,a=r.di;t.setRootElement(n,!0),uG(s.rootElements,i),i.$parent=s,hG(s.rootElements,r),r.$parent=null,r.di=null,a.bpmnElement=i,i.di=a,e.oldRoot=o},eie.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,o=e.oldRoot,r=o.businessObject,s=i.$parent,a=i.di;t.setRootElement(o,!0),hG(s.rootElements,i),i.$parent=null,uG(s.rootElements,r),r.$parent=s,i.di=null,a.bpmnElement=r,r.di=a},tie.$inject=["modeling","spaceTool"],tie.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,o=e.location,r=e3(i),s=r===i,a=s?i:i.parent,l=Z5(a);l.length||n.createShape({type:"bpmn:Lane"},{x:i.x+$5,y:i.y,width:i.width-$5,height:i.height},a);var c=[];$Y(r,(function(e){return c.push(e),e.label&&c.push(e.label),e===i?[]:Object(WU["filter"])(e.children,(function(e){return e!==i}))}));var h="top"===o?-120:120,u="top"===o?i.y:i.y+i.height,d=u+("top"===o?10:-10),p="top"===o?"n":"s",f=t.calculateAdjustments(c,"y",h,d);t.makeSpace(f.movingShapes,f.resizingShapes,{x:0,y:h},p,d),e.newLane=n.createShape({type:"bpmn:Lane"},{x:i.x+(s?$5:0),y:u-("top"===o?120:0),width:i.width-(s?$5:0),height:120},a)},nie.$inject=["modeling","translate"],nie.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,i=e.shape,o=e.count,r=Z5(i),s=r.length;if(s>o)throw new Error(n("more than {count} child lanes",{count:o}));var a,l,c,h,u,d=Math.round(i.height/o);for(u=0;u<o;u++)a=i.y+u*d,l=u===o-1?i.height-d*u:d,c={x:i.x+$5,y:a,width:i.width-$5,height:l},u<s?t.resizeShape(r[u],c):(h={type:"bpmn:Lane"},t.createShape(h,c,i))},iie.$inject=["modeling","spaceTool"],iie.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds,i=e.balanced;!1!==i?this.resizeBalanced(t,n):this.resizeSpace(t,n)},iie.prototype.resizeBalanced=function(e,t){var n=this._modeling,i=t3(e,t);n.resizeShape(e,t),i.forEach((function(e){n.resizeShape(e.shape,e.newBounds)}))},iie.prototype.resizeSpace=function(e,t){var n,i,o,r,s,a=this._spaceTool,l=xG(e),c=xG(t),h=F5(c,l),u=e3(e),d=[],p=[];$Y(u,(function(e){return d.push(e),(v$(e,"bpmn:Lane")||v$(e,"bpmn:Participant"))&&p.push(e),e.children})),(h.bottom||h.top)&&(n=h.bottom||h.top,i=e.y+(h.bottom?e.height:0)+(h.bottom?-10:10),o=h.bottom?"s":"n",r=h.top>0||h.bottom<0?-n:n,s=a.calculateAdjustments(d,"y",r,i),a.makeSpace(s.movingShapes,s.resizingShapes,{x:0,y:n},o)),(h.left||h.right)&&(n=h.right||h.left,i=e.x+(h.right?e.width:0)+(h.right?-10:100),o=h.right?"e":"w",r=h.left>0||h.right<0?-n:n,s=a.calculateAdjustments(p,"x",r,i),a.makeSpace(s.movingShapes,s.resizingShapes,{x:n,y:0},o))};var oie="flowNodeRef",rie="lanes";function sie(e){this._elementRegistry=e}function aie(e){this._moddle=e}sie.$inject=["elementRegistry"],sie.prototype.computeUpdates=function(e,t){var n=[],i=[],o={},r=[];function s(e,t){var n=xG(t),i={x:e.x+e.width/2,y:e.y+e.height/2};return i.x>n.left&&i.x<n.right&&i.y>n.top&&i.y<n.bottom}function a(e){-1===n.indexOf(e)&&(r.push(e),n.push(e))}function l(e){var t=e3(e);return o[t.id]||(o[t.id]=X5(t)),o[t.id]}function c(e){if(!e.parent)return[];var t=l(e);return t.filter((function(t){return s(e,t)})).map((function(e){return e.businessObject}))}return t.forEach((function(e){var t=e3(e);if(t&&-1===n.indexOf(t)){var i=t.children.filter((function(e){return v$(e,"bpmn:FlowNode")}));i.forEach(a),n.push(t)}})),e.forEach(a),r.forEach((function(e){var t=e.businessObject,n=t.get(rie),o=n.slice(),r=c(e);i.push({flowNode:t,remove:o,add:r})})),t.forEach((function(e){var t=e.businessObject;e.parent||t.get(oie).forEach((function(e){i.push({flowNode:e,remove:[t],add:[]})}))})),i},sie.prototype.execute=function(e){var t=e.updates;t||(t=e.updates=this.computeUpdates(e.flowNodeShapes,e.laneShapes)),t.forEach((function(e){var t=e.flowNode,n=t.get(rie);e.remove.forEach((function(e){hG(n,e),hG(e.get(oie),t)})),e.add.forEach((function(e){uG(n,e),uG(e.get(oie),t)}))}))},sie.prototype.revert=function(e){var t=e.updates;t.forEach((function(e){var t=e.flowNode,n=t.get(rie);e.add.forEach((function(e){hG(n,e),hG(e.get(oie),t)})),e.remove.forEach((function(e){uG(n,e),uG(e.get(oie),t)}))}))},aie.$inject=["moddle"],aie.prototype.execute=function(e){var t=this._moddle.ids,n=e.id,i=e.element,o=e.claiming;o?t.claim(n,i):t.unclaim(n)},aie.prototype.revert=function(e){var t=this._moddle.ids,n=e.id,i=e.element,o=e.claiming;o?t.unclaim(n):t.claim(n,i)};var lie={fill:void 0,stroke:void 0};function cie(e){this._commandStack=e,this._normalizeColor=function(e){if(e){if(Object(WU["isString"])(e)){var t=hie(e);if(t)return t}throw new Error("invalid color value: "+e)}}}function hie(e){var t=document.createElement("canvas").getContext("2d");return t.fillStyle="transparent",t.fillStyle=e,/^#[0-9a-fA-F]{6}$/.test(t.fillStyle)?t.fillStyle:null}function uie(e){return!!e.waypoints}function die(e){"border-color"in e&&(e.stroke=e["border-color"]),"background-color"in e&&(e.fill=e["background-color"])}cie.$inject=["commandStack"],cie.prototype.postExecute=function(e){var t=e.elements,n=e.colors||lie,i=this,o={};"fill"in n&&Object(WU["assign"])(o,{"background-color":this._normalizeColor(n.fill)}),"stroke"in n&&Object(WU["assign"])(o,{"border-color":this._normalizeColor(n.stroke)}),Object(WU["forEach"])(t,(function(e){var t=uie(e)?Object(WU["pick"])(o,["border-color"]):o;die(t),i._commandStack.execute("element.updateProperties",{element:e,properties:{di:t}})}))};var pie={width:0,height:0};function fie(e,t){function n(e,t){var n=e.label||e,i=e.labelTarget||e;return I$(n,t,i!==n),[n,i]}function i(t){var n=t.element,i=n.businessObject,o=t.newLabel;if(!LX(n)&&AX(n)&&!EX(n)&&!gie(o)){var r=7,s=kX(n);s={x:s.x,y:s.y+r},e.createLabel(n,s,{id:i.id+"_label",businessObject:i})}}function o(e){return e.oldLabel=L$(e.element),n(e.element,e.newLabel)}function r(e){return n(e.element,e.oldLabel)}function s(n){var i=n.element,o=i.label||i,r=n.newLabel,s=n.newBounds,a=n.hints||{};if(LX(o)||v$(o,"bpmn:TextAnnotation"))if(LX(o)&&gie(r))!1!==a.removeShape&&e.removeShape(o,{unsetLabel:!1});else{var l=L$(o);"undefined"===typeof s&&(s=t.getExternalLabelBounds(o,l)),s&&e.resizeShape(o,s,pie)}}this.preExecute=i,this.execute=o,this.revert=r,this.postExecute=s}function gie(e){return!e||!e.trim()}function mie(e,t,n,i){Pne.call(this,e,t,n),this._bpmnRules=i}function bie(){}fie.$inject=["modeling","textRenderer"],FU()(mie,Pne),mie.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],mie.prototype.getHandlers=function(){var e=Pne.prototype.getHandlers.call(this);return e["element.updateModdleProperties"]=Fne,e["element.updateProperties"]=Yne,e["canvas.updateRoot"]=eie,e["lane.add"]=tie,e["lane.resize"]=iie,e["lane.split"]=nie,e["lane.updateRefs"]=sie,e["id.updateClaim"]=aie,e["element.setColor"]=cie,e["element.updateLabel"]=fie,e},mie.prototype.updateLabel=function(e,t,n,i){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t,newBounds:n,hints:i||{}})},mie.prototype.connect=function(e,t,n,i){var o=this._bpmnRules;if(n||(n=o.canConnect(e,t)),n)return this.createConnection(e,t,n,e.parent,i)},mie.prototype.updateModdleProperties=function(e,t,n){this._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:n})},mie.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},mie.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},mie.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},mie.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},mie.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},mie.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},mie.prototype.makeProcess=function(){var e=this._create("root",{type:"bpmn:Process"}),t={newRoot:e};this._commandStack.execute("canvas.updateRoot",t)},mie.prototype.claimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t,claiming:!0})},mie.prototype.unclaimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t})},mie.prototype.setColor=function(e,t){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:t})},bie.prototype.layoutConnection=function(e,t){return t=t||{},[t.connectionStart||kG(t.source||e.source),t.connectionEnd||kG(t.target||e.target)]};var vie=20,yie=5,wie=Math.round,_ie=20,Cie={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function Aie(e,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(e)}function Eie(e,t){return{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[e].test(t)}function xie(e,t,n){var i,o,r=DG(t,e,yie),s=n.split(":")[0],a=wie((t.x-e.x)/2+e.x),l=wie((t.y-e.y)/2+e.y),c=Eie(s,r),h=/h|r|l/.test(s),u=!1,d=!1;return c?(i=h?{x:a,y:e.y}:{x:e.x,y:l},o=h?"h:h":"v:v"):(u=Aie(r,s),o=h?"h:v":"v:h",u?h?(d=l===e.y,i={x:e.x+vie*(/l/.test(s)?-1:1),y:d?l+vie:l}):(d=a===e.x,i={x:d?a+vie:a,y:e.y+vie*(/t/.test(s)?-1:1)}):i={x:a,y:l}),{waypoints:Nie(e,i,o).concat(i),directions:o,turnNextDirections:d}}function Sie(e,t,n){return xie(e,t,n)}function kie(e,t,n){var i=xie(t,e,Lie(n));return{waypoints:i.waypoints.slice().reverse(),directions:Lie(i.directions),turnNextDirections:i.turnNextDirections}}function Die(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var o=n+":"+i,r=Nie(e.waypoints[e.waypoints.length-1],t.waypoints[0],o);return{waypoints:r,directions:o}}function Lie(e){return e.split(":").reverse().join(":")}function Iie(e,t,n){var i=wie((t.x-e.x)/2+e.x),o=wie((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:o},{x:t.x,y:o}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}function Nie(e,t,n){if(n=n||"h:h",!Qie(n))throw new Error("unknown directions: <"+n+">: must be specified as <start>:<end> with start/end in { h,v,t,r,b,l }");if(Wie(n)){var i=Sie(e,t,n),o=kie(e,t,n),r=Die(i,o);return[].concat(i.waypoints,r.waypoints,o.waypoints)}return Iie(e,t,n)}function Mie(e,t,n){var i=Nie(e,t,n);return i.unshift(e),i.push(t),Yie(i)}function Bie(e,t,n,i,o){var r=o&&o.preferredLayouts||[],s=Object(WU["without"])(r,"straight")[0]||"h:h",a=Cie[s]||0,l=DG(e,t,a),c=Vie(l,s);n=n||kG(e),i=i||kG(t);var h=c.split(":"),u=Uie(n,e,h[0],Hie(l)),d=Uie(i,t,h[1],l);return Mie(u,d,c)}function Tie(e,t,n,i,o,r){Object(WU["isArray"])(n)&&(o=n,r=i,n=kG(e),i=kG(t)),r=Object(WU["assign"])({preferredLayouts:[]},r),o=o||[];var s,a=r.preferredLayouts,l=-1!==a.indexOf("straight");return s=l&&Pie(e,t,n,i,r),s||(s=r.connectionEnd&&jie(t,e,i,o),s||(s=r.connectionStart&&Fie(e,t,n,o),s||(!r.connectionStart&&!r.connectionEnd&&o&&o.length?o:Bie(e,t,n,i,r))))}function Oie(e,t,n){return e>=t&&e<=n}function Rie(e,t,n){var i={x:"width",y:"height"};return Oie(t[e],n[e],n[e]+n[i[e]])}function Pie(e,t,n,i,o){var r,s,a={};return s=DG(e,t),/^(top|bottom|left|right)$/.test(s)?(/top|bottom/.test(s)&&(r="x"),/left|right/.test(s)&&(r="y"),"target"===o.preserveDocking?Rie(r,i,e)?(a[r]=i[r],[{x:void 0!==a.x?a.x:n.x,y:void 0!==a.y?a.y:n.y,original:{x:void 0!==a.x?a.x:n.x,y:void 0!==a.y?a.y:n.y}},{x:i.x,y:i.y}]):null:Rie(r,n,t)?(a[r]=n[r],[{x:n.x,y:n.y},{x:void 0!==a.x?a.x:i.x,y:void 0!==a.y?a.y:i.y,original:{x:void 0!==a.x?a.x:i.x,y:void 0!==a.y?a.y:i.y}}]):null):null}function Fie(e,t,n,i){return zie(e,t,n,i)}function jie(e,t,n,i){var o=i.slice().reverse();return o=zie(e,t,n,o),o?o.reverse():null}function zie(e,t,n,i){function o(e){return e.length<3||!(e.length>4)&&!!Object(WU["find"])(e,(function(t,n){var i=e[n-1];return i&&pG(t,i)<3}))}function r(e,t,n){var i=mG(t,e);switch(i){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}function s(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(yG(e[i],t,_ie)||yG(e[i],n,_ie))return e.slice(i);return e}if(o(i))return null;var a,l=i[0],c=i.slice();return c[0]=n,c[1]=r(c[1],l,n),a=s(c,e,t),a!==c&&(c=zie(e,t,n,a)),c&&mG(c)?null:c}function Vie(e,t){if(Wie(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}function Qie(e){return e&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(e)}function Wie(e){return e&&/t|r|b|l/.test(e)}function Hie(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}function Uie(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function Yie(e){return e.reduce((function(t,n,i){var o=t[t.length-1],r=e[i+1];return fG(o,r,n,0)||t.push(n),t}),[])}var Gie=-10,Kie=40,qie={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},Jie={top:"t",right:"r",bottom:"b",left:"l"};function $ie(){}function Xie(e){var t=e.host;return DG(kG(e),t,Gie)}function Zie(e,t){return{preferredLayouts:["straight","v:v"],preserveDocking:eoe(e,t)}}function eoe(e,t){return v$(t,"bpmn:Participant")?"source":v$(e,"bpmn:Participant")?"target":roe(t)?"source":roe(e)||v$(t,"bpmn:Event")?"target":v$(e,"bpmn:Event")?"source":null}function toe(e){return{preferredLayouts:["straight","h:h"],preserveDocking:noe(e)}}function noe(e){return roe(e)?"target":"source"}function ioe(e,t){return e?e.original||e:kG(t)}function ooe(e,t){return v$(t,"bpmn:Activity")&&v$(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function roe(e){return v$(e,"bpmn:SubProcess")&&w$(e)}function soe(e,t){return e===t}function aoe(e,t){return-1!==t.indexOf(e)}function loe(e){var t=/right|left/.exec(e);return t&&t[0]}function coe(e){var t=/top|bottom/.exec(e);return t&&t[0]}function hoe(e,t){return qie[e]===t}function uoe(e,t){var n=loe(e),i=qie[n];return-1!==t.indexOf(i)}function doe(e,t){var n=coe(e),i=qie[n];return-1!==t.indexOf(i)}function poe(e){return"right"===e||"left"===e}function foe(e,t){var n=t.waypoints,i=n&&n.length&&DG(n[0],e);return"top"===i?["t:r"]:"right"===i?["r:b"]:"left"===i?["l:t"]:["b:l"]}function goe(e,t,n){var i,o,r=kG(e),s=kG(t),a=Xie(e),l=soe(e.host,t),c=aoe(a,["top","right","bottom","left"]),h=DG(s,r,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return l?moe(a,c,e,t,n):(i=yoe(a,h,c),o=woe(a,h,c),[i+":"+o])}function moe(e,t,n,i,o){var r,s=t?e:coe(e),a=Jie[s];return r=t?poe(e)?boe("y",n,i,o)?"h":"b":boe("x",n,i,o)?"v":"l":"v",[a+":"+r]}function boe(e,t,n,i){var o=Kie;return!(voe(e,i,n,o)||voe(e,i,{x:n.x+n.width,y:n.y+n.height},o)||voe(e,i,kG(t),o))}function voe(e,t,n,i){return Math.abs(t[e]-n[e])<i}function yoe(e,t,n){return n?Jie[e]:soe(coe(e),coe(t))||hoe(loe(e),loe(t))?Jie[coe(e)]:Jie[loe(e)]}function woe(e,t,n){return n?poe(e)?uoe(e,t)||soe(e,t)?"h":"v":doe(e,t)||soe(e,t)?"v":"h":poe(t)||soe(coe(e),coe(t))&&loe(t)?"h":"v"}function _oe(e){return Object(WU["assign"])({original:e.point.original||e.point},e.actual)}function Coe(e,t){this._elementRegistry=e,this._graphicsFactory=t}FU()($ie,bie),$ie.prototype.layoutConnection=function(e,t){t||(t={});var n,i,o=t.source||e.source,r=t.target||e.target,s=t.waypoints||e.waypoints,a=t.connectionStart,l=t.connectionEnd;return a||(a=ioe(s&&s[0],o)),l||(l=ioe(s&&s[s.length-1],r)),(v$(e,"bpmn:Association")||v$(e,"bpmn:DataAssociation"))&&s&&!ooe(o,r)?[].concat([a],s.slice(1,-1),[l]):(v$(e,"bpmn:MessageFlow")?n=Zie(o,r):(v$(e,"bpmn:SequenceFlow")||ooe(o,r))&&(n=o===r?{preferredLayouts:foe(o,e)}:v$(o,"bpmn:BoundaryEvent")?{preferredLayouts:goe(o,r,l)}:roe(o)||roe(r)?toe(o):v$(o,"bpmn:Gateway")?{preferredLayouts:["v:h"]}:v$(r,"bpmn:Gateway")?{preferredLayouts:["h:v"]}:{preferredLayouts:["h:h"]}),n&&(n=Object(WU["assign"])(n,t),i=Yie(Tie(o,r,a,l,s,n))),i||[a,l])},Coe.$inject=["elementRegistry","graphicsFactory"],Coe.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var i=this.getDockingPoint(e,t,!0),o=this.getDockingPoint(e,n),r=e.waypoints.slice(i.idx+1,o.idx);return r.unshift(_oe(i)),r.push(_oe(o)),r},Coe.prototype.getDockingPoint=function(e,t,n){var i,o,r,s=e.waypoints;return i=n?0:s.length-1,o=s[i],r=this._getIntersection(t,e,n),{point:o,actual:r||o,idx:i}},Coe.prototype._getIntersection=function(e,t,n){var i=this._getShapePath(e),o=this._getConnectionPath(t);return LG(i,o,n)},Coe.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},Coe.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},Coe.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};var Aoe={__init__:["modeling","bpmnUpdater"],__depends__:[O7,Nee,Tee,Pee,m5,jee,Gee,Zee,cte,lZ,h8,jte],bpmnFactory:["type",zte],bpmnUpdater:["type",Vte],elementFactory:["type",Hte],modeling:["type",mie],layouter:["type",$ie],connectionDocking:["type",Coe]},Eoe=500,xoe=1250,Soe=1500,koe=Math.round;function Doe(e){return{x:e.x+koe(e.width/2),y:e.y+koe(e.height/2)}}function Loe(e,t,n,i,o){function r(e,t,n,i){return o.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function s(e,n,i,o){if(Object(WU["isObject"])(i)&&(o=i,i=!1),!n.waypoints&&n.parent){var r=Doe(n);return t.init(e,r,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:o||{}}}),!0}}e.on("shape.move.start",Soe,(function(e){var t=e.context,n=e.shape,o=i.get().slice();-1===o.indexOf(n)&&(o=[n]),o=Ioe(o),Object(WU["assign"])(t,{shapes:o,validatedShapes:o,shape:n})})),e.on("shape.move.start",xoe,(function(e){var t,n=e.context,i=n.validatedShapes;if(t=n.canExecute=r(i),!t)return!1})),e.on("shape.move.move",Eoe,(function(e){var t,n=e.context,i=n.validatedShapes,o=e.hover,s={x:e.dx,y:e.dy},a={x:e.x,y:e.y};t=r(i,s,a,o),n.delta=s,n.canExecute=t,n.target=null!==t?o:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,o=t.canExecute,r="attach"===o,s=t.shapes;if(!1===o)return!1;i.x=koe(i.x),i.y=koe(i.y),0===i.x&&0===i.y||n.moveElements(s,i,t.target,{primaryShape:t.shape,attach:r})})),e.on("element.mousedown",(function(e){if(HX(e)){var t=jX(e);if(!t)throw new Error("must supply DOM mousedown event");return s(t,e.element)}})),this.start=s}function Ioe(e){var t=Object(WU["groupBy"])(e,"id");return Object(WU["filter"])(e,(function(e){while(e=e.parent)if(t[e.id])return!1;return!0}))}Loe.$inject=["eventBus","dragging","modeling","selection","rules"];var Noe=499,Moe="djs-dragging",Boe="drop-ok",Toe="drop-not-ok",Ooe="new-parent",Roe="attach-ok";function Poe(e,t,n,i){function o(e){var t=r(e),n=Foe(t);return n}function r(e){var t=ZY(e,!0),n=Object(WU["map"])(t,(function(e){return(e.incoming||[]).concat(e.outgoing||[])}));return Object(WU["flatten"])(t.concat(n))}function s(e,n){[Roe,Boe,Toe,Ooe].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}function a(e,n,o){i.addDragger(n,e.dragGroup),o&&t.addMarker(n,Moe),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}e.on("shape.move.start",Noe,(function(e){var s=e.context,a=s.shapes,l=s.allDraggedElements,c=o(a);if(!s.dragGroup){var h=pY("g");ZU(h,n.cls("djs-drag-group",["no-events"]));var u=t.getActiveLayer();GU(u,h),s.dragGroup=h}c.forEach((function(e){i.addDragger(e,s.dragGroup)})),l=l?Object(WU["flatten"])([l,r(a)]):r(a),Object(WU["forEach"])(l,(function(e){t.addMarker(e,Moe)})),s.allDraggedElements=l,s.differentParents=joe(a)})),e.on("shape.move.move",Noe,(function(e){var t=e.context,n=t.dragGroup,i=t.target,o=t.shape.parent,r=t.canExecute;i&&("attach"===r?s(i,Roe):t.canExecute&&i&&i.id!==o.id?s(i,Ooe):s(i,t.canExecute?Boe:Toe)),mK(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context,n=t.target;n&&s(n,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,o=n.dragGroup;Object(WU["forEach"])(i,(function(e){t.removeMarker(e,Moe)})),o&&sY(o)})),this.makeDraggable=a}function Foe(e){var t=Object(WU["filter"])(e,(function(t){return!zoe(t)||Object(WU["find"])(e,Object(WU["matchPattern"])({id:t.source.id}))&&Object(WU["find"])(e,Object(WU["matchPattern"])({id:t.target.id}))}));return t}function joe(e){return 1!==Object(WU["size"])(Object(WU["groupBy"])(e,(function(e){return e.parent&&e.parent.id})))}function zoe(e){return e.waypoints}Poe.$inject=["eventBus","canvas","styles","previewSupport"];var Voe={__depends__:[XX,lZ,tZ,L1,E1,m4],__init__:["move","movePreview"],move:["type",Loe],movePreview:["type",Poe]},Qoe=".djs-palette-toggle",Woe=".entry",Hoe=Qoe+", "+Woe,Uoe="djs-palette-",Yoe="shown",Goe="open",Koe="two-column",qoe=1e3;function Joe(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function $oe(e,t){var n=Object(HU["classes"])(e),i=Object(WU["isArray"])(t)?t:t.split(/\s+/g);i.forEach((function(e){n.add(e)}))}function Xoe(e,t){var n=t.getPaletteEntries();return Object(WU["isFunction"])(n)?n(e):(Object(WU["forEach"])(n,(function(t,n){e[n]=t})),e)}Joe.$inject=["eventBus","canvas"],Joe.prototype.registerProvider=function(e,t){t||(t=e,e=qoe),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},Joe.prototype.getEntries=function(){var e=this._getProviders();return e.reduce(Xoe,{})},Joe.prototype._rebuild=function(){if(this._diagramInitialized){var e=this._getProviders();e.length&&(this._container||this._init(),this._update())}},Joe.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=Object(HU["domify"])(Joe.HTML_MARKUP);n.appendChild(i),Object(HU["classes"])(n).add(Uoe+Yoe),HU["delegate"].bind(i,Hoe,"click",(function(t){var n=t.delegateTarget;if(Object(HU["matches"])(n,Qoe))return e.toggle();e.trigger("click",t)})),HU["event"].bind(i,"mousedown",(function(e){e.stopPropagation()})),HU["delegate"].bind(i,Woe,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},Joe.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Joe.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,o=this._eventBus,r=Object(HU["classes"])(i),s=Object(HU["classes"])(n);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),r.toggle(Koe,t),s.toggle(Uoe+Koe,t),"open"in e&&(r.toggle(Goe,e.open),s.toggle(Uoe+Goe,e.open)),o.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},Joe.prototype._update=function(){var e=Object(HU["query"])(".djs-palette-entries",this._container),t=this._entries=this.getEntries();Object(HU["clear"])(e),Object(WU["forEach"])(t,(function(t,n){var i=t.group||"default",o=Object(HU["query"])("[data-group="+i+"]",e);o||(o=Object(HU["domify"])('<div class="group" data-group="'+i+'"></div>'),e.appendChild(o));var r=t.html||(t.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),s=Object(HU["domify"])(r);o.appendChild(s),t.separator||(Object(HU["attr"])(s,"data-action",n),t.title&&Object(HU["attr"])(s,"title",t.title),t.className&&$oe(s,t.className),t.imageUrl&&s.appendChild(Object(HU["domify"])('<img src="'+t.imageUrl+'">')))})),this.open()},Joe.prototype.trigger=function(e,t,n){var i,o,r,s=this._entries,a=t.delegateTarget||t.target;if(!a)return t.preventDefault();i=s[Object(HU["attr"])(a,"data-action")],i&&(o=i.action,r=t.originalEvent||t,Object(WU["isFunction"])(o)?"click"===e&&o(r,n):o[e]&&o[e](r,n),t.preventDefault())},Joe.prototype._layoutChanged=function(){this._toggleState({})},Joe.prototype._needsCollapse=function(e,t){var n=50,i=46*Object.keys(t).length;return e<i+n},Joe.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},Joe.prototype.open=function(){this._toggleState({open:!0})},Joe.prototype.toggle=function(e){this.isOpen()?this.close():this.open()},Joe.prototype.isActiveTool=function(e){return e&&this._activeTool===e},Joe.prototype.updateToolHighlight=function(e){var t,n;this._toolsContainer||(t=Object(HU["query"])(".djs-palette-entries",this._container),this._toolsContainer=Object(HU["query"])("[data-group=tools]",t)),n=this._toolsContainer,Object(WU["forEach"])(n.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=Object(HU["classes"])(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},Joe.prototype.isOpen=function(){return Object(HU["classes"])(this._container).has(Goe)},Joe.prototype._getParentContainer=function(){return this._canvas.getContainer()},Joe.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>';var Zoe={__init__:["palette"],palette:["type",Joe]},ere="crosshair";function tre(e,t,n,i,o,r,s){this._selection=o,this._dragging=n,this._mouse=s;var a=this,l={create:function(e){var n,i=t.getActiveLayer();n=e.frame=pY("rect"),ZU(n,{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),GU(i,n)},update:function(e){var t=e.frame,n=e.bbox;ZU(t,{x:n.x,y:n.y,width:n.width,height:n.height})},remove:function(e){e.frame&&sY(e.frame)}};r.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){a.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",(function(e){var t=nre(e),n=i.filter((function(e){return e}));a.select(n,t)})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=nre(e),l.create(t)})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=nre(e),l.update(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;l.remove(t)})),e.on("element.mousedown",1500,(function(e){if(GX(e))return a.activateLasso(e.originalEvent),!0}))}function nre(e){var t,n={x:e.x-e.dx,y:e.y-e.dy},i={x:e.x,y:e.y};return t=n.x<=i.x&&n.y<i.y||n.x<i.x&&n.y<=i.y?{x:n.x,y:n.y,width:i.x-n.x,height:i.y-n.y}:n.x>=i.x&&n.y<i.y||n.x>i.x&&n.y<=i.y?{x:i.x,y:n.y,width:n.x-i.x,height:i.y-n.y}:n.x<=i.x&&n.y>i.y||n.x<i.x&&n.y>=i.y?{x:n.x,y:i.y,width:i.x-n.x,height:n.y-i.y}:n.x>=i.x&&n.y>i.y||n.x>i.x&&n.y>=i.y?{x:i.x,y:i.y,width:n.x-i.x,height:n.y-i.y}:{x:i.x,y:i.y,width:0,height:0},t}tre.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],tre.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:ere,data:{context:{}}})},tre.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:ere,data:{context:{}}})},tre.prototype.select=function(e,t){var n=nG(e,t);this._selection.select(Object(WU["values"])(n))},tre.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},tre.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)};var ire={__depends__:[pte,V4],__init__:["lassoTool"],lassoTool:["type",tre]},ore=1500,rre="grab";function sre(e,t,n,i,o,r){this._dragging=n,this._mouse=r;var s=this,a=i.get("keyboard",!1);o.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",ore,(function(e){if(YX(e))return s.activateMove(e.originalEvent,!0),!1})),a&&a.addListener(ore,(function(e){if(are(e.keyEvent)&&!s.isActive()){var t=s._mouse.getLastMoveEvent();s.activateMove(t,!!t)}}),"keyboard.keydown"),a&&a.addListener(ore,(function(e){are(e.keyEvent)&&s.isActive()&&s.toggle()}),"keyboard.keyup"),e.on("hand.end",(function(t){var n=t.originalEvent.target;if(!t.hover&&!(n instanceof SVGElement))return!1;e.once("hand.ended",(function(){s.activateMove(t.originalEvent,{reactivate:!0})}))})),e.on("hand.move.move",(function(e){var n=t.viewbox().scale;t.scroll({dx:e.dx*n,dy:e.dy*n})})),e.on("hand.move.end",(function(t){var n=t.context,i=n.reactivate;return!YX(t)&&i&&e.once("hand.move.ended",(function(e){s.activateHand(e.originalEvent,!0,!0)})),!1}))}function are(e){return _Z(" ",e)}sre.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"],sre.prototype.activateMove=function(e,t,n){"object"===typeof t&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:rre,data:{context:n||{}}})},sre.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:rre,data:{context:{reactivate:n}}})},sre.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateHand(e,!!e)},sre.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^(hand|hand\.move)$/.test(e.prefix)};var lre={__depends__:[pte,V4],__init__:["handTool"],handTool:["type",sre]},cre="connect-ok",hre="connect-not-ok";function ure(e,t,n,i,o,r,s){var a=this;this._dragging=t,this._rules=r,this._mouse=s,o.registerTool("global-connect",{tool:"global-connect",dragging:"global-connect.drag"}),e.on("global-connect.hover",(function(e){var t=e.context,n=e.hover,o=t.canStartConnect=a.canStartConnect(n);null!==o&&(t.startTarget=n,i.addMarker(n,o?cre:hre))})),e.on(["global-connect.out","global-connect.cleanup"],(function(e){var t=e.context.startTarget,n=e.context.canStartConnect;t&&i.removeMarker(t,n?cre:hre)})),e.on(["global-connect.ended"],(function(t){var i=t.context,o=i.startTarget,r={x:t.x,y:t.y},s=a.canStartConnect(o);if(s)return e.once("element.out",(function(){e.once(["connect.ended","connect.canceled"],(function(){e.fire("global-connect.drag.ended")})),n.start(null,o,r)})),!1}))}ure.$inject=["eventBus","dragging","connect","canvas","toolManager","rules","mouse"],ure.prototype.start=function(e,t){this._dragging.init(e,"global-connect",{autoActivate:t,trapClick:!1,data:{context:{}}})},ure.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();return this.start(e,!!e)},ure.prototype.isActive=function(){var e=this._dragging.context();return e&&/^global-connect/.test(e.prefix)},ure.prototype.canStartConnect=function(e){return this._rules.allowed("connection.start",{source:e})};var dre={__depends__:[Q2,L1,E1,pte,V4],globalConnect:["type",ure]};function pre(e,t,n,i,o,r,s,a){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=o,this._handTool=r,this._globalConnect=s,this._translate=a,e.registerProvider(this)}pre.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"],pre.prototype.getPaletteEntries=function(e){var t={},n=this._create,i=this._elementFactory,o=this._spaceTool,r=this._lassoTool,s=this._handTool,a=this._globalConnect,l=this._translate;function c(e,t,o,r,s){function a(t){var o=i.createShape(Object(WU["assign"])({type:e},s));s&&(o.businessObject.di.isExpanded=s.isExpanded),n.start(t,o)}var c=e.replace(/^bpmn:/,"");return{group:t,className:o,title:r||l("Create {type}",{type:c}),action:{dragstart:a,click:a}}}function h(e){var t=i.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),o=i.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:t});n.start(e,[t,o],{hints:{autoSelect:[o]}})}function u(e){n.start(e,i.createParticipantShape())}return Object(WU["assign"])(t,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:l("Activate the hand tool"),action:{click:function(e){s.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:l("Activate the lasso tool"),action:{click:function(e){r.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:l("Activate the create/remove space tool"),action:{click:function(e){o.activateSelection(e)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:l("Activate the global connect tool"),action:{click:function(e){a.start(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":c("bpmn:StartEvent","event","bpmn-icon-start-event-none",l("Create StartEvent")),"create.intermediate-event":c("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",l("Create Intermediate/Boundary Event")),"create.end-event":c("bpmn:EndEvent","event","bpmn-icon-end-event-none",l("Create EndEvent")),"create.exclusive-gateway":c("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",l("Create Gateway")),"create.task":c("bpmn:Task","activity","bpmn-icon-task",l("Create Task")),"create.data-object":c("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",l("Create DataObjectReference")),"create.data-store":c("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",l("Create DataStoreReference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:l("Create expanded SubProcess"),action:{dragstart:h,click:h}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:l("Create Pool/Participant"),action:{dragstart:u,click:u}},"create.group":c("bpmn:Group","artifact","bpmn-icon-group",l("Create Group"))}),t};var fre={__depends__:[Zoe,I4,jte,ire,lre,dre,wX],__init__:["paletteProvider"],paletteProvider:["type",pre]},gre=250;function mre(e,t,n,i,o){function r(e){var r=e.canExecute.replacements;Object(WU["forEach"])(r,(function(r){var s=r.oldElementId,a={type:r.newElementType};if(!e.visualReplacements[s]){var l=t.get(s);Object(WU["assign"])(a,{x:l.x,y:l.y});var c=n.createShape(a);i.addShape(c,l.parent);var h=Object(HU["query"])('[data-element-id="'+K1()(l.id)+'"]',e.dragGroup);h&&ZU(h,{display:"none"});var u=o.addDragger(c,e.dragGroup);e.visualReplacements[s]=u,i.removeShape(c)}}))}function s(e){var t=e.visualReplacements;Object(WU["forEach"])(t,(function(n,i){var o=Object(HU["query"])('[data-element-id="'+K1()(i)+'"]',e.dragGroup);o&&ZU(o,{display:"inline"}),n.remove(),t[i]&&delete t[i]}))}i1.call(this,e),e.on("shape.move.move",gre,(function(e){var t=e.context,n=t.canExecute;t.visualReplacements||(t.visualReplacements={}),n&&n.replacements?r(t):s(t)}))}mre.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"],FU()(mre,i1);var bre={__depends__:[m4],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",mre]},vre=1250,yre=40,wre=20,_re=10,Cre=20,Are=["x","y"],Ere=Math.abs;function xre(e){e.on(["connect.hover","connect.move","connect.end"],vre,(function(e){var t=e.context,n=t.canExecute,i=t.start,o=t.hover,r=t.source,s=t.target;e.originalEvent&&wZ(e.originalEvent)||(t.initialConnectionStart||(t.initialConnectionStart=t.connectionStart),n&&o&&Sre(e,o,Bre(o)),o&&Nre(n,["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(t.connectionStart=S2(i),G0(o,["bpmn:Event","bpmn:Gateway"])&&Lre(e,S2(o)),G0(o,["bpmn:Task","bpmn:SubProcess"])&&kre(e,o),v$(r,"bpmn:BoundaryEvent")&&s===r.host&&Dre(e)):Ire(n,"bpmn:MessageFlow")?(v$(i,"bpmn:Event")&&(t.connectionStart=S2(i)),v$(o,"bpmn:Event")&&Lre(e,S2(o))):t.connectionStart=t.initialConnectionStart)}))}function Sre(e,t,n){Are.forEach((function(i){var o=Mre(i,t);e[i]<t[i]+n?D2(e,i,t[i]+n):e[i]>t[i]+o-n&&D2(e,i,t[i]+o-n)}))}function kre(e,t){var n=S2(t);Are.forEach((function(i){Tre(e,t,i)&&D2(e,i,n[i])}))}function Dre(e){var t=e.context,n=t.source,i=t.target;if(!Ore(t)){var o=S2(n),r=DG(o,i,-10),s=[];/top|bottom/.test(r)&&s.push("x"),/left|right/.test(r)&&s.push("y"),s.forEach((function(t){var n,i=e[t];Ere(i-o[t])<yre&&(n=i>o[t]?o[t]+yre:o[t]-yre,D2(e,t,n))}))}}function Lre(e,t){D2(e,"x",t.x),D2(e,"y",t.y)}function Ire(e,t){return e&&e.type===t}function Nre(e,t){return Object(WU["some"])(t,(function(t){return Ire(e,t)}))}function Mre(e,t){return"x"===e?t.width:t.height}function Bre(e){return v$(e,"bpmn:Task")?_re:wre}function Tre(e,t,n){return e[n]>t[n]+Cre&&e[n]<t[n]+Mre(n,t)-Cre}function Ore(e){var t=e.hover,n=e.source;return t&&n&&t===n}function Rre(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function Pre(e){this._snapValues={}}xre.$inject=["eventBus"],Rre.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},Rre.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},Rre.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},Rre.prototype.getSnapLocations=function(){return this._snapLocations},Rre.prototype.setSnapLocations=function(e){this._snapLocations=e},Rre.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new Pre,n.initDefaults(this._defaultSnaps)),n},Pre.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},Pre.prototype.snap=function(e,t,n,i){var o=this._snapValues[t];return o&&A2(e[n],o[n],i)},Pre.prototype.initDefaults=function(e){var t=this;Object(WU["forEach"])(e||{},(function(e,n){Object(WU["forEach"])(e,(function(e){t.add(n,e)}))}))};var Fre=1250;function jre(e,t,n){var i=this;this._elementRegistry=e,t.on(["create.start","shape.move.start"],(function(e){i.initSnap(e)})),t.on(["create.move","create.end","shape.move.move","shape.move.end"],Fre,(function(e){var t=e.context,o=t.shape,r=t.snapContext,s=t.target;if((!e.originalEvent||!wZ(e.originalEvent))&&!k2(e)&&s){var a=r.pointsForTarget(s);a.initialized||(a=i.addSnapTargetPoints(a,o,s),a.initialized=!0),n.snap(e,a)}})),t.on(["create.cleanup","shape.move.cleanup"],(function(){n.hide()}))}function zre(e){return!!e.waypoints}function Vre(e){return!!e.hidden}function Qre(e){return!!e.labelTarget}jre.$inject=["elementRegistry","eventBus","snapping"],jre.prototype.initSnap=function(e){var t,n=this._elementRegistry,i=e.context,o=i.shape,r=i.snapContext;r||(r=i.snapContext=new Rre),t=n.get(o.id)?S2(o,e):{x:e.x+S2(o).x,y:e.y+S2(o).y};var s={x:t.x-o.width/2,y:t.y-o.height/2},a={x:t.x+o.width/2,y:t.y+o.height/2};return r.setSnapOrigin("mid",{x:t.x-e.x,y:t.y-e.y}),Qre(o)||(r.setSnapOrigin("top-left",{x:s.x-e.x,y:s.y-e.y}),r.setSnapOrigin("bottom-right",{x:a.x-e.x,y:a.y-e.y})),r},jre.prototype.addSnapTargetPoints=function(e,t,n){var i=this.getSnapTargets(t,n);return Object(WU["forEach"])(i,(function(n){if(Qre(n))Qre(t)&&e.add("mid",S2(n));else if(zre(n)){if(n.waypoints.length<3)return;var i=n.waypoints.slice(1,-1);Object(WU["forEach"])(i,(function(t){e.add("mid",t)}))}else e.add("mid",S2(n))})),Object(WU["isNumber"])(t.x)&&Object(WU["isNumber"])(t.y)?(this._elementRegistry.get(t.id)&&e.add("mid",S2(t)),e):e},jre.prototype.getSnapTargets=function(e,t){return L2(t).filter((function(e){return!Vre(e)}))};var Wre=1500;function Hre(e,t){t.invoke(jre,this),e.on(["create.move","create.end"],Wre,Kre),e.on(["create.move","create.end","shape.move.move","shape.move.end"],Wre,(function(e){var t=e.context,n=t.canExecute,i=t.target,o=n&&("attach"===n||n.attach);o&&!k2(e)&&Ure(e,i)}))}function Ure(e,t){var n,i=xG(t),o=R7(e,t),r=e.context,s=r.shape;n=s.parent?{x:0,y:0}:kG(s),/top/.test(o)?D2(e,"y",i.top-n.y):/bottom/.test(o)&&D2(e,"y",i.bottom-n.y),/left/.test(o)?D2(e,"x",i.left-n.x):/right/.test(o)&&D2(e,"x",i.right-n.x)}function Yre(e,t){return e.every((function(e){return v$(e,t)}))}function Gre(e){return!(!v$(e,"bpmn:SubProcess")||!w$(e))||v$(e,"bpmn:Participant")}function Kre(e){var t=e.context,n=t.createConstraints;if(n){var i=n.top,o=n.right,r=n.bottom,s=n.left;(s&&s>=e.x||o&&o<=e.x)&&D2(e,"x",e.x),(i&&i>=e.y||r&&r<=e.y)&&D2(e,"y",e.y)}}function qre(e,t){return-1!==e.indexOf(t)}function Jre(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}FU()(Hre,jre),Hre.$inject=["eventBus","injector"],Hre.prototype.initSnap=function(e){var t=jre.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return Object(WU["forEach"])(n.outgoing,(function(n){var o=n.waypoints[0];o=o.original||o,t.setSnapOrigin(n.id+"-docking",Jre(o,i,e))})),Object(WU["forEach"])(n.incoming,(function(n){var o=n.waypoints[n.waypoints.length-1];o=o.original||o,t.setSnapOrigin(n.id+"-docking",Jre(o,i,e))})),v$(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Hre.prototype.addSnapTargetPoints=function(e,t,n){jre.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);Object(WU["forEach"])(i,(function(n){(Gre(n)||Yre([t,n],"bpmn:TextAnnotation"))&&(e.add("top-left",E2(n)),e.add("bottom-right",x2(n)))}));var o=this._elementRegistry;return Object(WU["forEach"])(t.incoming,(function(n){if(o.get(t.id)){qre(i,n.source)||e.add("mid",kG(n.source));var r=n.waypoints[0];e.add(n.id+"-docking",r.original||r)}})),Object(WU["forEach"])(t.outgoing,(function(n){if(o.get(t.id)){qre(i,n.target)||e.add("mid",kG(n.target));var r=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",r.original||r)}})),v$(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Hre.prototype.getSnapTargets=function(e,t){return jre.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!v$(e,"bpmn:Lane")}))};var $re=1250;function Xre(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],$re,(function(e){var i=e.context,o=i.shape,r=o.parent,s=i.direction,a=i.snapContext;if((!e.originalEvent||!wZ(e.originalEvent))&&!k2(e)){var l=a.pointsForTarget(r);l.initialized||(l=n.addSnapTargetPoints(l,o,r,s),l.initialized=!0),ose(s)&&D2(e,"x",e.x),rse(s)&&D2(e,"y",e.y),t.snap(e,l)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function Zre(e,t){var n=kG(e),i=xG(e),o={x:n.x,y:n.y};return-1!==t.indexOf("n")?o.y=i.top:-1!==t.indexOf("s")&&(o.y=i.bottom),-1!==t.indexOf("e")?o.x=i.right:-1!==t.indexOf("w")&&(o.x=i.left),o}function ese(e,t){return e.host===t}function tse(e){return!!e.waypoints}function nse(e){return!!e.hidden}function ise(e){return!!e.labelTarget}function ose(e){return"n"===e||"s"===e}function rse(e){return"e"===e||"w"===e}Xre.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,o=t.snapContext;o||(o=t.snapContext=new Rre);var r=Zre(n,i);return o.setSnapOrigin("corner",{x:r.x-e.x,y:r.y-e.y}),o},Xre.prototype.addSnapTargetPoints=function(e,t,n,i){var o=this.getSnapTargets(t,n);return Object(WU["forEach"])(o,(function(t){e.add("corner",x2(t)),e.add("corner",E2(t))})),e.add("corner",Zre(t,i)),e},Xre.$inject=["eventBus","snapping"],Xre.prototype.getSnapTargets=function(e,t){return L2(t).filter((function(t){return!ese(t,e)&&!tse(t)&&!nse(t)&&!ise(t)}))};var sse=7,ase=1e3;function lse(e){this._canvas=e,this._asyncHide=Object(WU["debounce"])(Object(WU["bind"])(this.hide,this),ase)}lse.$inject=["canvas"],lse.prototype.snap=function(e,t){var n=e.context,i=n.snapContext,o=i.getSnapLocations(),r={x:k2(e,"x"),y:k2(e,"y")};Object(WU["forEach"])(o,(function(n){var o=i.getSnapOrigin(n),s={x:e.x+o.x,y:e.y+o.y};if(Object(WU["forEach"])(["x","y"],(function(e){var i;r[e]||(i=t.snap(s,n,e,sse),void 0!==i&&(r[e]={value:i,originValue:i-o[e]}))})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),Object(WU["forEach"])(["x","y"],(function(t){var n=r[t];Object(WU["isObject"])(n)&&D2(e,t,n.originValue)}))},lse.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=pY("path");return ZU(n,{d:"M0,0 L0,0"}),oY(n).add("djs-snap-line"),GU(t,n),{update:function(t){Object(WU["isNumber"])(t)?ZU(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):ZU(n,{display:"none"})}}},lse.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},lse.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},lse.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},lse.prototype.hide=function(){Object(WU["forEach"])(this._snapLines,(function(e){e.update()}))};var cse={__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",jre],resizeSnapping:["type",Xre],snapping:["type",lse]},hse={__depends__:[cse],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",xre],createMoveSnapping:["type",Hre]},use={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function dse(e){return e=""+e,e&&e.replace(/[&<>"']/g,(function(e){return use[e]}))}function pse(e,t,n,i){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._container=Object(HU["domify"])(pse.BOX_HTML),this._searchInput=Object(HU["query"])(pse.INPUT_SELECTOR,this._container),this._resultsContainer=Object(HU["query"])(pse.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function fse(e){var t=6,n=e.width+2*t,i=e.height+2*t,o=["width: "+n+"px","height: "+i+"px"].join("; ");return{position:{bottom:i-t,right:n-t},show:!0,html:'<div style="'+o+'" class="'+pse.OVERLAY_CLASS+'"></div>'}}function gse(e,t,n){var i=mse(t),o=Object(HU["domify"])(n);o.innerHTML=i,e.appendChild(o)}function mse(e){var t="";return e.forEach((function(e){e.matched?t+='<strong class="'+pse.RESULT_HIGHLIGHT_CLASS+'">'+dse(e.matched)+"</strong>":t+=dse(e.normal)})),""!==t?t:null}pse.$inject=["canvas","eventBus","overlays","selection"],pse.prototype._bindEvents=function(){var e=this;function t(t,n,i,o){e._eventMaps.push({el:t,type:i,listener:HU["delegate"].bind(t,n,i,o)})}t(document,"html","click",(function(t){e.close()})),t(this._container,pse.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,pse.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,pse.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,pse.INPUT_SELECTOR,"keydown",(function(e){38===e.keyCode&&e.preventDefault(),40===e.keyCode&&e.preventDefault()})),t(this._container,pse.INPUT_SELECTOR,"keyup",(function(t){if(27===t.keyCode)return e.close();if(13===t.keyCode){var n=e._getCurrentResult();return n?e._select(n):e.close()}return 38===t.keyCode?e._scrollToDirection(!0):40===t.keyCode?e._scrollToDirection():void(37!==t.keyCode&&39!==t.keyCode&&e._search(t.delegateTarget.value))}))},pse.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){HU["delegate"].unbind(e.el,e.type,e.listener)}))},pse.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=Object(HU["query"])(pse.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},pse.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},pse.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t<n?this._resultsContainer.scrollTop=t:n<i&&(this._resultsContainer.scrollTop=i)}},pse.prototype._clearResults=function(){Object(HU["clear"])(this._resultsContainer),this._results=[],this._resetOverlay(),this._eventBus.fire("searchPad.cleared")},pse.prototype._getCurrentResult=function(){return Object(HU["query"])(pse.RESULT_SELECTED_SELECTOR,this._resultsContainer)},pse.prototype._createResultNode=function(e,t){var n=Object(HU["domify"])(pse.RESULT_HTML);return e.primaryTokens.length>0&&gse(n,e.primaryTokens,pse.RESULT_PRIMARY_HTML),gse(n,e.secondaryTokens,pse.RESULT_SECONDARY_HTML),Object(HU["attr"])(n,pse.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},pse.prototype.registerProvider=function(e){this._searchProvider=e},pse.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,Object(HU["classes"])(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},pse.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,Object(HU["classes"])(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},pse.prototype.toggle=function(){this.isOpen()?this.close():this.open()},pse.prototype.isOpen=function(){return this._open},pse.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&Object(HU["classes"])(t).remove(pse.RESULT_SELECTED_CLASS);var n=Object(HU["attr"])(e,pse.RESULT_ID_ATTRIBUTE),i=this._results[n].element;Object(HU["classes"])(e).add(pse.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},pse.prototype._select=function(e){var t=Object(HU["attr"])(e,pse.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},pse.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=tG(e),n=fse(t);this._overlayId=this._overlays.add(e,n)}},pse.CONTAINER_SELECTOR=".djs-search-container",pse.INPUT_SELECTOR=".djs-search-input input",pse.RESULTS_CONTAINER_SELECTOR=".djs-search-results",pse.RESULT_SELECTOR=".djs-search-result",pse.RESULT_SELECTED_CLASS="djs-search-result-selected",pse.RESULT_SELECTED_SELECTOR="."+pse.RESULT_SELECTED_CLASS,pse.RESULT_ID_ATTRIBUTE="data-result-id",pse.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",pse.OVERLAY_CLASS="djs-search-overlay",pse.BOX_HTML='<div class="djs-search-container djs-draggable djs-scrollable"><div class="djs-search-input"><input type="text"/></div><div class="djs-search-results"></div></div>',pse.RESULT_HTML='<div class="djs-search-result"></div>',pse.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',pse.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';var bse={__depends__:[bZ,lZ],searchPad:["type",pse]};function vse(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function yse(e){var t=Object(WU["filter"])(e,(function(e){return!!e.matched}));return t.length>0}function wse(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var o=e.indexOf(t);return o>-1?(0!==o&&n.push({normal:i.substr(0,o)}),n.push({matched:i.substr(o,t.length)}),t.length+o<e.length&&n.push({normal:i.substr(t.length+o,e.length)})):n.push({normal:i}),n}vse.$inject=["elementRegistry","searchPad","canvas"],vse.prototype.find=function(e){var t=this._canvas.getRootElement(),n=this._elementRegistry.filter((function(e){return!e.labelTarget}));return n=Object(WU["filter"])(n,(function(e){return e!==t})),n=Object(WU["map"])(n,(function(t){return{primaryTokens:wse(L$(t),e),secondaryTokens:wse(t.id,e),element:t}})),n=Object(WU["filter"])(n,(function(e){return yse(e.primaryTokens)||yse(e.secondaryTokens)})),n=Object(WU["sortBy"])(n,(function(e){return L$(e.element)+e.element.id})),n};var _se={__depends__:[bse],__init__:["bpmnSearch"],bpmnSearch:["type",vse]},Cse='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>';function Ase(e){b$.call(this,e)}function Ese(e,t,n,i,o,r,s,a){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=o,this._handTool=r,this._globalConnect=s,this._translate=a,e.registerProvider(this)}function xse(e,t,n,i,o,r,s,a,l,c,h,u){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=o,this._elementFactory=r,this._connect=s,this._create=a,this._popupMenu=l,this._canvas=c,this._rules=h,this._translate=u,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context,n=t.shape;if(YX(e)&&i.isOpen(n)){var o=i.getEntries(n);o.replace&&o.replace.action.click(e,n)}}))}function Sse(e,t,n){var i=e.$instanceOf(t),o=!1,r=e.eventDefinitions||[];return Object(WU["forEach"])(r,(function(e){e.$type===n&&(o=!0)})),i&&o}FU()(Ase,b$),Ase.Viewer=vZ,Ase.NavigatedViewer=h0,Ase.prototype.createDiagram=ZJ((function(){return this.importXML(Cse)})),Ase.prototype._interactionModules=[QZ,ZZ,A0,c0],Ase.prototype._modelingModules=[L0,t1,k1,p1,T2,Q2,G2,o3,r5,I4,h3,b3,Y3,J3,X3,l8,j8,Aoe,Voe,fre,bre,k8,hse,_se],Ase.prototype._modules=[].concat(vZ.prototype._modules,Ase.prototype._interactionModules,Ase.prototype._modelingModules),Ese.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"],Ese.prototype.getPaletteEntries=function(){var e={},t=this._create,n=this._elementFactory,i=this._spaceTool,o=this._lassoTool,r=this._handTool,s=this._globalConnect,a=this._translate;function l(e,i,o,r,s){function l(i){var o=n.createShape(Object(WU["assign"])({type:e},s));s&&(o.businessObject.di.isExpanded=s.isExpanded),t.start(i,o)}var c=e.replace(/^bpmn:/,"");return{group:i,className:o,title:r||a("Create {type}",{type:c}),action:{dragstart:l,click:l}}}function c(e){var i=n.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),o=n.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:i});t.start(e,[i,o],{hints:{autoSelect:[o]}})}function h(e){t.start(e,n.createParticipantShape())}return Object(WU["assign"])(e,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:a("Activate the hand tool"),action:{click:function(e){r.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:a("Activate the lasso tool"),action:{click:function(e){o.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:a("Activate the create/remove space tool"),action:{click:function(e){i.activateSelection(e)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:a("Activate the global connect tool"),action:{click:function(e){s.toggle(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":l("bpmn:StartEvent","event","bpmn-icon-start-event-none",a("Create StartEvent")),"create.intermediate-event":l("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",a("Create Intermediate/Boundary Event")),"create.end-event":l("bpmn:EndEvent","event","bpmn-icon-end-event-none",a("Create EndEvent")),"create.exclusive-gateway":l("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-xor",a("Create Exclusive Gateway")),"create.parallel-gateway":l("bpmn:ParallelGateway","gateway","bpmn-icon-gateway-parallel",a("Create Parallel Gateway")),"create.UserTask":l("bpmn:UserTask","activity","bpmn-icon-user-task",a("Create UserTask")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:a("Create expanded SubProcess"),action:{dragstart:c,click:c}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:a("Create Pool/Participant"),action:{dragstart:h,click:h}}}),e},xse.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"],xse.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,o=this._connect,r=this._create,s=this._popupMenu,a=this._canvas,l=this._rules,c=this._autoPlace,h=this._translate,u={};if("label"===e.type)return u;var d=e.businessObject;function p(e,t){o.start(e,t)}function f(){n.removeElements([e])}function g(e){var n=5,i=a.getContainer(),o=t.getPad(e).html,r=i.getBoundingClientRect(),s=o.getBoundingClientRect(),l=s.top-r.top,c=s.left-r.left,h={x:c,y:l+s.height+n};return h}function m(e,t,n,o){function s(t,n){var s=i.createShape(Object(WU["assign"])({type:e},o));r.start(t,s,{source:n})}"string"!==typeof n&&(o=n,n=h("Append {type}",{type:e.replace(/^bpmn:/,"")}));var a=c?function(t,n){var r=i.createShape(Object(WU["assign"])({type:e},o));c.append(n,r)}:s;return{group:"model",className:t,title:n,action:{dragstart:s,click:a}}}function b(e){return function(i,o){n.splitLane(o,e),t.open(o,!0)}}if(G0(d,["bpmn:Lane","bpmn:Participant"])&&w$(d)){var v=Z5(e);Object(WU["assign"])(u,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:h("Add Lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),v.length<2&&(e.height>=120&&Object(WU["assign"])(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:h("Divide into two Lanes"),action:{click:b(2)}}}),e.height>=180&&Object(WU["assign"])(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:h("Divide into three Lanes"),action:{click:b(3)}}})),Object(WU["assign"])(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:h("Add Lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}if(v$(d,"bpmn:FlowNode"))if(v$(d,"bpmn:EventBasedGateway")){var y="0d9a60fe0131dff70d665020f5b0cdee";Object(WU["assign"])(u,{"append.receive-task":m("bpmn:ReceiveTask","bpmn-icon-receive-task"),"append.message-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",h("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",h("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",h("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",h("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}),y.trim()}else Sse(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?Object(WU["assign"])(u,{"append.compensation-activity":m("bpmn:Task","bpmn-icon-task",h("Append compensation activity"),{isForCompensation:!0})}):v$(d,"bpmn:EndEvent")||d.isForCompensation||Sse(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||C$(d)||Object(WU["assign"])(u,{"append.end-event":m("bpmn:EndEvent","bpmn-icon-end-event-none",h("Append EndEvent")),"append.gateway":m("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",h("Append Gateway")),"append.user-task":m("bpmn:UserTask","bpmn-icon-user-task",h("Append UserTask")),"append.intermediate-event":m("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",h("Append Intermediate/Boundary Event")),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",h("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"})});s.isEmpty(e,"bpmn-replace")||Object(WU["assign"])(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:h("Change type"),action:{click:function(e,t){var n=Object(WU["assign"])(g(t),{cursor:{x:e.x,y:e.y}});s.open(t,"bpmn-replace",n)}}}}),G0(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Object(WU["assign"])(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:h("Connect using "+(d.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:p,dragstart:p}}}),G0(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Object(WU["assign"])(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:h("Connect using DataInputAssociation"),action:{click:p,dragstart:p}}});var w=l.allowed("elements.delete",{elements:[e]});return Object(WU["isArray"])(w)&&(w=w[0]===e),w&&Object(WU["assign"])(u,{delete:{group:"edit",className:"bpmn-icon-trash",title:h("Remove"),action:{click:f}}}),u};var kse={__init__:["paletteProvider","contextPadProvider"],paletteProvider:["type",Ese],contextPadProvider:["type",xse]};function Dse(e){Ase.call(this,e),this._customElements=[]}FU()(Dse,Ase),Dse.prototype._modules=[].concat(Dse.prototype._modules,[kse]);var Lse={"Create {type}":"创建 {type}","Create StartEvent":"开始节点","Create EndEvent":"结束节点","Create Task":"任务节点","Create UserTask":"用户任务节点","Create expanded SubProcess":"扩展子过程","Create IntermediateThrowEvent/BoundaryEvent":"中间抛出事件/边界事件","Create Pool/Participant":"池/参与者","Create Gateway":"网关","Create Exclusive Gateway":"互斥网关","Create Parallel Gateway":"并行网关","Create Inclusive Gateway":"相容网关","Create Group":"创建组","Create DataObjectReference":"数据对象引用","Create DataStoreReference":"数据存储引用","Create Intermediate/Boundary Event":"中间/边界事件","Activate the global connect tool":"激活全局连接工具","Append {type}":"添加 {type}","Add Lane above":"在上面添加道","Divide into two Lanes":"分割成两个道","Divide into three Lanes":"分割成三个道","Add Lane below":"在下面添加道","Append compensation activity":"追加补偿活动","Change type":"修改类型","Connect using Association":"使用关联连接","Connect using Sequence/MessageFlow or Association":"使用顺序/消息流或者关联连接","Connect using DataInputAssociation":"使用数据输入关联连接",Remove:"移除","Activate the hand tool":"激活抓手工具","Activate the lasso tool":"激活套索工具","Activate the create/remove space tool":"激活创建/删除空间工具","Parallel Multi Instance":"并行多重事件","Sequential Multi Instance":"时序多重事件",DataObjectReference:"数据对象参考",DataStoreReference:"数据存储参考",Loop:"循环","Ad-hoc":"即席",Task:"任务","Send Task":"发送任务","Receive Task":"接收任务","User Task":"用户任务","Manual Task":"手工任务","Business Rule Task":"业务规则任务","Service Task":"服务任务","Script Task":"脚本任务","Call Activity":"调用活动","Sub Process (collapsed)":"子流程(折叠的)","Sub Process (expanded)":"子流程(展开的)","Start Event":"开始事件",StartEvent:"开始事件","Intermediate Throw Event":"中间事件","End Event":"结束事件",EndEvent:"结束事件","Message Start Event":"消息开始事件","Timer Start Event":"定时开始事件","Conditional Start Event":"条件开始事件","Signal Start Event":"信号开始事件","Error Start Event":"错误开始事件","Escalation Start Event":"升级开始事件","Compensation Start Event":"补偿开始事件","Message Start Event (non-interrupting)":"消息开始事件(非中断)","Timer Start Event (non-interrupting)":"定时开始事件(非中断)","Conditional Start Event (non-interrupting)":"条件开始事件(非中断)","Signal Start Event (non-interrupting)":"信号开始事件(非中断)","Escalation Start Event (non-interrupting)":"升级开始事件(非中断)","Message Intermediate Catch Event":"消息中间捕获事件","Message Intermediate Throw Event":"消息中间抛出事件","Timer Intermediate Catch Event":"定时中间捕获事件","Escalation Intermediate Throw Event":"升级中间抛出事件","Conditional Intermediate Catch Event":"条件中间捕获事件","Link Intermediate Catch Event":"链接中间捕获事件","Link Intermediate Throw Event":"链接中间抛出事件","Compensation Intermediate Throw Event":"补偿中间抛出事件","Signal Intermediate Catch Event":"信号中间捕获事件","Signal Intermediate Throw Event":"信号中间抛出事件","Message End Event":"消息结束事件","Escalation End Event":"定时结束事件","Error End Event":"错误结束事件","Cancel End Event":"取消结束事件","Compensation End Event":"补偿结束事件","Signal End Event":"信号结束事件","Terminate End Event":"终止结束事件","Message Boundary Event":"消息边界事件","Message Boundary Event (non-interrupting)":"消息边界事件(非中断)","Timer Boundary Event":"定时边界事件","Timer Boundary Event (non-interrupting)":"定时边界事件(非中断)","Escalation Boundary Event":"升级边界事件","Escalation Boundary Event (non-interrupting)":"升级边界事件(非中断)","Conditional Boundary Event":"条件边界事件","Conditional Boundary Event (non-interrupting)":"条件边界事件(非中断)","Error Boundary Event":"错误边界事件","Cancel Boundary Event":"取消边界事件","Signal Boundary Event":"信号边界事件","Signal Boundary Event (non-interrupting)":"信号边界事件(非中断)","Compensation Boundary Event":"补偿边界事件","Exclusive Gateway":"互斥网关","Parallel Gateway":"并行网关","Inclusive Gateway":"相容网关","Complex Gateway":"复杂网关","Event based Gateway":"事件网关",Transaction:"转运","Sub Process":"子流程","Event Sub Process":"事件子流程","Collapsed Pool":"折叠池","Expanded Pool":"展开池","no parent for {element} in {parent}":"在{parent}里,{element}没有父类","no shape type specified":"没有指定的形状类型","flow elements must be children of pools/participants":"流元素必须是池/参与者的子类","out of bounds release":"out of bounds release","more than {count} child lanes":"子道大于{count} ","element required":"元素不能为空","diagram not part of bpmn:Definitions":"流程图不符合bpmn规范","no diagram to display":"没有可展示的流程图","no process or collaboration to display":"没有可展示的流程/协作","element {element} referenced by {referenced}#{property} not yet drawn":"由{referenced}#{property}引用的{element}元素仍未绘制","already rendered {element}":"{element} 已被渲染","failed to import {element}":"导入{element}失败","Append EndEvent":"追加结束事件节点","Append Gateway":"追加网关节点","Append UserTask":"追加用户任务节点","Append Intermediate/Boundary Event":"追加中间或边界事件","Append TextAnnotation":"追加文本批注","{errors} Errors, {warnings} Warnings":"{errors} 错误,{warnings} 警告","Process is missing end event":"流程缺少结束节点","Process is missing start event":"流程缺少开始节点","Element is not connected":"元素缺少连接","Start event is missing event definition":"缺少事件定义","Event has multiple event definitions":"多个事件定义","Sequence flow is missing condition":"缺少流转条件","Flow splits implicitly":"流转方向未知","Incoming flows do not join":"可能需要统一的入口","SequenceFlow is a duplicate":"重复的连线","Duplicate incoming sequence flows":"入口连线重复","Duplicate outgoing sequence flows":"出口连线重复","Open minimap":"小地图","Close minimap":"关闭小地图","Token Simulation":"流程模拟","Play/Pause Simulation":"开始/暂停","Pause Simulation":"暂停","Play Simulation":"开始","Set Animation Speed":"设置速度",Slow:"慢",Normal:"正常",Fast:"快",Finished:"完成","Reset Simulation":"重置模拟器","Show Simulation Log":"模拟器日志","No Entries":"暂无日志","Process {processInstanceId} started":"流程 {processInstanceId} 启动","Subprocess {processInstanceId} started":"子流程 {processInstanceId} 启动"};function Ise(e,t){return t=t||{},e=Lse[e]||e,e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}function Nse(e,t){var n=e.get("editorActions",!1);n&&n.register({toggleLinting:function(){t.toggle()}})}Nse.$inject=["injector","linting"];n("f05e");var Mse=n("fea7"),Bse='<svg width="12" height="12" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><path fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"></path></svg>',Tse='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 512 512"><path fill="currentColor" d="M288 328.83c-45.518 0-82.419 34.576-82.419 77.229 0 42.652 36.9 77.229 82.419 77.229 45.518 0 82.419-34.577 82.419-77.23 0-42.652-36.9-77.229-82.419-77.229zM207.439 57.034l11.61 204.348c.544 9.334 8.78 16.64 18.755 16.64h100.392c9.975 0 18.211-7.306 18.754-16.64l11.611-204.348c.587-10.082-7.98-18.56-18.754-18.56H226.192c-10.775 0-19.34 8.478-18.753 18.56z"/></svg>',Ose='<svg width="12" height="12" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"></path></svg>',Rse=-7,Pse=-7,Fse=500,jse={resolver:{resolveRule:function(){return null}},config:{}},zse={error:Bse,warning:Tse,success:Ose,inactive:Ose};function Vse(e,t,n,i,o,r,s){this._bpmnjs=e,this._canvas=t,this._elementRegistry=i,this._eventBus=o,this._overlays=r,this._translate=s,this._issues={},this._active=n&&n.active||!1,this._linterConfig=jse,this._overlayIds={};var a=this;o.on(["import.done","elements.changed","linting.configChanged","linting.toggle"],Fse,(function(e){a.isActive()&&a.update()})),o.on("linting.toggle",(function(e){var t=e.active;t||(a._clearIssues(),a._updateButton())})),o.on("diagram.clear",(function(){a._clearIssues()}));var l=n&&n.bpmnlint;l&&o.once("diagram.init",(function(){if(a.getLinterConfig()===jse)try{a.setLinterConfig(l)}catch(e){}})),this._init()}Vse.prototype.setLinterConfig=function(e){if(!e.config||!e.resolver)throw new Error("Expected linterConfig = { config, resolver }");this._linterConfig=e,this._eventBus.fire("linting.configChanged")},Vse.prototype.getLinterConfig=function(){return this._linterConfig},Vse.prototype._init=function(){this._createButton(),this._updateButton()},Vse.prototype.isActive=function(){return this._active},Vse.prototype._formatIssues=function(e){var t=Object(WU["reduce"])(e,(function(e,t,n){return e.concat(t.map((function(e){return e.rule=n,e})))}),[]);return Object(WU["groupBy"])(t,(function(e){return e.id}))},Vse.prototype.toggle=function(e){return e="undefined"===typeof e?!this.isActive():e,this._setActive(e),e},Vse.prototype._setActive=function(e){this._active!==e&&(this._active=e,this._eventBus.fire("linting.toggle",{active:e}))},Vse.prototype.update=function(){var e=this,t=this._bpmnjs.getDefinitions();if(t){var n=this._lintStart=Math.random();this.lint().then((function(t){if(e._lintStart===n){t=e._formatIssues(t);var i={},o={},r={};for(var s in e._issues)t[s]||(i[s]=e._issues[s]);for(var a in t)e._issues[a]?t[a]!==e._issues[a]&&(o[a]=t[a]):r[a]=t[a];i=Object(WU["assign"])(i,o),r=Object(WU["assign"])(r,o),e._clearOverlays(),e._createIssues(r),e._issues=t,e._updateButton(),e._fireComplete(t)}}))}},Vse.prototype._fireComplete=function(e){this._eventBus.fire("linting.completed",{issues:e})},Vse.prototype._createIssues=function(e){for(var t in e)this._createElementIssues(t,e[t])},Vse.prototype._createElementIssues=function(e,t){var n=this._elementRegistry.get(e);if(n){var i,o;n===this._canvas.getRootElement()?(i="bottom-right",o={top:20,left:150}):(i="top-right",o={top:Rse,left:Pse});var r=Object(WU["groupBy"])(t,(function(e){return e.category})),s=r.error,a=r.warn;if(s||a){var l=Object(HU["domify"])('<div class="bjsl-overlay bjsl-issues-'+i+'"></div>'),c="3e71c4bfc16d37db4cb08e89b9e366f8",h=s?Object(HU["domify"])('<div class="bjsl-icon bjsl-icon-error">'+Bse+"</div>"):Object(HU["domify"])('<div class="bjsl-icon bjsl-icon-warning">'+Tse+"</div>"),u=Object(HU["domify"])('<div class="bjsl-dropdown"></div>'),d=Object(HU["domify"])('<div class="bjsl-dropdown-content"></div>'),p=Object(HU["domify"])('<div class="bjsl-issues"></div>'),f=Object(HU["domify"])("<ul></ul>");l.appendChild(h),l.appendChild(u),u.appendChild(d),d.appendChild(p),p.appendChild(f),c.length,s&&this._addErrors(f,s),a&&this._addWarnings(f,a),this._overlayIds[e]=this._overlays.add(n,"linting",{position:o,html:l,scale:{min:.9}})}}},Vse.prototype._addErrors=function(e,t){var n=this;t.forEach((function(t){n._addEntry(e,"error",t)}))},Vse.prototype._addWarnings=function(e,t){var n=this;t.forEach((function(t){n._addEntry(e,"warning",t)}))},Vse.prototype._addEntry=function(e,t,n){var i=n.rule,o=this._translate(n.message),r=zse[t],s=Object(HU["domify"])('<li class="'+t+'">'+r+'<a title="'+dse(i)+": "+dse(o)+'" data-rule="'+dse(i)+'" data-message="'+dse(o)+'">'+dse(o)+"</a></li>");e.appendChild(s)},Vse.prototype._clearOverlays=function(){this._overlays.remove({type:"linting"}),this._overlayIds={}},Vse.prototype._clearIssues=function(){this._issues={},this._clearOverlays()},Vse.prototype._setButtonState=function(e,t,n){var i=this._button,o=zse[e],r=o+"<span>"+this._translate("{errors} Errors, {warnings} Warnings",{errors:t.toString(),warnings:n.toString()})+"</span>";["error","inactive","success","warning"].forEach((function(t){e===t?i.classList.add("bjsl-button-"+t):i.classList.remove("bjsl-button-"+t)})),i.innerHTML=r},Vse.prototype._updateButton=function(){if(this.isActive()){var e=0,t=0;for(var n in this._issues)this._issues[n].forEach((function(n){"error"===n.category?e++:"warn"===n.category&&t++}));var i=(e?"error":t&&"warning")||"success";this._setButtonState(i,e,t)}else this._setButtonState("inactive",0,0)},Vse.prototype._createButton=function(){var e=this;this._button=Object(HU["domify"])('<button class="bjsl-button bjsl-button-inactive" title="'+this._translate("Toggle linting")+'"></button>'),this._button.addEventListener("click",(function(){e.toggle()})),this._canvas.getContainer().appendChild(this._button)},Vse.prototype.lint=function(){var e=this._bpmnjs.getDefinitions(),t=new Mse["Linter"](this._linterConfig);return t.lint(e)},Vse.$inject=["bpmnjs","canvas","config.linting","elementRegistry","eventBus","overlays","translate"];var Qse={__init__:["linting","lintingEditorActions"],linting:["type",Vse],lintingEditorActions:["type",Nse]},Wse=(n("b9bd"),function(){function e(e,t){if(Hse(e)){var n=e.outgoing||[];n.forEach((function(n){var i=!Use(n)&&!Yse(e,n);i&&t.report(n.id,"Sequence flow is missing condition")}))}}return{check:e}});function Hse(e){var t=e["default"],n=e.outgoing||[];return t||n.find(Use)}function Use(e){return!!e.conditionExpression}function Yse(e,t){return e["default"]===t}function Gse(e,t){return-1===t.indexOf(":")&&(t="bpmn:"+t),"function"===typeof e.$instanceOf?e.$instanceOf(t):e.$type===t}function Kse(e,t){return t.some((function(t){return Gse(e,t)}))}var qse=Object.freeze({__proto__:null,is:Gse,isAny:Kse}),Jse=qse.is,$se=qse.isAny,Xse=function(){function e(e){var t=e.flowElements||[];return t.some((function(e){return Jse(e,"bpmn:EndEvent")}))}function t(t,n){if($se(t,["bpmn:Process","bpmn:SubProcess"])&&!e(t)){var i=Jse(t,"bpmn:SubProcess")?"Sub process":"Process";n.report(t.id,i+" is missing end event")}}return{check:t}},Zse=qse.is,eae=function(){function e(e,t){if(Zse(e,"bpmn:SubProcess")&&e.triggeredByEvent){var n=e.flowElements||[];n.forEach((function(e){if(!Zse(e,"bpmn:StartEvent"))return!1;var n=e.eventDefinitions||[];0===n.length&&t.report(e.id,"Start event is missing event definition")}))}}return{check:e}},tae=qse.isAny,nae=function(){function e(e,t){if(tae(e,["bpmn:Task","bpmn:Event"])){var n=e.incoming||[];n.length>1&&t.report(e.id,"Incoming flows do not join")}}return{check:e}},iae=qse.is;function oae(e){return function(){function t(t,n){iae(t,e)&&n.report(t.id,"Element has disallowed type <"+e+">")}return{check:t}}}var rae=oae,sae={disallowNodeType:rae},aae=sae.disallowNodeType,lae=aae("bpmn:ComplexGateway"),cae=qse.isAny,hae=function(){function e(e,t){if(cae(e,["bpmn:Task","bpmn:Gateway","bpmn:SubProcess","bpmn:Event"])&&!e.triggeredByEvent){var n=e.incoming||[],i=e.outgoing||[];n.length||i.length||t.report(e.id,"Element is not connected")}}return{check:e}},uae=qse.is,dae=function(){var e={},t={},n={};function i(i,o){if(uae(i,"bpmn:SequenceFlow")){var r=pae(i);if(r in e){o.report(i.id,"SequenceFlow is a duplicate");var s=i.sourceRef.id,a=i.targetRef.id;t[s]||(o.report(s,"Duplicate outgoing sequence flows"),t[s]=!0),n[a]||(o.report(a,"Duplicate incoming sequence flows"),n[a]=!0)}else e[r]=i}}return{check:i}};function pae(e){var t=e.conditionExpression,n=t?t.body:"",i=e.sourceRef?e.sourceRef.id:e.id,o=e.targetRef?e.targetRef.id:e.id;return i+"#"+o+"#"+n}var fae=qse.is,gae=function(){function e(e,t){if(fae(e,"bpmn:Gateway")){var n=e.incoming||[],i=e.outgoing||[];n.length>1&&i.length>1&&t.report(e.id,"Gateway forks and joins")}}return{check:e}},mae=qse.isAny,bae=function(){function e(e,t){if(mae(e,["bpmn:Task","bpmn:Event"])){var n=e.outgoing||[],i=n.filter((function(t){return!vae(t)&&!yae(e,t)}));i.length>1&&t.report(e.id,"Flow splits implicitly")}}return{check:e}};function vae(e){return!!e.conditionExpression}function yae(e,t){return e["default"]===t}var wae=sae.disallowNodeType,_ae=wae("bpmn:InclusiveGateway"),Cae=qse.is,Aae=function(){function e(e,t){if(Cae(e,"bpmn:FlowElementsContainer")){var n=e.flowElements||[],i=n.filter((function(e){if(!Cae(e,"bpmn:StartEvent"))return!1;var t=e.eventDefinitions||[];return 0===t.length}));if(i.length>1){var o=Cae(e,"bpmn:SubProcess")?"Sub process":"Process";t.report(e.id,o+" has multiple blank start events")}}}return{check:e}},Eae=qse.is,xae=function(){function e(e,t){if(Eae(e,"bpmn:Event")){var n=e.eventDefinitions||[];n.length>1&&t.report(e.id,"Event has multiple event definitions")}}return{check:e}},Sae=qse.is,kae=qse.isAny,Dae=function(){function e(e){var t=e.flowElements||[];return t.some((function(e){return Sae(e,"bpmn:StartEvent")}))}function t(t,n){if(kae(t,["bpmn:Process","bpmn:SubProcess"])&&!e(t)){var i=Sae(t,"bpmn:SubProcess")?"Sub process":"Process";n.report(t.id,i+" is missing start event")}}return{check:t}},Lae=qse.is,Iae=function(){function e(e,t){if(Lae(e,"bpmn:SubProcess")&&!e.triggeredByEvent){var n=e.flowElements||[];n.forEach((function(e){if(!Lae(e,"bpmn:StartEvent"))return!1;var n=e.eventDefinitions||[];n.length>0&&t.report(e.id,"Start event must be blank")}))}}return{check:e}},Nae=qse.is,Mae=function(){function e(e,t){if(Nae(e,"bpmn:Gateway")){var n=e.incoming||[],i=e.outgoing||[];1===n.length&&1===i.length&&t.report(e.id,"Gateway is superfluous. It only has one source and target.")}}return{check:e}},Bae={};function Tae(){}Tae.prototype.resolveRule=function(e,t){var n=Bae[e+"/"+t];if(!n)throw new Error("cannot resolve rule <"+e+"/"+t+">");return n},Tae.prototype.resolveConfig=function(e,t){throw new Error("cannot resolve config <"+t+"> in <"+e+">")};var Oae=new Tae,Rae={"conditional-flows":"error","end-event-required":"error","event-sub-process-typed-start-event":"error","fake-join":"warn","no-complex-gateway":"error","no-disconnected":"error","no-duplicate-sequence-flows":"error","no-gateway-join-fork":"error","no-implicit-split":"error","single-blank-start-event":"error","single-event-definition":"error","start-event-required":"error","sub-process-blank-start-event":"error","superfluous-gateway":"warning"},Pae={rules:Rae},Fae={resolver:Oae,config:Pae};Bae["bpmnlint/conditional-flows"]=Wse,Bae["bpmnlint/end-event-required"]=Xse,Bae["bpmnlint/event-sub-process-typed-start-event"]=eae,Bae["bpmnlint/fake-join"]=nae,Bae["bpmnlint/no-complex-gateway"]=lae,Bae["bpmnlint/no-disconnected"]=hae,Bae["bpmnlint/no-duplicate-sequence-flows"]=dae,Bae["bpmnlint/no-gateway-join-fork"]=gae,Bae["bpmnlint/no-implicit-split"]=bae,Bae["bpmnlint/no-inclusive-gateway"]=_ae,Bae["bpmnlint/single-blank-start-event"]=Aae,Bae["bpmnlint/single-event-definition"]=xae,Bae["bpmnlint/start-event-required"]=Dae,Bae["bpmnlint/sub-process-blank-start-event"]=Iae,Bae["bpmnlint/superfluous-gateway"]=Mae;var jae=Fae,zae=(n("9bf1"),n("4df4"),50),Vae={min:.2,max:4},Qae=10,Wae=.1,Hae=250;function Uae(e,t,n,i,o){var r=this;function s(e){r._state._svgClientRect&&!ele(r._state._svgClientRect)||(r._state._svgClientRect=r._svg.getBoundingClientRect());var t=Kae({x:e.clientX-r._state._svgClientRect.left,y:e.clientY-r._state._svgClientRect.top},r._svg,r._lastViewbox);qae(t,r._canvas),r._update()}function a(e){return function(t){r._state._svgClientRect&&!ele(r._state._svgClientRect)||(r._state._svgClientRect=r._svg.getBoundingClientRect()),e&&s(t);var n=Kae({x:t.clientX-r._state._svgClientRect.left,y:t.clientY-r._state._svgClientRect.top},r._svg,r._lastViewbox),o=i.viewbox(),a=Gae(n,o),h=r._viewportDom.getBoundingClientRect(),u={x:t.clientX-h.left+1,y:t.clientY-h.top+1};Object(WU["assign"])(r._state,{cachedViewbox:o,initialDragPosition:{x:t.clientX,y:t.clientY},isDragging:!0,offsetViewport:a,offsetViewportDom:u,viewportClientRect:r._viewport.getBoundingClientRect(),parentClientRect:r._parent.getBoundingClientRect()}),HU["event"].bind(document,"mousemove",l),HU["event"].bind(document,"mouseup",c)}}function l(e){if(r._state.isDragging){r._state._svgClientRect&&!ele(r._state._svgClientRect)||(r._state._svgClientRect=r._svg.getBoundingClientRect());var t=r._state.offsetViewportDom,n=r._state.viewportClientRect,i=r._state.parentClientRect;Object(WU["assign"])(r._viewportDom.style,{top:e.clientY-t.y-i.top+"px",left:e.clientX-t.x-i.left+"px"});var o=rle(i,{top:e.clientY-t.y-i.top,left:e.clientX-t.x-i.left,width:n.width,height:n.height});Object(WU["assign"])(r._overlay.style,{clipPath:o});var s=Kae({x:e.clientX-r._state._svgClientRect.left,y:e.clientY-r._state._svgClientRect.top},r._svg,r._lastViewbox);qae({x:s.x-r._state.offsetViewport.x,y:s.y-r._state.offsetViewport.y},r._canvas)}}function c(e){r._state.isDragging&&(r._state.initialDragPosition.x===e.clientX&&r._state.initialDragPosition.y===e.clientY&&s(e),r._update(),Object(WU["assign"])(r._state,{cachedViewbox:null,initialDragPosition:null,isDragging:!1,offsetViewport:null,offsetViewportDom:null}),HU["event"].unbind(document,"mousemove",l),HU["event"].unbind(document,"mouseup",c))}this._canvas=i,this._elementRegistry=o,this._eventBus=n,this._injector=t,this._state={isOpen:void 0,isDragging:!1,initialDragPosition:null,offsetViewport:null,cachedViewbox:null,dragger:null,svgClientRect:null,parentClientRect:null,zoomDelta:0},this._init(),this.toggle(e&&e.open||!0),HU["event"].bind(this._svg,"click",(function(e){e.preventDefault(),e.stopPropagation(),s(e)})),HU["event"].bind(this._viewportDom,"mousedown",a(!1)),HU["event"].bind(this._svg,"mousedown",a(!0)),HU["event"].bind(this._parent,"wheel",(function(e){if(e.preventDefault(),e.stopPropagation(),e.ctrlKey&&(r._state._svgClientRect&&!ele(r._state._svgClientRect)||(r._state._svgClientRect=r._svg.getBoundingClientRect()),tle(e,r._state._svgClientRect))){var t=0===e.deltaMode?.02:.32,n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*nle(e.deltaY)*-t;if(r._state.zoomDelta+=n,Math.abs(r._state.zoomDelta)>Wae){var o=n>0?1:-1,s=Math.log(i.zoom())/Math.log(10),a=ile(Vae,2*Qae),l=Math.round(s/a)*a;l+=a*o;var c=Math.pow(10,l);i.zoom(ole(Vae,c),h),r._state.zoomDelta=0;var h=Kae({x:e.clientX-r._state._svgClientRect.left,y:e.clientY-r._state._svgClientRect.top},r._svg,r._lastViewbox);qae(h,r._canvas),r._update()}}})),HU["event"].bind(this._toggle,"click",(function(e){e.preventDefault(),e.stopPropagation(),r.toggle()})),n.on(["shape.added","connection.added"],(function(e){var t=e.element;r._addElement(t),r._update()})),n.on(["shape.removed","connection.removed"],(function(e){var t=e.element;r._removeElement(t),r._update()})),n.on("elements.changed",Hae,(function(e){var t=e.elements;t.forEach((function(e){r._updateElement(e)})),r._update()})),n.on("element.updateId",(function(e){var t=e.element,n=e.newId;r._updateElementId(t,n)})),n.on("canvas.viewbox.changed",(function(){r._state.isDragging||r._update()})),n.on("canvas.resized",(function(){document.body.contains(r._parent)&&(r._state.isDragging||r._update(),r._state._svgClientRect=r._svg.getBoundingClientRect())}))}function Yae(e){return e.waypoints}function Gae(e,t){var n={x:t.x+t.width/2,y:t.y+t.height/2};return{x:e.x-n.x,y:e.y-n.y}}function Kae(e,t,n){var i=t.getBoundingClientRect(),o=Jae(n,i.width/i.height),r=$ae(e.x,0,i.width,o.x,o.x+o.width),s=$ae(e.y,0,i.height,o.y,o.y+o.height);return{x:r,y:s}}function qae(e,t){var n=t.viewbox(),i=n.width,o=n.height;t.viewbox({x:e.x-i/2,y:e.y-o/2,width:i,height:o})}function Jae(e,t){var n=e.width/e.height,i=Object(WU["assign"])({},{x:e.x,y:e.y,width:e.width,height:e.height});if(n>t){var o=i.width*(1/t),r=i.y-(o-i.height)/2;Object(WU["assign"])(i,{y:r,height:o})}else if(n<t){var s=i.height*t,a=i.x-(s-i.width)/2;Object(WU["assign"])(i,{x:a,width:s})}return i}function $ae(e,t,n,i,o){var r=n-t,s=o-i;return(e-t)*s/r+i}function Xae(e,t){var n=Object(HU["query"])(".djs-children",t.parentNode);if(n){var i=[].slice.call(n.childNodes),o=-1;return i.forEach((function(t,n){Object(HU["query"])(".djs-element",t)===e&&(o=n)})),o}}function Zae(e,t,n){var i=[].slice.call(t.childNodes),o=i[n];t.insertBefore(e,o.nextSibling)}function ele(e){return 0===e.width&&0===e.height}function tle(e,t){return e.x>t.left&&e.x<t.left+t.width&&e.y>t.top&&e.y<t.top+t.height}Uae.$inject=["config.minimap","injector","eventBus","canvas","elementRegistry"],Uae.prototype._init=function(){var e=this._canvas,t=e.getContainer(),n=this._parent=document.createElement("div");Object(HU["classes"])(n).add("djs-minimap"),t.appendChild(n);this._injector.get("translate",!1);var i=this._toggle=document.createElement("div");Object(HU["classes"])(i).add("toggle"),n.appendChild(i);var o=this._map=document.createElement("div");Object(HU["classes"])(o).add("map"),n.appendChild(o);var r="e86bac6b4b20ac696026845ea030d6e8",s=this._svg=pY("svg");ZU(s,{width:"100%",height:"100%"}),GU(o,s);var a=this._elementsGroup=pY("g");GU(s,a),r.length;var l=this._viewportGroup=pY("g");GU(s,l);var c=this._viewport=pY("rect");oY(c).add("viewport"),GU(l,c),HU["event"].bind(n,"mousedown",(function(e){e.stopPropagation()}));var h=this._viewportDom=document.createElement("div");Object(HU["classes"])(h).add("viewport-dom"),this._parent.appendChild(h);var u=this._overlay=document.createElement("div");Object(HU["classes"])(u).add("overlay"),this._parent.appendChild(u)},Uae.prototype._update=function(){var e=this._canvas.viewbox(),t=e.inner,n=e.outer;if(ale(e)){var i,o,r,s,a=n.width-t.width,l=n.height-t.height;t.width<n.width?(i=t.x-a/2,r=n.width,t.x+t.width<n.width&&(i=Math.min(0,t.x))):(i=t.x,r=t.width),t.height<n.height?(o=t.y-l/2,s=n.height,t.y+t.height<n.height&&(o=Math.min(0,t.y))):(o=t.y,s=t.height),i-=zae,o-=zae,r+=2*zae,s+=2*zae,this._lastViewbox={x:i,y:o,width:r,height:s},ZU(this._svg,{viewBox:i+", "+o+", "+r+", "+s}),ZU(this._viewport,{x:e.x,y:e.y,width:e.width,height:e.height});var c=this._state._parentClientRect=this._parent.getBoundingClientRect(),h=this._viewport.getBoundingClientRect(),u={top:h.top-c.top,left:h.left-c.left,width:h.width,height:h.height};Object(WU["assign"])(this._viewportDom.style,{top:u.top+"px",left:u.left+"px",width:u.width+"px",height:u.height+"px"});var d=rle(c,u);Object(WU["assign"])(this._overlay.style,{clipPath:d})}},Uae.prototype.open=function(){Object(WU["assign"])(this._state,{isOpen:!0}),Object(HU["classes"])(this._parent).add("open");var e=this._injector.get("translate",!1)||function(e){return e};Object(HU["attr"])(this._toggle,"title",e("Close minimap")),this._update(),this._eventBus.fire("minimap.toggle",{open:!0})},Uae.prototype.close=function(){Object(WU["assign"])(this._state,{isOpen:!1}),Object(HU["classes"])(this._parent).remove("open");var e=this._injector.get("translate",!1)||function(e){return e};Object(HU["attr"])(this._toggle,"title",e("Open minimap")),this._eventBus.fire("minimap.toggle",{open:!1})},Uae.prototype.toggle=function(e){var t=this.isOpen();"undefined"===typeof e&&(e=!t),e!=t&&(e?this.open():this.close())},Uae.prototype.isOpen=function(){return this._state.isOpen},Uae.prototype._updateElement=function(e){try{void 0!==e.parent&&null!==e.parent&&(this._removeElement(e),this._addElement(e))}catch(t){}},Uae.prototype._updateElementId=function(e,t){try{var n=Object(HU["query"])("#"+K1()(e.id),this._elementsGroup);n&&(n.id=t)}catch(i){}},Uae.prototype._addElement=function(e){var t,n,i,o=this;this._removeElement(e);var r=this._createElement(e),s=Object(HU["query"])("#"+K1()(e.parent.id),this._elementsGroup);if(r){var a=this._elementRegistry.getGraphics(e),l=this._elementRegistry.getGraphics(e.parent),c=Xae(a,l);return"undefined"!==c&&s?s.childNodes.length>c?Zae(r,s,c):Zae(r,s,s.childNodes.length-1):this._elementsGroup.appendChild(r),Yae(e)?(t=e.parent,n=0,i=0,"undefined"!==typeof t.x&&"undefined"!==typeof t.y&&(n=-t.x,i=-t.y),ZU(r,{transform:"translate("+n+" "+i+")"})):(n=e.x,i=e.y,s&&(t=e.parent,n-=t.x,i-=t.y),ZU(r,{transform:"translate("+n+" "+i+")"})),e.children&&e.children.length&&e.children.forEach((function(e){o._addElement(e)})),r}},Uae.prototype._removeElement=function(e){var t=this._svg.getElementById(e.id);t&&sY(t)},Uae.prototype._createElement=function(e){var t,n=this._elementRegistry.getGraphics(e);if(n&&(t=pK(n),t)){var i=lY(t);return ZU(i,{id:e.id}),i}};var nle=Math.sign||function(e){return e>=0?1:-1};function ile(e,t){var n=Math.log(e.min)/Math.log(10),i=Math.log(e.max)/Math.log(10),o=Math.abs(n)+Math.abs(i);return o/t}function ole(e,t){return Math.max(e.min,Math.min(e.max,t))}function rle(e,t){var n=[sle(t.left,t.top),sle(t.left+t.width,t.top),sle(t.left+t.width,t.top+t.height),sle(t.left,t.top+t.height),sle(t.left,e.height),sle(e.width,e.height),sle(e.width,0),sle(0,0),sle(0,e.height),sle(t.left,e.height)].join(", ");return"polygon("+n+")"}function sle(e,t){return e+"px "+t+"px"}function ale(e){return Object(WU["every"])(e,(function(e){return Object(WU["isObject"])(e)?ale(e):Object(WU["isNumber"])(e)&&isFinite(e)}))}var lle={__init__:["minimap"],minimap:["type",Uae]},cle=n("03ad"),hle=n("9224"),ule={name:"wf-design",components:{WfToolbar:UQ,WfPanel:IU,WfConfig:RU,MonacoEditor:PQ},props:{options:{type:Object,default:function(){return{}}},storage:{type:Boolean,default:!1},accessKey:String},computed:{isEditMode:function(){return"view"!=this.option.mode}},watch:{options:{handler:function(e){var t=this;this.$nextTick((function(){if(t.storage){var n=localStorage[hle.name];t.option=n?JSON.parse(n):JSON.parse(JSON.stringify(Object(u["a"])(Object(u["a"])({},f),e)))}else t.option=JSON.parse(JSON.stringify(Object(u["a"])(Object(u["a"])({},f),e))),delete localStorage[hle.name];t.init(!0)}))},deep:!0,immediate:!0}},data:function(){return{option:{},activeTab:"process",modeler:null,zoom:1,previewXML:"",previewVisible:!1,importXML:"",importVisible:!1}},methods:{INIT_XML:p,init:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.storage&&(localStorage[hle.name]=JSON.stringify(this.option)),e&&(this.isEditMode?this.initModeler():this.initViewer()),this.option.lang&&["zh","en"].includes(this.option.lang)&&(this.$i18n.locale=this.option.lang)},initModeler:function(){var e=this;return h(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.modeler&&e.modeler.destroy(),e.modeler=new Dse({container:e.$refs.modeler,additionalModules:["zh"==e.option.lang?{translate:["value",Ise]}:"",e.option.simulation?n("2c45"):"",e.option.minimap?lle:"",e.option.lint?Qse:""],linting:{bpmnlint:jae,active:e.isEditMode},moddleExtensions:{flowable:cle},keyboard:{bindTo:window}}),t.next=4,e.createNewDiagram(e.option.xml||p(e.option.process));case 4:e.storage&&e.modeler.on("element.changed",(function(){e.getData("xml",!1,!1).then((function(t){e.option.xml=t,localStorage[hle.name]=JSON.stringify(e.option)}))}));case 5:case"end":return t.stop()}}),t)})))()},initViewer:function(){var e=this;return h(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.modeler&&e.modeler.destroy(),e.modeler=new vZ({container:e.$refs.modeler,additionalModules:[{translate:["value",Ise]},Gee,e.option.simulation?n("2ab6"):"",e.option.minimap?lle:"",ZZ,c0]}),t.next=4,e.createNewDiagram(e.option.xml||p(e.option.process));case 4:e.option.flows&&e.option.flows.length>0&&e.setNodeColor(e.option.flows);case 5:case"end":return t.stop()}}),t)})))()},setNodeColor:function(e){var t=this.modeler.get("canvas"),n=this.modeler.get("elementRegistry"),i=this.modeler.get("tooltips");e.forEach((function(e){if(e.id&&e.class&&t.addMarker(e.id,e.class),e.id&&e.tooltip){var o=n.get(e.id);if(o){var r=o.x,s=o.y,a=o.type;["bpmn:StartEvent","bpmn:EndEvent"].includes(a)?(r-=45,s+=65):["bpmn:UserTask"].includes(a)&&(r-=10,s+=90),i.add({position:{x:r,y:s},html:e.tooltip})}}}))},createNewDiagram:function(e){var t=this;return h(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,e=e.replace(/camunda:/g,"flowable:"),e=e.replace(/activiti:/g,"flowable:"),n.next=5,t.modeler.importXML(e);case 5:t.fitViewport("fit-viewport"),n.next=11;break;case 8:n.prev=8,n.t0=n["catch"](0);case 11:case"end":return n.stop()}}),n,null,[[0,8]])})))()},fitViewport:function(e){var t=this.modeler.get("canvas");"string"==typeof e?t.zoom("fit-viewport"):(this.zoom+=e?.1:-.1,t.zoom(this.zoom))},getData:function(e){var t=arguments,n=this;return h(regeneratorRuntime.mark((function i(){var o,r,s,a,l,c,h,u,d;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(o=t.length>1&&void 0!==t[1]&&t[1],r=!(t.length>2&&void 0!==t[2])||t[2],s=!(t.length>3&&void 0!==t[3])||t[3],!r){i.next=9;break}if(a=document.querySelector(".bjsl-button span"),l=null==a?null:a.innerHTML,!l||l.includes("0 错误")||l.includes("0 Errors")){i.next=9;break}throw n.$message.error("模型存在错误,请处理"),new Error("模型存在错误,请处理");case 9:if("xml"!=e){i.next=25;break}return i.prev=10,i.next=13,n.modeler.saveXML({format:s});case 13:return c=i.sent,h=c.xml,"flowable"!=n.option.engine&&(h=h.replace(/flowable:/g,n.option.engine+":")),o&&n.downloadFile("".concat(n.modeler.getDefinitions().rootElements[0].name,".bpmn20.xml"),h,"application/xml"),i.abrupt("return",h);case 20:i.prev=20,i.t0=i["catch"](10);case 23:i.next=37;break;case 25:return i.prev=25,i.next=28,n.modeler.saveSVG({format:s});case 28:return u=i.sent,d=u.svg,o&&n.downloadFile(n.modeler.getDefinitions().rootElements[0].name,d,"image/svg+xml"),i.abrupt("return",d);case 34:i.prev=34,i.t1=i["catch"](25);case 37:case"end":return i.stop()}}),i,null,[[10,20],[25,34]])})))()},downloadFile:function(e,t,n){var i=document.createElement("a"),o=window.URL.createObjectURL(new Blob([t],{type:n}));i.href=o,i.download=e,i.click(),window.URL.revokeObjectURL(o)},handlePreview:function(e){var t=this;return h(regeneratorRuntime.mark((function n(){var i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.getData("xml");case 2:i=n.sent,"preview"==e?(t.previewXML=i,t.previewVisible=!0):"get"==e&&t.$emit("get",i);case 4:case"end":return n.stop()}}),n)})))()},handleImport:function(){this.createNewDiagram(this.importXML),this.importVisible=!1},getElementRegistry:function(){return this.modeler.get("elementRegistry")}}},dle=ule,ple=(n("1115"),Object(WQ["a"])(dle,a,l,!1,null,null,null)),fle=ple.exports,gle=n("92af"),mle=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.locale?gle["a"].use(t.locale):gle["a"].use("zh"),gle["a"].i18n(t.i18n),e.prototype.$axios=t.axios||window.axios,e.component("wf-design",fle)};"undefined"!==typeof window&&window.Vue&&mle(window.Vue);var ble={author:"ssc",version:hle.version,locale:gle["a"].locale,install:mle};t["default"]=ble},5124:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,'.quick-input-widget{position:absolute;width:600px;z-index:2000;padding:0 1px 1px 1px;left:50%;margin-left:-300px}.quick-input-titlebar{display:flex;align-items:center}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-title{padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:50%;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;padding:6px 6px 0 6px;margin-bottom:-2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:27.5px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px 5px 2px 5px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{overflow:hidden;max-height:440px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px;margin-right:4px}.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}',""]),e.exports=t},5173:function(e,t,n){"use strict";n("e2da");var i=n("83ec"),o=n("e244"),r=n("6043"),s=n("58d1"),a=n("6f9e"),l=n("7663"),c=n("7d86"),h=n("6161"),u=n("63ef"),d=n("e0e0"),p=n("35d6"),f=n("d6e4"),g=n("9564"),m=n("0b05"),b=n("d6ed"),v=n("d53b"),y=n("fbcf"),w=n("eee7"),_=n("04c3"),C=n("ca2b"),A=n("4d82"),E=n("c61c"),x=n("6023"),S=n("1810"),k=n("e7a5"),D=S("iterator"),L="URLSearchParams",I=L+"Iterator",N=p.set,M=p.getterFor(L),B=p.getterFor(I),T=r("fetch"),O=r("Request"),R=r("Headers"),P=O&&O.prototype,F=R&&R.prototype,j=o.RegExp,z=o.TypeError,V=o.decodeURIComponent,Q=o.encodeURIComponent,W=a("".charAt),H=a([].join),U=a([].push),Y=a("".replace),G=a([].shift),K=a([].splice),q=a("".split),J=a("".slice),$=/\+/g,X=Array(4),Z=function(e){return X[e-1]||(X[e-1]=j("((?:%[\\da-f]{2}){"+e+"})","gi"))},ee=function(e){try{return V(e)}catch(t){return e}},te=function(e){var t=Y(e,$," "),n=4;try{return V(t)}catch(i){while(n)t=Y(t,Z(n--),ee);return t}},ne=/[!'()~]|%20/g,ie={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},oe=function(e){return ie[e]},re=function(e){return Y(Q(e),ne,oe)},se=function(e,t){if(e<t)throw z("Not enough arguments")},ae=d((function(e,t){N(this,{type:I,iterator:E(M(e).entries),kind:t})}),"Iterator",(function(){var e=B(this),t=e.kind,n=e.iterator.next(),i=n.value;return n.done||(n.value="keys"===t?i.key:"values"===t?i.value:[i.key,i.value]),n})),le=function(e){this.entries=[],this.url=null,void 0!==e&&(w(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===W(e,0)?J(e,1):e:_(e)))};le.prototype={type:L,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,i,o,r,a,l,c=x(e);if(c){t=E(e,c),n=t.next;while(!(i=s(n,t)).done){if(o=E(y(i.value)),r=o.next,(a=s(r,o)).done||(l=s(r,o)).done||!s(r,o).done)throw z("Expected sequence with length 2");U(this.entries,{key:_(a.value),value:_(l.value)})}}else for(var h in e)m(e,h)&&U(this.entries,{key:h,value:_(e[h])})},parseQuery:function(e){if(e){var t,n,i=q(e,"&"),o=0;while(o<i.length)t=i[o++],t.length&&(n=q(t,"="),U(this.entries,{key:te(G(n)),value:te(H(n,"="))}))}},serialize:function(){var e,t=this.entries,n=[],i=0;while(i<t.length)e=t[i++],U(n,re(e.key)+"="+re(e.value));return H(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ce=function(){f(this,he);var e=arguments.length>0?arguments[0]:void 0;N(this,new le(e))},he=ce.prototype;if(h(he,{append:function(e,t){se(arguments.length,2);var n=M(this);U(n.entries,{key:_(e),value:_(t)}),n.updateURL()},delete:function(e){se(arguments.length,1);var t=M(this),n=t.entries,i=_(e),o=0;while(o<n.length)n[o].key===i?K(n,o,1):o++;t.updateURL()},get:function(e){se(arguments.length,1);for(var t=M(this).entries,n=_(e),i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){se(arguments.length,1);for(var t=M(this).entries,n=_(e),i=[],o=0;o<t.length;o++)t[o].key===n&&U(i,t[o].value);return i},has:function(e){se(arguments.length,1);var t=M(this).entries,n=_(e),i=0;while(i<t.length)if(t[i++].key===n)return!0;return!1},set:function(e,t){se(arguments.length,1);for(var n,i=M(this),o=i.entries,r=!1,s=_(e),a=_(t),l=0;l<o.length;l++)n=o[l],n.key===s&&(r?K(o,l--,1):(r=!0,n.value=a));r||U(o,{key:s,value:a}),i.updateURL()},sort:function(){var e=M(this);k(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){var t,n=M(this).entries,i=b(e,arguments.length>1?arguments[1]:void 0),o=0;while(o<n.length)t=n[o++],i(t.value,t.key,this)},keys:function(){return new ae(this,"keys")},values:function(){return new ae(this,"values")},entries:function(){return new ae(this,"entries")}},{enumerable:!0}),c(he,D,he.entries,{name:"entries"}),c(he,"toString",(function(){return M(this).serialize()}),{enumerable:!0}),u(ce,L),i({global:!0,forced:!l},{URLSearchParams:ce}),!l&&g(R)){var ue=a(F.has),de=a(F.set),pe=function(e){if(w(e)){var t,n=e.body;if(v(n)===L)return t=e.headers?new R(e.headers):new R,ue(t,"content-type")||de(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),C(e,{body:A(0,_(n)),headers:A(0,t)})}return e};if(g(T)&&i({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return T(e,arguments.length>1?pe(arguments[1]):{})}}),g(O)){var fe=function(e){return f(this,P),new O(e,arguments.length>1?pe(arguments[1]):{})};P.constructor=fe,fe.prototype=P,i({global:!0,forced:!0},{Request:fe})}}e.exports={URLSearchParams:ce,getState:M}},51739:function(e,t,n){e.exports=n("708c")},"522e":function(e,t,n){"use strict";n("f96e");var i=n("7299"),o=i.domify,r=n("4580"),s=r.TOGGLE_MODE_EVENT,a=r.RESET_SIMULATION_EVENT,l=r.GENERATE_TOKEN_EVENT,c=-15,h=15;function u(e,t,n){var i=this;this._overlays=e,this._translate=n,t.on(s,(function(e){var t=e.simulationModeActive;t||i.removeElementNotifications()})),t.on([a,l],(function(){i.removeElementNotifications()}))}u.prototype.addElementNotifications=function(e,t){var n=this;e.forEach((function(e){n.addElementNotification(e,t)}))},u.prototype.addElementNotification=function(e,t){var n={top:c,right:h},i='<div class="element-notification '+(t.type||"")+'">'+(t.icon?'<i class="fa '+t.icon+'"></i>':"")+('<span class="text">'+this._translate(t.text)+"</span>"||!1)+"</div>",r=o(i);this._overlays.add(e,"element-notification",{position:n,html:r,show:{minZoom:.5}})},u.prototype.removeElementNotifications=function(e){var t=this;e?e.forEach((function(e){t.removeElementNotification(e)})):this._overlays.remove({type:"element-notification"})},u.prototype.removeElementNotification=function(e){this._overlays.remove({element:e})},u.$inject=["overlays","eventBus","translate"],e.exports=u},"52a2":function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},5350:function(e,t,n){var i=n("986e"),o=n("76b2"),r=i("keys");e.exports=function(e){return r[e]||(r[e]=o(e))}},"53c2":function(e,t,n){"use strict";function i(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"===typeof btoa){var r=o(i),s=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[n].concat(s).concat([r]).join("\n")}return[n].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=i(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"===typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);i&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},"53d7":function(e,t,n){var i=n("f68d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("3a086b99",i,!0,{sourceMap:!1,shadowMode:!1})},"53ff":function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},5556:function(e,t,n){"use strict";var i=n("e244"),o=n("6f9e"),r=2147483647,s=36,a=1,l=26,c=38,h=700,u=72,d=128,p="-",f=/[^\0-\u007E]/,g=/[.\u3002\uFF0E\uFF61]/g,m="Overflow: input needs wider integers to process",b=s-a,v=i.RangeError,y=o(g.exec),w=Math.floor,_=String.fromCharCode,C=o("".charCodeAt),A=o([].join),E=o([].push),x=o("".replace),S=o("".split),k=o("".toLowerCase),D=function(e){var t=[],n=0,i=e.length;while(n<i){var o=C(e,n++);if(o>=55296&&o<=56319&&n<i){var r=C(e,n++);56320==(64512&r)?E(t,((1023&o)<<10)+(1023&r)+65536):(E(t,o),n--)}else E(t,o)}return t},L=function(e){return e+22+75*(e<26)},I=function(e,t,n){var i=0;e=n?w(e/h):e>>1,e+=w(e/t);while(e>b*l>>1)e=w(e/b),i+=s;return w(i+(b+1)*e/(e+c))},N=function(e){var t=[];e=D(e);var n,i,o=e.length,c=d,h=0,f=u;for(n=0;n<e.length;n++)i=e[n],i<128&&E(t,_(i));var g=t.length,b=g;g&&E(t,p);while(b<o){var y=r;for(n=0;n<e.length;n++)i=e[n],i>=c&&i<y&&(y=i);var C=b+1;if(y-c>w((r-h)/C))throw v(m);for(h+=(y-c)*C,c=y,n=0;n<e.length;n++){if(i=e[n],i<c&&++h>r)throw v(m);if(i==c){var x=h,S=s;while(1){var k=S<=f?a:S>=f+l?l:S-f;if(x<k)break;var N=x-k,M=s-k;E(t,_(L(k+N%M))),x=w(N/M),S+=s}E(t,_(L(x))),f=I(h,C,b==g),h=0,b++}}h++,c++}return A(t,"")};e.exports=function(e){var t,n,i=[],o=S(x(k(e),g,"."),".");for(t=0;t<o.length;t++)n=o[t],E(i,y(f,n)?"xn--"+N(n):n);return A(i,".")}},"55ab":function(e,t,n){var i=n("ac97");e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},5821:function(e,t,n){"use strict";var i=n("4580"),o=i.TOGGLE_MODE_EVENT,r=i.RESET_SIMULATION_EVENT;function s(e){this.nextProcessInstanceId=1,e.on(o,this.reset.bind(this)),e.on(r,this.reset.bind(this))}s.prototype.getNext=function(){var e=this.nextProcessInstanceId;return this.nextProcessInstanceId++,e},s.prototype.reset=function(){this.nextProcessInstanceId=1},s.$inject=["eventBus"],e.exports=s},"58a5":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;font-size:inherit}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;-ms-overflow-style:none;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}",""]),e.exports=t},"58d1":function(e,t){var n=Function.prototype.call;e.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},"59cf":function(e,t,n){var i=n("1810"),o=i("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(l){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i={};i[o]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(l){}return n}},"59e5":function(e,t,n){var i,o,r,s,a=n("e244"),l=n("82a4"),c=n("d6ed"),h=n("9564"),u=n("0b05"),d=n("ac97"),p=n("a780"),f=n("96cd"),g=n("f146"),m=n("4ad5"),b=n("f79e"),v=a.setImmediate,y=a.clearImmediate,w=a.process,_=a.Dispatch,C=a.Function,A=a.MessageChannel,E=a.String,x=0,S={},k="onreadystatechange";try{i=a.location}catch(M){}var D=function(e){if(u(S,e)){var t=S[e];delete S[e],t()}},L=function(e){return function(){D(e)}},I=function(e){D(e.data)},N=function(e){a.postMessage(E(e),i.protocol+"//"+i.host)};v&&y||(v=function(e){var t=f(arguments,1);return S[++x]=function(){l(h(e)?e:C(e),void 0,t)},o(x),x},y=function(e){delete S[e]},b?o=function(e){w.nextTick(L(e))}:_&&_.now?o=function(e){_.now(L(e))}:A&&!m?(r=new A,s=r.port2,r.port1.onmessage=I,o=c(s.postMessage,s)):a.addEventListener&&h(a.postMessage)&&!a.importScripts&&i&&"file:"!==i.protocol&&!d(N)?(o=N,a.addEventListener("message",I,!1)):o=k in g("script")?function(e){p.appendChild(g("script"))[k]=function(){p.removeChild(this),D(e)}}:function(e){setTimeout(L(e),0)}),e.exports={set:v,clear:y}},"59f5":function(e,t,n){e.exports=n.p+"fonts/bpmn.3c4c9f45.woff2"},"5a43":function(e,t,n){var i=n("c401");e.exports=Array.isArray||function(e){return"Array"==i(e)}},"5c1e":function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("7299"),o=i.domify,r=i.event,s=n("fbdf").is,a=n("4580"),l=a.GENERATE_TOKEN_EVENT;function c(e){this._eventBus=e}c.prototype.createContextPads=function(e){var t=e.parent.shownProcessInstance,n=e.incoming.filter((function(e){return s(e,"bpmn:SequenceFlow")})),i=[];n.forEach((function(e){var n=e.source;s(n,"bpmn:EventBasedGateway")&&n.tokenCount&&n.tokenCount[t]&&i.push(n)}));var a=e.outgoing.filter((function(e){return s(e,"bpmn:SequenceFlow")}));if(n.length&&a.length){var c,h=this;if(e.tokenCount&&e.tokenCount[t])c=o('<div class="context-pad" title="Trigger Event"><i class="fa fa-play"></i></div>'),r.bind(c,"click",(function(){e.tokenCount[t]--,h._eventBus.fire(l,{element:e,processInstanceId:t})}));else{if(!i.length)return;c=o('<div class="context-pad" title="Trigger Event"><i class="fa fa-play"></i></div>'),r.bind(c,"click",(function(){i.forEach((function(e){e.tokenCount[t]--})),h._eventBus.fire(l,{element:e,processInstanceId:t})}))}return[{element:e,html:c}]}},c.$inject=["eventBus"],e.exports=c},"5d86":function(e,t,n){"use strict";var i=n("4580"),o=i.TOGGLE_MODE_EVENT,r=10001;function s(e,t,n,i,s,l,c,h){var u=this;function d(e,t,n){var i=e[t];e[t]=function(){return n.call(this,i,arguments)}}function p(e,t){d(e,t,(function(e,t){if(!u.modelingDisabled)return e.apply(this,t)}))}function f(e,t){d(e,t,(function(e,t){if(u.modelingDisabled)throw new Error("model is read-only");return e.apply(this,t)}))}this._eventBus=e,this.modelingDisabled=!1,e.on(o,r,(function(e){var o=e.simulationModeActive;u.modelingDisabled=o,u.modelingDisabled&&(i.cancel(),t.close(),n.cancel()),c._update()})),p(t,"open"),p(n,"init"),p(i,"activate"),p(n,"init"),p(i,"activate"),f(l,"moveShape"),f(l,"updateAttachment"),f(l,"moveElements"),f(l,"moveConnection"),f(l,"layoutConnection"),f(l,"createConnection"),f(l,"createShape"),f(l,"createLabel"),f(l,"appendShape"),f(l,"removeElements"),f(l,"distributeElements"),f(l,"removeShape"),f(l,"removeConnection"),f(l,"replaceShape"),f(l,"pasteElements"),f(l,"alignElements"),f(l,"resizeShape"),f(l,"createSpace"),f(l,"updateWaypoints"),f(l,"reconnectStart"),f(l,"reconnectEnd"),d(s,"trigger",(function(e,t){var n=t[0];if(!u.modelingDisabled||!a(["undo","redo","copy","paste","removeSelection","spaceTool","lassoTool","globalConnectTool","distributeElements","alignElements","directEditing"],n))return e.apply(this,t)}))}function a(e,t){return e.indexOf(t)>-1}s.$inject=["eventBus","contextPad","dragging","directEditing","editorActions","modeling","palette","paletteProvider"],e.exports=s},"5db6":function(e,t,n){e.exports=n.p+"fonts/bpmn.acbc6cbd.woff"},"5e04":function(e,t,n){e.exports=n("4902")},"5ed7":function(e,t,n){e.exports=n("b7dc")},"5f19":function(e,t,n){e.exports=n("4a9d")},"5f86":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,'.djs-container{--blue-base-65:#4d90ff;--blue-base-65-opacity-30:rgba(77,144,255,0.3);--blue-darken-48:#005df7;--blue-darken-55:#1a70ff;--blue-lighten-82:#a2c5ff;--red-base-62:#ff3d3d;--red-base-62-lighten-90:#ffebeb;--silver-darken-94:#efefef;--color-000000:#000;--color-000000-opacity-05:rgba(0,0,0,0.05);--color-000000-opacity-10:rgba(0,0,0,0.1);--color-333333:#333;--color-666666:#666;--color-aaaaaa:#aaa;--color-cccccc:#ccc;--color-cdcdcd:#cdcdcd;--color-dddddd:#ddd;--color-f6f6f6:#f6f6f6;--color-fafafa:#fafafa;--color-fefefe:#fefefe;--color-ffffff:#fff;--bendpoint-fill-color:var(--blue-base-65-opacity-30);--bendpoint-stroke-color:var(--blue-base-65);--context-pad-entry-background-color:var(--color-fefefe);--context-pad-entry-hover-background-color:var(--silver-darken-94);--element-dragger-color:var(--blue-base-65);--element-hover-outline-fill-color:var(--blue-darken-48);--element-selected-outline-stroke-color:var(--blue-base-65);--lasso-fill-color:var(--color-000000-opacity-05);--lasso-stroke-color:var(--color-000000);--palette-entry-color:var(--color-333333);--palette-entry-hover-color:var(--blue-darken-48);--palette-entry-selected-color:var(--blue-base-65);--palette-separator-color:var(--color-aaaaaa);--palette-toggle-hover-background-color:var(--color-666666);--palette-background-color:var(--color-fafafa);--palette-border-color:var(--color-cccccc);--popup-body-background-color:var(--color-fefefe);--popup-header-entry-selected-color:var(--blue-base-65);--popup-header-entry-selected-background-color:var(--color-000000-opacity-10);--popup-header-separator-color:var(--color-dddddd);--popup-background-color:var(--color-fafafa);--popup-border-color:var(--color-cccccc);--resizer-fill-color:var(--blue-base-65-opacity-30);--resizer-stroke-color:var(--blue-base-65);--search-container-background-color:var(--color-fafafa);--search-container-border-color:var(--blue-darken-55);--search-container-box-shadow-color:var(--blue-lighten-82);--search-container-box-shadow-inset-color:var(--color-cdcdcd);--search-input-border-color:var(--color-cccccc);--search-result-border-color:var(--color-aaaaaa);--search-result-highlight-color:var(--color-000000);--search-result-selected-color:var(--blue-base-65-opacity-30);--shape-attach-allowed-stroke-color:var(--blue-base-65);--shape-connect-allowed-fill-color:var(--color-f6f6f6);--shape-drop-allowed-fill-color:var(--color-f6f6f6);--shape-drop-not-allowed-fill-color:var(--red-base-62-lighten-90);--shape-resize-preview-stroke-color:var(--blue-base-65);--snap-line-stroke-color:var(--blue-base-65-opacity-30);--space-tool-crosshair-stroke-color:var(--color-000000);--tooltip-error-background-color:var(--red-base-62-lighten-90);--tooltip-error-border-color:var(--red-base-62);--tooltip-error-color:var(--red-base-62)}.djs-outline{fill:none;visibility:hidden}.djs-element.hover .djs-outline,.djs-element.selected .djs-outline{visibility:visible;shape-rendering:geometricPrecision;stroke-dasharray:3,3}.djs-element.selected .djs-outline{stroke:var(--element-selected-outline-stroke-color);stroke-width:1px}.djs-element.hover .djs-outline{stroke:var(--element-hover-outline-fill-color);stroke-width:1px}.djs-shape.connect-ok .djs-visual>:first-child{fill:var(--shape-connect-allowed-fill-color)!important}.djs-shape.connect-not-ok .djs-visual>:first-child,.djs-shape.drop-not-ok .djs-visual>:first-child{fill:var(--shape-drop-not-allowed-fill-color)!important}.djs-shape.new-parent .djs-visual>:first-child{fill:var(--shape-drop-allowed-fill-color)!important}svg.drop-not-ok{background:var(--shape-drop-not-allowed-fill-color)!important}svg.new-parent{background:var(--shape-drop-allowed-fill-color)!important}.djs-connection.connect-ok .djs-visual>:first-child,.djs-connection.drop-ok .djs-visual>:first-child{stroke:var(--shape-drop-allowed-fill-color)!important}.djs-connection.connect-not-ok .djs-visual>:first-child,.djs-connection.drop-not-ok .djs-visual>:first-child{stroke:var(--shape-drop-not-allowed-fill-color)!important}.connect-not-ok,.drop-not-ok{cursor:not-allowed}.djs-element.attach-ok .djs-visual>:first-child{stroke-width:5px!important;stroke:var(--shape-attach-allowed-stroke-color)!important}.djs-frame.connect-not-ok .djs-visual>:first-child,.djs-frame.drop-not-ok .djs-visual>:first-child{stroke-width:3px!important;stroke:var(--shape-drop-not-allowed-fill-color)!important;fill:none!important}.djs-lasso-overlay{fill:var(--lasso-fill-color);stroke-dasharray:5 1 3 1;stroke:var(--lasso-stroke-color);shape-rendering:geometricPrecision;pointer-events:none}.djs-resize-overlay{fill:none;stroke-dasharray:5 1 3 1;stroke:var(--shape-resize-preview-stroke-color);pointer-events:none}.djs-resizer-hit{fill:none;pointer-events:all}.djs-resizer-visual{fill:var(--resizer-fill-color);stroke-width:1px;stroke-opacity:.5;stroke:var(--resizer-stroke-color);shape-rendering:geometricprecision}.djs-resizer:hover .djs-resizer-visual{stroke:var(--resizer-stroke-color);stroke-opacity:1}.djs-cursor-resize-ns,.djs-resizer-n,.djs-resizer-s{cursor:ns-resize}.djs-cursor-resize-ew,.djs-resizer-e,.djs-resizer-w{cursor:ew-resize}.djs-cursor-resize-nwse,.djs-resizer-nw,.djs-resizer-se{cursor:nwse-resize}.djs-cursor-resize-nesw,.djs-resizer-ne,.djs-resizer-sw{cursor:nesw-resize}.djs-shape.djs-resizing>.djs-outline{visibility:hidden!important}.djs-dragger>.djs-resizer,.djs-shape.djs-resizing>.djs-resizer{visibility:hidden}.djs-dragger *{fill:none!important;stroke:var(--element-dragger-color)!important}.djs-dragger text,.djs-dragger tspan,marker.djs-dragger circle,marker.djs-dragger path,marker.djs-dragger polygon,marker.djs-dragger polyline,marker.djs-dragger rect{fill:var(--element-dragger-color)!important;stroke:none!important}marker.djs-dragger text,marker.djs-dragger tspan{fill:none!important;stroke:var(--element-dragger-color)!important}.djs-dragging{opacity:.3}.djs-dragging,.djs-dragging>*{pointer-events:none!important}.djs-dragging .djs-context-pad,.djs-dragging .djs-outline{display:none!important}.djs-outline,.djs-visual{pointer-events:none}.djs-element.attach-ok .djs-hit{stroke-width:60px!important}.djs-element>.djs-hit-all{pointer-events:all}.djs-element>.djs-hit-click-stroke,.djs-element>.djs-hit-stroke{pointer-events:stroke}.djs-drag-active .djs-element>.djs-hit-click-stroke{pointer-events:all}.djs-connection .djs-visual{stroke-width:2px;fill:none}.djs-cursor-grab{cursor:-webkit-grab;cursor:grab}.djs-cursor-grabbing{cursor:-webkit-grabbing;cursor:grabbing}.djs-cursor-crosshair{cursor:crosshair}.djs-cursor-move{cursor:move}.djs-cursor-resize-ns{cursor:ns-resize}.djs-cursor-resize-ew{cursor:ew-resize}.djs-snap-line{stroke:var(--snap-line-stroke-color);stroke-linecap:round;stroke-width:2px;pointer-events:none}.djs-crosshair{stroke:var(--space-tool-crosshair-stroke-color);stroke-linecap:round;stroke-width:1px;pointer-events:none;shape-rendering:crispEdges;stroke-dasharray:5,5}.djs-palette{position:absolute;left:20px;top:20px;box-sizing:border-box;width:48px}.djs-palette .separator{margin:0 5px;padding-top:5px;border:none;border-bottom:solid 1px var(--palette-separator-color);clear:both}.djs-palette .entry:before{vertical-align:text-bottom}.djs-palette .djs-palette-toggle{cursor:pointer}.djs-palette .djs-palette-toggle,.djs-palette .entry{color:var(--palette-entry-color);font-size:30px;text-align:center}.djs-palette .entry{float:left}.djs-palette .entry img{max-width:100%}.djs-palette .djs-palette-entries:after{content:"";display:table;clear:both}.djs-palette .djs-palette-toggle:hover{background:var(--palette-toggle-hover-background-color)}.djs-palette .entry:hover{color:var(--palette-entry-hover-color)}.djs-palette .highlighted-entry{color:var(--palette-entry-selected-color)!important}.djs-palette .djs-palette-toggle,.djs-palette .entry{width:46px;height:46px;line-height:46px;cursor:default}.djs-palette.two-column.open{width:94px}.djs-palette:not(.open) .djs-palette-entries{display:none}.djs-palette:not(.open){overflow:hidden}.djs-palette.open .djs-palette-toggle{display:none}.djs-overlay-context-pad{width:72px;z-index:100}.djs-context-pad{position:absolute;display:none;pointer-events:none}.djs-context-pad .entry{width:22px;height:22px;text-align:center;display:inline-block;font-size:22px;margin:0 2px 2px 0;border-radius:3px;cursor:default;background-color:var(--context-pad-entry-background-color);box-shadow:0 0 2px 1px var(--context-pad-entry-background-color);pointer-events:all}.djs-context-pad .entry:before{vertical-align:top}.djs-context-pad .entry:hover{background:var(--context-pad-entry-hover-background-color)}.djs-context-pad.open{display:block}.djs-popup .entry{line-height:20px;white-space:nowrap;cursor:default}.djs-popup .entry:before{vertical-align:middle;font-size:20px}.djs-popup .entry>span{vertical-align:middle;font-size:14px}.djs-popup .entry.active:hover,.djs-popup .entry:hover{background:var(--popup-header-entry-selected-background-color)}.djs-popup .entry.disabled{background:inherit}.djs-popup .djs-popup-header .entry{display:inline-block;padding:2px 3px 2px 3px;border:1px solid transparent;border-radius:3px}.djs-popup .djs-popup-header .entry.active{color:var(--popup-header-entry-selected-color);border:solid 1px var(--popup-header-entry-selected-color);background-color:var(--popup-header-entry-selected-background-color)}.djs-popup-body .entry{padding:4px 10px 4px 5px}.djs-popup-body .entry>span{margin-left:5px}.djs-popup-body{background-color:var(--popup-body-background-color)}.djs-popup-header{border-bottom:1px solid var(--popup-header-separator-color)}.djs-popup-header .entry{margin:1px;margin-left:3px}.djs-popup-header .entry:last-child{margin-right:3px}.djs-palette{background:var(--palette-background-color);border:solid 1px var(--palette-border-color);border-radius:2px}.djs-popup{background:var(--popup-background-color);border:solid 1px var(--popup-border-color);border-radius:2px}.djs-connection,.djs-shape{touch-action:none}.djs-bendpoint,.djs-segment-dragger{display:none}.djs-segment-dragger .djs-visual{display:none;fill:var(--bendpoint-fill-color);stroke:var(--bendpoint-stroke-color);stroke-width:1px;stroke-opacity:1}.djs-segment-dragger:hover .djs-visual{display:block}.djs-bendpoint .djs-visual{fill:var(--bendpoint-fill-color);stroke:var(--bendpoint-stroke-color);stroke-width:1px;stroke-opacity:.5}.djs-bendpoint:hover,.djs-bendpoints.hover .djs-bendpoint,.djs-bendpoints.hover .djs-segment-dragger,.djs-bendpoints.selected .djs-bendpoint,.djs-bendpoints.selected .djs-segment-dragger,.djs-segment-dragger:hover{display:block}.djs-bendpoints:not(.hover) .floating,.djs-drag-active .djs-bendpoints *{display:none}.djs-bendpoint.floating .djs-visual,.djs-bendpoint:hover .djs-visual,.djs-segment-dragger.djs-dragging .djs-visual,.djs-segment-dragger:hover .djs-visual{fill:var(--bendpoint-fill-color);stroke:var(--bendpoint-stroke-color);stroke-opacity:1}.djs-bendpoint.floating .djs-hit{pointer-events:none}.djs-bendpoint .djs-hit,.djs-segment-dragger .djs-hit{fill:none;pointer-events:all}.djs-segment-dragger.horizontal .djs-hit{cursor:ns-resize}.djs-segment-dragger.vertical .djs-hit{cursor:ew-resize}.djs-segment-dragger.djs-dragging .djs-hit{pointer-events:none}.djs-updating,.djs-updating>*{pointer-events:none!important}.connect-not-ok .djs-bendpoint,.connect-ok .djs-bendpoint,.djs-updating .djs-bendpoint,.djs-updating .djs-context-pad,.djs-updating .djs-outline,.drop-not-ok .djs-bendpoint,.drop-ok .djs-bendpoint{display:none!important}.djs-bendpoint.djs-dragging,.djs-segment-dragger.djs-dragging{display:block;opacity:1}.djs-tooltip-error{width:160px;padding:6px;background:var(--tooltip-error-background-color);border:solid 1px var(--tooltip-error-border-color);border-radius:2px;color:var(--tooltip-error-color);font-size:12px;line-height:16px;opacity:.75}.djs-tooltip-error:hover{opacity:1}.djs-search-container{position:absolute;top:20px;left:0;right:0;margin-left:auto;margin-right:auto;width:25%;min-width:300px;max-width:400px;z-index:10;font-size:1.05em;opacity:.9;background:var(--search-container-background-color);border:solid 1px var(--search-container-border-color);border-radius:2px;box-shadow:0 0 0 2px var(--search-container-box-shadow-color),0 0 0 1px var(--search-container-box-shadow-inset-color) inset}.djs-search-container:not(.open){display:none}.djs-search-input input{font-size:1.05em;width:100%;padding:6px 10px;border:1px solid var(--search-input-border-color);box-sizing:border-box}.djs-search-input input:focus{outline:none;border-color:var(--search-input-border-color)}.djs-search-results{position:relative;overflow-y:auto;max-height:200px}.djs-search-results:hover{cursor:pointer}.djs-search-result{width:100%;padding:6px 10px;background:#fff;border-bottom:solid 1px var(--search-result-border-color);border-radius:1px}.djs-search-highlight{color:var(--search-result-highlight-color)}.djs-search-result-primary{margin:0 0 10px}.djs-search-result-secondary{font-family:monospace;margin:0}.djs-search-overlay,.djs-search-result-selected,.djs-search-result-selected:hover,.djs-search-result:hover{background:var(--search-result-selected-color)}.djs-element-hidden,.djs-element-hidden .djs-hit,.djs-element-hidden .djs-outline,.djs-label-hidden .djs-label{display:none!important}',""]),e.exports=t},6023:function(e,t,n){var i=n("d53b"),o=n("762a"),r=n("d85b"),s=n("1810"),a=s("iterator");e.exports=function(e){if(void 0!=e)return o(e,a)||o(e,"@@iterator")||r[i(e)]}},6024:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,'.bpmn-icon-screw-wrench:before{content:"\\e800"}.bpmn-icon-trash:before{content:"\\e801"}.bpmn-icon-conditional-flow:before{content:"\\e802"}.bpmn-icon-default-flow:before{content:"\\e803"}.bpmn-icon-gateway-parallel:before{content:"\\e804"}.bpmn-icon-intermediate-event-catch-cancel:before{content:"\\e805"}.bpmn-icon-intermediate-event-catch-non-interrupting-message:before{content:"\\e806"}.bpmn-icon-start-event-compensation:before{content:"\\e807"}.bpmn-icon-start-event-non-interrupting-parallel-multiple:before{content:"\\e808"}.bpmn-icon-loop-marker:before{content:"\\e809"}.bpmn-icon-parallel-mi-marker:before{content:"\\e80a"}.bpmn-icon-start-event-non-interrupting-signal:before{content:"\\e80b"}.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before{content:"\\e80c"}.bpmn-icon-intermediate-event-catch-parallel-multiple:before{content:"\\e80d"}.bpmn-icon-intermediate-event-catch-compensation:before{content:"\\e80e"}.bpmn-icon-gateway-xor:before{content:"\\e80f"}.bpmn-icon-connection:before{content:"\\e810"}.bpmn-icon-end-event-cancel:before{content:"\\e811"}.bpmn-icon-intermediate-event-catch-condition:before{content:"\\e812"}.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before{content:"\\e813"}.bpmn-icon-start-event-condition:before{content:"\\e814"}.bpmn-icon-start-event-non-interrupting-timer:before{content:"\\e815"}.bpmn-icon-sequential-mi-marker:before{content:"\\e816"}.bpmn-icon-user-task:before{content:"\\e817"}.bpmn-icon-business-rule:before{content:"\\e818"}.bpmn-icon-sub-process-marker:before{content:"\\e819"}.bpmn-icon-start-event-parallel-multiple:before{content:"\\e81a"}.bpmn-icon-start-event-error:before{content:"\\e81b"}.bpmn-icon-intermediate-event-catch-signal:before{content:"\\e81c"}.bpmn-icon-intermediate-event-catch-error:before{content:"\\e81d"}.bpmn-icon-end-event-compensation:before{content:"\\e81e"}.bpmn-icon-subprocess-collapsed:before{content:"\\e81f"}.bpmn-icon-subprocess-expanded:before{content:"\\e820"}.bpmn-icon-task:before{content:"\\e821"}.bpmn-icon-end-event-error:before{content:"\\e822"}.bpmn-icon-intermediate-event-catch-escalation:before{content:"\\e823"}.bpmn-icon-intermediate-event-catch-timer:before{content:"\\e824"}.bpmn-icon-start-event-escalation:before{content:"\\e825"}.bpmn-icon-start-event-signal:before{content:"\\e826"}.bpmn-icon-business-rule-task:before{content:"\\e827"}.bpmn-icon-manual:before{content:"\\e828"}.bpmn-icon-receive:before{content:"\\e829"}.bpmn-icon-call-activity:before{content:"\\e82a"}.bpmn-icon-start-event-timer:before{content:"\\e82b"}.bpmn-icon-start-event-message:before{content:"\\e82c"}.bpmn-icon-intermediate-event-none:before{content:"\\e82d"}.bpmn-icon-intermediate-event-catch-link:before{content:"\\e82e"}.bpmn-icon-end-event-escalation:before{content:"\\e82f"}.bpmn-icon-text-annotation:before{content:"\\e830"}.bpmn-icon-bpmn-io:before{content:"\\e831"}.bpmn-icon-gateway-complex:before{content:"\\e832"}.bpmn-icon-gateway-eventbased:before{content:"\\e833"}.bpmn-icon-gateway-none:before{content:"\\e834"}.bpmn-icon-gateway-or:before{content:"\\e835"}.bpmn-icon-end-event-terminate:before{content:"\\e836"}.bpmn-icon-end-event-signal:before{content:"\\e837"}.bpmn-icon-end-event-none:before{content:"\\e838"}.bpmn-icon-end-event-multiple:before{content:"\\e839"}.bpmn-icon-end-event-message:before{content:"\\e83a"}.bpmn-icon-end-event-link:before{content:"\\e83b"}.bpmn-icon-intermediate-event-catch-message:before{content:"\\e83c"}.bpmn-icon-intermediate-event-throw-compensation:before{content:"\\e83d"}.bpmn-icon-start-event-multiple:before{content:"\\e83e"}.bpmn-icon-script:before{content:"\\e83f"}.bpmn-icon-manual-task:before{content:"\\e840"}.bpmn-icon-send:before{content:"\\e841"}.bpmn-icon-service:before{content:"\\e842"}.bpmn-icon-receive-task:before{content:"\\e843"}.bpmn-icon-user:before{content:"\\e844"}.bpmn-icon-start-event-none:before{content:"\\e845"}.bpmn-icon-intermediate-event-throw-escalation:before{content:"\\e846"}.bpmn-icon-intermediate-event-catch-multiple:before{content:"\\e847"}.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before{content:"\\e848"}.bpmn-icon-intermediate-event-throw-link:before{content:"\\e849"}.bpmn-icon-start-event-non-interrupting-condition:before{content:"\\e84a"}.bpmn-icon-data-object:before{content:"\\e84b"}.bpmn-icon-script-task:before{content:"\\e84c"}.bpmn-icon-send-task:before{content:"\\e84d"}.bpmn-icon-data-store:before{content:"\\e84e"}.bpmn-icon-start-event-non-interrupting-escalation:before{content:"\\e84f"}.bpmn-icon-intermediate-event-throw-message:before{content:"\\e850"}.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before{content:"\\e851"}.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before{content:"\\e852"}.bpmn-icon-intermediate-event-throw-multiple:before{content:"\\e853"}.bpmn-icon-start-event-non-interrupting-message:before{content:"\\e854"}.bpmn-icon-ad-hoc-marker:before{content:"\\e855"}.bpmn-icon-service-task:before{content:"\\e856"}.bpmn-icon-task-none:before{content:"\\e857"}.bpmn-icon-compensation-marker:before{content:"\\e858"}.bpmn-icon-start-event-non-interrupting-multiple:before{content:"\\e859"}.bpmn-icon-intermediate-event-throw-signal:before{content:"\\e85a"}.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before{content:"\\e85b"}.bpmn-icon-participant:before{content:"\\e85c"}.bpmn-icon-event-subprocess-expanded:before{content:"\\e85d"}.bpmn-icon-lane-insert-below:before{content:"\\e85e"}.bpmn-icon-space-tool:before{content:"\\e85f"}.bpmn-icon-connection-multi:before{content:"\\e860"}.bpmn-icon-lane:before{content:"\\e861"}.bpmn-icon-lasso-tool:before{content:"\\e862"}.bpmn-icon-lane-insert-above:before{content:"\\e863"}.bpmn-icon-lane-divide-three:before{content:"\\e864"}.bpmn-icon-lane-divide-two:before{content:"\\e865"}.bpmn-icon-data-input:before{content:"\\e866"}.bpmn-icon-data-output:before{content:"\\e867"}.bpmn-icon-hand-tool:before{content:"\\e868"}.bpmn-icon-group:before{content:"\\e869"}.bpmn-icon-transaction:before{content:"\\e8c4"}',""]),e.exports=t},6043:function(e,t,n){var i=n("e244"),o=n("9564"),r=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?r(i[e]):i[e]&&i[e][t]}},6063:function(e,t,n){"use strict";n("f96e"),n("37fd");var i=n("fbdf"),o=i.getBusinessObject,r=i.is,s=i.isAncestor,a=i.isTypedEvent,l=n("4580"),c=l.CONSUME_TOKEN_EVENT,h=250;function u(e,t,n,i,o,r,s){this._animation=t,this._elementRegistry=n,this._log=i,this._elementNotifications=o,this._canvas=r,this._processInstances=s,e.on(c,h,(function(){}))}u.prototype.isDeadlock=function(){var e=this,t=[];this._elementRegistry.forEach((function(e){e.tokenCount&&t.push(e)}));var n=[],i=[];t.forEach((function(e){var t=e.outgoing.filter((function(e){return r(e,"bpmn:SequenceFlow")}));if(t.length||n.push(e),r(e,"bpmn:ParallelGateway")){var s=e.incoming.filter((function(e){return r(e,"bpmn:SequenceFlow")}));s.length>e.tokenCount&&n.push(e)}var l=[];function c(e){e.outgoing.forEach((function(t){if(-1===l.indexOf(t.target)){l.push(t.target);var n=a(o(t.target),"bpmn:TerminateEventDefinition");n&&i.push(e),c(t.target)}}))}c(e)})),t.length&&!i.length&&n.length&&!this._animation.animations.length&&(e._log.log("Deadlock","warning","fa-exclamation-triangle"),n.forEach((function(t){e._elementNotifications.addElementNotification(t,{type:"warning",icon:"fa-exclamation-triangle",text:"Deadlock"})})))},u.prototype.isFinished=function(e,t){var n=this._processInstances.getProcessInstance(t),i=n.parent,o=!1;i||(i=this._canvas.getRootElement()),i.children.forEach((function(e){e.tokenCount&&e.tokenCount[t]&&e.tokenCount[t].length&&(o=!0)}));var a=!1;if(this._animation.animations.forEach((function(e){s(i,e.element)&&e.processInstanceId===t&&(a=!0)})),!o&&!a)return r(i,"bpmn:SubProcess")?this._log.log("Subprocess "+t+" finished","info","fa-check-circle"):(this._log.log("Process "+t+" finished","success","fa-check-circle"),this._elementNotifications.addElementNotification(e,{type:"success",icon:"fa-check-circle",text:"Finished"})),!0},u.$inject=["eventBus","animation","elementRegistry","log","elementNotifications","canvas","processInstances"],e.exports=u},"609f":function(e,t,n){var i=n("fbcf"),o=n("dc8c");e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(s){o(e,"throw",s)}}},6120:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent}.monaco-editor .inputarea.ime-input{z-index:10}",""]),e.exports=t},6161:function(e,t,n){var i=n("7d86");e.exports=function(e,t,n){for(var o in t)i(e,o,t[o],n);return e}},"61b6":function(e,t,n){var i=n("53c2"),o=n("5f86"),r=n("ce75"),s=n("6024"),a=n("cfa0"),l=n("a0ff"),c=n("f767"),h=n("a452");t=i(!1),t.i(o),t.i(r),t.i(s),t.i(a),t.i(l),t.i(c),t.i(h),t.push([e.i,'.wf-design{outline:1px solid #e4e7ed}.wf-design,.wf-design .el-container{height:100%}.wf-design .el-container .el-header{height:50px!important;border-bottom:2px solid #e4e7ed}.wf-design .el-container .el-main{height:calc(100% - 52px);padding:0}.wf-design .el-container .el-main .modeler{height:100%;background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+") repeat!important}.wf-design .el-container .el-main .nodePrimary:not(.djs-connection) .djs-visual>:first-child{fill:#409eff!important}.wf-design .el-container .el-main .nodeSuccess:not(.djs-connection) .djs-visual>:first-child{fill:#67c23a!important}.wf-design .el-container .el-main .nodeWarn:not(.djs-connection) .djs-visual>:first-child{fill:#e6a23c!important}.wf-design .el-container .el-main .nodeError:not(.djs-connection) .djs-visual>:first-child{fill:#f56c6c!important}.wf-design .el-container .el-main .linePrimary:not(.djs-shape) .djs-visual :last-child{stroke:#409eff!important}.wf-design .el-container .el-main .lineSuccess:not(.djs-shape) .djs-visual :last-child{stroke:#67c23a!important}.wf-design .el-container .el-main .lineWarn:not(.djs-shape) .djs-visual :last-child{stroke:#e6a23c!important}.wf-design .el-container .el-main .lineError:not(.djs-shape) .djs-visual :last-child{stroke:#f56c6c!important}.wf-design .el-container .el-aside{outline:1px solid #e4e7ed;height:100%;padding-top:10px}.wf-design .el-container .el-aside .el-tabs{height:100%}.wf-design .el-container .el-aside .el-tabs .el-tabs__header{margin:0;width:380px;background:#fff;z-index:1000;border-bottom:1px solid #e4e7ed}.wf-design .el-container .el-aside .el-tabs .el-tabs__content{height:calc(100% - 40px);overflow-y:scroll}.wf-design .el-container .el-aside .el-tabs .el-tabs__item{padding:0}.wf-design .el-container .el-aside .el-tabs .el-collapse .el-collapse-item__content{padding-bottom:10px}.wf-design .el-container .el-aside .el-select{width:100%}.wf-design__config--icon{width:48px;height:48px;font-size:30px;position:absolute;right:0;bottom:20%;display:flex;align-items:center;justify-content:center;border-radius:10px;cursor:pointer;background:#409eff;z-index:99}.wf-design__config--icon .modeler-sk{background:url("data:image/svg+xml;base64,3e68f5a6cc486e25451165f604ee6520")}.wf-design__config--icon i{color:#fff}.wf-design__config .el-drawer__body{padding:0 20px}.wf-design .djs-tooltip{font-size:13px;width:120px;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.el-drawer__wrapper :focus{outline:0}.el-drawer__wrapper .wf-design__drawer-foot{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0 20px}.el-drawer__wrapper .wf-design__drawer-foot button{width:50%}',""]),e.exports=t},"61c0":function(e,t,n){"use strict";var i=n("4eaf").charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},"62fd":function(e,t){e.exports=function e(t,n){const i=n.enter||null,o=n.leave||null,r=i&&i(t),s=t.$descriptor;if(!1!==r&&!s.isGeneric){const i=s.properties.filter(e=>!e.isAttr&&!e.isReference&&"String"!==e.type);i.forEach(i=>{if(i.name in t){const o=t[i.name];i.isMany?o.forEach(t=>{e(t,n)}):e(o,n)}})}o&&o(t)}},"63ef":function(e,t,n){var i=n("b896").f,o=n("0b05"),r=n("1810"),s=r("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,s)&&i(e,s,{configurable:!0,value:t})}},"642d":function(e,t,n){var i=n("e244");e.exports=i},"643b":function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf").is,o=n("4580"),r=o.CONSUME_TOKEN_EVENT,s=o.GENERATE_TOKEN_EVENT;function a(e,t){this._animation=e,this._eventBus=t}a.prototype.consume=function(e){var t=e.element,n=e.processInstanceId;t.tokenCount||(t.tokenCount={}),t.tokenCount[n]||(t.tokenCount[n]=0),t.tokenCount[n]++;var i=t.incoming;i.length===t.tokenCount[n]&&(this._eventBus.fire(s,e),t.tokenCount[n]=0)},a.prototype.generate=function(e){var t=this,n=e.element,o=e.processInstanceId,s=n.outgoing.filter((function(e){return i(e,"bpmn:SequenceFlow")}));s.forEach((function(e){t._animation.createAnimation(e,o,(function(){t._eventBus.fire(r,{element:e.target,processInstanceId:o})}))}))},a.$inject=["animation","eventBus"],e.exports=a},6483:function(e,t,n){var i=n("ac97");e.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},"679c":function(e,t,n){var i=n("f146"),o=i("span").classList,r=o&&o.constructor&&o.constructor.prototype;e.exports=r===Object.prototype?void 0:r},6965:function(e,t,n){var i=n("1810"),o=i("toStringTag"),r={};r[o]="z",e.exports="[object z]"===String(r)},"69f1":function(e,t,n){var i=n("55ab"),o=n("b896"),r=n("4d82");e.exports=i?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},"6a0b":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .overlayWidgets{position:absolute;top:0;left:0}",""]),e.exports=t},"6aad":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block}.monaco-diff-editor .diff-review{position:absolute;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}",""]),e.exports=t},"6b40":function(e,t,n){"use strict";var i=n("83ec"),o=n("e244"),r=n("ac97"),s=n("5a43"),a=n("eee7"),l=n("c673"),c=n("7c08"),h=n("acd4"),u=n("f152"),d=n("72d4"),p=n("1810"),f=n("2c21"),g=p("isConcatSpreadable"),m=9007199254740991,b="Maximum allowed index exceeded",v=o.TypeError,y=f>=51||!r((function(){var e=[];return e[g]=!1,e.concat()[0]!==e})),w=d("concat"),_=function(e){if(!a(e))return!1;var t=e[g];return void 0!==t?!!t:s(e)},C=!y||!w;i({target:"Array",proto:!0,forced:C},{concat:function(e){var t,n,i,o,r,s=l(this),a=u(s,0),d=0;for(t=-1,i=arguments.length;t<i;t++)if(r=-1===t?s:arguments[t],_(r)){if(o=c(r),d+o>m)throw v(b);for(n=0;n<o;n++,d++)n in r&&h(a,d,r[n])}else{if(d>=m)throw v(b);h(a,d++,r)}return a.length=d,a}})},"6b5e":function(e,t,n){"use strict";var i=n("92af");t["a"]={methods:{t:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i["b"].apply(this,t)}}}},"6b7e":function(e,t,n){var i=n("7f82"),o=n("0b38");e.exports=function(e){var t=i(e,"string");return o(t)?t:t+""}},"6baf":function(e,t,n){var i=n("642d"),o=n("0b05"),r=n("aca4"),s=n("b896").f;e.exports=function(e){var t=i.Symbol||(i.Symbol={});o(t,e)||s(t,e,{value:r.f(e)})}},"6cd1":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}",""]),e.exports=t},"6d21":function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return i}))},"6d8f":function(e,t,n){var i=n("7979");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("64c4d902",i,!0,{sourceMap:!1,shadowMode:!1})},"6e10":function(e,t,n){var i=n("1810"),o=n("ca2b"),r=n("b896"),s=i("unscopables"),a=Array.prototype;void 0==a[s]&&r.f(a,s,{configurable:!0,value:o(null)}),e.exports=function(e){a[s][e]=!0}},"6e1d":function(e,t,n){"use strict";var i=n("58d1"),o=n("6f9e"),r=n("04c3"),s=n("ff5c"),a=n("030e"),l=n("986e"),c=n("ca2b"),h=n("35d6").get,u=n("d73d"),d=n("2530"),p=l("native-string-replace",String.prototype.replace),f=RegExp.prototype.exec,g=f,m=o("".charAt),b=o("".indexOf),v=o("".replace),y=o("".slice),w=function(){var e=/a/,t=/b*/g;return i(f,e,"a"),i(f,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),_=a.BROKEN_CARET,C=void 0!==/()??/.exec("")[1],A=w||C||_||u||d;A&&(g=function(e){var t,n,o,a,l,u,d,A=this,E=h(A),x=r(e),S=E.raw;if(S)return S.lastIndex=A.lastIndex,t=i(g,S,x),A.lastIndex=S.lastIndex,t;var k=E.groups,D=_&&A.sticky,L=i(s,A),I=A.source,N=0,M=x;if(D&&(L=v(L,"y",""),-1===b(L,"g")&&(L+="g"),M=y(x,A.lastIndex),A.lastIndex>0&&(!A.multiline||A.multiline&&"\n"!==m(x,A.lastIndex-1))&&(I="(?: "+I+")",M=" "+M,N++),n=new RegExp("^(?:"+I+")",L)),C&&(n=new RegExp("^"+I+"$(?!\\s)",L)),w&&(o=A.lastIndex),a=i(f,D?n:A,M),D?a?(a.input=y(a.input,N),a[0]=y(a[0],N),a.index=A.lastIndex,A.lastIndex+=a[0].length):A.lastIndex=0:w&&a&&(A.lastIndex=A.global?a.index+a[0].length:o),C&&a&&a.length>1&&i(p,a[0],n,(function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(a[l]=void 0)})),a&&k)for(a.groups=u=c(null),l=0;l<k.length;l++)d=k[l],u[d[0]]=a[d[1]];return a}),e.exports=g},"6f9e":function(e,t){var n=Function.prototype,i=n.bind,o=n.call,r=i&&i.bind(o);e.exports=i?function(e){return e&&r(o,e)}:function(e){return e&&function(){return o.apply(e,arguments)}}},7043:function(e,t,n){var i=n("e5d9");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("385da0b4",i,!0,{sourceMap:!1,shadowMode:!1})},"708c":function(e,t,n){"use strict";var i=n("7299"),o=i.domify,r=i.classes,s=i.event,a=i.query,l=n("4580"),c=l.TOGGLE_MODE_EVENT;function h(e,t,n,i,o){var r=this;this._eventBus=e,this._canvas=t,this._selection=n,this._contextPad=i,this._translate=o,this.simulationModeActive=!1,e.on("import.done",(function(){r.canvasParent=r._canvas.getContainer().parentNode,r.palette=a(".djs-palette",r._canvas.getContainer()),r._init()}))}h.prototype._init=function(){this.container=o('\n <div class="toggle-mode">\n '.concat(this._translate("Token Simulation"),' <span class="toggle"><i class="fa fa-toggle-off"></i></span>\n </div>\n ')),s.bind(this.container,"click",this.toggleMode.bind(this)),this._canvas.getContainer().appendChild(this.container)},h.prototype.toggleMode=function(){if(this.simulationModeActive){this.container.innerHTML="".concat(this._translate("Token Simulation"),' <span class="toggle"><i class="fa fa-toggle-off"></i></span>'),r(this.canvasParent).remove("simulation"),r(this.palette).remove("hidden"),this._eventBus.fire(c,{simulationModeActive:!1});var e=this._selection.get();1===e.length&&this._contextPad.open(e[0])}else this.container.innerHTML="".concat(this._translate("Token Simulation"),' <span class="toggle"><i class="fa fa-toggle-on"></i></span>'),r(this.canvasParent).add("simulation"),r(this.palette).add("hidden"),this._eventBus.fire(c,{simulationModeActive:!0});this.simulationModeActive=!this.simulationModeActive},h.$inject=["eventBus","canvas","selection","contextPad","translate"],e.exports=h},"70a5":function(e,t,n){var i=n("83ec"),o=n("8410").values;i({target:"Object",stat:!0},{values:function(e){return o(e)}})},"70a8":function(e,t,n){var i=n("6a0b");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("1d6ab098",i,!0,{sourceMap:!1,shadowMode:!1})},7115:function(e,t,n){var i=n("c09a");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("3624864e",i,!0,{sourceMap:!1,shadowMode:!1})},7299:function(e,t,n){"use strict";function i(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}n.r(t),n.d(t,"attr",(function(){return i})),n.d(t,"classes",(function(){return l})),n.d(t,"clear",(function(){return h})),n.d(t,"closest",(function(){return g})),n.d(t,"delegate",(function(){return S})),n.d(t,"domify",(function(){return k})),n.d(t,"event",(function(){return _})),n.d(t,"matches",(function(){return p})),n.d(t,"query",(function(){return N})),n.d(t,"queryAll",(function(){return M})),n.d(t,"remove",(function(){return B}));var o=[].indexOf,r=function(e,t){if(o)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1},s=/\s+/,a=Object.prototype.toString;function l(e){return new c(e)}function c(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function h(e){var t;while(e.childNodes.length)t=e.childNodes[0],e.removeChild(t);return e}c.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array(),n=r(t,e);return~n||t.push(e),this.el.className=t.join(" "),this},c.prototype.remove=function(e){if("[object RegExp]"==a.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=r(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},c.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},c.prototype.toggle=function(e,t){return this.list?("undefined"!==typeof t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):("undefined"!==typeof t?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},c.prototype.array=function(){var e=this.el.getAttribute("class")||"",t=e.replace(/^\s+|\s+$/g,""),n=t.split(s);return""===n[0]&&n.shift(),n},c.prototype.has=c.prototype.contains=function(e){return this.list?this.list.contains(e):!!~r(this.array(),e)};var u="undefined"!==typeof Element?Element.prototype:{},d=u.matches||u.matchesSelector||u.webkitMatchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector,p=f;function f(e,t){if(!e||1!==e.nodeType)return!1;if(d)return d.call(e,t);for(var n=e.parentNode.querySelectorAll(t),i=0;i<n.length;i++)if(n[i]==e)return!0;return!1}function g(e,t,n){var i=n?e:e.parentNode;while(i&&i.nodeType!==document.DOCUMENT_NODE&&i.nodeType!==document.DOCUMENT_FRAGMENT_NODE){if(p(i,t))return i;i=i.parentNode}return p(i,t)?i:null}var m=window.addEventListener?"addEventListener":"attachEvent",b=window.removeEventListener?"removeEventListener":"detachEvent",v="addEventListener"!==m?"on":"",y=function(e,t,n,i){return e[m](v+t,n,i||!1),n},w=function(e,t,n,i){return e[b](v+t,n,i||!1),n},_={bind:y,unbind:w},C=["focus","blur"];function A(e,t,n,i,o){return-1!==C.indexOf(n)&&(o=!0),_.bind(e,n,(function(n){var o=n.target||n.srcElement;n.delegateTarget=g(o,t,!0,e),n.delegateTarget&&i.call(e,n)}),o)}function E(e,t,n,i){return-1!==C.indexOf(t)&&(i=!0),_.unbind(e,t,n,i)}var x,S={bind:A,unbind:E},k=I,D=!1;"undefined"!==typeof document&&(x=document.createElement("div"),x.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',D=!x.getElementsByTagName("link").length,x=void 0);var L={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:D?[1,"X<div>","</div>"]:[0,"",""]};function I(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){var o=t.createElement("html");return o.innerHTML=e,o.removeChild(o.lastChild)}var r=L[i]||L._default,s=r[0],a=r[1],l=r[2];o=t.createElement("div");o.innerHTML=a+e+l;while(s--)o=o.lastChild;if(o.firstChild==o.lastChild)return o.removeChild(o.firstChild);var c=t.createDocumentFragment();while(o.firstChild)c.appendChild(o.removeChild(o.firstChild));return c}function N(e,t){return t=t||document,t.querySelector(e)}function M(e,t){return t=t||document,t.querySelectorAll(e)}function B(e){e.parentNode&&e.parentNode.removeChild(e)}L.td=L.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],L.option=L.optgroup=[1,'<select multiple="multiple">',"</select>"],L.thead=L.tbody=L.colgroup=L.caption=L.tfoot=[1,"<table>","</table>"],L.polyline=L.ellipse=L.polygon=L.circle=L.text=L.line=L.path=L.rect=L.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"]},"72b1":function(e,t,n){var i=n("407e");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("363ce83c",i,!0,{sourceMap:!1,shadowMode:!1})},"72c7":function(e,t,n){var i=n("e244"),o=Object.defineProperty;e.exports=function(e,t){try{o(i,e,{value:t,configurable:!0,writable:!0})}catch(n){i[e]=t}return t}},"72d4":function(e,t,n){var i=n("ac97"),o=n("1810"),r=n("2c21"),s=o("species");e.exports=function(e){return r>=51||!i((function(){var t=[],n=t.constructor={};return n[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},7352:function(e,t,n){"use strict";var i=n("82a4"),o=n("58d1"),r=n("6f9e"),s=n("e820"),a=n("7439"),l=n("fbcf"),c=n("0874"),h=n("a55b"),u=n("61c0"),d=n("ce47"),p=n("04c3"),f=n("762a"),g=n("2ae8"),m=n("ec23"),b=n("6e1d"),v=n("030e"),y=n("ac97"),w=v.UNSUPPORTED_Y,_=4294967295,C=Math.min,A=[].push,E=r(/./.exec),x=r(A),S=r("".slice),k=!y((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));s("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=p(c(this)),s=void 0===n?_:n>>>0;if(0===s)return[];if(void 0===e)return[r];if(!a(e))return o(t,r,e,s);var l,h,u,d=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,v=new RegExp(e.source,f+"g");while(l=o(b,v,r)){if(h=v.lastIndex,h>m&&(x(d,S(r,m,l.index)),l.length>1&&l.index<r.length&&i(A,d,g(l,1)),u=l[0].length,m=h,d.length>=s))break;v.lastIndex===l.index&&v.lastIndex++}return m===r.length?!u&&E(v,"")||x(d,""):x(d,S(r,m)),d.length>s?g(d,0,s):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:o(t,this,e,n)}:t,[function(t,n){var i=c(this),s=void 0==t?void 0:f(t,e);return s?o(s,t,i,n):o(r,p(i),t,n)},function(e,i){var o=l(this),s=p(e),a=n(r,o,s,i,r!==t);if(a.done)return a.value;var c=h(o,RegExp),f=o.unicode,g=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),b=new c(w?"^(?:"+o.source+")":o,g),v=void 0===i?_:i>>>0;if(0===v)return[];if(0===s.length)return null===m(b,s)?[s]:[];var y=0,A=0,E=[];while(A<s.length){b.lastIndex=w?0:A;var k,D=m(b,w?S(s,A):s);if(null===D||(k=C(d(b.lastIndex+(w?A:0)),s.length))===y)A=u(s,A,f);else{if(x(E,S(s,y,A)),E.length===v)return E;for(var L=1;L<=D.length-1;L++)if(x(E,D[L]),E.length===v)return E;A=y=k}}return x(E,S(s,y)),E}]}),!k,w)},"73d0":function(e,t,n){const i=n("62fd");class o{constructor({moddleRoot:e,rule:t}){this.rule=t,this.moddleRoot=e,this.messages=[],this.report=this.report.bind(this)}report(e,t){this.messages.push({id:e,message:t})}}e.exports=function({moddleRoot:e,rule:t}){const n=new o({rule:t,moddleRoot:e}),r=t.check,s=r&&r.enter||r,a=r&&r.leave;if(!s&&!a)throw new Error("no check implemented");return i(e,{enter:s?e=>s(e,n):null,leave:a?e=>a(e,n):null}),n.messages}},7439:function(e,t,n){var i=n("eee7"),o=n("c401"),r=n("1810"),s=r("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[s])?!!t:"RegExp"==o(e))}},7554:function(e,t,n){"use strict";n("2f62"),n("26c4");var i=n("7299"),o=i.domify,r=n("4580"),s=r.TOGGLE_MODE_EVENT,a=2e3;function l(e,t,n){var i=this;this._eventBus=e,this._canvas=t,this._translate=n,this._init(),e.on(s,(function(e){var t=e.simulationModeActive;t||i.removeAll()}))}l.prototype._init=function(){this.container=o('<div class="notifications"></div>'),this._canvas.getContainer().appendChild(this.container)},l.prototype.showNotification=function(e,t,n){var i;n||(n="fa-info"),i=n.includes("bpmn")?'<i class="'+n+'"></i>':'<i class="fa '+n+'"></i>';var r=o('<div class="notification '+t+'"><span class="icon">'+i+"</span>"+this._translate(e)+"</div>");this.container.appendChild(r);while(this.container.children.length>5)this.container.children[0].remove();setTimeout((function(){r.remove()}),a)},l.prototype.removeAll=function(){while(this.container.children.length)this.container.children[0].remove()},l.$inject=["eventBus","canvas","translate"],e.exports=l},"762a":function(e,t,n){var i=n("b623");e.exports=function(e,t){var n=e[t];return null==n?void 0:i(n)}},7663:function(e,t,n){var i=n("ac97"),o=n("1810"),r=n("f0db"),s=o("iterator");e.exports=!i((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,i){t["delete"]("b"),n+=i+e})),r&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},"769f":function(e,t,n){var i=n("f3d6");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("16d935ea",i,!0,{sourceMap:!1,shadowMode:!1})},"76b2":function(e,t,n){var i=n("6f9e"),o=0,r=Math.random(),s=i(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+r,36)}},7741:function(e,t,n){const i=n("73d0"),o={0:"off",1:"warn",2:"error"};function r(e={}){const{config:t,resolver:n}=e;if("undefined"===typeof n)throw new Error("must provide <options.resolver>");this.config=t,this.resolver=n,this.cachedRules={},this.cachedConfigs={}}function s(e){return"bpmnlint"===e?"bpmnlint":e.startsWith("bpmnlint-plugin-")?e:"bpmnlint-plugin-"+e}function a(e){return e.startsWith("bpmnlint-plugin-")?e.substring("bpmnlint-plugin-".length):e}e.exports=r,r.prototype.applyRule=function(e,t){const{config:n,rule:o,category:r,name:s}=t;try{const t=i({moddleRoot:e,rule:o,config:n});return t.map((function(e){return{...e,category:r}}))}catch(a){return[{message:"Rule error: "+a.message,category:"error"}]}},r.prototype.resolveRule=function(e){const{pkg:t,ruleName:n}=this.parseRuleName(e),i=`${t}-${n}`,o=this.cachedRules[i];return o?Promise.resolve(o):Promise.resolve(this.resolver.resolveRule(t,n)).then(t=>{if(!t)throw new Error(`unknown rule <${e}>`);const n=this.cachedRules[i]=t();return n})},r.prototype.resolveConfig=function(e){const{pkg:t,configName:n}=this.parseConfigName(e),i=`${t}-${n}`,o=this.cachedConfigs[i];return o?Promise.resolve(o):Promise.resolve(this.resolver.resolveConfig(t,n)).then(n=>{if(!n)throw new Error(`unknown config <${e}>`);const o=this.cachedConfigs[i]=this.normalizeConfig(n,t);return o})},r.prototype.resolveRules=function(e){return this.resolveConfiguredRules(e).then(e=>{const t=Object.entries(e).map(([e,t])=>{const{category:n,config:i}=this.parseRuleValue(t);return{name:e,category:n,config:i}}),n=t.filter(e=>"off"!==e.category),i=n.map(e=>{const{name:t}=e;return this.resolveRule(t).then((function(t){return{...e,rule:t}}))});return Promise.all(i)})},r.prototype.resolveConfiguredRules=function(e){let t=e.extends;return"string"===typeof t&&(t=[t]),"undefined"===typeof t&&(t=[]),Promise.all(t.map(e=>this.resolveConfig(e).then(e=>this.resolveConfiguredRules(e)))).then(t=>{const n=this.normalizeConfig(e,"bpmnlint").rules,i=[...t,n].reduce((e,t)=>({...e,...t}),{});return i})},r.prototype.lint=function(e,t){return t=t||this.config,this.resolveRules(t).then(t=>{const n={};return t.forEach(t=>{const{name:i}=t,o=this.applyRule(e,t);o.length&&(n[i]=o)}),n})},r.prototype.parseRuleValue=function(e){let t,n;return Array.isArray(e)?(t=e[0],n=e[1]):(t=e,n={}),"string"===typeof t&&(t=t.toLowerCase()),t=o[t]||t,{config:n,category:t}},r.prototype.parseRuleName=function(e,t="bpmnlint"){const n=/^(?:(?:(@[^/]+)\/)?([^@]{1}[^/]*)\/)?([^/]+)$/.exec(e);if(!n)throw new Error(`unparseable rule name <${e}>`);const[i,o,r,a]=n;if(!r)return{pkg:t,ruleName:a};const l=`${o?o+"/":""}${s(r)}`;return{pkg:l,ruleName:a}},r.prototype.parseConfigName=function(e){const t=/^(?:(?:plugin:(?:(@[^/]+)\/)?([^@]{1}[^/]*)\/)|bpmnlint:)([^/]+)$/.exec(e);if(!t)throw new Error(`unparseable config name <${e}>`);const[n,i,o,r]=t;if(!o)return{pkg:"bpmnlint",configName:r};const a=`${i?i+"/":""}${s(o)}`;return{pkg:a,configName:r}},r.prototype.getSimplePackageName=function(e){const t=/^(?:(@[^/]+)\/)?([^/]+)$/.exec(e);if(!t)throw new Error(`unparseable package name <${e}>`);const[n,i,o]=t;return`${i?i+"/":""}${a(o)}`},r.prototype.normalizeConfig=function(e,t){const n=e.rules||{},i=Object.keys(n).reduce((e,i)=>{const o=n[i],{pkg:r,ruleName:s}=this.parseRuleName(i,t),a="bpmnlint"===r?s:`${this.getSimplePackageName(r)}/${s}`;return e[a]=o,e},{});return{...e,rules:i}}},"778b":function(e,t,n){e.exports=n("bfb1")},7979:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".codicon-wrench-subaction{opacity:.5}@-webkit-keyframes codicon-spin{to{transform:rotate(1turn)}}@keyframes codicon-spin{to{transform:rotate(1turn)}}.codicon-gear.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-sync.codicon-modifier-spin{-webkit-animation:codicon-spin 1.5s steps(30) infinite;animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{-webkit-animation-duration:1s!important;animation-duration:1s!important;-webkit-animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}",""]),e.exports=t},"7c08":function(e,t,n){var i=n("ce47");e.exports=function(e){return i(e.length)}},"7d86":function(e,t,n){var i=n("e244"),o=n("9564"),r=n("0b05"),s=n("69f1"),a=n("72c7"),l=n("9550"),c=n("35d6"),h=n("32a5").CONFIGURABLE,u=c.get,d=c.enforce,p=String(String).split("String");(e.exports=function(e,t,n,l){var c,u=!!l&&!!l.unsafe,f=!!l&&!!l.enumerable,g=!!l&&!!l.noTargetGet,m=l&&void 0!==l.name?l.name:t;o(n)&&("Symbol("===String(m).slice(0,7)&&(m="["+String(m).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!r(n,"name")||h&&n.name!==m)&&s(n,"name",m),c=d(n),c.source||(c.source=p.join("string"==typeof m?m:""))),e!==i?(u?!g&&e[t]&&(f=!0):delete e[t],f?e[t]=n:s(e,t,n)):f?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return o(this)&&u(this).source||l(this)}))},"7e50":function(e,t,n){var i=n("83ec"),o=n("ac97"),r=n("45ad"),s=n("42b1").f,a=n("55ab"),l=o((function(){s(1)})),c=!a||l;i({target:"Object",stat:!0,forced:c,sham:!a},{getOwnPropertyDescriptor:function(e,t){return s(r(e),t)}})},"7f82":function(e,t,n){var i=n("e244"),o=n("58d1"),r=n("eee7"),s=n("0b38"),a=n("762a"),l=n("f10c"),c=n("1810"),h=i.TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!r(e)||s(e))return e;var n,i=a(e,u);if(i){if(void 0===t&&(t="default"),n=o(i,e,t),!r(n)||s(n))return n;throw h("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},8120:function(e,t,n){"use strict";var i=n("83ec"),o=n("3395").trim,r=n("c55c");i({target:"String",proto:!0,forced:r("trim")},{trim:function(){return o(this)}})},"81bb":function(e,t,n){"use strict";var i=n("7299"),o=i.domify,r=i.classes,s=i.event,a=n("4580"),l=a.TOGGLE_MODE_EVENT,c=a.PLAY_SIMULATION_EVENT,h=a.PAUSE_SIMULATION_EVENT,u=a.RESET_SIMULATION_EVENT,d=a.ANIMATION_CREATED_EVENT,p=a.PROCESS_INSTANCE_CREATED_EVENT,f='<i class="fa fa-play"></i>',g='<i class="fa fa-pause"></i>';function m(e,t,n,i,o){var r=this;this._eventBus=e,this._tokenSimulationPalette=t,this._notifications=n,this._translate=o,this.canvasParent=i.getContainer().parentNode,this.isActive=!1,this.isPaused=!1,this._init(),e.on(p,(function(e){var t=e.parent;t.parent||(r.activate(),r.unpause(),n.showNotification("Start Simulation","info"))})),e.on([u,l],(function(){r.deactivate(),r.unpause()})),e.on(d,(function(e){var t=e.animation;r.isPaused&&t.pause()}))}m.prototype._init=function(){this.paletteEntry=o('<div class="entry disabled" title="'.concat(this._translate("Play/Pause Simulation"),'">')+f+"</div>"),s.bind(this.paletteEntry,"click",this.toggle.bind(this)),this._tokenSimulationPalette.addEntry(this.paletteEntry,1)},m.prototype.toggle=function(){this.isActive&&(this.isPaused?this.unpause():this.pause())},m.prototype.pause=function(){this.isActive&&(r(this.paletteEntry).remove("active"),r(this.canvasParent).add("paused"),this.paletteEntry.innerHTML=f,this._eventBus.fire(h),this._notifications.showNotification(this._translate("Pause Simulation"),"info"),this.isPaused=!0)},m.prototype.unpause=function(){this.isActive&&(r(this.paletteEntry).add("active"),r(this.canvasParent).remove("paused"),this.paletteEntry.innerHTML=g,this._eventBus.fire(c),this._notifications.showNotification(this._translate("Play Simulation"),"info"),this.isPaused=!1)},m.prototype.activate=function(){this.isActive=!0,r(this.paletteEntry).remove("disabled")},m.prototype.deactivate=function(){this.isActive=!1,r(this.paletteEntry).remove("active"),r(this.paletteEntry).add("disabled")},m.$inject=["eventBus","tokenSimulationPalette","notifications","canvas","translate"],e.exports=m},"81e5":function(e,t,n){var i=n("6f9e");e.exports=i({}.isPrototypeOf)},"82a4":function(e,t){var n=Function.prototype,i=n.apply,o=n.bind,r=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?r.bind(i):function(){return r.apply(i,arguments)})},"839f":function(e,t,n){var i=n("83ec"),o=n("ac97"),r=n("c673"),s=n("a7f7"),a=n("4467"),l=o((function(){s(1)}));i({target:"Object",stat:!0,forced:l,sham:!a},{getPrototypeOf:function(e){return s(r(e))}})},"83ec":function(e,t,n){var i=n("e244"),o=n("42b1").f,r=n("69f1"),s=n("7d86"),a=n("72c7"),l=n("8c42"),c=n("a056");e.exports=function(e,t){var n,h,u,d,p,f,g=e.target,m=e.global,b=e.stat;if(h=m?i:b?i[g]||a(g,{}):(i[g]||{}).prototype,h)for(u in t){if(p=t[u],e.noTargetGet?(f=o(h,u),d=f&&f.value):d=h[u],n=c(m?u:g+(b?".":"#")+u,e.forced),!n&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&r(p,"sham",!0),s(h,u,p,e)}}},8410:function(e,t,n){var i=n("55ab"),o=n("6f9e"),r=n("3e1a"),s=n("45ad"),a=n("11b0").f,l=o(a),c=o([].push),h=function(e){return function(t){var n,o=s(t),a=r(o),h=a.length,u=0,d=[];while(h>u)n=a[u++],i&&!l(o,n)||c(d,e?[n,o[n]]:o[n]);return d}};e.exports={entries:h(!0),values:h(!1)}},"84f7":function(e,t,n){var i=n("55ab"),o=n("32a5").EXISTS,r=n("6f9e"),s=n("b896").f,a=Function.prototype,l=r(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,h=r(c.exec),u="name";i&&!o&&s(a,u,{configurable:!0,get:function(){try{return h(c,l(this))[1]}catch(e){return""}}})},"863c":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n("ef61"),n("c225"),n("37fd"),n("7e50"),n("f96e"),n("2c69");var i=n("6d21");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(i["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},"88cb":function(e,t,n){var i=n("1ffd");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("3237f5a0",i,!0,{sourceMap:!1,shadowMode:!1})},"8aa3":function(e,t,n){var i=n("d6ed"),o=n("6f9e"),r=n("b4fd"),s=n("c673"),a=n("7c08"),l=n("f152"),c=o([].push),h=function(e){var t=1==e,n=2==e,o=3==e,h=4==e,u=6==e,d=7==e,p=5==e||u;return function(f,g,m,b){for(var v,y,w=s(f),_=r(w),C=i(g,m),A=a(_),E=0,x=b||l,S=t?x(f,A):n||d?x(f,0):void 0;A>E;E++)if((p||E in _)&&(v=_[E],y=C(v,E,w),e))if(t)S[E]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return E;case 2:c(S,v)}else switch(e){case 4:return!1;case 7:c(S,v)}return u?-1:o||h?h:S}};e.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterReject:h(7)}},"8bbf":function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__8bbf__},"8c32":function(e,t,n){var i=n("e09a");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("130c92b9",i,!0,{sourceMap:!1,shadowMode:!1})},"8c42":function(e,t,n){var i=n("0b05"),o=n("c1ca"),r=n("42b1"),s=n("b896");e.exports=function(e,t){for(var n=o(t),a=s.f,l=r.f,c=0;c<n.length;c++){var h=n[c];i(e,h)||a(e,h,l(t,h))}}},"8d60":function(e,t,n){"use strict";var i=n("83ec"),o=n("8aa3").map,r=n("72d4"),s=r("map");i({target:"Array",proto:!0,forced:!s},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},"8dab":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter{display:flex;align-items:center;position:absolute;border-radius:2px;padding:0 3px;max-width:calc(100% - 10px);text-overflow:ellipsis;overflow:hidden;text-align:right;box-sizing:border-box;cursor:all-scroll;font-size:13px;line-height:18px;height:20px;z-index:1;top:4px}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{display:flex;align-items:center;box-sizing:border-box;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{border:none;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;background:none;width:16px;height:16px;flex-shrink:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:-webkit-grab;cursor:grab}.monaco-list-type-filter.dragging{cursor:-webkit-grabbing;cursor:grabbing}",""]),e.exports=t},"8dcc":function(e,t,n){var i=n("e244"),o=i.String;e.exports=function(e){try{return o(e)}catch(t){return"Object"}}},"8e1c":function(e,t,n){e.exports=n("996b")},"8e6b":function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf"),o=i.is,r=n("4580"),s=r.CONSUME_TOKEN_EVENT,a=r.UPDATE_ELEMENT_EVENT,l=r.UPDATE_ELEMENTS_EVENT;function c(e,t,n){this._animation=e,this._eventBus=t,this._elementRegistry=n}c.prototype.consume=function(e){var t=e.element,n=e.processInstanceId;t.tokenCount||(t.tokenCount={}),t.tokenCount[n]||(t.tokenCount[n]=0),t.tokenCount[n]++,this._eventBus.fire(a,{element:t})},c.prototype.generate=function(e){var t=this,n=e.element,i=e.processInstanceId,r=n.outgoing.filter((function(e){return o(e,"bpmn:SequenceFlow")}));r.forEach((function(e){t._animation.createAnimation(e,i,(function(){t._eventBus.fire(s,{element:e.target,processInstanceId:i})}))}));var a=n.parent,c=this._elementRegistry.filter((function(e){return o(e,"bpmn:IntermediateCatchEvent")&&e.parent===a}));this._eventBus.fire(l,{elements:c})},c.$inject=["animation","eventBus","elementRegistry"],e.exports=c},"8fed":function(e,t,n){var i=n("2c21"),o=n("ac97");e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},9224:function(e){e.exports=JSON.parse('{"name":"@sscfaith/nutflow","version":"1.3.3","author":{"name":"ssc","email":"273702440@qq.com"},"main":"lib/index.umd.min.js","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build","build:lib":"vue-cli-service build --target lib --name WfDesign --dest lib --filename index --formats umd-min ./packages/index.js","lint":"vue-cli-service lint"},"dependencies":{"bpmn-js":"^8.8.3","bpmnlint":"^7.3.0","deepmerge":"^4.2.2","element-ui":"^2.15.6","monaco-editor":"^0.29.1","svg.js":"^2.7.1"},"devDependencies":{"@sscfaith/avue-form-design":"^1.4.8","@vue/cli-plugin-babel":"^4.5.15","@vue/cli-plugin-eslint":"^4.5.15","@vue/cli-service":"^4.5.15","avue-plugin-ueditor":"^0.2.3","babel-eslint":"^10.1.0","babel-plugin-import":"^1.13.3","core-js":"^3.19.2","eslint":"^7.32.0","eslint-plugin-vue":"^7.20.0","sass":"^1.44.0","sass-loader":"^7.3.1","vue":"^2.6.14","vue-i18n":"^8.26.7","vue-template-compiler":"^2.6.14"},"eslintConfig":{"root":true,"env":{"node":true},"extends":["plugin:vue/essential","eslint:recommended"],"parserOptions":{"parser":"babel-eslint"},"rules":{"no-debugger":"off","no-console":"off","no-unused-vars":"off","no-mutating-props":"off"}},"browserslist":["> 1%","last 2 versions","not dead"],"files":["lib"],"keywords":["vue","element-ui","bpmn","bpmn.js","flow","flowable","activiti","camunda"]}')},"92af":function(e,t,n){"use strict";n.d(t,"b",(function(){return w}));n("839f"),n("2eb0"),n("7352");var i={wf:{lang:"zh",panel:{process:{tab:"流程配置",basic:{label:"基本配置",key:"流程key",name:"流程名称",description:"流程描述",skipFirstNode:"跳过第一节点",rollbackNode:{label:"默认驳回节点",placeholder:"不选择默认驳回到上一节点"}},sn:{label:"流水号配置",configure:"配置",format:"流水号格式",name:"名称",prefix:"前缀",dateFormat:"日期格式",suffixLength:"后缀位数",initialValue:"初始数值",connector:"连接符",resetCycle:{label:"重置周期",dicData:[{label:"不重置",value:"none"},{label:"按天重置",value:"day"},{label:"按周重置",value:"week"},{label:"按月重置",value:"month"},{label:"按年重置",value:"year"}]}}},node:{tab:"节点配置",message:"选择节点后配置",basic:{title:"基本配置",id:"节点id",name:"节点名称",text:"注解内容",description:"节点描述",rollbackNode:{label:"驳回节点",placeholder:"不选择默认使用流程配置",backToRejecter:"重新提交后回到驳回人",backToRejecterText:"假如D驳回到A,A重新发起时直接到D,跳过B、C"}},assignee:{title:"人员配置",v1:{assignee:"处理人",candidateUsers:"候选用户",candidateGroups:"候选组",title:"人员选择",unselected:"未选择",selected:"已选择",message:"请至少选择一项"},v2:{configure:"人员配置",type:"类型",value:"值",typeDic:{user:"用户",role:"角色",dept:"部门",post:"职位",custom:"自定义"},typeList:[{label:"用户",value:"user"},{label:"角色",value:"role"},{label:"部门",value:"dept"},{label:"职位",value:"post"},{label:"自定义",value:"custom"}],customRemark:"请确保选择/填写的选项已实现相关逻辑",title:"人员选择",cancel:"取 消",submit:"确 定",user:{avatar:"头像",name:"姓名",dept:"部门",post:"职位"},message:"请至少选择一项"}},button:{title:"按钮配置",label:"字段",prop:"属性",display:"是否显示"},condition:{title:"流转条件",conditionExpression:"流转条件"},examine:{hideAttachment:"隐藏审批附件",hideCopy:"隐藏选择抄送人",copyUser:"默认抄送人",hideAssignee:"隐藏选择审核人"},form:{title:"表单配置",exFormKey:"表单key",exFormUrl:"表单路由",router:"路由",remark:{r1:"发起流程会自动匹配",r2:"查看详情会自动匹配",r3:"请拷贝模版页面或参考demo项目实现自己的逻辑",r4:"会动态添加路由,无需配置。已知小问题:框架限制,刷新404",r5:"若配置此项,表单key的自动匹配路由将失效",r6:"请自行配置相应路由",r7:"移动端会自动匹配"},exAppFormUrl:"移动端路由",label:"字段",prop:"属性",readable:"可读",writable:"可写",unknown:"未知表单配置,请自行控制字段显隐等属性。"},listener:{taskTitle:"任务监听",executionTitle:"执行监听",add:"添加",edit:"编辑",delete:"删除",event:"事件",type:"类型",value:"值",operations:"操作",submit:"确定",listenerType:{class:"类",expression:"表达式",delegateExpression:"代理表达式"},message:"确定要删除吗",warning:"警告",name:"名称"},multiInstance:{title:"多实例配置",type:"类型",parallel:"并行",sequential:"串行",completionCondition:"完成条件"},event:{title:"事件配置",isInterrupting:"是否中断",condition:"表达式",activityRef:"活动引用",errorRef:"错误引用",escalationRef:"升级引用",messageRef:"消息引用",signalRef:"信号引用",terminateAll:"全部终止",timer:{timeCycle:"时间周期",timeDate:"时间日期",timeDuration:"持续时间"}},call:{title:"调用活动",calledElement:"子流程key",inheritVariables:"继承变量",sameDeployment:"同一部署"}}},toolbar:{open:"打开",create:"新建",fit:"自适应屏幕",zoomIn:"放大",zoomOut:"缩小",undo:"后退",redo:"前进",download:"下载",downloadXml:"下载XML",downloadSvg:"下载SVG",importXml:"导入XML",previewXml:"查看XML",getXml:"获取XML"},config:{title:"组件配置",lang:{label:"国际化",chinese:"中文",english:"英文"},mode:{label:"展示模式",design:"设计模式",view:"预览模式"},engine:{label:"流程引擎",flowable:"Flowable",camunda:"Camunda",activiti:"Activiti"},form:{label:"表单配置",configure:"配置",remark:"组件可接收avue-form的配置,其他不支持",title:"表单配置",submit:"确定"},button:{label:"按钮配置",configure:"配置",cancel:"收起",option:{page:!1,align:"center",column:[{label:"名称",prop:"label"},{label:"属性",prop:"prop"},{label:"默认是否显示",prop:"display",type:"select",dicData:[{label:"是",value:!0},{label:"否",value:!1}]}]}},user:{label:"人员配置方式"},lint:{label:"模型校验"},toolbar:{label:"顶部工具栏",checkAll:"全选",list:[{label:"打开",value:"open"},{label:"新建",value:"create"},{label:"自适应屏幕",value:"fit"},{label:"放大",value:"zoom-in"},{label:"缩小",value:"zoom-out"},{label:"后退",value:"undo"},{label:"前进",value:"redo"},{label:"导入XML",value:"import"},{label:"查看XML",value:"preview"},{label:"获取XML",value:"get"},{label:"下载XML",value:"download-xml"},{label:"下载SVG",value:"download-svg"}]},highlight:{label:"高亮节点",node:"节点",line:"连线",nodeId:"节点id",nodeClass:"节点样式",tooltip:"Tooltip",classes:[{label:"节点 - success",value:"nodeSuccess"},{label:"节点 - warn",value:"nodeWarn"},{label:"节点 - error",value:"nodeError"},{label:"连线 - success",value:"lineSuccess"},{label:"连线 - warn",value:"lineWarn"},{label:"连线 - error",value:"lineError"}]},minimap:"Minimap",simulation:"流程模拟",message:{copySuccess:"复制成功"}}}},o={wf:{lang:"en",panel:{process:{tab:"Process",basic:{label:"Basic",key:"Key",name:"Name",description:"Description",skipFirstNode:"Skip first node",rollbackNode:{label:"Default rejection node",placeholder:"Default reject to the previous node"}},sn:{label:"Serial Number",configure:"Configuration",format:"SN Format",name:"Name",prefix:"Prefix",dateFormat:"Date Format",suffixLength:"Suffix Digits",initialValue:"Initial Value",connector:"Connector",resetCycle:{label:"Reset Period",dicData:[{label:"Do not reset",value:"none"},{label:"Reset By Day",value:"day"},{label:"Reset By Week",value:"week"},{label:"Reset By Month",value:"month"},{label:"Reset By Year",value:"year"}]}}},node:{tab:"Node",message:"Configure after node selection",basic:{title:"Basic",id:"ID",name:"Name",text:"Annotation",description:"Description",rollbackNode:{label:"Rejection node",placeholder:"Default use process option",backToRejecter:"Back to rejecter",backToRejecterText:"假如D驳回到A,A重新发起时直接到D,跳过B、C"}},assignee:{title:"Staffing",v1:{assignee:"Assignee",candidateUsers:"Candidate Users",candidateGroups:"Candidate Groups",title:"Personnel Selection",unselected:"Not selected",selected:"Selected",message:"Please select at least one item"},v2:{configure:"Staffing",type:"Type",value:"Value",typeDic:{user:"User",role:"Role",dept:"Dept.",post:"Position",custom:"Customize"},typeList:[{label:"User",value:"user"},{label:"Role",value:"role"},{label:"Dept.",value:"dept"},{label:"Post",value:"post"},{label:"Custom",value:"custom"}],customRemark:"Please make sure that the selected/filled option has implemented the relevant logic",title:"Personnel Selection",cancel:"Cancel",submit:"Confirm",user:{avatar:"Avatar",name:"Name",dept:"Dept.",post:"Post"},message:"Please select at least one item"}},button:{title:"Button",label:"Field",prop:"Attribute",display:"Display"},condition:{title:"Conditions",conditionExpression:"Circulation Conditions"},examine:{hideAttachment:"Hide attachment",hideCopy:"Hide selected cc",copyUser:"Default copy user",hideAssignee:"Hide assignee"},form:{title:"Form",exFormKey:"Form Key",exFormUrl:"Form Routing",router:"Routing",remark:{r1:"The initiation process will automatically match",r2:"View details will automatically match",r3:"Please copy the template page or refer to the demo project to implement your own logic",r4:"Routes are added dynamically without configuration. Known small problem: frame limit, refresh 404",r5:"If this item is configured, the automatic matching route of form key will be invalid",r6:"Please configure the corresponding route by yourself",r7:"The App will automatically match"},exAppFormUrl:"App Form Routing",label:"Field",prop:"Attribute",readable:"Readable",writable:"Writable",unknown:"Unknown form configuration, please control the field display and hidden attributes yourself"},listener:{taskTitle:"Task Listener",executionTitle:"Execution Listener",add:"Add",edit:"Edit",delete:"Delete",event:"Event",type:"Class",value:"Value",operations:"Operation",submit:"Confirm",listenerType:{class:"Class",expression:"Expression",delegateExpression:"Delegate Expression"},message:"Are you sure you want to delete?",warning:"Warning",name:"Name"},multiInstance:{title:"Multi-instance",type:"Type",parallel:"Parallel",sequential:"Serial",completionCondition:"Completion Conditions"},event:{title:"Event",isInterrupting:"Is Interrupting",condition:"Condition",activityRef:"Activity Ref",errorRef:"Error Ref",escalationRef:"Escalation Ref",messageRef:"Message Ref",signalRef:"Signal Ref",terminateAll:"Terminate All",timer:{timeCycle:"Time Cycle",timeDate:"Time Date",timeDuration:"Time Duration"}},call:{title:"Call Activity",calledElement:"Call Element",inheritVariables:"Inherit Variables",sameDeployment:"Same Deployment"}}},toolbar:{open:"Open",create:"New",fit:"Adaptive Screen",zoomIn:"Enlarge",zoomOut:"Minify",undo:"Back",redo:"Forward",download:"Download",downloadXml:"Download XML",downloadSvg:"Download SVG",importXml:"Import XML",previewXml:"View XML",getXml:"Obtain XML"},config:{title:"Component Configuration",lang:{label:"Language",chinese:"Chinese",english:"English"},mode:{label:"Mode",design:"Design Mode",view:"Preview Mode"},engine:{label:"Engine",flowable:"Flowable",camunda:"Camunda",activiti:"Activiti"},form:{label:"Form",configure:"Configuration",remark:"Support avue-form's option only",title:"Form Configuration",submit:"Confirm"},button:{label:"Button",configure:"Configuration",cancel:"Put Away",option:{page:!1,align:"center",column:[{label:"Name",prop:"label"},{label:"Attribute",prop:"prop"},{label:"Display",prop:"display",type:"select",dicData:[{label:"Yes",value:!0},{label:"No",value:!1}]}]}},user:{label:"User"},lint:{label:"Lint"},toolbar:{label:"Toolbar",checkAll:"Check All",list:[{label:"Open",value:"open"},{label:"New",value:"create"},{label:"Adaptive Screen",value:"fit"},{label:"Enlarge",value:"zoom-in"},{label:"Minify",value:"zoom-out"},{label:"Back",value:"undo"},{label:"Forward",value:"redo"},{label:"Import XML",value:"import"},{label:"View XML",value:"preview"},{label:"Obtain XML",value:"get"},{label:"Download XML",value:"download-xml"},{label:"Download SVG",value:"download-svg"}]},highlight:{label:"Highlight",node:"Node",line:"Connection",nodeId:"Node ID",nodeClass:"Node Style",tooltip:"Tooltip",classes:[{label:"Node - success",value:"nodeSuccess"},{label:"Node - warn",value:"nodeWarn"},{label:"Node - error",value:"nodeError"},{label:"Line - success",value:"lineSuccess"},{label:"Line - warn",value:"lineWarn"},{label:"Line - error",value:"lineError"}]},minimap:"Minimap",simulation:"Simulation",message:{copySuccess:"Copy succeeded"}}}},r=n("0c5e"),s=n.n(r);n("c225"),n("02de"),n("fa89"),n("40cd"),n("e2da"),n("a078"),n("95d1");function a(e){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}n("a8de");var l=n("8bbf"),c=n.n(l);let h=e=>{var t={};return e&&"[object Function]"===t.toString.call(e)};"object"===typeof Int8Array||!c.a.prototype.$isServer&&"function"===typeof document.childNodes||(h=function(e){return"function"===typeof e||!1});const u=Object.prototype.hasOwnProperty;function d(e,t){return u.call(e,t)}var p=/(%|)\{([0-9a-zA-Z_]+)\}/g,f=function(e){function t(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return"string"!=typeof e?e:(1===n.length&&"object"===a(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(p,(function(t,i,o,r){var s;return"{"===e[r-1]&&"}"===e[r+t.length]?o:(s=d(n,o)?n[o]:null,null===s||void 0===s?"":s)})))}return t},g=window.Vue,m=f(g),b=i,v=!1,y=function(){var e=Object.getPrototypeOf(this||g||{}).$t;if("function"===typeof e&&(g||{}).locale)return v||(v=!0,g.locale(g.config.lang,s()(b,g.locale(g.config.lang)||{},{clone:!0}))),e.apply(this,arguments)},w=function(e,t){var n=y.apply(this,arguments);if(null!==n&&void 0!==n)return n;for(var i=e.split("."),o=b,r=0,s=i.length;r<s;r++){var a=i[r];if(n=o[a],r===s-1)return m(n,t);if(!n)return"";o=n}return""},_={zh:i,en:o},C=function(e){b=_[e]||_["zh"]},A=function(e){y=e||y};t["a"]={use:C,t:w,i18n:A,locale:_}},9368:function(e,t,n){var i=n("3c82");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("09a41916",i,!0,{sourceMap:!1,shadowMode:!1})},9508:function(e,t,n){var i=n("1810"),o=i("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(i){}}return!1}},9545:function(e,t,n){e.exports=n.p+"fonts/bpmn.f922519e.ttf"},9550:function(e,t,n){var i=n("6f9e"),o=n("9564"),r=n("2f6c"),s=i(Function.toString);o(r.inspectSource)||(r.inspectSource=function(e){return s(e)}),e.exports=r.inspectSource},9564:function(e,t){e.exports=function(e){return"function"==typeof e}},"95d1":function(e,t,n){var i=n("e244"),o=n("a909"),r=n("679c"),s=n("e2da"),a=n("69f1"),l=n("1810"),c=l("iterator"),h=l("toStringTag"),u=s.values,d=function(e,t){if(e){if(e[c]!==u)try{a(e,c,u)}catch(i){e[c]=u}if(e[h]||a(e,h,t),o[t])for(var n in s)if(e[n]!==s[n])try{a(e,n,s[n])}catch(i){e[n]=s[n]}}};for(var p in o)d(i[p]&&i[p].prototype,p);d(r,"DOMTokenList")},9692:function(e,t,n){e.exports=n("b81c")},"96cd":function(e,t,n){var i=n("6f9e");e.exports=i([].slice)},"977a":function(e,t,n){e.exports=n("6063")},"97d5":function(e,t,n){e.exports=n("81bb")},9812:function(e,t,n){e.exports=n.p+"fonts/bpmn.08b5f281.eot"},"986e":function(e,t,n){var i=n("f0db"),o=n("2f6c");(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.2",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"996b":function(e,t,n){"use strict";function i(e,t,n,i,o,r){r.register({toggleTokenSimulation:function(){t.toggleMode()}}),r.register({togglePauseTokenSimulation:function(){n.toggle()}}),r.register({resetTokenSimulation:function(){o.resetSimulation()}}),r.register({toggleTokenSimulationLog:function(){i.toggle()}})}i.$inject=["eventBus","toggleMode","pauseSimulation","log","resetSimulation","editorActions"],e.exports=i},"99ab":function(e,t,n){var i=n("83ec"),o=n("d362");i({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},"9bc5":function(e,t,n){var i=n("ac97"),o=n("eee7"),r=n("c401"),s=n("eb4a"),a=Object.isExtensible,l=i((function(){a(1)}));e.exports=l||s?function(e){return!!o(e)&&((!s||"ArrayBuffer"!=r(e))&&(!a||a(e)))}:a},"9bf1":function(e,t,n){"use strict";var i=n("83ec"),o=n("e244"),r=n("5a43"),s=n("fc4e"),a=n("eee7"),l=n("3352"),c=n("7c08"),h=n("45ad"),u=n("acd4"),d=n("1810"),p=n("72d4"),f=n("96cd"),g=p("slice"),m=d("species"),b=o.Array,v=Math.max;i({target:"Array",proto:!0,forced:!g},{slice:function(e,t){var n,i,o,d=h(this),p=c(d),g=l(e,p),y=l(void 0===t?p:t,p);if(r(d)&&(n=d.constructor,s(n)&&(n===b||r(n.prototype))?n=void 0:a(n)&&(n=n[m],null===n&&(n=void 0)),n===b||void 0===n))return f(d,g,y);for(i=new(void 0===n?b:n)(v(y-g,0)),o=0;g<y;g++,o++)g in d&&u(i,o,d[g]);return i.length=o,i}})},"9c85":function(e,t,n){var i=n("eca0");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("07f8c3b0",i,!0,{sourceMap:!1,shadowMode:!1})},"9ce1":function(e,t,n){e.exports=n("efb0")},"9d65":function(e,t,n){"use strict";n("37fd");var i=n("7299"),o=i.domify,r=i.event;function s(e,t){this._processInstances=e,this._processInstanceSettings=t}s.prototype.createContextPads=function(e){var t=this,n=this._processInstances.getProcessInstances(e).filter((function(e){return!e.isFinished}));if(!(n.length<2)){var i=o('<div class="context-pad" title="View Process Instances"><i class="fa fa-list-ol"></i></div>');return r.bind(i,"click",(function(){t._processInstanceSettings.showNext(e)})),[{element:e,html:i}]}},s.$inject=["processInstances","processInstanceSettings"],e.exports=s},"9d6f":function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}",""]),e.exports=t},"9ea0":function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},a009:function(e,t,n){"use strict";n("f96e"),n("d4c0");var i=n("7299"),o=i.domify,r=i.classes,s=i.event,a=i.query,l=i.clear,c=n("4580"),h=c.TOGGLE_MODE_EVENT,u=c.PROCESS_INSTANCE_CREATED_EVENT,d=c.PROCESS_INSTANCE_FINISHED_EVENT,p=c.PROCESS_INSTANCE_SHOWN_EVENT,f=c.PROCESS_INSTANCE_HIDDEN_EVENT,g=c.RESET_SIMULATION_EVENT,m=getComputedStyle(document.documentElement).getPropertyValue("--token-simulation-silver-base-97"),b=getComputedStyle(document.documentElement).getPropertyValue("--token-simulation-green-base-44");function v(e){return null===e}function y(e,t,n,i,o,s){var a=this;this._eventBus=e,this._canvas=t,this._processInstanceSettings=n,this._processInstances=i,this._graphicsFactory=o,this._elementRegistry=s,this.highlightedElement=null,this._init(),e.on(h,(function(e){var t=e.simulationModeActive;t?r(a.container).remove("hidden"):(r(a.container).add("hidden"),l(a.container),v(a.highlightedElement)||(a.removeHighlightFromProcess(a.highlightedElement.element),a.highlightedElement=null))})),e.on(u,(function(e){a.addInstance(e)})),e.on(d,(function(e){a.removeInstance(e)})),e.on(p,(function(e){a.setInstanceShown(e.processInstanceId)})),e.on(f,(function(e){a.setInstanceHidden(e.processInstanceId)})),e.on(g,(function(){a.removeAllInstances()}))}y.prototype._init=function(){this.container=o('<div class="process-instances hidden"></div>'),this._canvas.getContainer().appendChild(this.container)},y.prototype.addInstance=function(e){var t=this,n=e.processInstanceId,i=e.parent,r=o('<div id="instance-'+n+'" class="process-instance" title="View Process Instance '+n+'">'+n+"</div>");s.bind(r,"click",(function(){var e=t._processInstances.getProcessInstances(i);e.forEach((function(e){t._processInstanceSettings.hideProcessInstance(e.processInstanceId)})),t._processInstanceSettings.showProcessInstance(n,i)})),s.bind(r,"mouseenter",(function(){t.highlightedElement={element:i,stroke:i.businessObject.di.get("stroke"),fill:i.businessObject.di.get("fill")},t.addHighlightToProcess(i)})),s.bind(r,"mouseleave",(function(){t.removeHighlightFromProcess(i),t.highlightedElement=null})),this.container.appendChild(r)},y.prototype.removeInstance=function(e){var t=e.processInstanceId,n=a("#instance-"+t,this.container);n&&n.remove()},y.prototype.removeAllInstances=function(){this.container.innerHTML=""},y.prototype.setInstanceShown=function(e){var t=a("#instance-"+e,this.container);t&&r(t).add("active")},y.prototype.setInstanceHidden=function(e){var t=a("#instance-"+e,this.container);t&&r(t).remove("active")},y.prototype.addHighlightToProcess=function(e){this.setColor(e,b,m),e.parent||r(this._canvas.getContainer()).add("highlight")},y.prototype.removeHighlightFromProcess=function(e){v(this.highlightedElement)||(this.setColor(e,this.highlightedElement.stroke,this.highlightedElement.fill),e.parent||r(this._canvas.getContainer()).remove("highlight"))},y.prototype.setColor=function(e,t,n){var i=e.businessObject;i.di.set("stroke",t),i.di.set("fill",n);var o=this._elementRegistry.getGraphics(e);this._graphicsFactory.update("connection",e,o)},y.$inject=["eventBus","canvas","processInstanceSettings","processInstances","graphicsFactory","elementRegistry"],e.exports=y},a056:function(e,t,n){var i=n("ac97"),o=n("9564"),r=/#|\.prototype\./,s=function(e,t){var n=l[a(e)];return n==h||n!=c&&(o(t)?i(t):!!t)},a=s.normalize=function(e){return String(e).replace(r,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",h=s.POLYFILL="P";e.exports=s},a078:function(e,t,n){"use strict";var i=n("4eaf").charAt,o=n("04c3"),r=n("35d6"),s=n("325d"),a="String Iterator",l=r.set,c=r.getterFor(a);s(String,"String",(function(e){l(this,{type:a,string:o(e),index:0})}),(function(){var e,t=c(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=i(n,o),t.index+=e.length,{value:e,done:!1})}))},a0c9:function(e,t,n){"use strict";e.exports=function(e,t){return t||(t={}),e=e&&e.__esModule?e.default:e,"string"!==typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},a0ff:function(e,t,n){var i=n("53c2"),o=n("da79");t=i(!1),t.i(o),t.push([e.i,':root{--token-simulation-green-base-44:#10d070;--token-simulation-grey-base-40:#666;--token-simulation-grey-darken-30:#212121;--token-simulation-grey-lighten-56:#909090;--token-simulation-red-base-62:#ff3d3d;--token-simulation-silver-base-97:#f8f8f8;--token-simulation-white:#fff}#canvas,body,html{margin:0;width:100%;height:100%;font-family:Arial,sans-serif}.bjs-container{border:4px solid transparent;box-sizing:border-box}.bjs-container.simulation{border-color:var(--token-simulation-green-base-44,#10d070)}.bjs-container.simulation.paused{border-color:var(--token-simulation-grey-base-40,#666)}.bjs-container.simulation.warning{border-color:var(--token-simulation-red-base-62,#ff3d3d)!important}.context-pad{cursor:pointer;background-color:var(--token-simulation-grey-lighten-56,#909090);border-radius:2px;margin:0;font-size:16px;color:var(--token-simulation-grey-darken-30,#212121);opacity:.5;transition:all .1s ease-in-out;width:30px;height:30px;display:flex;justify-content:center;align-items:center;box-sizing:border-box}.context-pad:not(.disabled):hover{width:40px;background-color:var(--token-simulation-green-base-44,#10d070);opacity:1;color:var(--token-simulation-white,#fff)}.context-pad.disabled{background-color:var(--token-simulation-silver-base-97,#f8f8f8);color:var(--token-simulation-grey-base-40,#666);pointer-events:none}.context-pad.hidden{display:none}.context-pad [class^=bpmn-icon-]:before,[class*=" bpmn-icon-"]:before{margin:0}.token .text{fill:var(--token-simulation-white,#fff);font-family:Arial,sans-serif}.token-count{background-color:#fafafa;border-radius:100%;width:25px;height:25px;line-height:25px;text-align:center;font-size:16px;color:var(--token-simulation-grey-darken-30,#212121);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-animation:jump 1s infinite;animation:jump 1s infinite;-webkit-animation-timing-function:ease;animation-timing-function:ease;position:relative;top:0}.token-count.waiting{color:var(--token-simulation-white,#fff);font-family:Arial,sans-serif;background-color:var(--token-simulation-green-base-44,#10d070)}@-webkit-keyframes jump{50%{top:5px}}@keyframes jump{50%{top:5px}}.notifications{position:absolute;bottom:20px;left:20px}.notifications .notification{border-radius:2px;padding:4px 8px;font-size:16px;color:var(--token-simulation-silver-base-97,#f8f8f8);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-top:4px;min-width:300px}.notifications .notification,.notifications .notification.info{background-color:var(--token-simulation-silver-base-97,#f8f8f8)}.notifications .notification.info{color:#000}.notifications .notification.success{background-color:var(--token-simulation-green-base-44,#10d070);color:var(--token-simulation-white,#fff)}.notifications .notification.warning{background-color:var(--token-simulation-red-base-62,#ff3d3d);color:var(--token-simulation-white,#fff)}.notifications .notification .icon{display:inline-flex;justify-content:center;margin-right:8px;min-width:20px}.notifications .notification .icon [class^=bpmn-icon-]:before,[class*=" bpmn-icon-"]:before{margin:0}.bjs-container.paused .play-pause.active,.element-notification{color:var(--token-simulation-silver-base-97,#f8f8f8);background-color:var(--token-simulation-silver-base-97,#f8f8f8)}.element-notification{border-radius:2px;height:30px;box-sizing:border-box;display:flex;justify-content:center;align-items:center;padding:0 6px 0 6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.element-notification .fa,.element-notification .text{margin:0 3px 0 3px}.element-notification .text{white-space:nowrap}.element-notification.success{background-color:var(--token-simulation-green-base-44,#10d070);color:var(--token-simulation-white,#fff)}.element-notification.warning{background-color:var(--token-simulation-red-base-62,#ff3d3d);color:var(--token-simulation-white,#fff)}.toggle-mode{cursor:pointer;position:absolute;top:20px;left:20px;background-color:var(--token-simulation-silver-base-97,#f8f8f8);border-radius:2px;padding:6px;font-size:16px;color:var(--token-simulation-grey-darken-30,#212121);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bjs-container.simulation .toggle-mode,.toggle-mode:hover{background-color:var(--token-simulation-green-base-44,#10d070);color:var(--token-simulation-white,#fff)}.bjs-container .djs-palette{border:none;top:60px}.bjs-container.simulation .djs-palette{display:none}.bjs-container.simulation .djs-bendpoint,.bjs-container.simulation .djs-outline,.bjs-container.simulation .djs-resizer,.bjs-container.simulation .djs-segment-dragger{display:none!important}.token-simulation-palette{position:absolute;top:60px;left:20px}.token-simulation-palette.hidden{display:none}.token-simulation-palette .entry{cursor:pointer;background-color:var(--token-simulation-silver-base-97,#f8f8f8);border-radius:2px;padding:6px 0;margin-bottom:6px;font-size:16px;color:var(--token-simulation-grey-darken-30,#212121);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;justify-content:center;align-items:center;width:30px;box-sizing:border-box;transition:all .1s ease}.token-simulation-palette .entry:last-child{margin-bottom:0}.token-simulation-palette .entry:not(.disabled):hover{width:40px}.token-simulation-palette .entry.active,.token-simulation-palette .entry:not(.disabled):hover{color:var(--token-simulation-white,#fff);background-color:var(--token-simulation-green-base-44,#10d070)}.token-simulation-palette .entry.disabled{pointer-events:none;color:var(--token-simulation-grey-base-40,#666)}.token-simulation-log{position:absolute;top:128px;bottom:20px;left:20px;right:20px;background-color:var(--token-simulation-silver-base-97,#f8f8f8);border-radius:2px;z-index:10000;overflow:hidden}.token-simulation-log.hidden{display:none}.token-simulation-log .header{background-color:var(--token-simulation-green-base-44,#10d070);padding:6px 8px;color:var(--token-simulation-white,#fff);height:30px;box-sizing:border-box;font-size:16px}.token-simulation-log .header .close{float:right;background:none;border:none;cursor:pointer;color:var(--token-simulation-white,#fff)}.token-simulation-log .header .fa-align-left{cursor:pointer}.token-simulation-log .content{position:absolute;overflow-y:auto;box-sizing:border-box;top:30px;bottom:0;left:0;right:0;padding:10px}.token-simulation-log .content .entry{font-size:16px;margin:0 0 6px 0;padding:6px;background:var(--token-simulation-white,#fff);border-radius:2px}.token-simulation-log .content .entry.success{background-color:var(--token-simulation-green-base-44,#10d070);color:var(--token-simulation-white,#fff)}.token-simulation-log .content .entry.success .date,.token-simulation-log .content .entry.warning .date{color:var(--token-simulation-silver-base-97,#f8f8f8)}.token-simulation-log .content .entry.warning{background-color:var(--token-simulation-red-base-62,#ff3d3d);color:var(--token-simulation-white,#fff)}.token-simulation-log .content .entry:last-child{margin:0}.token-simulation-log .content .entry .date{display:inline-block;margin-right:6px;min-width:120px;color:var(--token-simulation-grey-base-40,#666)}.token-simulation-log .content .entry .icon{display:inline-block;margin-right:6px;min-width:20px;text-align:center}.token-simulation-log .content .entry.placeholder.hidden{display:none}.process-instances{position:absolute;top:20px;left:190px;display:flex;flex-direction:row}.process-instances.hidden{display:none}.process-instances .process-instance{border-radius:100%;width:30px;height:30px;font-size:16px;line-height:30px;text-align:center;background-color:var(--token-simulation-silver-base-97,#f8f8f8);margin-right:10px;cursor:pointer}.process-instances .process-instance.active{background-color:var(--token-simulation-green-base-44,#10d070);color:var(--token-simulation-white,#fff)}.djs-container.highlight,.set-animation-speed{background-color:var(--token-simulation-silver-base-97,#f8f8f8)}.set-animation-speed{position:absolute;bottom:20px;left:50%;transform:translate(-50%);font-size:16px;text-align:center;border-radius:2px;cursor:pointer;display:flex;flex-direction:row;align-items:center;padding-left:6px;overflow:hidden}.set-animation-speed .fa-tachometer{margin-bottom:2px}.set-animation-speed.hidden{display:none}.set-animation-speed .animation-speed-buttons{display:flex;flex-direction:row;margin-left:6px}.set-animation-speed .animation-speed-buttons .animation-speed-button{padding:6px;width:30px}.set-animation-speed .animation-speed-buttons .animation-speed-button.active,.set-animation-speed .animation-speed-buttons .animation-speed-button:hover{background-color:var(--token-simulation-green-base-44,#10d070);color:var(--token-simulation-white,#fff)}',""]),e.exports=t},a133:function(e,t,n){var i=n("e244"),o=n("5a43"),r=n("fc4e"),s=n("eee7"),a=n("1810"),l=a("species"),c=i.Array;e.exports=function(e){var t;return o(e)&&(t=e.constructor,r(t)&&(t===c||o(t.prototype))?t=void 0:s(t)&&(t=t[l],null===t&&(t=void 0))),void 0===t?c:t}},a23c:function(e,t,n){var i=n("e263");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("152b2786",i,!0,{sourceMap:!1,shadowMode:!1})},a2ce:function(e,t,n){var i=n("286b");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("02d3f686",i,!0,{sourceMap:!1,shadowMode:!1})},a2e5:function(e,t,n){var i=n("3f13");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("175f4c4c",i,!0,{sourceMap:!1,shadowMode:!1})},a452:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".bjsl-overlay{z-index:500}.bjsl-overlay:hover{z-index:1000}.bjsl-dropdown{display:none}.bjsl-dropdown.open,.bjsl-overlay:hover .bjsl-dropdown{display:block}.bjsl-issues{padding:8px;color:#444;font-family:Arial,sans-serif;font-size:12px;background:#fafafa;border:1px solid #ccc;border-radius:2px}.bjsl-icon{background:#fff;border-radius:100%;display:inline-block;height:20px;line-height:23px;text-align:center;width:20px}.bjsl-icon-error{background-color:#c30;color:#fff}.bjsl-icon-warning{background-color:#f7c71a;color:#fff}.bjsl-overlay{position:relative}.bjsl-issues-bottom-right .bjsl-dropdown-content,.bjsl-issues-top-right .bjsl-dropdown{top:0;left:0}.bjsl-issues-bottom-right .bjsl-dropdown,.bjsl-issues-top-right .bjsl-dropdown-content{bottom:0;left:0}.bjsl-issues-top-right .bjsl-dropdown-content{padding-bottom:5px}.bjsl-issues-bottom-right .bjsl-dropdown-content{padding-top:5px}.bjsl-dropdown-content{min-width:260px;position:absolute;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.bjsl-dropdown{position:absolute}.bjsl-issues,.bjsl-issues ul{list-style:none;margin:0}.bjsl-issues ul{padding:0}.bjsl-issues li{display:flex;flex-direction:row}.bjsl-issues li:not(:first-child){margin-top:7px}.bjsl-issues .error svg{color:#c30}.bjsl-issues .warning svg{color:#f7c71a}.bjsl-issues a{color:#444;margin-left:8px}.bjsl-issues a,.bjsl-issues a:hover{text-decoration:none}.bjsl-button{border-radius:100px;position:absolute;bottom:20px;left:50%;transform:translate(-50%);background-color:#fafafa;padding:5px 10px;border:none;color:#ddd;display:flex;align-items:center;outline:none;font-weight:700}.bjsl-button-inactive:hover{color:#444}.bjsl-button svg{margin-top:-1px;margin-right:10px}.bjsl-button-success{background-color:#52b415;color:#fff}.bjsl-button-error{background-color:#c30;color:#fff}.bjsl-button-warning{background-color:#f7c71a;color:#fff}",""]),e.exports=t},a458:function(e,t,n){var i=n("83ec"),o=n("6f9e"),r=n("fd3f"),s=n("eee7"),a=n("0b05"),l=n("b896").f,c=n("f0f1"),h=n("bf1d"),u=n("9bc5"),d=n("76b2"),p=n("6483"),f=!1,g=d("meta"),m=0,b=function(e){l(e,g,{value:{objectID:"O"+m++,weakData:{}}})},v=function(e,t){if(!s(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,g)){if(!u(e))return"F";if(!t)return"E";b(e)}return e[g].objectID},y=function(e,t){if(!a(e,g)){if(!u(e))return!0;if(!t)return!1;b(e)}return e[g].weakData},w=function(e){return p&&f&&u(e)&&!a(e,g)&&b(e),e},_=function(){C.enable=function(){},f=!0;var e=c.f,t=o([].splice),n={};n[g]=1,e(n).length&&(c.f=function(n){for(var i=e(n),o=0,r=i.length;o<r;o++)if(i[o]===g){t(i,o,1);break}return i},i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:h.f}))},C=e.exports={enable:_,fastKey:v,getWeakData:y,onFreeze:w};r[g]=!0},a52d:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}",""]),e.exports=t},a53d:function(e,t,n){var i=n("1810"),o=n("d85b"),r=i("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[r]===e)}},a55b:function(e,t,n){var i=n("fbcf"),o=n("4e6a"),r=n("1810"),s=r("species");e.exports=function(e,t){var n,r=i(e).constructor;return void 0===r||void 0==(n=i(r)[s])?t:o(n)}},a57d:function(e,t,n){"use strict";n("f96e");var i=n("7299"),o=i.domify,r=n("fbdf"),s=r.isAncestor,a=n("4580"),l=a.TOGGLE_MODE_EVENT,c=a.GENERATE_TOKEN_EVENT,h=a.CONSUME_TOKEN_EVENT,u=a.RESET_SIMULATION_EVENT,d=a.TERMINATE_EVENT,p=a.PROCESS_INSTANCE_SHOWN_EVENT,f=10,g=-15,m=500;function b(e,t,n,i,o){var r=this;this._overlays=t,this._elementRegistry=n,this._canvas=i,this._processInstances=o,this.overlayIds={},e.on(l,(function(e){var t=e.simulationModeActive;t||r.removeTokenCounts()})),e.on(u,(function(){r.removeTokenCounts()})),e.on(d,(function(e){var t=e.element,n=t.parent;r.removeTokenCounts(n)})),e.on([c,h],m,(function(e){var t=e.element,n=t.parent;r.removeTokenCounts(n),r.addTokenCounts(n)})),e.on(p,(function(e){var t=e.processInstanceId,n=o.getProcessInstance(t),i=n.parent;r.removeTokenCounts(i),r.addTokenCounts(i)}))}b.prototype.addTokenCounts=function(e){var t=this;e||(e=this._canvas.getRootElement());var n=e.shownProcessInstance;if(!n){var i=this._processInstances.getProcessInstances(e);if(!i.length)return;n=i[0].processInstanceId}this._elementRegistry.forEach((function(i){s(e,i)&&t.addTokenCount(i,n)}))},b.prototype.addTokenCount=function(e,t){var n=e.tokenCount&&e.tokenCount[t];if(n){var i=this.createTokenCount(n),o={bottom:f,left:g},r=this._overlays.add(e,"token-count",{position:o,html:i,show:{minZoom:.5}});this.overlayIds[e.id]=r}},b.prototype.createTokenCount=function(e){return o('<div class="token-count waiting">'+e+"</div>")},b.prototype.removeTokenCounts=function(e){var t=this;e||(e=this._canvas.getRootElement()),this._elementRegistry.forEach((function(n){s(e,n)&&t.removeTokenCount(n)}))},b.prototype.removeTokenCount=function(e){var t=this.overlayIds[e.id];t&&(this._overlays.remove(t),delete this.overlayIds[e.id])},b.$inject=["eventBus","overlays","elementRegistry","canvas","processInstances"],e.exports=b},a780:function(e,t,n){var i=n("6043");e.exports=i("document","documentElement")},a7f7:function(e,t,n){var i=n("e244"),o=n("0b05"),r=n("9564"),s=n("c673"),a=n("5350"),l=n("4467"),c=a("IE_PROTO"),h=i.Object,u=h.prototype;e.exports=l?h.getPrototypeOf:function(e){var t=s(e);if(o(t,c))return t[c];var n=t.constructor;return r(n)&&t instanceof n?n.prototype:t instanceof h?u:null}},a8de:function(e,t,n){"use strict";var i=n("82a4"),o=n("58d1"),r=n("6f9e"),s=n("e820"),a=n("ac97"),l=n("fbcf"),c=n("9564"),h=n("409e"),u=n("ce47"),d=n("04c3"),p=n("0874"),f=n("61c0"),g=n("762a"),m=n("c243"),b=n("ec23"),v=n("1810"),y=v("replace"),w=Math.max,_=Math.min,C=r([].concat),A=r([].push),E=r("".indexOf),x=r("".slice),S=function(e){return void 0===e?e:String(e)},k=function(){return"$0"==="a".replace(/./,"$0")}(),D=function(){return!!/./[y]&&""===/./[y]("a","$0")}(),L=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));s("replace",(function(e,t,n){var r=D?"$":"$0";return[function(e,n){var i=p(this),r=void 0==e?void 0:g(e,y);return r?o(r,e,i,n):o(t,d(i),e,n)},function(e,o){var s=l(this),a=d(e);if("string"==typeof o&&-1===E(o,r)&&-1===E(o,"$<")){var p=n(t,s,a,o);if(p.done)return p.value}var g=c(o);g||(o=d(o));var v=s.global;if(v){var y=s.unicode;s.lastIndex=0}var k=[];while(1){var D=b(s,a);if(null===D)break;if(A(k,D),!v)break;var L=d(D[0]);""===L&&(s.lastIndex=f(a,u(s.lastIndex),y))}for(var I="",N=0,M=0;M<k.length;M++){D=k[M];for(var B=d(D[0]),T=w(_(h(D.index),a.length),0),O=[],R=1;R<D.length;R++)A(O,S(D[R]));var P=D.groups;if(g){var F=C([B],O,T,a);void 0!==P&&A(F,P);var j=d(i(o,void 0,F))}else j=m(B,a,T,O,P,o);T>=N&&(I+=x(a,N,T)+j,N=T+B.length)}return I+x(a,N)}]}),!L||!k||D)},a909:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},a940:function(e,t,n){"use strict";n("f96e");var i=n("7299"),o=i.classes,r=n("fbdf"),s=r.is,a=r.supportedElements,l=n("4580"),c=l.TOGGLE_MODE_EVENT,h=l.GENERATE_TOKEN_EVENT,u=["bpmn:Process","bpmn:Collaboration","bpmn:Participant","bpmn:Lane","bpmn:TextAnnotation"];function d(e){return e.labelTarget}function p(e,t,n,i,r){var a=this;this._eventBus=e,this._elementRegistry=t,this._elementNotifications=r,this._notifications=i,this.canvasParent=n.getContainer().parentNode,e.on(h,2e4,(function(e){var t=e.element;if(s(t,"bpmn:StartEvent"))return a.allElementsSupported()?void 0:(a.showWarnings(),o(a.canvasParent).add("warning"),!0)})),e.on(c,(function(e){var t=e.simulationModeActive;t||o(a.canvasParent).remove("warning")}))}p.prototype.allElementsSupported=function(){var e=!0;return this._elementRegistry.forEach((function(t){s(t,u)||s(t,a)||d(t)||(e=!1)})),e},p.prototype.showWarnings=function(e){var t=this,n=[];this._elementRegistry.forEach((function(e){s(e,u)||s(e,a)||d(e)||(t.showWarning(e),n.indexOf(e.type)&&(t._notifications.showNotification(e.type+" not supported","warning"),n.push(e.type)))}))},p.prototype.showWarning=function(e){this._elementNotifications.addElementNotification(e,{type:"warning",icon:"fa-exclamation-triangle",text:"Not supported"})},p.$inject=["eventBus","elementRegistry","canvas","notifications","elementNotifications"],e.exports=p},aa28:function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("7299"),o=i.domify,r=i.event,s=n("fbdf").is,a=n("4580"),l=a.GENERATE_TOKEN_EVENT,c=a.UPDATE_ELEMENT_EVENT;function h(e,t,n){this._eventBus=e,this._processInstances=t,this._processInstanceSettings=n}h.prototype.createContextPads=function(e){if(e.attachers.length&&this._processInstances.getProcessInstances(e).length){var t=e.incoming.filter((function(e){return s(e,"bpmn:SequenceFlow")})),n=this,i=[];return e.attachers.forEach((function(a){var h=a.outgoing.filter((function(e){return s(e,"bpmn:SequenceFlow")}));if(t.length&&h.length){var u=o('<div class="context-pad" title="Trigger Event"><i class="fa fa-play"></i></div>');i.push({element:a,html:u}),r.bind(u,"click",(function(){n._processInstances.getProcessInstances(e).forEach((function(t){var i=t.parentProcessInstanceId;a.businessObject.cancelActivity&&(e.children.forEach((function(e){e.tokenCount&&e.tokenCount[t.processInstanceId]&&e.tokenCount[t.processInstanceId]--})),n._processInstances.finish(t.processInstanceId),n._eventBus.fire(c,{element:e})),n._eventBus.fire(l,{element:a,processInstanceId:i})}))}))}})),i}},h.$inject=["eventBus","processInstances","processInstanceSettings"],e.exports=h},ac97:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},aca4:function(e,t,n){var i=n("1810");t.f=i},acd4:function(e,t,n){"use strict";var i=n("6b7e"),o=n("b896"),r=n("4d82");e.exports=function(e,t,n){var s=i(t);s in e?o.f(e,s,r(0,n)):e[s]=n}},acff:function(e,t,n){var i=n("3ffb");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("2dbbf432",i,!0,{sourceMap:!1,shadowMode:!1})},ad2f:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}",""]),e.exports=t},adae:function(e,t,n){"use strict";var i=n("83ec"),o=n("8aa3").find,r=n("6e10"),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r(s)},adf0:function(e,t,n){var i=n("a52d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("fc7bcae8",i,!0,{sourceMap:!1,shadowMode:!1})},ae9d:function(e,t,n){e.exports=n("cf70")},aff1:function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf").is,o=n("4580"),r=o.CONSUME_TOKEN_EVENT,s=o.GENERATE_TOKEN_EVENT;function a(e,t){this._animation=e,this._eventBus=t}a.prototype.consume=function(e){this._eventBus.fire(s,{element:e})},a.prototype.generate=function(e){var t=this,n=e.outgoing.filter((function(e){return i(e,"bpmn:SequenceFlow")}));n.forEach((function(e){t._animation.createAnimation(e,(function(){t._eventBus.fire(r,{element:e.target})}))}))},a.$inject=["animation","eventBus"],e.exports=a},b012:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{box-sizing:border-box;background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}@-webkit-keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@-webkit-keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@-webkit-keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{-webkit-animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{-webkit-animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{-webkit-animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}",""]),e.exports=t},b027:function(e,t,n){e.exports=n.p+"fonts/bpmn.08b5f281.eot"},b042:function(e,t,n){var i=n("e4f5");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("3da601af",i,!0,{sourceMap:!1,shadowMode:!1})},b105:function(e,t,n){"use strict";var i=n("83ec"),o=n("8aa3").findIndex,r=n("6e10"),s="findIndex",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r(s)},b1ef:function(e,t,n){var i=n("6f9e");e.exports=i(1..valueOf)},b288:function(e,t,n){"use strict";n("f96e");var i=n("fbdf"),o=i.getBusinessObject,r=i.is,s=i.isAncestor,a=i.getDescendants,l=i.isTypedEvent,c=n("4580"),h=c.GENERATE_TOKEN_EVENT,u=c.TERMINATE_EVENT,d=c.UPDATE_ELEMENTS_EVENT;function p(e,t,n,i,o,r){this._animation=e,this._eventBus=t,this._log=n,this._simulationState=i,this._elementRegistry=o,this._processInstances=r}p.prototype.consume=function(e){var t=e.element,n=e.processInstanceId,i=l(o(t),"bpmn:TerminateEventDefinition"),c=r(t.parent,"bpmn:SubProcess");i&&(this._eventBus.fire(u,e),this._elementRegistry.forEach((function(e){s(t.parent,e)&&e.tokenCount&&e.tokenCount[n]&&delete e.tokenCount[n]})),this._processInstances.finish(n));var p=this._simulationState.isFinished(t,n);if(p&&this._processInstances.finish(n),(p||i)&&c){var f=this._processInstances.getProcessInstance(n);this._eventBus.fire(h,{element:t.parent,processInstanceId:f.parentProcessInstanceId})}this._eventBus.fire(d,{elements:a(this._elementRegistry.getAll(),t.parent)})},p.prototype.generate=function(e){},p.$inject=["animation","eventBus","log","simulationState","elementRegistry","processInstances"],e.exports=p},b400:function(e,t,n){var i=n("bba7");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("02378fc5",i,!0,{sourceMap:!1,shadowMode:!1})},b4fd:function(e,t,n){var i=n("e244"),o=n("6f9e"),r=n("ac97"),s=n("c401"),a=i.Object,l=o("".split);e.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==s(e)?l(e,""):a(e)}:a},b612:function(e,t,n){"use strict";n("f96e");var i=n("b288"),o=n("ffe9"),r=n("0317"),s=n("8e6b"),a=n("aff1"),l=n("643b"),c=n("339e"),h=n("2a35"),u=n("3433"),d=n("3990"),p=n("4580"),f=p.GENERATE_TOKEN_EVENT,g=p.CONSUME_TOKEN_EVENT;function m(e,t,n){var p=this;this._injector=n,this.handlers={},this.registerHandler("bpmn:EndEvent",i),this.registerHandler("bpmn:EventBasedGateway",o),this.registerHandler("bpmn:ExclusiveGateway",r),this.registerHandler("bpmn:IntermediateCatchEvent",s),this.registerHandler("bpmn:IntermediateThrowEvent",a),this.registerHandler("bpmn:ParallelGateway",l),this.registerHandler("bpmn:StartEvent",c),this.registerHandler("bpmn:SubProcess",h),this.registerHandler("bpmn:BoundaryEvent",u),this.registerHandler(["bpmn:BusinessRuleTask","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:Task","bpmn:UserTask"],d),e.on(f,(function(e){var t=e.element;if(!p.handlers[t.type])throw new Error("no handler for type "+t.type);p.handlers[t.type].generate(e)})),e.on(g,(function(e){var t=e.element;if(!p.handlers[t.type])throw new Error("no handler for type "+t.type);p.handlers[t.type].consume(e)}))}m.prototype.registerHandler=function(e,t){var n=this,i=this._injector.instantiate(t);Array.isArray(e)||(e=[e]),e.forEach((function(e){n.handlers[e]=i}))},m.$inject=["eventBus","animation","injector"],e.exports=m},b623:function(e,t,n){var i=n("e244"),o=n("9564"),r=n("8dcc"),s=i.TypeError;e.exports=function(e){if(o(e))return e;throw s(r(e)+" is not a function")}},b7dc:function(e,t,n){"use strict";var i=n("7299"),o=i.domify,r=i.classes,s=i.event,a=n("4580"),l=a.TOGGLE_MODE_EVENT;function c(e,t,n,i){var o=this;this._eventBus=e,this._canvas=t,this._translate=n,this.simulationModeActive=!1,e.on("import.done",(function(){o.canvasParent=o._canvas.getContainer().parentNode,o._init()}))}c.prototype._init=function(){this.container=o('\n <div class="toggle-mode">\n '.concat(this._translate("Token Simulation"),' <span class="toggle"><i class="fa fa-toggle-off"></i></span>\n </div>\n ')),s.bind(this.container,"click",this.toggleMode.bind(this)),this._canvas.getContainer().appendChild(this.container)},c.prototype.toggleMode=function(){this.simulationModeActive?(this.container.innerHTML="".concat(this._translate("Token Simulation"),' <span class="toggle"><i class="fa fa-toggle-off"></i></span>'),r(this.canvasParent).remove("simulation"),this._eventBus.fire(l,{simulationModeActive:!1})):(this.container.innerHTML="".concat(this._translate("Token Simulation"),' <span class="toggle"><i class="fa fa-toggle-on"></i></span>'),r(this.canvasParent).add("simulation"),this._eventBus.fire(l,{simulationModeActive:!0})),this.simulationModeActive=!this.simulationModeActive},c.$inject=["eventBus","canvas","translate"],e.exports=c},b81c:function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("4580"),o=i.TOGGLE_MODE_EVENT,r=i.PROCESS_INSTANCE_CREATED_EVENT,s=i.PROCESS_INSTANCE_FINISHED_EVENT,a=i.PROCESS_INSTANCE_SHOWN_EVENT,l=i.PROCESS_INSTANCE_HIDDEN_EVENT,c=500;function h(e,t,n,i){var a=this;this._animation=e,this._eventBus=t,this._processInstances=n,this._elementRegistry=i,this._eventBus.on(r,c,(function(e){var t=e.parent,i=e.processInstanceId,o=n.getProcessInstances(t).filter((function(e){return!e.isFinished}));1===o.length?a.showProcessInstance(i,t):o.length>1&&a.hideProcessInstance(i)})),this._eventBus.on(s,c,(function(e){var t=e.parent,o=e.processInstanceId,r=n.getProcessInstances(t).filter((function(e){return o!==e.processInstanceId&&!e.isFinished}));r.length&&o===t.shownProcessInstance?a.showProcessInstance(r[0].processInstanceId,t):delete t.shownProcessInstance,t.parent||i.forEach((function(e){delete e.shownProcessInstance}))})),t.on(o,(function(){i.forEach((function(e){delete e.shownProcessInstance}))}))}h.prototype.showProcessInstance=function(e,t){this._animation.showProcessInstanceAnimations(e),t.shownProcessInstance=e,this._eventBus.fire(a,{processInstanceId:e})},h.prototype.hideProcessInstance=function(e){this._animation.hideProcessInstanceAnimations(e),this._eventBus.fire(l,{processInstanceId:e})},h.prototype.showNext=function(e){for(var t=this,n=this._processInstances.getProcessInstances(e),i=e.shownProcessInstance,o=0,r=0;r<n.length;r++){if(n[r].processInstanceId===i)break;o++}n.forEach((function(e){t.hideProcessInstance(e.processInstanceId)})),o===n.length-1?this.showProcessInstance(n[0].processInstanceId,e):this.showProcessInstance(n[o+1].processInstanceId,e)},h.$inject=["animation","eventBus","processInstances","elementRegistry"],e.exports=h},b856:function(e,t,n){var i=n("b012");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("2d7da4a9",i,!0,{sourceMap:!1,shadowMode:!1})},b896:function(e,t,n){var i=n("e244"),o=n("55ab"),r=n("bf6f"),s=n("fbcf"),a=n("6b7e"),l=i.TypeError,c=Object.defineProperty;t.f=o?c:function(e,t,n){if(s(e),t=a(t),s(n),r)try{return c(e,t,n)}catch(i){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},b9bd:function(e,t,n){var i=n("83ec"),o=n("6483"),r=n("ac97"),s=n("eee7"),a=n("a458").onFreeze,l=Object.freeze,c=r((function(){l(1)}));i({target:"Object",stat:!0,forced:c,sham:!o},{freeze:function(e){return l&&s(e)?l(a(e)):e}})},ba1b:function(e,t,n){e.exports=n("7554")},bba7:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,'.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:auto}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:normal;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}',""]),e.exports=t},bc19:function(e,t,n){e.exports=n.p+"fonts/fontawesome-webfont.fee66e71.woff"},bd77:function(e,t,n){var i=n("8fed");e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},bf1d:function(e,t,n){var i=n("c401"),o=n("45ad"),r=n("f0f1").f,s=n("2ae8"),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(e){try{return r(e)}catch(t){return s(a)}};e.exports.f=function(e){return a&&"Window"==i(e)?l(e):r(o(e))}},bf6f:function(e,t,n){var i=n("55ab"),o=n("ac97"),r=n("f146");e.exports=!i&&!o((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},bf8d:function(e,t,n){"use strict";var i=n("6d21"),o=n("863c");n("ef61"),n("c225"),n("02de"),n("37fd"),n("e2da"),n("fa89"),n("95d1"),n("f96e"),n("6b40"),n("2b9c");t["a"]={props:{modeler:{type:Object,required:!0},element:{type:Object,default:function(){return{}}},nodes:{type:Array,default:function(){return[]}},formOption:{type:[Object,String],default:null},exFormOption:{type:[Object,String],default:null},indepFormOption:{type:[Object,String],default:null},userOption:{type:Object,default:null},groupOption:{type:Object,default:null},buttonOption:{type:Array,default:function(){return[]}}},data:function(){return{formData:{}}},watch:{element:{handler:function(e){if(0!=Object.keys(e)){var t=Object(o["a"])(Object(o["a"])({},e.businessObject),e.businessObject.$attrs),n=t.documentation;n&&n.length>0&&(t.description=n[0].text),this.$set(this,"formData",t)}},deep:!0,immediate:!0}},methods:{updateProperties:function(e){this.modeler.get("modeling").updateProperties(this.element,e)},updateDocumentation:function(e){if(e){var t=this.modeler.get("bpmnFactory").create("bpmn:Documentation",{text:e});this.updateProperties({documentation:[t]})}else this.updateProperties({documentation:[]})},updateFormalExpression:function(e,t){t=e&&t?this.modeler.get("bpmnFactory").create("bpmn:FormalExpression",{body:t}):void 0,this.updateProperties(Object(i["a"])({},e,t))},createElement:function(e,t){return e&&t?this.modeler.get("bpmnFactory").create(e,t):null},getRootElements:function(e){var t=this.modeler.get("canvas").getRootElement().businessObject.$parent.rootElements;return e?t.filter((function(t){return t.$type==e})):t},getExtensionElementsEq:function(e){var t=[],n=this.element.businessObject.extensionElements;return n&&n.values&&n.values.length>0&&n.values.forEach((function(n){n.$type===e&&t.push(n)})),t},getExtensionElementsNotEq:function(e){var t=[],n=this.element.businessObject.extensionElements;return n&&n.values&&n.values.length>0&&n.values.forEach((function(n){n.$type!==e&&t.push(n)})),t},setExtensionElements:function(e,t){if(e&&t){var n=this.modeler.get("bpmnFactory"),i=[];t.forEach((function(t){return i.push(n.create(e,t))})),i=this.getExtensionElementsNotEq(e).concat(i),this.updateProperties({extensionElements:n.create("bpmn:ExtensionElements",{values:i})})}},clearExtensionElements:function(){this.updateProperties({extensionElements:void 0})},getEventDefinitions:function(e){var t=this.element.businessObject.eventDefinitions;if(!e)return t;var n=[];return t&&t.length>0?(t.forEach((function(t){t.$type==e&&n.push(t)})),n):null},setEventDefinitions:function(e,t){if(e&&t){var n=this.modeler.get("bpmnFactory"),i=this.getEventDefinitions(e)||[];for(var r in i=i&&i.length>0?Object(o["a"])(Object(o["a"])({},i[0]),t):Object(o["a"])({},t),i)r.startsWith("$")&&delete i[r];this.updateProperties({eventDefinitions:[n.create(e,i)]})}}}}},bfb1:function(e,t,n){"use strict";n("e2da"),n("fa89"),n("95d1"),n("f96e");var i=n("7299"),o=i.domify,r=i.classes,s=n("4580"),a=s.TOGGLE_MODE_EVENT;function l(e,t){var n=this;this._canvas=t,this.entries=[],this._init(),e.on(a,(function(e){var t=e.simulationModeActive;t?r(n.container).remove("hidden"):r(n.container).add("hidden")}))}l.prototype._init=function(){this.container=o('<div class="token-simulation-palette hidden"></div>'),this._canvas.getContainer().appendChild(this.container)},l.prototype.addEntry=function(e,t){var n=0;this.entries.forEach((function(e){t>=e.index&&n++})),this.container.insertBefore(e,this.container.childNodes[n]),this.entries.push({entry:e,index:t})},l.$inject=["eventBus","canvas"],e.exports=l},c09a:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:hsla(0,0%,100%,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar{background:transparent}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:hsla(0,0%,67.1%,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-diff-editor .delete-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-editor .insert-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-diff-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-editor.hc-black .insert-sign{opacity:1}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .inline-deleted-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}",""]),e.exports=t},c1ca:function(e,t,n){var i=n("6043"),o=n("6f9e"),r=n("f0f1"),s=n("0ef1"),a=n("fbcf"),l=o([].concat);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(a(e)),n=s.f;return n?l(t,n(e)):t}},c201:function(e,t,n){"use strict";function i(e){return Array.prototype.concat.apply([],e)}n.r(t),n.d(t,"assign",(function(){return V})),n.d(t,"bind",(function(){return j})),n.d(t,"debounce",(function(){return P})),n.d(t,"ensureArray",(function(){return f})),n.d(t,"every",(function(){return C})),n.d(t,"filter",(function(){return v})),n.d(t,"find",(function(){return m})),n.d(t,"findIndex",(function(){return b})),n.d(t,"flatten",(function(){return i})),n.d(t,"forEach",(function(){return y})),n.d(t,"get",(function(){return W})),n.d(t,"groupBy",(function(){return D})),n.d(t,"has",(function(){return g})),n.d(t,"isArray",(function(){return c})),n.d(t,"isDefined",(function(){return a})),n.d(t,"isFunction",(function(){return d})),n.d(t,"isNil",(function(){return l})),n.d(t,"isNumber",(function(){return u})),n.d(t,"isObject",(function(){return h})),n.d(t,"isString",(function(){return p})),n.d(t,"isUndefined",(function(){return s})),n.d(t,"keys",(function(){return x})),n.d(t,"map",(function(){return E})),n.d(t,"matchPattern",(function(){return M})),n.d(t,"merge",(function(){return Y})),n.d(t,"omit",(function(){return U})),n.d(t,"pick",(function(){return H})),n.d(t,"reduce",(function(){return _})),n.d(t,"set",(function(){return Q})),n.d(t,"size",(function(){return S})),n.d(t,"some",(function(){return A})),n.d(t,"sortBy",(function(){return N})),n.d(t,"throttle",(function(){return F})),n.d(t,"unionBy",(function(){return I})),n.d(t,"uniqueBy",(function(){return L})),n.d(t,"values",(function(){return k})),n.d(t,"without",(function(){return w}));var o=Object.prototype.toString,r=Object.prototype.hasOwnProperty;function s(e){return void 0===e}function a(e){return void 0!==e}function l(e){return null==e}function c(e){return"[object Array]"===o.call(e)}function h(e){return"[object Object]"===o.call(e)}function u(e){return"[object Number]"===o.call(e)}function d(e){var t=o.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function p(e){return"[object String]"===o.call(e)}function f(e){if(!c(e))throw new Error("must supply array")}function g(e,t){return r.call(e,t)}function m(e,t){var n;return t=T(t),y(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function b(e,t){t=T(t);var n=c(e)?-1:void 0;return y(e,(function(e,i){if(t(e,i))return n=i,!1})),n}function v(e,t){var n=[];return y(e,(function(e,i){t(e,i)&&n.push(e)})),n}function y(e,t){var n,i;if(!s(e)){var o=c(e)?R:O;for(var r in e)if(g(e,r)&&(n=e[r],i=t(n,o(r)),!1===i))return n}}function w(e,t){return s(e)?[]:(f(e),t=T(t),e.filter((function(e,n){return!t(e,n)})))}function _(e,t,n){return y(e,(function(e,i){n=t(n,e,i)})),n}function C(e,t){return!!_(e,(function(e,n,i){return e&&t(n,i)}),!0)}function A(e,t){return!!m(e,t)}function E(e,t){var n=[];return y(e,(function(e,i){n.push(t(e,i))})),n}function x(e){return e&&Object.keys(e)||[]}function S(e){return x(e).length}function k(e){return E(e,(function(e){return e}))}function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=B(t),y(e,(function(e){var i=t(e)||"_",o=n[i];o||(o=n[i]=[]),o.push(e)})),n}function L(e){e=B(e);for(var t={},n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];y(i,(function(n){return D(n,e,t)}));var r=E(t,(function(e,t){return e[0]}));return r}var I=L;function N(e,t){t=B(t);var n=[];return y(e,(function(e,i){for(var o=t(e,i),r={d:o,v:e},s=0;s<n.length;s++){var a=n[s].d;if(o<a)return void n.splice(s,0,r)}n.push(r)})),E(n,(function(e){return e.v}))}function M(e){return function(t){return C(e,(function(e,n){return t[n]===e}))}}function B(e){return d(e)?e:function(t){return t[e]}}function T(e){return d(e)?e:function(t){return t===e}}function O(e){return e}function R(e){return Number(e)}function P(e,t){var n,i,o,r;function s(){var s=Date.now(),l=r+t-s;if(l>0)return a(l);e.apply(o,i),n=r=i=o=void 0}function a(e){n=setTimeout(s,e)}return function(){r=Date.now();for(var e=arguments.length,s=new Array(e),l=0;l<e;l++)s[l]=arguments[l];i=s,o=this,n||a(t)}}function F(e,t){var n=!1;return function(){n||(e.apply(void 0,arguments),n=!0,setTimeout((function(){n=!1}),t))}}function j(e,t){return e.bind(t)}function z(){return z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},z.apply(this,arguments)}function V(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return z.apply(void 0,[e].concat(n))}function Q(e,t,n){var i=e;return y(t,(function(e,o){if("__proto__"===e)throw new Error("illegal key: __proto__");var r=t[o+1],c=i[e];a(r)&&l(c)&&(c=i[e]=isNaN(+r)?{}:[]),s(r)?s(n)?delete i[e]:i[e]=n:i=c})),e}function W(e,t,n){var i=e;return y(t,(function(e){if(l(i))return i=void 0,!1;i=i[e]})),s(i)?n:i}function H(e,t){var n={},i=Object(e);return y(t,(function(t){t in i&&(n[t]=e[t])})),n}function U(e,t){var n={},i=Object(e);return y(i,(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function Y(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.length?(y(n,(function(t){t&&h(t)&&y(t,(function(t,n){if("__proto__"!==n){var i=e[n];h(t)?(h(i)||(i={}),e[n]=Y(i,t)):e[n]=t}}))})),e):e}},c223:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return h})),n.d(t,"g",(function(){return u}));const i="undefined"!==typeof e;let o;class r{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(t){return i&&!e.isBuffer(t)&&(t=e.from(t.buffer,t.byteOffset,t.byteLength)),new r(t)}toString(){return i?this.buffer.toString():(o||(o=new TextDecoder),o.decode(this.buffer))}}function s(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function a(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function l(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function c(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function h(e,t){return e[t]}function u(e,t,n){e[n]=t}}).call(this,n("f20c").Buffer)},c225:function(e,t,n){"use strict";var i=n("83ec"),o=n("e244"),r=n("6043"),s=n("82a4"),a=n("58d1"),l=n("6f9e"),c=n("f0db"),h=n("55ab"),u=n("8fed"),d=n("ac97"),p=n("0b05"),f=n("5a43"),g=n("9564"),m=n("eee7"),b=n("81e5"),v=n("0b38"),y=n("fbcf"),w=n("c673"),_=n("45ad"),C=n("6b7e"),A=n("04c3"),E=n("4d82"),x=n("ca2b"),S=n("3e1a"),k=n("f0f1"),D=n("bf1d"),L=n("0ef1"),I=n("42b1"),N=n("b896"),M=n("11b0"),B=n("96cd"),T=n("7d86"),O=n("986e"),R=n("5350"),P=n("fd3f"),F=n("76b2"),j=n("1810"),z=n("aca4"),V=n("6baf"),Q=n("63ef"),W=n("35d6"),H=n("8aa3").forEach,U=R("hidden"),Y="Symbol",G="prototype",K=j("toPrimitive"),q=W.set,J=W.getterFor(Y),$=Object[G],X=o.Symbol,Z=X&&X[G],ee=o.TypeError,te=o.QObject,ne=r("JSON","stringify"),ie=I.f,oe=N.f,re=D.f,se=M.f,ae=l([].push),le=O("symbols"),ce=O("op-symbols"),he=O("string-to-symbol-registry"),ue=O("symbol-to-string-registry"),de=O("wks"),pe=!te||!te[G]||!te[G].findChild,fe=h&&d((function(){return 7!=x(oe({},"a",{get:function(){return oe(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=ie($,t);i&&delete $[t],oe(e,t,n),i&&e!==$&&oe($,t,i)}:oe,ge=function(e,t){var n=le[e]=x(Z);return q(n,{type:Y,tag:e,description:t}),h||(n.description=t),n},me=function(e,t,n){e===$&&me(ce,t,n),y(e);var i=C(t);return y(n),p(le,i)?(n.enumerable?(p(e,U)&&e[U][i]&&(e[U][i]=!1),n=x(n,{enumerable:E(0,!1)})):(p(e,U)||oe(e,U,E(1,{})),e[U][i]=!0),fe(e,i,n)):oe(e,i,n)},be=function(e,t){y(e);var n=_(t),i=S(n).concat(Ce(n));return H(i,(function(t){h&&!a(ye,n,t)||me(e,t,n[t])})),e},ve=function(e,t){return void 0===t?x(e):be(x(e),t)},ye=function(e){var t=C(e),n=a(se,this,t);return!(this===$&&p(le,t)&&!p(ce,t))&&(!(n||!p(this,t)||!p(le,t)||p(this,U)&&this[U][t])||n)},we=function(e,t){var n=_(e),i=C(t);if(n!==$||!p(le,i)||p(ce,i)){var o=ie(n,i);return!o||!p(le,i)||p(n,U)&&n[U][i]||(o.enumerable=!0),o}},_e=function(e){var t=re(_(e)),n=[];return H(t,(function(e){p(le,e)||p(P,e)||ae(n,e)})),n},Ce=function(e){var t=e===$,n=re(t?ce:_(e)),i=[];return H(n,(function(e){!p(le,e)||t&&!p($,e)||ae(i,le[e])})),i};if(u||(X=function(){if(b(Z,this))throw ee("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?A(arguments[0]):void 0,t=F(e),n=function(e){this===$&&a(n,ce,e),p(this,U)&&p(this[U],t)&&(this[U][t]=!1),fe(this,t,E(1,e))};return h&&pe&&fe($,t,{configurable:!0,set:n}),ge(t,e)},Z=X[G],T(Z,"toString",(function(){return J(this).tag})),T(X,"withoutSetter",(function(e){return ge(F(e),e)})),M.f=ye,N.f=me,I.f=we,k.f=D.f=_e,L.f=Ce,z.f=function(e){return ge(j(e),e)},h&&(oe(Z,"description",{configurable:!0,get:function(){return J(this).description}}),c||T($,"propertyIsEnumerable",ye,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:X}),H(S(de),(function(e){V(e)})),i({target:Y,stat:!0,forced:!u},{for:function(e){var t=A(e);if(p(he,t))return he[t];var n=X(t);return he[t]=n,ue[n]=t,n},keyFor:function(e){if(!v(e))throw ee(e+" is not a symbol");if(p(ue,e))return ue[e]},useSetter:function(){pe=!0},useSimple:function(){pe=!1}}),i({target:"Object",stat:!0,forced:!u,sham:!h},{create:ve,defineProperty:me,defineProperties:be,getOwnPropertyDescriptor:we}),i({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:_e,getOwnPropertySymbols:Ce}),i({target:"Object",stat:!0,forced:d((function(){L.f(1)}))},{getOwnPropertySymbols:function(e){return L.f(w(e))}}),ne){var Ae=!u||d((function(){var e=X();return"[null]"!=ne([e])||"{}"!=ne({a:e})||"{}"!=ne(Object(e))}));i({target:"JSON",stat:!0,forced:Ae},{stringify:function(e,t,n){var i=B(arguments),o=t;if((m(t)||void 0!==e)&&!v(e))return f(t)||(t=function(e,t){if(g(o)&&(t=a(o,this,e,t)),!v(t))return t}),i[1]=t,s(ne,null,i)}})}if(!Z[K]){var Ee=Z.valueOf;T(Z,K,(function(e){return a(Ee,this)}))}Q(X,Y),P[U]=!0},c243:function(e,t,n){var i=n("6f9e"),o=n("c673"),r=Math.floor,s=i("".charAt),a=i("".replace),l=i("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,i,u,d){var p=n+e.length,f=i.length,g=h;return void 0!==u&&(u=o(u),g=c),a(d,g,(function(o,a){var c;switch(s(a,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,p);case"<":c=u[l(a,1,-1)];break;default:var h=+a;if(0===h)return o;if(h>f){var d=r(h/10);return 0===d?o:d<=f?void 0===i[d-1]?s(a,1):i[d-1]+s(a,1):o}c=i[h-1]}return void 0===c?"":c}))}},c25e:function(e,t,n){e.exports=n("a009")},c3b4:function(e,t,n){var i=n("10b1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("4c19d8df",i,!0,{sourceMap:!1,shadowMode:!1})},c401:function(e,t,n){var i=n("6f9e"),o=i({}.toString),r=i("".slice);e.exports=function(e){return r(o(e),8,-1)}},c55c:function(e,t,n){var i=n("32a5").PROPER,o=n("ac97"),r=n("d554"),s="…";e.exports=function(e){return o((function(){return!!r[e]()||s[e]()!==s||i&&r[e].name!==e}))}},c61c:function(e,t,n){var i=n("e244"),o=n("58d1"),r=n("b623"),s=n("fbcf"),a=n("8dcc"),l=n("6023"),c=i.TypeError;e.exports=function(e,t){var n=arguments.length<2?l(e):t;if(r(n))return s(o(n,e));throw c(a(e)+" is not iterable")}},c673:function(e,t,n){var i=n("e244"),o=n("0874"),r=i.Object;e.exports=function(e){return r(o(e))}},c6b4:function(e,t,n){var i=n("6aad");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("9f17fb24",i,!0,{sourceMap:!1,shadowMode:!1})},c732:function(e,t,n){var i=n("55ab"),o=n("b896"),r=n("fbcf"),s=n("45ad"),a=n("3e1a");e.exports=i?Object.defineProperties:function(e,t){r(e);var n,i=s(t),l=a(t),c=l.length,h=0;while(c>h)o.f(e,n=l[h++],i[n]);return e}},c807:function(e,t,n){e.exports=n.p+"img/bpmn.1381b44e.svg"},c87e:function(e,t,n){var i;
/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */(function(o,r,s,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],h=r.createElement("div"),u="function",d=Math.round,p=Math.abs,f=Date.now;function g(e,t,n){return setTimeout(C(e,n),t)}function m(e,t,n){return!!Array.isArray(e)&&(b(e,n[t],n),!0)}function b(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==a){i=0;while(i<e.length)t.call(n,e[i],i,e),i++}else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function v(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=o.console&&(o.console.warn||o.console.log);return r&&r.call(o.console,i,n),e.apply(this,arguments)}}l="function"!==typeof Object.assign?function(e){if(e===a||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var y=v((function(e,t,n){var i=Object.keys(t),o=0;while(o<i.length)(!n||n&&e[i[o]]===a)&&(e[i[o]]=t[i[o]]),o++;return e}),"extend","Use `assign`."),w=v((function(e,t){return y(e,t,!0)}),"merge","Use `assign`.");function _(e,t,n){var i,o=t.prototype;i=e.prototype=Object.create(o),i.constructor=e,i._super=o,n&&l(i,n)}function C(e,t){return function(){return e.apply(t,arguments)}}function A(e,t){return typeof e==u?e.apply(t&&t[0]||a,t):e}function E(e,t){return e===a?t:e}function x(e,t,n){b(L(t),(function(t){e.addEventListener(t,n,!1)}))}function S(e,t,n){b(L(t),(function(t){e.removeEventListener(t,n,!1)}))}function k(e,t){while(e){if(e==t)return!0;e=e.parentNode}return!1}function D(e,t){return e.indexOf(t)>-1}function L(e){return e.trim().split(/\s+/g)}function I(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);var i=0;while(i<e.length){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function N(e){return Array.prototype.slice.call(e,0)}function M(e,t,n){var i=[],o=[],r=0;while(r<e.length){var s=t?e[r][t]:e[r];I(o,s)<0&&i.push(e[r]),o[r]=s,r++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}function B(e,t){var n,i,o=t[0].toUpperCase()+t.slice(1),r=0;while(r<c.length){if(n=c[r],i=n?n+o:t,i in e)return i;r++}return a}var T=1;function O(){return T++}function R(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||o}var P=/mobile|tablet|ip(ad|hone|od)|android/i,F="ontouchstart"in o,j=B(o,"PointerEvent")!==a,z=F&&P.test(navigator.userAgent),V="touch",Q="pen",W="mouse",H="kinect",U=25,Y=1,G=2,K=4,q=8,J=1,$=2,X=4,Z=8,ee=16,te=$|X,ne=Z|ee,ie=te|ne,oe=["x","y"],re=["clientX","clientY"];function se(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){A(e.options.enable,[e])&&n.handler(t)},this.init()}function ae(e){var t,n=e.options.inputClass;return t=n||(j?De:z?Re:F?ze:Ae),new t(e,le)}function le(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,r=t&Y&&i-o===0,s=t&(K|q)&&i-o===0;n.isFirst=!!r,n.isFinal=!!s,r&&(e.session={}),n.eventType=t,ce(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function ce(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=de(t)),o>1&&!n.firstMultiple?n.firstMultiple=de(t):1===o&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,a=s?s.center:r.center,l=t.center=pe(i);t.timeStamp=f(),t.deltaTime=t.timeStamp-r.timeStamp,t.angle=be(a,l),t.distance=me(a,l),he(n,t),t.offsetDirection=ge(t.deltaX,t.deltaY);var c=fe(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=p(c.x)>p(c.y)?c.x:c.y,t.scale=s?ye(s.pointers,i):1,t.rotation=s?ve(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,ue(n,t);var h=e.element;k(t.srcEvent.target,h)&&(h=t.srcEvent.target),t.target=h}function he(e,t){var n=t.center,i=e.offsetDelta||{},o=e.prevDelta||{},r=e.prevInput||{};t.eventType!==Y&&r.eventType!==K||(o=e.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=o.x+(n.x-i.x),t.deltaY=o.y+(n.y-i.y)}function ue(e,t){var n,i,o,r,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=q&&(l>U||s.velocity===a)){var c=t.deltaX-s.deltaX,h=t.deltaY-s.deltaY,u=fe(l,c,h);i=u.x,o=u.y,n=p(u.x)>p(u.y)?u.x:u.y,r=ge(c,h),e.lastInterval=t}else n=s.velocity,i=s.velocityX,o=s.velocityY,r=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=r}function de(e){var t=[],n=0;while(n<e.pointers.length)t[n]={clientX:d(e.pointers[n].clientX),clientY:d(e.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:t,center:pe(t),deltaX:e.deltaX,deltaY:e.deltaY}}function pe(e){var t=e.length;if(1===t)return{x:d(e[0].clientX),y:d(e[0].clientY)};var n=0,i=0,o=0;while(o<t)n+=e[o].clientX,i+=e[o].clientY,o++;return{x:d(n/t),y:d(i/t)}}function fe(e,t,n){return{x:t/e||0,y:n/e||0}}function ge(e,t){return e===t?J:p(e)>=p(t)?e<0?$:X:t<0?Z:ee}function me(e,t,n){n||(n=oe);var i=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return Math.sqrt(i*i+o*o)}function be(e,t,n){n||(n=oe);var i=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return 180*Math.atan2(o,i)/Math.PI}function ve(e,t){return be(t[1],t[0],re)+be(e[1],e[0],re)}function ye(e,t){return me(t[0],t[1],re)/me(e[0],e[1],re)}se.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(R(this.element),this.evWin,this.domHandler)}};var we={mousedown:Y,mousemove:G,mouseup:K},_e="mousedown",Ce="mousemove mouseup";function Ae(){this.evEl=_e,this.evWin=Ce,this.pressed=!1,se.apply(this,arguments)}_(Ae,se,{handler:function(e){var t=we[e.type];t&Y&&0===e.button&&(this.pressed=!0),t&G&&1!==e.which&&(t=K),this.pressed&&(t&K&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:W,srcEvent:e}))}});var Ee={pointerdown:Y,pointermove:G,pointerup:K,pointercancel:q,pointerout:q},xe={2:V,3:Q,4:W,5:H},Se="pointerdown",ke="pointermove pointerup pointercancel";function De(){this.evEl=Se,this.evWin=ke,se.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(Se="MSPointerDown",ke="MSPointerMove MSPointerUp MSPointerCancel"),_(De,se,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),o=Ee[i],r=xe[e.pointerType]||e.pointerType,s=r==V,a=I(t,e.pointerId,"pointerId");o&Y&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):o&(K|q)&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,o,{pointers:t,changedPointers:[e],pointerType:r,srcEvent:e}),n&&t.splice(a,1))}});var Le={touchstart:Y,touchmove:G,touchend:K,touchcancel:q},Ie="touchstart",Ne="touchstart touchmove touchend touchcancel";function Me(){this.evTarget=Ie,this.evWin=Ne,this.started=!1,se.apply(this,arguments)}function Be(e,t){var n=N(e.touches),i=N(e.changedTouches);return t&(K|q)&&(n=M(n.concat(i),"identifier",!0)),[n,i]}_(Me,se,{handler:function(e){var t=Le[e.type];if(t===Y&&(this.started=!0),this.started){var n=Be.call(this,e,t);t&(K|q)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:V,srcEvent:e})}}});var Te={touchstart:Y,touchmove:G,touchend:K,touchcancel:q},Oe="touchstart touchmove touchend touchcancel";function Re(){this.evTarget=Oe,this.targetIds={},se.apply(this,arguments)}function Pe(e,t){var n=N(e.touches),i=this.targetIds;if(t&(Y|G)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=N(e.changedTouches),a=[],l=this.target;if(r=n.filter((function(e){return k(e.target,l)})),t===Y){o=0;while(o<r.length)i[r[o].identifier]=!0,o++}o=0;while(o<s.length)i[s[o].identifier]&&a.push(s[o]),t&(K|q)&&delete i[s[o].identifier],o++;return a.length?[M(r.concat(a),"identifier",!0),a]:void 0}_(Re,se,{handler:function(e){var t=Te[e.type],n=Pe.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:V,srcEvent:e})}});var Fe=2500,je=25;function ze(){se.apply(this,arguments);var e=C(this.handler,this);this.touch=new Re(this.manager,e),this.mouse=new Ae(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function Ve(e,t){e&Y?(this.primaryTouch=t.changedPointers[0].identifier,Qe.call(this,t)):e&(K|q)&&Qe.call(this,t)}function Qe(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches,o=function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)};setTimeout(o,Fe)}}function We(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var o=this.lastTouches[i],r=Math.abs(t-o.x),s=Math.abs(n-o.y);if(r<=je&&s<=je)return!0}return!1}_(ze,se,{handler:function(e,t,n){var i=n.pointerType==V,o=n.pointerType==W;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Ve.call(this,t,n);else if(o&&We.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var He=B(h.style,"touchAction"),Ue=He!==a,Ye="compute",Ge="auto",Ke="manipulation",qe="none",Je="pan-x",$e="pan-y",Xe=tt();function Ze(e,t){this.manager=e,this.set(t)}function et(e){if(D(e,qe))return qe;var t=D(e,Je),n=D(e,$e);return t&&n?qe:t||n?t?Je:$e:D(e,Ke)?Ke:Ge}function tt(){if(!Ue)return!1;var e={},t=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||o.CSS.supports("touch-action",n)})),e}Ze.prototype={set:function(e){e==Ye&&(e=this.compute()),Ue&&this.manager.element.style&&Xe[e]&&(this.manager.element.style[He]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return b(this.manager.recognizers,(function(t){A(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),et(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,o=D(i,qe)&&!Xe[qe],r=D(i,$e)&&!Xe[$e],s=D(i,Je)&&!Xe[Je];if(o){var a=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(a&&l&&c)return}if(!s||!r)return o||r&&n&te||s&&n&ne?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var nt=1,it=2,ot=4,rt=8,st=rt,at=16,lt=32;function ct(e){this.options=l({},this.defaults,e||{}),this.id=O(),this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=nt,this.simultaneous={},this.requireFail=[]}function ht(e){return e&at?"cancel":e&rt?"end":e&ot?"move":e&it?"start":""}function ut(e){return e==ee?"down":e==Z?"up":e==$?"left":e==X?"right":""}function dt(e,t){var n=t.manager;return n?n.get(e):e}function pt(){ct.apply(this,arguments)}function ft(){pt.apply(this,arguments),this.pX=null,this.pY=null}function gt(){pt.apply(this,arguments)}function mt(){ct.apply(this,arguments),this._timer=null,this._input=null}function bt(){pt.apply(this,arguments)}function vt(){pt.apply(this,arguments)}function yt(){ct.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function wt(e,t){return t=t||{},t.recognizers=E(t.recognizers,wt.defaults.preset),new At(e,t)}ct.prototype={defaults:{},set:function(e){return l(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(m(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=dt(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return m(e,"dropRecognizeWith",this)||(e=dt(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(m(e,"requireFailure",this))return this;var t=this.requireFail;return e=dt(e,this),-1===I(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(m(e,"dropRequireFailure",this))return this;e=dt(e,this);var t=I(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<rt&&i(t.options.event+ht(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=rt&&i(t.options.event+ht(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=lt},canEmit:function(){var e=0;while(e<this.requireFail.length){if(!(this.requireFail[e].state&(lt|nt)))return!1;e++}return!0},recognize:function(e){var t=l({},e);if(!A(this.options.enable,[this,t]))return this.reset(),void(this.state=lt);this.state&(st|at|lt)&&(this.state=nt),this.state=this.process(t),this.state&(it|ot|rt|at)&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},_(pt,ct,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(it|ot),o=this.attrTest(e);return i&&(n&q||!o)?t|at:i||o?n&K?t|rt:t&it?t|ot:it:lt}}),_(ft,pt,{defaults:{event:"pan",threshold:10,pointers:1,direction:ie},getTouchAction:function(){var e=this.options.direction,t=[];return e&te&&t.push($e),e&ne&&t.push(Je),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,o=e.direction,r=e.deltaX,s=e.deltaY;return o&t.direction||(t.direction&te?(o=0===r?J:r<0?$:X,n=r!=this.pX,i=Math.abs(e.deltaX)):(o=0===s?J:s<0?Z:ee,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=o,n&&i>t.threshold&&o&t.direction},attrTest:function(e){return pt.prototype.attrTest.call(this,e)&&(this.state&it||!(this.state&it)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ut(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),_(gt,pt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[qe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&it)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),_(mt,ct,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ge]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,o=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(K|q)&&!o)this.reset();else if(e.eventType&Y)this.reset(),this._timer=g((function(){this.state=st,this.tryEmit()}),t.time,this);else if(e.eventType&K)return st;return lt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===st&&(e&&e.eventType&K?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),_(bt,pt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[qe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&it)}}),_(vt,pt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:te|ne,pointers:1},getTouchAction:function(){return ft.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(te|ne)?t=e.overallVelocity:n&te?t=e.overallVelocityX:n&ne&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&p(t)>this.options.velocity&&e.eventType&K},emit:function(e){var t=ut(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),_(yt,ct,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ke]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),e.eventType&Y&&0===this.count)return this.failTimeout();if(i&&o&&n){if(e.eventType!=K)return this.failTimeout();var r=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||me(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,s&&r?this.count+=1:this.count=1,this._input=e;var a=this.count%t.taps;if(0===a)return this.hasRequireFailures()?(this._timer=g((function(){this.state=st,this.tryEmit()}),t.interval,this),it):st}return lt},failTimeout:function(){return this._timer=g((function(){this.state=lt}),this.options.interval,this),lt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==st&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),wt.VERSION="2.0.7",wt.defaults={domEvents:!1,touchAction:Ye,enable:!0,inputTarget:null,inputClass:null,preset:[[bt,{enable:!1}],[gt,{enable:!1},["rotate"]],[vt,{direction:te}],[ft,{direction:te},["swipe"]],[yt],[yt,{event:"doubletap",taps:2},["tap"]],[mt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var _t=1,Ct=2;function At(e,t){this.options=l({},wt.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=ae(this),this.touchAction=new Ze(this,this.options.touchAction),Et(this,!0),b(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Et(e,t){var n,i=e.element;i.style&&(b(e.options.cssProps,(function(o,r){n=B(i.style,r),t?(e.oldCssProps[n]=i.style[n],i.style[n]=o):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}function xt(e,t){var n=r.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}At.prototype={set:function(e){return l(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?Ct:_t},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,o=t.curRecognizer;(!o||o&&o.state&st)&&(o=t.curRecognizer=null);var r=0;while(r<i.length)n=i[r],t.stopped===Ct||o&&n!=o&&!n.canRecognizeWith(o)?n.reset():n.recognize(e),!o&&n.state&(it|ot|rt)&&(o=t.curRecognizer=n),r++}},get:function(e){if(e instanceof ct)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(m(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(m(e,"remove",this))return this;if(e=this.get(e),e){var t=this.recognizers,n=I(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==a&&t!==a){var n=this.handlers;return b(L(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==a){var n=this.handlers;return b(L(e),(function(e){t?n[e]&&n[e].splice(I(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&xt(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};var i=0;while(i<n.length)n[i](t),i++}},destroy:function(){this.element&&Et(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(wt,{INPUT_START:Y,INPUT_MOVE:G,INPUT_END:K,INPUT_CANCEL:q,STATE_POSSIBLE:nt,STATE_BEGAN:it,STATE_CHANGED:ot,STATE_ENDED:rt,STATE_RECOGNIZED:st,STATE_CANCELLED:at,STATE_FAILED:lt,DIRECTION_NONE:J,DIRECTION_LEFT:$,DIRECTION_RIGHT:X,DIRECTION_UP:Z,DIRECTION_DOWN:ee,DIRECTION_HORIZONTAL:te,DIRECTION_VERTICAL:ne,DIRECTION_ALL:ie,Manager:At,Input:se,TouchAction:Ze,TouchInput:Re,MouseInput:Ae,PointerEventInput:De,TouchMouseInput:ze,SingleTouchInput:Me,Recognizer:ct,AttrRecognizer:pt,Tap:yt,Pan:ft,Swipe:vt,Pinch:gt,Rotate:bt,Press:mt,on:x,off:S,each:b,merge:w,extend:y,assign:l,inherit:_,bindFn:C,prefixed:B});var St="undefined"!==typeof o?o:"undefined"!==typeof self?self:{};St.Hammer=wt,i=function(){return wt}.call(t,n,t,e),i===a||(e.exports=i)})(window,document)},c8ed:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}e.exports=n},c901:function(e,t,n){var i=n("f39a");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("174a5076",i,!0,{sourceMap:!1,shadowMode:!1})},c91b:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled,.monaco-button.disabled:focus{opacity:.4!important;cursor:default}.monaco-text-button>.codicon{margin:0 .2em;color:inherit!important}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic}",""]),e.exports=t},ca23:function(e,t,n){var i=n("9564"),o=n("eee7"),r=n("13a8");e.exports=function(e,t,n){var s,a;return r&&i(s=t.constructor)&&s!==n&&o(a=s.prototype)&&a!==n.prototype&&r(e,a),e}},ca2b:function(e,t,n){var i,o=n("fbcf"),r=n("c732"),s=n("e629"),a=n("fd3f"),l=n("a780"),c=n("f146"),h=n("5350"),u=">",d="<",p="prototype",f="script",g=h("IE_PROTO"),m=function(){},b=function(e){return d+f+u+e+d+"/"+f+u},v=function(e){e.write(b("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){var e,t=c("iframe"),n="java"+f+":";return t.style.display="none",l.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(b("document.F=Object")),e.close(),e.F},w=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}w="undefined"!=typeof document?document.domain&&i?v(i):y():v(i);var e=s.length;while(e--)delete w[p][s[e]];return w()};a[g]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[p]=o(e),n=new m,m[p]=null,n[g]=e):n=w(),void 0===t?n:r(n,t)}},caac:function(e,t,n){e.exports=n.p+"img/fontawesome-webfont.912ec66d.svg"},cb29:function(e,t,n){"use strict";var i=n("c673"),o=n("3352"),r=n("7c08");e.exports=function(e){var t=i(this),n=r(t),s=arguments.length,a=o(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:o(l,n);while(c>a)t[a++]=e;return t}},cbc4:function(e,t){e.exports="object"==typeof window},cc1a:function(e,t,n){var i=n("11e2");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("15ad24d4",i,!0,{sourceMap:!1,shadowMode:!1})},ccd9:function(e,t,n){e.exports=n("b612")},ce47:function(e,t,n){var i=n("409e"),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},ce75:function(e,t,n){var i=n("53c2"),o=n("a0c9"),r=n("9812"),s=n("59f5"),a=n("5db6"),l=n("9545"),c=n("497f");t=i(!1);var h=o(r),u=o(r,{hash:"#iefix"}),d=o(s),p=o(a),f=o(l),g=o(c,{hash:"#bpmn"});t.push([e.i,"@font-face{font-family:bpmn;src:url("+h+");src:url("+u+') format("embedded-opentype"),url('+d+') format("woff2"),url('+p+') format("woff"),url('+f+') format("truetype"),url('+g+') format("svg");font-weight:400;font-style:normal}[class*=" bpmn-icon-"]:before,[class^=bpmn-icon-]:before{font-family:bpmn;font-style:normal;font-weight:400;speak:never;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bpmn-icon-screw-wrench:before{content:"\\e800"}.bpmn-icon-trash:before{content:"\\e801"}.bpmn-icon-conditional-flow:before{content:"\\e802"}.bpmn-icon-default-flow:before{content:"\\e803"}.bpmn-icon-gateway-parallel:before{content:"\\e804"}.bpmn-icon-intermediate-event-catch-cancel:before{content:"\\e805"}.bpmn-icon-intermediate-event-catch-non-interrupting-message:before{content:"\\e806"}.bpmn-icon-start-event-compensation:before{content:"\\e807"}.bpmn-icon-start-event-non-interrupting-parallel-multiple:before{content:"\\e808"}.bpmn-icon-loop-marker:before{content:"\\e809"}.bpmn-icon-parallel-mi-marker:before{content:"\\e80a"}.bpmn-icon-start-event-non-interrupting-signal:before{content:"\\e80b"}.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before{content:"\\e80c"}.bpmn-icon-intermediate-event-catch-parallel-multiple:before{content:"\\e80d"}.bpmn-icon-intermediate-event-catch-compensation:before{content:"\\e80e"}.bpmn-icon-gateway-xor:before{content:"\\e80f"}.bpmn-icon-connection:before{content:"\\e810"}.bpmn-icon-end-event-cancel:before{content:"\\e811"}.bpmn-icon-intermediate-event-catch-condition:before{content:"\\e812"}.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before{content:"\\e813"}.bpmn-icon-start-event-condition:before{content:"\\e814"}.bpmn-icon-start-event-non-interrupting-timer:before{content:"\\e815"}.bpmn-icon-sequential-mi-marker:before{content:"\\e816"}.bpmn-icon-user-task:before{content:"\\e817"}.bpmn-icon-business-rule:before{content:"\\e818"}.bpmn-icon-sub-process-marker:before{content:"\\e819"}.bpmn-icon-start-event-parallel-multiple:before{content:"\\e81a"}.bpmn-icon-start-event-error:before{content:"\\e81b"}.bpmn-icon-intermediate-event-catch-signal:before{content:"\\e81c"}.bpmn-icon-intermediate-event-catch-error:before{content:"\\e81d"}.bpmn-icon-end-event-compensation:before{content:"\\e81e"}.bpmn-icon-subprocess-collapsed:before{content:"\\e81f"}.bpmn-icon-subprocess-expanded:before{content:"\\e820"}.bpmn-icon-task:before{content:"\\e821"}.bpmn-icon-end-event-error:before{content:"\\e822"}.bpmn-icon-intermediate-event-catch-escalation:before{content:"\\e823"}.bpmn-icon-intermediate-event-catch-timer:before{content:"\\e824"}.bpmn-icon-start-event-escalation:before{content:"\\e825"}.bpmn-icon-start-event-signal:before{content:"\\e826"}.bpmn-icon-business-rule-task:before{content:"\\e827"}.bpmn-icon-manual:before{content:"\\e828"}.bpmn-icon-receive:before{content:"\\e829"}.bpmn-icon-call-activity:before{content:"\\e82a"}.bpmn-icon-start-event-timer:before{content:"\\e82b"}.bpmn-icon-start-event-message:before{content:"\\e82c"}.bpmn-icon-intermediate-event-none:before{content:"\\e82d"}.bpmn-icon-intermediate-event-catch-link:before{content:"\\e82e"}.bpmn-icon-end-event-escalation:before{content:"\\e82f"}.bpmn-icon-text-annotation:before{content:"\\e830"}.bpmn-icon-bpmn-io:before{content:"\\e831"}.bpmn-icon-gateway-complex:before{content:"\\e832"}.bpmn-icon-gateway-eventbased:before{content:"\\e833"}.bpmn-icon-gateway-none:before{content:"\\e834"}.bpmn-icon-gateway-or:before{content:"\\e835"}.bpmn-icon-end-event-terminate:before{content:"\\e836"}.bpmn-icon-end-event-signal:before{content:"\\e837"}.bpmn-icon-end-event-none:before{content:"\\e838"}.bpmn-icon-end-event-multiple:before{content:"\\e839"}.bpmn-icon-end-event-message:before{content:"\\e83a"}.bpmn-icon-end-event-link:before{content:"\\e83b"}.bpmn-icon-intermediate-event-catch-message:before{content:"\\e83c"}.bpmn-icon-intermediate-event-throw-compensation:before{content:"\\e83d"}.bpmn-icon-start-event-multiple:before{content:"\\e83e"}.bpmn-icon-script:before{content:"\\e83f"}.bpmn-icon-manual-task:before{content:"\\e840"}.bpmn-icon-send:before{content:"\\e841"}.bpmn-icon-service:before{content:"\\e842"}.bpmn-icon-receive-task:before{content:"\\e843"}.bpmn-icon-user:before{content:"\\e844"}.bpmn-icon-start-event-none:before{content:"\\e845"}.bpmn-icon-intermediate-event-throw-escalation:before{content:"\\e846"}.bpmn-icon-intermediate-event-catch-multiple:before{content:"\\e847"}.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before{content:"\\e848"}.bpmn-icon-intermediate-event-throw-link:before{content:"\\e849"}.bpmn-icon-start-event-non-interrupting-condition:before{content:"\\e84a"}.bpmn-icon-data-object:before{content:"\\e84b"}.bpmn-icon-script-task:before{content:"\\e84c"}.bpmn-icon-send-task:before{content:"\\e84d"}.bpmn-icon-data-store:before{content:"\\e84e"}.bpmn-icon-start-event-non-interrupting-escalation:before{content:"\\e84f"}.bpmn-icon-intermediate-event-throw-message:before{content:"\\e850"}.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before{content:"\\e851"}.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before{content:"\\e852"}.bpmn-icon-intermediate-event-throw-multiple:before{content:"\\e853"}.bpmn-icon-start-event-non-interrupting-message:before{content:"\\e854"}.bpmn-icon-ad-hoc-marker:before{content:"\\e855"}.bpmn-icon-service-task:before{content:"\\e856"}.bpmn-icon-task-none:before{content:"\\e857"}.bpmn-icon-compensation-marker:before{content:"\\e858"}.bpmn-icon-start-event-non-interrupting-multiple:before{content:"\\e859"}.bpmn-icon-intermediate-event-throw-signal:before{content:"\\e85a"}.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before{content:"\\e85b"}.bpmn-icon-participant:before{content:"\\e85c"}.bpmn-icon-event-subprocess-expanded:before{content:"\\e85d"}.bpmn-icon-lane-insert-below:before{content:"\\e85e"}.bpmn-icon-space-tool:before{content:"\\e85f"}.bpmn-icon-connection-multi:before{content:"\\e860"}.bpmn-icon-lane:before{content:"\\e861"}.bpmn-icon-lasso-tool:before{content:"\\e862"}.bpmn-icon-lane-insert-above:before{content:"\\e863"}.bpmn-icon-lane-divide-three:before{content:"\\e864"}.bpmn-icon-lane-divide-two:before{content:"\\e865"}.bpmn-icon-data-input:before{content:"\\e866"}.bpmn-icon-data-output:before{content:"\\e867"}.bpmn-icon-hand-tool:before{content:"\\e868"}.bpmn-icon-group:before{content:"\\e869"}.bpmn-icon-transaction:before{content:"\\e8c4"}',""]),e.exports=t},cf70:function(e,t,n){"use strict";n("f96e");var i=n("7299"),o=i.domify,r=i.classes,s=i.event,a=n("fbdf").is,l=n("4580"),c=l.TOGGLE_MODE_EVENT,h=l.GENERATE_TOKEN_EVENT,u=l.RESET_SIMULATION_EVENT;function d(e,t,n,i,o){var s=this;this._eventBus=e,this._tokenSimulationPalette=t,this._notifications=n,this._elementRegistry=i,this._translate=o,this._init(),e.on(h,(function(e){a(e.element,"bpmn:StartEvent")&&r(s.paletteEntry).remove("disabled")})),e.on(c,(function(e){var t=e.simulationModeActive;t||s.resetSimulation()}))}d.prototype._init=function(){var e=this;this.paletteEntry=o('<div class="entry disabled" title="'.concat(this._translate("Reset Simulation"),'"><i class="fa fa-refresh"></i></div')),s.bind(this.paletteEntry,"click",(function(){e.resetSimulation(),e._notifications.showNotification("Reset Simulation","info")})),this._tokenSimulationPalette.addEntry(this.paletteEntry,2)},d.prototype.resetSimulation=function(){r(this.paletteEntry).add("disabled"),this._elementRegistry.forEach((function(e){void 0!==e.tokenCount&&delete e.tokenCount})),this._eventBus.fire(u)},d.$inject=["eventBus","tokenSimulationPalette","notifications","elementRegistry","translate"],e.exports=d},cf9a:function(module,__webpack_exports__,__webpack_require__){"use strict";var _Users_ssc_Documents_myProjects_nutflow_node_modules_nosync_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("6d21"),core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("adae"),core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("f96e"),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("2c50"),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("e2da"),core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("fa89"),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("95d1"),core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("2eb0"),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("a8de"),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_8__),core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("7352"),core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_9__),wf_mixins_bpmn__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("bf8d"),wf_mixins_locale__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("6b5e"),_assignee_user_select_vue__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("f9ae");__webpack_exports__["a"]={name:"wf-form",mixins:[wf_mixins_bpmn__WEBPACK_IMPORTED_MODULE_10__["a"],wf_mixins_locale__WEBPACK_IMPORTED_MODULE_11__["a"]],components:{UserSelect:_assignee_user_select_vue__WEBPACK_IMPORTED_MODULE_12__["a"]},computed:{userUrl:function(){return this.userOption.userUrl},customOption:function(){return this.userOption.customOption},indepFormList:function(){return this.formOption.list||[]}},data:function(){var e=this;return{extensionType:"flowable:FormProperty",form:{},column:[],align:"center",mode:"",defaultChecked:"",copyExtensionType:"flowable:CopyUser",indepOption:{menuBtn:!1,size:"mini",column:[{prop:"indepFormSummary",label:"汇总表单",labelTip:"表示当前节点无需配置表单,系统会自动汇总当前节点之前的所有表单,并且表单只读。<br>因avue限制,表单请不要使用group!并确保所有表单的prop唯一。<br>请确保当前节点之前的表单配置正确。",span:24,type:"radio",dicData:[{label:"是",value:"1"},{label:"否",value:"0"}],value:"0",change:function(t){var n=t.value;n&&("1"==n?(e.findObject(e.indepOption.column,"indepFormKey").display=!1,e.handleUpdateProperties("indepFormKey",void 0),e.setExtensionElements(e.extensionType,[]),e.$set(e,"column",[]),e.$delete(e.form,"indepFormKey")):e.findObject(e.indepOption.column,"indepFormKey").display=!0,e.handleUpdateProperties("indepFormSummary",n))},display:!0},{prop:"indepFormKey",label:"表单key",dicData:[],props:{label:"name",value:"formKey"},type:"select",span:24,change:function(t){var n=t.value,i=t.column;if(e.indepOption.init)if(n){var o=i.dicData.find((function(e){return e.formKey==n}));o&&(e.handleUpdateProperties("indepFormKey",n),e.resolveColumn(e.getAvueColumn(o.content)))}else e.handleUpdateProperties("indepFormKey",void 0),e.resolveColumn([])},display:!0}]},readableCheckAll:!0,writableCheckAll:!0}},watch:{formData:{handler:function(e){var t=this,n=e.hideAttachment,i=e.hideCopy,o=e.hideExamine,r=e.exFormKey,s=e.exFormUrl,a=e.indepFormKey,l=e.indepFormSummary;if("bpmn:UserTask"==this.element.type)n=!!n&&JSON.parse(n),i=!!i&&JSON.parse(i),o=!!o&&JSON.parse(o);else if("bpmn:StartEvent"==this.element.type){var c=this.getExtensionElementsEq("flowable:HideCopy");i=!!(c&&c.length>0)&&JSON.parse(c[0].value);var h=this.getExtensionElementsEq("flowable:HideExamine");o=!!(h&&h.length>0)&&JSON.parse(h[0].value);var u=this.getExtensionElementsEq("flowable:ExFormKey");u&&u.length>0&&(r=u[0].value);var d=this.getExtensionElementsEq("flowable:ExFormUrl");d&&d.length>0&&(s=d[0].value);var p=this.getExtensionElementsEq("flowable:IndepFormKey");p&&p.length>0&&(a=p[0].value)}this.$set(this.form,"hideAttachment",n),this.$set(this.form,"hideCopy",i),this.$set(this.form,"hideExamine",o);var f=this.getExtensionElementsEq(this.copyExtensionType);if(f&&f.length>0){var g=[],m=[];f.forEach((function(e){g.push(e.value),m.push(e.text)})),this.$set(this.form,"copyUser",g.join(",")),this.$set(this.form,"$copyUser",m.join(","))}else this.$delete(this.form,"copyUser"),this.$delete(this.form,"$copyUser");var b=[];if(this.formOption)b=this.getAvueColumn(this.formOption),this.handleUpdateProperties("exFormKey",void 0),this.handleUpdateProperties("exFormUrl",void 0),this.handleUpdateProperties("indepFormKey",void 0),this.resolveColumn(b);else if(this.exFormOption){this.exFormOption.column;b=this.getAvueColumn(this.exFormOption),r=r||this.exFormOption.exFormKey||"",s=s||this.exFormOption.exFormUrl||"",this.$set(this.form,"exFormKey",r),this.$set(this.form,"exFormUrl",s),this.$set(this,"mode","ex-form"),this.handleUpdateProperties("exFormKey",r),this.handleUpdateProperties("exFormUrl",s),this.handleUpdateProperties("indepFormKey",void 0),this.resolveColumn(b)}else if(this.indepFormOption){this.indepOption.init=!1,this.handleUpdateProperties("exFormKey",void 0),this.handleUpdateProperties("exFormUrl",void 0);var v=this.indepFormOption.list;if(this.findObject(this.indepOption.column,"indepFormKey").dicData=v,this.$set(this,"mode","indep"),a){var y=v.find((function(e){return e.formKey==a}));y&&this.resolveColumn(this.getAvueColumn(y.content)),this.$set(this.form,"indepFormKey",a)}else this.resolveColumn([]),this.$delete(this.form,"indepFormKey");l&&this.$set(this.form,"indepFormSummary",l),this.$nextTick((function(){t.indepOption.init=!0,"bpmn:StartEvent"==t.element.type&&(t.findObject(t.indepOption.column,"indepFormSummary").display=!1)}))}},deep:!0,immediate:!0}},methods:{handleCheckChange:function(){var e=[],t=[],n=[],i=[];this.column.forEach((function(o){var r=o.prop,s=o.label,a=o.readable,l=o.writable,c=o.children;e.push({id:r,name:s,readable:a,writable:l}),a&&t.push(o),l&&n.push(o),i.push(o),c&&c.length>0&&c.forEach((function(o){e.push({id:o.prop,name:o.label,readable:o.readable,writable:o.writable}),o.readable&&t.push(o),o.writable&&n.push(o),i.push(o)}))})),this.setExtensionElements(this.extensionType,e),t.length==i.length?this.$set(this,"readableCheckAll",!0):this.$set(this,"readableCheckAll",!1),n.length==i.length?this.$set(this,"writableCheckAll",!0):this.$set(this,"writableCheckAll",!1)},resolveColumn:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.formData.extensionElements,i=[],o=[],r=[],s=[];if(t.length>0)if(n&&n.values&&n.values.length>0){var a=this.getExtensionElementsEq(this.extensionType);t.forEach((function(t){var n=a.find((function(e){return e.id==t.prop}));if(n){var l=n,c=l.readable,h=l.writable;t.readable=JSON.parse(c),t.writable=JSON.parse(h)}var u=t.prop,d=t.label,p=t.readable,f=t.writable,g=t.children;i.push({id:u,name:d,readable:p,writable:f}),p&&o.push(t),f&&r.push(t),s.push(t),g&&g.length>0&&g.forEach((function(t){if(e.align="left",n=a.find((function(e){return e.id==t.prop})),n){var l=n,c=l.readable,h=l.writable;t.readable=JSON.parse(c),t.writable=JSON.parse(h)}i.push({id:t.prop,name:t.label,readable:t.readable,writable:t.writable}),p&&o.push(t),f&&r.push(t),s.push(t)}))}))}else t.forEach((function(t){var n=t.prop,a=t.label,l=t.readable,c=t.writable,h=t.children;i.push({id:n,name:a,readable:l,writable:c}),l&&o.push(t),c&&r.push(t),s.push(t),h&&h.length>0&&(e.align="left",h.forEach((function(e){i.push({id:e.prop,name:e.label,readable:e.readable,writable:e.writable}),e.readable&&o.push(e),e.writable&&r.push(e),s.push(e)})))}));this.setExtensionElements(this.extensionType,i),this.$set(this,"column",t),o.length==s.length?this.$set(this,"readableCheckAll",!0):this.$set(this,"readableCheckAll",!1),r.length==s.length?this.$set(this,"writableCheckAll",!0):this.$set(this,"writableCheckAll",!1)},getAvueColumn:function getAvueColumn(option){var column=[];return"string"==typeof option&&(option=eval("("+option+")")),option.column&&option.column.length>0&&option.column.forEach((function(e){var t=e.label,n=e.prop,i=e.type,o={label:t,prop:n,writable:!0,readable:!0},r=[];"dynamic"==i?e.children.column.forEach((function(e){r.push({label:e.label,prop:e.prop,writable:!0,readable:!0})})):e.params&&e.params.children&&e.params.children.column&&e.params.children.column.length>0&&e.params.children.column.forEach((function(e){r.push({label:e.label,prop:e.prop,writable:!0,readable:!0})})),r.length>0&&(o.children=r),column.push(o)})),option.group&&option.group.length>0&&option.group.forEach((function(e){e.column&&e.column.length>0&&e.column.forEach((function(e){var t=e.label,n=e.prop,i=e.type,o={label:t,prop:n,writable:!0,readable:!0},r=[];"dynamic"==i?e.children.column.forEach((function(e){r.push({label:e.label,prop:e.prop,writable:!0,readable:!0})})):e.params&&e.params.children&&e.params.children.column&&e.params.children.column.length>0&&e.params.children.column.forEach((function(e){r.push({label:e.label,prop:e.prop,writable:!0,readable:!0})})),r.length>0&&(o.children=r),column.push(o)}))})),column},handleUpdateProperties:function(e,t){"bpmn:UserTask"==this.element.type?this.updateProperties(Object(_Users_ssc_Documents_myProjects_nutflow_node_modules_nosync_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["a"])({},e,t||void 0)):this.setExtensionElements("flowable:".concat(e.replace(e[0],e[0].toUpperCase())),t?[{value:t+""}]:[])},handleUserSelect:function(){this.defaultChecked=this.form.copyUser,this.$refs["user-select"].visible=!0},handleUserSelectConfirm:function(e,t){var n=[];e.split(",").forEach((function(e,i){n.push({value:e,text:t.split(",")[i]})})),this.setExtensionElements(this.copyExtensionType,n),this.$set(this.form,"copyUser",e),this.$set(this.form,"$copyUser",t)},handleUserClear:function(){this.setExtensionElements(this.copyExtensionType,[]),this.$delete(this.form,"copyUser"),this.$delete(this.form,"$copyUser")},handleCheckAll:function(e,t){this.column.forEach((function(n){n[t]=e,n.children&&n.children.length>0&&n.children.forEach((function(n){return n[t]=e}))})),this.handleCheckChange()}}}},cfa0:function(e,t,n){var i=n("53c2"),o=n("a0c9"),r=n("b027"),s=n("c807");t=i(!1);var a=o(r),l=o(r,{hash:"#iefix"}),c=o(s,{hash:"#bpmn"});t.push([e.i,"@font-face{font-family:bpmn;src:url("+a+");src:url("+l+') format("embedded-opentype"),url('+c+') format("svg");font-weight:400;font-style:normal}@font-face{font-family:bpmn;src:url("data:application/octet-stream;base64,d09GRgABAAAAAD4sAAsAAAAAudgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFY+IEq7Y21hcAAAAYgAAAI5AAAHRN+uG6xnbHlmAAADxAAANBYAAKG8CQmG52hlYWQAADfcAAAAMAAAADYY7KABaGhlYQAAOAwAAAAbAAAAJAc8A79obXR4AAA4KAAAABEAAAGwpeAAAGxvY2EAADg8AAAA2gAAANpyjUcSbWF4cAAAORgAAAAfAAAAIAGWBHduYW1lAAA5OAAAAVIAAAI9ejh1lXBvc3QAADqMAAADnwAACihWzTZJeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR+wTiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgOvGB4cYQ56H8WQxRzEMM0oDAjSA4AJHkNWQB4nO3VBXLVBxhF8ZMQAsXdXUuwIMXdXYoUb3HJNrsIlnBXAZx/cpdBZn55yWMek0zudx4wG5ilfRqD0UlG/IqRCZ8dmX5+FvOmnx/jh9+P+zjCaL7m/58/Icw8Di/x375PP476mjH/53HmMJc/fP18FrCQRSxmCUtZxnJWsJJVrGYNa1nHejawkU1sZgtb2cZ2drCTXezmT/YwwV5/jv0c4CCTHOIwRzjKXxzjOCc4ySlOc4aznOM8F7jIJS5zhatc4zo3uMktbnOHu9zjPg94yN884jFPeMo/POM5L3jJK17zhn/5j7e84z0f+MgnPvOFr3xjyl9rnN8fC4ZPs1f0u6nh7z9j2ErKvz+pYVupYV+pYXcpd0LKxZByO6RcEalhjymXRWr46VKujZS7I+UCSblFUq6SlPsk5VJJuVlSrpeUOyblokm5bVKunJR7J+XySXkDpLwGUt4FKS+ElLdCyqsh5f2Q8pJIeVOkvC5S3hkpL46Ut0fKKyTlPZLyMkkNDUl5raS8W1JeMClvmZRXTcr7JuWlk/LmSXn9pOwAKYtAyjaQshKk7AUpy0HKhpCyJqTsCikLQ8rWkLI6pOwPKUtEyiaRsk6k7BQpi0XKdpGyYqTsGSnLRsrGkbJ2pOweKQtIyhaSsoqk7CMpS0nKZpKynqTsKCmLSsq2krKypOwtKctLygaTssak7DIpC03KVpOy2qTsNylLTsqmk7LupOw8KYtPyvaT8l2AlO8HvuvNYOoXV5IpPQAAAHic7X0JnCRFlXdG5H1UZl2ZWVXdXdVV2V1VfdZd1cdMd8/d0zM9933BHAww4CC3HIOsAsoheIEuDAyHoKzgqrCuCyyysOuyLup6rLrKt7K66uK1qOO338c3XX4vIqv6mp5hpmGGn/6msvKOjOPFixf/9+JlJIMZ5g9H2Kfwc4yfaWAYlNBxMIoL+XJFTA2ibiQjIYpsOMCH20b7mpv7RtsW7g/eednAvU2rqv9eLYhmh41eaGjBz8GtNRBi9bz06LXtzU7159W/D5ZTCJXtAYZheEjnObYf/wxS6WRyzBAzCqkJCVFHTQg2ViGeLyczqFRMppJOIuXwCcEORBG5XAmUk06cb0NsPJBwdESuD6AU241aE4LIQgZpEPS42ioo4mOKKCr4nbIoyp/iZcH0a0uqP1IMlEceBf2T4sFDSFerP6qOIRax/dVdyxDWDNyJ/ZYHth6kK14Ee9sHZwb+GcKsGZZ7sOHxGLiiRIIsRi8Z6ti/yh5Nwe2qN1cV0WeRX6s+pwLtVDSokDiqf6cGsa6iIc3PEBp/j70D/4oJM02k1KIgWjGyM/AgLlfKFTgrV5CBKuwdq1Y/sdVqjyxtae77Rtv/sLGeuDMaTEezW6rphvsj+Fdt6S0dwY7ISDLRn/iftPF8r9M6GmiLnv149dL7Gx5gEKT1Q5pWw+SUHLMgWnalUHLqqY2ntPWLj1x7nWod/Msb11xYoSmNJ7L9qY7r1OC9HWv3V2gSUI8sxH83+0U2wXiZIDOPcIyIhKCNrHwFlYsplBRl3JowWNOBNcYWyDrIlsiaYR1Y0WFDre5UFHRIjZENnKgGuql6dfVqdA3GHIue52CDWI57nmws7qhLbILEEJsSzQCN4KafjAcy+eNExQhQjjvZZ9kWoFOOWcqczVzF3AKlSYqEZoJlW3YUVQZwpZzqRqlkykmKZZtctQTg1mSqG+5UBpBdC+/egisYwnYjN6xo0XvA0KkkqeUynNkCqQe7XIGLcCmZEgwEbE+uibaYEsQUvYV+d+E5O+fNV7XKnLlrV/71hk03rBSEaOOVK1dtZE3v7u2b++ZI8tyBoUeeHF21p9m0e3sePGvr+tX5EuJaWuYtXDN63+C8RVy0eU722vmrRpZ0dCI0PDC0bMlthXLQDKZSc0camvre2VNu79x/cV80mQ+35kLtneFsazif7O3ZX7zo4tLFLSPFkVa4xSZwubRl+4XbvrB0JJ1WG5uu/MTmrWvX3pRu43GOzWXXbti96bGhBf3ejs47nli/ef7CFR1sNrNyzda1q1aUe7ze1mz+tgeXLs93ZLO4s33xyKplt3ZmRDlXKC2a/8H+uYmOi6J9F5d7Otv3v7OviWQlG+5sD+UgK2xP70XF/ZCVVshKC9xiGB/U20OU/1ioQ5VZwTzCHEGD6KPoN3gOvg4/z/LsNvZR9vfcINSmL+7jC2LFjJdsX84RYTFhNUQzxhUq44s9vgzypQzvpJwSrCnbMfhYeJAjfJsqweJkEPxhnyrVjuCYnJJjuOIG4R0Dm5AIMskeFgPVTugBOXavYTPGFwbDpQwXzzluc+Gm5Scm0CxhJyOTHJGcQcyYxkHiguhpqSBC1jFpKnCZRNsEDS7D8lACi0QLpYBMS2TDObUCkDJBxseLhKGgkHnedGi2ydY2C7CSJSaTOCBManypjC8ZjifZF236IC2zRNu9ADcHRdgUaLiUmwJbixNiJUnEsCskIHp1PHIaJU9iMoBMg7g0iEpAm9IgLgwqpQrchqJhEgkhEy7EUC2n5AiukXgRRE1iJyRshOgkRxxfDI5Qv84BgyrZIJpIiWSERE8CQBw0AYgKoiWUHK8UK+4YcAVOJJJ3GlGJxkGLwqEUurv6d/95ycHqiwdVQeU1nheSgiJxGCQSFjiZ6+BlHn4KH4WVHHAhGYQWxyEEWzHJCzw8KBzmOR4uYixhTZREuAULiBIDy5j1wYksg0jjoKPC7upHMieAvIP+TSIbWCQOYuUkxCljv+E5iYcTjtNglVhE4+NkZJDHWR5D4iw5kjiZF3neK2ABG5CeG06EqEQIiVkSnd+j8KIAJ5LEQSJJiA8iFWEXYSVRZKE8NG+QYcSSYw7KneTIZd7zOCcJcBmyYEIuWMAaGpJllhYDUkdQZHrAczIEgp4B1xaWrvQnsA6mxIFSoRt4KC9EJLDjQUULQURwBXoWyAgvu/mBmBFdYI+QBCvcR1isk1BgIR8sN/YCRAuRkaD0h5FEjlhSSoiLJVHx7PhNknEZ/xoeEtxrUGc0ZotUqQZPCFDBCpbcpEUaBvIjHfkkDxQkzwCxITnIMVYgclaoZxkjfz3HIo0bMsvj14A45CZcgzPCAxo8hl0O4mSJF1moVoEnJRTqz8tu7Y0B/YGmQDpBE4D0UMOkFqDWYCVcA7cpj3AkB8AXwDOsyXKKGIYi1OgPlKKEltBByAkSlUZV9HMqsADhAs5LU0CU9BrvgdzyEp+kEVKOpNwJXAhXMCU7x1cXQigBu8wIQTwy8iCOJ4ekrYSBNkEBWouqyHyN74ErAzwJAv/WKORa1lgP9pN2g4KEDFYnvQlrAydwtJpIsVhoYHBVCCLaAgmjcHyjh2zZOou/Xn0R9eS2DDz11AH0W0J3kWAUShQeyi7X655H47zKsrRi15KaF2VZQfKk1iMGOQ/HNROmotwtQyuflLJEW6aEXMK4rRMJ8Bxcdpu0NrlFk9VjuxHIUAaNq9GEF7UooWpwksSAlaeVSRsAT9iRrfMpMBBmsUt1iZclIgfq7EKCpGr8ZRDCyJqMCPMTdmFVANpyXWppLCeMt0480Qw51iJllYEM/ZT6Hl6dCKU4rMiKnK7CjjQ3aGCYk4AlaozCu9RArJfKNBYpqJY4oY2MSByPUiYjdQ9V4OEaeI9Myoq4BMeTW/UKhduT+DMKKz3k3FbWhUgUHFeTyDKfAp6RFS4PdJUIVwrSZBYU6jLaEoBkLOeF+5Is+OAqSPw4rLwCAI9DYV5BnFAvmITaXG6V+US9D7B5EKu4l9JfhAxFWFWlVRY0gJ0k0nBcnoGmaQLVkeittU4qUnkQfZD/+4nwhg5Bpg1aE3hSbsIcIB+pqOOoIKjJKmAHKt+ghgXWywrj1SW4dSOOQDhW0KAhUhlH43YlImUauS5GUU2QkthBwJHMgsCGHpAIMNoHgJSEihLkuoBlJ8Sg29lArRHZzdXYDnmh32F5mVVI1AYcClqwdgtEpCBztGdh62mDYAbem9wD0u7GldE1/fMu9m9Zh7EA7/cxA8xCgvZ1FnA+BiBP4DlF+hMwny6ppLsAsg9ATdoAJMVU0Ey1wgow/fCmR/5sIRqa2//AZ1evuynVBspo9IoVOy7YsGZVX79t2x2dCxdv2bRh04IFqSTLOtFLPjpYvjDzja98JXQH2ty+IMEm0OLrHnjikYHBpXK06erVazdtXL/2fclMDiVbFyxct/KTwyOZotewrN7yqpUbt6xY+s6BPzDJ0fhH77gDpe84e885e84555xo1mZkKN+DgIubARPbzBrmabQQPYD+C+fxfVBOAHMFswAoDPAjHMApQNxSIdCBauiRgp1BdgogBsRDlDauhoYNwYwpAH4Ioop5KMYhwDEjOBREqhQdi44LMXkCcDkT/nVwSqCqe14Dw5gAQYIaTUMxCSIfpDB1MEl0RMjQBJiculD0Pgi5RS5io7irjjAnL6kajKvBQhfM0cWFhxwpgqeONyFN280DO6EalNwVQCeozpQYFBeyBA0SMmB64ILDQg2JEvBZiIkkDSC17YLBGnrPKA4cg4qBPnPgwG0HDly+48AB+BdEj+DxiCmP7iIKaJEc6ZRtkCzwayMbgY9BF0pEgMAqoCcKHvFVIutZwv4EgRFkISEdEIdABDVtCSyBk6wCHZXsyn0MwLCGowCbIJ5cga6ASH/k4gKRreFIACD82O94EeEJKU4CYNLtkERps8PkedLsSe9B2yoRNrWug8hdnYAMcnsCc9FYatAIwmAKdkixQAIRQcMJEo8/D1K/1jlRcQV3eNLABSIuBBfzUnlKyIURj6BfHA9OuiPpyCMUN9MwVAoqbtFpXkjH7BIEroicC44ISkIguvDnaPeucAbIeIOABBDlAGV42vV7ZEEI8sgviDxyl0akwg7+KpH1VOSSDIz9OxFRtCY4T13usSqIKhCodVKQCiQLdMWsh23CrIdjPTKgJDcSggGC2AdA2odBmkNXgQGo85je9RFYFieMdNsBGxjpuu3oIyAdESkU7elqUJdzCcNDZwkRQfk40gWsnMCxpPSAvbCkQ+8quPVMMQPpj/2KRCoZZLQCuFCT3D6Hgx6IJaoBVAvhGZDshIuwK5BB3msUv7s8QquZRup2RnUeI6KcoD4WE7hBsQWp3Tq4R9B3SHQPGYXSU5BVUwHgCRZrdXRBqAfsAxwoYCL3oQPkUPXLkCTNbgGyJ+BavAIF6VBSBCCEFxSRUsCFY3AXWhriRSMJ8UHBWK72F1md7QRgRPgl4GK9BkEMiJ6AAK035qnzAlkILqPRybIE0QlelUACgc/AMTRrkahM1c8TJZAjeiB0c6QMGqIklwmSIFwj1LA1awgU63CiRiAgwbMUthMswdF+EABRrT0COuWJfjLeLyO3/mVECc9Bj0+LgAAOEkqQI0xQrAsTPAhDX4kYYugbwjcxBWoRRsQelkyJlk0MVmI3IpYv0m+KOk4liX04XykXiK2MdKDYN3D5Br9ppzu3aA+uajZa7MaEHU4kzr0o0zVoaeqiXUWPH5m65NOEuRcskuT48uICfGNpx5x5t1Ukf3+zcf8qkftQ+sIL0u1dbIO97txcYV0WoWAD5A7LwxcM9F9+dmOLa4tkGPxrfAscidDvMQFfYXx5fQ/54VvGPoU31VcI7vaTz7BxeEZiEoAFljDbmIuZG5iPUHtpHABBvBwQHGo6tS2CC2wCCcoEBYhJu2bqs60ywQU8MeIiagCsUBPfIBCn7F4wXUviACoNIIAWvHuRPlsqkthK3Qi5MCNB7tHnSTgaP0EjTjKD0OGzz0bXP7enUP1m4Tytsc0fVaSg1uiTdDlcaNItVWkMmdLPm1UhqvPtiaDJ6X2Lxn7T1OBt0D0qYKImj+VVDK8nzEv4z4NEcgB6bMbeUMAOCNhz5BM2BwJQlTyBhFcC1vbgzwRaokbE9rWynF0pFTtF7Bn7t9aIz1m50ObYVt+qHgHnH3scJZ/csgX9K8heyQ5iBNKQ9ESgzOsa0bFWKqYnovGZAU8grZ7VoWhNvmTAE4oYAcHb0uixDM3SgtVv8EG1ySt55HlzfDoX0PPvKIuynw/rCVvuCiUjfNhoDYqDcyW1+oRs+2WPYHoMVYmEkmJAR3rU9HfKqqGZoRw7yTZoMM1Mnrmc+WfUhi5Dfw34cRs+hP+HHWXvYL/NNXP7CPYDmtegH6nZMrAxte12Y2rYhWrVgcmh+voB3hDG70AnbKQzuBM20Tkna6OjEOTkTXQ8f1xzmnOS9rQmfgZzWumY5jSHdaHmyZhfZ2N9xfxJG18ddKKmS6ARd0KmSyfg0uM41kObP67x0EGHhy6yw6EN1/XNXY24hb0d+eRwQTa6cvFVy3oishVatVsONgGGkYi2u3mzP6kPcvqbscZ9DvDWW2mN49ENVEN7C81x8tg/nrw5jsMfmL2NjB/7jIvh3hojmY4efgMjme+EbGTcJwFIvAmT8n+/lRZlaezwW2ZR5vBfnrTtlAOgz83CeMp99C2xM3pw5C2wM3K4iJb1916/OWqa7xgauDhiplBibmtlf5MpRnpGV8dbO/N+p4wMH2lQ4cRC6Vcnb8ODlvIWGfHm0Eb3lhvx8KffEiseuvJNmtEeIKLurTOjsaNvzo6Gv/b2GZ5BpXpLLc/Vf3iTJlYg/JuzsYLm9eatkq7d5c3bJY/2Q3gHc/Wp9kOwg5MNgvlJFsFT73cQOnTo6kOHdra2HDq09P77T7lvwfYVK649ePDag6F7R+69d4QBPXE6vc8Hil96yik+g+34lJN60TRT8ykm9UMz2aWn+gvNn9lfqJIwuBg0phg3iGN4kMvgQZzhDAxo+jjeQodByhnEu+fmm8nWgFbF3XwzaX8zXD2Oy9Djb/TsxFVqHpnkY+Wb8LFiRAsKNcWzqvqDu1QLPT3Vp6r63Y+pQfTcZH+qu9gvAX0aQGNdRukzmQ/LVEF1OXHq2AThtjK9fyy3ohT6xYW7zx4cUtTeuQPrVjy5duPQglWS2NRw1eq1mz3GymHCNOxQ75zhxR+s9Oa9yfSQs2bJsfyC2ESlvHX7Bdv+eslIKgns09/7wKata9ff2tbOodtxW3rRkpVLb+7OaXpbNve+jw3Mc0xr/7EcexhGgXJ/mP071mEamQqzmtnHXASt8ErmGubdzHsJFZyZ6FAjQ74wiRA6qo3Q0FY55TnLpY/bMPOF/CTqdROTjEs9k3oJ+ZwACERx0op+h/DuHVuH5ltmtDszPPz5zduWjZxnWg07hpdu6Onn+W0b1vX2Gd72Ymlk+ZNr1/fPbWqUle7SF/fz/LqVy/JFWS339C0fvnfR4q5sNGiWC7evZNllixZ0dApSpdSzaOEdVzQncCzel969B3VXf16tRr7i/thEd9eKVTs3PDG6olBq141s94c2bHz8nnIlqOdQV8fy0a1rPrVwcapdaY4PDW5ct3nryMbzOzrah5euW3lv/5yGBk9rcnDooZVr+vsWZFPJoXnLltyaL/qDDesHhu6av6gjlrhKq34QXRuqPolS4fBIKLQ+FBoNhYAfveM2FDKOtIX5PGhjy9D9aAwP41vw11gfex77V9DnLzvOqNIZT6sznlan1dNqymBa5oyz1RlnqzPOVn+MzlbTxjLvPONudcbd6oy71R+juxUjjet9QaaN6Qbdpky9rubXNZwggeJ5ohsXXUxPzoPkToKcF+n7EseE5oev3rd3zsDAnL37DtcPrt6/Y2upUilt3fFy/aBtOqqe8gA9yE15gB7867GwsTLuY+WOL76D+Q46Cz0DJBjFfzOLEUX2jPvV2+V+dfKja/1nfLTO+GjN1kfrZMd20PAZN64zblxv0o3L9Y9im/Gmcf8oM17ia+uLE25ReNOePS/Sv+sn/S322/hVJsKsYy5j3s8cJD22IPYi0mNTdyd4GrrocqkXFYktjnTcMdKxFXL5QWSZpBMn10w4JF1eIplByVKxUiTeUaluBIf5SqEsZnMCte3lqYU8lc1ZNjEg1dZyIKEj0xekrwAPoJKv2I0cPp6Pkos6cuKJbnJxAKHh1jxSBDlhRw2ElqPIMju3lJiGQQQADBIUTQGmE/xYUAgl5WhLVCb0VABgKzqgWywnCPdqyfakRvg4788GD5qZgF7aXII/7ittKRa3lMa+jPtaB1paBlrHvkz3eHfO8Vu6qhnBRnzjjTgXsdudXMbVbqmqqhmWx1D9ICyBP6AuFfgRHzZyjoKslNB9XsS+RxNAW4MfDwdW84XL4XdhAi0rbi5V95c2F2GPPgz7OS1zW6v7W+e2wB59GPaM69cOdXwH/kitjg0mQPzgCGwynUrcjIu1/Wa2fORXhw49j7vHvvl8bY8/MvYxfP43Hn/8cefhhx+u8csa/AzDAX4LEn4hEcV98cmmvrvwM2PvxHvGDiL+nnu23HMPfiY8th0/0wkXXifnW+4h0XA1f/sEYzMFZtC1bB/tbe/Yk42yU9ztbfEY9kX02saH3z2T0720ftWK3j5rJq/7lYsnm4jYxOIDMzndp5LzF66Z5HNfWl3zuUf/MlkxnVw+932C/pN/m4DAwRQLAW2WhKiIKXEWbxMc8SUK119mDzs33SzqCxLRpmvzs3il4FvOovMfqf5FdGv33aAz+Ne3L7jsQ6MzjU3uYc4/9SNlNR/MUz8+tn7Cs/KUD47trvlLMjOO+e5jLj/VdOWP5jdBPPU0RvgoDtXD6ikn9xUzcLTVEpg+3tY/q/G28cHc2Yyvhd1B2VmMpj04Pr5akz+vsZ/GL4G8TzEdTA9I65k7TAuuCR3kVXgnkYSr5QAI9EoTmhCu32tf0g5/3Nu+pK1tSfvYP+LezoGBzsuqn7m0a+7cL6Fg9ZeXjo52j47il+B2dZMbDH0K9tmBzuqmzgFUrL400Ik+1TlQ/fPqL39ll7tJeGaGfGZOMp+Qxe+66eG+WvagH65l77LOWvZa//nEsvaLT2YgA3hSnpzj5wdgBs3LMfIw9mXIwTGTdpOdznNzZs1zbvOdDdN9Z7wRzoLvLp9oSzPJrguYq059n4BFcmCTmTJiKEVvkxunoY8Ijdp2eyp4IJzLaxaoZmG/oCA1aJ36WTHmV383z852mO9bcd/qlqX7R8SmoKgK8QXLSbsSjxo/v4b5AHPotI6c24kpBi/AclMtXjF0lMnrdI6pZwYvnGrj4VoX56cYeTor0608p3zgfefIVEOAM6dlsh0A5aYaAqbhzDnMyMnjzGO1nZNHmyuP3RhOGnO+dGz2nlrmEtN38mWuY8hZlHEyKDzpUj1Xh3niuB7t9nsFaKX9oAcdq7c5Sq21qeoFqrZD1SCqw7Fw+t030EoRer3agL5efdTatWvXu9DG6qNXoK/iV99QmRyu3oCufe95555r7t27F6248ELaT0LndQB0yxHmCdpr9SJhfBWaUNAmSrtVsCq9oMWXiqkCMejnyinodaGKOhC1EZAXmXj3zSj6IlQG5cRs3szbvciiUREhYQbtHJEe/ciqFPLuUEAHMuPk0MyRjtg9hvCESiYNY/aiIEgbR0j1IjJqUErORXTgAPIA/0KxgF7y+Od+MROQMJK8Xel5L/8g0sR7I7pHELSGBl0K6aZgwLb6Ai9wekAwOI/gV3iEiBFPlJo0S8GYF1msLbvrYkHiJJEzfosG4EhUjOrzyBBlMj6jqtXffJUXWEHAgvCDH/RG4x4RYcHX8kJO5BD+iJK+vnkw1Bxo8eQS86IRhJxGw6eroajNxvuDikf3NQVUDUFCuikGuv2KhpGDJDEiK02a6YGIeYHaTHktJgsOxyv+gOYIgsfUZIflJJ9Bxn9Q0CqiaKfS4m8yC+H3NXOobgO6Be+rzZfk2gbifCvf6oufxXaMpfEN1Wert6NL0KVjDXjf2KvYdr79lcOHq70UJ9V5+ARx0s96d/bCH0fc/dhPcaSjr69j7Kewxa/2nNVbvaX3rB7Yoytgv7+3rXpLW29vG7qirde1PU2MGfUxy5kdJzNaNJvu6MTGkfbNqic5ocGmvz3J/mDqPAZlZohZfLLSUQyawAL5gnsnWQmS6bFmISmvI/MbXXKJ0RzymN6hH1dfPDgLgfl/Dh5EPTm50ZINXOS3b3/qgKszEIzpAMYsgOzZeYL4soYZx9EJuWDW4UwdYVLOEYPTECZ67cI9OwePApKXr1i5gW3gd2/d1NMnSPOG5q9b/bnlK7KFZsvq6/skgIFVuTxePn/RmuX3DAwt5GLNc/LXl1YvXdLWzi6dOzRSx5HpuaNAGgIXL5gKF9cAXBRwDhXy6zbu3vTpoXkNjYH2ziVLntiwef7iFd357Kq1W9feU6roRiqbo3CxM5Pr6hgeWT3yvs6ucbQ4EO+a2a5wHnPxafIlr6QAXIinx4X8fT/60cM3g0az94c/POUo/LJ8/tk9L1wdTM+9qnzjUf66c2epy9Uh2aw8dNsmUNhsfHIn4a7avCiPsV9gGxiJ0aiPdoh4dvoAd/gKJSTaFQNNrPhh5Hvllep9y+Ys+xas31xO1+VsQ/jI53Isn69eN2fZnM45y/o7+5fTPW3L+/CD7BqgXJCJglxnWqErR75CvgydNSAFsk06InToACigzxeJtuEe4gern0Dbqp/47PoNq53mZHpdb28s0pzI8qVWr7+xaUHbl9j/GiuvW9N3TcK/uNK4Kt2+pyWdbHP2+4PZgWS8bn+Y8D8nXsYzz1iZM1gzg4kbem3eStcbvTZ7peuUXhjExEPU9U2HIzHbi7LHm87yAMdhtJuM9XiIA8ju2+hwKGa523aTvYcMPe5GmOP8RwckzhnTgt16HCf2L59gtNPT53ZBwMjRqWePol2EiR2DdsAZ8UrKFp3jeeujm8R/WYOUNd99evinw8cpyCv8x8bGrnvfyy+7dpq7a+9zk1GNKQknRJntn5ISie+j6CaSHHrXtMjV6hI3G0fzRJzpPtYspjoCtANYp0j6jSgCfA7onAw5Ha+YvTt7enZeQja9hQ35/Ia9ZHOcAn+zFho2di00bJijZM3I7GRNUiTzN9QfGFfqZyV4yvnMfFn16+nW80s9nd2RMGdZndFls5BCq3EkvLnYUyimW1sFsbkpn7koW2wORaaVuTxL+SrGZ1U+ovrNojC7Hnuc8qprj4lA3zuea0CgR2U6P7nPHYcr6LU9O7bOm28Gm89euuQvN21ZOnK+ZeueXSPLNxdTIwvndUB3ny0Ub/rgnIFEUgSk0b6XTWS6Vq3eteGJe/KFtG5kuj60ftOGLfeVe/zq7a0tAMIW31oodRD4MXT3ouHO5vgUnoowGab3uPSdhg7QxJtMcdDmkhMknjOwbuVUEjfWKdzXfzshsJFKDw1vaFlyIYgAu8O7hE30lLfsADTkUrmxv2+cyh+oEzmTjRAa3zU4z+nYECmuGFv4/lxxYuytziOVWfbCdDoTnmDhWdnxr9uwvueS6o3o7n+aBcfcvWhR97bm225D/oeOaud9s+P5GgybTVG2Ap6aRSEupdCImemdunOgnz3lI1oz6zGnHH2+awa15xSD0HuOVpL4Gd5jPF3vMJ62NxdP4yuLM43pz5/NmL4rG1MWgUOzsj9OCMkPXjsIWGlwFlr1k3VxObKl6+WXu1zdEATNInwnk2ZWMGuYDcwWal2hkxeJxLySo4Ui/j3xSoGiBOK3kyKeO1AiPk6V6UnhYIkTktTDEf8ee7qf7rUcXteWxA3edIvXZrHVMDyCvsKj0UU8ZxuOJ+ENNrWMLq0uRJGUmUK1YAiAaHhR9Scxr8NzIaNFSxgmaowrL//kJwf+17M/wXdilM92d6fTobZWM2pGGp2ODrZrY1c8EWzRE3Y03BRv7+7obopMhPFouhFvs63OzkQi2Ko5FgmUSpjmpZZ1Gd3W6n/CZnsB8+WTsNYmXEPmuGk0R2yj8Ngk02i5kqWm0Uq5mJwwjXagOigTs7nJNlEBKB0jERB9KCgKTiJlWqAlmTli8+xAxARKraHkMJd3jaFQJznCjb0oWcrRiiP/whsZjf9Ckezzw00eYvhUi2033+zzsYrXx7GipHNSIKDzCueVviwHeRmLCvH8ZjGHzTDoEyLGuT0LZczzrLS3sOBGkbycwL/4aVElb7Z8+j0CcVCr/joRsEReUK15wwbxfH1je3RaMIZ9ZsoIarbYGOpox9jyKrLPALLLgtbaqGl+VRDloKA1qTqyeN4QWDMsiPRdEJ63eQFZyKOqEstaXl0ULVETiV+qN9BsRvJms7czryBUs3HfhM+GI+jHAnwrTwyku9GH0IeO/JBNVPfjs3/843XVIfTcKxP+Vp34SiYJ7egm5g7m49CKgqYgpshLuNAHW3ZJLBWor1vFJrtSwSyQOoEWMR6qAvLBhg20kTKESpXJpxmSqUpKhI1YEIlHHfkiAOEA0yDsYBOHDQOZTom0NxGCkt2UhOyEELTyZeKUZwWFRLJYRvdaVnokrQk9PVIwl2MFn5QIJ7RIs96yQ7B8utDgS4+kVKG3V1TTy9oC4fPDgbaRNhpeTS1LWRZa0oKMaKOaCMclv8C6cbREHK0hpjtGrEFtibSQG/k8ueGEHS2U0P3NmcxQJtMcCIdbIxF8ZWOjoKVG0oHQvnB0K2rRYxHNCSckr8Rms6IscZVzKhKknw7a+5Bp0wz39gkaXLGs88P+1EhKEypOtp79hqjuIBqJm3YB0vZLLWGaKYg+2qgl3OhXZeZ1d8/LOJFWkpNa/U0Zl+kmc9ydaCsXqe1cTNkVX/wNx2GwXk2jB7/x2mu/qcZOgN/XVh9GW+2b33vffdV/G/fd9OF7mWZmEx1hJ59KMY/ywqz7Ydb1CuqIaefoaIvrihnDlimM+2GmioNsknZjpSKEEbNmrffPu/PXpUo1L8y464WJXutoSaS8qrc/XYpgPB+Hi+m+dCrRcp7MR7yazEmC4g3rIA0UWYtyjcTNHHkrfRUvHa9oIK6wXsFjCFqRxVi1Es3DzQlLxSy3oXmtU33NWduMD5qBhclEa8QXjDg57mc/47JOJNg2klwYMNeSF1yoezJCEsYoGElZDf5mOSgZHIe9fr8Xc5whBeUEh3nbE4vEwpj/D6T5g6qlqapmKabHh5K9T98Av6d7XZvChF/iSfskzsr38ETdDce7b8TMgO8uOH1eFqdhbor1k42Yp9GT4lj+d6feTn4UNjz1NJ4BSp5iUm+cDjzJfAL3s09De1OYEPSZJWYJyLPzmSvpjJsPMJ9hnmG+xrzM/DeZSeMYngoBQnYLSEjn3LST7pAOHUtOJflaK4V6y7sTaBYSIpGVRHGGJ4opWk0U57omsGKSr0WRp+iVhwBQ4WXiCENuEXBL6p9O2pkUamklK+RMrMcCJ4na0BKtY55Y2UR3gJFyR3La/Xo2yX3XIQcdPpY7hTaS0VBA27FX03kt9xXNYNXlXWLY4EJLu7mx36uKoEr8vDjnC4ltqwXk+QOn+EWPLAflFUsAFs3/uUeXvcrcMO8LC22rJB29W9OxUgyLYS8XWciNvRDm1QYh5McRL9Lxq4aHRVnOGxKbGjisH/mEobM4B8nxGYw8+JcR7MkLRliaqyHP2KdUDUuD6zQfUldWBHRI61ADYSPq03hD27lKQp7qXNXDKpvPJ1nfs1LAIVnmFV0qblaxz1M+p03EHpw8pu8Hugx7hbCPC1soEOa0tSgQ4nu2KkCM/KZmrCCRVyVuYBUUcvsQmQAUc6ZPYoUYByWNpbDEa2I2qwWQOtQtBox+5LeF0jo1oG2fxz6KOzaMqqxPW7VO0btQRD9nh+ZHSvmqAUnxwukFWxQc0LbuldQe3Da4QAuy6sqtsn6/zxKWNrH+kBCdL4yyJitS8BsKIpwVTSMVsPjhAAqGOHM+yyKelVXWsYSwn1VzDuSwjjmmj8udplG50zMYd5pG4QgtPePvYHKTRqzWMs+gRehB9Cou4EPu+NWM742eeePybXvjcvvUd3F3nnmd8szrlLN9nbJxxje0cdeZlybPvDT5Jl+aJGMx32Qd/HPotTU6v1vCgc4kFTQLpE8BXOrgS77zXbzjJ18cO4KuMtsHDuCfH/kvvOvm7dvHjuBnNbNjXn3+gwk7wwrmEuYK5mrmOuY9J2FTFB0dTbfMTra4upZZkQyAmMG66k8ss870UNPtsm9kvHg3AMJOQ7JNGajiCbS2AVm7vUEWe6SgFJA0ry/T9n/vs1Rbly0cpIH01H0BMYCxLplCQFa9Qe6a669ffO2+60/A9rENN5Yzlidkqj7NMCwzjButcMgfUE0pqPk83oDZFIr49EjYsjw2hksQKmB7FTsSgDBiwEPC2EFNG9K0efQ/zZbbfpz3To628tgVYgMU34hI/OuvVz3o8P87gQKe9YEPFKuvIvu2mv1wGD9aG9PfRWf7TLi6g49WYDO1xPiKrtWhNlwsjPs6ptzBrzyt7jzhAHPSTfP415unX0eHD+zIxoj3Q0tzZiOSNmaaHRGJiVh2x4FrNndEfILgC3due21bZ5gcRjo2fwEaZENxx+s7ig0iF6zdC3LHuUqirV1eX11PLuNHg6rXF+GqrZGgTw4GZV+gAf2ARRGfVw06wFCyosi6HAjABo48cvAC4CwtGNR0rk1V3Duqkj3+xd9NXKTffTjE/i3gRlcPLQLttwAOv5q5fTaaZ02jc0dPhNrbEkS1RERhFGZUIFPjn3uoxUq/9kC1RKibQr5cb7HHVgy9qzIq8ms7d3t0Qev4B83g1Pk9csgj9Kzlxl5TVEFVM20g0MJhrrWLszjJgx8H7Y4NhTkjLMYiIvneA6h3fIZok11EvfsMdBeKRypv0CDi/evptx6IBrfgbMEvGR6fvrMfsIdwPJ3tEmyAwkNUIlCD1JVEZ8vsVXhTvaCfVZHEqWr3MkM1fIaxMMP7eCmgV19EDUZ+Txdoakr5wIAo+1HEOG8b0fO2nks+9QA9sqxwLTYoqWx4mGh6fpvvjWA+HEKhHJkbaUY7zjmn3ko22W3glCtXayY5GZzqMeYpLgmT7DYiYzBNTCczwKwECu9nrmFuYT7OPMw8wfwD8y3mp4TeKdGOlyvQbBwQThb7p2muwf+85IPfpeY0LZT96fDgtdde+6dtpkEPFs87OLbw/emRD7/ctWUL2vanZpqZ4HHyLSCLaWUqzDCzmTmXuYx5L/Mh5j7mMeZZ5iXmh1O+DPQnydyTvzK050+brSc+XfTdPzWGntHWeDpmbKg5BJ76EY0PLhl3IDzVIxnnFesOh8o4duQYnQkyCSbLLGY2MHtAp7uFjv4f7Yf2NiHH1FHOadzbBhnR60e5raHX3iaoWPum3VocIN7eAZdvrfpS+2xbxZw83ts9TvK7Ig1OV6IrmQw1eJv7400t8ZAZ89hqY6SlI9mRdhrzcX9TeY7ZEDYavBIaGUgVG4KiEDJMvaFo+hS5IZTwR5seriS6gl5JDAe6Y3qoQQyGWuzuRp2Z9q7oKHM58zjzBeZLJ2EpmOZ/4hzlfwKtfbL7SWG6+wmEEmvuJ2SunUnuJxXTEY/lfuK8gfvJG2nQSz16uDsksU4Lq8dimFV507Akw5Tsfi4icroeyoQltqWFFyOZiGbM9xjhTETiEg4rhTIhxd9pyUBQ02vyKoejUcxqvO21JG9QtuSAT7K8tqDwGGLmFd7yWqIvIKvBpqa2piZT83ptr/cEVPe8z89J4UzIr8z3WL2W7PdDghav8igW5VTsDCXI7bBHn29okDuRb2llyQXdg+YjxR/qDgl8wowhjhZOhLwhG3ItQn4gV7i5GXLNWSTXAblWHIvXWJxvSkej6SaLZNP2TnkXM3XinPFGNXACBKj7ouzAK0HyJUETIGhIdz0HLZsnEqrkCipfMZkQ+TlEeonudy6SqTL63zJQn19822IPMFBJsXX83o8rlo4DIan6S4T9qZ/gzn3XXINX0FlRMzsyiiN+XRCC6qEte8gOPagZ0lNNFzeq+sa76W/p6tVM7VuOrlx2dZQOZh6zmjmLuZi58SS0klMqkI9WGt719snjaXh+y9sli4/GKHtOx6xSp2lCqdMxlRRDZmerfadh8jjoVuYJJKPl6AFUxUvxrfjrrJ89n/0Ch7nlxxsVPfPBhjMfbDitH2yYNhh8zplPNpz5ZMOZTzb8UX6y4Rhj8Zkz32448+2GM99u+KP8doOr7/0Nvn183mgyHE4mZgTwmGFvyY3tum3HDnz72B344uzYL7A59gumGfDor9nH8NcBj8qMDlpqiIkzXUwZdLIVzHpmC+hlZPbY/cylzLuYA8z7mduZjzEPMI8wn2Y+y/wV8xTzJebvmX9ivgY4NV8oOfbMm7JdSXageEK0y8RgXi4leTIeR754x5NP4Fn0E3i8Tib+sfKFfKUI181CspLiSQwnspkUjWXX4iWf9UuRU5IQ6BzHyWHJEYuluC+QL/jilSB5Bw6Un9wuWHfW9vSYE0PQGMzg2K88mszqAnWJ2uX38IqPD4bGCqEAr3pFr64o+DcqrWrF4xeVIw+JOSR0syWI48gLsGHnHveon5cF1ScZvNc68iXBl1Y5/LIPdDm2wY6OZRvCPI8DXlHfPTl7oVB2B+zPgbVU/Uzsllvo/Jr35sZ/CGcxmyXN3+TEubIXuhPR9rCGRaSJX/T6NyBFBeUSRSNSqClgGnfmSrnbc2VYS7k7YN1sQUNV2XADy3saww3+wDyN18KyGEi1+0V/UBY02WybSC+XeOzT1UdRT/UXn7RDGYZw5B++Bvz5W9AkZcbD+BiTCTMxxqnPMGoTkxeZ3HSmFbatsMbJnnj2wNqd8+Z25na5a9aTO3J5jm3LHbkCWP3Id/Kb05OykktvvmUb/G7FxthvsuiJ6qj73uBB9gW2mbYXHXLDIF+BLki0yRSrrYDWiTfu/uQLyeqqT3xi+3a8dseOh9jmI9eyN5C1+h8PPXTR+fsvRPsueoiOa9/HfpSNwtFE+RjE2wiWVt5OTZuWhf1ode9QNRJGPx1AbPWcj905GB782EB44D6yT4aTbPQdZ1X/JomGt/HveGVTR2t7pj3ZUepo7chGyFtRuNbe99L809ZOpmGFln7kYbYd7x17DXurTW5Zic3lk+znIW+ubKjTvpXM7IKAvnyNzjatAb620rm86ZFD7pRQ5tzqA99/4AfvuSY9duBcdDidvvLQ2H2HrnxlDRv9/vf/97nwi6Yvv/e873//0Ojos5elD6J705dfnk6/cd0HanU841rLQ5zsazLtuHWPf7u5LTvp17b5Zlr5hCLZ6ih6AjRv5g+vQ36eBy4IMY0gB1uYNNPJZJki08PMYYbGZ1F3p/EzKecRC23JmSmT/AzXahWhwe/Id3zwm7+rnuWxdeOH+PnvVb34xc7Hcl/IPfoobCZ+P5s4rM8dWs+zazdw880EwojO9+5QZ7dj5HA8NyQv8yclX32yegOkX30lW/0xappEtbrNp+5Xp0IbsZimcd8617XOdlLupMRkKhlCoMl+dgcO/Hjfvg9ctW3bvn01d7unqLfdn10YWrRq2w0bNmyYn6btcHIa5tEpuF7xR8c8LdLtEKf7rth32EvwfzMXMf/pfgUBFlB4kxmUq78VRqzqNSNUrDafqkjf4J0YXogRvz33Tdzxl8wEd4S2VCyVqd3KjdvAmdqcIGJBzOfIJIdRFCM+SYPYNUz2o7zr6CeaMTe6StnuRWSmu/GhZQPFk6nxZQC7eahMvMeGKmU3a+QNY8gVJOrOQfJbPQRymSWf2EYg1FXVF7CbwgA4ea/GSx7B45VTLVbA9jbxOKy3dNmNvSkvj5aD0qMFG9SQ4hUVgQv59EbFbwgy8caVBDNsiR6SOVlgeVEkfQXBQYDq4DJBgfEIcQsVAeQRX1tEdBvUrPi9ku5RNFkCaCt4pGAgFAawXf2hHu+LhbodLQAhfZYRSzQ22U0ery54DADUiCeTIqqaZChBX3NN5RQBT/5a14LxxsH0Ao/N2s1G2BuWVRWp0YBj5ZKBhrytGVJCB5ilN0RDzb7W7sb4pn5T1DzdlR1LGvsbu2KdEcMmUz36HCXkXeZrLdsJn2qosq/ByrVkCs3zo45X01GcE7TeJeGenk50p5ML2jKoB/BYY3godb9oZtr9UY8CqpEccEJJq1CYs99OtfqLm1ubuluNkC5pXsR7onZzg1EezFttXf6IARqnAOSI+tORbIeQ72+PLm4M68L4d7Z+wL4Dv0LbcTv90tZywFq76/watIiJj1S6TV4x5glKKRP2KRRLxVQ3BnZ1EME9ZA3WhsNIiEK5Uko4ApmfBu5Y9D3zfMEihlngWhoe4Y4RlWjleajocvP3RvYgJZO5tb8xxsGVlt6YHJDHnszn8bP5/Nj8LifY4I2HNU4FRIq9sUpDLIXgHsotWuIE2+bOLScgpupd3d34h70dfluv6Iuzq9KJLpxD+VyOa4oOfbyhZ2lrc28L1Gt1SW5Z7tupJT4F133gQSVhxVJ842anBx7hW3ub9SZT/WpuYh7yx/BX6fhJhVlyMu/2C3DFglBlOE8eNeflN9sWptML2/Ci9KI0/MeexotixRj8x56OlWKx0pxkpZLEarJcTo79HquhRCI09vtwIoFfgqeqK9yn0OchlgSEr66gD8XQ52GTKyer7yEPouuSZXiu+h7yNLoulIAi/X8HUxgaAAB4nGNgZGBgAOKdog0R8fw2Xxm4mV8ARRhufVpngKD/ZzG/YA4CcjkYmECiAFedDEV4nGNgZGBgDvqfBSRfMDCASUYGVJADAF1gBAMAeJxjfsHAwDyKhwwGABFkYyUAAAAAAAAAADQAsgDoARgBfAJYB3QH5AsKC14LeAxmEcASeBMwE5oTwBQ8FQgaLBqWHe4eCB7gHwYfLB+cIA4guiF4IdwiMCJ6IrIjGCPcJNAlSiWsJg4m8CcOJ0Yn2ChKKOYpmCoAKjAqcCsOK04reivOLEgspCz4LVotwi4iLtwvhi/0MIYxgDGYMngyzDN4M8w0ejUwNrI3WDqIOqw7bDu4PHQ9Xj4MP35A6EGSQnRCwkPURBJEXkU6RdxLCkskTFpMokzKTQJNGE1YTaBN+k40TmZOjk/gUHRQ3gAAeJxjYGRgYMhhyWZQYAABJiDmAkIGhv9gPgMAIWkCEgB4nF2PvU7DMBSFT9q0QCsxgEBi84AQAin9YUD0AZrOrdQ9P07aKrGjxK3Up2HkCRgZeQokFl6Ek9R0IJbj7373XEcBcIFvODg8V9wHduCyOnALJ7ix3KYXll2uW8sd9HFvuUv/ZLmHRzxb7uMSIW9w3DNWD9hadnCKV8stnOPNcpv+3bJL/rDcwTU+LXfpvyz3sMSP5T7unJcoyLcqDsRClrt1JCvh5+EsLHI1l+k2C8oa672UZbXWSoy8YV36UskyMDIW4V5Uu3RsTCKSUudiqpWRWaZFUeqNjIy3MqaYDAaJ9V6kc0QIkPPnFGKSwAISJXZYsyNR0fjsh5hxFySFOX3KiYz58mj/zmUzX3FesxIYwcPw2PXZVU0igOEZMxFiz3fFb6YY0xokrBNmNGcEps1NdTrj0jRF09vQRPQeVs1UgQkGXMm/vMcUb/oFZv1ifgAAeJyVVvd72zYQ1Us9akmOZMlxkrbOsOOkTcvszrRNR7r33gMizxJiCGABUHL++4IEJVKRqM/hD/qIm+/eHY6qnar5p15b/AicwjNYwSrWsI5nsYE6GmhiE6fRQhtb6KCLbZzBDs7iHM7jOTyPF7CLC7iIS7iMPezjCg5wFdfwIl7CdbyMVxDgBm7iFm7jDu7iHl7Fa3gdb+BNvIX7eBvv4F08wHt4Hx/gQzzER/gYn+BTfIbP8QW+xFf4Gt/gW3yH7/EDfsRP+Bm/4Ff8ht/xB/7EX/gb/+BfMPQQIgLhEH0MwPEIRxAY1pom1DQOxppkOFi1mplBO1Qy4pYryURwKNS4GdEhS4TNDu0+szRmj4OYaSYEiYtcWtJDirhTBDQiaYOQ2XDgfmVI4nalXioZZEqdxJbLfjAkY1ifzhnLtJ2YqmFM0rAUz42yYs57AigYOqw8FtQQSsXBkOkj0p1Cy3PR/tJohvdd/TdPDt7yIenrlfZz6A6qeSuV3JjQfax03TVGUpiK2ySjqU/K8t6SaHk375+8ljmwZ2ZbkkfcW8pgRsi2of8Sp+asxPxGYkgHlpmjzV5iuHRtD3QiqGOSXhBrFaYCb7pbTjEHa6usdZmVrp5G39ALlfrMfafEa6kL2w7YBFeohGCxoahbEtJxzGRE0UpaVKsIkgXdr85pQiayDNW4Mhp3ZgqdenXKYl9gZ4bRjOS1IZMJE+uaQuIj2nTeImBujkbcPp6hMMvVLUvyK3l2ATzXcNqthC24PNouETHF3LJ0bAMmpbLZeb0XD93kqNZk0lPiBR13JucsQI85xpsTUZq6Pjko3S3ypGi4dJrSDfHEnC4EqXunOE6nqSTyZZd80nouVVab2y+603ag1fiJaSoTnCdfc4uYx7bhe5X1bcW49Ovuqox4SM28e16TXqD2E7ePFs2Zz16wf7m6hBzIvZOviSLsojnwqVPeri7dE9N10oiYZYHqPXI7ruHpyKrdSHnI3uqZhbFK07WlMQtki3rmkeU9u/MU36ecolsnd/Gzt4j1HEQe8srScnKomywKBirMV2MznwzPUfqTTUG3PGq56cHy6DmGRbvTo/RV3D152UVP3c62PORuPdrz+XWcX5tbgklyEVxFNuiR+5tRNzFLS1NKtIvPnoe6klrXBTNGZQYz3qynRuQlkVtwEaUlELVmJGPlJ4nLOLH52CXWvW8MWDpqLuhqX6skbrh/RI7KLHmt9j8cpp0SAA==") format("woff"),url("data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI+IEq7AAABjAAAAFZjbWFw364brAAAA5QAAAdEZ2x5ZgkJhucAAAu0AAChvGhlYWQY7KABAAAA4AAAADZoaGVhBzwDvwAAALwAAAAkaG10eKXgAAAAAAHkAAABsGxvY2FyjUcSAAAK2AAAANptYXhwAZYEdwAAARgAAAAgbmFtZXo4dZUAAK1wAAACPXBvc3RWzTZJAACvsAAACigAAQAAA1L/agAAA+gAAAAAA+gAAQAAAAAAAAAAAAAAAAAAAGwAAQAAAAEAALkVgFhfDzz1AAsD6AAAAADa8q4wAAAAANryrjAAAP9qA+gDUgAAAAgAAgAAAAAAAAABAAAAbARrACAAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAED6AGQAAUAAAJ6ArwAAACMAnoCvAAAAeAAMQECAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAwOgA6MQDUv9qAFoDUgCWAAAAAQAAAAAAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAAAAAUAAAADAAAALAAAAAQAAAIwAAEAAAAAASoAAwABAAAALAADAAoAAAIwAAQA/gAAAAYABAABAALoaejE//8AAOgA6MT//wAAAAAAAQAGANgAAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQAFQAWABcAGAAZABoAGwAcAB0AHgAfACAAIQAiACMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQBeAF8AYABhAGIAYwBkAGUAZgBnAGgAaQBqAGsAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAABRQAAAAAAAAAawAA6AAAAOgAAAAAAQAA6AEAAOgBAAAAAgAA6AIAAOgCAAAAAwAA6AMAAOgDAAAABAAA6AQAAOgEAAAABQAA6AUAAOgFAAAABgAA6AYAAOgGAAAABwAA6AcAAOgHAAAACAAA6AgAAOgIAAAACQAA6AkAAOgJAAAACgAA6AoAAOgKAAAACwAA6AsAAOgLAAAADAAA6AwAAOgMAAAADQAA6A0AAOgNAAAADgAA6A4AAOgOAAAADwAA6A8AAOgPAAAAEAAA6BAAAOgQAAAAEQAA6BEAAOgRAAAAEgAA6BIAAOgSAAAAEwAA6BMAAOgTAAAAFAAA6BQAAOgUAAAAFQAA6BUAAOgVAAAAFgAA6BYAAOgWAAAAFwAA6BcAAOgXAAAAGAAA6BgAAOgYAAAAGQAA6BkAAOgZAAAAGgAA6BoAAOgaAAAAGwAA6BsAAOgbAAAAHAAA6BwAAOgcAAAAHQAA6B0AAOgdAAAAHgAA6B4AAOgeAAAAHwAA6B8AAOgfAAAAIAAA6CAAAOggAAAAIQAA6CEAAOghAAAAIgAA6CIAAOgiAAAAIwAA6CMAAOgjAAAAJAAA6CQAAOgkAAAAJQAA6CUAAOglAAAAJgAA6CYAAOgmAAAAJwAA6CcAAOgnAAAAKAAA6CgAAOgoAAAAKQAA6CkAAOgpAAAAKgAA6CoAAOgqAAAAKwAA6CsAAOgrAAAALAAA6CwAAOgsAAAALQAA6C0AAOgtAAAALgAA6C4AAOguAAAALwAA6C8AAOgvAAAAMAAA6DAAAOgwAAAAMQAA6DEAAOgxAAAAMgAA6DIAAOgyAAAAMwAA6DMAAOgzAAAANAAA6DQAAOg0AAAANQAA6DUAAOg1AAAANgAA6DYAAOg2AAAANwAA6DcAAOg3AAAAOAAA6DgAAOg4AAAAOQAA6DkAAOg5AAAAOgAA6DoAAOg6AAAAOwAA6DsAAOg7AAAAPAAA6DwAAOg8AAAAPQAA6D0AAOg9AAAAPgAA6D4AAOg+AAAAPwAA6D8AAOg/AAAAQAAA6EAAAOhAAAAAQQAA6EEAAOhBAAAAQgAA6EIAAOhCAAAAQwAA6EMAAOhDAAAARAAA6EQAAOhEAAAARQAA6EUAAOhFAAAARgAA6EYAAOhGAAAARwAA6EcAAOhHAAAASAAA6EgAAOhIAAAASQAA6EkAAOhJAAAASgAA6EoAAOhKAAAASwAA6EsAAOhLAAAATAAA6EwAAOhMAAAATQAA6E0AAOhNAAAATgAA6E4AAOhOAAAATwAA6E8AAOhPAAAAUAAA6FAAAOhQAAAAUQAA6FEAAOhRAAAAUgAA6FIAAOhSAAAAUwAA6FMAAOhTAAAAVAAA6FQAAOhUAAAAVQAA6FUAAOhVAAAAVgAA6FYAAOhWAAAAVwAA6FcAAOhXAAAAWAAA6FgAAOhYAAAAWQAA6FkAAOhZAAAAWgAA6FoAAOhaAAAAWwAA6FsAAOhbAAAAXAAA6FwAAOhcAAAAXQAA6F0AAOhdAAAAXgAA6F4AAOheAAAAXwAA6F8AAOhfAAAAYAAA6GAAAOhgAAAAYQAA6GEAAOhhAAAAYgAA6GIAAOhiAAAAYwAA6GMAAOhjAAAAZAAA6GQAAOhkAAAAZQAA6GUAAOhlAAAAZgAA6GYAAOhmAAAAZwAA6GcAAOhnAAAAaAAA6GgAAOhoAAAAaQAA6GkAAOhpAAAAagAA6MQAAOjEAAAAawAAAAAANACyAOgBGAF8AlgHdAfkCwoLXgt4DGYRwBJ4EzATmhPAFDwVCBosGpYd7h4IHuAfBh8sH5wgDiC6IXgh3CIwInoisiMYI9wk0CVKJawmDibwJw4nRifYKEoo5imYKgAqMCpwKw4rTit6K84sSCykLPgtWi3CLiIu3C+GL/QwhjGAMZgyeDLMM3gzzDR6NTA2sjdYOog6rDtsO7g8dD1ePgw/fkDoQZJCdELCQ9REEkReRTpF3EsKSyRMWkyiTMpNAk0YTVhNoE36TjROZk6OT+BQdFDeAAAAAgAA//wDugLAABIAGwAAASIOAhQeAjMyNjcHJz8BLgEJAQYeARcBLgEC9ClNOiAgOk0pRG4UlXQ+nR1Q/t7+MwcVKxcBwxskAsAgOk1STTogUUEoTXwqICP+6v7EFDYnAQE2Fz4AAAAFAAD/wAM7AucAGwAsADEAQABNAAABBiIHDgEdAQcOARYzITI2Ji8BNTQmJyYjIicjBSIGFxMeATMhMjY3EzYmIyEFKQEDIRMiIw4BFxMeAT4BJwMuASUiBgcDBh4BNjcTNiYBrQslBgoHrAoHBwoCcAkHBwmoBQkGFRIMR/7iCg8BMgENCgHJCg0CQAEOC/7i/v0BAwEDO/5iSwECDA8CLAISFg0CLAINAQ4KEAEsAg0XEQIsAg8C5wECAxUZCTgCDw0NDwI3ChoUAwIBzA8L/dUJDQwKAioLEDH+BwGwARIM/sALDgIUCwE/Cg0BDgr+wQsUAg4LAUAMEgACAAD/2AOPAu0AGQAdAAABBgcGBxYfAQYHBg8CPwI2NzY3Fh8BNjcBDwE3A49QUbNbFioaSSQgOtEp9wMfOCEjTRQoHjBa/igboBoC7SkoWisUKxpKJiI7IvcoD8I5IyVNEykeYK3+c6AboQABAAD/3wOPAu0AGwAAAQYHBgcWHwEGByMVMwcWFzczNSM3NjcWHwE2NwOPUFGzWxYqGlu4pnx+Cxacr4VSbDcUKB4wWgLtKShaKxQrGl26K34LFJ0rU243EykeYK0AAAADAAD/mgO4AyIAEAAUAEEAAAEiBwEGFBcBFjI3ATY0JwEmBwkCJSIPAxUjDwMVHwMzFR8DMz8DNTM/AzUvAyM1LwMB9A8L/mEKCgGfCx8KAZ8LC/5hCw8Bhv56/noBewICBAMBwgQEAwEBAwQEwgEDBAQWBAQDAcIEBAMBAQMEBMIBAwQEAyIL/mEKHwv+YQoKAZ8LHwoBnws+/nr+egGG5QEDBATCAQMEBBUFBAMBwgQEAwEBAwQEwgEDBAQWBAQDAcIEBAMBAAYAAP+VA74DJAAbADEASQBgAHkAigAAASYHBgcGBwYWFxYXHgE3PgI3NicuAScmJyMmBzYXFhcWFxYGBw4BJicuAjc2Nz4BFyYHBgcGBwYXFhcWFxY2Nz4CJyYnLgEHNhcWFxYHFgYHBgcGJicmJyY2NzY3NgcGBxcGBxYXNxc2NycmJzc2NyYnBg8BJi8BFhc3FwcXBycGByc2NycmJwHzbGVhQUILDDc8PVNPt1ZYhE8GBh4cd09QVwMVEGNdWTo8CAk9PkCmtE1QZCAVFzk4ol9bVVEyNQEEJCRBRFJNnj9BRQQeIDwwfEJQSkcrLAEBSD5AS0eMMzYUFRQnJz1KGx06cDg2KixucToeJjIZJTEYKiwZMCUZMiY5OG40b3E1cSRKNEolJjIZAyICNjVaXWxctklKKCgLHB13pFlbU1OGKCkFAjEDMTBTVmNYrEBDOxArLI+zVVlCRE4rAzAvT1JbU1BONjgQECUwMoyiSUwyKzAwAiwqRkpQS4ssLwcJMTM1RUKQOz0iK28eOnE2OCwqbnA6HSYyGSUwGSwqGDElGTIDODlvNG5xNXElSjRKJCYyGQAAEQAA/6MDuAMiAAMABgALAE4ApgD8AT8BlAHxAjwCfgLCAwUDXAOpA/UEPwAAAREhEQUzBzcVITUXETEjByMHIxUjByMPBxUfBDM3MzczNzM3MzczFzMXMxczFzMXMz8FNS8FIycjNSMnIycXIw8FHxk/BDUvAyMnNSc1JyMvASMvATUnIyc1LwEjLwE1JzUnIzUnIycjLwE1LwEjJzUnIy8BBSMPAhUHIw8BFQ8CFQcVBxUPASMPARUPAhUPASMPASMPARUHFQ8BIw8CFR8FMz8ZNS8EITEjFSMPAxUfBDM3MzczFzMXMxczFzMXMx8GMz8FNS8CIy8JIycjJyMnIzUHIw8CIw8BFQcjDwEjBxUHIwcjByMHFQ8DIxUPARUPAiMPAR8FMz8dMz8DLwMFDwUfFhUfBDM/BDUnNS8INSc1LwQjJyMnNS8BIyc1JzUvATUjLwE1JyMnNS8CNS8DBSMPBRUjFQcVBxUjFQcVFxUzFRcVFxUXFR8JMz8ENS8CNSc1JzUnNSc1JzU3NTc1NzU3NTc1LwQFIw8DFQcXFQcVBxUHFQcVDwgVHwMzPwY1NzU/BzU3NTM1NzU3NSc1LwMFIw8DFRcVFxUXFRcVHwcVFxUfAjMVHwMzPwQ1Lws1JzUnNSc1JzUvBAUjDwUVBxUPDxUfBT8CNT8BNTczNzU/AjM/CjU3LwQFDwUfAhUXFRczFzMfAjMfATMVFxUXFRczHwEzFzMXFRcVHwEVHwIVHwIzPwU1LxwFIw8IIwcjByMHIwcjByMPBBUfBTM3MzczNzM3Mz8LMzczPwE1PwE1NzU/BDUvBAUPBRUfBTMfARUXMxczHwEVHwEzFxUfBDMXMx8GMz8FNS8WISMPFxUfBjM/CDM/BDU3MzczNzU/ATU/ATM/BDUvBAEnAZr+weRynP7InAsGCwUMBQUGJgYKCAQCAwEBAgYECQQrBQkFBQUFCgUeBQoFBQUFCgQYCQUEAwQEAQEEAwQHJgUGBQsGCwb0BQQFAwQEAgIIAgwHCAcEAwQDBAMHBgcPAgkCAxEEAwQJCQQEAwQBAgMCAQIDAgECEgEJBAYBAwQDAQMIBAMBAwEDAQgEBAQBBAgBBAr98QUECAUEAQQEBAwEBAQIAwEDBAMEAwQJAQ8CAQIDAwUCAQQDAwECAwMIBAkFBwUFEAYCBgIPBwYHAwQDBAMEBwgEBAcCAQICAwQIAQQSDQoFBwYCAgMICAQBCAQmBAgDBAQEBwQIAxoDCAcHAwkFBAQEAwQBBAMHAQMFBAQEBAQJBCYECQUEBAUNrQQIBgcBAwgDARUDAQMDAQkBDAEJCQMDAgECAwMIBAEEAgICAwMIBAUECQMIAwIEAwIDAgMCAwIDAwMCAwMDAwMDAwMGAyMCAwQEAgIFBAgBhAUIBAMDAwEGAwMCAwIDAgMCAwcWAQQBBAEGAwICBAQDBAUJBAQEAwQBAgICAQIBAgECAgIBAQEIAQEBAgIEAQIHAwIBAgMCAQIGAwkDAwME/cMFBAgDAwICAQIBAQEBAQECAQgCAQEBAwMEBAQFCQQDAwQBAgUDAgEBAQEBAQIBAQIDAwkC7gUECAYCAQEBAQECCAIBAgIEARYBAQQDDAUJBAYFBAMKAggBAgECAgIHAQEBAQEEAwQI/KcFCAgEAgEBAQIGAgICAQQBBgIKAwQBAwYEBQkEBAQDBAIBEgECAQIBAgICBwIBAQEBAgcDBQLwBAUEBAMEAgIHAgMFAgQBAgMMCgMEAgQBAQQDBAQJCAUHAw8CAQYFCAEBAQYBAgECAQICAgkBAgIDBAj9rQQIBAMCAgIFBgwGAQwBBgcDAQMDAQcHAwEHBwEDAQMECAQEDAQEBAQJBAQEBQIBAQQEAxUDBAoHGQMKAgMDAwMDAwMCBgMCAwIDAggBnAUEBAEHChwLBxIECwQHBAQHBAgEEAgEAwICAQQEAwQFDAUNBAUEBQgFJgQJBAQEBAQEAQQDAQMBAwQECAQJBAICAQIGAwQF/kQEBQQGAgIBAgMDBQQBBA0JAQ0BBAUFBAEEBQUKBRkBBAEUBgUFBQsKCQUEBAMEAQIDAwQHEwUEBQUEBQUEJR4IBAQJDAMNAhIFBAUDARQEBAkIFiwFBQQFBQUEBRsEBgQBAQIDAwQEBAkDBgULBQUFBhQBHgUKBQUEAQQBBAUcDQQBBAUDAgECAgMECAH6/sgBODFaPrq6fQHyAQEBAQcCAgQDBAQECQQFBgMCCQIBAQEBAQECBQECAwMIBAUECQMDAwcBAQEBUwECAgQHCQkKAQkHBgcDBAMEAwQHCAcUBA0EBCADAwICAgIDAwgJBQYFBQQBBAEEBRwNBAEIBAEEBAQIAQMBAwEDBAgDAQMEAwEGBAcIAQQEAQMEAwEDDAMBAwEDAQgEBAQBBAQEAQQNFwUFBAEEAQkFCgUMBAUEBAMEAQIFBwweCAQJBBQHCAcEAwQDBAMHBgQDBwUEBAkEBAMEAQICBQwFCQQDBgIBAQEBAQICBwICAwICAgECAwMIBQkIAwUCAQIBAgECAgIJAgEBAScCAwUCBAECDwMCAQIJDAkBCQQDAwEDAwEDCwcHCQkEAwQEAQEEAwwDBAYDAwIDAwMDAwMCAwMCAwIDAgMCAwQDFgMDCAkJBwMEOwECAwMEDQULAgMDAwMDAwIDAwojAwcDBwQOCwMHAwgDAwIBAQMCBAgJBAIECQQEBAQEBQMBAwEDBAEDEAQDAQMIAwEKAQMDAQMDAQMDAQYECQEDAgMDqQEEBAMECAQECQUECQ0EGwUNCQQECQQBBCIEBQEEBAMDAgECAgMECAkFBBIECwQHBAQHBAgEHgQIBAcEBAcEBAkEBAQDBC0BBAgEBAQEHgUKBQUFBQkFJwUEBQkKBDIEBQQIBAYCAgYICgUZAQQBFAYFBQULBiYFBgULBgsGFgYJCAMDBBACBggICQYRBQYFBgsFIQYLBQUKBg8BBAEZBQoBBAYCAQEDAgQICQgBKQQFBQQFBQkFIgUJBQUFBQoFFwUEBwICOQECAwMIBwQHBBoDCwsHBgQDBxQPAwcBCAUEBQgDAwICAgIHAQMVAQMLAQcQBAQMBAQEBAQECQQmBQUIBAQDBKABBAMDBAkJCQYBDAEGDAYFAwMCAQQBBAECBQQCAgEBAQQBAQEGAQEBAgEBAgMHBQQFBAgDAwkCAQYDEAMGAwIDAgMCAwIDBgIDAwMDAwdKAQIBAwYMAwMFAwIBAQEEAwMECQUECAMDAgEBAQECCQICAgECAQIBAQECAgIBAQEEAQEBBQQDBQQFCAgDAgEnAQEDBgQJBQQEBAIFAwQJAQYJAwIBAgMCAQIDBAMKAggBAgECAgMBAgMDCAUECQQDAwMEAgECAQIBAgEQEAYCAwUJAwoBAgICDwIDBQYMFAECAQIBAgECBgIGCQQFBAQEAwMCAQEBAgICAQIBCAwDBAMCAQIDAgECEgEJBAMFBAQEBQkEAwMEAAAABQAA/5YDvQMjABYAMQA6AD4ARAAAASYOAxYXHgI3PgE3Njc2Jy4BJyYHNhcWFxYXFgYHBgcGBwYnJicmJyYnJjc+AhMGDwEXNRcRBycUFSclFBUnJicB9FimgUQBQD07obBRVIYnKQMGHh52Tl5rVlJQOjsXFxcrLERGWlhWWENDJyYDAyMecpQ/Nmwv0crKGI8BWSpDIgMiAUZ+obOmPj9JCR4delFTWFdVU4cmLzEBJiVDRFRPp0hKLzQQDxYWOTZQT1daTklwPv8AJk0hlI+PASiPYGRlZGVlZR4wFwAJAAD/ogO4AyAACwAXAFIAuwFEAaEB6AIyAp4AAAEVIxUzFTM1MzUjNQczFTMVIxUjNSM1MxMrAQcjByMHFQ8FFR8FMz8DMzczNzM3MxczFzMXMx8BMz8DNS8EIzUjJyMnFw8GFR8KMx8GFR8CMx8NMz8ENS8BNScjLwYjLwE1Iy8LIy8BIy8HIzUnNS8EIwUPASMPBBUPBBUHIwcVDwMjFQcVByMVDwQVByMPARUPAhUPAiMPAxUPAxUHFQ8KFQcVHwQ/BDM/BDU/JjUvAwEPBRUXFQcVBxUHFQcVBxUHFQcVBxUHFQcVBxUPBxUfBD8FMz8BMz8BNT8BMzczNzU3NTM1NzU3NTc1NzU3NTc1NzU3NSc1LwQFDwUVFxUXFRczHwUzHwEVFxUXFRcVMxcVFxUfBD8ENS8NNSc1JzUnNS8DAQ8XHwQ/BDM/AzM3MzczNzM3Mzc1NzM3NTczPwIzNzM1PwM1LwQFDwUVHwMVHwEzHwIzHwIVHwEzHwEVHwEzFzMXMxczHwIzFzMXFTMfBzMXFRczFTMXMz8ENS8EIycjJyMnIy8KIy8EIy8FIwGufX2MfX11Xn19Xn19MwcNBg0NBycNDgQDAwQBAgMDCQQFBgwGFwYLBgYGBikGBgYGBgUfBAUMAwMCAgYDCicGBwYNB+kFBAQDAwECAgIGAgIDBgUEAwgBDgIIAgYCBAECAgECAwIDBQQDBAMKBQYDCQQJBAQDBAIEBgEEAwIDAgMCAQIIAQUDBAIEAgIFAgcCAgECCQECAgMHAwIDAgECAwIGAgoF/fMFBwECAwIDAgMCAwIDBAECAgMCBAEEBAECAgICAgIBAgICBAICBAEBAQIDAgIKAQICAgEEAQIBAgECAQICAQQEAw4ECAQDAQECAwECAgIBAgECAQIBAgIDAgECCAIBAgICAQQCBAEGAgoCBgMKAwYDBQMCAQQGCAUCsgQFAwYCAQEBAQEBAQECAQMFAwUDBAMCBgMBAgMGBAkJBAQDAgEBAwIBAgMDAgEFAQwDAQIBAQEBAQEBAQQDBAQI/KYEBQMEBAEBAwIBAwIBBAEKAQQDAgMCAQIDAQIEBwkJBAQDBAIEAgMCBwQBBgECAQIIAQEBAQUICAKxBAQJBAUKBA8FBQsPBgULBSEGCxAIBAUCAgQDBA0JBgYUBQESBgcFAQUBBQEFARwBCwUBBQUBBQsPAQQBAwMCAQQDBAQI/d4EBAQDAgIBAgMEDQIBAgMCAQIDAwsCAQgDAwUBAgECAQIBAgMDAQIBAgECBAMGAw0DHQIDDQQDDQkFCAUCAQQDBAQDBAgDFAIRAwkFEQIGBQMFBQUCAQ8CBQICAQQDBBEEBAUCIX2MfX2MfRd9Xn1+XQGTAQIGAQIEAgMECAkFBAQDBAECAgIEAgEBAQEBBQEGBAMJBQgIAgQGAQEBTwEBAwMEBAQFCQQGAQIBBgMEAggOAwgDBgMEAQICAwQDBAMHBwMIAxIKCAIEAgIDAwgKBwcBDAgEBAQEBAQECwEHAwYCBgIDBQMHAwIDCQMCAgcCAgICAQEBAgIEAgUMAQQCAgICAgECAgICAgEEAgECAgMEAQQBBAECAwIDAgECAwIBAgYCAQIGAwMCBQIBAg8DAgECAQIDBgMDAwMDAwMDAQQJBQgDAwMBBAMDBAYFAwIFAQIDAgMCAwIDAwIFAgMCDAIDAgMCAwQDBAMGAwoDBgIKAQYCBQQEBAkJBgQB/sYBAgIIBAQEBDMDCQMGAgYDAwMDAwMGAgMDCQIOAwgBDQULBQYKBwQFCQQGAgICAgMDAwMGBgYFAQUHDyYDCgMDBwMDBAMDBAMDBAMHAw4DLAUJCAQCAwITAQIDAwgEGwYHEwcNEwYHDQYfDQUBBQEFAQUBBQEFAQEEBAQCAgIDAwkJCAYGBQYQCwYRBQYGBS8GBQYGDAYHBQcGAv6yAQIGBAQGBAkEAwUJAgMEAwwBBAMEAwcJCQgDAwMCAgEGAgYDAgMCAwMPBgEDAwEDBAcMBAEDBAQECQgEAwICAgEDAgQECQQFBAQDAQoCAgICAgIBAQcCBQEBAQMCAgECAQIBAQEBAQICAgQCCQEBBAEEAQQHBQQJCAQCAwEDBwYDAwYCAgMBAwIDAgkCAwIBBAEEDQECAAAAAQAAAAADQAKGADMAAAEiDgEHBhYXJicHFhc2NyYnBy4BNjc+ARYXHgIHDgInJgYeARcyNzYzPgI3Ni4BJyYCET51VhIVFygsWgyiUCAPJBccIhcZIiJnby8tPxYMC0ViNA0SARUOCBEMBj1rRQgJIUw0QwKFNV48QYw3CBI7IA+gUAcEkShsaygqLQMbF1RnMTNUMAEBFBsNAQICCUhrPjt1YBwkAAAAAwAAAAAC7gKKAAMABwALAAATETMRMxEzETMRMxH6ZGRkZGQCiv2oAlj9qAJY/agCWAAAAAkAAP+iA7wDIQADAAgAIgAxAEcAXABxAIQAkwAAAQYHIQMWFyE2EwYjBgcGBxYXFjc2NzYXNhcWFzYnJicmByYXBhcWFxYXFhcWNiYnJicFBgcGDwEGBwYXFjc2NzY3Nj8BNjc2AQYHBhcWFQYHBgcGFj4BNT4BJy4BBQYHBhcWFRYXFhcWNTQnJicmNS4BAQYHBgcGByIGBwYXNjc2NzYuAQUGFxYXFhc2Jy4BIyYvAQH0YGABgMBkM/7SM2gMHCkSHgoIFAwcEQgOCRkzHQ4WCwocGBUI6iALBh4OBSoiFBUEDjpF/fEdGxAbDg0LDAMEHQ0WEAoPEA0ZBQgCmRQFAgIBAQMLIAIQGBMXEwYCDfykFwQCBwQLCA0TIhAIAhMBDQKuEyQeDxoXESUDBBc3NTQsBwIN/dklGhEjT0QXBAMlEVA4BgIyrK0BJrRaWgHVAgEFCBcUAgEHBQECAgIGAwEVDgwGBAEBTwoVDRoMBS8+DRMoC18rCgwdESYTDRgaDxMGECQcDRYPDBYMFP7RBRQLHRAIDQlBPBEOBBMOMm02BwkSBRkOIhcJLRgmGgUZDyUUBz89CAv+swkXEgkNBhUNDwsKGhgmBxMOAQ4eFRIsCQsPDBUYMQMAEQAA/6MDuAMiAA8AIAAyAHUAywEpAXQBtwIPAlwCnwL3A00DjwPUBCAEagAAASYGBwYeAjc+ATc2JicmBzYeARcWBgcOAS4CNjc+ARcGDwEOARYXFj4BOwE1IzY3JicrARUjDwMVHwQzNzM3MxczFzMXMxczFzMfBjM/BTUvAiMvCSMnIycjJyM1DwQjDwEVByMPASMHFQcjByMHIwcVDwMjFQ8BFQ8CIw8BHwUzPx0zPwMvAyMFDwUfFhUfBDM/BDUnNS8INSc1LwQjJyMnNS8BIyc1JzUvATUjLwE1JyMnNS8CNS8EBQ8FFSMVBxUHFSMVBxUXFTMVFxUXFRcVHwkzPwQ1LwI1JzUnNSc1JzUnNTc1NzU3NTc1NzUvBQUPBRUHFQ8PFR8FPwI1PwE1NzM3NT8CMz8KNTcvBCMFDwUfAhUXFRczFzMfAjMfATMVFxUXFRczHwEzFzMXFRcVHwEVHwIVHwIzPwU1Lx0FDwgjByMHIwcjByMHIw8EFR8FMzUzNzM3MzczPwszNzM/ATU/ATU3NT8ENS8EIwMrAQcjByMVIwcjDwcVHwQzNzM3MzczNzM3MxczFzMXMxczFzM/BTUvBSMnIzUjJyMnFw8FHxk/BDUvAyMnNSc1JyMvASMvATUnIyc1LwEjLwE1JzUnIzUnIycjLwE1LwEjJzUnIy8CBQ8CFQcjDwEVDwIVBxUHFQ8BIw8BFQ8CFQ8BIw8BIw8BFQcVDwEjDwIVHwUzPxk1LwQjAQ8DFQcXFQcVBxUHFQcVDwgVHwMzPwY1NzU/BzU3NTM1NzU3NSc1LwMjBQ8EFRcVFxUXFRcVHwcVFxUfAjMVHwMzPwQ1Lws1JzUnNSc1JzUvBCMTDwQVHwUzHwEVFzMXMx8BFR8BMxcVHwQzFzMfBjM/BTUvFwUPFxUfBjM/CDM/BDU3MzczNzU/ATU/ATM/BDUvBCMB9EBvFxkYVn46PVEBBEQ5KzImSDMJDy0xIVBLOBoJFhhQYwkUHQkJBAgECQ0EWVkSJg4/BA4NCgUHBgICAwgIBAEIBCYECAMEBAQHBAgDGgMIBwcDCQUEBAQDBAEEAwcBAwUEBAQEBAkEJgQJBQQEBQ2xBQMGBwEDCAMBFQMBAwMBCQEMAQkJAwMCAQIDAwgEAQQCAgIDAwgEBQQJAwgDAgQDAgMCAwIDAgMDAwIDAwMDAwMDAwYDIwIDBAQCAgUECAUBhAQEBAMDAwEGAwMCAwIDAgMCAwcWAQQBBAEGAwICBAQDBAUJBAQEAwQBAgICAQIBAgECAgIBAQEIAQEBAgIEAQIHAwIBAgMCAQIGAwkDAwMECf3HBAgDAwICAQIBAQEBAQECAQgCAQEBAwMEBAQFCQQDAwQBAgUDAgEBAQEBAQIBAQIDAwkEAo0FBAQDBAICBwIDBQIEAQIDDAoDBAIEAQEEAwQECQgFBwMPAgEGBQgBAQEGAQIBAgECAgIJAQICAwQIBf2uBAQEAwICAgUGDAYBDAEGBwMBAwMBBwcDAQcHAQMBAwQIBAQMBAQEBAkEBAQFAgEBBAQDFQMECgcZAwoCAwMDAwMDAwIGAwIDAgMCCA4BpQQEAQcKHAsHEgQLBAcEBAcECAQQCAQDAgIBBAQDBAURDQQFBAUIBSYECQQEBAQEBAEEAwEDAQMEBAgECQQCAgECBgMEBQSnBQYGCwUMBQUGJgYKCAQCAwEBAgYECQQrBQkFBQUFCgUeBQoFBQUFCgQYCQUEAwQEAQEEAwQHJgUGBQsGCwbvBAUDBAQCAggCDAcIBwQDBAMEAwcGBw8CCQIDEQQDBAkJBAQDBAECAwIBAgMCAQISAQkEBgEDBAMBAwgEAwEDAQMBCAQEBAEECAEECgj99AQIBQQBBAQEDAQEBAgDAQMEAwQDBAkBDwIBAgMDBQIBBAMDAQIDAwgECQUHBQUQBgIGAg8HBgcDBAMEAwQHCAQEBwIBAgIDBAgEAq8ECAYCAQEBAQECCAIBAgIEARYBAQQDDAUJBAYFBAMKAggBAgECAgIHAQEBAQEEAwQIBPymBAQIBAIBAQECBgICAgEEAQYCCgMEAQMGBAUJBAQEAwQCARIBAgECAQICAgcCAQEBAQIHAwUElAUEBgICAQIDAwUEAQQNCQENAQQFBQQBBAUFCgUZAQQBFAYFBQULCgkFBAQDBAECAwMEBxMFBAUFBAUFBCUeCAQECQwDDQ0CGgQFAwEUBAQJCBYsBQUEBQUFBAUbBAYEAQECAwMEBAQJAwYFCwUFBQYUAR4FCgUFBAEEAQQFHA0EAQQFAwIBAgIDBAgEAjQBSzs5gFkeFRVtQD5xGhUnASI9JTduHRUHGjhNUSElLDISIzYBDxEDAwEGGSJECO0BAgIFDAUJBAMGAgEBAQEBAgIHAgIDAgICAQIDAwgFCQgDBQIBAgECAQICAgkCAQEBJwEBAwUCBAECDwMCAQIJDAkBCQQDAwEDAwEDCwcHCQkEAwQEAQEEAwwDBAYDAwIDAwMDAwMCAwMCAwIDAgMCAwQDFgMDCAkJBwMEPAEBAwMEDQULAgMDAwMDAwIDAwojAwcDBwQOCwMHAwgDAwIBAQMCBAgJBAIECQQEBAQEBQMBAwEDBAEDEAQDAQMIAwEKAQMDAQMDAQMDAQYECQEDAgMDAqsBBAQDBAgEBAkFBAkNBBsFDQkEBAkEAQQiBAUBBAQDAwIBAgIDBAgJBQQSBAsEBwQEBwQIBB4ECAQHBAQHBAQJBAQEAwQBdwECAwMIBwQHBBoDCwsHBgQDBxQPAwcBCAUEBQgDAwICAgIHAQMVAQMLAQcQBAQMBAQEBAQECQQmBQUIBAQDBKECAgMDBAkJCQYBDAEGDAYFAwMCAQQBBAECBQQCAgEBAQQBAQEGAQEBAgEBAgMHBQQFBAgDAwkCAQYDEAMGAwIDAgMCAwIDBgIDAwMDAwcDTQECAQMGDAMDBQMCAQEBBAMDBAkFBAgDAwIBAQEBAgkCAgIBAgECAQEBAgICAQEBBAEBAQUEAwUEBQgIAwIBAs4BAQEBBwICBAMEBAQJBAUGAwIJAgEBAQEBAQIFAQIDAwgEBQQJAwMDBwEBAQFTAQICBAcJCQoBCQcGBwMEAwQDBAcIBxQEDQQEIAMDAgICAgMDCAkFBgUFBAEEAQQFHA0EAQgEAQQEBAgBAwEDAQMECAMBAwQDAQYEBwIKAQQEAQMEAwEDDAMBAwEDAQgEBAQBBAQEAQQNFwUFBAEEAQkFCgUMBAUEBAMEAQIFBwweCAQJBBQHCAcEAwQDBAMHBgQDBwUEBAkEBAME/sUBBAgEBAQEHgUKBQUFBQkFJwUEBQkKBDIEBQQIBAYCAgYICgUZAQQBFAYFBQULBiYFBgULBgsGFgYJCAMDBBABAQYICAkGEQUGBQYLBSEGCwUFCgYPAQQBGQUKAQQGAgEBAwIECAkIASkEBQUEBQUJBSIFCQUFBQUKBRcFBAcCAv6yAQMGBAkFBAQEAgUDBAkBBgkDAgECAwIBAgMEAwoCCAECAQICAwECAwMIBQQJBAMDAwQCAQIBAgECARAQBgIDBQkDCgMDAQICAg8CAwUGDBQBAgECAQIBAgYCBgkEBQQEBAMDAgEBAQICAgECAQgMAwQDAgECAwIBAhIBCQQDBQQEBAUJBAMDBAAAAAYAAP+VA74DJAAbADEASQBgAG0AegAAASYHBgcGBwYWFxYXHgE3PgI3NicuAScmJyMmBzYXFhcWFxYGBw4BJicuAjc2Nz4BFyYHBgcGBwYXFhcWFxY2Nz4CJyYnLgEHNhcWFxYHFgYHBgcGJicmJyY2NzY3NhcUFSMVMxUzNTM1IzUHMjMVMxUjFSM1IzUzAfNsZWFBQgsMNzw9U0+3VliETwYGHhx3T1BXAxUQY11ZOjwICT0+QKa0TVBkIBUXOTiiX1tVUTI1AQQkJEFEUk2eP0FFBB4gPDB8QlBKRyssAQFIPkBLR4wzNhQVFCcnPUoYn596n59hJSSfn0mgoAMiAjY1Wl1sXLZJSigoCxwdd6RZW1NThigpBQIxAzEwU1ZjWKxAQzsQKyyPs1VZQkROKwMwL09SW1NQTjY4EBAlMDKMoklMMiswMAIsKkZKUEuLLC8HCTEzNUVCkDs9IitdTk58nJx8nBidSp2dSgAABwAA/5UDvgMkABsAMQBJAGAAaQBtAHMAAAEmBwYHBgcGFhcWFx4BNz4CNzYnLgEnJicjJgc2FxYXFhcWBgcOASYnLgI3Njc+ARcmBwYHBgcGFxYXFhcWNjc+AicmJy4BBzYXFhcWBxYGBwYHBiYnJicmNjc2NzYXBg8BFzUXEQcnFBUnJRQVJyYnAfNsZWFBQgsMNzw9U0+3VliETwYGHhx3T1BXAxUQY11ZOjwICT0+QKa0TVBkIBUXOTiiX1tVUTI1AQQkJEFEUk2eP0FFBB4gPDB8QlBKRyssAQFIPkBLR4wzNhQVFCcnPUpFNmwv0crKGI8BWSpDIgMiAjY1Wl1sXLZJSigoCxwdd6RZW1NThigpBQIxAzEwU1ZjWKxAQzsQKyyPs1VZQkROKwMwL09SW1NQTjY4EBAlMDKMoklMMiswMAIsKkZKUEuLLC8HCTEzNUVCkDs9IiujJk0hlI+PASiPYGRlZGVlZR4wFwADAAD/mgO4AyIAEAAUAEIAAAEiBwEGFBcBFjI3ATY0JwEmBwkCNyIPBB8CDwIfBD8CHwI/BC8CPwIvBA8CJzUnAfQPC/5hCgoBnwsfCgGfCwv+YQsPAYb+ev569AICBA8DAQEDiYkDAQEDDwQEBQSJiQQFBAQPAwEBA4mJAwEBAw8EBAUEiYkEAyIL/mEKHwv+YQoKAZ8LHwoBnws+/nr+egGGrQEDDwQEBQSJiQQFBAQPAwEBA4mJAwEBAw8EBAUEiYkEBQQEDwMBAQOJiQECAAAAAAEAAP/fA48C7QARAAABBgcGBxYfAQAHFhcBFh8BNjcDj1BRs1sWKhr+25YLFgG7FCgeMFoC7SkoWisUKxr+15cLFAHAEykeYK0AAAADAAD/lgO/AyIAGwAyAEsAAAEiBwYHBgcGFhcWFx4BNzY3PgE3NicuAScmJyYHNhcWFxYXFgYHBgcGJicuATY3Njc+AQcGBxcGBxYXNxc2NycmJzc2NyYnBg8BJicB62xjYD9ACgs5PT5UTrRTV0BDUAgHHRt5UVNZDQ9PSEcrLAEDQDk8SEaQNzkyECYoQCNSRx06cDg2KixucToeJjIZJTEYKiwZMCUZMgMiNzZbXWtct0dKJyYLHB07OaFYW1NViykqBAGOAikoRUdPSYkuMQwOKTAxh5c+QSMVFm4eOnE2OCwqbnA6HSYyGSUwGSwqGDElGTIAAAoAAP+SA8EDIwAcADcAUQBqAG8AcwB3AHsAfwCDAAABIiMiBwYHBgcGFhcWFx4BNzY3PgE3Ni4BJyYnJgcyMzYXFhcWFxYGBwYHDgEnJicmJyY3Njc+ARciIyIHBgcGBwYWFxYXFjY3Njc+AScmJy4BBzIzMhcWFxYXFgYHBgcGLgEnLgE3Njc+AQcVESERBTMRIxMVMzUHFTM1BxUzNQcVMzUB8wECY15bQEIWFR4uL0hIsllcS0poFRYbXkhJVjg7BQVcVlQ5Og8QKjQ1Sky0U1U7PR0cCQouNbhuBQVUT0syNAkLNjg6TEidRUYtMB4UFTYzjk8DA0tFQyssBgg3NThFRI92ICICHyE6KGNkAS7+6v7+GsrKysrKysoDIi4tTlBhVrNNTjM1Kg4PMC6RVletmzY3FA4xAS0rTE1bUqhERicqCiAhQD9XVFlbSldpKysqSElUT507PBsbDSUmP0CjT1I7OkMwJyZAQUtHizI0EhQbVT5AlkJFKx8ieQz+kAF8GP60AScZGUoYGFUYGE0YGAAAABAAAP+jA7gDIgALABcAWgCyAQgBSwGgAf0CSAKKAs4DEQNoA7UEAQRLAAABFSMVMxUzNTM1IzUHMxUzFSMVIzUjNTMTMSMHIwcjFSMHIw8HFR8EMzczNzM3MzczNzMXMxczFzMXMxczPwU1LwUjJyM1IycjJxcjDwUfGT8ENS8DIyc1JzUnIy8BIy8BNScjJzUvASMvATUnNScjNScjJyMvATUvASMnNScjLwEFIw8CFQcjDwEVDwIVBxUHFQ8BIw8BFQ8CFQ8BIw8BIw8BFQcVDwEjDwIVHwUzPxk1LwQhMSMVIw8DFR8EMzczNzMXMxczFzMXMxczHwYzPwU1LwIjLwkjJyMnIycjNQcjDwIjDwEVByMPASMHFQcjByMHIwcVDwMjFQ8BFQ8CIw8BHwUzPx0zPwMvAwUPBR8WFR8EMz8ENSc1Lwg1JzUvBCMnIyc1LwEjJzUnNS8BNSMvATUnIyc1LwI1LwMFIw8FFSMVBxUHFSMVBxUXFTMVFxUXFRcVHwkzPwQ1LwI1JzUnNSc1JzUnNTc1NzU3NTc1NzUvBAUjDwMVBxcVBxUHFQcVBxUPCBUfAzM/BjU3NT8HNTc1MzU3NTc1JzUvAwUjDwMVFxUXFRcVFxUfBxUXFR8CMxUfAzM/BDUvCzUnNSc1JzUnNS8EBSMPBRUHFQ8PFR8FPwI1PwE1NzM3NT8CMz8KNTcvBAUPBR8CFRcVFzMXMx8CMx8BMxUXFRcVFzMfATMXMxcVFxUfARUfAhUfAjM/BTUvHAUjDwgjByMHIwcjByMHIw8EFR8FMzczNzM3MzczPwszNzM/ATU/ATU3NT8ENS8EBQ8FFR8FMx8BFRczFzMfARUfATMXFR8EMxczHwYzPwU1LxYhIw8XFR8GMz8IMz8ENTczNzM3NT8BNT8BMz8ENS8EAa59fYx9fXVefX1efX0vCwYLBQwFBQYmBgoIBAIDAQECBgQJBCsFCQUFBQUKBR4FCgUFBQUKBBgJBQQDBAQBAQQDBAcmBQYFCwYLBvQFBAUDBAQCAggCDAcIBwQDBAMEAwcGBw8CCQIDEQQDBAkJBAQDBAECAwIBAgMCAQISAQkEBgEDBAMBAwgEAwEDAQMBCAQEBAEECAEECv3xBQQIBQQBBAQEDAQEBAgDAQMEAwQDBAkBDwIBAgMDBQIBBAMDAQIDAwgECQUHBQUQBgIGAg8HBgcDBAMEAwQHCAQEBwIBAgIDBAgBBBINCgUHBgICAwgIBAEIBCYECAMEBAQHBAgDGgMIBwcDCQUEBAQDBAEEAwcBAwUEBAQEBAkEJgQJBQQEBQ2tBAgGBwEDCAMBFQMBAwMBCQEMAQkJAwMCAQIDAwgEAQQCAgIDAwgEBQQJAwgDAgQDAgMCAwIDAgMDAwIDAwMDAwMDAwYDIwIDBAQCAgUECAGEBQgEAwMDAQYDAwIDAgMCAwIDBxYBBAEEAQYDAgIEBAMEBQkEBAQDBAECAgIBAgECAQICAgEBAQgBAQECAgQBAgcDAgECAwIBAgYDCQMDAwT9wwUECAMDAgIBAgEBAQEBAQIBCAIBAQEDAwQEBAUJBAMDBAECBQMCAQEBAQEBAgEBAgMDCQLuBQQIBgIBAQEBAQIIAgECAgQBFgEBBAMMBQkEBgUEAwoCCAECAQICAgcBAQEBAQQDBAj8pwUICAQCAQEBAgYCAgIBBAEGAgoDBAEDBgQFCQQEBAMEAgESAQIBAgECAgIHAgEBAQECBwMFAvAEBQQEAwQCAgcCAwUCBAECAwwKAwQCBAEBBAMEBAkIBQcDDwIBBgUIAQEBBgECAQIBAgICCQECAgMECP2tBAgEAwICAgUGDAYBDAEGBwMBAwMBBwcDAQcHAQMBAwQIBAQMBAQEBAkEBAQFAgEBBAQDFQMECgcZAwoCAwMDAwMDAwIGAwIDAgMCCAGcBQQEAQcKHAsHEgQLBAcEBAcECAQQCAQDAgIBBAQDBAUMBQ0EBQQFCAUmBAkEBAQEBAQBBAMBAwEDBAQIBAkEAgIBAgYDBAX+RAQFBAYCAgECAwMFBAEEDQkBDQEEBQUEAQQFBQoFGQEEARQGBQUFCwoJBQQEAwQBAgMDBAcTBQQFBQQFBQQlHggEBAkMAw0CEgUEBQMBFAQECQgWLAUFBAUFBQQFGwQGBAEBAgMDBAQECQMGBQsFBQUGFAEeBQoFBQQBBAEEBRwNBAEEBQMCAQICAwQIAiF9jH19jH0XfV59fl0BlQEBAQEHAgIEAwQEBAkEBQYDAgkCAQEBAQEBAgUBAgMDCAQFBAkDAwMHAQEBAVMBAgIEBwkJCgEJBwYHAwQDBAMEBwgHFAQNBAQgAwMCAgICAwMICQUGBQUEAQQBBAUcDQQBCAQBBAQECAEDAQMBAwQIAwEDBAMBBgQHCAEEBAEDBAMBAwwDAQMBAwEIBAQEAQQEBAEEDRcFBQQBBAEJBQoFDAQFBAQDBAECBQcMHggECQQUBwgHBAMEAwQDBwYEAwcFBAQJBAQDBAECAgUMBQkEAwYCAQEBAQECAgcCAgMCAgIBAgMDCAUJCAMFAgECAQIBAgICCQIBAQEnAgMFAgQBAg8DAgECCQwJAQkEAwMBAwMBAwsHBwkJBAMEBAEBBAMMAwQGAwMCAwMDAwMDAgMDAgMCAwIDAgMEAxYDAwgJCQcDBDsBAgMDBA0FCwIDAwMDAwMCAwMKIwMHAwcEDgsDBwMIAwMCAQEDAgQICQQCBAkEBAQEBAUDAQMBAwQBAxAEAwEDCAMBCgEDAwEDAwEDAwEGBAkBAwIDA6kBBAQDBAgEBAkFBAkNBBsFDQkEBAkEAQQiBAUBBAQDAwIBAgIDBAgJBQQSBAsEBwQEBwQIBB4ECAQHBAQHBAQJBAQEAwQtAQQIBAQEBB4FCgUFBQUJBScFBAUJCgQyBAUECAQGAgIGCAoFGQEEARQGBQUFCwYmBQYFCwYLBhYGCQgDAwQQAgYICAkGEQUGBQYLBSEGCwUFCgYPAQQBGQUKAQQGAgEBAwIECAkIASkEBQUEBQUJBSIFCQUFBQUKBRcFBAcCAjkBAgMDCAcEBwQaAwsLBwYEAwcUDwMHAQgFBAUIAwMCAgICBwEDFQEDCwEHEAQEDAQEBAQEBAkEJgUFCAQEAwSgAQQDAwQJCQkGAQwBBgwGBQMDAgEEAQQBAgUEAgIBAQEEAQEBBgEBAQIBAQIDBwUEBQQIAwMJAgEGAxADBgMCAwIDAgMCAwYCAwMDAwMHSgECAQMGDAMDBQMCAQEBBAMDBAkFBAgDAwIBAQEBAgkCAgIBAgECAQEBAgICAQEBBAEBAQUEAwUEBQgIAwIBJwEBAwYECQUEBAQCBQMECQEGCQMCAQIDAgECAwQDCgIIAQIBAgIDAQIDAwgFBAkEAwMDBAIBAgECAQIBEBAGAgMFCQMKAQICAg8CAwUGDBQBAgECAQIBAgYCBgkEBQQEBAMDAgEBAQICAgECAQgMAwQDAgECAwIBAhIBCQQDBQQEBAUJBAMDBAAAAAAIAAD/mgO4AyIAFAApAC4AMgA2ADoAPgBCAAABIgcGBwYUFxYXFjI3Njc2NCcmJyYHMhcWFxYUBwYHBiInJicmNDc2NzYHFREhEQUzESMTFTM1BxUzNQcVMzUHFTM1AfR6amY8Pj48Zmr0amY8Pj48Zmp6bl5bNTc3NVte3F5bNTc3NVteKQEu/ur+/hrKysrKysrKAyI+PGZq9GpmPD4+PGZq9GpmPD4xNzVbXtxeWzU3NzVbXtxeWzU31Qz+kAF8GP60AScZGUoYGFUYGE0YGAAAAAoAAP+iA7gDIAAPACAAMgBtANYBXwG8AgMCTQK5AAABJgYHBh4CNz4BNzYmJyYHNh4BFxYGBw4BLgI2Nz4BFwYPAQ4BFhcWPgE7ATUjNjcmAysBByMHIwcVDwUVHwUzPwMzNzM3MzczFzMXMxczHwEzPwM1LwQjNSMnIycXDwYVHwozHwYVHwIzHw0zPwQ1LwE1JyMvBiMvATUjLwsjLwEjLwcjNSc1LwQjBQ8BIw8EFQ8EFQcjBxUPAyMVBxUHIxUPBBUHIw8BFQ8CFQ8CIw8DFQ8DFQcVDwoVBxUfBD8EMz8ENT8mNS8DAQ8FFRcVBxUHFQcVBxUHFQcVBxUHFQcVBxUHFQ8HFR8EPwUzPwEzPwE1PwEzNzM3NTc1MzU3NTc1NzU3NTc1NzU3NTc1JzUvBAUPBRUXFRcVFzMfBTMfARUXFRcVFxUzFxUXFR8EPwQ1Lw01JzUnNSc1LwMBDxcfBD8EMz8DMzczNzM3MzczNzU3Mzc1NzM/AjM3MzU/AzUvBAUPBRUfAxUfATMfAjMfAhUfATMfARUfATMXMxczFzMfAjMXMxcVMx8HMxcVFzMVMxczPwQ1LwQjJyMnIycjLwojLwQjLwUjAfRAbxcZGFZ+Oj1RAQREOSsyJkgzCQ8tMSFQSzgaCRYYUGMJFB0JCQQIBAkNBFlZEiYOOwcNBg0NBycNDgQDAwQBAgMDCQQFBgwGFwYLBgYGBikGBgYGBgUfBAUMAwMCAgYDCicGBwYNB+kFBAQDAwECAgIGAgIDBgUEAwgBDgIIAgYCBAECAgECAwIDBQQDBAMKBQYDCQQJBAQDBAIEBgEEAwIDAgMCAQIIAQUDBAIEAgIFAgcCAgECCQECAgMHAwIDAgECAwIGAgoF/fMFBwECAwIDAgMCAwIDBAECAgMCBAEEBAECAgICAgIBAgICBAICBAEBAQIDAgIKAQICAgEEAQIBAgECAQICAQQEAw4ECAQDAQECAwECAgIBAgECAQIBAgIDAgECCAIBAgICAQQCBAEGAgoCBgMKAwYDBQMCAQQGCAUCsgQFAwYCAQEBAQEBAQECAQMFAwUDBAMCBgMBAgMGBAkJBAQDAgEBAwIBAgMDAgEFAQwDAQIBAQEBAQEBAQQDBAQI/KYEBQMEBAEBAwIBAwIBBAEKAQQDAgMCAQIDAQIEBwkJBAQDBAIEAgMCBwQBBgECAQIIAQEBAQUICAKxBAQJBAUKBA8FBQsPBgULBSEGCxAIBAUCAgQDBA0JBgYUBQESBgcFAQUBBQEFARwBCwUBBQUBBQsPAQQBAwMCAQQDBAQI/d4EBAQDAgIBAgMEDQIBAgMCAQIDAwsCAQgDAwUBAgECAQIBAgMDAQIBAgECBAMGAw0DHQIDDQQDDQkFCAUCAQQDBAQDBAgDFAIRAwkFEQIGBQMFBQUCAQ8CBQICAQQDBBEEBAUCNAFLOzmAWR4VFW1APnEaFScBIj0lN24dFQcaOE1RISUsMhIjNgEPEQMDAQYZIkQIAUgBAgYBAgQCAwQICQUEBAMEAQICAgQCAQEBAQEFAQYEAwkFCAgCBAYBAQFPAQEDAwQEBAUJBAYBAgEGAwQCCA4DCAMGAwQBAgIDBAMEAwcHAwgDEgoIAgQCAgMDCAoHBwEMCAQEBAQEBAQLAQcDBgIGAgMFAwcDAgMJAwICBwICAgIBAQECAgQCBQwBBAICAgICAQICAgICAQQCAQICAwQBBAEEAQIDAgMCAQIDAgECBgIBAgYDAwIFAgECDwMCAQIBAgMGAwMDAwMDAwMBBAkFCAMDAwEEAwMEBgUDAgUBAgMCAwIDAgMDAgUCAwIMAgMCAwIDBAMEAwYDCgMGAgoBBgIFBAQECQkGBAH+xgECAggEBAQEMwMJAwYCBgMDAwMDAwYCAwMJAg4DCAENBQsFBgoHBAUJBAYCAgICAwMDAwYGBgUBBQcPJgMKAwMHAwMEAwMEAwMEAwcDDgMsBQkIBAIDAhMBAgMDCAQbBgcTBw0TBgcNBh8NBQEFAQUBBQEFAQUBAQQEBAICAgMDCQkIBgYFBhALBhEFBgYFLwYFBgYMBgcFBwYC/rIBAgYEBAYECQQDBQkCAwQDDAEEAwQDBwkJCAMDAwICAQYCBgMCAwIDAw8GAQMDAQMEBwwEAQMEBAQJCAQDAgICAQMCBAQJBAUEBAMBCgICAgICAgEBBwIFAQEBAwICAQIBAgEBAQEBAgICBAIJAQEEAQQBBAcFBAkIBAIDAQMHBgMDBgICAwEDAgMCCQIDAgEEAQQNAQIAAAAAAwAAAAADIAJYAAMABwALAAATFSE1BRUhNQUVITXIAlj9qAJY/agCWAJYZGTIZGTIZGQAAAUAAP/TA9QC6QAaAFQAdACIAJwAAAEiBgc5ARQXFhcGBwYPARUhNScmJzY1OQE0JgcyMxcWFxYfARYXFjMxMj8BFhUUBwYHFxYXFhUWFRQPAQ4BIiYvASY1NDc0NzY/AScuATU0NzI3MzYHMDEGFxYXHgEyNjc2NzYnMDEWFxUjNSMVIzUjFSM1NhMiDgEVERQeATMhMj4BNRE0LgEjBSEyHgEVERQOASMhIi4BNRE0PgEBSCUyAQoGCSIXHg8BAUwBGksXMUkCAgQPCQYGAgUDBgoMCgQGBQYSAgYKAgEBAQkeJB4JAQEBAgoFAgQKDggDAQIJIgIBAgYMJiomDAYCAQIyEjAUnBUvEw41WTU1WTUCOjVaNDRaNf3GAjolPiQkPiX9xiU+JCQ+AmMxIxIWDgsMDxQcAoWFAjEaFyojMS8BAQICBAEEAQIFAwwPFg0PCxIBBAYGBAkCAgEKCgoKAQICCQQGBgQBFAMIIg4REAEDggwGDAUNDQ0NBQwGDBYgbExMTExsIgFLNFk1/m41WTQ0WTUBkjVZNDwkPSX+biU9JCQ9JQGSJT0kAAAAAAUAAAAAA48CkwADAAcACwAPABMAABMRIREFMxUjNyEVIQczFSM3IRUhWQM2/O2fn8ICLv3Swp+fwgIu/dICk/2XAmnRra2tI6WlpQADAAAAAANSArwABAAIABQAABMVESERBSERIQEVIxUzFTM1MzUjNZYCvP1wAmT9nAEFm5tam5sCvBn9XQK8LP2cAfqbWpubWpsAAAAABAAA/5YDvQMiABcAMwA/AEsAAAEiDgMWFx4CNz4BNzY3NicuAScmIxcyFxYXFhcWBgcGBwYHBicmJyYnJicmNz4CFwcVIxUzFTM1MzUjNQczFTMVIxUjNSM1MwHwV6V/RAFAPTuhsFFUhicpAwYeHnZOXmsIVVBOOToWFxcrLERGWlhWWENDJyYDAyMecpRPRn19jH19dV59fV59fQMiRn2hs6Y+P0kJHh16UVNYV1VThyYvMScmQkRST6dISi80EA8WFjk1UU9XWk5JcD4B0H2MfX2MfRd9Xn1+XQAAAAAEAAD/lgO9AyMAFgAxADsARAAAASYOAxYXHgI3PgE3Njc2Jy4BJyYHNhcWFxYXFgYHBgcGBwYnJicmJyYnJjc+AhcGDwEnAzc2NxcDFhcWFzcHJwcB9FimgUQBQD07obBRVIYnKQMGHh52Tl5rVlJQOjsXFxcrLERGWlhWWENDJyYDAyMecpT8ESIzgHQXSCOGiQcOQyIeHXwyAyIBRn6hs6Y+P0kJHh16UVNYV1VThyYvMQEmJUNEVE+nSEovNBAPFhY5NlBPV1pOSXA+0yNFaab+qh5bLpoBBgkSVSpDdJFNAAAGAAD/lQO+AyQAGwAxAEkAYABkAGkAAAEmBwYHBgcGFhcWFx4BNz4CNzYnLgEnJicjJgc2FxYXFhcWBgcOASYnLgI3Njc+ARcmBwYHBgcGFxYXFhcWNjc+AicmJy4BBzYXFhcWBxYGBwYHBiYnJicmNjc2NzYXBgchAxYXITYB82xlYUFCCww3PD1TT7dWWIRPBgYeHHdPUFcDFRBjXVk6PAgJPT5AprRNUGQgFRc5OKJfW1VRMjUBBCQkQURSTZ4/QUUEHiA8MHxCUEpHKywBAUg+QEtHjDM2FBUUJyc9SlVgYAGAwGQz/tIzAyICNjVaXWxctklKKCgLHB13pFlbU1OGKCkFAjEDMTBTVmNYrEBDOxArLI+zVVlCRE4rAzAvT1JbU1BONjgQECUwMoyiSUwyKzAwAiwqRkpQS4ssLwcJMTM1RUKQOz0iK2OsrQEmtFpaAAAAAAYAAP+VA74DJAAbADEASQBgAGoAdQAAASYHBgcGBwYWFxYXHgE3PgI3NicuAScmJyMmBzYXFhcWFxYGBw4BJicuAjc2Nz4BFyYHBgcGBwYXFhcWFxY2Nz4CJyYnLgEHNhcWFxYHFgYHBgcGJicmJyY2NzY3NgUGDwEnAzc2NxcDFhcWFzcHJwcGBwHzbGVhQUILDDc8PVNPt1ZYhE8GBh4cd09QVwMVEGNdWTo8CAk9PkCmtE1QZCAVFzk4ol9bVVEyNQEEJCRBRFJNnj9BRQQeIDwwfEJQSkcrLAEBSD5AS0eMMzYUFRQnJz1KAQIRIjOAdBdII4aJBw5DIh4dfA4ZCwMiAjY1Wl1sXLZJSigoCxwdd6RZW1NThigpBQIxAzEwU1ZjWKxAQzsQKyyPs1VZQkROKwMwL09SW1NQTjY4EBAlMDKMoklMMiswMAIsKkZKUEuLLC8HCTEzNUVCkDs9Iit2I0Vppv6qHlsumgEGCRJVKkN0kRYkEwAAAwAA/5YDvwMiABsAMgA7AAABIgcGBwYHBhYXFhceATc2Nz4BNzYnLgEnJicmBzYXFhcWFxYGBwYHBiYnLgE2NzY3PgEXBg8BFzUXEQcB62xjYD9ACgs5PT5UTrRTV0BDUAgHHRt5UVNZDQ9PSEcrLAEDQDk8SEaQNzkyECYoQCNSGTZsL9HKygMiNzZbXWtct0dKJyYLHB07OaFYW1NViykqBAGOAikoRUdPSYkuMQwOKTAxh5c+QSMVFqImTSGUj48BKI8AAAAEAAD/8AOrAswAEwAnACsAOAAAEyIOARURFB4BMyEyPgE1ETQuASMFITIWFREUBisBESERIyImNRE0NhMhESE3HQEjFTMVMzUzNSM12CpHKipHKgI5KkcpKUcq/ccCOSw+Pix0/q5zLT09vwEU/uxzTU0uTU0CzClHKv5YKkcpKUcqAagqRykwPiz+WCw+ATT+zD4sAagsPv6Z/uztFzYuTU0uTQAAAAAEAAD/8AOrAswAEwAnACsALwAAEyIOARURFB4BMyEyPgE1ETQuASMFITIWFREUBisBESERIyImNRE0NhMhESE3FTM11ypHKSlHKgI6KkcpKUcq/cYCOiw+Pix0/q50LD09vwEU/uwlywLMKUcq/lgqRykpRyoBqCpHKTA+LP5YLD4BNP7MPiwBqCw+/pn+66cvLwAAAgAA//ADqwLMABMAIwAAEyIOARURFB4BMyEyPgE1ETQuASMFITIWFREUBiMhIiY1ETQ21ypHKSlHKgI6KkcpKUcq/cYCOiw+Piz9xiw9PQLMKUcq/lgqRykpRyoBqCpHKTA+LP5YLD4+LAGoLD4AAAMAAP+WA78DIgAbADIAPAAAASIHBgcGBwYWFxYXHgE3Njc+ATc2Jy4BJyYnJgc2FxYXFhcWBgcGBwYmJy4BNjc2Nz4BFwYPAScDNzY3FwHrbGNgP0AKCzk9PlROtFNXQENQCAcdG3lRU1kND09IRyssAQNAOTxIRpA3OTIQJihAI1LWESIzgHQXSCOGAyI3Nltda1y3R0onJgscHTs5oVhbU1WLKSoEAY4CKShFR09JiS4xDA4pMDGHlz5BIxUWdSNFaab+qh5bLpoAAAYAAP+VA74DJAAbADEASQBgAGsAeQAAASYHBgcGBwYWFxYXHgE3PgI3NicuAScmJyMmBzYXFhcWFxYGBw4BJicuAjc2Nz4BFyYHBgcGBwYXFhcWFxY2Nz4CJyYnLgEHNhcWFxYHFgYHBgcGJicmJyY2NzY3NhcGAgc2NzY3FyYvARYfAScGBwYHBjc2NzYB82xlYUFCCww3PD1TT7dWWIRPBgYeHHdPUFcDFRBjXVk6PAgJPT5AprRNUGQgFRc5OKJfW1VRMjUBBCQkQURSTZ4/QUUEHiA8MHxCUEpHKywBAUg+QEtHjDM2FBUUJyc9SlUYTRcXKicUfRkxMgwWIkQIGRIGCgELFBYDIgI2NVpdbFy2SUooKAscHXekWVtTU4YoKQUCMQMxMFNWY1isQEM7ECssj7NVWUJETisDMC9PUltTUE42OBAQJTAyjKJJTDIrMDACLCpGSlBLiywvBwkxMzVFQpA7PSIrb0L+80EXMCsVh06eUSRJbkoHHRQHCwYhQ0wAAAAABwAA/5IDwQMjABwANwBRAGoAewCNAJ8AAAEiIyIHBgcGBwYWFxYXHgE3Njc+ATc2LgEnJicmBzIzNhcWFxYXFgYHBgcOAScmJyYnJjc2Nz4BFyIjIgcGBwYHBhYXFhcWNjc2Nz4BJyYnLgEHMjMyFxYXFhcWBgcGBwYuAScuATc2Nz4BFyIGBwYeAjc+ATc2JicmIxcyHgEXFgYHDgEuAjY3PgEfAQYPAQ4BFhcWPgE7ATUjNjcmAfMBAmNeW0BCFhUeLi9ISLJZXEtKaBUWG15ISVY4OwUFXFZUOToPECo0NUpMtFNVOz0dHAkKLjW4bgUFVE9LMjQJCzY4OkxInUVGLTAeFBU2M45PAwNLRUMrLAYINzU4RUSPdiAiAh8hOihjLz9sFxkYVn46PVEBBEQ5KzIEJUYyCQ8tMSFQSzgaCRYYUCw3CRQdCQkECAQJDQRZWRImDgMiLi1OUGFWs01OMzUqDg8wLpFWV62bNjcUDjEBLStMTVtSqERGJyoKICFAP1dUWVtKV2krKypISVRPnTs8GxsNJSY/QKNPUjs6QzAnJkBBS0eLMjQSFBtVPkCWQkUrHyJhSjs5gFkeFRVtQD5xGhUnIzwkN24dFQcaOE1RISUsATESIzYBDxEDAwEGGSJECAAEAAD/lgO9AyMAFgAxADwASgAAASYOAxYXHgI3PgE3Njc2Jy4BJyYHNhcWFxYXFgYHBgcGBwYnJicmJyYnJjc+AhcGAgc2NzY3FyYvARYfAScGBwYHBjc2NzYB9FimgUQBQD07obBRVIYnKQMGHh52Tl5rVlJQOjsXFxcrLERGWlhWWENDJyYDAyMecpRPGE0XFyonFH0ZMTIMFiJECBkSBgoBCxQWAyIBRn6hs6Y+P0kJHh16UVNYV1VThyYvMQEmJUNEVE+nSEovNBAPFhY5NlBPV1pOSXA+zEL+80EXMCsVh06eUSRJbkoHHRQHCwYhQ0wABAAA/5YDvQMjABYAMQA1ADoAAAEmDgMWFx4CNz4BNzY3NicuAScmBzYXFhcWFxYGBwYHBgcGJyYnJicmJyY3PgIXBgchAxYXITYB9FimgUQBQD07obBRVIYnKQMGHh52Tl5rVlJQOjsXFxcrLERGWlhWWENDJyYDAyMecpRPYGABgMBkM/7SMwMiAUZ+obOmPj9JCR4delFTWFdVU4cmLzEBJiVDRFRPp0hKLzQQDxYWOTZQT1daTklwPsCsrQEmtFpaAAcAAP/TA9QC6QATACcAKwAzADcAOwA/AAATIg4BFREUHgEzITI+ATURNC4BIwUhMh4BFREUDgEjISIuATURND4BFxEhEQUhFSE1IxUjFTMVIzchFSEDFSE11zVZNTVZNQI6NVo0NFo1/cYCOiU+JCQ+Jf3GJT4kJD4BAfr+GwHP/qkWYmJieAFX/ql2Ac0C6TRZNf5uNVk0NFk1AZI1WTQ8JD0l/m4lPSQkPSUBkiU9JEj+hAF8g2hnZxVmZmYBTmxsAAACAAAAAAN9ApMASgCzAAABIgc5AQYHOQEGBzkBBgcGHQEUFzAxFhcWMxY3OQEyNjU0JzMyNzY3MTYnPgE0Jy4BKwE2NTkBNCcuASMFNzY/ATY3PgEnLgEvATEHMDIVMhc5ARYGBzkBBg8BDgEVFBcxHgEXFjsBFjczMhYXFhQHBisBFSEyFhcWFTEUBiMhFSEyFhcWBzkBDgEjIRUzMhYXFhU5ARQHDgEjBic5ASInJic1Jj0BNDc2NzY3MTY3MTYzNDMBzA0SPbgvEwgCAQgQLShB3NsaHQUQGg4NBgYMGxsOCBgOFQYPCBgO/sMFBgQOEwYPBA0GEgoFAQEFBQUCBwgdDBYKAgIFBwMCDEuWcQYIBAgHBA/yAT4GCAQHCg/+wgEPBwkECAMDCwv+8c0FBgMGBgIGBtvbOR4hDQcBAgYRJMMxBwQBApMKKIAgPxggEyQNMSJBHhoBASMcDxEOCxgeFwMhOxQKDQ4RHRMLDAEFBwMOFQcTLhIKDAIBIwEIBxoJCh0MFQ0GAwYFBgEBAQEEBQwfCQYjBAUKEhMMIwYGDRUMCSMDBAgRDwgDAgEBFBY0AR4sCiQSHRUzGYcgBAEAAAMAAAAAA4oCagADAAYACwAAExEhEQUhBSUFJREhXwMr/SgChP6+/o4BcgFz/RsCav3pAhcj1Mr09P45AAIAAP/TA9QC6QATACMAABMiDgEVERQeATMhMj4BNRE0LgEjBSEyFhURFAYjISImNRE0Nuc5YTk5YTkCGjlhOTlhOf3mAhorOjor/eYrOjoC6ThfOf6KOV84OF85AXY5XzhuOSn+iik5OSkBdik5AAAFAAD/mgO4AyIAFAApADoATABeAAABIgcGBwYUFxYXFjI3Njc2NCcmJyYHMhcWFxYUBwYHBiInJicmNDc2NzYXIgYHBh4CNz4BNzYmJyYjFzIeARcWBgcOAS4CNjc+AR8BBg8BDgEWFxY+ATsBNSM2NyYB9HpqZjw+PjxmavRqZjw+PjxmanpuXls1Nzc1W17cXls1Nzc1W15qP2wXGRhWfjo9UQEERDkrMgQlRjIJDy0xIVBLOBoJFhhQLDcJFB0JCQQIBAkNBFlZEiYOAyI+PGZq9GpmPD4+PGZq9GpmPD4xNzVbXtxeWzU3NzVbXtxeWzU3vUo7OYBZHhUVbUA+cRoVJyM8JDduHRUHGjhNUSElLAExEiM2AQ8RAwMBBhkiRAgABQAA/5YDvQMjABYAMQA2AEAARgAAASYOAxYXHgI3PgE3Njc2Jy4BJyYHNhcWFxYXFgYHBgcGBwYnJicmJyYnJjc+AgcUFSERBTIzBgcGBwYHJjcUFSE1FwH0WKaBRAFAPTuhsFFUhicpAwYeHnZOXmtWUlA6OxcXFyssREZaWFZYQ0MnJgMDIx5ylH4Bmv7BcnIPIBgNFRBA4/7InAMiAUZ+obOmPj9JCR4delFTWFdVU4cmLzEBJiVDRFRPp0hKLzQQDxYWOTZQT1daTklwPvicnAE4MQkcFgkPAjQFXV26fQAABAAA/5UDvgMjABsAMwBKAGEAAAEmBwYHBgcGFhcWFx4BNz4CNzYnLgEnJicjJgc2FxYXFhcWBgcGBwYmJyYnLgE3Njc+ARciBwYHBhUGFhcWFxY2Nz4CJyYnLgEHMhcWFxYHFAYHBgcGJicmJyY2NzY3NgHwbGRhP0ILDDc8PVNPt1ZYhE8GBh4cdU5PVgMbBWNbWDg6BghBQEJUUbFMTjAzIBYWOjqnTVtSUDEyAkxCRVJMmz5ARAQfIDwygDVRSUcpKgNJPUBKR4wzNhQVFCcoPU0DIgE2NVpda1y2SUooKAscHXekWVtTUoYoKQYCMQEzMlRXY1irQEEbHBMqLEdHs1ZZQkZOLjIwUFNbU5s1Nw4PJzAxjKJJTDIsLzEtK0hKUUqHLC0HCTEzNUVCkDs+IS0AAAAABgAA/5UDvgMkABsAMQBJAGAAaABxAAABJgcGBwYHBhYXFhceATc+Ajc2Jy4BJyYnIyYHNhcWFxYXFgYHDgEmJy4CNzY3PgEXJgcGBwYHBhcWFxYXFjY3PgInJicuAQc2FxYXFgcWBgcGBwYmJyYnJjY3Njc2FxQVIxUzFTcnFh8BBzUjNTMB82xlYUFCCww3PD1TT7dWWIRPBgYeHHdPUFcDFRBjXVk6PAgJPT5AprRNUGQgFRc5OKJfW1VRMjUBBCQkQURSTZ4/QUUEHiA8MHxCUEpHKywBAUg+QEtHjDM2FBUUJyc9Sofi4qWJESIzZt/fAyICNjVaXWxctklKKCgLHB13pFlbU1OGKCkFAjEDMTBTVmNYrEBDOxArLI+zVVlCRE4rAzAvT1JbU1BONjgQECUwMoyiSUwyKzAwAiwqRkpQS4ssLwcJMTM1RUKQOz0iK3QyMr5kw3oUKD15NoUAAAADAAD/lgO/AyIAGwAyAD0AAAEiBwYHBgcGFhcWFx4BNzY3PgE3NicuAScmJyYHNhcWFxYXFgYHBgcGJicuATY3Njc+ARcGAgc2NzY3FyYnAetsY2A/QAoLOT0+VE60U1dAQ1AIBx0beVFTWQ0PT0hHKywBA0A5PEhGkDc5MhAmKEAjUikYTRcXKicUfRkxAyI3Nltda1y3R0onJgscHTs5oVhbU1WLKSoEAY4CKShFR09JiS4xDA4pMDGHlz5BIxUWbkL+80EXMCsVh06eAAAABQAA/6wDtgMbAAgADAAQABQAGAAAARURITUjETM1AQcXNw8BFzcPARc3DwEXNwKlARHg4P6eSzxL00s8S9JMPEvSTDxMAxsZ/LExAwUy/n48SzwsPEs7LDtMPCw8SzsABAAA/2oCogNSAAMAFAAeACkAACUhFSEBETMyNj0BNCc+AT0BNCcmIwczMhYdARQGKwEHMzIXFh0BFAYrAQKi/qQBXP6ksFVWUSMgJihUOTkfGiAiMAU1JRASHB1DKb8D6P02VFI6eyISRjccUCgqZCQoJikjbhIUMD4mIQAAAAAEAAD/mgO4AyIAEAAUAGoAbwAAASIHAQYUFwEWMjcBNjQnASYHCQIlMQ8DFS8CDwQfAiMPAxUfAzMPAh8EPwIVHwMzPwM1HwI/BC8CMz8CNS8CIz8CLwQPAjUvAgcwOQEwAfQPC/5hCgoBnwsfCgGfCwv+YQsPAYb+ev56AX0EBAIBYwMEBAQNAgEBAmOMBAMCAQECAwSMYwIBAQINBAQEA2MBAgQEEgQEAgFjAwQEBA0CAQECY4wEAwMDAwSMYwIBAQINBAQEA2MBAgSLAyIL/mEKHwv+YQoKAZ8LHwoBnws+/nr+egGGxgECAwSMYwIBAQINBAQEA2MBAgQEEgQEAgFjAwQEBA0CAQECY4wEAwIBAQIDBIxjAgEBAg0EBAQEYgECBBoEAgFjAwQEBA0CAQECY4wEAwMwAAAABAAA/5oDuAMiABAAFAAaAB8AAAEiBwEGFBcBFjI3ATY0JwEmBwkCJQ8BFyE3JxcHIycB9A8L/mEKCgGfCx8KAZ8LC/5hCw8Bhv56/noBhgfQUgEKUte7SOZIAyIL/mEKHwv+YQoKAZ8LHwoBnws+/nr+egGG4AWX/f1+h9zcAAACAAD/mgO4AyIADwATAAATBhQXARYyNwE2NCcBJiIHCQM7CgoBnwsfCgGfCwv+YQofC/6UAYYBhv56AXgKHwv+YQoKAZ8LHwoBnwsL/kcBhv56/noAAAAABAAA/5oDuAMiABAAFAAhAC4AAAEiBwEGFBcBFjI3ATY0JwEmBwkCJSIOARQeATI+ATQuAQcyHgEUDgEiLgE0PgEB9A8L/mEKCgGfCx8KAZ8LC/5hCw8Bhv56/noBhjlhODhhcmE4OGE5M1YyMlZmVjIyVgMiC/5hCh8L/mEKCgGfCx8KAZ8LPv56/noBhtI4YXJhODhhcmE4FzJWZlYyMlZmVjIAAAAAAwAA/5YDvwMiABsAMgBKAAABIgcGBwYHBhYXFhceATc2Nz4BNzYnLgEnJicmBzYXFhcWFxYGBwYHBiYnLgE2NzY3PgEXJgcOAQcGFxYXHgE3Njc2Nz4BJyYnLgEB62xjYD9ACgs5PT5UTrRTV0BDUAgHHRt5UVNZDQ9PSEcrLAEDQDk8SEaQNzkyECYoQCNSKTYyL0IJCxIOKCVpNTgsLhoZBBYWLB5LAyI3Nltda1y3R0onJgscHTs5oVhbU1WLKSoEAY4CKShFR09JiS4xDA4pMDGHlz5BIxUWUQIaGVk0ODM0KCUlBgcgHTIvbzA0IBgaAAMAAP+WA78DIgAbADIANgAAASIHBgcGBwYWFxYXHgE3Njc+ATc2Jy4BJyYnJgc2FxYXFhcWBgcGBwYmJy4BNjc2Nz4BFwYHIQHrbGNgP0AKCzk9PlROtFNXQENQCAcdG3lRU1kND09IRyssAQNAOTxIRpA3OTIQJihAI1IpYGABgAMiNzZbXWtct0dKJyYLHB07OaFYW1NViykqBAGOAikoRUdPSYkuMQwOKTAxh5c+QSMVFmKsrQACAAD/kgPBAyMAGgAxAAABIgcGBwYHBh4BFx4BNzY3PgE3NicuAScmJyYHMhcWFxYXFgYHDgEmJyYnLgE3Njc+AQHwZF5bQUIVFCBgSUevWFpJSmkWFw4NYkpMWTQnSkRBKy0HCTAzNIaQPD4iJgcfIDwqZgMiLy1QUWJWs5syMygODy8tkVVYVlqeNjgSC44lJD4/SUaLMzUrFCcoPUCaRUgsICEAAAADAAD/lgO/AyIAGgAvADkAAAEiBwYHBgcGFhcWFx4BNzY3PgE3NicuAScmJwc2FxYXFhcWBgcOASYnLgE2NzY3NhcGDwEXITY/ASYB62xjYD9ACgs5PD5UT7RTV0BDUAgHHRt5UVNZHE9IRyssAQNAOjuOkDc5Mg8nKEBIViRHbFIBChcrEEcDIjg2Wl5rXLZHSicmCxwcOzqhWFtTVYspKgSNAikoRUdPSYkvMBopMDGHlj9BIytWGjRO/USIMTQAAAAABAAA/5YDvwMiABsAMgA3AD0AAAEiBwYHBgcGFhcWFx4BNzY3PgE3NicuAScmJyYHNhcWFxYXFgYHBgcGJicuATY3Njc+AQcWFzY3BRQVIREHAetsY2A/QAoLOT0+VE60U1dAQ1AIBx0beVFTWQ0PT0hHKywBA0A5PEhGkDc5MhAmKEAjUn5WVThy/oUBmskDIjc2W11rXLdHSicmCxwdOzmhWFtTVYspKgQBjgIpKEVHT0mJLjEMDikwMYeXPkEjFRaaRUUuXCCMjAESowAAAAMAAP+WA78DIgAbADIAOgAAASIHBgcGBwYWFxYXHgE3Njc+ATc2Jy4BJyYnJgc2FxYXFhcWBgcGBwYmJy4BNjc2Nz4BFxQVIxUzFTcB62xjYD9ACgs5PT5UTrRTV0BDUAgHHRt5UVNZDQ9PSEcrLAEDQDk8SEaQNzkyECYoQCNSW+LipQMiNzZbXWtct0dKJyYLHB07OaFYW1NViykqBAGOAikoRUdPSYkuMQwOKTAxh5c+QSMVFnMyMr5kwwAAAAcAAP+VA74DJAAbADEASQBgAGUAbwB1AAABJgcGBwYHBhYXFhceATc+Ajc2Jy4BJyYnIyYHNhcWFxYXFgYHDgEmJy4CNzY3PgEXJgcGBwYHBhcWFxYXFjY3PgInJicuAQc2FxYXFgcWBgcGBwYmJyYnJjY3Njc2BxQVIREFMjMGBwYHBgcmNxQVITUXAfNsZWFBQgsMNzw9U0+3VliETwYGHhx3T1BXAxUQY11ZOjwICT0+QKa0TVBkIBUXOTiiX1tVUTI1AQQkJEFEUk2eP0FFBB4gPDB8QlBKRyssAQFIPkBLR4wzNhQVFCcnPUp4AZr+wXJyDyAYDRUQQOP+yJwDIgI2NVpdbFy2SUooKAscHXekWVtTU4YoKQUCMQMxMFNWY1isQEM7ECssj7NVWUJETisDMC9PUltTUE42OBAQJTAyjKJJTDIrMDACLCpGSlBLiywvBwkxMzVFQpA7PSIrm5ycATgxCRwWCQ8CNAVdXbp9AAUAAP+VA74DJAAbADEASQBgAGkAAAEmBwYHBgcGFhcWFx4BNz4CNzYnLgEnJicjJgc2FxYXFhcWBgcOASYnLgI3Njc+ARcmBwYHBgcGFxYXFhcWNjc+AicmJy4BBzYXFhcWBxYGBwYHBiYnJicmNjc2NzYXBg8BFzUXEQcB82xlYUFCCww3PD1TT7dWWIRPBgYeHHdPUFcDFRBjXVk6PAgJPT5AprRNUGQgFRc5OKJfW1VRMjUBBCQkQURSTZ4/QUUEHiA8MHxCUEpHKywBAUg+QEtHjDM2FBUUJyc9SkU2bC/RysoDIgI2NVpdbFy2SUooKAscHXekWVtTU4YoKQUCMQMxMFNWY1isQEM7ECssj7NVWUJETisDMC9PUltTUE42OBAQJTAyjKJJTDIrMDACLCpGSlBLiywvBwkxMzVFQpA7PSIroyZNIZSPjwEojwAAAAAEAAD/lgO9AyMAFgAxADsAQgAAASYOAxYXHgI3PgE3Njc2Jy4BJyYHNhcWFxYXFgYHBgcGBwYnJicmJyYnJjc+AhcGDwEXITY/ASYnFhcHIyc2AfRYpoFEAUA9O6GwUVSGJykDBh4edk5ea1ZSUDo7FxcXKyxERlpYVlhDQycmAwMjHnKUTyRHbFIBChcrEEeQfD9I5kg/AyIBRn6hs6Y+P0kJHh16UVNYV1VThyYvMQEmJUNEVE+nSEovNBAPFhY5NlBPV1pOSXA+tBo0Tv1EiDE0Slot3NwtAAAABgAAAAADRQKVACgATgBSAFYAWgBeAAABDwEGBwYHFBcWFzEWFxYXFgcGDwEhNzM+AScmJyYvASYnJjU0NzY/AQUhBgcGFQYXFhcxFhcWFxYHBgcGByE2NzYnJicmLwEmJyY3NDc2FxUzNQcVMzUHFTM1BxUzNQF8BAJUKSYCGxAoJBAXAwIWG0hKAcoFAU1FBQQXDyMNIhAUHSRNSf5EARonFScBGxAoJBAXAwEEBA0ZRf7lHxAjBQQYDyQMIg8VARwhCtzl5X3dvuUClQIBMjAuLigoGCklFR4VGhwjKysDLVctISIUJA4iFx4ZHSEqLisuHRouLigoGCklFR4VDQwODyEpFxYsLCIiFCUMIxYeGR0hJyIVFXMWFnQVFXMWFgAAAAQAAP/TA9QC6QATACcAawDGAAATIg4BFREUHgEzITI+ATURNC4BIwUhMh4BFREUDgEjISIuATURND4BFyIHOQEGDwEGBzkBBgcGHQExFBcwMR4BMxY3OQEyNjU0JzMyNjcwMTYnPgE3NjQmKwE2NTkBNCcuASsBNzY3PgEnJicHMDEyFzkBFgYHOQEGDwEGFzEWHwEzFjczMhcWFAcGIyInFRYzMhYVMRQHDgErARUzMhYHOQEOASsBFTMxMhYVOQEUBwYHITEmJyYnOQEmNTE0NzY/ATY/ATYz1zVZNTVZNQI6NVo0NFo1/cYCOiU+JCQ+Jf3GJT4kJD6qCggXaRkdDQUBAQULNCmJiRERAwoQEQQDBwgOBAgTEw4FCgQQCMYJFAUJAgcKDAMEAwMCBAIVGQQDAgcCAjFkRAkCBQUDCGYzQ4UHCQQDBAXIqwcLAwEHB6uCBgYDAwb+7iITFgcFBgsWQUgPAgQBAuk0WTX+bjVZNDRZNQGSNVk0PCQ9Jf5uJT0kJD0lAZIlPSQoBg9IERUnDxQMFwccGCsqAgIWEAoJEQ8UDgEJBgwlHAwMEgsGBwkUBgwdCw4BFgUFDwYDFRkGBwcBAQEBBQUXBQYBFgENCwsIAwMWEA4HBxYHDAcGAwECEBMgFRoyFSAQLDIKAQEAAgAAAAADhgJgAAIABwAAEwUlBREhEQVjAZEBkfzfAyL+bgJg4+NU/kABwOAAAAAABQAAAAADLAJ3ACYATgCGAI8AmAAAARQVBgcnBxcGByMVMxYXNQc1Mzc2PwEnNxc3Nj8BNTMVMyYnJic1BxUGBycHFwYHIxU3FhcHFzcWFxUzNTY3FzcnNjczNSMmJzcnByYnNwczBxcWHwE3FwcXFh8BMxUPAQYPARcHJwcGDwEVIzUnJi8BByc3JyYvAQc1Mzc2PwEnNxc3Nj8BFyIGFBYyNjQmBzIWFAYiJjQ2AZ0WFihKKAwGODgIFDExAwYRCCIZIgwaIA4kXgYWEQ4GGxEoSicLBjk5BwsoSykTGWkZEylKKQwGODgICydLJxYWAUckAQ8eHAsiGSEIEgYDMTEDBhEIJBojDBsfDiMPHxsLJBokCBIGAzIyAwYRCCMZIwwYIg4SIC8vQC8vIBMZGSUaGgJ3HBwGDCdKKBMYahkeWwEkDh8aDCMZIggQCAMwMAcJCAQ3ZTcICyhLKBQXagEVFyhKKAwGOToGDChLKBYWaRkSJ0onDAY3IzADBhEIIhkiDBseDiMBDh8aDCMaJAgSBgMzMgMGEggkGSMMGx8OASQOHhwMIhkiCBAIA1AvQS4uQS8jGiUZGSUaAAAAAAUAAP/TA9QC6QATACcAKwAuADMAABMiDgEVERQeATMhMj4BNRE0LgEjBSEyHgEVERQOASMhIi4BNRE0PgEHESERBSEHJxc3ESHXNVk1NVk1Ajo1WjQ0WjX9xgI6JT4kJD4l/cYlPiQkPgECDv4oAaLR8PDx/h8C6TRZNf5uNVk0NFk1AZI1WTQ8JD0l/m4lPSQkPSUBkiU9JFP+pQFbF4mDnp7+2QAAAAMAAAAAAxECnQAgAFgAeQAAASIHDgEVOQEUFxYXBgcGDwEVITUnJicmJzY1OQE0JicmBzIXFhcWHwEWFxYXMTY/ATY3FhUUBwYHHwIWFQYPAQ4BIiYvASYnND8DJicuAScmNTQ/ATYHMBUGFxYXFhcWMjc2NzY3Nic1FhcVIzUjFSE1IxUjNTYB8CskIicQCxA7KDUaAgJCAhk0KDooJyIkaAkFGhAMCQQIBgoQGQ4CBAIKCQweBBwEAQEBARA3OjcQAQEBAQQbAwQDBxAGDQ8GDDQDAgILFiIgSCAiFgsCAwRWIFMj/vAjUyACnBUTRCYiJRoRFBojMQTn5wQwIxoUKUomRBMVUwEBBQQGAgYCAwEBCAICARQaJxYbEiAJFAgPBAQCEBISEAIEBA8IFAkiBAIFFw0fGh8ZAgXhAQwSFAsWDAsLDBYKFQ0RASY5u4SEhIS7OQAAAgAA/5YDvQMiABcAMwAAASIOAxYXHgI3PgE3Njc2Jy4BJyYjFzIXFhcWFxYGBwYHBgcGJyYnJicmJyY3PgIXAfBXpX9EAUA9O6GwUVSGJykDBh4edk5eawhVUE45OhYXFyssREZaWFZYQ0MnJgMDIx5ylE8DIkZ9obOmPj9JCR4delFTWFdVU4cmLzEnJkJEUk+nSEovNBAPFhY5NlBPV1pOSXA+AQAABQAA/5UDvgMkABsAMQBJAGAAawAAASYHBgcGBwYWFxYXHgE3PgI3NicuAScmJyMmBzYXFhcWFxYGBw4BJicuAjc2Nz4BFyYHBgcGBwYXFhcWFxY2Nz4CJyYnLgEHNhcWFxYHFgYHBgcGJicmJyY2NzY3NhcGAgc2NzY3FyYnAfNsZWFBQgsMNzw9U0+3VliETwYGHhx3T1BXAxUQY11ZOjwICT0+QKa0TVBkIBUXOTiiX1tVUTI1AQQkJEFEUk2eP0FFBB4gPDB8QlBKRyssAQFIPkBLR4wzNhQVFCcnPUpVGE0XFyonFH0ZMQMiAjY1Wl1sXLZJSigoCxwdd6RZW1NThigpBQIxAzEwU1ZjWKxAQzsQKyyPs1VZQkROKwMwL09SW1NQTjY4EBAlMDKMoklMMiswMAIsKkZKUEuLLC8HCTEzNUVCkDs9IitvQv7zQRcwKxWHTp4AAAAABgAA/5UDvgMkABsAMQBJAGAAagBxAAABJgcGBwYHBhYXFhceATc+Ajc2Jy4BJyYnIyYHNhcWFxYXFgYHDgEmJy4CNzY3PgEXJgcGBwYHBhcWFxYXFjY3PgInJicuAQc2FxYXFgcWBgcGBwYmJyYnJjY3Njc2FwYPARchNj8BJicWFwcjJzYB82xlYUFCCww3PD1TT7dWWIRPBgYeHHdPUFcDFRBjXVk6PAgJPT5AprRNUGQgFRc5OKJfW1VRMjUBBCQkQURSTZ4/QUUEHiA8MHxCUEpHKywBAUg+QEtHjDM2FBUUJyc9SlUkR2xSAQoXKxBHkHw/SOZIPwMiAjY1Wl1sXLZJSigoCxwdd6RZW1NThigpBQIxAzEwU1ZjWKxAQzsQKyyPs1VZQkROKwMwL09SW1NQTjY4EBAlMDKMoklMMiswMAIsKkZKUEuLLC8HCTEzNUVCkDs9IitXGjRO/USIMTRKWi3c3C0AABAAAP+gA7sDIgAKABgAJgA1AEcAWABpAHcAhACTAKEArgC8AM4A3ADvAAABBgIHNjc2NxcmLwEWHwEnBgcGBwY3Njc2EwYHDgEWNzYXFjYmJyYXJgYWFxYXFj4BJy4BJyYFBgcGBwYHBgcGFjI3Njc2LgEzIgciBw4BHgE3NhcWNjQnJgcGBwYPAQYHBh4BNzY3NjQmBSYGFhcWFxYyNicmJyYFJgcGFx4BNicmNzYmBSYGFxYHBh4BNz4BJy4BBSYGFxYXFj4BJyY3LgEFJgcGBwYeATc2Ny4BBSIGFhcWFxY2JicmJyYFDgEHBgcGDwEOARY3Njc+ASYFIgYWFxYXFjYmJyYnJgUGBwYHBgcGBw4BFjc+ATc2LgEB9BhNFxcqJxR9GTEyDBYiRAgZEgYKAQsUFgxKLwwBEwxeZgwOBQwxygwPAwtMLQcZDwQYSS4E/fULCgYLCAVBIQQRGAcpUQYBDf8EChIHDQkJFAlORwwSC0LqDQ4JEAo9GQURGQYpUAgOAX8MDgIKNBkHGRAEGkQE/cMZBQsbBhgSAhoQAQ4C6Q8NAwEwBBAYBx0bBAIO/KQPDgMCMQcZDwUvAgENAuwaAg0yBg8ZCD0MAQ39qAsMAgg/VAwRAQtPNwYBnwwrCxMZDx4RDAUPDGFQCAEN/j0LDQMKWWkMDgUMZE8GAhgJCQUKDgg0WQsCEQ02ZSkHAg0CJkL+80EXMCsVh06eUSRJbkoHHRQHCwYhQ0wBdAIQBhkRBBkWARMZBAxTARMYBThbCgETDDJYIAIKAQcFCwgEPlAMEgtdQAcTDgECBBURCAMGHwQRGQYfJwIIBQwHMDAMEwELQC4HEw87ARIXBjVUCxMMXUEDqQIrVk0LAxEMUFQKDi0BGg5lXgwSAQo2eT4IChABGg5rWgoCEwxbZggLOAIpP0MMFAMLT1sJDqARFgZJHQMSGAYeQgZNAxUDBwQDAwIEGBQBAjAHFQ8nExYFSBMBFBgEFUIDAwEFAwkLAyMWBhkSAwsxIwcTDgAAAAAFAAD/lQO+AyQAGwAxAEkAYABoAAABJgcGBwYHBhYXFhceATc+Ajc2Jy4BJyYnIyYHNhcWFxYXFgYHDgEmJy4CNzY3PgEXJgcGBwYHBhcWFxYXFjY3PgInJicuAQc2FxYXFgcWBgcGBwYmJyYnJjY3Njc2FxQVIxUzFTcB82xlYUFCCww3PD1TT7dWWIRPBgYeHHdPUFcDFRBjXVk6PAgJPT5AprRNUGQgFRc5OKJfW1VRMjUBBCQkQURSTZ4/QUUEHiA8MHxCUEpHKywBAUg+QEtHjDM2FBUUJyc9Sofi4qUDIgI2NVpdbFy2SUooKAscHXekWVtTU4YoKQUCMQMxMFNWY1isQEM7ECssj7NVWUJETisDMC9PUltTUE42OBAQJTAyjKJJTDIrMDACLCpGSlBLiywvBwkxMzVFQpA7PSIrdDIyvmTDAAAAAA0AAP+iA7gDIAAEAAgADAAQABQAGABTALwBRQGiAekCMwKfAAABFREhEQUzESMTFTM1BxUzNQcVMzUHFTM1AysBByMHIwcVDwUVHwUzPwMzNzM3MzczFzMXMxczHwEzPwM1LwQjNSMnIycXDwYVHwozHwYVHwIzHw0zPwQ1LwE1JyMvBiMvATUjLwsjLwEjLwcjNSc1LwQjBQ8BIw8EFQ8EFQcjBxUPAyMVBxUHIxUPBBUHIw8BFQ8CFQ8CIw8DFQ8DFQcVDwoVBxUfBD8EMz8ENT8mNS8DAQ8FFRcVBxUHFQcVBxUHFQcVBxUHFQcVBxUHFQ8HFR8EPwUzPwEzPwE1PwEzNzM3NTc1MzU3NTc1NzU3NTc1NzU3NTc1JzUvBAUPBRUXFRcVFzMfBTMfARUXFRcVFxUzFxUXFR8EPwQ1Lw01JzUnNSc1LwMBDxcfBD8EMz8DMzczNzM3MzczNzU3Mzc1NzM/AjM3MzU/AzUvBAUPBRUfAxUfATMfAjMfAhUfATMfARUfATMXMxczFzMfAjMXMxcVMx8HMxcVFzMVMxczPwQ1LwQjJyMnIycjLwojLwQjLwUjAV0BLv7q/v4aysrKysrKymEHDQYNDQcnDQ4EAwMEAQIDAwkEBQYMBhcGCwYGBgYpBgYGBgYFHwQFDAMDAgIGAwonBgcGDQfpBQQEAwMBAgICBgICAwYFBAMIAQ4CCAIGAgQBAgIBAgMCAwUEAwQDCgUGAwkECQQEAwQCBAYBBAMCAwIDAgECCAEFAwQCBAICBQIHAgIBAgkBAgIDBwMCAwIBAgMCBgIKBf3zBQcBAgMCAwIDAgMCAwQBAgIDAgQBBAQBAgICAgICAQICAgQCAgQBAQECAwICCgECAgIBBAECAQIBAgECAgEEBAMOBAgEAwEBAgMBAgICAQIBAgECAQICAwIBAggCAQICAgEEAgQBBgIKAgYDCgMGAwUDAgEEBggFArIEBQMGAgEBAQEBAQEBAgEDBQMFAwQDAgYDAQIDBgQJCQQEAwIBAQMCAQIDAwIBBQEMAwECAQEBAQEBAQEEAwQECPymBAUDBAQBAQMCAQMCAQQBCgEEAwIDAgECAwECBAcJCQQEAwQCBAIDAgcEAQYBAgECCAEBAQEFCAgCsQQECQQFCgQPBQULDwYFCwUhBgsQCAQFAgIEAwQNCQYGFAUBEgYHBQEFAQUBBQEcAQsFAQUFAQULDwEEAQMDAgEEAwQECP3eBAQEAwICAQIDBA0CAQIDAgECAwMLAgEIAwMFAQIBAgECAQIDAwECAQIBAgQDBgMNAx0CAw0EAw0JBQgFAgEEAwQEAwQIAxQCEQMJBRECBgUDBQUFAgEPAgUCAgEEAwQRBAQFAhwM/pABfBj+tAEnGRlKGBhVGBhNGBgCLQECBgECBAIDBAgJBQQEAwQBAgICBAIBAQEBAQUBBgQDCQUICAIEBgEBAU8BAQMDBAQEBQkEBgECAQYDBAIIDgMIAwYDBAECAgMEAwQDBwcDCAMSCggCBAICAwMICgcHAQwIBAQEBAQEBAsBBwMGAgYCAwUDBwMCAwkDAgIHAgICAgEBAQICBAIFDAEEAgICAgIBAgICAgIBBAIBAgIDBAEEAQQBAgMCAwIBAgMCAQIGAgECBgMDAgUCAQIPAwIBAgECAwYDAwMDAwMDAwEECQUIAwMDAQQDAwQGBQMCBQECAwIDAgMCAwMCBQIDAgwCAwIDAgMEAwQDBgMKAwYCCgEGAgUEBAQJCQYEAf7GAQICCAQEBAQzAwkDBgIGAwMDAwMDBgIDAwkCDgMIAQ0FCwUGCgcEBQkEBgICAgIDAwMDBgYGBQEFBw8mAwoDAwcDAwQDAwQDAwQDBwMOAywFCQgEAgMCEwECAwMIBBsGBxMHDRMGBw0GHw0FAQUBBQEFAQUBBQEBBAQEAgICAwMJCQgGBgUGEAsGEQUGBgUvBgUGBgwGBwUHBgL+sgECBgQEBgQJBAMFCQIDBAMMAQQDBAMHCQkIAwMDAgIBBgIGAwIDAgMDDwYBAwMBAwQHDAQBAwQEBAkIBAMCAgIBAwIEBAkEBQQEAwEKAgICAgICAQEHAgUBAQEDAgIBAgECAQEBAQECAgIEAgkBAQQBBAEEBwUECQgEAgMBAwcGAwMGAgIDAQMCAwIJAgMCAQQBBA0BAgAAAAMAAP/SAyMC6gAFAAwAEQAAASIjESERJxQVMxEhEQUWHwEjAnLW1wJe5bj9/AF5FSo+fQLq/OgCYoldXf38Ar4MFStBAAAAAAgAAP/TA9QC6QATACcATgByAHYAegB+AIIAABMiDgEVERQeATMhMj4BNRE0LgEjBSEyHgEVERQOASMhIi4BNRE0PgEXByMOARQXFhcxFhcWFxYHBg8BITc2NzYnJicmLwEmJyY1NDc2PwEHMwYHBhUUFxYfARYXFhcWBwYHIzY3NicmJyYvASYnJjU0NzYXFTM1BxUzNQcVMzUHFTM11zVZNTVZNQI6NVo0NFo1/cYCOiU+JCQ+Jf3GJT4kJD5/AwEwLA8IFxUJDQECDRMlKQEBAy4QFAMCDQgUCBMIDBARLyn5nhYLFw4JFgIUCQ0BAg0OJ54TBxMCAg4IFQYTCQsQFAR7gIBGfGqAAuk0WTX+bjVZNDRZNQGSNVk0PCQ9Jf5uJT0kJD0lAZIlPSRcAhw2LxYNGBULEQwPDxYVGQIcFhkYEhMLFQgUDBENEBMVHRgaEQ4aGRYWDRcCFAwRDA8PExcQChcaExMLFQcTDRENEBMXFAwMQAwMQQwMQQwMAAQAAP/TA9QC6QATACcAKgAvAAATIg4BFREUHgEzITI+ATURNC4BIwUhMh4BFREUDgEjISIuATURND4BBxc3BREhEQfXNVk1NVk1Ajo1WjQ0WjX9xgI6JT4kJD4l/cYlPiQkPgX6+v4NAfT7Auk0WTX+bjVZNDRZNQGSNVk0PCQ9Jf5uJT0kJD0lAZIlPSRfjY00/ukBF4wABQAAAAADSAKpABsAMgBKAGIAegAAASIHBgcGDwERFhcWFxYgNzY3NjcRNCcmJyYnJgcyFxYXFhcGBwYHBiInJicmJzY3Njc2BzIfARYXFjI3Nj8BFQYHBgcGIicmJyYnFTIfARYXFjI3Nj8BFQYHBgcGIicmJyYnFTIfARYXFiA3Nj8BFQYHBgcGIicmJyYnAfR9XjAfIgcBBiQgL1cBCFcvICMHAQciHzBefXtZKxoRBgYRGSxc8FwsGREGBhEaK1m2AQMDGzRe+l40GwcEFBksXPBcLBkUBAEDAxs0XvpeNBsHBBQZLFzwXCwZFAQBAwMbNFcBCFc0GwcEFBksVf5VLBkUBAKpFAsQERoE/iUaFBEJFBQJERMbAdsDARoREAsUIxQJDQkKCgkOCRMTCQ4JCgoJDQkUawICDgwUFAwOBCkLCg4JExMJDgsKMAICDgwUFAwOBCkLCg4JExMJDgsKMAICDgwUFAwOBPMLCg4JExMJDgsKAAkAAP+fA70DIAAKABgAJgA0AEoAWgBoAHoAjgAAAQYCBzY3NjcXJi8BFh8BJwYHBgcGNzY3NhMGBw4BFjc2FxY2JicmFyYGFhcWFxY+AScmJyYFBgcGDwEGBwYHBhY2NzY3PgE3NjQmASYGFxYGBwYeATc+AScuAQUmBhcWFxY+AScmJy4BAQYHBgcGBwYHDgEWNzY3Ni4BBSIGFhcWHwEWMzI2JicmLwEmJyYB9BhNFxcqJxR9GTEyDBYiRAgZEgYKAQsUFhBQLwsBEgxhYw0OBgwrxQwPBAtCOAkYDQY4UwT98AoLBgsLLykJAgMZGQQlLQQWBAgNAq0PDQMDGBkEDxkHHxoHAg38pA8OAwUvBxkPBC0CAQ0CrgkJBgoNCDZWDAESDG5VBwIN/dkLDQMKQ2AGEggPDREOYTsDBgQGAiZC/vNBFzArFYdOnlEkSW5KBx0UBwsGIUNMAXICDwYZEgQYFAEUGAQLTwETGAUvZgoFFQtrOwMLAQgECwsuSw8LDxEPD0QvBREFCBMO/sgBGw8yZC0MEwEKNn0+BwkSARoPaFwKARMMW2cIC/6zAQYDCQoEJBcGGBIDGUgHEw4BEhcFORoCBRkYARgxAwUCBAAAAAYAAP+VA74DJAAbADEASQBgAGUAawAAASYHBgcGBwYWFxYXHgE3PgI3NicuAScmJyMmBzYXFhcWFxYGBw4BJicuAjc2Nz4BFyYHBgcGBwYXFhcWFxY2Nz4CJyYnLgEHNhcWFxYHFgYHBgcGJicmJyY2NzY3NgcWFzY3BRQVIREHAfNsZWFBQgsMNzw9U0+3VliETwYGHhx3T1BXAxUQY11ZOjwICT0+QKa0TVBkIBUXOTiiX1tVUTI1AQQkJEFEUk2eP0FFBB4gPDB8QlBKRyssAQFIPkBLR4wzNhQVFCcnPUpSVlU4cv6FAZrJAyICNjVaXWxctklKKCgLHB13pFlbU1OGKCkFAjEDMTBTVmNYrEBDOxArLI+zVVlCRE4rAzAvT1JbU1BONjgQECUwMoyiSUwyKzAwAiwqRkpQS4ssLwcJMTM1RUKQOz0iK5tFRS5cIIyMARKjAAAAABAAAP+gA7sDIgAHAA8AHQAsAD4ATwBgAG4AewCKAJgApQCzAMUA0wDmAAABJicHFyE2NycGByMnNjcWAwYHDgEWNzYXFjYmJyYXJgYWFxYXFj4BJy4BJyYFBgcGBwYHBgcGFjI3Njc2LgEzIgciBw4BHgE3NhcWNjQnJgcGBwYPAQYHBh4BNzY3NjQmBSYGFhcWFxYyNicmJyYFJgcGFx4BNicmNzYmBSYGFxYHBh4BNz4BJy4BBSYGFxYXFj4BJyY3LgEFJgcGBwYeATc2Ny4BBSIGFhcWFxY2JicmJyYFDgEHBgcGDwEOARY3Njc+ASYFIgYWFxYXFjYmJyYnJgUGBwYHBgcGBw4BFjc+ATc2LgECy0eQ11IBChcrDBgw5kg/fHx8Si8MARMMXmYMDgUMMcoMDwMLTC0HGQ8EGEkuBP31CwoGCwgFQSEEERgHKVEGAQ3/BAoSBw0JCRQJTkcMEgtC6g0OCRAKPRkFERkGKVAIDgF/DA4CCjQZBxkQBBpEBP3DGQULGwYYEgIaEAEOAukPDQMBMAQQGAcdGwQCDvykDw4DAjEHGQ8FLwIBDQLsGgINMgYPGQg9DAEN/agLDAIIP1QMEQELTzcGAZ8MKwsTGQ8eEQwFDwxhUAgBDf49Cw0DCllpDA4FDGRPBgIYCQkFCg4INFkLAhENNmUpBwINAaI0aJz9RIgoSpLcLVpaAVwCEAYZEQQZFgETGQQMUwETGAU4WwoBEwwyWCACCgEHBQsIBD5QDBILXUAHEw4BAgQVEQgDBh8EERkGHycCCAUMBzAwDBMBC0AuBxMPOwESFwY1VAsTDF1BA6kCK1ZNCwMRDFBUCg4tARoOZV4MEgEKNnk+CAoQARoOa1oKAhMMW2YICzgCKT9DDBQDC09bCQ6gERYGSR0DEhgGHkIGTQMVAwcEAwMCBBgUAQIwBxUPJxMWBUgTARQYBBVCAwMBBQMJCwMjFgYZEgMLMSMHEw4AEAAA/6ADuwMiAAMACAAWACUANwBIAFkAZwB0AIMAkQCeAKwAvgDMAN8AAAEGByEDFhchNhMGBw4BFjc2FxY2JicmFyYGFhcWFxY+AScuAScmBQYHBgcGBwYHBhYyNzY3Ni4BMyIHIgcOAR4BNzYXFjY0JyYHBgcGDwEGBwYeATc2NzY0JgUmBhYXFhcWMjYnJicmBSYHBhceATYnJjc2JgUmBhcWBwYeATc+AScuAQUmBhcWFxY+AScmNy4BBSYHBgcGHgE3NjcuAQUiBhYXFhcWNiYnJicmBQ4BBwYHBg8BDgEWNzY3PgEmBSIGFhcWFxY2JicmJyYFBgcGBwYHBgcOARY3PgE3Ni4BAfRgYAGAwGQz/tIzZEovDAETDF5mDA4FDDHKDA8DC0wtBxkPBBhJLgT99QsKBgsIBUEhBBEYBylRBgEN/wQKEgcNCQkUCU5HDBILQuoNDgkQCj0ZBREZBilQCA4BfwwOAgo0GQcZEAQaRAT9wxkFCxsGGBICGhABDgLpDw0DATAEEBgHHRsEAg78pA8OAwIxBxkPBS8CAQ0C7BoCDTIGDxkIPQwBDf2oCwwCCD9UDBEBC083BgGfDCsLExkPHhEMBQ8MYVAIAQ3+PQsNAwpZaQwOBQxkTwYCGAkJBQoOCDRZCwIRDTZlKQcCDQIyrK0BJrRaWgHXAhAGGREEGRYBExkEDFMBExgFOFsKARMMMlggAgoBBwULCAQ+UAwSC11ABxMOAQIEFREIAwYfBBEZBh8nAggFDAcwMAwTAQtALgcTDzsBEhcGNVQLEwxdQQOpAitWTQsDEQxQVAoOLQEaDmVeDBIBCjZ5PggKEAEaDmtaCgITDFtmCAs4Aik/QwwUAwtPWwkOoBEWBkkdAxIYBh5CBk0DFQMHBAMDAgQYFAECMAcVDycTFgVIEwEUGAQVQgMDAQUDCQsDIxYGGRIDCzEjBxMOAAAAAAUAAP+VA74DJAAbADEASQBgAGkAAAEmBwYHBgcGFhcWFx4BNz4CNzYnLgEnJicjJgc2FxYXFhcWBgcOASYnLgI3Njc+ARcmBwYHBgcGFxYXFhcWNjc+AicmJy4BBzYXFhcWBxYGBwYHBiYnJicmNjc2NzYXBgcXITY/ASYB82xlYUFCCww3PD1TT7dWWIRPBgYeHHdPUFcDFRBjXVk6PAgJPT5AprRNUGQgFRc5OKJfW1VRMjUBBCQkQURSTZ4/QUUEHiA8MHxCUEpHKywBAUg+QEtHjDM2FBUUJyc9SlWQR1IBChcrEEcDIgI2NVpdbFy2SUooKAscHXekWVtTU4YoKQUCMQMxMFNWY1isQEM7ECssj7NVWUJETisDMC9PUltTUE42OBAQJTAyjKJJTDIrMDACLCpGSlBLiywvBwkxMzVFQpA7PSIrV2g0/USIMTQAAAAKAAD/nwO9AyAABAAOABQAIgAwAEYAVgBkAHYAigAAARQVIREFMjMGBwYHBgcmNxQVITUXEwYHDgEWNzYXFjYmJyYXJgYWFxYXFj4BJyYnJgUGBwYPAQYHBgcGFjY3Njc+ATc2NCYBJgYXFgYHBh4BNz4BJy4BBSYGFxYXFj4BJyYnLgEBBgcGBwYHBgcOARY3Njc2LgEFIgYWFxYfARYzMjYmJyYvASYnJgEnAZr+wXJyDyAYDRUQQOP+yJwEUC8LARIMYWMNDgYMK8UMDwQLQjgJGA0GOFME/fAKCwYLCy8pCQIDGRkEJS0EFgQIDQKtDw0DAxgZBA8ZBx8aBwIN/KQPDgMFLwcZDwQtAgENAq4JCQYKDQg2VgwBEgxuVQcCDf3ZCw0DCkNgBhIIDw0RDmE7AwYEBgH6nJwBODEJHBYJDwI0BV1dun0B8AIPBhkSBBgUARQYBAtPARMYBS9mCgUVC2s7AwsBCAQLCy5LDwsPEQ8PRC8FEQUIEw7+yAEbDzJkLQwTAQo2fT4HCRIBGg9oXAoBEwxbZwgL/rMBBgMJCgQkFwYYEgMZSAcTDgESFwU5GgIFGRgBGDEDBQIEAAAAAAEAAAAAA1MCEwAuAAATNjc2NzYXFhcWFxYXFhcWNzY/ATY3NjcVBgcGBwYnJicmJyYnLgEGBwYHBgcGB5YaGyMtIi0mJhgbECA7IR0kIRgVHw0XCxwaJCsmKygjHDIhEh02PBUbGQ8bEAgBSj4nNBsUBwYYDxUOGzQVEQoJGxgiEh4dpTciLRQQCAcZEy4fDhgbBxQYJBcuHA4AAAcAAP/TA9QC6QATACcATQB1AK0AtgC/AAATIg4BFREUHgEzITI+ATURNC4BIwUhMh4BFREUDgEjISIuATURND4BFxQVBgcnBxcGByMVMxYXNSM1Mzc2PwEnNxc3Nj8BNTMVMy4BJzUHFQYHJwcXBgcjFTMWFwcXNxYXFTM1NjcXNyc2PwE1ByYnNycHJic1BzMVFxYfATcXBxcWHwE3FSMHBg8BFwcnBwYPARUjNScmLwEHJzcnJi8BIzUzNzY/ASc3Fzc2PwEXIgYUFjI2NCYHMhYUBiImNDbXNVk1NVk1Ajo1WjQ0WjX9xgI6JT4kJD4l/cYlPiQkPkkNDhkuGAgDIyQDDh8fAgMLBRUPFggPFQgXOwQaBwQODhgvGQgDJCQFBxovGgwPQg0PGS8aCAQiIwMIGC8YChIsFgkUEAgVEBUFCwQCHh4CAwwFFxAWCBAUCRYJExEIFhAXBgoFAh8fAgUKBRYQFgcREwkLFB0dKR0dFQwQEBcQEALpNFk1/m41WTQ0WTUBkjVZNDwkPSX+biU9JCQ9JQGSJT0kMhESBAgZLxgSCkINFjkWCRISCBUQFgULBQEfHgQLAiNAIgQIGS8ZDQ5CDwwZLxoHBSQlAwgZLxkODQFCAQoSGC4YBgUiFR8BBAsFFQ8WBxAUCQEXCRQQBxYQFgUKBQIgIAIDDAQWEBYIEBMJFgkUEAgVEBYFDAMCMh0oHh4oHRYQFxAQFxAAAgAA/9MD1ALpABMAJwAAEyIOARURFB4BMyEyPgE1ETQuASMFITIeARURFA4BIyEiLgE1ETQ+Adc1WTU1WTUCOjVaNDRaNf3GAjolPiQkPiX9xiU+JCQ+Auk0WTX+bjVZNDRZNQGSNVk0PCQ9Jf5uJT0kJD0lAZIlPSQAAAMAAAAAA14CTwAiACYALAAAAQYHDgEPAQYHBhYXBRY+ASc1FhcWPgEnETQmIgcFPAEnLgEHFBUnJRQVJic2AfYJCgUWBUaMRg0GDwE1ChcOAoOYChYOAhMYCP7sAQISJ+UCLGp7ewJOAQYDEAMvXi8KIwfPBgYUC59aZAYGFAsBogwPCLodcRwLDleampqamppJUVEAAAAACQAA/58DvQMgAAcADwAdACsAQQBRAF8AcQCFAAABJicHFyE2NycGByMnNjcWAwYHDgEWNzYXFjYmJyYXJgYWFxYXFj4BJyYnJgUGBwYPAQYHBgcGFjY3Njc+ATc2NCYBJgYXFgYHBh4BNz4BJy4BBSYGFxYXFj4BJyYnLgEBBgcGBwYHBgcOARY3Njc2LgEFIgYWFxYfARYzMjYmJyYvASYnJgLLR5DXUgEKFysMGDDmSD98fHhQLwsBEgxhYw0OBgwrxQwPBAtCOAkYDQY4UwT98AoLBgsLLykJAgMZGQQlLQQWBAgNAq0PDQMDGBkEDxkHHxoHAg38pA8OAwUvBxkPBC0CAQ0CrgkJBgoNCDZWDAESDG5VBwIN/dkLDQMKQ2AGEggPDREOYTsDBgQGAaI0aJz9RIgoSpLcLVpaAVoCDwYZEgQYFAEUGAQLTwETGAUvZgoFFQtrOwMLAQgECwsuSw8LDxEPD0QvBREFCBMO/sgBGw8yZC0MEwEKNn0+BwkSARoPaFwKARMMW2cIC/6zAQYDCQoEJBcGGBIDGUgHEw4BEhcFORoCBRkYARgxAwUCBAAAAAAFAAD/lQO+AyQAGwAxAEkAYABkAAABJgcGBwYHBhYXFhceATc+Ajc2Jy4BJyYnIyYHNhcWFxYXFgYHDgEmJy4CNzY3PgEXJgcGBwYHBhcWFxYXFjY3PgInJicuAQc2FxYXFgcWBgcGBwYmJyYnJjY3Njc2FwYHIQHzbGVhQUILDDc8PVNPt1ZYhE8GBh4cd09QVwMVEGNdWTo8CAk9PkCmtE1QZCAVFzk4ol9bVVEyNQEEJCRBRFJNnj9BRQQeIDwwfEJQSkcrLAEBSD5AS0eMMzYUFRQnJz1KVWBgAYADIgI2NVpdbFy2SUooKAscHXekWVtTU4YoKQUCMQMxMFNWY1isQEM7ECssj7NVWUJETisDMC9PUltTUE42OBAQJTAyjKJJTDIrMDACLCpGSlBLiywvBwkxMzVFQpA7PSIrY6ytAAAUAAD/owO4AyIABAAIAAwAEAAUABgAWwCzAQkBTAGhAf4CSQKLAs8DEgNpA7YEAgRMAAABFREhEQUzESMTFTM1BxUzNQcVMzUHFTM1AzEjByMHIxUjByMPBxUfBDM3MzczNzM3MzczFzMXMxczFzMXMz8FNS8FIycjNSMnIycXIw8FHxk/BDUvAyMnNSc1JyMvASMvATUnIyc1LwEjLwE1JzUnIzUnIycjLwE1LwEjJzUnIy8BBSMPAhUHIw8BFQ8CFQcVBxUPASMPARUPAhUPASMPASMPARUHFQ8BIw8CFR8FMz8ZNS8EITEjFSMPAxUfBDM3MzczFzMXMxczFzMXMx8GMz8FNS8CIy8JIycjJyMnIzUHIw8CIw8BFQcjDwEjBxUHIwcjByMHFQ8DIxUPARUPAiMPAR8FMz8dMz8DLwMFDwUfFhUfBDM/BDUnNS8INSc1LwQjJyMnNS8BIyc1JzUvATUjLwE1JyMnNS8CNS8DBSMPBRUjFQcVBxUjFQcVFxUzFRcVFxUXFR8JMz8ENS8CNSc1JzUnNSc1JzU3NTc1NzU3NTc1LwQFIw8DFQcXFQcVBxUHFQcVDwgVHwMzPwY1NzU/BzU3NTM1NzU3NSc1LwMFIw8DFRcVFxUXFRcVHwcVFxUfAjMVHwMzPwQ1Lws1JzUnNSc1JzUvBAUjDwUVBxUPDxUfBT8CNT8BNTczNzU/AjM/CjU3LwQFDwUfAhUXFRczFzMfAjMfATMVFxUXFRczHwEzFzMXFRcVHwEVHwIVHwIzPwU1LxwFIw8IIwcjByMHIwcjByMPBBUfBTM3MzczNzM3Mz8LMzczPwE1PwE1NzU/BDUvBAUPBRUfBTMfARUXMxczHwEVHwEzFxUfBDMXMx8GMz8FNS8WISMPFxUfBjM/CDM/BDU3MzczNzU/ATU/ATM/BDUvBAFdAS7+6v7+GsrKysrKysplCwYLBQwFBQYmBgoIBAIDAQECBgQJBCsFCQUFBQUKBR4FCgUFBQUKBBgJBQQDBAQBAQQDBAcmBQYFCwYLBvQFBAUDBAQCAggCDAcIBwQDBAMEAwcGBw8CCQIDEQQDBAkJBAQDBAECAwIBAgMCAQISAQkEBgEDBAMBAwgEAwEDAQMBCAQEBAEECAEECv3xBQQIBQQBBAQEDAQEBAgDAQMEAwQDBAkBDwIBAgMDBQIBBAMDAQIDAwgECQUHBQUQBgIGAg8HBgcDBAMEAwQHCAQEBwIBAgIDBAgBBBINCgUHBgICAwgIBAEIBCYECAMEBAQHBAgDGgMIBwcDCQUEBAQDBAEEAwcBAwUEBAQEBAkEJgQJBQQEBQ2tBAgGBwEDCAMBFQMBAwMBCQEMAQkJAwMCAQIDAwgEAQQCAgIDAwgEBQQJAwgDAgQDAgMCAwIDAgMDAwIDAwMDAwMDAwYDIwIDBAQCAgUECAGEBQgEAwMDAQYDAwIDAgMCAwIDBxYBBAEEAQYDAgIEBAMEBQkEBAQDBAECAgIBAgECAQICAgEBAQgBAQECAgQBAgcDAgECAwIBAgYDCQMDAwT9wwUECAMDAgIBAgEBAQEBAQIBCAIBAQEDAwQEBAUJBAMDBAECBQMCAQEBAQEBAgEBAgMDCQLuBQQIBgIBAQEBAQIIAgECAgQBFgEBBAMMBQkEBgUEAwoCCAECAQICAgcBAQEBAQQDBAj8pwUICAQCAQEBAgYCAgIBBAEGAgoDBAEDBgQFCQQEBAMEAgESAQIBAgECAgIHAgEBAQECBwMFAvAEBQQEAwQCAgcCAwUCBAECAwwKAwQCBAEBBAMEBAkIBQcDDwIBBgUIAQEBBgECAQIBAgICCQECAgMECP2tBAgEAwICAgUGDAYBDAEGBwMBAwMBBwcDAQcHAQMBAwQIBAQMBAQEBAkEBAQFAgEBBAQDFQMECgcZAwoCAwMDAwMDAwIGAwIDAgMCCAGcBQQEAQcKHAsHEgQLBAcEBAcECAQQCAQDAgIBBAQDBAUMBQ0EBQQFCAUmBAkEBAQEBAQBBAMBAwEDBAQIBAkEAgIBAgYDBAX+RAQFBAYCAgECAwMFBAEEDQkBDQEEBQUEAQQFBQoFGQEEARQGBQUFCwoJBQQEAwQBAgMDBAcTBQQFBQQFBQQlHggEBAkMAw0CEgUEBQMBFAQECQgWLAUFBAUFBQQFGwQGBAEBAgMDBAQECQMGBQsFBQUGFAEeBQoFBQQBBAEEBRwNBAEEBQMCAQICAwQIAhwM/pABfBj+tAEnGRlKGBhVGBhNGBgCLwEBAQEHAgIEAwQEBAkEBQYDAgkCAQEBAQEBAgUBAgMDCAQFBAkDAwMHAQEBAVMBAgIEBwkJCgEJBwYHAwQDBAMEBwgHFAQNBAQgAwMCAgICAwMICQUGBQUEAQQBBAUcDQQBCAQBBAQECAEDAQMBAwQIAwEDBAMBBgQHCAEEBAEDBAMBAwwDAQMBAwEIBAQEAQQEBAEEDRcFBQQBBAEJBQoFDAQFBAQDBAECBQcMHggECQQUBwgHBAMEAwQDBwYEAwcFBAQJBAQDBAECAgUMBQkEAwYCAQEBAQECAgcCAgMCAgIBAgMDCAUJCAMFAgECAQIBAgICCQIBAQEnAgMFAgQBAg8DAgECCQwJAQkEAwMBAwMBAwsHBwkJBAMEBAEBBAMMAwQGAwMCAwMDAwMDAgMDAgMCAwIDAgMEAxYDAwgJCQcDBDsBAgMDBA0FCwIDAwMDAwMCAwMKIwMHAwcEDgsDBwMIAwMCAQEDAgQICQQCBAkEBAQEBAUDAQMBAwQBAxAEAwEDCAMBCgEDAwEDAwEDAwEGBAkBAwIDA6kBBAQDBAgEBAkFBAkNBBsFDQkEBAkEAQQiBAUBBAQDAwIBAgIDBAgJBQQSBAsEBwQEBwQIBB4ECAQHBAQHBAQJBAQEAwQtAQQIBAQEBB4FCgUFBQUJBScFBAUJCgQyBAUECAQGAgIGCAoFGQEEARQGBQUFCwYmBQYFCwYLBhYGCQgDAwQQAgYICAkGEQUGBQYLBSEGCwUFCgYPAQQBGQUKAQQGAgEBAwIECAkIASkEBQUEBQUJBSIFCQUFBQUKBRcFBAcCAjkBAgMDCAcEBwQaAwsLBwYEAwcUDwMHAQgFBAUIAwMCAgICBwEDFQEDCwEHEAQEDAQEBAQEBAkEJgUFCAQEAwSgAQQDAwQJCQkGAQwBBgwGBQMDAgEEAQQBAgUEAgIBAQEEAQEBBgEBAQIBAQIDBwUEBQQIAwMJAgEGAxADBgMCAwIDAgMCAwYCAwMDAwMHSgECAQMGDAMDBQMCAQEBBAMDBAkFBAgDAwIBAQEBAgkCAgIBAgECAQEBAgICAQEBBAEBAQUEAwUEBQgIAwIBJwEBAwYECQUEBAQCBQMECQEGCQMCAQIDAgECAwQDCgIIAQIBAgIDAQIDAwgFBAkEAwMDBAIBAgECAQIBEBAGAgMFCQMKAQICAg8CAwUGDBQBAgECAQIBAgYCBgkEBQQEBAMDAgEBAQICAgECAQgMAwQDAgECAwIBAhIBCQQDBQQEBAUJBAMDBAAAAAADAAAAAAO5Ao4AAwAHAAsAABMRIREHESERIzMRIy8DijH9YoxeXgKO/Y8CcTD96wIV/esAIAAA/+4DrALPAAQACQAOABMAGAAhAC0ANgBBAE4AVQBaAF8AZABpAG4AcwB4AH0AiACOAJcAoQCmAKsAsAC1ALoAvwDEAMkAzgAAATIzNSMXMjM1IxcyMzUjFzIzNSMXMjM1IxcyMzYXNyYrASEiBxc2MjYnJjY1JgUWFzY3NjcmJwUGBxYXFhc2NycmBQ4BFxYGFjIzMjc0JwUGFTMmNycFMjM1IwUyMzUjBTIzNSMFMjM1IwUyMzUjBTIzNSMFMjM1IwUyMzUjBQYHFhcWFzY3JyYFFhc3JicFBgcWHwE2NycFFhc3NjcmJwcGFzIzNSMXMjM1IxcyMzUjFzIzNSMXMjM1IxcyMzUjBzQ1IRETMjMRITcUFTM1AQUZGDFiGRgxYRkYMWIZGDFiGRgxYQQHGAsGCxUU/e0NDAkDDgYDAQIBAmISDQUKEQUUGP0zGBMFCxAHEA4KCgLxCwMEAgECCg0SBwr8owcxAQYuAzUZGDH8wxkYMQM9GRgx/MMZGDEDPRkYMfzDGRgxAz0ZGDH8wxkYMQM7BQkGCxEIDwUQFvy/BhEoCwQC3BERBQgDGxce/TAbGQUFAhMQBw5jGRgxYRkYMWIZGDFiGBgwXhkYMWUZGDE1/q4fior+7CXLAp0xMTExMTExMTExAQIwAgMwAQQIBBUEBz0JEAQJDAcXDQMPFgQJDQQSBxASVgEKCwIPBgEeGggYHRMVD5UxNTGOMTYxjjE1MY8xNTFZFg8DBwsDGRsDBQ0cGRsSE0EMBQwZCQcTJyoSBxIUCQYMCRUpMTExMTExMTExMTEirKv+qQE4/uunFxgvAAALAAD/zgO5AvIABQAJAA0AEQAVABkAHwAjACcAKwAvAAAXNTMVMxUzNTMVMzUzFTM1MxUzNTMVMzUzFTM1MzUzFSU1MxUhNTMVJREhEScRIREuMRAxYTFiMWExYjFhMA0x/HUxAykx/HYDijH81jJZKDExMTExMTExMTExMShZilxcXFyLAg/98TABs/5NAAAEAAD/nAPDAyAAAwAHAA4AFQAAAREzETMRMxEBBxc1MzUjJRUHFTMVNwFuJsMm/lCkpF1dAlNeXqMDIPx8A4T8fAOE/uGjo29pbmwBam+jAAYAAP+eA5QDHgAGAAkADQARABUAGQAAAQUXARcBFyUFFycHFzcPARc3DwEXNw8BFzcDlP5mQP4aGQHmPgED/mWXlT8ZP5c+GT6ePxk/lyYZJgMebV/+uSYBSFwFbeBYKyUqLyomKzUrJSswGiUaAAACAAAAAAO5AmYAAwAHAAATESERAREhES8DivylAyoCZv3wAhD+HQGz/k0AAAkAAP+nA7IDHgADAAcACwARABUAGQAfACUAKQAAARUzNQUVMzUzFTM1FxUzFTM1BRUzNQUVMzUHFSMVMzUFFTM1IzUXFTM1AS9n/qHaoduCeyj9fWcB9Cgod5/9np934FIDHtra9mdnZ2ceKHWdaNran01NvnQonAGdKHV1KCgACwAA/84DuQLyAAUACQANABEAFQAZAB8AIwAnACsALwAAExUzNTM1MxUzNTMVMzUzFTM1MxUzNTMVMzUzFTMVMzUFFTM1IRUzNQURIREHESERLjEQMWExYjFhMWIxYTANMfx1MQMpMfx2A4ox/NYC8lkpMDAwMDAwMDAwMDAwKVmJXFxcXIv98AIQMP5NAbMADAAA//oDuQLCAAQAGAAcACAAJAAoACwAMAA0ADgAPABAAAATFREhEQUhFSMVMxUjFTMVITUzNSM1MzUjMxUzNTMVMzUzFTM1MxUzNTMVMzUFFTM1MxUzNTMVMzUzFTM1MxUzNS8DivylAyoMDAwM/NYRERERQmIxYTFiMWExYv1UYjFhMWIxYTFiAsLY/hACyCysMbYxqakxtjExMTExMTExMTEx5zExMTExMTExMTEAAAAABwAA//oDuQLCAAQAEAAUABgAHAAgACQAABMZASERBSERIxUzESERMzUjMxUzNTMVMzUzFTM1MxUzNTMVMzUvA4r8pQMqDAz81hERQmIxYTFiMWExYgLC/rT+hALILP7gMP7jAR0wMDAwMDAwMDAwMAAAAAAFAAD/0gMjAuoABQALAA4AFgAdAAABIiMRIREnFTMRIREFFyMnHQEjFTMVNycXBzUjNTMCctbXAl7luP38AXl9feNqao15XFxqagLq/OgCYom6/fwCvgyBbBhFUFyEVlZWQigABAAA/9IDIwLqAAUACwAOABUAAAEiIxEhEScVMxEhEQUXIycVIxUzFTcCctbXAl7luP38AXl9feNqao0C6vzoAmKJuv38Ar4MgWxdUFyEAAACAAD/1gNyAu8AbwDkAAABIgYHBgcGHwEVJi8BMScmJyYnJicmBxUGBwYXFhcWFxYfAScmJyYnJgcGBzkBBhcWFxYXFhcWFxYfASE3Nj8BNj8BNjc2NzYnLgEnJgYHBgcGDwE1NDU2JyYnLgEiBgcGBwYPAi8BJicmJy4BBzMHMjEzMhYXHgEfARYfAT8CNjc2Nz4BOwEyFh8BFhcWBxUfATY3Njc2NzYXOQEeARcWBwYHBg8BBgcGDwEhJicmJyYnJicmJyY+AhcWFxYfATcnJicmJyYnJjc+ATc2FhcWFxYXMRYfAT8BNi8BJjc2Nz4BAfIOGAcLAwMBAQYIAQkMBwsLERMXHRkHAwcFEAwFCA0GDRAJJyQWExcQHQUCGQ4kLRccOScQBQFMAwQKDBQbCxgKEAcKBgQYEQ4cChIPBgkGAQIECAYVGRYHDQcGBwYJBgMFBwcMBxcNAQIBAQUFBAcNBwIGCAghGgYHBQcHBAUFAgQCAgEGAgIBASAKEhAIDg0KDAkIAgQJBg0IFBMYGQUJCP7fDiE6HxguIwwTAgEGERYPHyIcHRcdDRAOBg0PBAYDAQUGDRUMCwwIDwoUESABAgEBAgMDBwQGAu4ODBQhHD8oQw0XAxcgDxkQGQkLCwELHhMjFjEmExsyFwwPCCIOCAECDhseGCARJS4cIVg7FQcMDS43XkccOxwtHywaDxcDAwsLESMKGBBLESU2FyIRCw8LCREbFjEkLzMgQh4jEAwOASEEBgw5Rxk4OCwBlSMxFBcJBQIBAwMLHBlAJ6AHFS8qEh4NCgEBBwkTIxgmFjMzPG4XJyUSNFklHS4lDxgOCAwQAQUNHhcgGw82PzIWKS0SGg8HBwMGChIQHhIoGjArBjI7Kh5GHBkOBgQAAAAACAAA/9sDbQLgABQAGAAqAC4AMgBMAF8AYwAAASIGBwYHFBYHFTM1Jjc+ARczNSMmBTM1Ixc2FxYHFTM0NTQnLgInJgcjATM1IwUzNSMFFBYXFhcWNzYXNhcWMzY3NSIjBicuATc1IwUWDgErARUyMxY+Ajc2NTQ1IwUzNSMBAitKCwQCAQEyAQIENiDYSmQBCi8vizscHwQyAQIkOR8JEwn9tDIyAr4yMv1CLSMUGxAhGQwECwkEBQIQHzcbHycBMgK+ATFFRyMUKT09NiIBATL+li4uAt85KxIXDjcORjBQKCItAjEBMjExBB0eQJgbOEklIDkkAQIB/kcxSzHUJ0cRCgICAQEBAQEBAQQtAQMHNSFXWSM4AjEBBSU5IA4dFQvNMQAAAAAEAAD/8AOsAs0AEwAnADcARwAAEyIOARURFB4BMyEyPgE1ETQuASMFITIeARURFA4BIyEiLgE1ETQ+ARciBhURFBYzITI2NRE0JiMFITIWFREUBiMhIiY1ETQ20ilEKChEKQJFKEUoKEUo/bsCRR80Hx80H/27HzUfHzU8Jjc3JgILJjY2Jv31AgsYIiIY/fUZIiICzChEKf5OKEUoKEUoAbIpRCgiHzUf/k4fNR8fNR8Bsh81HzE2Jv6CJjY2JgF+JjYiIhj+ghgiIhgBfhgiAAAAAAAAEgDeAAEAAAAAAAAAFQAAAAEAAAAAAAEABAAVAAEAAAAAAAIABwAZAAEAAAAAAAMABAAgAAEAAAAAAAQABAAkAAEAAAAAAAUACwAoAAEAAAAAAAYABAAzAAEAAAAAAAoAKwA3AAEAAAAAAAsAEwBiAAMAAQQJAAAAKgB1AAMAAQQJAAEACACfAAMAAQQJAAIADgCnAAMAAQQJAAMACAC1AAMAAQQJAAQACAC9AAMAAQQJAAUAFgDFAAMAAQQJAAYACADbAAMAAQQJAAoAVgDjAAMAAQQJAAsAJgE5Y2FtdW5kYSBTZXJ2aWNlcyBHbWJIYnBtblJlZ3VsYXJicG1uYnBtblZlcnNpb24gMS4wYnBtbkdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAGMAYQBtAHUAbgBkAGEAIABTAGUAcgB2AGkAYwBlAHMAIABHAG0AYgBIAGIAcABtAG4AUgBlAGcAdQBsAGEAcgBiAHAAbQBuAGIAcABtAG4AVgBlAHIAcwBpAG8AbgAgADEALgAwAGIAcABtAG4ARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbAECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4BHwEgASEBIgEjASQBJQEmAScBKAEpASoBKwEsAS0BLgEvATABMQEyATMBNAE1ATYBNwE4ATkBOgE7ATwBPQE+AT8BQAFBAUIBQwFEAUUBRgFHAUgBSQFKAUsBTAFNAU4BTwFQAVEBUgFTAVQBVQFWAVcBWAFZAVoBWwFcAV0BXgFfAWABYQFiAWMBZAFlAWYBZwFoAWkBagFrAWwBbQAMc2NyZXctd3JlbmNoBXRyYXNoEGNvbmRpdGlvbmFsLWZsb3cMZGVmYXVsdC1mbG93EGdhdGV3YXktcGFyYWxsZWwfaW50ZXJtZWRpYXRlLWV2ZW50LWNhdGNoLWNhbmNlbDFpbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtbm9uLWludGVycnVwdGluZy1tZXNzYWdlGHN0YXJ0LWV2ZW50LWNvbXBlbnNhdGlvbi5zdGFydC1ldmVudC1ub24taW50ZXJydXB0aW5nLXBhcmFsbGVsLW11bHRpcGxlC2xvb3AtbWFya2VyEnBhcmFsbGVsLW1pLW1hcmtlciNzdGFydC1ldmVudC1ub24taW50ZXJydXB0aW5nLXNpZ25hbC9pbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtbm9uLWludGVycnVwdGluZy10aW1lcippbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtcGFyYWxsZWwtbXVsdGlwbGUlaW50ZXJtZWRpYXRlLWV2ZW50LWNhdGNoLWNvbXBlbnNhdGlvbgtnYXRld2F5LXhvcgpjb25uZWN0aW9uEGVuZC1ldmVudC1jYW5jZWwiaW50ZXJtZWRpYXRlLWV2ZW50LWNhdGNoLWNvbmRpdGlvbjtpbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtbm9uLWludGVycnVwdGluZy1wYXJhbGxlbC1tdWx0aXBsZRVzdGFydC1ldmVudC1jb25kaXRpb24ic3RhcnQtZXZlbnQtbm9uLWludGVycnVwdGluZy10aW1lchRzZXF1ZW50aWFsLW1pLW1hcmtlcgl1c2VyLXRhc2sNYnVzaW5lc3MtcnVsZRJzdWItcHJvY2Vzcy1tYXJrZXIdc3RhcnQtZXZlbnQtcGFyYWxsZWwtbXVsdGlwbGURc3RhcnQtZXZlbnQtZXJyb3IfaW50ZXJtZWRpYXRlLWV2ZW50LWNhdGNoLXNpZ25hbB5pbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtZXJyb3IWZW5kLWV2ZW50LWNvbXBlbnNhdGlvbhRzdWJwcm9jZXNzLWNvbGxhcHNlZBNzdWJwcm9jZXNzLWV4cGFuZGVkBHRhc2sPZW5kLWV2ZW50LWVycm9yI2ludGVybWVkaWF0ZS1ldmVudC1jYXRjaC1lc2NhbGF0aW9uHmludGVybWVkaWF0ZS1ldmVudC1jYXRjaC10aW1lchZzdGFydC1ldmVudC1lc2NhbGF0aW9uEnN0YXJ0LWV2ZW50LXNpZ25hbBJidXNpbmVzcy1ydWxlLXRhc2sGbWFudWFsB3JlY2VpdmUNY2FsbC1hY3Rpdml0eRFzdGFydC1ldmVudC10aW1lchNzdGFydC1ldmVudC1tZXNzYWdlF2ludGVybWVkaWF0ZS1ldmVudC1ub25lHWludGVybWVkaWF0ZS1ldmVudC1jYXRjaC1saW5rFGVuZC1ldmVudC1lc2NhbGF0aW9uD3RleHQtYW5ub3RhdGlvbgdicG1uLWlvD2dhdGV3YXktY29tcGxleBJnYXRld2F5LWV2ZW50YmFzZWQMZ2F0ZXdheS1ub25lCmdhdGV3YXktb3ITZW5kLWV2ZW50LXRlcm1pbmF0ZRBlbmQtZXZlbnQtc2lnbmFsDmVuZC1ldmVudC1ub25lEmVuZC1ldmVudC1tdWx0aXBsZRFlbmQtZXZlbnQtbWVzc2FnZQ5lbmQtZXZlbnQtbGluayBpbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtbWVzc2FnZSVpbnRlcm1lZGlhdGUtZXZlbnQtdGhyb3ctY29tcGVuc2F0aW9uFHN0YXJ0LWV2ZW50LW11bHRpcGxlBnNjcmlwdAttYW51YWwtdGFzawRzZW5kB3NlcnZpY2UMcmVjZWl2ZS10YXNrBHVzZXIQc3RhcnQtZXZlbnQtbm9uZSNpbnRlcm1lZGlhdGUtZXZlbnQtdGhyb3ctZXNjYWxhdGlvbiFpbnRlcm1lZGlhdGUtZXZlbnQtY2F0Y2gtbXVsdGlwbGU0aW50ZXJtZWRpYXRlLWV2ZW50LWNhdGNoLW5vbi1pbnRlcnJ1cHRpbmctZXNjYWxhdGlvbh1pbnRlcm1lZGlhdGUtZXZlbnQtdGhyb3ctbGluayZzdGFydC1ldmVudC1ub24taW50ZXJydXB0aW5nLWNvbmRpdGlvbgtkYXRhLW9iamVjdAtzY3JpcHQtdGFzawlzZW5kLXRhc2sKZGF0YS1zdG9yZSdzdGFydC1ldmVudC1ub24taW50ZXJydXB0aW5nLWVzY2FsYXRpb24gaW50ZXJtZWRpYXRlLWV2ZW50LXRocm93LW1lc3NhZ2UyaW50ZXJtZWRpYXRlLWV2ZW50LWNhdGNoLW5vbi1pbnRlcnJ1cHRpbmctbXVsdGlwbGUwaW50ZXJtZWRpYXRlLWV2ZW50LWNhdGNoLW5vbi1pbnRlcnJ1cHRpbmctc2lnbmFsIWludGVybWVkaWF0ZS1ldmVudC10aHJvdy1tdWx0aXBsZSRzdGFydC1ldmVudC1ub24taW50ZXJydXB0aW5nLW1lc3NhZ2UNYWQtaG9jLW1hcmtlcgxzZXJ2aWNlLXRhc2sJdGFzay1ub25lE2NvbXBlbnNhdGlvbi1tYXJrZXIlc3RhcnQtZXZlbnQtbm9uLWludGVycnVwdGluZy1tdWx0aXBsZR9pbnRlcm1lZGlhdGUtZXZlbnQtdGhyb3ctc2lnbmFsM2ludGVybWVkaWF0ZS1ldmVudC1jYXRjaC1ub24taW50ZXJydXB0aW5nLWNvbmRpdGlvbgtwYXJ0aWNpcGFudBlldmVudC1zdWJwcm9jZXNzLWV4cGFuZGVkEWxhbmUtaW5zZXJ0LWJlbG93CnNwYWNlLXRvb2wQY29ubmVjdGlvbi1tdWx0aQRsYW5lCmxhc3NvLXRvb2wRbGFuZS1pbnNlcnQtYWJvdmURbGFuZS1kaXZpZGUtdGhyZWUPbGFuZS1kaXZpZGUtdHdvCmRhdGEtaW5wdXQLZGF0YS1vdXRwdXQJaGFuZC10b29sBWdyb3VwC3RyYW5zYWN0aW9uAAA=") format("truetype")}[class*=" bpmn-icon-"]:before,[class^=bpmn-icon-]:before{font-family:bpmn;font-style:normal;font-weight:400;speak:never;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em}.bpmn-icon-screw-wrench:before{content:"\\e800"}.bpmn-icon-trash:before{content:"\\e801"}.bpmn-icon-conditional-flow:before{content:"\\e802"}.bpmn-icon-default-flow:before{content:"\\e803"}.bpmn-icon-gateway-parallel:before{content:"\\e804"}.bpmn-icon-intermediate-event-catch-cancel:before{content:"\\e805"}.bpmn-icon-intermediate-event-catch-non-interrupting-message:before{content:"\\e806"}.bpmn-icon-start-event-compensation:before{content:"\\e807"}.bpmn-icon-start-event-non-interrupting-parallel-multiple:before{content:"\\e808"}.bpmn-icon-loop-marker:before{content:"\\e809"}.bpmn-icon-parallel-mi-marker:before{content:"\\e80a"}.bpmn-icon-start-event-non-interrupting-signal:before{content:"\\e80b"}.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before{content:"\\e80c"}.bpmn-icon-intermediate-event-catch-parallel-multiple:before{content:"\\e80d"}.bpmn-icon-intermediate-event-catch-compensation:before{content:"\\e80e"}.bpmn-icon-gateway-xor:before{content:"\\e80f"}.bpmn-icon-connection:before{content:"\\e810"}.bpmn-icon-end-event-cancel:before{content:"\\e811"}.bpmn-icon-intermediate-event-catch-condition:before{content:"\\e812"}.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before{content:"\\e813"}.bpmn-icon-start-event-condition:before{content:"\\e814"}.bpmn-icon-start-event-non-interrupting-timer:before{content:"\\e815"}.bpmn-icon-sequential-mi-marker:before{content:"\\e816"}.bpmn-icon-user-task:before{content:"\\e817"}.bpmn-icon-business-rule:before{content:"\\e818"}.bpmn-icon-sub-process-marker:before{content:"\\e819"}.bpmn-icon-start-event-parallel-multiple:before{content:"\\e81a"}.bpmn-icon-start-event-error:before{content:"\\e81b"}.bpmn-icon-intermediate-event-catch-signal:before{content:"\\e81c"}.bpmn-icon-intermediate-event-catch-error:before{content:"\\e81d"}.bpmn-icon-end-event-compensation:before{content:"\\e81e"}.bpmn-icon-subprocess-collapsed:before{content:"\\e81f"}.bpmn-icon-subprocess-expanded:before{content:"\\e820"}.bpmn-icon-task:before{content:"\\e821"}.bpmn-icon-end-event-error:before{content:"\\e822"}.bpmn-icon-intermediate-event-catch-escalation:before{content:"\\e823"}.bpmn-icon-intermediate-event-catch-timer:before{content:"\\e824"}.bpmn-icon-start-event-escalation:before{content:"\\e825"}.bpmn-icon-start-event-signal:before{content:"\\e826"}.bpmn-icon-business-rule-task:before{content:"\\e827"}.bpmn-icon-manual:before{content:"\\e828"}.bpmn-icon-receive:before{content:"\\e829"}.bpmn-icon-call-activity:before{content:"\\e82a"}.bpmn-icon-start-event-timer:before{content:"\\e82b"}.bpmn-icon-start-event-message:before{content:"\\e82c"}.bpmn-icon-intermediate-event-none:before{content:"\\e82d"}.bpmn-icon-intermediate-event-catch-link:before{content:"\\e82e"}.bpmn-icon-end-event-escalation:before{content:"\\e82f"}.bpmn-icon-text-annotation:before{content:"\\e830"}.bpmn-icon-bpmn-io:before{content:"\\e831"}.bpmn-icon-gateway-complex:before{content:"\\e832"}.bpmn-icon-gateway-eventbased:before{content:"\\e833"}.bpmn-icon-gateway-none:before{content:"\\e834"}.bpmn-icon-gateway-or:before{content:"\\e835"}.bpmn-icon-end-event-terminate:before{content:"\\e836"}.bpmn-icon-end-event-signal:before{content:"\\e837"}.bpmn-icon-end-event-none:before{content:"\\e838"}.bpmn-icon-end-event-multiple:before{content:"\\e839"}.bpmn-icon-end-event-message:before{content:"\\e83a"}.bpmn-icon-end-event-link:before{content:"\\e83b"}.bpmn-icon-intermediate-event-catch-message:before{content:"\\e83c"}.bpmn-icon-intermediate-event-throw-compensation:before{content:"\\e83d"}.bpmn-icon-start-event-multiple:before{content:"\\e83e"}.bpmn-icon-script:before{content:"\\e83f"}.bpmn-icon-manual-task:before{content:"\\e840"}.bpmn-icon-send:before{content:"\\e841"}.bpmn-icon-service:before{content:"\\e842"}.bpmn-icon-receive-task:before{content:"\\e843"}.bpmn-icon-user:before{content:"\\e844"}.bpmn-icon-start-event-none:before{content:"\\e845"}.bpmn-icon-intermediate-event-throw-escalation:before{content:"\\e846"}.bpmn-icon-intermediate-event-catch-multiple:before{content:"\\e847"}.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before{content:"\\e848"}.bpmn-icon-intermediate-event-throw-link:before{content:"\\e849"}.bpmn-icon-start-event-non-interrupting-condition:before{content:"\\e84a"}.bpmn-icon-data-object:before{content:"\\e84b"}.bpmn-icon-script-task:before{content:"\\e84c"}.bpmn-icon-send-task:before{content:"\\e84d"}.bpmn-icon-data-store:before{content:"\\e84e"}.bpmn-icon-start-event-non-interrupting-escalation:before{content:"\\e84f"}.bpmn-icon-intermediate-event-throw-message:before{content:"\\e850"}.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before{content:"\\e851"}.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before{content:"\\e852"}.bpmn-icon-intermediate-event-throw-multiple:before{content:"\\e853"}.bpmn-icon-start-event-non-interrupting-message:before{content:"\\e854"}.bpmn-icon-ad-hoc-marker:before{content:"\\e855"}.bpmn-icon-service-task:before{content:"\\e856"}.bpmn-icon-task-none:before{content:"\\e857"}.bpmn-icon-compensation-marker:before{content:"\\e858"}.bpmn-icon-start-event-non-interrupting-multiple:before{content:"\\e859"}.bpmn-icon-intermediate-event-throw-signal:before{content:"\\e85a"}.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before{content:"\\e85b"}.bpmn-icon-participant:before{content:"\\e85c"}.bpmn-icon-event-subprocess-expanded:before{content:"\\e85d"}.bpmn-icon-lane-insert-below:before{content:"\\e85e"}.bpmn-icon-space-tool:before{content:"\\e85f"}.bpmn-icon-connection-multi:before{content:"\\e860"}.bpmn-icon-lane:before{content:"\\e861"}.bpmn-icon-lasso-tool:before{content:"\\e862"}.bpmn-icon-lane-insert-above:before{content:"\\e863"}.bpmn-icon-lane-divide-three:before{content:"\\e864"}.bpmn-icon-lane-divide-two:before{content:"\\e865"}.bpmn-icon-data-input:before{content:"\\e866"}.bpmn-icon-data-output:before{content:"\\e867"}.bpmn-icon-hand-tool:before{content:"\\e868"}.bpmn-icon-group:before{content:"\\e869"}.bpmn-icon-transaction:before{content:"\\e8c4"}',""]),e.exports=t},d1cc:function(e,t,n){var i;
/*!
* svg.js - A lightweight library for manipulating and animating SVG.
* @version 2.7.1
* https://svgdotjs.github.io/
*
* @copyright Wout Fierens <wout@mick-wout.com>
* @license MIT
*
* BUILT: Fri Nov 30 2018 10:01:55 GMT+0100 (GMT+01:00)
*/(function(o,r){i=function(){return r(o,o.document)}.call(t,n,t,e),void 0===i||(e.exports=i)})("undefined"!==typeof window?window:this,(function(e,t){var n="undefined"!==typeof this?this:e,i=n.SVG=function(e){if(i.supported)return e=new i.Doc(e),i.parser.draw||i.prepare(),e};if(i.ns="http://www.w3.org/2000/svg",i.xmlns="http://www.w3.org/2000/xmlns/",i.xlink="http://www.w3.org/1999/xlink",i.svgjs="http://svgjs.com/svgjs",i.supported=function(){return!!t.createElementNS&&!!t.createElementNS(i.ns,"svg").createSVGRect}(),!i.supported)return!1;i.did=1e3,i.eid=function(e){return"Svgjs"+f(e)+i.did++},i.create=function(e){var n=t.createElementNS(this.ns,e);return n.setAttribute("id",this.eid(e)),n},i.extend=function(){var e,t,n,o;for(e=[].slice.call(arguments),t=e.pop(),o=e.length-1;o>=0;o--)if(e[o])for(n in t)e[o].prototype[n]=t[n];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(e){var t="function"==typeof e.create?e.create:function(){this.constructor.call(this,i.create(e.create))};return e.inherit&&(t.prototype=new e.inherit),e.extend&&i.extend(t,e.extend),e.construct&&i.extend(e.parent||i.Container,e.construct),t},i.adopt=function(t){return t?t.instance?t.instance:(n="svg"==t.nodeName?t.parentNode instanceof e.SVGElement?new i.Nested:new i.Doc:"linearGradient"==t.nodeName?new i.Gradient("linear"):"radialGradient"==t.nodeName?new i.Gradient("radial"):i[f(t.nodeName)]?new(i[f(t.nodeName)]):new i.Element(t),n.type=t.nodeName,n.node=t,t.instance=n,n instanceof i.Doc&&n.namespace().defs(),n.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),n):null;var n},i.prepare=function(){var e=t.getElementsByTagName("body")[0],n=(e?new i.Doc(e):i.adopt(t.documentElement).nested()).size(2,0);i.parser={body:e||t.documentElement,draw:n.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").attr("focusable","false").node,poly:n.polyline().node,path:n.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},t.addEventListener("DOMContentLoaded",(function(){i.parser.draw||i.prepare()}),!1),i.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},i.utils={map:function(e,t){var n,i=e.length,o=[];for(n=0;n<i;n++)o.push(t(e[n]));return o},filter:function(e,t){var n,i=e.length,o=[];for(n=0;n<i;n++)t(e[n])&&o.push(e[n]);return o},radians:function(e){return e%360*Math.PI/180},degrees:function(e){return 180*e/Math.PI%360},filterSVGElements:function(t){return this.filter(t,(function(t){return t instanceof e.SVGElement}))}},i.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},i.Color=function(e){var t;this.r=0,this.g=0,this.b=0,e&&("string"===typeof e?i.regex.isRgb.test(e)?(t=i.regex.rgb.exec(e.replace(i.regex.whitespace,"")),this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3])):i.regex.isHex.test(e)&&(t=i.regex.hex.exec(g(e)),this.r=parseInt(t[1],16),this.g=parseInt(t[2],16),this.b=parseInt(t[3],16)):"object"===typeof e&&(this.r=e.r,this.g=e.g,this.b=e.b))},i.extend(i.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+m(this.r)+m(this.g)+m(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(e){return this.destination=new i.Color(e),this},at:function(e){return this.destination?(e=e<0?0:e>1?1:e,new i.Color({r:~~(this.r+(this.destination.r-this.r)*e),g:~~(this.g+(this.destination.g-this.g)*e),b:~~(this.b+(this.destination.b-this.b)*e)})):this}}),i.Color.test=function(e){return e+="",i.regex.isHex.test(e)||i.regex.isRgb.test(e)},i.Color.isRgb=function(e){return e&&"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b},i.Color.isColor=function(e){return i.Color.isRgb(e)||i.Color.test(e)},i.Array=function(e,t){e=(e||[]).valueOf(),0==e.length&&t&&(e=t.valueOf()),this.value=this.parse(e)},i.extend(i.Array,{morph:function(e){if(this.destination=this.parse(e),this.value.length!=this.destination.length){var t=this.value[this.value.length-1],n=this.destination[this.destination.length-1];while(this.value.length>this.destination.length)this.destination.push(n);while(this.value.length<this.destination.length)this.value.push(t)}return this},settle:function(){for(var e=0,t=this.value.length,n=[];e<t;e++)-1==n.indexOf(this.value[e])&&n.push(this.value[e]);return this.value=n},at:function(e){if(!this.destination)return this;for(var t=0,n=this.value.length,o=[];t<n;t++)o.push(this.value[t]+(this.destination[t]-this.value[t])*e);return new i.Array(o)},toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(e){return e=e.valueOf(),Array.isArray(e)?e:this.split(e)},split:function(e){return e.trim().split(i.regex.delimiter).map(parseFloat)},reverse:function(){return this.value.reverse(),this},clone:function(){var e=new this.constructor;return e.value=h(this.value),e}}),i.PointArray=function(e,t){i.Array.call(this,e,t||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray,i.extend(i.PointArray,{toString:function(){for(var e=0,t=this.value.length,n=[];e<t;e++)n.push(this.value[e].join(","));return n.join(" ")},toLine:function(){return{x1:this.value[0][0],y1:this.value[0][1],x2:this.value[1][0],y2:this.value[1][1]}},at:function(e){if(!this.destination)return this;for(var t=0,n=this.value.length,o=[];t<n;t++)o.push([this.value[t][0]+(this.destination[t][0]-this.value[t][0])*e,this.value[t][1]+(this.destination[t][1]-this.value[t][1])*e]);return new i.PointArray(o)},parse:function(e){var t=[];if(e=e.valueOf(),Array.isArray(e)){if(Array.isArray(e[0]))return e.map((function(e){return e.slice()}));if(null!=e[0].x)return e.map((function(e){return[e.x,e.y]}))}else e=e.trim().split(i.regex.delimiter).map(parseFloat);e.length%2!==0&&e.pop();for(var n=0,o=e.length;n<o;n+=2)t.push([e[n],e[n+1]]);return t},move:function(e,t){var n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(var i=this.value.length-1;i>=0;i--)this.value[i]=[this.value[i][0]+e,this.value[i][1]+t];return this},size:function(e,t){var n,i=this.bbox();for(n=this.value.length-1;n>=0;n--)i.width&&(this.value[n][0]=(this.value[n][0]-i.x)*e/i.width+i.x),i.height&&(this.value[n][1]=(this.value[n][1]-i.y)*t/i.height+i.y);return this},bbox:function(){return i.parser.poly.setAttribute("points",this.toString()),i.parser.poly.getBBox()}});for(var o={M:function(e,t,n){return t.x=n.x=e[0],t.y=n.y=e[1],["M",t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],["L",e[0],e[1]]},H:function(e,t){return t.x=e[0],["H",e[0]]},V:function(e,t){return t.y=e[0],["V",e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],["C",e[0],e[1],e[2],e[3],e[4],e[5]]},S:function(e,t){return t.x=e[2],t.y=e[3],["S",e[0],e[1],e[2],e[3]]},Q:function(e,t){return t.x=e[2],t.y=e[3],["Q",e[0],e[1],e[2],e[3]]},T:function(e,t){return t.x=e[0],t.y=e[1],["T",e[0],e[1]]},Z:function(e,t,n){return t.x=n.x,t.y=n.y,["Z"]},A:function(e,t){return t.x=e[5],t.y=e[6],["A",e[0],e[1],e[2],e[3],e[4],e[5],e[6]]}},r="mlhvqtcsaz".split(""),s=0,a=r.length;s<a;++s)o[r[s]]=function(e){return function(t,n,i){if("H"==e)t[0]=t[0]+n.x;else if("V"==e)t[0]=t[0]+n.y;else if("A"==e)t[5]=t[5]+n.x,t[6]=t[6]+n.y;else for(var r=0,s=t.length;r<s;++r)t[r]=t[r]+(r%2?n.y:n.x);return o[e](t,n,i)}}(r[s].toUpperCase());i.PathArray=function(e,t){i.Array.call(this,e,t||[["M",0,0]])},i.PathArray.prototype=new i.Array,i.PathArray.prototype.constructor=i.PathArray,i.extend(i.PathArray,{toString:function(){return C(this.value)},move:function(e,t){var n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(var i,o=this.value.length-1;o>=0;o--)i=this.value[o][0],"M"==i||"L"==i||"T"==i?(this.value[o][1]+=e,this.value[o][2]+=t):"H"==i?this.value[o][1]+=e:"V"==i?this.value[o][1]+=t:"C"==i||"S"==i||"Q"==i?(this.value[o][1]+=e,this.value[o][2]+=t,this.value[o][3]+=e,this.value[o][4]+=t,"C"==i&&(this.value[o][5]+=e,this.value[o][6]+=t)):"A"==i&&(this.value[o][6]+=e,this.value[o][7]+=t);return this},size:function(e,t){var n,i,o=this.bbox();for(n=this.value.length-1;n>=0;n--)i=this.value[n][0],"M"==i||"L"==i||"T"==i?(this.value[n][1]=(this.value[n][1]-o.x)*e/o.width+o.x,this.value[n][2]=(this.value[n][2]-o.y)*t/o.height+o.y):"H"==i?this.value[n][1]=(this.value[n][1]-o.x)*e/o.width+o.x:"V"==i?this.value[n][1]=(this.value[n][1]-o.y)*t/o.height+o.y:"C"==i||"S"==i||"Q"==i?(this.value[n][1]=(this.value[n][1]-o.x)*e/o.width+o.x,this.value[n][2]=(this.value[n][2]-o.y)*t/o.height+o.y,this.value[n][3]=(this.value[n][3]-o.x)*e/o.width+o.x,this.value[n][4]=(this.value[n][4]-o.y)*t/o.height+o.y,"C"==i&&(this.value[n][5]=(this.value[n][5]-o.x)*e/o.width+o.x,this.value[n][6]=(this.value[n][6]-o.y)*t/o.height+o.y)):"A"==i&&(this.value[n][1]=this.value[n][1]*e/o.width,this.value[n][2]=this.value[n][2]*t/o.height,this.value[n][6]=(this.value[n][6]-o.x)*e/o.width+o.x,this.value[n][7]=(this.value[n][7]-o.y)*t/o.height+o.y);return this},equalCommands:function(e){var t,n,o;for(e=new i.PathArray(e),o=this.value.length===e.value.length,t=0,n=this.value.length;o&&t<n;t++)o=this.value[t][0]===e.value[t][0];return o},morph:function(e){return e=new i.PathArray(e),this.equalCommands(e)?this.destination=e:this.destination=null,this},at:function(e){if(!this.destination)return this;var t,n,o,r,s=this.value,a=this.destination.value,l=[],c=new i.PathArray;for(t=0,n=s.length;t<n;t++){for(l[t]=[s[t][0]],o=1,r=s[t].length;o<r;o++)l[t][o]=s[t][o]+(a[t][o]-s[t][o])*e;"A"===l[t][0]&&(l[t][4]=+(0!=l[t][4]),l[t][5]=+(0!=l[t][5]))}return c.value=l,c},parse:function(e){if(e instanceof i.PathArray)return e.valueOf();var t,n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(i.regex.numbersWithDots,c).replace(i.regex.pathLetters," $& ").replace(i.regex.hyphen,"$1 -").trim().split(i.regex.delimiter):e.reduce((function(e,t){return[].concat.call(e,t)}),[]);var r=[],s=new i.Point,a=new i.Point,l=0,h=e.length;do{i.regex.isPathLetter.test(e[l])?(t=e[l],++l):"M"==t?t="L":"m"==t&&(t="l"),r.push(o[t].call(null,e.slice(l,l+=n[t.toUpperCase()]).map(parseFloat),s,a))}while(h>l);return r},bbox:function(){return i.parser.path.setAttribute("d",this.toString()),i.parser.path.getBBox()}}),i.Number=i.invent({create:function(e,t){this.value=0,this.unit=t||"","number"===typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"===typeof e?(t=e.match(i.regex.numberAndUnit),t&&(this.value=parseFloat(t[1]),"%"==t[5]?this.value/=100:"s"==t[5]&&(this.value*=1e3),this.unit=t[5])):e instanceof i.Number&&(this.value=e.valueOf(),this.unit=e.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(e){return e=new i.Number(e),new i.Number(this+e,this.unit||e.unit)},minus:function(e){return e=new i.Number(e),new i.Number(this-e,this.unit||e.unit)},times:function(e){return e=new i.Number(e),new i.Number(this*e,this.unit||e.unit)},divide:function(e){return e=new i.Number(e),new i.Number(this/e,this.unit||e.unit)},to:function(e){var t=new i.Number(this);return"string"===typeof e&&(t.unit=e),t},morph:function(e){return this.destination=new i.Number(e),e.relative&&(this.destination.value+=this.value),this},at:function(e){return this.destination?new i.Number(this.destination).minus(this).times(e).plus(this):this}}}),i.Element=i.invent({create:function(e){this._stroke=i.defaults.attrs.stroke,this._event=null,this._events={},this.dom={},(this.node=e)&&(this.type=e.nodeName,this.node.instance=this,this._events=e._events||{},this._stroke=e.getAttribute("stroke")||this._stroke)},extend:{x:function(e){return this.attr("x",e)},y:function(e){return this.attr("y",e)},cx:function(e){return null==e?this.x()+this.width()/2:this.x(e-this.width()/2)},cy:function(e){return null==e?this.y()+this.height()/2:this.y(e-this.height()/2)},move:function(e,t){return this.x(e).y(t)},center:function(e,t){return this.cx(e).cy(t)},width:function(e){return this.attr("width",e)},height:function(e){return this.attr("height",e)},size:function(e,t){var n=b(this,e,t);return this.width(new i.Number(n.width)).height(new i.Number(n.height))},clone:function(e){this.writeDataToDom();var t=A(this.node.cloneNode(!0));return e?e.add(t):this.after(t),t},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(e){return this.after(e).remove(),e},addTo:function(e){return e.put(this)},putIn:function(e){return e.add(this)},id:function(e){return this.attr("id",e)},inside:function(e,t){var n=this.bbox();return e>n.x&&t>n.y&&e<n.x+n.width&&t<n.y+n.height},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var e=this.attr("class");return null==e?[]:e.trim().split(i.regex.delimiter)},hasClass:function(e){return-1!=this.classes().indexOf(e)},addClass:function(e){if(!this.hasClass(e)){var t=this.classes();t.push(e),this.attr("class",t.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter((function(t){return t!=e})).join(" ")),this},toggleClass:function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)},reference:function(e){return i.get(this.attr(e))},parent:function(t){var n=this;if(!n.node.parentNode)return null;if(n=i.adopt(n.node.parentNode),!t)return n;while(n&&n.node instanceof e.SVGElement){if("string"===typeof t?n.matches(t):n instanceof t)return n;if(!n.node.parentNode||"#document"==n.node.parentNode.nodeName||"#document-fragment"==n.node.parentNode.nodeName)return null;n=i.adopt(n.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(e){var t=[],n=this;do{if(n=n.parent(e),!n||!n.node)break;t.push(n)}while(n.parent);return t},matches:function(e){return d(this.node,e)},native:function(){return this.node},svg:function(e){var n=t.createElement("svg");if(!(e&&this instanceof i.Parent))return n.appendChild(e=t.createElement("svg")),this.writeDataToDom(),e.appendChild(this.node.cloneNode(!0)),n.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");n.innerHTML="<svg>"+e.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var o=0,r=n.firstChild.childNodes.length;o<r;o++)this.node.appendChild(n.firstChild.firstChild);return this},writeDataToDom:function(){if(this.each||this.lines){var e=this.each?this:this.lines();e.each((function(){this.writeDataToDom()}))}return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(e){return this.dom=e,this},is:function(e){return u(this,e)}}}),i.easing={"-":function(e){return e},"<>":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)}},i.morph=function(e){return function(t,n){return new i.MorphObj(t,n).at(e)}},i.Situation=i.invent({create:function(e){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new i.Number(e.duration).valueOf(),this.delay=new i.Number(e.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=e.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),i.FX=i.invent({create:function(e){this._target=e,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(e,t,n){"object"==typeof e&&(t=e.ease,n=e.delay,e=e.duration);var o=new i.Situation({duration:e||1e3,delay:n||0,ease:i.easing[t||"-"]||t});return this.queue(o),this},delay:function(e){var t=new i.Situation({duration:e,delay:0,ease:i.easing["-"]});return this.queue(t)},target:function(e){return e&&e instanceof i.Element?(this._target=e,this):this._target},timeToAbsPos:function(e){return(e-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(e){return this.situation.duration/this._speed*e+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=e.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){e.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(e){return("function"==typeof e||e instanceof i.Situation)&&this.situations.push(e),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof i.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var e,t,n,o=this.situation;if(o.init)return this;for(e in o.animations)for(n=this.target()[e](),Array.isArray(n)||(n=[n]),Array.isArray(o.animations[e])||(o.animations[e]=[o.animations[e]]),t=n.length;t--;)o.animations[e][t]instanceof i.Number&&(n[t]=new i.Number(n[t])),o.animations[e][t]=n[t].morph(o.animations[e][t]);for(e in o.attrs)o.attrs[e]=new i.MorphObj(this.target().attr(e),o.attrs[e]);for(e in o.styles)o.styles[e]=new i.MorphObj(this.target().style(e),o.styles[e]);return o.initialTransformation=this.target().matrixify(),o.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(e,t){var n=this.active;return this.active=!1,t&&this.clearQueue(),e&&this.situation&&(!n&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},reset:function(){if(this.situation){var e=this.situation;this.stop(),this.situation=e,this.atStart()}return this},finish:function(){this.stop(!0,!1);while(this.dequeue().situation&&this.stop(!0,!1));return this.clearQueue().clearCurrent(),this},atStart:function(){return this.at(0,!0)},atEnd:function(){return!0===this.situation.loops&&(this.situation.loops=this.situation.loop+1),"number"==typeof this.situation.loops?this.at(this.situation.loops,!0):this.at(1,!0)},at:function(e,t){var n=this.situation.duration/this._speed;return this.absPos=e,t||(this.situation.reversed&&(this.absPos=1-this.absPos),this.absPos+=this.situation.loop),this.situation.start=+new Date-this.absPos*n,this.situation.finish=this.situation.start+n,this.step(!0)},speed:function(e){return 0===e?this.pause():e?(this._speed=e,this.at(this.absPos,!0)):this._speed},loop:function(e,t){var n=this.last();return n.loops=null==e||e,n.loop=0,t&&(n.reversing=!0),this},pause:function(){return this.paused=!0,this.stopAnimFrame(),this},play:function(){return this.paused?(this.paused=!1,this.at(this.absPos,!0)):this},reverse:function(e){var t=this.last();return t.reversed="undefined"==typeof e?!t.reversed:e,this},progress:function(e){return e?this.situation.ease(this.pos):this.pos},after:function(e){var t=this.last(),n=function n(i){i.detail.situation==t&&(e.call(this,t),this.off("finished.fx",n))};return this.target().on("finished.fx",n),this._callStart()},during:function(e){var t=this.last(),n=function(n){n.detail.situation==t&&e.call(this,n.detail.pos,i.morph(n.detail.pos),n.detail.eased,t)};return this.target().off("during.fx",n).on("during.fx",n),this.after((function(){this.off("during.fx",n)})),this._callStart()},afterAll:function(e){var t=function t(n){e.call(this),this.off("allfinished.fx",t)};return this.target().off("allfinished.fx",t).on("allfinished.fx",t),this._callStart()},duringAll:function(e){var t=function(t){e.call(this,t.detail.pos,i.morph(t.detail.pos),t.detail.eased,t.detail.situation)};return this.target().off("during.fx",t).on("during.fx",t),this.afterAll((function(){this.off("during.fx",t)})),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(e,t,n){return this.last()[n||"animations"][e]=t,this._callStart()},step:function(e){var t,n,i;(e||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops)?(t=Math.max(this.absPos,0),n=Math.floor(t),!0===this.situation.loops||n<this.situation.loops?(this.pos=t-n,i=this.situation.loop,this.situation.loop=n):(this.absPos=this.situation.loops,this.pos=1,i=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-i)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos);this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var o=this.situation.ease(this.pos);for(var r in this.situation.once)r>this.lastPos&&r<=o&&(this.situation.once[r].call(this.target(),this.pos,o),delete this.situation.once[r]);return this.active&&this.target().fire("during",{pos:this.pos,eased:o,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=o,this):this},eachAt:function(){var e,t,n,o=this,r=this.target(),s=this.situation;for(e in s.animations)n=[].concat(s.animations[e]).map((function(e){return"string"!==typeof e&&e.at?e.at(s.ease(o.pos),o.pos):e})),r[e].apply(r,n);for(e in s.attrs)n=[e].concat(s.attrs[e]).map((function(e){return"string"!==typeof e&&e.at?e.at(s.ease(o.pos),o.pos):e})),r.attr.apply(r,n);for(e in s.styles)n=[e].concat(s.styles[e]).map((function(e){return"string"!==typeof e&&e.at?e.at(s.ease(o.pos),o.pos):e})),r.style.apply(r,n);if(s.transforms.length){for(n=s.initialTransformation,e=0,t=s.transforms.length;e<t;e++){var a=s.transforms[e];a instanceof i.Matrix?n=a.relative?n.multiply((new i.Matrix).morph(a).at(s.ease(this.pos))):n.morph(a).at(s.ease(this.pos)):(a.relative||a.undo(n.extract()),n=n.multiply(a.at(s.ease(this.pos))))}r.matrix(n)}return this},once:function(e,t,n){var i=this.last();return n||(e=i.ease(e)),i.once[e]=t,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:i.Element,construct:{animate:function(e,t,n){return(this.fx||(this.fx=new i.FX(this))).animate(e,t,n)},delay:function(e){return(this.fx||(this.fx=new i.FX(this))).delay(e)},stop:function(e,t){return this.fx&&this.fx.stop(e,t),this},finish:function(){return this.fx&&this.fx.finish(),this},pause:function(){return this.fx&&this.fx.pause(),this},play:function(){return this.fx&&this.fx.play(),this},speed:function(e){if(this.fx){if(null==e)return this.fx.speed();this.fx.speed(e)}return this}}}),i.MorphObj=i.invent({create:function(e,t){return i.Color.isColor(t)?new i.Color(e).morph(t):i.regex.delimiter.test(e)?i.regex.pathLetters.test(e)?new i.PathArray(e).morph(t):new i.Array(e).morph(t):i.regex.numberAndUnit.test(t)?new i.Number(e).morph(t):(this.value=e,void(this.destination=t))},extend:{at:function(e,t){return t<1?this.value:this.destination},valueOf:function(){return this.value}}}),i.extend(i.FX,{attr:function(e,t,n){if("object"==typeof e)for(var i in e)this.attr(i,e[i]);else this.add(e,t,"attrs");return this},style:function(e,t){if("object"==typeof e)for(var n in e)this.style(n,e[n]);else this.add(e,t,"styles");return this},x:function(e,t){if(this.target()instanceof i.G)return this.transform({x:e},t),this;var n=new i.Number(e);return n.relative=t,this.add("x",n)},y:function(e,t){if(this.target()instanceof i.G)return this.transform({y:e},t),this;var n=new i.Number(e);return n.relative=t,this.add("y",n)},cx:function(e){return this.add("cx",new i.Number(e))},cy:function(e){return this.add("cy",new i.Number(e))},move:function(e,t){return this.x(e).y(t)},center:function(e,t){return this.cx(e).cy(t)},size:function(e,t){var n;this.target()instanceof i.Text?this.attr("font-size",e):(e&&t||(n=this.target().bbox()),e||(e=n.width/n.height*t),t||(t=n.height/n.width*e),this.add("width",new i.Number(e)).add("height",new i.Number(t)));return this},width:function(e){return this.add("width",new i.Number(e))},height:function(e){return this.add("height",new i.Number(e))},plot:function(e,t,n,i){return 4==arguments.length?this.plot([e,t,n,i]):this.add("plot",new(this.target().morphArray)(e))},leading:function(e){return this.target().leading?this.add("leading",new i.Number(e)):this},viewbox:function(e,t,n,o){return this.target()instanceof i.Container&&this.add("viewbox",new i.ViewBox(e,t,n,o)),this},update:function(e){if(this.target()instanceof i.Stop){if("number"==typeof e||e instanceof i.Number)return this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]});null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",e.offset)}return this}}),i.Box=i.invent({create:function(e,t,n,o){if(!("object"!=typeof e||e instanceof i.Element))return i.Box.call(this,null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height);4==arguments.length&&(this.x=e,this.y=t,this.width=n,this.height=o),E(this)},extend:{merge:function(e){var t=new this.constructor;return t.x=Math.min(this.x,e.x),t.y=Math.min(this.y,e.y),t.width=Math.max(this.x+this.width,e.x+e.width)-t.x,t.height=Math.max(this.y+this.height,e.y+e.height)-t.y,E(t)},transform:function(e){var t,n=1/0,o=-1/0,r=1/0,s=-1/0,a=[new i.Point(this.x,this.y),new i.Point(this.x2,this.y),new i.Point(this.x,this.y2),new i.Point(this.x2,this.y2)];return a.forEach((function(t){t=t.transform(e),n=Math.min(n,t.x),o=Math.max(o,t.x),r=Math.min(r,t.y),s=Math.max(s,t.y)})),t=new this.constructor,t.x=n,t.width=o-n,t.y=r,t.height=s-r,E(t),t}}}),i.BBox=i.invent({create:function(e){if(i.Box.apply(this,[].slice.call(arguments)),e instanceof i.Element){var n;try{if(t.documentElement.contains){if(!t.documentElement.contains(e.node))throw new Exception("Element not in the dom")}else{var o=e.node;while(o.parentNode)o=o.parentNode;if(o!=t)throw new Exception("Element not in the dom")}n=e.node.getBBox()}catch(s){if(e instanceof i.Shape){var r=e.clone(i.parser.draw.instance).show();n=r.node.getBBox(),r.remove()}else n={x:e.node.clientLeft,y:e.node.clientTop,width:e.node.clientWidth,height:e.node.clientHeight}}i.Box.call(this,n)}},inherit:i.Box,parent:i.Element,construct:{bbox:function(){return new i.BBox(this)}}}),i.BBox.prototype.constructor=i.BBox,i.extend(i.Element,{tbox:function(){return this.rbox(this.doc())}}),i.RBox=i.invent({create:function(e){i.Box.apply(this,[].slice.call(arguments)),e instanceof i.Element&&i.Box.call(this,e.node.getBoundingClientRect())},inherit:i.Box,parent:i.Element,extend:{addOffset:function(){return this.x+=e.pageXOffset,this.y+=e.pageYOffset,this}},construct:{rbox:function(e){return e?new i.RBox(this).transform(e.screenCTM().inverse()):new i.RBox(this).addOffset()}}}),i.RBox.prototype.constructor=i.RBox,i.Matrix=i.invent({create:function(e){var t,n=y([1,0,0,1,0,0]);for(e=e instanceof i.Element?e.matrixify():"string"===typeof e?y(e.split(i.regex.delimiter).map(parseFloat)):6==arguments.length?y([].slice.call(arguments)):Array.isArray(e)?y(e):"object"===typeof e?e:n,t=k.length-1;t>=0;--t)this[k[t]]=null!=e[k[t]]?e[k[t]]:n[k[t]]},extend:{extract:function(){var e=v(this,0,1),t=v(this,1,0),n=180/Math.PI*Math.atan2(e.y,e.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(n*Math.PI/180)+this.f*Math.sin(n*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(n*Math.PI/180)+this.e*Math.sin(-n*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),skewX:-n,skewY:180/Math.PI*Math.atan2(t.y,t.x),scaleX:Math.sqrt(this.a*this.a+this.b*this.b),scaleY:Math.sqrt(this.c*this.c+this.d*this.d),rotation:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new i.Matrix(this)}},clone:function(){return new i.Matrix(this)},morph:function(e){return this.destination=new i.Matrix(e),this},at:function(e){if(!this.destination)return this;var t=new i.Matrix({a:this.a+(this.destination.a-this.a)*e,b:this.b+(this.destination.b-this.b)*e,c:this.c+(this.destination.c-this.c)*e,d:this.d+(this.destination.d-this.d)*e,e:this.e+(this.destination.e-this.e)*e,f:this.f+(this.destination.f-this.f)*e});return t},multiply:function(e){return new i.Matrix(this.native().multiply(w(e).native()))},inverse:function(){return new i.Matrix(this.native().inverse())},translate:function(e,t){return new i.Matrix(this.native().translate(e||0,t||0))},scale:function(e,t,n,o){return 1==arguments.length?t=e:3==arguments.length&&(o=n,n=t,t=e),this.around(n,o,new i.Matrix(e,0,0,t,0,0))},rotate:function(e,t,n){return e=i.utils.radians(e),this.around(t,n,new i.Matrix(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0))},flip:function(e,t){return"x"==e?this.scale(-1,1,t,0):"y"==e?this.scale(1,-1,0,t):this.scale(-1,-1,e,null!=t?t:e)},skew:function(e,t,n,o){return 1==arguments.length?t=e:3==arguments.length&&(o=n,n=t,t=e),e=i.utils.radians(e),t=i.utils.radians(t),this.around(n,o,new i.Matrix(1,Math.tan(t),Math.tan(e),1,0,0))},skewX:function(e,t,n){return this.skew(e,0,t,n)},skewY:function(e,t,n){return this.skew(0,e,t,n)},around:function(e,t,n){return this.multiply(new i.Matrix(1,0,0,1,e||0,t||0)).multiply(n).multiply(new i.Matrix(1,0,0,1,-e||0,-t||0))},native:function(){for(var e=i.parser.native.createSVGMatrix(),t=k.length-1;t>=0;t--)e[k[t]]=this[k[t]];return e},toString:function(){return"matrix("+S(this.a)+","+S(this.b)+","+S(this.c)+","+S(this.d)+","+S(this.e)+","+S(this.f)+")"}},parent:i.Element,construct:{ctm:function(){return new i.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof i.Nested){var e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new i.Matrix(t)}return new i.Matrix(this.node.getScreenCTM())}}}),i.Point=i.invent({create:function(e,t){var n,i={x:0,y:0};n=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===typeof e?{x:e.x,y:e.y}:null!=e?{x:e,y:null!=t?t:e}:i,this.x=n.x,this.y=n.y},extend:{clone:function(){return new i.Point(this)},morph:function(e,t){return this.destination=new i.Point(e,t),this},at:function(e){if(!this.destination)return this;var t=new i.Point({x:this.x+(this.destination.x-this.x)*e,y:this.y+(this.destination.y-this.y)*e});return t},native:function(){var e=i.parser.native.createSVGPoint();return e.x=this.x,e.y=this.y,e},transform:function(e){return new i.Point(this.native().matrixTransform(e.native()))}}}),i.extend(i.Element,{point:function(e,t){return new i.Point(e,t).transform(this.screenCTM().inverse())}}),i.extend(i.Element,{attr:function(e,t,n){if(null==e){for(e={},t=this.node.attributes,n=t.length-1;n>=0;n--)e[t[n].nodeName]=i.regex.isNumber.test(t[n].nodeValue)?parseFloat(t[n].nodeValue):t[n].nodeValue;return e}if("object"==typeof e)for(t in e)this.attr(t,e[t]);else if(null===t)this.node.removeAttribute(e);else{if(null==t)return t=this.node.getAttribute(e),null==t?i.defaults.attrs[e]:i.regex.isNumber.test(t)?parseFloat(t):t;"stroke-width"==e?this.attr("stroke",parseFloat(t)>0?this._stroke:null):"stroke"==e&&(this._stroke=t),"fill"!=e&&"stroke"!=e||(i.regex.isImage.test(t)&&(t=this.doc().defs().image(t,0,0)),t instanceof i.Image&&(t=this.doc().defs().pattern(0,0,(function(){this.add(t)})))),"number"===typeof t?t=new i.Number(t):i.Color.isColor(t)?t=new i.Color(t):Array.isArray(t)&&(t=new i.Array(t)),"leading"==e?this.leading&&this.leading(t):"string"===typeof n?this.node.setAttributeNS(n,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||"font-size"!=e&&"x"!=e||this.rebuild(e,t)}return this}}),i.extend(i.Element,{transform:function(e,t){var n,o,r=this;if("object"!==typeof e)return n=new i.Matrix(r).extract(),"string"===typeof e?n[e]:n;if(n=new i.Matrix(r),t=!!t||!!e.relative,null!=e.a)n=t?n.multiply(new i.Matrix(e)):new i.Matrix(e);else if(null!=e.rotation)_(e,r),n=t?n.rotate(e.rotation,e.cx,e.cy):n.rotate(e.rotation-n.extract().rotation,e.cx,e.cy);else if(null!=e.scale||null!=e.scaleX||null!=e.scaleY){if(_(e,r),e.scaleX=null!=e.scale?e.scale:null!=e.scaleX?e.scaleX:1,e.scaleY=null!=e.scale?e.scale:null!=e.scaleY?e.scaleY:1,!t){var s=n.extract();e.scaleX=1*e.scaleX/s.scaleX,e.scaleY=1*e.scaleY/s.scaleY}n=n.scale(e.scaleX,e.scaleY,e.cx,e.cy)}else if(null!=e.skew||null!=e.skewX||null!=e.skewY){if(_(e,r),e.skewX=null!=e.skew?e.skew:null!=e.skewX?e.skewX:0,e.skewY=null!=e.skew?e.skew:null!=e.skewY?e.skewY:0,!t){s=n.extract();n=n.multiply((new i.Matrix).skew(s.skewX,s.skewY,e.cx,e.cy).inverse())}n=n.skew(e.skewX,e.skewY,e.cx,e.cy)}else e.flip?("x"==e.flip||"y"==e.flip?e.offset=null==e.offset?r.bbox()["c"+e.flip]:e.offset:null==e.offset?(o=r.bbox(),e.flip=o.cx,e.offset=o.cy):e.flip=e.offset,n=(new i.Matrix).flip(e.flip,e.offset)):null==e.x&&null==e.y||(t?n=n.translate(e.x,e.y):(null!=e.x&&(n.e=e.x),null!=e.y&&(n.f=e.y)));return this.attr("transform",n)}}),i.extend(i.FX,{transform:function(e,t){var n,o,r=this.target();return"object"!==typeof e?(n=new i.Matrix(r).extract(),"string"===typeof e?n[e]:n):(t=!!t||!!e.relative,null!=e.a?n=new i.Matrix(e):null!=e.rotation?(_(e,r),n=new i.Rotate(e.rotation,e.cx,e.cy)):null!=e.scale||null!=e.scaleX||null!=e.scaleY?(_(e,r),e.scaleX=null!=e.scale?e.scale:null!=e.scaleX?e.scaleX:1,e.scaleY=null!=e.scale?e.scale:null!=e.scaleY?e.scaleY:1,n=new i.Scale(e.scaleX,e.scaleY,e.cx,e.cy)):null!=e.skewX||null!=e.skewY?(_(e,r),e.skewX=null!=e.skewX?e.skewX:0,e.skewY=null!=e.skewY?e.skewY:0,n=new i.Skew(e.skewX,e.skewY,e.cx,e.cy)):e.flip?("x"==e.flip||"y"==e.flip?e.offset=null==e.offset?r.bbox()["c"+e.flip]:e.offset:null==e.offset?(o=r.bbox(),e.flip=o.cx,e.offset=o.cy):e.flip=e.offset,n=(new i.Matrix).flip(e.flip,e.offset)):null==e.x&&null==e.y||(n=new i.Translate(e.x,e.y)),n?(n.relative=t,this.last().transforms.push(n),this._callStart()):this)}}),i.extend(i.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){var e=(this.attr("transform")||"").split(i.regex.transforms).slice(0,-1).map((function(e){var t=e.trim().split("(");return[t[0],t[1].split(i.regex.delimiter).map((function(e){return parseFloat(e)}))]})).reduce((function(e,t){return"matrix"==t[0]?e.multiply(y(t[1])):e[t[0]].apply(e,t[1])}),new i.Matrix);return e},toParent:function(e){if(this==e)return this;var t=this.screenCTM(),n=e.screenCTM().inverse();return this.addTo(e).untransform().transform(n.multiply(t)),this},toDoc:function(){return this.toParent(this.doc())}}),i.Transformation=i.invent({create:function(e,t){if(arguments.length>1&&"boolean"!=typeof t)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(e))for(var n=0,i=this.arguments.length;n<i;++n)this[this.arguments[n]]=e[n];else if("object"==typeof e)for(n=0,i=this.arguments.length;n<i;++n)this[this.arguments[n]]=e[this.arguments[n]];this.inversed=!1,!0===t&&(this.inversed=!0)},extend:{arguments:[],method:"",at:function(e){for(var t=[],n=0,o=this.arguments.length;n<o;++n)t.push(this[this.arguments[n]]);var r=this._undo||new i.Matrix;return r=(new i.Matrix).morph(i.Matrix.prototype[this.method].apply(r,t)).at(e),this.inversed?r.inverse():r},undo:function(e){for(var t=0,n=this.arguments.length;t<n;++t)e[this.arguments[t]]="undefined"==typeof this[this.arguments[t]]?0:e[this.arguments[t]];return e.cx=this.cx,e.cy=this.cy,this._undo=new(i[f(this.method)])(e,!0).at(1),this}}}),i.Translate=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(e,t){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),i.Rotate=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(e,t){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["rotation","cx","cy"],method:"rotate",at:function(e){var t=(new i.Matrix).rotate((new i.Number).morph(this.rotation-(this._undo?this._undo.rotation:0)).at(e),this.cx,this.cy);return this.inversed?t.inverse():t},undo:function(e){return this._undo=e,this}}}),i.Scale=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(e,t){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["scaleX","scaleY","cx","cy"],method:"scale"}}),i.Skew=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(e,t){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["skewX","skewY","cx","cy"],method:"skew"}}),i.extend(i.Element,{style:function(e,t){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"==typeof e)for(t in e)this.style(t,e[t]);else{if(!i.regex.isCss.test(e))return this.node.style[p(e)];e=e.split(/\s*;\s*/).filter((function(e){return!!e})).map((function(e){return e.split(/\s*:\s*/)}));while(t=e.pop())this.style(t[0],t[1])}else this.node.style[p(e)]=null===t||i.regex.isBlank.test(t)?"":t;return this}}),i.Parent=i.invent({create:function(e){this.constructor.call(this,e)},inherit:i.Element,extend:{children:function(){return i.utils.map(i.utils.filterSVGElements(this.node.childNodes),(function(e){return i.adopt(e)}))},add:function(e,t){return null==t?this.node.appendChild(e.node):e.node!=this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this},put:function(e,t){return this.add(e,t),e},has:function(e){return this.index(e)>=0},index:function(e){return[].slice.call(this.node.childNodes).indexOf(e.node)},get:function(e){return i.adopt(this.node.childNodes[e])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(e,t){var n,o,r=this.children();for(n=0,o=r.length;n<o;n++)r[n]instanceof i.Element&&e.apply(r[n],[n,r]),t&&r[n]instanceof i.Container&&r[n].each(e,t);return this},removeElement:function(e){return this.node.removeChild(e.node),this},clear:function(){while(this.node.hasChildNodes())this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),i.extend(i.Parent,{ungroup:function(e,t){return 0===t||this instanceof i.Defs||this.node==i.parser.draw||(e=e||(this instanceof i.Doc?this:this.parent(i.Parent)),t=t||1/0,this.each((function(){return this instanceof i.Defs?this:this instanceof i.Parent?this.ungroup(e,t-1):this.toParent(e)})),this.node.firstChild||this.remove()),this},flatten:function(e,t){return this.ungroup(e,t)}}),i.Container=i.invent({create:function(e){this.constructor.call(this,e)},inherit:i.Parent}),i.ViewBox=i.invent({create:function(e){var t,n,o,r,s,a,l,c=[0,0,0,0],h=1,u=1,d=/[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/gi;if(e instanceof i.Element){a=e,l=e,s=(e.attr("viewBox")||"").match(d),e.bbox,o=new i.Number(e.width()),r=new i.Number(e.height());while("%"==o.unit)h*=o.value,o=new i.Number(a instanceof i.Doc?a.parent().offsetWidth:a.parent().width()),a=a.parent();while("%"==r.unit)u*=r.value,r=new i.Number(l instanceof i.Doc?l.parent().offsetHeight:l.parent().height()),l=l.parent();this.x=0,this.y=0,this.width=o*h,this.height=r*u,this.zoom=1,s&&(t=parseFloat(s[0]),n=parseFloat(s[1]),o=parseFloat(s[2]),r=parseFloat(s[3]),this.zoom=this.width/this.height>o/r?this.height/r:this.width/o,this.x=t,this.y=n,this.width=o,this.height=r)}else e="string"===typeof e?e.match(d).map((function(e){return parseFloat(e)})):Array.isArray(e)?e:"object"==typeof e?[e.x,e.y,e.width,e.height]:4==arguments.length?[].slice.call(arguments):c,this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]},extend:{toString:function(){return this.x+" "+this.y+" "+this.width+" "+this.height},morph:function(e,t,n,o){return this.destination=new i.ViewBox(e,t,n,o),this},at:function(e){return this.destination?new i.ViewBox([this.x+(this.destination.x-this.x)*e,this.y+(this.destination.y-this.y)*e,this.width+(this.destination.width-this.width)*e,this.height+(this.destination.height-this.height)*e]):this}},parent:i.Container,construct:{viewbox:function(e,t,n,o){return 0==arguments.length?new i.ViewBox(this):this.attr("viewBox",new i.ViewBox(e,t,n,o))}}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach((function(e){i.Element.prototype[e]=function(t){return null==t?i.off(this,e):i.on(this,e,t),this}})),i.listenerId=0,i.on=function(e,t,n,o,r){var s=n.bind(o||e),a=e instanceof i.Element?e.node:e;a.instance=a.instance||{_events:{}};var l=a.instance._events;n._svgjsListenerId||(n._svgjsListenerId=++i.listenerId),t.split(i.regex.delimiter).forEach((function(e){var t=e.split(".")[0],i=e.split(".")[1]||"*";l[t]=l[t]||{},l[t][i]=l[t][i]||{},l[t][i][n._svgjsListenerId]=s,a.addEventListener(t,s,r||!1)}))},i.off=function(e,t,n,o){var r=e instanceof i.Element?e.node:e;if(r.instance&&("function"!==typeof n||(n=n._svgjsListenerId,n))){var s=r.instance._events;(t||"").split(i.regex.delimiter).forEach((function(e){var t,a,l=e&&e.split(".")[0],c=e&&e.split(".")[1];if(n)s[l]&&s[l][c||"*"]&&(r.removeEventListener(l,s[l][c||"*"][n],o||!1),delete s[l][c||"*"][n]);else if(l&&c){if(s[l]&&s[l][c]){for(a in s[l][c])i.off(r,[l,c].join("."),a);delete s[l][c]}}else if(c)for(e in s)for(t in s[e])c===t&&i.off(r,[e,c].join("."));else if(l){if(s[l]){for(t in s[l])i.off(r,[l,t].join("."));delete s[l]}}else{for(e in s)i.off(r,e);r.instance._events={}}}))}},i.extend(i.Element,{on:function(e,t,n,o){return i.on(this,e,t,n,o),this},off:function(e,t){return i.off(this.node,e,t),this},fire:function(t,n){return t instanceof e.Event?this.node.dispatchEvent(t):this.node.dispatchEvent(t=new i.CustomEvent(t,{detail:n,cancelable:!0})),this._event=t,this},event:function(){return this._event}}),i.Defs=i.invent({create:"defs",inherit:i.Container}),i.G=i.invent({create:"g",inherit:i.Container,extend:{x:function(e){return null==e?this.transform("x"):this.transform({x:e-this.x()},!0)},y:function(e){return null==e?this.transform("y"):this.transform({y:e-this.y()},!0)},cx:function(e){return null==e?this.gbox().cx:this.x(e-this.gbox().width/2)},cy:function(e){return null==e?this.gbox().cy:this.y(e-this.gbox().height/2)},gbox:function(){var e=this.bbox(),t=this.transform();return e.x+=t.x,e.x2+=t.x,e.cx+=t.x,e.y+=t.y,e.y2+=t.y,e.cy+=t.y,e}},construct:{group:function(){return this.put(new i.G)}}}),i.Doc=i.invent({create:function(e){e&&(e="string"==typeof e?t.getElementById(e):e,"svg"==e.nodeName?this.constructor.call(this,e):(this.constructor.call(this,i.create("svg")),e.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:i.Container,extend:{namespace:function(){return this.attr({xmlns:i.ns,version:"1.1"}).attr("xmlns:xlink",i.xlink,i.xmlns).attr("xmlns:svgjs",i.svgjs,i.xmlns)},defs:function(){var e;this._defs||((e=this.node.getElementsByTagName("defs")[0])?this._defs=i.adopt(e):this._defs=new i.Defs,this.node.appendChild(this._defs.node));return this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName&&"#document-fragment"!=this.node.parentNode.nodeName?this.node.parentNode:null},spof:function(){var e=this.node.getScreenCTM();return e&&this.style("left",-e.e%1+"px").style("top",-e.f%1+"px"),this},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){while(this.node.hasChildNodes())this.node.removeChild(this.node.lastChild);return delete this._defs,i.parser.draw.parentNode||this.node.appendChild(i.parser.draw),this},clone:function(e){this.writeDataToDom();var t=this.node,n=A(t.cloneNode(!0));return e?(e.node||e).appendChild(n.node):t.parentNode.insertBefore(n.node,t.nextSibling),n}}}),i.extend(i.Element,{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){var e=this.position()+1,t=this.parent();return t.removeElement(this).add(this,e),t instanceof i.Doc&&t.node.appendChild(t.defs().node),this},backward:function(){var e=this.position();return e>0&&this.parent().removeElement(this).add(this,e-1),this},front:function(){var e=this.parent();return e.node.appendChild(this.node),e instanceof i.Doc&&e.node.appendChild(e.defs().node),this},back:function(){return this.position()>0&&this.parent().removeElement(this).add(this,0),this},before:function(e){e.remove();var t=this.position();return this.parent().add(e,t),this},after:function(e){e.remove();var t=this.position();return this.parent().add(e,t+1),this}}),i.Mask=i.invent({create:function(){this.constructor.call(this,i.create("mask")),this.targets=[]},inherit:i.Container,extend:{remove:function(){for(var e=this.targets.length-1;e>=0;e--)this.targets[e]&&this.targets[e].unmask();return this.targets=[],i.Element.prototype.remove.call(this),this}},construct:{mask:function(){return this.defs().put(new i.Mask)}}}),i.extend(i.Element,{maskWith:function(e){return this.masker=e instanceof i.Mask?e:this.parent().mask().add(e),this.masker.targets.push(this),this.attr("mask",'url("#'+this.masker.attr("id")+'")')},unmask:function(){return delete this.masker,this.attr("mask",null)}}),i.ClipPath=i.invent({create:function(){this.constructor.call(this,i.create("clipPath")),this.targets=[]},inherit:i.Container,extend:{remove:function(){for(var e=this.targets.length-1;e>=0;e--)this.targets[e]&&this.targets[e].unclip();return this.targets=[],this.parent().removeElement(this),this}},construct:{clip:function(){return this.defs().put(new i.ClipPath)}}}),i.extend(i.Element,{clipWith:function(e){return this.clipper=e instanceof i.ClipPath?e:this.parent().clip().add(e),this.clipper.targets.push(this),this.attr("clip-path",'url("#'+this.clipper.attr("id")+'")')},unclip:function(){return delete this.clipper,this.attr("clip-path",null)}}),i.Gradient=i.invent({create:function(e){this.constructor.call(this,i.create(e+"Gradient")),this.type=e},inherit:i.Container,extend:{at:function(e,t,n){return this.put(new i.Stop).update(e,t,n)},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(e,t,n){return"transform"==e&&(e="gradientTransform"),i.Container.prototype.attr.call(this,e,t,n)}},construct:{gradient:function(e,t){return this.defs().gradient(e,t)}}}),i.extend(i.Gradient,i.FX,{from:function(e,t){return"radial"==(this._target||this).type?this.attr({fx:new i.Number(e),fy:new i.Number(t)}):this.attr({x1:new i.Number(e),y1:new i.Number(t)})},to:function(e,t){return"radial"==(this._target||this).type?this.attr({cx:new i.Number(e),cy:new i.Number(t)}):this.attr({x2:new i.Number(e),y2:new i.Number(t)})}}),i.extend(i.Defs,{gradient:function(e,t){return this.put(new i.Gradient(e)).update(t)}}),i.Stop=i.invent({create:"stop",inherit:i.Element,extend:{update:function(e){return("number"==typeof e||e instanceof i.Number)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",new i.Number(e.offset)),this}}}),i.Pattern=i.invent({create:"pattern",inherit:i.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},toString:function(){return this.fill()},attr:function(e,t,n){return"transform"==e&&(e="patternTransform"),i.Container.prototype.attr.call(this,e,t,n)}},construct:{pattern:function(e,t,n){return this.defs().pattern(e,t,n)}}}),i.extend(i.Defs,{pattern:function(e,t,n){return this.put(new i.Pattern).update(n).attr({x:0,y:0,width:e,height:t,patternUnits:"userSpaceOnUse"})}}),i.Shape=i.invent({create:function(e){this.constructor.call(this,e)},inherit:i.Element}),i.Bare=i.invent({create:function(e,t){if(this.constructor.call(this,i.create(e)),t)for(var n in t.prototype)"function"===typeof t.prototype[n]&&(this[n]=t.prototype[n])},inherit:i.Element,extend:{words:function(e){while(this.node.hasChildNodes())this.node.removeChild(this.node.lastChild);return this.node.appendChild(t.createTextNode(e)),this}}}),i.extend(i.Parent,{element:function(e,t){return this.put(new i.Bare(e,t))}}),i.Symbol=i.invent({create:"symbol",inherit:i.Container,construct:{symbol:function(){return this.put(new i.Symbol)}}}),i.Use=i.invent({create:"use",inherit:i.Shape,extend:{element:function(e,t){return this.attr("href",(t||"")+"#"+e,i.xlink)}},construct:{use:function(e,t){return this.put(new i.Use).element(e,t)}}}),i.Rect=i.invent({create:"rect",inherit:i.Shape,construct:{rect:function(e,t){return this.put(new i.Rect).size(e,t)}}}),i.Circle=i.invent({create:"circle",inherit:i.Shape,construct:{circle:function(e){return this.put(new i.Circle).rx(new i.Number(e).divide(2)).move(0,0)}}}),i.extend(i.Circle,i.FX,{rx:function(e){return this.attr("r",e)},ry:function(e){return this.rx(e)}}),i.Ellipse=i.invent({create:"ellipse",inherit:i.Shape,construct:{ellipse:function(e,t){return this.put(new i.Ellipse).size(e,t).move(0,0)}}}),i.extend(i.Ellipse,i.Rect,i.FX,{rx:function(e){return this.attr("rx",e)},ry:function(e){return this.attr("ry",e)}}),i.extend(i.Circle,i.Ellipse,{x:function(e){return null==e?this.cx()-this.rx():this.cx(e+this.rx())},y:function(e){return null==e?this.cy()-this.ry():this.cy(e+this.ry())},cx:function(e){return null==e?this.attr("cx"):this.attr("cx",e)},cy:function(e){return null==e?this.attr("cy"):this.attr("cy",e)},width:function(e){return null==e?2*this.rx():this.rx(new i.Number(e).divide(2))},height:function(e){return null==e?2*this.ry():this.ry(new i.Number(e).divide(2))},size:function(e,t){var n=b(this,e,t);return this.rx(new i.Number(n.width).divide(2)).ry(new i.Number(n.height).divide(2))}}),i.Line=i.invent({create:"line",inherit:i.Shape,extend:{array:function(){return new i.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(e,t,n,o){return null==e?this.array():(e="undefined"!==typeof t?{x1:e,y1:t,x2:n,y2:o}:new i.PointArray(e).toLine(),this.attr(e))},move:function(e,t){return this.attr(this.array().move(e,t).toLine())},size:function(e,t){var n=b(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}},construct:{line:function(e,t,n,o){return i.Line.prototype.plot.apply(this.put(new i.Line),null!=e?[e,t,n,o]:[0,0,0,0])}}}),i.Polyline=i.invent({create:"polyline",inherit:i.Shape,construct:{polyline:function(e){return this.put(new i.Polyline).plot(e||new i.PointArray)}}}),i.Polygon=i.invent({create:"polygon",inherit:i.Shape,construct:{polygon:function(e){return this.put(new i.Polygon).plot(e||new i.PointArray)}}}),i.extend(i.Polyline,i.Polygon,{array:function(){return this._array||(this._array=new i.PointArray(this.attr("points")))},plot:function(e){return null==e?this.array():this.clear().attr("points","string"==typeof e?e:this._array=new i.PointArray(e))},clear:function(){return delete this._array,this},move:function(e,t){return this.attr("points",this.array().move(e,t))},size:function(e,t){var n=b(this,e,t);return this.attr("points",this.array().size(n.width,n.height))}}),i.extend(i.Line,i.Polyline,i.Polygon,{morphArray:i.PointArray,x:function(e){return null==e?this.bbox().x:this.move(e,this.bbox().y)},y:function(e){return null==e?this.bbox().y:this.move(this.bbox().x,e)},width:function(e){var t=this.bbox();return null==e?t.width:this.size(e,t.height)},height:function(e){var t=this.bbox();return null==e?t.height:this.size(t.width,e)}}),i.Path=i.invent({create:"path",inherit:i.Shape,extend:{morphArray:i.PathArray,array:function(){return this._array||(this._array=new i.PathArray(this.attr("d")))},plot:function(e){return null==e?this.array():this.clear().attr("d","string"==typeof e?e:this._array=new i.PathArray(e))},clear:function(){return delete this._array,this},move:function(e,t){return this.attr("d",this.array().move(e,t))},x:function(e){return null==e?this.bbox().x:this.move(e,this.bbox().y)},y:function(e){return null==e?this.bbox().y:this.move(this.bbox().x,e)},size:function(e,t){var n=b(this,e,t);return this.attr("d",this.array().size(n.width,n.height))},width:function(e){return null==e?this.bbox().width:this.size(e,this.bbox().height)},height:function(e){return null==e?this.bbox().height:this.size(this.bbox().width,e)}},construct:{path:function(e){return this.put(new i.Path).plot(e||new i.PathArray)}}}),i.Image=i.invent({create:"image",inherit:i.Shape,extend:{load:function(t){if(!t)return this;var n=this,o=new e.Image;return i.on(o,"load",(function(){i.off(o);var e=n.parent(i.Pattern);null!==e&&(0==n.width()&&0==n.height()&&n.size(o.width,o.height),e&&0==e.width()&&0==e.height()&&e.size(n.width(),n.height()),"function"===typeof n._loaded&&n._loaded.call(n,{width:o.width,height:o.height,ratio:o.width/o.height,url:t}))})),i.on(o,"error",(function(e){i.off(o),"function"===typeof n._error&&n._error.call(n,e)})),this.attr("href",o.src=this.src=t,i.xlink)},loaded:function(e){return this._loaded=e,this},error:function(e){return this._error=e,this}},construct:{image:function(e,t,n){return this.put(new i.Image).load(e).size(t||0,n||t||0)}}}),i.Text=i.invent({create:function(){this.constructor.call(this,i.create("text")),this.dom.leading=new i.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",i.defaults.attrs["font-family"])},inherit:i.Shape,extend:{x:function(e){return null==e?this.attr("x"):this.attr("x",e)},y:function(e){var t=this.attr("y"),n="number"===typeof t?t-this.bbox().y:0;return null==e?"number"===typeof t?t-n:t:this.attr("y","number"===typeof e.valueOf()?e+n:e)},cx:function(e){return null==e?this.bbox().cx:this.x(e-this.bbox().width/2)},cy:function(e){return null==e?this.bbox().cy:this.y(e-this.bbox().height/2)},text:function(e){if("undefined"===typeof e){e="";for(var t=this.node.childNodes,n=0,o=t.length;n<o;++n)0!=n&&3!=t[n].nodeType&&1==i.adopt(t[n]).dom.newLined&&(e+="\n"),e+=t[n].textContent;return e}if(this.clear().build(!0),"function"===typeof e)e.call(this,this);else{e=e.split("\n");n=0;for(var r=e.length;n<r;n++)this.tspan(e[n]).newLine()}return this.build(!1).rebuild()},size:function(e){return this.attr("font-size",e).rebuild()},leading:function(e){return null==e?this.dom.leading:(this.dom.leading=new i.Number(e),this.rebuild())},lines:function(){var e=(this.textPath&&this.textPath()||this).node,t=i.utils.map(i.utils.filterSVGElements(e.childNodes),(function(e){return i.adopt(e)}));return new i.Set(t)},rebuild:function(e){if("boolean"==typeof e&&(this._rebuild=e),this._rebuild){var t=this,n=0,o=this.dom.leading*new i.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(t.textPath()||this.attr("x",t.attr("x")),"\n"==this.text()?n+=o:(this.attr("dy",o+n),n=0))})),this.fire("rebuild")}return this},build:function(e){return this._build=!!e,this},setData:function(e){return this.dom=e,this.dom.leading=new i.Number(e.leading||1.3),this}},construct:{text:function(e){return this.put(new i.Text).text(e)},plain:function(e){return this.put(new i.Text).plain(e)}}}),i.Tspan=i.invent({create:"tspan",inherit:i.Shape,extend:{text:function(e){return null==e?this.node.textContent+(this.dom.newLined?"\n":""):("function"===typeof e?e.call(this,this):this.plain(e),this)},dx:function(e){return this.attr("dx",e)},dy:function(e){return this.attr("dy",e)},newLine:function(){var e=this.parent(i.Text);return this.dom.newLined=!0,this.dy(e.dom.leading*e.attr("font-size")).attr("x",e.x())}}}),i.extend(i.Text,i.Tspan,{plain:function(e){return!1===this._build&&this.clear(),this.node.appendChild(t.createTextNode(e)),this},tspan:function(e){var t=(this.textPath&&this.textPath()||this).node,n=new i.Tspan;return!1===this._build&&this.clear(),t.appendChild(n.node),n.text(e)},clear:function(){var e=(this.textPath&&this.textPath()||this).node;while(e.hasChildNodes())e.removeChild(e.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),i.TextPath=i.invent({create:"textPath",inherit:i.Parent,parent:i.Text,construct:{morphArray:i.PathArray,path:function(e){var t=new i.TextPath,n=this.doc().defs().path(e);while(this.node.hasChildNodes())t.node.appendChild(this.node.firstChild);return this.node.appendChild(t.node),t.attr("href","#"+n,i.xlink),this},array:function(){var e=this.track();return e?e.array():null},plot:function(e){var t=this.track(),n=null;return t&&(n=t.plot(e)),null==e?n:this},track:function(){var e=this.textPath();if(e)return e.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return i.adopt(this.node.firstChild)}}}),i.Nested=i.invent({create:function(){this.constructor.call(this,i.create("svg")),this.style("overflow","visible")},inherit:i.Container,construct:{nested:function(){return this.put(new i.Nested)}}}),i.A=i.invent({create:"a",inherit:i.Container,extend:{to:function(e){return this.attr("href",e,i.xlink)},show:function(e){return this.attr("show",e,i.xlink)},target:function(e){return this.attr("target",e)}},construct:{link:function(e){return this.put(new i.A).to(e)}}}),i.extend(i.Element,{linkTo:function(e){var t=new i.A;return"function"==typeof e?e.call(t,t):t.to(e),this.parent().put(t).put(this)}}),i.Marker=i.invent({create:"marker",inherit:i.Container,extend:{width:function(e){return this.attr("markerWidth",e)},height:function(e){return this.attr("markerHeight",e)},ref:function(e,t){return this.attr("refX",e).attr("refY",t)},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},toString:function(){return"url(#"+this.id()+")"}},construct:{marker:function(e,t,n){return this.defs().marker(e,t,n)}}}),i.extend(i.Defs,{marker:function(e,t,n){return this.put(new i.Marker).size(e,t).ref(e/2,t/2).viewbox(0,0,e,t).attr("orient","auto").update(n)}}),i.extend(i.Line,i.Polyline,i.Polygon,i.Path,{marker:function(e,t,n,o){var r=["marker"];return"all"!=e&&r.push(e),r=r.join("-"),e=arguments[1]instanceof i.Marker?arguments[1]:this.doc().marker(t,n,o),this.attr(r,e)}});var l={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(e,t){return"color"==t?e:e+"-"+t}};function c(e,t,n,o){return n+o.replace(i.regex.dots," .")}function h(e){for(var t=e.slice(0),n=t.length;n--;)Array.isArray(t[n])&&(t[n]=h(t[n]));return t}function u(e,t){return e instanceof t}function d(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}function p(e){return e.toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function f(e){return e.charAt(0).toUpperCase()+e.slice(1)}function g(e){return 4==e.length?["#",e.substring(1,2),e.substring(1,2),e.substring(2,3),e.substring(2,3),e.substring(3,4),e.substring(3,4)].join(""):e}function m(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function b(e,t,n){if(null==t||null==n){var i=e.bbox();null==t?t=i.width/i.height*n:null==n&&(n=i.height/i.width*t)}return{width:t,height:n}}function v(e,t,n){return{x:t*e.a+n*e.c+0,y:t*e.b+n*e.d+0}}function y(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}function w(e){return e instanceof i.Matrix||(e=new i.Matrix(e)),e}function _(e,t){e.cx=null==e.cx?t.bbox().cx:e.cx,e.cy=null==e.cy?t.bbox().cy:e.cy}function C(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t][0],null!=e[t][1]&&(i+=e[t][1],null!=e[t][2]&&(i+=" ",i+=e[t][2],null!=e[t][3]&&(i+=" ",i+=e[t][3],i+=" ",i+=e[t][4],null!=e[t][5]&&(i+=" ",i+=e[t][5],i+=" ",i+=e[t][6],null!=e[t][7]&&(i+=" ",i+=e[t][7])))));return i+" "}function A(t){for(var n=t.childNodes.length-1;n>=0;n--)t.childNodes[n]instanceof e.SVGElement&&A(t.childNodes[n]);return i.adopt(t).id(i.eid(t.nodeName))}function E(e){return null==e.x&&(e.x=0,e.y=0,e.width=0,e.height=0),e.w=e.width,e.h=e.height,e.x2=e.x+e.width,e.y2=e.y+e.height,e.cx=e.x+e.width/2,e.cy=e.y+e.height/2,e}function x(e){var t=(e||"").toString().match(i.regex.reference);if(t)return t[1]}function S(e){return Math.abs(e)>1e-37?e:0}["fill","stroke"].forEach((function(e){var t,n={};n[e]=function(n){if("undefined"==typeof n)return this;if("string"==typeof n||i.Color.isRgb(n)||n&&"function"===typeof n.fill)this.attr(e,n);else for(t=l[e].length-1;t>=0;t--)null!=n[l[e][t]]&&this.attr(l.prefix(e,l[e][t]),n[l[e][t]]);return this},i.extend(i.Element,i.FX,n)})),i.extend(i.Element,i.FX,{rotate:function(e,t,n){return this.transform({rotation:e,cx:t,cy:n})},skew:function(e,t,n,i){return 1==arguments.length||3==arguments.length?this.transform({skew:e,cx:t,cy:n}):this.transform({skewX:e,skewY:t,cx:n,cy:i})},scale:function(e,t,n,i){return 1==arguments.length||3==arguments.length?this.transform({scale:e,cx:t,cy:n}):this.transform({scaleX:e,scaleY:t,cx:n,cy:i})},translate:function(e,t){return this.transform({x:e,y:t})},flip:function(e,t){return t="number"==typeof e?e:t,this.transform({flip:e||"both",offset:t})},matrix:function(e){return this.attr("transform",new i.Matrix(6==arguments.length?[].slice.call(arguments):e))},opacity:function(e){return this.attr("opacity",e)},dx:function(e){return this.x(new i.Number(e).plus(this instanceof i.FX?0:this.x()),!0)},dy:function(e){return this.y(new i.Number(e).plus(this instanceof i.FX?0:this.y()),!0)},dmove:function(e,t){return this.dx(e).dy(t)}}),i.extend(i.Rect,i.Ellipse,i.Circle,i.Gradient,i.FX,{radius:function(e,t){var n=(this._target||this).type;return"radial"==n||"circle"==n?this.attr("r",new i.Number(e)):this.rx(e).ry(null==t?e:t)}}),i.extend(i.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(e){return this.node.getPointAtLength(e)}}),i.extend(i.Parent,i.Text,i.Tspan,i.FX,{font:function(e,t){if("object"==typeof e)for(t in e)this.font(t,e[t]);return"leading"==e?this.leading(t):"anchor"==e?this.attr("text-anchor",t):"size"==e||"family"==e||"weight"==e||"stretch"==e||"variant"==e||"style"==e?this.attr("font-"+e,t):this.attr(e,t)}}),i.Set=i.invent({create:function(e){e instanceof i.Set?this.members=e.members.slice():Array.isArray(e)?this.members=e:this.clear()},extend:{add:function(){var e,t,n=[].slice.call(arguments);for(e=0,t=n.length;e<t;e++)this.members.push(n[e]);return this},remove:function(e){var t=this.index(e);return t>-1&&this.members.splice(t,1),this},each:function(e){for(var t=0,n=this.members.length;t<n;t++)e.apply(this.members[t],[t,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(e){return this.index(e)>=0},index:function(e){return this.members.indexOf(e)},get:function(e){return this.members[e]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members},bbox:function(){if(0==this.members.length)return new i.RBox;var e=this.members[0].rbox(this.members[0].doc());return this.each((function(){e=e.merge(this.rbox(this.doc()))})),e}},construct:{set:function(e){return new i.Set(e)}}}),i.FX.Set=i.invent({create:function(e){this.set=e}}),i.Set.inherit=function(){var e=[];for(var t in i.Shape.prototype)"function"==typeof i.Shape.prototype[t]&&"function"!=typeof i.Set.prototype[t]&&e.push(t);for(var t in e.forEach((function(e){i.Set.prototype[e]=function(){for(var t=0,n=this.members.length;t<n;t++)this.members[t]&&"function"==typeof this.members[t][e]&&this.members[t][e].apply(this.members[t],arguments);return"animate"==e?this.fx||(this.fx=new i.FX.Set(this)):this}})),e=[],i.FX.prototype)"function"==typeof i.FX.prototype[t]&&"function"!=typeof i.FX.Set.prototype[t]&&e.push(t);e.forEach((function(e){i.FX.Set.prototype[e]=function(){for(var t=0,n=this.set.members.length;t<n;t++)this.set.members[t].fx[e].apply(this.set.members[t].fx,arguments);return this}}))},i.extend(i.Element,{data:function(e,t,n){if("object"==typeof e)for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(i){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"===typeof t||"number"===typeof t?t:JSON.stringify(t));return this}}),i.extend(i.Element,{remember:function(e,t){if("object"==typeof arguments[0])for(var t in e)this.remember(t,e[t]);else{if(1==arguments.length)return this.memory()[e];this.memory()[e]=t}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this},memory:function(){return this._memory||(this._memory={})}}),i.get=function(e){var n=t.getElementById(x(e)||e);return i.adopt(n)},i.select=function(e,n){return new i.Set(i.utils.map((n||t).querySelectorAll(e),(function(e){return i.adopt(e)})))},i.extend(i.Parent,{select:function(e){return i.select(e,this.node)}});var k="abcdef".split("");if("function"!==typeof e.CustomEvent){var D=function(e,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var i=t.createEvent("CustomEvent");return i.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),i};D.prototype=e.Event.prototype,i.CustomEvent=D}else i.CustomEvent=e.CustomEvent;return function(t){for(var n=0,i=["moz","webkit"],o=0;o<i.length&&!e.requestAnimationFrame;++o)t.requestAnimationFrame=t[i[o]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[i[o]+"CancelAnimationFrame"]||t[i[o]+"CancelRequestAnimationFrame"];t.requestAnimationFrame=t.requestAnimationFrame||function(e){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=t.setTimeout((function(){e(i+o)}),o);return n=i+o,r},t.cancelAnimationFrame=t.cancelAnimationFrame||t.clearTimeout}(e),i}))},d27b:function(e,t,n){var i=n("2273"),o=n("e244");e.exports=/ipad|iphone|ipod/i.test(i)&&void 0!==o.Pebble},d30c:function(e,t,n){"use strict";var i=n("6043"),o=n("b896"),r=n("1810"),s=n("55ab"),a=r("species");e.exports=function(e){var t=i(e),n=o.f;s&&t&&!t[a]&&n(t,a,{configurable:!0,get:function(){return this}})}},d31d:function(e,t,n){"use strict";var i,o,r,s,a=n("83ec"),l=n("f0db"),c=n("e244"),h=n("6043"),u=n("58d1"),d=n("fc9a"),p=n("7d86"),f=n("6161"),g=n("13a8"),m=n("63ef"),b=n("d30c"),v=n("b623"),y=n("9564"),w=n("eee7"),_=n("d6e4"),C=n("9550"),A=n("d75f"),E=n("59cf"),x=n("a55b"),S=n("59e5").set,k=n("f652"),D=n("3073"),L=n("4fe1"),I=n("fc01"),N=n("53ff"),M=n("35d6"),B=n("a056"),T=n("1810"),O=n("cbc4"),R=n("f79e"),P=n("2c21"),F=T("species"),j="Promise",z=M.get,V=M.set,Q=M.getterFor(j),W=d&&d.prototype,H=d,U=W,Y=c.TypeError,G=c.document,K=c.process,q=I.f,J=q,$=!!(G&&G.createEvent&&c.dispatchEvent),X=y(c.PromiseRejectionEvent),Z="unhandledrejection",ee="rejectionhandled",te=0,ne=1,ie=2,oe=1,re=2,se=!1,ae=B(j,(function(){var e=C(H),t=e!==String(H);if(!t&&66===P)return!0;if(l&&!U["finally"])return!0;if(P>=51&&/native code/.test(e))return!1;var n=new H((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))},o=n.constructor={};return o[F]=i,se=n.then((function(){}))instanceof i,!se||!t&&O&&!X})),le=ae||!E((function(e){H.all(e)["catch"]((function(){}))})),ce=function(e){var t;return!(!w(e)||!y(t=e.then))&&t},he=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;k((function(){var i=e.value,o=e.state==ne,r=0;while(n.length>r){var s,a,l,c=n[r++],h=o?c.ok:c.fail,d=c.resolve,p=c.reject,f=c.domain;try{h?(o||(e.rejection===re&&fe(e),e.rejection=oe),!0===h?s=i:(f&&f.enter(),s=h(i),f&&(f.exit(),l=!0)),s===c.promise?p(Y("Promise-chain cycle")):(a=ce(s))?u(a,s,d,p):d(s)):p(i)}catch(g){f&&!l&&f.exit(),p(g)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&de(e)}))}},ue=function(e,t,n){var i,o;$?(i=G.createEvent("Event"),i.promise=t,i.reason=n,i.initEvent(e,!1,!0),c.dispatchEvent(i)):i={promise:t,reason:n},!X&&(o=c["on"+e])?o(i):e===Z&&L("Unhandled promise rejection",n)},de=function(e){u(S,c,(function(){var t,n=e.facade,i=e.value,o=pe(e);if(o&&(t=N((function(){R?K.emit("unhandledRejection",i,n):ue(Z,n,i)})),e.rejection=R||pe(e)?re:oe,t.error))throw t.value}))},pe=function(e){return e.rejection!==oe&&!e.parent},fe=function(e){u(S,c,(function(){var t=e.facade;R?K.emit("rejectionHandled",t):ue(ee,t,e.value)}))},ge=function(e,t,n){return function(i){e(t,i,n)}},me=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=ie,he(e,!0))},be=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Y("Promise can't be resolved itself");var i=ce(t);i?k((function(){var n={done:!1};try{u(i,t,ge(be,n,e),ge(me,n,e))}catch(o){me(n,o,e)}})):(e.value=t,e.state=ne,he(e,!1))}catch(o){me({done:!1},o,e)}}};if(ae&&(H=function(e){_(this,U),v(e),u(i,this);var t=z(this);try{e(ge(be,t),ge(me,t))}catch(n){me(t,n)}},U=H.prototype,i=function(e){V(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:te,value:void 0})},i.prototype=f(U,{then:function(e,t){var n=Q(this),i=n.reactions,o=q(x(this,H));return o.ok=!y(e)||e,o.fail=y(t)&&t,o.domain=R?K.domain:void 0,n.parent=!0,i[i.length]=o,n.state!=te&&he(n,!1),o.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new i,t=z(e);this.promise=e,this.resolve=ge(be,t),this.reject=ge(me,t)},I.f=q=function(e){return e===H||e===r?new o(e):J(e)},!l&&y(d)&&W!==Object.prototype)){s=W.then,se||(p(W,"then",(function(e,t){var n=this;return new H((function(e,t){u(s,n,e,t)})).then(e,t)}),{unsafe:!0}),p(W,"catch",U["catch"],{unsafe:!0}));try{delete W.constructor}catch(ve){}g&&g(W,U)}a({global:!0,wrap:!0,forced:ae},{Promise:H}),m(H,j,!1,!0),b(j),r=h(j),a({target:j,stat:!0,forced:ae},{reject:function(e){var t=q(this);return u(t.reject,void 0,e),t.promise}}),a({target:j,stat:!0,forced:l||ae},{resolve:function(e){return D(l&&this===r?H:this,e)}}),a({target:j,stat:!0,forced:le},{all:function(e){var t=this,n=q(t),i=n.resolve,o=n.reject,r=N((function(){var n=v(t.resolve),r=[],s=0,a=1;A(e,(function(e){var l=s++,c=!1;a++,u(n,t,e).then((function(e){c||(c=!0,r[l]=e,--a||i(r))}),o)})),--a||i(r)}));return r.error&&o(r.value),n.promise},race:function(e){var t=this,n=q(t),i=n.reject,o=N((function(){var o=v(t.resolve);A(e,(function(e){u(o,t,e).then(n.resolve,i)}))}));return o.error&&i(o.value),n.promise}})},d362:function(e,t,n){"use strict";var i=n("55ab"),o=n("6f9e"),r=n("58d1"),s=n("ac97"),a=n("3e1a"),l=n("0ef1"),c=n("11b0"),h=n("c673"),u=n("b4fd"),d=Object.assign,p=Object.defineProperty,f=o([].concat);e.exports=!d||s((function(){if(i&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||a(d({},t)).join("")!=o}))?function(e,t){var n=h(e),o=arguments.length,s=1,d=l.f,p=c.f;while(o>s){var g,m=u(arguments[s++]),b=d?f(a(m),d(m)):a(m),v=b.length,y=0;while(v>y)g=b[y++],i&&!r(p,m,g)||(n[g]=m[g])}return n}:d},d4c0:function(e,t,n){var i=n("83ec"),o=n("cb29"),r=n("6e10");i({target:"Array",proto:!0},{fill:o}),r("fill")},d53b:function(e,t,n){var i=n("e244"),o=n("6965"),r=n("9564"),s=n("c401"),a=n("1810"),l=a("toStringTag"),c=i.Object,h="Arguments"==s(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(n){}};e.exports=o?s:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=u(t=c(e),l))?n:h?s(t):"Object"==(i=s(t))&&r(t.callee)?"Arguments":i}},d554:function(e,t){e.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},d557:function(e,t,n){var i=n("312a");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("3cf09572",i,!0,{sourceMap:!1,shadowMode:!1})},d6e4:function(e,t,n){var i=n("e244"),o=n("81e5"),r=i.TypeError;e.exports=function(e,t){if(o(t,e))return e;throw r("Incorrect invocation")}},d6ed:function(e,t,n){var i=n("6f9e"),o=n("b623"),r=i(i.bind);e.exports=function(e,t){return o(e),void 0===t?e:r?r(e,t):function(){return e.apply(t,arguments)}}},d73d:function(e,t,n){var i=n("ac97"),o=n("e244"),r=o.RegExp;e.exports=i((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},d75f:function(e,t,n){var i=n("e244"),o=n("d6ed"),r=n("58d1"),s=n("fbcf"),a=n("8dcc"),l=n("a53d"),c=n("7c08"),h=n("81e5"),u=n("c61c"),d=n("6023"),p=n("dc8c"),f=i.TypeError,g=function(e,t){this.stopped=e,this.result=t},m=g.prototype;e.exports=function(e,t,n){var i,b,v,y,w,_,C,A=n&&n.that,E=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_ITERATOR),S=!(!n||!n.INTERRUPTED),k=o(t,A),D=function(e){return i&&p(i,"normal",e),new g(!0,e)},L=function(e){return E?(s(e),S?k(e[0],e[1],D):k(e[0],e[1])):S?k(e,D):k(e)};if(x)i=e;else{if(b=d(e),!b)throw f(a(e)+" is not iterable");if(l(b)){for(v=0,y=c(e);y>v;v++)if(w=L(e[v]),w&&h(m,w))return w;return new g(!1)}i=u(e,b)}_=i.next;while(!(C=r(_,i)).done){try{w=L(C.value)}catch(I){p(i,"throw",I)}if("object"==typeof w&&w&&h(m,w))return w}return new g(!1)}},d85b:function(e,t){e.exports={}},d927:function(e,t,n){"use strict";var i=n("83ec"),o=n("e244"),r=n("3352"),s=n("409e"),a=n("7c08"),l=n("c673"),c=n("f152"),h=n("acd4"),u=n("72d4"),d=u("splice"),p=o.TypeError,f=Math.max,g=Math.min,m=9007199254740991,b="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var n,i,o,u,d,v,y=l(this),w=a(y),_=r(e,w),C=arguments.length;if(0===C?n=i=0:1===C?(n=0,i=w-_):(n=C-2,i=g(f(s(t),0),w-_)),w+n-i>m)throw p(b);for(o=c(y,i),u=0;u<i;u++)d=_+u,d in y&&h(o,u,y[d]);if(o.length=i,n<i){for(u=_;u<w-i;u++)d=u+i,v=u+n,d in y?y[v]=y[d]:delete y[v];for(u=w;u>w-i+n;u--)delete y[u-1]}else if(n>i)for(u=w-i;u>_;u--)d=u+i-1,v=u+n-1,d in y?y[v]=y[d]:delete y[v];for(u=0;u<n;u++)y[u+_]=arguments[u+2];return y.length=w-i+n,o}})},da79:function(e,t,n){var i=n("53c2"),o=n("a0c9"),r=n("1854"),s=n("f37b"),a=n("fb3d"),l=n("bc19"),c=n("f9ba"),h=n("caac");t=i(!1);var u=o(r),d=o(s,{hash:"?#iefix&v=4.7.0"}),p=o(a),f=o(l),g=o(c),m=o(h,{hash:"#fontawesomeregular"});t.push([e.i,"/*!\n * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome\n * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */@font-face{font-family:FontAwesome;src:url("+u+");src:url("+d+') format("embedded-opentype"),url('+p+') format("woff2"),url('+f+') format("woff"),url('+g+') format("truetype"),url('+m+') format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\\f000"}.fa-music:before{content:"\\f001"}.fa-search:before{content:"\\f002"}.fa-envelope-o:before{content:"\\f003"}.fa-heart:before{content:"\\f004"}.fa-star:before{content:"\\f005"}.fa-star-o:before{content:"\\f006"}.fa-user:before{content:"\\f007"}.fa-film:before{content:"\\f008"}.fa-th-large:before{content:"\\f009"}.fa-th:before{content:"\\f00a"}.fa-th-list:before{content:"\\f00b"}.fa-check:before{content:"\\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\\f00d"}.fa-search-plus:before{content:"\\f00e"}.fa-search-minus:before{content:"\\f010"}.fa-power-off:before{content:"\\f011"}.fa-signal:before{content:"\\f012"}.fa-cog:before,.fa-gear:before{content:"\\f013"}.fa-trash-o:before{content:"\\f014"}.fa-home:before{content:"\\f015"}.fa-file-o:before{content:"\\f016"}.fa-clock-o:before{content:"\\f017"}.fa-road:before{content:"\\f018"}.fa-download:before{content:"\\f019"}.fa-arrow-circle-o-down:before{content:"\\f01a"}.fa-arrow-circle-o-up:before{content:"\\f01b"}.fa-inbox:before{content:"\\f01c"}.fa-play-circle-o:before{content:"\\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\\f01e"}.fa-refresh:before{content:"\\f021"}.fa-list-alt:before{content:"\\f022"}.fa-lock:before{content:"\\f023"}.fa-flag:before{content:"\\f024"}.fa-headphones:before{content:"\\f025"}.fa-volume-off:before{content:"\\f026"}.fa-volume-down:before{content:"\\f027"}.fa-volume-up:before{content:"\\f028"}.fa-qrcode:before{content:"\\f029"}.fa-barcode:before{content:"\\f02a"}.fa-tag:before{content:"\\f02b"}.fa-tags:before{content:"\\f02c"}.fa-book:before{content:"\\f02d"}.fa-bookmark:before{content:"\\f02e"}.fa-print:before{content:"\\f02f"}.fa-camera:before{content:"\\f030"}.fa-font:before{content:"\\f031"}.fa-bold:before{content:"\\f032"}.fa-italic:before{content:"\\f033"}.fa-text-height:before{content:"\\f034"}.fa-text-width:before{content:"\\f035"}.fa-align-left:before{content:"\\f036"}.fa-align-center:before{content:"\\f037"}.fa-align-right:before{content:"\\f038"}.fa-align-justify:before{content:"\\f039"}.fa-list:before{content:"\\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\\f03b"}.fa-indent:before{content:"\\f03c"}.fa-video-camera:before{content:"\\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\\f03e"}.fa-pencil:before{content:"\\f040"}.fa-map-marker:before{content:"\\f041"}.fa-adjust:before{content:"\\f042"}.fa-tint:before{content:"\\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\\f044"}.fa-share-square-o:before{content:"\\f045"}.fa-check-square-o:before{content:"\\f046"}.fa-arrows:before{content:"\\f047"}.fa-step-backward:before{content:"\\f048"}.fa-fast-backward:before{content:"\\f049"}.fa-backward:before{content:"\\f04a"}.fa-play:before{content:"\\f04b"}.fa-pause:before{content:"\\f04c"}.fa-stop:before{content:"\\f04d"}.fa-forward:before{content:"\\f04e"}.fa-fast-forward:before{content:"\\f050"}.fa-step-forward:before{content:"\\f051"}.fa-eject:before{content:"\\f052"}.fa-chevron-left:before{content:"\\f053"}.fa-chevron-right:before{content:"\\f054"}.fa-plus-circle:before{content:"\\f055"}.fa-minus-circle:before{content:"\\f056"}.fa-times-circle:before{content:"\\f057"}.fa-check-circle:before{content:"\\f058"}.fa-question-circle:before{content:"\\f059"}.fa-info-circle:before{content:"\\f05a"}.fa-crosshairs:before{content:"\\f05b"}.fa-times-circle-o:before{content:"\\f05c"}.fa-check-circle-o:before{content:"\\f05d"}.fa-ban:before{content:"\\f05e"}.fa-arrow-left:before{content:"\\f060"}.fa-arrow-right:before{content:"\\f061"}.fa-arrow-up:before{content:"\\f062"}.fa-arrow-down:before{content:"\\f063"}.fa-mail-forward:before,.fa-share:before{content:"\\f064"}.fa-expand:before{content:"\\f065"}.fa-compress:before{content:"\\f066"}.fa-plus:before{content:"\\f067"}.fa-minus:before{content:"\\f068"}.fa-asterisk:before{content:"\\f069"}.fa-exclamation-circle:before{content:"\\f06a"}.fa-gift:before{content:"\\f06b"}.fa-leaf:before{content:"\\f06c"}.fa-fire:before{content:"\\f06d"}.fa-eye:before{content:"\\f06e"}.fa-eye-slash:before{content:"\\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\\f071"}.fa-plane:before{content:"\\f072"}.fa-calendar:before{content:"\\f073"}.fa-random:before{content:"\\f074"}.fa-comment:before{content:"\\f075"}.fa-magnet:before{content:"\\f076"}.fa-chevron-up:before{content:"\\f077"}.fa-chevron-down:before{content:"\\f078"}.fa-retweet:before{content:"\\f079"}.fa-shopping-cart:before{content:"\\f07a"}.fa-folder:before{content:"\\f07b"}.fa-folder-open:before{content:"\\f07c"}.fa-arrows-v:before{content:"\\f07d"}.fa-arrows-h:before{content:"\\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\\f080"}.fa-twitter-square:before{content:"\\f081"}.fa-facebook-square:before{content:"\\f082"}.fa-camera-retro:before{content:"\\f083"}.fa-key:before{content:"\\f084"}.fa-cogs:before,.fa-gears:before{content:"\\f085"}.fa-comments:before{content:"\\f086"}.fa-thumbs-o-up:before{content:"\\f087"}.fa-thumbs-o-down:before{content:"\\f088"}.fa-star-half:before{content:"\\f089"}.fa-heart-o:before{content:"\\f08a"}.fa-sign-out:before{content:"\\f08b"}.fa-linkedin-square:before{content:"\\f08c"}.fa-thumb-tack:before{content:"\\f08d"}.fa-external-link:before{content:"\\f08e"}.fa-sign-in:before{content:"\\f090"}.fa-trophy:before{content:"\\f091"}.fa-github-square:before{content:"\\f092"}.fa-upload:before{content:"\\f093"}.fa-lemon-o:before{content:"\\f094"}.fa-phone:before{content:"\\f095"}.fa-square-o:before{content:"\\f096"}.fa-bookmark-o:before{content:"\\f097"}.fa-phone-square:before{content:"\\f098"}.fa-twitter:before{content:"\\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\\f09a"}.fa-github:before{content:"\\f09b"}.fa-unlock:before{content:"\\f09c"}.fa-credit-card:before{content:"\\f09d"}.fa-feed:before,.fa-rss:before{content:"\\f09e"}.fa-hdd-o:before{content:"\\f0a0"}.fa-bullhorn:before{content:"\\f0a1"}.fa-bell:before{content:"\\f0f3"}.fa-certificate:before{content:"\\f0a3"}.fa-hand-o-right:before{content:"\\f0a4"}.fa-hand-o-left:before{content:"\\f0a5"}.fa-hand-o-up:before{content:"\\f0a6"}.fa-hand-o-down:before{content:"\\f0a7"}.fa-arrow-circle-left:before{content:"\\f0a8"}.fa-arrow-circle-right:before{content:"\\f0a9"}.fa-arrow-circle-up:before{content:"\\f0aa"}.fa-arrow-circle-down:before{content:"\\f0ab"}.fa-globe:before{content:"\\f0ac"}.fa-wrench:before{content:"\\f0ad"}.fa-tasks:before{content:"\\f0ae"}.fa-filter:before{content:"\\f0b0"}.fa-briefcase:before{content:"\\f0b1"}.fa-arrows-alt:before{content:"\\f0b2"}.fa-group:before,.fa-users:before{content:"\\f0c0"}.fa-chain:before,.fa-link:before{content:"\\f0c1"}.fa-cloud:before{content:"\\f0c2"}.fa-flask:before{content:"\\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\\f0c5"}.fa-paperclip:before{content:"\\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\\f0c7"}.fa-square:before{content:"\\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\\f0c9"}.fa-list-ul:before{content:"\\f0ca"}.fa-list-ol:before{content:"\\f0cb"}.fa-strikethrough:before{content:"\\f0cc"}.fa-underline:before{content:"\\f0cd"}.fa-table:before{content:"\\f0ce"}.fa-magic:before{content:"\\f0d0"}.fa-truck:before{content:"\\f0d1"}.fa-pinterest:before{content:"\\f0d2"}.fa-pinterest-square:before{content:"\\f0d3"}.fa-google-plus-square:before{content:"\\f0d4"}.fa-google-plus:before{content:"\\f0d5"}.fa-money:before{content:"\\f0d6"}.fa-caret-down:before{content:"\\f0d7"}.fa-caret-up:before{content:"\\f0d8"}.fa-caret-left:before{content:"\\f0d9"}.fa-caret-right:before{content:"\\f0da"}.fa-columns:before{content:"\\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\\f0de"}.fa-envelope:before{content:"\\f0e0"}.fa-linkedin:before{content:"\\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\\f0e4"}.fa-comment-o:before{content:"\\f0e5"}.fa-comments-o:before{content:"\\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\\f0e7"}.fa-sitemap:before{content:"\\f0e8"}.fa-umbrella:before{content:"\\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\\f0ea"}.fa-lightbulb-o:before{content:"\\f0eb"}.fa-exchange:before{content:"\\f0ec"}.fa-cloud-download:before{content:"\\f0ed"}.fa-cloud-upload:before{content:"\\f0ee"}.fa-user-md:before{content:"\\f0f0"}.fa-stethoscope:before{content:"\\f0f1"}.fa-suitcase:before{content:"\\f0f2"}.fa-bell-o:before{content:"\\f0a2"}.fa-coffee:before{content:"\\f0f4"}.fa-cutlery:before{content:"\\f0f5"}.fa-file-text-o:before{content:"\\f0f6"}.fa-building-o:before{content:"\\f0f7"}.fa-hospital-o:before{content:"\\f0f8"}.fa-ambulance:before{content:"\\f0f9"}.fa-medkit:before{content:"\\f0fa"}.fa-fighter-jet:before{content:"\\f0fb"}.fa-beer:before{content:"\\f0fc"}.fa-h-square:before{content:"\\f0fd"}.fa-plus-square:before{content:"\\f0fe"}.fa-angle-double-left:before{content:"\\f100"}.fa-angle-double-right:before{content:"\\f101"}.fa-angle-double-up:before{content:"\\f102"}.fa-angle-double-down:before{content:"\\f103"}.fa-angle-left:before{content:"\\f104"}.fa-angle-right:before{content:"\\f105"}.fa-angle-up:before{content:"\\f106"}.fa-angle-down:before{content:"\\f107"}.fa-desktop:before{content:"\\f108"}.fa-laptop:before{content:"\\f109"}.fa-tablet:before{content:"\\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\\f10b"}.fa-circle-o:before{content:"\\f10c"}.fa-quote-left:before{content:"\\f10d"}.fa-quote-right:before{content:"\\f10e"}.fa-spinner:before{content:"\\f110"}.fa-circle:before{content:"\\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\\f112"}.fa-github-alt:before{content:"\\f113"}.fa-folder-o:before{content:"\\f114"}.fa-folder-open-o:before{content:"\\f115"}.fa-smile-o:before{content:"\\f118"}.fa-frown-o:before{content:"\\f119"}.fa-meh-o:before{content:"\\f11a"}.fa-gamepad:before{content:"\\f11b"}.fa-keyboard-o:before{content:"\\f11c"}.fa-flag-o:before{content:"\\f11d"}.fa-flag-checkered:before{content:"\\f11e"}.fa-terminal:before{content:"\\f120"}.fa-code:before{content:"\\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\\f123"}.fa-location-arrow:before{content:"\\f124"}.fa-crop:before{content:"\\f125"}.fa-code-fork:before{content:"\\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\\f127"}.fa-question:before{content:"\\f128"}.fa-info:before{content:"\\f129"}.fa-exclamation:before{content:"\\f12a"}.fa-superscript:before{content:"\\f12b"}.fa-subscript:before{content:"\\f12c"}.fa-eraser:before{content:"\\f12d"}.fa-puzzle-piece:before{content:"\\f12e"}.fa-microphone:before{content:"\\f130"}.fa-microphone-slash:before{content:"\\f131"}.fa-shield:before{content:"\\f132"}.fa-calendar-o:before{content:"\\f133"}.fa-fire-extinguisher:before{content:"\\f134"}.fa-rocket:before{content:"\\f135"}.fa-maxcdn:before{content:"\\f136"}.fa-chevron-circle-left:before{content:"\\f137"}.fa-chevron-circle-right:before{content:"\\f138"}.fa-chevron-circle-up:before{content:"\\f139"}.fa-chevron-circle-down:before{content:"\\f13a"}.fa-html5:before{content:"\\f13b"}.fa-css3:before{content:"\\f13c"}.fa-anchor:before{content:"\\f13d"}.fa-unlock-alt:before{content:"\\f13e"}.fa-bullseye:before{content:"\\f140"}.fa-ellipsis-h:before{content:"\\f141"}.fa-ellipsis-v:before{content:"\\f142"}.fa-rss-square:before{content:"\\f143"}.fa-play-circle:before{content:"\\f144"}.fa-ticket:before{content:"\\f145"}.fa-minus-square:before{content:"\\f146"}.fa-minus-square-o:before{content:"\\f147"}.fa-level-up:before{content:"\\f148"}.fa-level-down:before{content:"\\f149"}.fa-check-square:before{content:"\\f14a"}.fa-pencil-square:before{content:"\\f14b"}.fa-external-link-square:before{content:"\\f14c"}.fa-share-square:before{content:"\\f14d"}.fa-compass:before{content:"\\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\\f152"}.fa-eur:before,.fa-euro:before{content:"\\f153"}.fa-gbp:before{content:"\\f154"}.fa-dollar:before,.fa-usd:before{content:"\\f155"}.fa-inr:before,.fa-rupee:before{content:"\\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\\f158"}.fa-krw:before,.fa-won:before{content:"\\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\\f15a"}.fa-file:before{content:"\\f15b"}.fa-file-text:before{content:"\\f15c"}.fa-sort-alpha-asc:before{content:"\\f15d"}.fa-sort-alpha-desc:before{content:"\\f15e"}.fa-sort-amount-asc:before{content:"\\f160"}.fa-sort-amount-desc:before{content:"\\f161"}.fa-sort-numeric-asc:before{content:"\\f162"}.fa-sort-numeric-desc:before{content:"\\f163"}.fa-thumbs-up:before{content:"\\f164"}.fa-thumbs-down:before{content:"\\f165"}.fa-youtube-square:before{content:"\\f166"}.fa-youtube:before{content:"\\f167"}.fa-xing:before{content:"\\f168"}.fa-xing-square:before{content:"\\f169"}.fa-youtube-play:before{content:"\\f16a"}.fa-dropbox:before{content:"\\f16b"}.fa-stack-overflow:before{content:"\\f16c"}.fa-instagram:before{content:"\\f16d"}.fa-flickr:before{content:"\\f16e"}.fa-adn:before{content:"\\f170"}.fa-bitbucket:before{content:"\\f171"}.fa-bitbucket-square:before{content:"\\f172"}.fa-tumblr:before{content:"\\f173"}.fa-tumblr-square:before{content:"\\f174"}.fa-long-arrow-down:before{content:"\\f175"}.fa-long-arrow-up:before{content:"\\f176"}.fa-long-arrow-left:before{content:"\\f177"}.fa-long-arrow-right:before{content:"\\f178"}.fa-apple:before{content:"\\f179"}.fa-windows:before{content:"\\f17a"}.fa-android:before{content:"\\f17b"}.fa-linux:before{content:"\\f17c"}.fa-dribbble:before{content:"\\f17d"}.fa-skype:before{content:"\\f17e"}.fa-foursquare:before{content:"\\f180"}.fa-trello:before{content:"\\f181"}.fa-female:before{content:"\\f182"}.fa-male:before{content:"\\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\\f184"}.fa-sun-o:before{content:"\\f185"}.fa-moon-o:before{content:"\\f186"}.fa-archive:before{content:"\\f187"}.fa-bug:before{content:"\\f188"}.fa-vk:before{content:"\\f189"}.fa-weibo:before{content:"\\f18a"}.fa-renren:before{content:"\\f18b"}.fa-pagelines:before{content:"\\f18c"}.fa-stack-exchange:before{content:"\\f18d"}.fa-arrow-circle-o-right:before{content:"\\f18e"}.fa-arrow-circle-o-left:before{content:"\\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\\f191"}.fa-dot-circle-o:before{content:"\\f192"}.fa-wheelchair:before{content:"\\f193"}.fa-vimeo-square:before{content:"\\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\\f195"}.fa-plus-square-o:before{content:"\\f196"}.fa-space-shuttle:before{content:"\\f197"}.fa-slack:before{content:"\\f198"}.fa-envelope-square:before{content:"\\f199"}.fa-wordpress:before{content:"\\f19a"}.fa-openid:before{content:"\\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\\f19d"}.fa-yahoo:before{content:"\\f19e"}.fa-google:before{content:"\\f1a0"}.fa-reddit:before{content:"\\f1a1"}.fa-reddit-square:before{content:"\\f1a2"}.fa-stumbleupon-circle:before{content:"\\f1a3"}.fa-stumbleupon:before{content:"\\f1a4"}.fa-delicious:before{content:"\\f1a5"}.fa-digg:before{content:"\\f1a6"}.fa-pied-piper-pp:before{content:"\\f1a7"}.fa-pied-piper-alt:before{content:"\\f1a8"}.fa-drupal:before{content:"\\f1a9"}.fa-joomla:before{content:"\\f1aa"}.fa-language:before{content:"\\f1ab"}.fa-fax:before{content:"\\f1ac"}.fa-building:before{content:"\\f1ad"}.fa-child:before{content:"\\f1ae"}.fa-paw:before{content:"\\f1b0"}.fa-spoon:before{content:"\\f1b1"}.fa-cube:before{content:"\\f1b2"}.fa-cubes:before{content:"\\f1b3"}.fa-behance:before{content:"\\f1b4"}.fa-behance-square:before{content:"\\f1b5"}.fa-steam:before{content:"\\f1b6"}.fa-steam-square:before{content:"\\f1b7"}.fa-recycle:before{content:"\\f1b8"}.fa-automobile:before,.fa-car:before{content:"\\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\\f1ba"}.fa-tree:before{content:"\\f1bb"}.fa-spotify:before{content:"\\f1bc"}.fa-deviantart:before{content:"\\f1bd"}.fa-soundcloud:before{content:"\\f1be"}.fa-database:before{content:"\\f1c0"}.fa-file-pdf-o:before{content:"\\f1c1"}.fa-file-word-o:before{content:"\\f1c2"}.fa-file-excel-o:before{content:"\\f1c3"}.fa-file-powerpoint-o:before{content:"\\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\\f1c8"}.fa-file-code-o:before{content:"\\f1c9"}.fa-vine:before{content:"\\f1ca"}.fa-codepen:before{content:"\\f1cb"}.fa-jsfiddle:before{content:"\\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\\f1cd"}.fa-circle-o-notch:before{content:"\\f1ce"}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:"\\f1d0"}.fa-empire:before,.fa-ge:before{content:"\\f1d1"}.fa-git-square:before{content:"\\f1d2"}.fa-git:before{content:"\\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\\f1d4"}.fa-tencent-weibo:before{content:"\\f1d5"}.fa-qq:before{content:"\\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\\f1d9"}.fa-history:before{content:"\\f1da"}.fa-circle-thin:before{content:"\\f1db"}.fa-header:before{content:"\\f1dc"}.fa-paragraph:before{content:"\\f1dd"}.fa-sliders:before{content:"\\f1de"}.fa-share-alt:before{content:"\\f1e0"}.fa-share-alt-square:before{content:"\\f1e1"}.fa-bomb:before{content:"\\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\\f1e3"}.fa-tty:before{content:"\\f1e4"}.fa-binoculars:before{content:"\\f1e5"}.fa-plug:before{content:"\\f1e6"}.fa-slideshare:before{content:"\\f1e7"}.fa-twitch:before{content:"\\f1e8"}.fa-yelp:before{content:"\\f1e9"}.fa-newspaper-o:before{content:"\\f1ea"}.fa-wifi:before{content:"\\f1eb"}.fa-calculator:before{content:"\\f1ec"}.fa-paypal:before{content:"\\f1ed"}.fa-google-wallet:before{content:"\\f1ee"}.fa-cc-visa:before{content:"\\f1f0"}.fa-cc-mastercard:before{content:"\\f1f1"}.fa-cc-discover:before{content:"\\f1f2"}.fa-cc-amex:before{content:"\\f1f3"}.fa-cc-paypal:before{content:"\\f1f4"}.fa-cc-stripe:before{content:"\\f1f5"}.fa-bell-slash:before{content:"\\f1f6"}.fa-bell-slash-o:before{content:"\\f1f7"}.fa-trash:before{content:"\\f1f8"}.fa-copyright:before{content:"\\f1f9"}.fa-at:before{content:"\\f1fa"}.fa-eyedropper:before{content:"\\f1fb"}.fa-paint-brush:before{content:"\\f1fc"}.fa-birthday-cake:before{content:"\\f1fd"}.fa-area-chart:before{content:"\\f1fe"}.fa-pie-chart:before{content:"\\f200"}.fa-line-chart:before{content:"\\f201"}.fa-lastfm:before{content:"\\f202"}.fa-lastfm-square:before{content:"\\f203"}.fa-toggle-off:before{content:"\\f204"}.fa-toggle-on:before{content:"\\f205"}.fa-bicycle:before{content:"\\f206"}.fa-bus:before{content:"\\f207"}.fa-ioxhost:before{content:"\\f208"}.fa-angellist:before{content:"\\f209"}.fa-cc:before{content:"\\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\\f20b"}.fa-meanpath:before{content:"\\f20c"}.fa-buysellads:before{content:"\\f20d"}.fa-connectdevelop:before{content:"\\f20e"}.fa-dashcube:before{content:"\\f210"}.fa-forumbee:before{content:"\\f211"}.fa-leanpub:before{content:"\\f212"}.fa-sellsy:before{content:"\\f213"}.fa-shirtsinbulk:before{content:"\\f214"}.fa-simplybuilt:before{content:"\\f215"}.fa-skyatlas:before{content:"\\f216"}.fa-cart-plus:before{content:"\\f217"}.fa-cart-arrow-down:before{content:"\\f218"}.fa-diamond:before{content:"\\f219"}.fa-ship:before{content:"\\f21a"}.fa-user-secret:before{content:"\\f21b"}.fa-motorcycle:before{content:"\\f21c"}.fa-street-view:before{content:"\\f21d"}.fa-heartbeat:before{content:"\\f21e"}.fa-venus:before{content:"\\f221"}.fa-mars:before{content:"\\f222"}.fa-mercury:before{content:"\\f223"}.fa-intersex:before,.fa-transgender:before{content:"\\f224"}.fa-transgender-alt:before{content:"\\f225"}.fa-venus-double:before{content:"\\f226"}.fa-mars-double:before{content:"\\f227"}.fa-venus-mars:before{content:"\\f228"}.fa-mars-stroke:before{content:"\\f229"}.fa-mars-stroke-v:before{content:"\\f22a"}.fa-mars-stroke-h:before{content:"\\f22b"}.fa-neuter:before{content:"\\f22c"}.fa-genderless:before{content:"\\f22d"}.fa-facebook-official:before{content:"\\f230"}.fa-pinterest-p:before{content:"\\f231"}.fa-whatsapp:before{content:"\\f232"}.fa-server:before{content:"\\f233"}.fa-user-plus:before{content:"\\f234"}.fa-user-times:before{content:"\\f235"}.fa-bed:before,.fa-hotel:before{content:"\\f236"}.fa-viacoin:before{content:"\\f237"}.fa-train:before{content:"\\f238"}.fa-subway:before{content:"\\f239"}.fa-medium:before{content:"\\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\\f23b"}.fa-optin-monster:before{content:"\\f23c"}.fa-opencart:before{content:"\\f23d"}.fa-expeditedssl:before{content:"\\f23e"}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:"\\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\\f244"}.fa-mouse-pointer:before{content:"\\f245"}.fa-i-cursor:before{content:"\\f246"}.fa-object-group:before{content:"\\f247"}.fa-object-ungroup:before{content:"\\f248"}.fa-sticky-note:before{content:"\\f249"}.fa-sticky-note-o:before{content:"\\f24a"}.fa-cc-jcb:before{content:"\\f24b"}.fa-cc-diners-club:before{content:"\\f24c"}.fa-clone:before{content:"\\f24d"}.fa-balance-scale:before{content:"\\f24e"}.fa-hourglass-o:before{content:"\\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\\f253"}.fa-hourglass:before{content:"\\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\\f256"}.fa-hand-scissors-o:before{content:"\\f257"}.fa-hand-lizard-o:before{content:"\\f258"}.fa-hand-spock-o:before{content:"\\f259"}.fa-hand-pointer-o:before{content:"\\f25a"}.fa-hand-peace-o:before{content:"\\f25b"}.fa-trademark:before{content:"\\f25c"}.fa-registered:before{content:"\\f25d"}.fa-creative-commons:before{content:"\\f25e"}.fa-gg:before{content:"\\f260"}.fa-gg-circle:before{content:"\\f261"}.fa-tripadvisor:before{content:"\\f262"}.fa-odnoklassniki:before{content:"\\f263"}.fa-odnoklassniki-square:before{content:"\\f264"}.fa-get-pocket:before{content:"\\f265"}.fa-wikipedia-w:before{content:"\\f266"}.fa-safari:before{content:"\\f267"}.fa-chrome:before{content:"\\f268"}.fa-firefox:before{content:"\\f269"}.fa-opera:before{content:"\\f26a"}.fa-internet-explorer:before{content:"\\f26b"}.fa-television:before,.fa-tv:before{content:"\\f26c"}.fa-contao:before{content:"\\f26d"}.fa-500px:before{content:"\\f26e"}.fa-amazon:before{content:"\\f270"}.fa-calendar-plus-o:before{content:"\\f271"}.fa-calendar-minus-o:before{content:"\\f272"}.fa-calendar-times-o:before{content:"\\f273"}.fa-calendar-check-o:before{content:"\\f274"}.fa-industry:before{content:"\\f275"}.fa-map-pin:before{content:"\\f276"}.fa-map-signs:before{content:"\\f277"}.fa-map-o:before{content:"\\f278"}.fa-map:before{content:"\\f279"}.fa-commenting:before{content:"\\f27a"}.fa-commenting-o:before{content:"\\f27b"}.fa-houzz:before{content:"\\f27c"}.fa-vimeo:before{content:"\\f27d"}.fa-black-tie:before{content:"\\f27e"}.fa-fonticons:before{content:"\\f280"}.fa-reddit-alien:before{content:"\\f281"}.fa-edge:before{content:"\\f282"}.fa-credit-card-alt:before{content:"\\f283"}.fa-codiepie:before{content:"\\f284"}.fa-modx:before{content:"\\f285"}.fa-fort-awesome:before{content:"\\f286"}.fa-usb:before{content:"\\f287"}.fa-product-hunt:before{content:"\\f288"}.fa-mixcloud:before{content:"\\f289"}.fa-scribd:before{content:"\\f28a"}.fa-pause-circle:before{content:"\\f28b"}.fa-pause-circle-o:before{content:"\\f28c"}.fa-stop-circle:before{content:"\\f28d"}.fa-stop-circle-o:before{content:"\\f28e"}.fa-shopping-bag:before{content:"\\f290"}.fa-shopping-basket:before{content:"\\f291"}.fa-hashtag:before{content:"\\f292"}.fa-bluetooth:before{content:"\\f293"}.fa-bluetooth-b:before{content:"\\f294"}.fa-percent:before{content:"\\f295"}.fa-gitlab:before{content:"\\f296"}.fa-wpbeginner:before{content:"\\f297"}.fa-wpforms:before{content:"\\f298"}.fa-envira:before{content:"\\f299"}.fa-universal-access:before{content:"\\f29a"}.fa-wheelchair-alt:before{content:"\\f29b"}.fa-question-circle-o:before{content:"\\f29c"}.fa-blind:before{content:"\\f29d"}.fa-audio-description:before{content:"\\f29e"}.fa-volume-control-phone:before{content:"\\f2a0"}.fa-braille:before{content:"\\f2a1"}.fa-assistive-listening-systems:before{content:"\\f2a2"}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:"\\f2a3"}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:"\\f2a4"}.fa-glide:before{content:"\\f2a5"}.fa-glide-g:before{content:"\\f2a6"}.fa-sign-language:before,.fa-signing:before{content:"\\f2a7"}.fa-low-vision:before{content:"\\f2a8"}.fa-viadeo:before{content:"\\f2a9"}.fa-viadeo-square:before{content:"\\f2aa"}.fa-snapchat:before{content:"\\f2ab"}.fa-snapchat-ghost:before{content:"\\f2ac"}.fa-snapchat-square:before{content:"\\f2ad"}.fa-pied-piper:before{content:"\\f2ae"}.fa-first-order:before{content:"\\f2b0"}.fa-yoast:before{content:"\\f2b1"}.fa-themeisle:before{content:"\\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\\f2b4"}.fa-handshake-o:before{content:"\\f2b5"}.fa-envelope-open:before{content:"\\f2b6"}.fa-envelope-open-o:before{content:"\\f2b7"}.fa-linode:before{content:"\\f2b8"}.fa-address-book:before{content:"\\f2b9"}.fa-address-book-o:before{content:"\\f2ba"}.fa-address-card:before,.fa-vcard:before{content:"\\f2bb"}.fa-address-card-o:before,.fa-vcard-o:before{content:"\\f2bc"}.fa-user-circle:before{content:"\\f2bd"}.fa-user-circle-o:before{content:"\\f2be"}.fa-user-o:before{content:"\\f2c0"}.fa-id-badge:before{content:"\\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\\f2c3"}.fa-quora:before{content:"\\f2c4"}.fa-free-code-camp:before{content:"\\f2c5"}.fa-telegram:before{content:"\\f2c6"}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:"\\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\\f2cb"}.fa-shower:before{content:"\\f2cc"}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:"\\f2cd"}.fa-podcast:before{content:"\\f2ce"}.fa-window-maximize:before{content:"\\f2d0"}.fa-window-minimize:before{content:"\\f2d1"}.fa-window-restore:before{content:"\\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\\f2d4"}.fa-bandcamp:before{content:"\\f2d5"}.fa-grav:before{content:"\\f2d6"}.fa-etsy:before{content:"\\f2d7"}.fa-imdb:before{content:"\\f2d8"}.fa-ravelry:before{content:"\\f2d9"}.fa-eercast:before{content:"\\f2da"}.fa-microchip:before{content:"\\f2db"}.fa-snowflake-o:before{content:"\\f2dc"}.fa-superpowers:before{content:"\\f2dd"}.fa-wpexplorer:before{content:"\\f2de"}.fa-meetup:before{content:"\\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}',""]),e.exports=t},db90:function(e,t,n){"use strict";n("f96e"),n("d4c0");var i=n("4580"),o=i.TOGGLE_MODE_EVENT,r=5e4;function s(e,t,n){var i=this;this._elementRegistry=t,this._graphicsFactory=n,this.elementColors={},e.on(o,r,(function(e){var t=e.simulationModeActive;t?i.preserveColors():i.resetColors()}))}s.prototype.preserveColors=function(){var e=this;this._elementRegistry.forEach((function(t){e.elementColors[t.id]={stroke:t.businessObject.di.get("stroke"),fill:t.businessObject.di.get("fill")},e.setColor(t,"#000","#fff")}))},s.prototype.resetColors=function(){var e=this;this._elementRegistry.forEach((function(t){e.elementColors[t.id]&&e.setColor(t,e.elementColors[t.id].stroke,e.elementColors[t.id].fill)})),this.elementColors={}},s.prototype.setColor=function(e,t,n){var i=this;setTimeout((function(){var o=e.businessObject;o.di.set("stroke",t),o.di.set("fill",n);var r=i._elementRegistry.getGraphics(e),s=e.waypoints?"connection":"shape";i._graphicsFactory.update(s,e,r)}))},s.$inject=["eventBus","elementRegistry","graphicsFactory"],e.exports=s},dc6d:function(e,t,n){"use strict";n("a078");var i,o=n("83ec"),r=n("55ab"),s=n("7663"),a=n("e244"),l=n("d6ed"),c=n("6f9e"),h=n("c732"),u=n("7d86"),d=n("d6e4"),p=n("0b05"),f=n("d362"),g=n("0066"),m=n("2ae8"),b=n("4eaf").codeAt,v=n("5556"),y=n("04c3"),w=n("63ef"),_=n("5173"),C=n("35d6"),A=C.set,E=C.getterFor("URL"),x=_.URLSearchParams,S=_.getState,k=a.URL,D=a.TypeError,L=a.parseInt,I=Math.floor,N=Math.pow,M=c("".charAt),B=c(/./.exec),T=c([].join),O=c(1..toString),R=c([].pop),P=c([].push),F=c("".replace),j=c([].shift),z=c("".split),V=c("".slice),Q=c("".toLowerCase),W=c([].unshift),H="Invalid authority",U="Invalid scheme",Y="Invalid host",G="Invalid port",K=/[a-z]/i,q=/[\d+-.a-z]/i,J=/\d/,$=/^0x/i,X=/^[0-7]+$/,Z=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,ie=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,oe=/[\t\n\r]/g,re=function(e){var t,n,i,o,r,s,a,l=z(e,".");if(l.length&&""==l[l.length-1]&&l.length--,t=l.length,t>4)return e;for(n=[],i=0;i<t;i++){if(o=l[i],""==o)return e;if(r=10,o.length>1&&"0"==M(o,0)&&(r=B($,o)?16:8,o=V(o,8==r?1:2)),""===o)s=0;else{if(!B(10==r?Z:8==r?X:ee,o))return e;s=L(o,r)}P(n,s)}for(i=0;i<t;i++)if(s=n[i],i==t-1){if(s>=N(256,5-t))return null}else if(s>255)return null;for(a=R(n),i=0;i<n.length;i++)a+=n[i]*N(256,3-i);return a},se=function(e){var t,n,i,o,r,s,a,l=[0,0,0,0,0,0,0,0],c=0,h=null,u=0,d=function(){return M(e,u)};if(":"==d()){if(":"!=M(e,1))return;u+=2,c++,h=c}while(d()){if(8==c)return;if(":"!=d()){t=n=0;while(n<4&&B(ee,d()))t=16*t+L(d(),16),u++,n++;if("."==d()){if(0==n)return;if(u-=n,c>6)return;i=0;while(d()){if(o=null,i>0){if(!("."==d()&&i<4))return;u++}if(!B(J,d()))return;while(B(J,d())){if(r=L(d(),10),null===o)o=r;else{if(0==o)return;o=10*o+r}if(o>255)return;u++}l[c]=256*l[c]+o,i++,2!=i&&4!=i||c++}if(4!=i)return;break}if(":"==d()){if(u++,!d())return}else if(d())return;l[c++]=t}else{if(null!==h)return;u++,c++,h=c}}if(null!==h){s=c-h,c=7;while(0!=c&&s>0)a=l[c],l[c--]=l[h+s-1],l[h+--s]=a}else if(8!=c)return;return l},ae=function(e){for(var t=null,n=1,i=null,o=0,r=0;r<8;r++)0!==e[r]?(o>n&&(t=i,n=o),i=null,o=0):(null===i&&(i=r),++o);return o>n&&(t=i,n=o),t},le=function(e){var t,n,i,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)W(t,e%256),e=I(e/256);return T(t,".")}if("object"==typeof e){for(t="",i=ae(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),i===n?(t+=n?":":"::",o=!0):(t+=O(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ce={},he=f({},ce,{" ":1,'"':1,"<":1,">":1,"`":1}),ue=f({},he,{"#":1,"?":1,"{":1,"}":1}),de=f({},ue,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pe=function(e,t){var n=b(e,0);return n>32&&n<127&&!p(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ge=function(e,t){var n;return 2==e.length&&B(K,M(e,0))&&(":"==(n=M(e,1))||!t&&"|"==n)},me=function(e){var t;return e.length>1&&ge(V(e,0,2))&&(2==e.length||"/"===(t=M(e,2))||"\\"===t||"?"===t||"#"===t)},be=function(e){return"."===e||"%2e"===Q(e)},ve=function(e){return e=Q(e),".."===e||"%2e."===e||".%2e"===e||"%2e%2e"===e},ye={},we={},_e={},Ce={},Ae={},Ee={},xe={},Se={},ke={},De={},Le={},Ie={},Ne={},Me={},Be={},Te={},Oe={},Re={},Pe={},Fe={},je={},ze=function(e,t,n){var i,o,r,s=y(e);if(t){if(o=this.parse(s),o)throw D(o);this.searchParams=null}else{if(void 0!==n&&(i=new ze(n,!0)),o=this.parse(s,null,i),o)throw D(o);r=S(new x),r.bindURL(this),this.searchParams=r}};ze.prototype={type:"URL",parse:function(e,t,n){var o,r,s,a,l=this,c=t||ye,h=0,u="",d=!1,f=!1,b=!1;e=y(e),t||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,e=F(e,ie,"")),e=F(e,oe,""),o=g(e);while(h<=o.length){switch(r=o[h],c){case ye:if(!r||!B(K,r)){if(t)return U;c=_e;continue}u+=Q(r),c=we;break;case we:if(r&&(B(q,r)||"+"==r||"-"==r||"."==r))u+=Q(r);else{if(":"!=r){if(t)return U;u="",c=_e,h=0;continue}if(t&&(l.isSpecial()!=p(fe,u)||"file"==u&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=u,t)return void(l.isSpecial()&&fe[l.scheme]==l.port&&(l.port=null));u="","file"==l.scheme?c=Me:l.isSpecial()&&n&&n.scheme==l.scheme?c=Ce:l.isSpecial()?c=Se:"/"==o[h+1]?(c=Ae,h++):(l.cannotBeABaseURL=!0,P(l.path,""),c=Pe)}break;case _e:if(!n||n.cannotBeABaseURL&&"#"!=r)return U;if(n.cannotBeABaseURL&&"#"==r){l.scheme=n.scheme,l.path=m(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,c=je;break}c="file"==n.scheme?Me:Ee;continue;case Ce:if("/"!=r||"/"!=o[h+1]){c=Ee;continue}c=ke,h++;break;case Ae:if("/"==r){c=De;break}c=Re;continue;case Ee:if(l.scheme=n.scheme,r==i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query;else if("/"==r||"\\"==r&&l.isSpecial())c=xe;else if("?"==r)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query="",c=Fe;else{if("#"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.path.length--,c=Re;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query,l.fragment="",c=je}break;case xe:if(!l.isSpecial()||"/"!=r&&"\\"!=r){if("/"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,c=Re;continue}c=De}else c=ke;break;case Se:if(c=ke,"/"!=r||"/"!=M(u,h+1))continue;h++;break;case ke:if("/"!=r&&"\\"!=r){c=De;continue}break;case De:if("@"==r){d&&(u="%40"+u),d=!0,s=g(u);for(var v=0;v<s.length;v++){var w=s[v];if(":"!=w||b){var _=pe(w,de);b?l.password+=_:l.username+=_}else b=!0}u=""}else if(r==i||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(d&&""==u)return H;h-=g(u).length+1,u="",c=Le}else u+=r;break;case Le:case Ie:if(t&&"file"==l.scheme){c=Te;continue}if(":"!=r||f){if(r==i||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(l.isSpecial()&&""==u)return Y;if(t&&""==u&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(u),a)return a;if(u="",c=Oe,t)return;continue}"["==r?f=!0:"]"==r&&(f=!1),u+=r}else{if(""==u)return Y;if(a=l.parseHost(u),a)return a;if(u="",c=Ne,t==Ie)return}break;case Ne:if(!B(J,r)){if(r==i||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()||t){if(""!=u){var C=L(u,10);if(C>65535)return G;l.port=l.isSpecial()&&C===fe[l.scheme]?null:C,u=""}if(t)return;c=Oe;continue}return G}u+=r;break;case Me:if(l.scheme="file","/"==r||"\\"==r)c=Be;else{if(!n||"file"!=n.scheme){c=Re;continue}if(r==i)l.host=n.host,l.path=m(n.path),l.query=n.query;else if("?"==r)l.host=n.host,l.path=m(n.path),l.query="",c=Fe;else{if("#"!=r){me(T(m(o,h),""))||(l.host=n.host,l.path=m(n.path),l.shortenPath()),c=Re;continue}l.host=n.host,l.path=m(n.path),l.query=n.query,l.fragment="",c=je}}break;case Be:if("/"==r||"\\"==r){c=Te;break}n&&"file"==n.scheme&&!me(T(m(o,h),""))&&(ge(n.path[0],!0)?P(l.path,n.path[0]):l.host=n.host),c=Re;continue;case Te:if(r==i||"/"==r||"\\"==r||"?"==r||"#"==r){if(!t&&ge(u))c=Re;else if(""==u){if(l.host="",t)return;c=Oe}else{if(a=l.parseHost(u),a)return a;if("localhost"==l.host&&(l.host=""),t)return;u="",c=Oe}continue}u+=r;break;case Oe:if(l.isSpecial()){if(c=Re,"/"!=r&&"\\"!=r)continue}else if(t||"?"!=r)if(t||"#"!=r){if(r!=i&&(c=Re,"/"!=r))continue}else l.fragment="",c=je;else l.query="",c=Fe;break;case Re:if(r==i||"/"==r||"\\"==r&&l.isSpecial()||!t&&("?"==r||"#"==r)){if(ve(u)?(l.shortenPath(),"/"==r||"\\"==r&&l.isSpecial()||P(l.path,"")):be(u)?"/"==r||"\\"==r&&l.isSpecial()||P(l.path,""):("file"==l.scheme&&!l.path.length&&ge(u)&&(l.host&&(l.host=""),u=M(u,0)+":"),P(l.path,u)),u="","file"==l.scheme&&(r==i||"?"==r||"#"==r))while(l.path.length>1&&""===l.path[0])j(l.path);"?"==r?(l.query="",c=Fe):"#"==r&&(l.fragment="",c=je)}else u+=pe(r,ue);break;case Pe:"?"==r?(l.query="",c=Fe):"#"==r?(l.fragment="",c=je):r!=i&&(l.path[0]+=pe(r,ce));break;case Fe:t||"#"!=r?r!=i&&("'"==r&&l.isSpecial()?l.query+="%27":l.query+="#"==r?"%23":pe(r,ce)):(l.fragment="",c=je);break;case je:r!=i&&(l.fragment+=pe(r,he));break}h++}},parseHost:function(e){var t,n,i;if("["==M(e,0)){if("]"!=M(e,e.length-1))return Y;if(t=se(V(e,1,-1)),!t)return Y;this.host=t}else if(this.isSpecial()){if(e=v(e),B(te,e))return Y;if(t=re(e),null===t)return Y;this.host=t}else{if(B(ne,e))return Y;for(t="",n=g(e),i=0;i<n.length;i++)t+=pe(n[i],ce);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return p(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ge(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,i=e.password,o=e.host,r=e.port,s=e.path,a=e.query,l=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=n+(i?":"+i:"")+"@"),c+=le(o),null!==r&&(c+=":"+r)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+T(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw D(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Ve(e.path[0]).origin}catch(n){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+le(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(y(e)+":",ye)},getUsername:function(){return this.username},setUsername:function(e){var t=g(y(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=pe(t[n],de)}},getPassword:function(){return this.password},setPassword:function(e){var t=g(y(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=pe(t[n],de)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?le(e):le(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Le)},getHostname:function(){var e=this.host;return null===e?"":le(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ie)},getPort:function(){var e=this.port;return null===e?"":y(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=y(e),""==e?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+T(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Oe))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=y(e),""==e?this.query=null:("?"==M(e,0)&&(e=V(e,1)),this.query="",this.parse(e,Fe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){e=y(e),""!=e?("#"==M(e,0)&&(e=V(e,1)),this.fragment="",this.parse(e,je)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ve=function(e){var t=d(this,Qe),n=arguments.length>1?arguments[1]:void 0,i=A(t,new ze(e,!1,n));r||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},Qe=Ve.prototype,We=function(e,t){return{get:function(){return E(this)[e]()},set:t&&function(e){return E(this)[t](e)},configurable:!0,enumerable:!0}};if(r&&h(Qe,{href:We("serialize","setHref"),origin:We("getOrigin"),protocol:We("getProtocol","setProtocol"),username:We("getUsername","setUsername"),password:We("getPassword","setPassword"),host:We("getHost","setHost"),hostname:We("getHostname","setHostname"),port:We("getPort","setPort"),pathname:We("getPathname","setPathname"),search:We("getSearch","setSearch"),searchParams:We("getSearchParams"),hash:We("getHash","setHash")}),u(Qe,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),u(Qe,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),k){var He=k.createObjectURL,Ue=k.revokeObjectURL;He&&u(Ve,"createObjectURL",l(He,k)),Ue&&u(Ve,"revokeObjectURL",l(Ue,k))}w(Ve,"URL"),o({global:!0,forced:!s,sham:!r},{URL:Ve})},dc8c:function(e,t,n){var i=n("58d1"),o=n("fbcf"),r=n("762a");e.exports=function(e,t,n){var s,a;o(e);try{if(s=r(e,"return"),!s){if("throw"===t)throw n;return n}s=i(s,e)}catch(l){a=!0,s=l}if("throw"===t)throw n;if(a)throw s;return o(s),n}},de49:function(e,t,n){e.exports=n("ff4d")},df3c:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;z-index:2500;color:inherit}",""]),e.exports=t},df70:function(e,t,n){var i=n("139d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("70a7146b",i,!0,{sourceMap:!1,shadowMode:!1})},df93:function(e,t,n){var i=n("e577");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("7f190836",i,!0,{sourceMap:!1,shadowMode:!1})},dff0:function(e,t,n){var i=n("8dab");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("7ef46c60",i,!0,{sourceMap:!1,shadowMode:!1})},e09a:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:0;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}",""]),e.exports=t},e0e0:function(e,t,n){"use strict";var i=n("15b2").IteratorPrototype,o=n("ca2b"),r=n("4d82"),s=n("63ef"),a=n("d85b"),l=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=o(i,{next:r(1,n)}),s(e,c,!1,!0),a[c]=l,e}},e244:function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n("c8ed"))},e248:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".context-view .monaco-menu{min-width:130px}",""]),e.exports=t},e263:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}",""]),e.exports=t},e2da:function(e,t,n){"use strict";var i=n("45ad"),o=n("6e10"),r=n("d85b"),s=n("35d6"),a=n("325d"),l="Array Iterator",c=s.set,h=s.getterFor(l);e.exports=a(Array,"Array",(function(e,t){c(this,{type:l,target:i(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},e3d4:function(e,t,n){"use strict";function i(e,t,n,i,o,r,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(e,t){return l.call(t),h(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}n.d(t,"a",(function(){return i}))},e3f4:function(e,t,n){(function(e){function n(e,t){for(var n=0,i=e.length-1;i>=0;i--){var o=e[i];"."===o?e.splice(i,1):".."===o?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e){"string"!==typeof e&&(e+="");var t,n=0,i=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===i&&(o=!1,i=t+1);return-1===i?"":e.slice(n,i)}function o(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i<e.length;i++)t(e[i],i,e)&&n.push(e[i]);return n}t.resolve=function(){for(var t="",i=!1,r=arguments.length-1;r>=-1&&!i;r--){var s=r>=0?arguments[r]:e.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return t=n(o(t.split("/"),(function(e){return!!e})),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(e){var i=t.isAbsolute(e),s="/"===r(e,-1);return e=n(o(e.split("/"),(function(e){return!!e})),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function i(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var n=e.length-1;n>=0;n--)if(""!==e[n])break;return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=i(e.split("/")),r=i(n.split("/")),s=Math.min(o.length,r.length),a=s,l=0;l<s;l++)if(o[l]!==r[l]){a=l;break}var c=[];for(l=a;l<o.length;l++)c.push("..");return c=c.concat(r.slice(a)),c.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,o=!0,r=e.length-1;r>=1;--r)if(t=e.charCodeAt(r),47===t){if(!o){i=r;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"/":e.slice(0,i)},t.basename=function(e,t){var n=i(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,n=0,i=-1,o=!0,r=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===i&&(o=!1,i=s+1),46===a?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){n=s+1;break}}return-1===t||-1===i||0===r||1===r&&t===i-1&&t===n+1?"":e.slice(t,i)};var r="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n("2552"))},e460:function(e,t,n){"use strict";n("a2ce")},e4f5:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}",""]),e.exports=t},e577:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .view-ruler{position:absolute;top:0}",""]),e.exports=t},e5d9:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:transparent;transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:inset 0 6px 6px -6px #ddd}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:inset 6px 0 6px -6px #ddd}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:inset 6px 6px 6px -6px #ddd}.vs .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,39.2%,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,47.5%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:hsla(0,0%,39.2%,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:hsla(0,0%,74.9%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:#6fc3df}.vs-dark .monaco-scrollable-element .shadow.top{box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{box-shadow:inset 6px 0 6px -6px #000}.vs-dark .monaco-scrollable-element .shadow.top.left{box-shadow:inset 6px 6px 6px -6px #000}.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.top.left{box-shadow:none}",""]),e.exports=t},e629:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},e635:function(e,t,n){var i=n("c91b");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("8ddd7898",i,!0,{sourceMap:!1,shadowMode:!1})},e6b2:function(e,t){(function(t){e.exports=t}).call(this,{})},e743:function(e,t,n){var i=n("2273");e.exports=/web0s(?!.*chrome)/i.test(i)},e7a5:function(e,t,n){var i=n("2ae8"),o=Math.floor,r=function(e,t){var n=e.length,l=o(n/2);return n<8?s(e,t):a(e,r(i(e,0,l),t),r(i(e,l),t),t)},s=function(e,t){var n,i,o=e.length,r=1;while(r<o){i=r,n=e[r];while(i&&t(e[i-1],n)>0)e[i]=e[--i];i!==r++&&(e[i]=n)}return e},a=function(e,t,n,i){var o=t.length,r=n.length,s=0,a=0;while(s<o||a<r)e[s+a]=s<o&&a<r?i(t[s],n[a])<=0?t[s++]:n[a++]:s<o?t[s++]:n[a++];return e};e.exports=r},e820:function(e,t,n){"use strict";n("2eb0");var i=n("6f9e"),o=n("7d86"),r=n("6e1d"),s=n("ac97"),a=n("1810"),l=n("69f1"),c=a("species"),h=RegExp.prototype;e.exports=function(e,t,n,u){var d=a(e),p=!s((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),f=p&&!s((function(){var t=!1,n=/a/;return"split"===e&&(n={},n.constructor={},n.constructor[c]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!p||!f||n){var g=i(/./[d]),m=t(d,""[e],(function(e,t,n,o,s){var a=i(e),l=t.exec;return l===r||l===h.exec?p&&!s?{done:!0,value:g(t,n,o)}:{done:!0,value:a(n,t,o)}:{done:!1}}));o(String.prototype,e,m[0]),o(h,d,m[1])}u&&l(h[d],"sham",!0)}},ea3c:function(e,t,n){e.exports=n("3aac"),e.exports.Collection=n("2875")},eaa1:function(e,t,n){e.exports=n("164d")},eb4a:function(e,t,n){var i=n("ac97");e.exports=i((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},eba9:function(e,t,n){var i=n("58a5");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("05f4173a",i,!0,{sourceMap:!1,shadowMode:!1})},ec23:function(e,t,n){var i=n("e244"),o=n("58d1"),r=n("fbcf"),s=n("9564"),a=n("c401"),l=n("6e1d"),c=i.TypeError;e.exports=function(e,t){var n=e.exec;if(s(n)){var i=o(n,e,t);return null!==i&&r(i),i}if("RegExp"===a(e))return o(l,e,t);throw c("RegExp#exec called on incompatible receiver")}},eca0:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-editor .lines-content .core-guide{position:absolute}",""]),e.exports=t},eee7:function(e,t,n){var i=n("9564");e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},ef61:function(e,t,n){var i=n("83ec"),o=n("c673"),r=n("3e1a"),s=n("ac97"),a=s((function(){r(1)}));i({target:"Object",stat:!0,forced:a},{keys:function(e){return r(o(e))}})},efb0:function(e,t,n){"use strict";n("37fd"),n("f96e");var i=n("fbdf").is,o=n("4580"),r=o.TOGGLE_MODE_EVENT,s=getComputedStyle(document.documentElement).getPropertyValue("--token-simulation-grey-lighten-56"),a=getComputedStyle(document.documentElement).getPropertyValue("--token-simulation-grey-darken-30");function l(e){var t=e.outgoing.filter(c),n=t.indexOf(e.sequenceFlow);return t[n+1]?t[n+1]:t[0]}function c(e){return i(e,"bpmn:SequenceFlow")}function h(e,t,n){var i=this;this._elementRegistry=t,this._graphicsFactory=n,e.on(r,(function(e){var t=e.simulationModeActive;t?i.setSequenceFlowsDefault():i.resetSequenceFlows()}))}h.prototype.setSequenceFlowsDefault=function(){var e=this,t=this._elementRegistry.filter((function(e){return i(e,"bpmn:ExclusiveGateway")}));t.forEach((function(t){t.outgoing.filter(c).length&&e.setSequenceFlow(t,t.outgoing.filter(c)[0])}))},h.prototype.resetSequenceFlows=function(){var e=this,t=this._elementRegistry.filter((function(e){return i(e,"bpmn:ExclusiveGateway")}));t.forEach((function(t){t.outgoing.filter(c).length&&e.resetSequenceFlow(t)}))},h.prototype.resetSequenceFlow=function(e){e.sequenceFlow&&delete e.sequenceFlow},h.prototype.setSequenceFlow=function(e){var t=this,n=e.outgoing.filter(c);if(n.length){var i=e.sequenceFlow;e.sequenceFlow=i?l(e):n[0],e.outgoing.forEach((function(n){n===e.sequenceFlow?t.setColor(n,a):t.setColor(n,s)}))}},h.prototype.setColor=function(e,t){var n=this;setTimeout((function(){var i=e.businessObject;i.di.set("stroke",t);var o=n._elementRegistry.getGraphics(e);n._graphicsFactory.update("connection",e,o)}))},h.$inject=["eventBus","elementRegistry","graphicsFactory"],e.exports=h},f05e:function(e,t,n){"use strict";var i=n("6f9e"),o=n("32a5").PROPER,r=n("7d86"),s=n("fbcf"),a=n("81e5"),l=n("04c3"),c=n("ac97"),h=n("ff5c"),u="toString",d=RegExp.prototype,p=d[u],f=i(h),g=c((function(){return"/a/b"!=p.call({source:"a",flags:"b"})})),m=o&&p.name!=u;(g||m)&&r(RegExp.prototype,u,(function(){var e=s(this),t=l(e.source),n=e.flags,i=l(void 0===n&&a(d,e)&&!("flags"in d)?f(e):n);return"/"+t+"/"+i}),{unsafe:!0})},f086:function(e,t,n){e.exports=n("1969")},f0db:function(e,t){e.exports=!1},f0f1:function(e,t,n){var i=n("396d"),o=n("e629"),r=o.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},f10c:function(e,t,n){var i=n("e244"),o=n("58d1"),r=n("9564"),s=n("eee7"),a=i.TypeError;e.exports=function(e,t){var n,i;if("string"===t&&r(n=e.toString)&&!s(i=o(n,e)))return i;if(r(n=e.valueOf)&&!s(i=o(n,e)))return i;if("string"!==t&&r(n=e.toString)&&!s(i=o(n,e)))return i;throw a("Can't convert object to primitive value")}},f146:function(e,t,n){var i=n("e244"),o=n("eee7"),r=i.document,s=o(r)&&o(r.createElement);e.exports=function(e){return s?r.createElement(e):{}}},f152:function(e,t,n){var i=n("a133");e.exports=function(e,t){return new(i(e))(0===t?0:t)}},f192:function(e,t,n){(function(t){(function(t,n){e.exports=n(t)})("undefined"!=typeof t?t:this,(function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");var t,n=String(e),i=n.length,o=-1,r="",s=n.charCodeAt(0);while(++o<i)t=n.charCodeAt(o),r+=0!=t?t>=1&&t<=31||127==t||0==o&&t>=48&&t<=57||1==o&&t>=48&&t<=57&&45==s?"\\"+t.toString(16)+" ":(0!=o||1!=i||45!=t)&&(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?n.charAt(o):"\\"+n.charAt(o):"<EFBFBD>";return r};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}))}).call(this,n("c8ed"))},f20c:function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var i=n("3ef6"),o=n("17d4"),r=n("52a2");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=c.prototype):(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return h(this,e,t,n)}function h(e,t,n,i){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?m(e,t,n,i):"string"===typeof t?f(e,t,n):b(e,t)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t,n,i){return u(t),t<=0?l(e,t):void 0!==n?"string"===typeof i?l(e,t).fill(n,i):l(e,t).fill(n):l(e,t)}function p(e,t){if(u(t),e=l(e,t<0?0:0|v(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t,n){if("string"===typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|w(t,n);e=l(e,i);var o=e.write(t,n);return o!==i&&(e=e.slice(0,o)),e}function g(e,t){var n=t.length<0?0:0|v(t.length);e=l(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function m(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=g(e,t),e}function b(e,t){if(c.isBuffer(t)){var n=0|v(t.length);return e=l(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?l(e,0):g(e,t);if("Buffer"===t.type&&r(t.data))return g(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),c.alloc(+e)}function w(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(e).length;default:if(i)return J(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return N(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function C(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function A(e,t,n,i,o){if(0===e.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:E(e,t,n,i,o);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function E(e,t,n,i,o){var r,s=1,a=e.length,l=t.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var h=-1;for(r=n;r<a;r++)if(c(e,r)===c(t,-1===h?0:r-h)){if(-1===h&&(h=r),r-h+1===l)return h*s}else-1!==h&&(r-=r-h),h=-1}else for(n+l>a&&(n=a-l),r=n;r>=0;r--){for(var u=!0,d=0;d<l;d++)if(c(e,r+d)!==c(t,d)){u=!1;break}if(u)return r}return-1}function x(e,t,n,i){n=Number(n)||0;var o=e.length-n;i?(i=Number(i),i>o&&(i=o)):i=o;var r=t.length;if(r%2!==0)throw new TypeError("Invalid hex string");i>r/2&&(i=r/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function S(e,t,n,i){return ee(J(t,e.length-n),e,n,i)}function k(e,t,n,i){return ee($(t),e,n,i)}function D(e,t,n,i){return k(e,t,n,i)}function L(e,t,n,i){return ee(Z(t),e,n,i)}function I(e,t,n,i){return ee(X(t,e.length-n),e,n,i)}function N(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);var i=[],o=t;while(o<n){var r,s,a,l,c=e[o],h=null,u=c>239?4:c>223?3:c>191?2:1;if(o+u<=n)switch(u){case 1:c<128&&(h=c);break;case 2:r=e[o+1],128===(192&r)&&(l=(31&c)<<6|63&r,l>127&&(h=l));break;case 3:r=e[o+1],s=e[o+2],128===(192&r)&&128===(192&s)&&(l=(15&c)<<12|(63&r)<<6|63&s,l>2047&&(l<55296||l>57343)&&(h=l));break;case 4:r=e[o+1],s=e[o+2],a=e[o+3],128===(192&r)&&128===(192&s)&&128===(192&a)&&(l=(15&c)<<18|(63&r)<<12|(63&s)<<6|63&a,l>65535&&l<1114112&&(h=l))}null===h?(h=65533,u=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),o+=u}return T(i)}t.Buffer=c,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return h(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return d(null,e,t,n)},c.allocUnsafe=function(e){return p(null,e)},c.allocUnsafeSlow=function(e){return p(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,r=Math.min(n,i);o<r;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!r(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},c.byteLength=w,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)C(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)C(this,t,t+3),C(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)C(this,t,t+7),C(this,t+1,t+6),C(this,t+2,t+5),C(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?M(this,0,e):_.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,i,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var r=o-i,s=n-t,a=Math.min(r,s),l=this.slice(i,o),h=e.slice(t,n),u=0;u<a;++u)if(l[u]!==h[u]){r=l[u],s=h[u];break}return r<s?-1:s<r?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return A(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return A(this,e,t,n,!1)},c.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var r=!1;;)switch(i){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return D(this,e,t,n);case"base64":return L(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function T(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);var n="",i=0;while(i<t)n+=String.fromCharCode.apply(String,e.slice(i,i+=B));return n}function O(e,t,n){var i="";n=Math.min(e.length,n);for(var o=t;o<n;++o)i+=String.fromCharCode(127&e[o]);return i}function R(e,t,n){var i="";n=Math.min(e.length,n);for(var o=t;o<n;++o)i+=String.fromCharCode(e[o]);return i}function P(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",r=t;r<n;++r)o+=q(e[r]);return o}function F(e,t,n){for(var i=e.slice(t,n),o="",r=0;r<i.length;r+=2)o+=String.fromCharCode(i[r]+256*i[r+1]);return o}function j(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function z(e,t,n,i,o,r){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<r)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function V(e,t,n,i){t<0&&(t=65535+t+1);for(var o=0,r=Math.min(e.length-n,2);o<r;++o)e[n+o]=(t&255<<8*(i?o:1-o))>>>8*(i?o:1-o)}function Q(e,t,n,i){t<0&&(t=4294967295+t+1);for(var o=0,r=Math.min(e.length-n,4);o<r;++o)e[n+o]=t>>>8*(i?o:3-o)&255}function W(e,t,n,i,o,r){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,i,r){return r||W(e,t,n,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,n,i,23,4),n+4}function U(e,t,n,i,r){return r||W(e,t,n,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if(e=~~e,t=void 0===t?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var r=0;r<o;++r)n[r]=this[r+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);var i=this[e],o=1,r=0;while(++r<t&&(o*=256))i+=this[e+r]*o;return i},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);var i=this[e+--t],o=1;while(t>0&&(o*=256))i+=this[e+--t]*o;return i},c.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);var i=this[e],o=1,r=0;while(++r<t&&(o*=256))i+=this[e+r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);var i=t,o=1,r=this[e+--i];while(i>0&&(o*=256))r+=this[e+--i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t|=0,n|=0,!i){var o=Math.pow(2,8*n)-1;z(this,e,t,n,o,0)}var r=1,s=0;this[t]=255&e;while(++s<n&&(r*=256))this[t+s]=e/r&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t|=0,n|=0,!i){var o=Math.pow(2,8*n)-1;z(this,e,t,n,o,0)}var r=n-1,s=1;this[t+r]=255&e;while(--r>=0&&(s*=256))this[t+r]=e/s&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Q(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Q(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*n-1);z(this,e,t,n,o-1,-o)}var r=0,s=1,a=0;this[t]=255&e;while(++r<n&&(s*=256))e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var o=Math.pow(2,8*n-1);z(this,e,t,n,o-1,-o)}var r=n-1,s=1,a=0;this[t+r]=255&e;while(--r>=0&&(s*=256))e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Q(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Q(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o,r=i-n;if(this===e&&n<t&&t<i)for(o=r-1;o>=0;--o)e[o+t]=this[o+n];else if(r<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<r;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+r),t);return r},c.prototype.fill=function(e,t,n,i){if("string"===typeof e){if("string"===typeof t?(i=t,t=0,n=this.length):"string"===typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!==typeof i)throw new TypeError("encoding must be a string");if("string"===typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var r;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(r=t;r<n;++r)this[r]=e;else{var s=c.isBuffer(e)?e:J(new c(e,i).toString()),a=s.length;for(r=0;r<n-t;++r)this[r+t]=s[r%a]}return this};var Y=/[^+\/0-9A-Za-z-_]/g;function G(e){if(e=K(e).replace(Y,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function K(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function J(e,t){var n;t=t||1/0;for(var i=e.length,o=null,r=[],s=0;s<i;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function $(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function X(e,t){for(var n,i,o,r=[],s=0;s<e.length;++s){if((t-=2)<0)break;n=e.charCodeAt(s),i=n>>8,o=n%256,r.push(o),r.push(i)}return r}function Z(e){return i.toByteArray(G(e))}function ee(e,t,n,i){for(var o=0;o<i;++o){if(o+n>=t.length||o>=e.length)break;t[o+n]=e[o]}return o}function te(e){return e!==e}}).call(this,n("c8ed"))},f226:function(e,t,n){var i=n("45ad"),o=n("3352"),r=n("7c08"),s=function(e){return function(t,n,s){var a,l=i(t),c=r(l),h=o(s,c);if(e&&n!=n){while(c>h)if(a=l[h++],a!=a)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===n)return e||h||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},f31a:function(e,t,n){e.exports=n("a57d")},f37b:function(e,t,n){e.exports=n.p+"fonts/fontawesome-webfont.674f50d2.eot"},f39a:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,':root{--sash-size:4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--sash-size)*2);width:calc(var(--sash-size)*2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size)*-0.5);top:calc(var(--sash-size)*-1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--sash-size)*-0.5);bottom:calc(var(--sash-size)*-1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--sash-size)*-0.5);left:calc(var(--sash-size)*-1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--sash-size)*-0.5);right:calc(var(--sash-size)*-1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;transition:background-color .1s ease-out;background:transparent}.monaco-sash.vertical:before{width:var(--sash-hover-size);left:calc(50% - var(--sash-hover-size)/2)}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - var(--sash-hover-size)/2)}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}',""]),e.exports=t},f3d6:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,'.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font:"SF Mono",Monaco,Menlo,Consolas,"Ubuntu Mono","Liberation Mono","DejaVu Sans Mono","Courier New",monospace}.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%)}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs-dark .view-overlays .current-line,.monaco-editor.vs .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs-dark .cursor,.monaco-editor.vs .cursor{background-color:windowtext!important}.monaco-editor.vs-dark .dnd-target,.monaco-editor.vs .dnd-target{border-color:windowtext!important}.monaco-editor.vs-dark .selected-text,.monaco-editor.vs .selected-text{background-color:highlight!important}.monaco-editor.vs-dark .view-line,.monaco-editor.vs .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .view-line span,.monaco-editor.vs .view-line span{color:windowtext!important}.monaco-editor.vs-dark .view-line span.inline-selected-text,.monaco-editor.vs .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs-dark .view-overlays,.monaco-editor.vs .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .reference-decoration,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs .wordHighlightStrong{border:2px dotted highlight!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs-dark .rangeHighlight,.monaco-editor.vs .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs-dark .bracket-match,.monaco-editor.vs .bracket-match{border-color:windowtext!important;background:transparent!important}.monaco-editor.vs-dark .currentFindMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs .findMatch{border:2px dotted activeborder!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs-dark .find-widget,.monaco-editor.vs .find-widget{border:1px solid windowtext}.monaco-editor.vs-dark .monaco-list .monaco-list-row,.monaco-editor.vs .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused,.monaco-editor.vs .monaco-list .monaco-list-row.focused{color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover,.monaco-editor.vs .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar,.monaco-editor.vs .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs-dark .decorationsOverviewRuler,.monaco-editor.vs .decorationsOverviewRuler{opacity:0}.monaco-editor.vs-dark .minimap,.monaco-editor.vs .minimap{display:none}.monaco-editor.vs-dark .squiggly-d-error,.monaco-editor.vs .squiggly-d-error{background:transparent!important;border-bottom:4px double #e47777}.monaco-editor.vs-dark .squiggly-b-info,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs .squiggly-c-warning{border-bottom:4px double #71b771}.monaco-editor.vs-dark .squiggly-a-hint,.monaco-editor.vs .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs-dark .diffOverviewRuler,.monaco-diff-editor.vs .diffOverviewRuler{display:none}.monaco-editor.vs-dark .line-delete,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs .line-insert{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs-dark .char-delete,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs .char-insert{background:transparent!important}}',""]),e.exports=t},f3d9:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".bpmn-tools[data-v-8e05a63e]{display:flex;padding-top:10px;justify-content:space-between}",""]),e.exports=t},f5ab:function(e,t,n){var i=n("ad2f");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("26a11816",i,!0,{sourceMap:!1,shadowMode:!1})},f652:function(e,t,n){var i,o,r,s,a,l,c,h,u=n("e244"),d=n("d6ed"),p=n("42b1").f,f=n("59e5").set,g=n("4ad5"),m=n("d27b"),b=n("e743"),v=n("f79e"),y=u.MutationObserver||u.WebKitMutationObserver,w=u.document,_=u.process,C=u.Promise,A=p(u,"queueMicrotask"),E=A&&A.value;E||(i=function(){var e,t;v&&(e=_.domain)&&e.exit();while(o){t=o.fn,o=o.next;try{t()}catch(n){throw o?s():r=void 0,n}}r=void 0,e&&e.enter()},g||v||b||!y||!w?!m&&C&&C.resolve?(c=C.resolve(void 0),c.constructor=C,h=d(c.then,c),s=function(){h(i)}):v?s=function(){_.nextTick(i)}:(f=d(f,u),s=function(){f(i)}):(a=!0,l=w.createTextNode(""),new y(i).observe(l,{characterData:!0}),s=function(){l.data=a=!a})),e.exports=E||function(e){var t={fn:e,next:void 0};r&&(r.next=t),o||(o=t,s()),r=t}},f658:function(e,t,n){"use strict";n("37fd");var i=n("fbdf").is,o=n("7299"),r=o.domify,s=o.event;function a(e){this._exclusiveGatewaySettings=e}a.prototype.createContextPads=function(e){var t=this,n=e.outgoing.filter((function(e){return i(e,"bpmn:SequenceFlow")}));if(!(n.length<2)){var o=r('<div class="context-pad" title="Set Sequence Flow"><i class="fa fa-code-fork"></i></div>');return s.bind(o,"click",(function(){t._exclusiveGatewaySettings.setSequenceFlow(e)})),[{element:e,html:o}]}},a.$inject=["exclusiveGatewaySettings"],e.exports=a},f68d:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,".monaco-mouse-cursor-text{cursor:text}.hc-black.mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.vs-dark .mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}",""]),e.exports=t},f743:function(e,t,n){var i=n("df3c");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("5afc6184",i,!0,{sourceMap:!1,shadowMode:!1})},f767:function(e,t,n){var i=n("53c2");t=i(!1),t.push([e.i,'.djs-minimap{position:absolute;top:20px;right:20px;background-color:hsla(0,0%,100%,.9);border:1px solid #ccc;border-radius:2px;box-sizing:border-box;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none}.djs-minimap,.djs-minimap:not(.open){overflow:hidden}.djs-minimap .map{display:none}.djs-minimap.open .map{display:block}.djs-minimap .map{width:320px;height:180px}.djs-minimap:not(.open) .toggle{width:70px;height:40px;line-height:40px;text-align:center}.djs-minimap:not(.open) .toggle:before{content:"minimap"}.djs-minimap.open .toggle{position:absolute;right:0;padding:6px;z-index:1}.djs-minimap .map{cursor:crosshair}.djs-minimap .viewport{fill:none;stroke:none}.djs-minimap .viewport-dom{position:absolute;border:2px solid orange;border-radius:2px;box-sizing:border-box;cursor:move}.djs-minimap:not(.open) .viewport-dom{display:none}.djs-minimap.open .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:hsla(0,0%,100%,.2);pointer-events:none}.djs-minimap .cursor-crosshair{cursor:crosshair}.djs-minimap .cursor-move{cursor:move}',""]),e.exports=t},f79e:function(e,t,n){var i=n("c401"),o=n("e244");e.exports="process"==i(o.process)},f940:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a}));var i=n("1cb4");let o;if("undefined"!==typeof i["b"].vscode&&"undefined"!==typeof i["b"].vscode.process){const e=i["b"].vscode.process;o={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()},nextTick(e){return Object(i["j"])(e)}}}else o="undefined"!==typeof e?{get platform(){return e.platform},get arch(){return e.arch},get env(){return Object({NODE_ENV:"production",BASE_URL:"/"})},cwd(){return Object({NODE_ENV:"production",BASE_URL:"/"})["VSCODE_CWD"]||e.cwd()},nextTick(t){return e.nextTick(t)}}:{get platform(){return i["i"]?"win32":i["f"]?"darwin":"linux"},get arch(){},nextTick(e){return Object(i["j"])(e)},get env(){return{}},cwd(){return"/"}};const r=o.cwd,s=o.env,a=o.platform}).call(this,n("2552"))},f96e:function(e,t,n){var i=n("e244"),o=n("a909"),r=n("679c"),s=n("370b"),a=n("69f1"),l=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var c in o)o[c]&&l(i[c]&&i[c].prototype);l(r)},f9ae:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{ref:"wf-dialog",attrs:{"custom-class":"wf-dialog",visible:e.visible,title:e.t("wf.panel.node.assignee.v2.title"),width:"60%","before-close":e.handleClose,"append-to-body":""},on:{"update:visible":function(t){e.visible=t}}},[e.isInit?n("avue-crud",{ref:"crud",attrs:{option:e.option,"table-loading":e.loading,data:e.data,page:e.page},on:{"update:page":function(t){e.page=t},"search-change":e.searchChange,"search-reset":e.searchReset,"selection-change":function(t){e.selectionList=t},"current-change":function(t){e.page.currentPage=t},"size-change":function(t){e.page.pageSize=t},"row-click":e.rowClick,"on-load":e.onLoad},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}}):e._e(),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"mini"},on:{click:e.handleClose}},[e._v(e._s(e.t("wf.panel.node.assignee.v2.cancel")))]),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleConfirm}},[e._v(e._s(e.t("wf.panel.node.assignee.v2.submit")))])],1)],1)},o=[],r=n("863c"),s=(n("f96e"),n("2c50"),n("84f7"),n("2eb0"),n("7352"),n("adae"),n("99ab"),n("6b5e")),a={mixins:[s["a"]],props:{defaultChecked:String,userUrl:String,customOption:Object},watch:{visible:{handler:function(e){e&&this.changeDefaultChecked()}}},computed:{ids:function(){var e=this,t=[];return this.selectionList.forEach((function(n){t.push(n[e.props.id])})),t.join(",")},names:function(){var e=this,t=[];return this.selectionList.forEach((function(n){t.push(n[e.props.name])})),t.join(",")}},data:function(){var e=this;return{isInit:!1,visible:!1,form:{},query:{},loading:!1,page:{pageSize:10,currentPage:1,total:0},selectionList:[],data:[],props:{id:"id",name:"realName",records:"data.data.records",total:"data.data.total"},option:{size:"mini",searchSize:"mini",searchMenuSpan:6,align:"center",menu:!1,addBtn:!1,header:!1,border:!0,tip:!1,reserveSelection:!0,highlightCurrentRow:!0,gutter:1,selection:!0,column:[{label:e.t("wf.panel.node.assignee.v2.user.avatar"),prop:"avatar",type:"upload",width:90},{label:e.t("wf.panel.node.assignee.v2.user.name"),prop:"name",overHidden:!0,search:!0},{label:e.t("wf.panel.node.assignee.v2.user.dept"),prop:"deptName",overHidden:!0,search:!0},{label:e.t("wf.panel.node.assignee.v2.user.post"),prop:"postName",overHidden:!0,search:!0}]}}},mounted:function(){this.init()},methods:{init:function(){if(!this.isInit){if(this.customOption){var e=this.customOption,t=e.column,n=e.userProps;t&&this.$set(this.option,"column",t),n&&this.$set(this,"props",n)}this.isInit=!0}},handleConfirm:function(){0!==this.selectionList.length?(this.$emit("confirm",this.ids,this.names),this.handleClose()):this.$message.warning(this.t("wf.panel.node.assignee.v2.message"))},handleClose:function(e){this.visible=!1,e&&"function"==typeof e&&e()},searchReset:function(){this.query={},this.onLoad(this.page)},searchChange:function(e,t){this.query=e,this.page.currentPage=1,this.onLoad(this.page,e),t()},selectionClear:function(){this.selectionList=[],this.$refs.crud&&this.$refs.crud.toggleSelection()},rowClick:function(e){this.$refs.crud.toggleSelection([e])},changeDefaultChecked:function(){var e=this;if(this.selectionClear(),this.defaultChecked){var t=this.defaultChecked.split(",");t.length>0&&t.forEach((function(t){var n=e.data.find((function(e){return e.id==t}));n&&e.$refs.crud.toggleRowSelection(n,!0)}))}},onLoad:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.loading=!0;var i=Object(r["a"])({current:e.currentPage,size:e.pageSize},Object.assign(n,this.query));this.$axios.get(this.userUrl,{params:i}).then((function(e){t.page.total=t.getAsVal(e,t.props.total),t.data=t.getAsVal(e,t.props.records)||[],t.loading=!1}))},getAsVal:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=this.deepClone(e);return this.validatenull(n)||n.split(".").forEach((function(e){i=t.validatenull(i[e])?"":i[e]})),i}}},l=a,c=n("e3d4"),h=Object(c["a"])(l,i,o,!1,null,null,null);t["a"]=h.exports},f9ba:function(e,t,n){e.exports=n.p+"fonts/fontawesome-webfont.b06871f2.ttf"},fa89:function(e,t,n){var i=n("6965"),o=n("7d86"),r=n("0da4");i||o(Object.prototype,"toString",r,{unsafe:!0})},fb3d:function(e,t,n){e.exports=n.p+"fonts/fontawesome-webfont.af7ae505.woff2"},fbcf:function(e,t,n){var i=n("e244"),o=n("eee7"),r=i.String,s=i.TypeError;e.exports=function(e){if(o(e))return e;throw s(r(e)+" is not an object")}},fbdf:function(e,t,n){"use strict";n("f96e"),n("37fd");var i=n("c201").every,o=n("c201").some;function r(e,t){var n=t.parent;while(n){if(n===e)return!0;n=n.parent}return!1}e.exports.is=function(e,t){if("label"!==e.type){Array.isArray(t)||(t=[t]);var n=!1;return t.forEach((function(t){t===e.type&&(n=!0)})),n}},e.exports.isTypedEvent=function(e,t,n){function r(e,t){return i(t,(function(t,n){return e[n]==t}))}return o(e.eventDefinitions,(function(i){return i.$type===t&&r(e,n)}))},e.exports.getBusinessObject=function(e){return e&&e.businessObject||e},e.exports.isAncestor=r,e.exports.getDescendants=function(e,t){return e.filter((function(e){return r(t,e)}))},e.exports.supportedElements=["bpmn:Association","bpmn:BoundaryEvent","bpmn:BusinessRuleTask","bpmn:CallActivity","bpmn:DataInputAssociation","bpmn:DataObjectReference","bpmn:DataOutputAssociation","bpmn:DataStoreReference","bpmn:EndEvent","bpmn:EventBasedGateway","bpmn:ExclusiveGateway","bpmn:IntermediateCatchEvent","bpmn:ManualTask","bpmn:ParallelGateway","bpmn:Process","bpmn:ScriptTask","bpmn:SequenceFlow","bpmn:ServiceTask","bpmn:StartEvent","bpmn:SubProcess","bpmn:Task","bpmn:TextAnnotation","bpmn:UserTask"]},fc01:function(e,t,n){"use strict";var i=n("b623"),o=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)};e.exports.f=function(e){return new o(e)}},fc08:function(e,t,n){var i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(M){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof m?t:m,r=Object.create(o.prototype),s=new L(i||[]);return r._invoke=x(e,n,s),r}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var u="suspendedStart",d="suspendedYield",p="executing",f="completed",g={};function m(){}function b(){}function v(){}var y={};y[r]=function(){return this};var w=Object.getPrototypeOf,_=w&&w(w(I([])));_&&_!==n&&i.call(_,r)&&(y=_);var C=v.prototype=m.prototype=Object.create(y);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,r,s,a){var l=h(e[o],e,r);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"===typeof u&&i.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,s,a)}),(function(e){n("throw",e,s,a)})):t.resolve(u).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,a)}))}a(l.arg)}var o;function r(e,i){function r(){return new t((function(t,o){n(e,i,t,o)}))}return o=o?o.then(r,r):r()}this._invoke=r}function x(e,t,n){var i=u;return function(o,r){if(i===p)throw new Error("Generator is already running");if(i===f){if("throw"===o)throw r;return N()}n.method=o,n.arg=r;while(1){var s=n.delegate;if(s){var a=S(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===u)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var l=h(e,t,n);if("normal"===l.type){if(i=n.done?f:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=f,n.method="throw",n.arg=l.arg)}}}function S(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator["return"]&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var r=o.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(e){if(e){var n=e[r];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function n(){while(++o<e.length)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}return{next:N}}function N(){return{value:t,done:!0}}return b.prototype=C.constructor=v,v.constructor=b,b.displayName=l(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,a,"GeneratorFunction")),e.prototype=Object.create(C),e},e.awrap=function(e){return{__await:e}},A(E.prototype),E.prototype[s]=function(){return this},e.AsyncIterator=E,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var s=new E(c(t,n,i,o),r);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},A(C),l(C,a,"Generator"),C[r]=function(){return this},C.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){while(t.length){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=I,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return a.type="throw",a.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=e,s.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;D(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:I(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=i}catch(o){Function("r","regeneratorRuntime = r")(i)}},fc4e:function(e,t,n){var i=n("6f9e"),o=n("ac97"),r=n("9564"),s=n("d53b"),a=n("6043"),l=n("9550"),c=function(){},h=[],u=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=i(d.exec),f=!d.exec(c),g=function(e){if(!r(e))return!1;try{return u(c,h,e),!0}catch(t){return!1}},m=function(e){if(!r(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return f||!!p(d,l(e))};e.exports=!u||o((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?m:g},fc78:function(e,t,n){e.exports=n("a940")},fc9a:function(e,t,n){var i=n("e244");e.exports=i.Promise},fd0a:function(e,t,n){"use strict";var i=/,?([a-z]),?/gi,o=parseFloat,r=Math,s=r.PI,a=r.min,l=r.max,c=r.pow,h=r.abs,u=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,d=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,p=Array.isArray||function(e){return e instanceof Array};function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)f(e,n)&&(t[n]=g(e[n]));return t}function m(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function b(e){function t(){var n=Array.prototype.slice.call(arguments,0),i=n.join("␀"),o=t.cache=t.cache||{},r=t.count=t.count||[];return f(o,i)?(m(r,i),o[i]):(r.length>=1e3&&delete o[r.shift()],r.push(i),o[i]=e.apply(0,n),o[i])}return t}function v(e){if(!e)return null;var t=y(e);if(t.arr)return g(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return p(e)&&p(e[0])&&(i=g(e)),i.length||String(e).replace(u,(function(e,t,o){var r=[],s=t.toLowerCase();o.replace(d,(function(e,t){t&&r.push(+t)})),"m"==s&&r.length>2&&(i.push([t].concat(r.splice(0,2))),s="l",t="m"==t?"l":"L");while(r.length>=n[s])if(i.push([t].concat(r.splice(0,n[s]))),!n[s])break})),i.toString=y.toString,t.arr=g(i),i}function y(e){var t=y.ps=y.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)f(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function w(e,t,n,i){return 1===arguments.length&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,height:i,x2:e+n,y2:t+i}}function _(){return this.join(",").replace(i,"$1")}function C(e){var t=g(e);return t.toString=_,t}function A(e,t,n,i,o,r,s,a,l){var h=1-l,u=c(h,3),d=c(h,2),p=l*l,f=p*l,g=u*e+3*d*l*n+3*h*l*l*o+f*s,m=u*t+3*d*l*i+3*h*l*l*r+f*a;return{x:I(g),y:I(m)}}function E(e){var t=F.apply(null,e);return w(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function x(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function S(e,t){return e=w(e),t=w(t),x(t,e.x,e.y)||x(t,e.x2,e.y)||x(t,e.x,e.y2)||x(t,e.x2,e.y2)||x(e,t.x,t.y)||x(e,t.x2,t.y)||x(e,t.x,t.y2)||x(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}function k(e,t,n,i,o){var r=-3*t+9*n-9*i+3*o,s=e*r+6*t-12*n+6*i;return e*s-3*t+3*n}function D(e,t,n,i,o,s,a,l,c){null==c&&(c=1),c=c>1?1:c<0?0:c;for(var h=c/2,u=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,g=0;g<u;g++){var m=h*d[g]+h,b=k(m,e,n,o,a),v=k(m,t,i,s,l),y=b*b+v*v;f+=p[g]*r.sqrt(y)}return h*f}function L(e,t,n,i,o,r,s,c){if(!(l(e,n)<a(o,s)||a(e,n)>l(o,s)||l(t,i)<a(r,c)||a(t,i)>l(r,c))){var h=(e*i-t*n)*(o-s)-(e-n)*(o*c-r*s),u=(e*i-t*n)*(r-c)-(t-i)*(o*c-r*s),d=(e-n)*(r-c)-(t-i)*(o-s);if(d){var p=I(h/d),f=I(u/d),g=+p.toFixed(2),m=+f.toFixed(2);if(!(g<+a(e,n).toFixed(2)||g>+l(e,n).toFixed(2)||g<+a(o,s).toFixed(2)||g>+l(o,s).toFixed(2)||m<+a(t,i).toFixed(2)||m>+l(t,i).toFixed(2)||m<+a(r,c).toFixed(2)||m>+l(r,c).toFixed(2)))return{x:p,y:f}}}}function I(e){return Math.round(1e11*e)/1e11}function N(e,t,n){var i=E(e),o=E(t);if(!S(i,o))return n?0:[];for(var r=D.apply(0,e),s=D.apply(0,t),a=T(e)?1:~~(r/5)||1,l=T(t)?1:~~(s/5)||1,c=[],u=[],d={},p=n?0:[],f=0;f<a+1;f++){var g=A.apply(0,e.concat(f/a));c.push({x:g.x,y:g.y,t:f/a})}for(f=0;f<l+1;f++)g=A.apply(0,t.concat(f/l)),u.push({x:g.x,y:g.y,t:f/l});for(f=0;f<a;f++)for(var m=0;m<l;m++){var b,v=c[f],y=c[f+1],w=u[m],_=u[m+1],C=h(y.x-v.x)<.01?"y":"x",x=h(_.x-w.x)<.01?"y":"x",k=L(v.x,v.y,y.x,y.y,w.x,w.y,_.x,_.y);if(k){if(b=k.x.toFixed(9)+"#"+k.y.toFixed(9),d[b])continue;d[b]=!0;var I=v.t+h((k[C]-v[C])/(y[C]-v[C]))*(y.t-v.t),N=w.t+h((k[x]-w[x])/(_[x]-w[x]))*(_.t-w.t);I>=0&&I<=1&&N>=0&&N<=1&&(n?p++:p.push({x:k.x,y:k.y,t1:I,t2:N}))}}return p}function M(e,t,n){e=j(e),t=j(t);for(var i,o,r,s,a,l,c,h,u,d,p=n?0:[],f=0,g=e.length;f<g;f++){var m=e[f];if("M"==m[0])i=a=m[1],o=l=m[2];else{"C"==m[0]?(u=[i,o].concat(m.slice(1)),i=u[6],o=u[7]):(u=[i,o,i,o,a,l,a,l],i=a,o=l);for(var b=0,v=t.length;b<v;b++){var y=t[b];if("M"==y[0])r=c=y[1],s=h=y[2];else{"C"==y[0]?(d=[r,s].concat(y.slice(1)),r=d[6],s=d[7]):(d=[r,s,r,s,c,h,c,h],r=c,s=h);var w=N(u,d,n);if(n)p+=w;else{for(var _=0,C=w.length;_<C;_++)w[_].segment1=f,w[_].segment2=b,w[_].bez1=u,w[_].bez2=d;p=p.concat(w)}}}}}return p}function B(e){var t=y(e);if(t.abs)return C(t.abs);if(p(e)&&p(e&&e[0])||(e=v(e)),!e||!e.length)return[["M",0,0]];var n,i=[],o=0,r=0,s=0,a=0,l=0;"M"==e[0][0]&&(o=+e[0][1],r=+e[0][2],s=o,a=r,l++,i[0]=["M",o,r]);for(var c,h,u=l,d=e.length;u<d;u++){if(i.push(c=[]),h=e[u],n=h[0],n!=n.toUpperCase())switch(c[0]=n.toUpperCase(),c[0]){case"A":c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=+h[6]+o,c[7]=+h[7]+r;break;case"V":c[1]=+h[1]+r;break;case"H":c[1]=+h[1]+o;break;case"M":s=+h[1]+o,a=+h[2]+r;default:for(var f=1,g=h.length;f<g;f++)c[f]=+h[f]+(f%2?o:r)}else for(var m=0,b=h.length;m<b;m++)c[m]=h[m];switch(n=n.toUpperCase(),c[0]){case"Z":o=+s,r=+a;break;case"H":o=c[1];break;case"V":r=c[1];break;case"M":s=c[c.length-2],a=c[c.length-1];default:o=c[c.length-2],r=c[c.length-1]}}return i.toString=_,t.abs=C(i),i}function T(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function O(e,t,n,i){return[e,t,n,i,n,i]}function R(e,t,n,i,o,r){var s=1/3,a=2/3;return[s*e+a*n,s*t+a*i,s*o+a*n,s*r+a*i,o,r]}function P(e,t,n,i,o,a,l,c,u,d){var p,f=120*s/180,g=s/180*(+o||0),m=[],v=b((function(e,t,n){var i=e*r.cos(n)-t*r.sin(n),o=e*r.sin(n)+t*r.cos(n);return{x:i,y:o}}));if(d)k=d[0],D=d[1],x=d[2],S=d[3];else{p=v(e,t,-g),e=p.x,t=p.y,p=v(c,u,-g),c=p.x,u=p.y;var y=(e-c)/2,w=(t-u)/2,_=y*y/(n*n)+w*w/(i*i);_>1&&(_=r.sqrt(_),n*=_,i*=_);var C=n*n,A=i*i,E=(a==l?-1:1)*r.sqrt(h((C*A-C*w*w-A*y*y)/(C*w*w+A*y*y))),x=E*n*w/i+(e+c)/2,S=E*-i*y/n+(t+u)/2,k=r.asin(((t-S)/i).toFixed(9)),D=r.asin(((u-S)/i).toFixed(9));k=e<x?s-k:k,D=c<x?s-D:D,k<0&&(k=2*s+k),D<0&&(D=2*s+D),l&&k>D&&(k-=2*s),!l&&D>k&&(D-=2*s)}var L=D-k;if(h(L)>f){var I=D,N=c,M=u;D=k+f*(l&&D>k?1:-1),c=x+n*r.cos(D),u=S+i*r.sin(D),m=P(c,u,n,i,o,0,l,N,M,[D,I,x,S])}L=D-k;var B=r.cos(k),T=r.sin(k),O=r.cos(D),R=r.sin(D),F=r.tan(L/4),j=4/3*n*F,z=4/3*i*F,V=[e,t],Q=[e+j*T,t-z*B],W=[c+j*R,u-z*O],H=[c,u];if(Q[0]=2*V[0]-Q[0],Q[1]=2*V[1]-Q[1],d)return[Q,W,H].concat(m);m=[Q,W,H].concat(m).join().split(",");for(var U=[],Y=0,G=m.length;Y<G;Y++)U[Y]=Y%2?v(m[Y-1],m[Y],g).y:v(m[Y],m[Y+1],g).x;return U}function F(e,t,n,i,o,s,c,u){for(var d,p,f,g,m,b,v,y,w=[],_=[[],[]],C=0;C<2;++C)if(0==C?(p=6*e-12*n+6*o,d=-3*e+9*n-9*o+3*c,f=3*n-3*e):(p=6*t-12*i+6*s,d=-3*t+9*i-9*s+3*u,f=3*i-3*t),h(d)<1e-12){if(h(p)<1e-12)continue;g=-f/p,0<g&&g<1&&w.push(g)}else v=p*p-4*f*d,y=r.sqrt(v),v<0||(m=(-p+y)/(2*d),0<m&&m<1&&w.push(m),b=(-p-y)/(2*d),0<b&&b<1&&w.push(b));var A,E=w.length,x=E;while(E--)g=w[E],A=1-g,_[0][E]=A*A*A*e+3*A*A*g*n+3*A*g*g*o+g*g*g*c,_[1][E]=A*A*A*t+3*A*A*g*i+3*A*g*g*s+g*g*g*u;return _[0][x]=e,_[1][x]=t,_[0][x+1]=c,_[1][x+1]=u,_[0].length=_[1].length=x+2,{x0:a.apply(0,_[0]),y0:a.apply(0,_[1]),x1:l.apply(0,_[0]),y1:l.apply(0,_[1])}}function j(e){var t=y(e);if(t.curve)return C(t.curve);for(var n=B(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r=function(e,t,n){var i,o;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(P.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,o=2*t.y-t.by):(i=t.x,o=t.y),e=["C",i,o].concat(e.slice(1));break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(R(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(R(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(O(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(O(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(O(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(O(t.x,t.y,t.X,t.Y));break}return e},s=function(e,t){if(e[t].length>7){e[t].shift();var i=e[t];while(i.length)a[t]="A",e.splice(t++,0,["C"].concat(i.splice(0,6)));e.splice(t,1),u=n.length}},a=[],l="",c="",h=0,u=n.length;h<u;h++){n[h]&&(l=n[h][0]),"C"!=l&&(a[h]=l,h&&(c=a[h-1])),n[h]=r(n[h],i,c),"A"!=a[h]&&"C"==l&&(a[h]="C"),s(n,h);var d=n[h],p=d.length;i.x=d[p-2],i.y=d[p-1],i.bx=o(d[p-4])||i.x,i.by=o(d[p-3])||i.y}return t.curve=C(n),n}e.exports=M},fd3f:function(e,t){e.exports={}},fea7:function(e,t,n){const i=n("7741");e.exports={Linter:i}},ff39:function(e,t,n){var i=n("f3d9");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var o=n("4974").default;o("3b9afa76",i,!0,{sourceMap:!1,shadowMode:!1})},ff4d:function(e,t,n){"use strict";n("37fd"),n("adae");var i=n("4580"),o=i.TOGGLE_MODE_EVENT,r=i.RESET_SIMULATION_EVENT,s=i.PROCESS_INSTANCE_CREATED_EVENT,a=i.PROCESS_INSTANCE_FINISHED_EVENT;function l(e,t){var n=this;this._eventBus=e,this._processInstanceIds=t,this.processInstances=[],e.on([o,r],(function(){n.processInstances=[]}))}l.prototype.create=function(e,t){var n=this._processInstanceIds.getNext(),i={parent:e,processInstanceId:n,parentProcessInstanceId:t};return this.processInstances.push(i),this._eventBus.fire(s,i),n},l.prototype.remove=function(e){this.processInstances=this.processInstances.filter((function(t){return t.processInstanceId!==e}))},l.prototype.finish=function(e){var t=this.processInstances.find((function(t){return t.processInstanceId===e}));this._eventBus.fire(a,t),t.isFinished=!0},l.prototype.getProcessInstances=function(e,t){if(!e)return this.processInstances;var n=this.processInstances.filter((function(t){return t.parent===e}));return t&&!0!==t.includeFinished&&(n=n.filter((function(e){return!e.isFinished}))),n},l.prototype.getProcessInstance=function(e){return this.processInstances.find((function(t){return t.processInstanceId===e}))},l.$inject=["eventBus","processInstanceIds"],e.exports=l},ff5c:function(e,t,n){"use strict";var i=n("fbcf");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ffc8:function(e,t,n){"use strict";n("f96e"),n("37fd"),n("2f62"),n("26c4"),n("fa89"),n("f05e");var i=n("d1cc"),o=n("7299").query,r=n("4580"),s=r.RESET_SIMULATION_EVENT,a=r.PLAY_SIMULATION_EVENT,l=r.PAUSE_SIMULATION_EVENT,c=r.TERMINATE_EVENT,h=r.PROCESS_INSTANCE_FINISHED_EVENT,u=r.ANIMATION_CREATED_EVENT,d=n("fbdf").isAncestor,p=n("4e99"),f=p.distance,g=getComputedStyle(document.documentElement).getPropertyValue("--token-simulation-green-base-44");function m(e){return 1===e}function b(e){return 2==e.length}var v=0,y="-",w="<",_="<>",C=20;function A(e,t){var n=window.animation=this;this._eventBus=t,this.animations=[],this.hiddenAnimations=[],this.animationSpeed=1,t.on("import.done",(function(){var t=i(e._svg),r=o(".viewport",e._svg),s=i.adopt(r);n.group=t.group().attr("id","token-simulation"),s.put(n.group)})),t.on(c,(function(e){var t=e.element,i=t.parent;n.animations.forEach((function(e){d(i,e.element)&&(e.animation.stop(),n.animations=n.animations.filter((function(t){return t!==e})))}))})),t.on(h,(function(e){var t=e.parent;n.animations.forEach((function(i){(e.processInstanceId===i.processInstanceId||d(t,i.element))&&(i.animation.stop(),n.animations=n.animations.filter((function(e){return e!==i})))}))})),t.on(s,(function(){n.animations.forEach((function(e){e.animation.stop()})),n.animations=[],n.hiddenAnimations=[]})),t.on(l,(function(){n.animations.forEach((function(e){e.animation.pause()}))})),t.on(a,(function(){n.animations.forEach((function(e){e.animation.play()}))}))}function E(e,t,n){this.gfx=this.fx=e,this.waypoints=t,this.done=n,this.create()}A.prototype.createAnimation=function(e,t,n){var i=this;if(this.group){var o,r=this._createTokenGfx(t);return o=new E(r,e.waypoints,(function(){i.animations=i.animations.filter((function(e){return e.animation!==o})),n&&n()})),this.hiddenAnimations.includes(t)&&r.hide(),r.fx._speed=this.animationSpeed,this.animations.push({tokenGfx:r,animation:o,element:e,processInstanceId:t}),this._eventBus.fire(u,{tokenGfx:r,animation:o,element:e,processInstanceId:t}),o}},A.prototype.setAnimationSpeed=function(e){this.animations.forEach((function(t){t.tokenGfx.fx._speed=e})),this.animationSpeed=e},A.prototype._createTokenGfx=function(e){var t=this.group.group().attr("class","token").hide();return t.circle(C,C).attr("fill",g).attr("class","circle"),t.text(e.toString()).attr("transform","translate(10, -7)").attr("text-anchor","middle").attr("class","text"),t},A.prototype.showProcessInstanceAnimations=function(e){this.animations.forEach((function(t){t.processInstanceId===e&&t.tokenGfx.show()})),this.hiddenAnimations=this.hiddenAnimations.filter((function(t){return t!==e}))},A.prototype.hideProcessInstanceAnimations=function(e){this.animations.forEach((function(t){t.processInstanceId===e&&t.tokenGfx.hide()})),this.hiddenAnimations.push(e)},A.$inject=["canvas","eventBus"],e.exports=A,E.prototype.create=function(){var e=this.gfx,t=this.waypoints,n=this.done,i=this.fx;e.show().move(t[0].x-C/2,t[0].y-C/2),t.forEach((function(e,n){if(n>0){var o=e.x-C/2,r=e.y-C/2,s=m(n)?w:y;b(t)&&(s=_);var a=20*f(t[n-1],e);i=i.animate(a,s,v).move(o,r)}})),i.after((function(){e.remove(),n()}))},E.prototype.play=function(){this.gfx.play()},E.prototype.pause=function(){this.gfx.pause()},E.prototype.stop=function(){this.fx.stop(),this.gfx.remove()}},ffe9:function(e,t,n){"use strict";n("f96e");var i=n("fbdf").is,o=n("4580"),r=o.UPDATE_ELEMENTS_EVENT;function s(e,t){this._eventBus=e,this._animation=t}s.prototype.consume=function(e){var t=e.element,n=e.processInstanceId;t.tokenCount||(t.tokenCount={}),t.tokenCount[n]||(t.tokenCount[n]=0),t.tokenCount[n]++;var o=t.outgoing,s=[];o.forEach((function(e){var t=e.target;i(t,"bpmn:IntermediateCatchEvent")&&s.push(t)})),this._eventBus.fire(r,{elements:s})},s.prototype.generate=function(){},s.$inject=["eventBus","animation"],e.exports=s}})}));