initial commit with charts and assistant chat
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9445],{67725:(e,t,i)=>{i.d(t,{createLineStyleDefinition:()=>f});var n=i(11542),r=i(95804),o=i(95338),s=i(91682);const l=new r.TranslatedString("change {toolName} line visibility",n.t(null,void 0,i(24550))),a=new r.TranslatedString("change {toolName} line width",n.t(null,void 0,i(19541))),d=new r.TranslatedString("change {toolName} line style",n.t(null,void 0,i(66429))),c=new r.TranslatedString("change {toolName} line color",n.t(null,void 0,i(24059))),h=new r.TranslatedString("change {toolName} line extending left",n.t(null,void 0,i(18773))),u=new r.TranslatedString("change {toolName} line left end",n.t(null,void 0,i(21474))),p=new r.TranslatedString("change {toolName} line extending right",n.t(null,void 0,i(43823))),_=new r.TranslatedString("change {toolName} line right end",n.t(null,void 0,i(54827))),g=n.t(null,void 0,i(3554)),P=n.t(null,void 0,i(61856)),S=n.t(null,void 0,i(87430));function f(e,t,i,n,r){const f={},y={id:`${(0,s.removeSpaces)(i.originalText())}${n}`,title:r&&r.line||g};return void 0!==t.showLine&&(f.checked=(0,o.convertToDefinitionProperty)(e,t.showLine,l.format({toolName:i}))),void 0!==t.lineWidth&&(f.width=(0,o.convertToDefinitionProperty)(e,t.lineWidth,a.format({toolName:i}))),void 0!==t.lineStyle&&(f.style=(0,o.convertToDefinitionProperty)(e,t.lineStyle,d.format({toolName:i}))),void 0!==t.lineColor&&(f.color=(0,o.getColorDefinitionProperty)(e,t.lineColor,null,c.format({toolName:i}))),void 0!==t.extendLeft&&(f.extendLeft=(0,o.convertToDefinitionProperty)(e,t.extendLeft,h.format({toolName:i})),y.extendLeftTitle=r&&r.extendLeftTitle||P),void 0!==t.leftEnd&&(f.leftEnd=(0,o.convertToDefinitionProperty)(e,t.leftEnd,u.format({toolName:i}))),void 0!==t.extendRight&&(f.extendRight=(0,o.convertToDefinitionProperty)(e,t.extendRight,p.format({toolName:i})),y.extendRightTitle=r&&r.extendRightTitle||S),void 0!==t.rightEnd&&(f.rightEnd=(0,o.convertToDefinitionProperty)(e,t.rightEnd,_.format({toolName:i}))),(0,o.createLinePropertyDefinition)(f,y)}},38111:(e,t,i)=>{i.r(t),i.d(t,{CyclicAndSineLinesPatternDefinitionsViewModel:()=>a});var n=i(11542),r=i(95804),o=i(67725),s=i(14472);const l=n.t(null,void 0,i(56982));class a extends s.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=this._source.properties().childs();return{definitions:[(0,o.createLineStyleDefinition)(this._propertyApplier,{lineColor:e.linecolor,lineWidth:e.linewidth,lineStyle:e.linestyle},new r.TranslatedString(this._source.name(),this._source.translatedType()),"Line",{line:l})]}}}},14472:(e,t,i)=>{i.r(t),i.d(t,{LineDataSourceDefinitionsViewModel:()=>m,LineDataSourceTabTypes:()=>n,pointPriceBarTitle:()=>y});var n,r=i(50151),o=i(11542),s=i(95804),l=(i(40167),i(95338)),a=i(60567),d=i(22613),c=i(73863),h=i(97578),u=i(81634),p=i(36313);!function(e){e.Visibility="visibility",e.Coordinates="coordinates",e.Style="style",e.Text="text",e.Inputs="inputs"}(n||(n={}))
|
||||
;const _=o.t(null,void 0,i(40091)),g=o.t(null,void 0,i(78930)),P=o.t(null,void 0,i(92516)),S=o.t(null,void 0,i(70320)),f=o.t(null,void 0,i(21429)),y=o.t(null,{context:"linetool point"},i(80166));class m{constructor(e,t){this._yCoordinateStepWV=null,this._propertyPages=[],this._source=t,this._undoModel=e,this._ownerSource=(0,r.ensureNotNull)(this._source.ownerSource()),this._propertyApplier=new u.PropertyApplierWithoutSavingChart((()=>e)),this._createPropertyRages()}destroy(){null!==this._yCoordinateStepWV&&(this._source.ownerSourceChanged().unsubscribeAll(this),this._ownerSource.priceStepChanged().unsubscribeAll(this)),this._source.pointAdded().unsubscribeAll(this),this._propertyPages.forEach((e=>{(0,l.destroyDefinitions)(e.definitions.value())}))}propertyPages(){return Promise.resolve(this._propertyPages)}_createPropertyRages(){this._propertyPages=[];const e=this._createInputsPropertyPage();null!==e&&this._propertyPages.push(e);const t=this._createStylePropertyPage();null!==t&&this._propertyPages.push(t);const i=this._createTextPropertyPage();null!==i&&this._propertyPages.push(i);const n=this._createCoordinatesPropertyPage();null!==n&&(n.visible=this._source.hasEditableCoordinates(),this._propertyPages.push(n));const r=this._createVisibilitiesPropertyPage();this._propertyPages.push(r)}_createVisibilitiesPropertyPage(){const e=this._source.properties().childs().intervalsVisibilities.childs();return(0,a.createPropertyPage)((0,c.getIntervalsVisibilitiesPropertiesDefinitions)(this._propertyApplier,e,new s.TranslatedString(this._source.name(),this._source.title(p.TitleDisplayTarget.StatusLine,!0))),"visibility",_)}_createCoordinatesPropertyPage(){const e=this._coordinatesPropertyDefinitions();return null!==e?(e.definitions.length<this._source.pointsCount()&&this._source.pointAdded().subscribe(this,this._updateCoordinatesPropertyDefinitons),(0,a.createPropertyPage)(e,"coordinates",g)):null}_getYCoordinateStepWV(){return null===this._yCoordinateStepWV&&(this._yCoordinateStepWV=new d.WatchedValue(function(e){if(null!==e){const t=e.priceStep();if(null!==t)return t}return 1}(this._source.ownerSource())),this._ownerSource.priceStepChanged().subscribe(this,(()=>this._updateYCoordinateStep())),this._source.ownerSourceChanged().subscribe(this,(()=>{this._ownerSource.priceStepChanged().unsubscribeAll(this),this._ownerSource=(0,r.ensureNotNull)(this._source.ownerSource()),this._ownerSource.priceStepChanged().subscribe(this,(()=>this._updateYCoordinateStep()))}))),this._yCoordinateStepWV}_coordinatesPropertyDefinitions(){const e=this._source.points(),t=this._source.pointsProperty().childs().points,i=[],n=this._getYCoordinateStepWV();return e.forEach(((e,r)=>{const o=t[r].childs();o&&i.push((0,h.getCoordinatesPropertiesDefinitions)(this._propertyApplier,o,e,n,y.format({count:(r+1).toString()}),this._source.name()))})),{definitions:i}}_createStylePropertyPage(){const e=this._stylePropertyDefinitions();return null!==e?(0,a.createPropertyPage)(e,"style",P):null}_stylePropertyDefinitions(){return null}_createTextPropertyPage(){
|
||||
const e=this._textPropertyDefinitions();return null!==e?(0,a.createPropertyPage)(e,"text",S):null}_textPropertyDefinitions(){return null}_createInputsPropertyPage(){const e=this._inputsPropertyDefinitions();return null!==e?(0,a.createPropertyPage)(e,"inputs",f):null}_inputsPropertyDefinitions(){return null}_updateYCoordinateStep(){const e=this._ownerSource.priceStep();this._getYCoordinateStepWV().setValue(e||1)}_updateCoordinatesPropertyDefinitons(){const e=this._coordinatesPropertyDefinitions();if(null!==e){(0,r.ensureDefined)(this._propertyPages.find((e=>"coordinates"===e.id))).definitions.setValue(e.definitions),this._source.points().length===this._source.pointsCount()&&this._source.pointAdded().unsubscribeAll(this)}}}},75249:(e,t,i)=>{i.r(t),i.d(t,{LineToolCyclicLines:()=>R});var n=i(41414),r=i(10555),o=i(94602),s=i(25672),l=i(80819),a=i(54707),d=i(64960),c=i(73914),h=i(2383),u=i(69558);class p extends a.LineSourcePaneView{constructor(){super(...arguments),this._coordinates=[],this._trendRenderer=new l.TrendLineRenderer,this._renderer=new o.CompositeRenderer}renderer(e){return this._invalidated&&this._updateImpl(e),this._renderer}_updateImpl(e){if(super._updateImpl(e),this._renderer.clear(),this._source.points().length<2)return;const t=this._model.timeScale(),i=this._source.priceScale();if(!i||i.isEmpty()||t.isEmpty())return;const n=this._source.points()[0],o=this._source.points()[1],l=o?o.index-n.index:1;if(this._coordinates=[],0===l)return;const a=t.visibleBarsStrictRange();if(null===a)return;if(l>0){for(let e=n.index;e<=a.lastBar();e+=l)this._coordinates.push(t.indexToCoordinate(e))}else{for(let e=n.index;e>=a.firstBar();e+=l)this._coordinates.push(t.indexToCoordinate(e))}if(this._points.length<2)return;const p=this._source.properties().childs(),_={points:this._points,color:"#808080",linewidth:1,linestyle:u.LINESTYLE_DASHED,extendleft:!1,extendright:!1,leftend:s.LineEnd.Normal,rightend:s.LineEnd.Normal};this._trendRenderer.setData(_),this._renderer.append(this._trendRenderer);for(let e=0;e<this._coordinates.length;e++){const t={x:this._coordinates[e],color:p.linecolor.value(),linewidth:p.linewidth.value(),linestyle:p.linestyle.value()},i=new d.VerticalLineRenderer;i.setData(t),this._renderer.append(i)}if(2===this._source.points().length){const e=this._points.map((e=>({point:e,pointIndex:e.pointIndex})));this._renderer.append(this.createLineAnchor({points:e},0))}else this._renderer.append(this.createLineAnchor({points:[(0,c.lineSourcePaneViewPointToLineAnchorPoint)(new r.Point(this._points[0].x,i.height()/2),void 0,void 0,void 0,h.HitTarget.MovePoint)]},1))}}var _=i(38111),g=i(50151),P=i(24633),S=i(37293),f=i(31558),y=i(78176),m=i(70031),v=i(88636),T=i(65045);const w={intervalsVisibilities:{...S.intervalsVisibilitiesDefaults},linewidth:2,linestyle:u.LINESTYLE_SOLID},b={linecolor:"#80ccdb"},x=new Map([[P.StdTheme.Light,b],[P.StdTheme.Dark,b]]),D=(0,y.extractThemedColors)((0,g.ensureDefined)(x.get(P.StdTheme.Light)),(0,g.ensureDefined)(x.get(P.StdTheme.Dark))),C=(0,y.extractAllPropertiesKeys)((0,
|
||||
g.ensureDefined)(x.get(P.StdTheme.Light))),I=(0,y.extractAllPropertiesKeys)(w),L=[...new Set([...C,...I,...f.commonLineToolPropertiesStateKeys])];class A extends v.LineDataSourceProperty{constructor(e){super(e),this.addChild("linesColors",new T.LineToolColorsProperty([(0,g.ensureDefined)(this.child("linecolor"))])),this.addChild("linesWidths",new T.LineToolWidthsProperty([(0,g.ensureDefined)(this.child("linewidth"))]))}static create(e,t){return new this({defaultName:"linetoolcirclelines",factoryDefaultsSupplier:()=>(0,m.factoryDefaultsForCurrentTheme)(w,x),nonThemedDefaultsKeys:I,themedDefaultsKeys:C,allStateKeys:L,themedColors:D,replaceThemedColorsOnThemeChange:!0,state:t,theme:e})}}class R extends n.LineDataSource{constructor(e,t,i,n){super(e,t??R.createProperties(e.backgroundTheme().spawnOwnership()),i,n),this._setPaneViews([new p(this,e)])}pointsCount(){return 2}name(){return"Cyclic Lines"}template(){return this._properties.template()}static createProperties(e,t){const i=A.create(e,t);return this._configureProperties(i),i}async _getPropertyDefinitionsViewModelClass(){return _.CyclicAndSineLinesPatternDefinitionsViewModel}static _addCollectedProperties(e){}}},31558:(e,t,i)=>{i.d(t,{commonLineToolPropertiesStateKeys:()=>n});const n=["symbolStateVersion","zOrderVersion","frozen","title","interval","symbol","currencyId","unitId","visible","intervalsVisibilities.ticks","intervalsVisibilities.seconds","intervalsVisibilities.secondsFrom","intervalsVisibilities.secondsTo","intervalsVisibilities.minutes","intervalsVisibilities.minutesFrom","intervalsVisibilities.minutesTo","intervalsVisibilities.hours","intervalsVisibilities.hoursFrom","intervalsVisibilities.hoursTo","intervalsVisibilities.days","intervalsVisibilities.daysFrom","intervalsVisibilities.daysTo","intervalsVisibilities.weeks","intervalsVisibilities.weeksFrom","intervalsVisibilities.weeksTo","intervalsVisibilities.months","intervalsVisibilities.monthsFrom","intervalsVisibilities.monthsTo","intervalsVisibilities.ranges"];var r,o,s;!function(e){e[e.NotShared=0]="NotShared",e[e.SharedInLayout=1]="SharedInLayout",e[e.GloballyShared=2]="GloballyShared"}(r||(r={})),function(e){e.BeforeAllAction="BeforeAll",e.CustomAction="CustomAction"}(o||(o={})),function(e){e.FloatingToolbarButton="FloatingToolbarButton",e.Default="Default"}(s||(s={}))},54707:(e,t,i)=>{i.d(t,{LineSourcePaneView:()=>P,anchorResizeCursorType:()=>_,createLineSourcePaneViewPoint:()=>g});var n=i(58978),r=i(50151),o=i(39612),s=i(2383),l=i(45801),a=i(73914),d=i(43838),c=i(4753);const h=n.colorsPalette["color-tv-blue-600"];var u,p;function _(e,t){const i=e.x-t.x,n=e.y-t.y;if(!Number.isFinite(i)||!Number.isFinite(n)||0===i&&0===n)return d.PaneCursorType.Default;let o=Math.atan2(n,i);return o<0&&(o+=2*Math.PI),
|
||||
o>=p.deg337_5||o<p.deg22_5||o>=p.deg157_5&&o<p.deg202_5?d.PaneCursorType.HorizontalResize:o>=p.deg22_5&&o<p.deg67_5||o>=p.deg202_5&&o<p.deg247_5?d.PaneCursorType.DiagonalNwSeResize:o>=p.deg67_5&&o<p.deg112_5||o>=p.deg247_5&&o<p.deg292_5?d.PaneCursorType.VerticalResize:o>=p.deg112_5&&o<p.deg157_5||o>=p.deg292_5&&o<p.deg337_5?d.PaneCursorType.DiagonalNeSwResize:void(0,r.assert)(!1,"unexpected angle")}function g(e,t){return e.pointIndex=t,e}!function(e){e[e.RegularAnchorRadius=6]="RegularAnchorRadius",e[e.TouchAnchorRadius=13]="TouchAnchorRadius",e[e.RegularStrokeWidth=1]="RegularStrokeWidth",e[e.TouchStrokeWidth=3]="TouchStrokeWidth",e[e.RegularSelectedStrokeWidth=3]="RegularSelectedStrokeWidth",e[e.TouchSelectedStrokeWidth=0]="TouchSelectedStrokeWidth"}(u||(u={})),function(e){e[e.deg22_5=Math.PI/8]="deg22_5",e[e.deg67_5=3*Math.PI/8]="deg67_5",e[e.deg112_5=5*Math.PI/8]="deg112_5",e[e.deg157_5=7*Math.PI/8]="deg157_5",e[e.deg202_5=9*Math.PI/8]="deg202_5",e[e.deg247_5=11*Math.PI/8]="deg247_5",e[e.deg292_5=13*Math.PI/8]="deg292_5",e[e.deg337_5=15*Math.PI/8]="deg337_5"}(p||(p={}));class P{constructor(e,t,i){this._invalidated=!0,this._points=[],this._middlePoint=null,this._selectionRenderers=[],this._lineAnchorRenderers=[],this._source=e,this._model=t,this._ownerSource=i??null}priceToCoordinate(e){const t=this._getOwnerSource(),i=t?.priceScale();if(null==i)return null;const n=null!==t?t.firstValue():null;return null===n?null:i.priceToCoordinate(e,n)}anchorColor(){return h}isHoveredSource(){return this._source===this._model.hoveredSource()}isSelectedSource(){return this._model.selection().isSelected(this._source)}isBeingEdited(){return this._model.lineBeingEdited()===this._source}isEditMode(){return!this._model.isSnapshot()}areAnchorsVisible(){return(this.isHoveredSource()&&!this.isLocked()||this.isSelectedSource())&&this.isEditMode()}update(){this._invalidated=!0}isLocked(){return Boolean(this._source.isLocked&&this._source.isLocked())}addAnchors(e,t={}){let i=this._getPoints();this._model.lineBeingCreated()===this._source&&(i=i.slice(0,-1));const n=this._source.points(),r=i.map(((e,t)=>{const i=n[t],r=(0,a.lineSourcePaneViewPointToLineAnchorPoint)(e);return i&&(r.snappingPrice=i.price,r.snappingIndex=i.index),r}));e.append(this.createLineAnchor({...t,points:r},0))}createLineAnchor(e,t){const i=e.points.map((e=>e.point)),n=this._getOwnerSource();if(this.isLocked()){const r=this._getSelectionRenderer(t);return r.setData({bgColors:this._lineAnchorColors(i),points:e.points,visible:this.areAnchorsVisible(),hittestResult:s.HitTarget.Regular,ownerSourceId:n?.id(),barSpacing:this._model.timeScale().barSpacing()}),r}const r=(0,o.lastMouseOrTouchEventInfo)().isTouch,l=this._getLineAnchorRenderer(t),a=this.isHoveredSource()?this._model.lastHittestData()?.pointIndex??null:null;return l.setData({...e,color:this.anchorColor(),backgroundColors:this._lineAnchorColors(i),hoveredPointIndex:a,linePointBeingEdited:this.isBeingEdited()?this._model.linePointBeingEdited():null,radius:this._anchorRadius(),
|
||||
strokeWidth:r?u.TouchStrokeWidth:u.RegularStrokeWidth,selected:this.isSelectedSource(),selectedStrokeWidth:r?u.TouchSelectedStrokeWidth:u.RegularSelectedStrokeWidth,visible:this.areAnchorsVisible(),clickHandler:e.clickHandler,ownerSourceId:n?.id()}),l}_getOwnerSource(){return this._ownerSource??this._source.ownerSource()}_anchorRadius(){return(0,o.lastMouseOrTouchEventInfo)().isTouch?u.TouchAnchorRadius:u.RegularAnchorRadius}_lineAnchorColors(e){const t=(0,r.ensureNotNull)(this._model.paneForSource(this._source)).height();return e.map((e=>this._model.backgroundColorAtYPercentFromTop(e.y/t)))}_updateImpl(e){this._points=[];this._model.timeScale().isEmpty()||this._validatePriceScale()&&(this._source.points().forEach(((e,t)=>{const i=this._source.pointToScreenPoint(e,this._ownerSource??void 0);i&&this._points.push(g(i,t))})),2===this._points.length&&(this._middlePoint=this._source.calcMiddlePoint(this._points[0],this._points[1])),this._invalidated=!1)}_validatePriceScale(){const e=this._getOwnerSource()?.priceScale();return null!=e&&!e.isEmpty()}_getSource(){return this._source}_getPoints(){return this._points}_getModel(){return this._model}_height(){const e=this._getOwnerSource()?.priceScale();return null!=e?e.height():0}_width(){return this._model.timeScale().width()}_needLabelExclusionPath(e,t){const i=this._source.properties().childs();return"middle"===(t??i.vertLabelsAlign.value())&&(0,c.needTextExclusionPath)(e)}_addAlertRenderer(e,t,i=this._source.properties().linecolor.value()){}_getAlertRenderer(e,t=this._source.properties().linecolor.value(),i){return null}_getSelectionRenderer(e){for(;this._selectionRenderers.length<=e;)this._selectionRenderers.push(new l.SelectionRenderer);return this._selectionRenderers[e]}_getLineAnchorRenderer(e){for(;this._lineAnchorRenderers.length<=e;)this._lineAnchorRenderers.push(new a.LineAnchorRenderer);return this._lineAnchorRenderers[e]}}},88636:(e,t,i)=>{i.d(t,{LineDataSourceProperty:()=>l});var n=i(90054),r=i(16738),o=i(50151),s=i(78176);class l extends s.DefaultProperty{constructor({templateKeys:e,...t}){super({ignoreAllowSavingDefaults:!0,saveNonDefaultUserPreferencesOnly:!0,...t}),this._templateKeys=(0,o.ensureDefined)(e||this._allDefaultsKeys)}template(){return(0,s.extractState)(this.state(),this._templateKeys,[])}applyTemplate(e){this.mergeAndFire((0,s.extractState)((0,r.default)((0,n.default)(this._factoryDefaultsSupplier()),e),this._templateKeys))}}},73914:(e,t,i)=>{i.d(t,{LineAnchorRenderer:()=>S,lineSourcePaneViewPointToLineAnchorPoint:()=>f,lineSourcePaneViewPointToLineAnchorPoint2:()=>y,mapLineSourcePaneViewPointToLineAnchorPoint:()=>m});var n=i(10555),r=i(6453),o=i(50151),s=i(58221),l=i(87465),a=i(2383),d=i(43838),c=i(4539),h=i(10307);function u(e,t,i,n){const{point:r}=t,o=i+n/2;(0,s.drawRoundRect)(e,r.x-o,r.y-o,2*o,2*o,(i+n)/2),e.closePath(),e.lineWidth=n}function p(e,t,i,n){e.globalAlpha=.2,u(e,t,i,n),e.stroke(),e.globalAlpha=1}function _(e,t,i,n){u(e,t,i-n,n),e.fill(),e.stroke()}function g(e,t,i,n){const{point:r}=t;e.globalAlpha=.2,e.beginPath(),
|
||||
e.arc(r.x,r.y,i+n/2,0,2*Math.PI,!0),e.closePath(),e.lineWidth=n,e.stroke(),e.globalAlpha=1}function P(e,t,i,n){const{point:r}=t;e.beginPath(),e.arc(r.x,r.y,i-n/2,0,2*Math.PI,!0),e.closePath(),e.lineWidth=n,e.fill(),e.stroke()}class S extends h.BitmapCoordinatesPaneRenderer{constructor(e){super(),this._data=e??null}setData(e){this._data=e}hitTest(e){if(null===this._data||this._data.disableInteractions)return null;const{radius:t,points:i}=this._data,n=t+(0,c.interactionTolerance)().anchor;for(const t of i){if(t.point.subtract(e).length()<=n)return new a.HitTestResult(t.hitTarget??a.HitTarget.ChangePoint,{areaName:a.AreaName.AnchorPoint,pointIndex:t.pointIndex,cursorType:t.cursorType??d.PaneCursorType.Default,activeItem:t.activeItem,snappingPrice:t.snappingPrice,snappingIndex:t.snappingIndex,nonDiscreteIndex:t.nonDiscreteIndex,possibleMovingDirections:t.possibleMovingDirections,clickHandler:this._data.clickHandler,tapHandler:this._data.clickHandler,ownerSourceId:this._data.ownerSourceId})}return null}doesIntersectWithBox(e){return null!==this._data&&this._data.points.some((t=>(0,r.pointInBox)(t.point,e)))}_drawImpl(e){if(null===this._data||!this._data.visible)return;const t=[],i=[],n=[],r=[];for(let e=0;e<this._data.points.length;++e){const o=this._data.points[e],s=this._data.backgroundColors[e];o.square?(t.push(o),i.push(s)):(n.push(o),r.push(s))}t.length&&this._drawPoints(e,t,i,_,p),n.length&&this._drawPoints(e,n,r,P,g)}_drawPoints(e,t,i,r,s){const{context:a,horizontalPixelRatio:d,verticalPixelRatio:c}=e,h=(0,o.ensureNotNull)(this._data),u=h.radius;let p=Math.max(1,Math.floor((h.strokeWidth||2)*d));h.selected&&(p+=Math.max(1,Math.floor(d/2)));const _=Math.max(1,Math.floor(d));let g=Math.round(u*d*2);g%2!=_%2&&(g+=1);const P=_%2/2;a.strokeStyle=h.color;for(let e=0;e<t.length;++e){const o=t[e];if(!((0,l.isInteger)(o.pointIndex)&&h.linePointBeingEdited===o.pointIndex)){a.fillStyle=i[e];if(r(a,{...o,point:new n.Point(Math.round(o.point.x*d)+P,Math.round(o.point.y*c)+P)},g/2,p),!h.disableInteractions){if(null!==h.hoveredPointIndex&&o.pointIndex===h.hoveredPointIndex){const e=Math.max(1,Math.floor(h.selectedStrokeWidth*d));let t=Math.round(u*d*2);t%2!=_%2&&(t+=1);s(a,{...o,point:new n.Point(Math.round(o.point.x*d)+P,Math.round(o.point.y*c)+P)},t/2,e)}}}}}}function f(e,t=e.pointIndex,i,n,r,o,s,l,a,d){return{point:e,pointIndex:t,cursorType:i,square:n,hitTarget:r,snappingPrice:o,snappingIndex:s,nonDiscreteIndex:l,activeItem:a,possibleMovingDirections:d}}function y(e){return f(e.point,e.pointIndex,e.cursorType,e.square,e.hitTarget,e.snappingPrice,e.snappingIndex,e.nonDiscreteIndex,e.activeItem,e.possibleMovingDirections)}function m(e){return f(e)}},70031:(e,t,i)=>{i.d(t,{factoryDefaultsForCurrentTheme:()=>a});var n=i(16738),r=i(90054),o=i(50151),s=i(45345),l=i(24633);function a(e,t){const i=s.watchedTheme.value()??l.StdTheme.Light,a=(0,r.default)(e);return(0,n.default)(a,(0,o.ensureDefined)(t.get(i))),a}}}]);
|
||||
Reference in New Issue
Block a user