PageSourceSearch

https://cdn.okj.com/cdn/assets/okfe/comb-trade-jp/0.0.18/common/BotIncreasePositionContent.2beb617f.js

js okj.com collected 2026-10-04 12:02:50 UTC 6,671 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkcomb_trade=self.webpackChunkcomb_trade||[]).push([[2562],{46713:(e,a,t)=>{t.d(a,{A:()=>h});var i=t(64467),n=(t(64414),t(96030),t(58735),t(41594)),r=t(83573),s=t.n(r),l=t(44939),o=t(4613),d=t(48963),c=t(39351);const u={prefixSuffixBox:"index_prefixSuffixBox__ti2ep",prefixSuffixBoxSuffix:"index_prefixSuffixBoxSuffix__f6GGL",disabled:"index_disabled__6Ca1I"};var m=t(65983);function h(e){var a=e.text,t=e.description,r=e.className,h=e.isSuffix,x=e.style,_=e.disabled,p=e.sort,f=s()(u.prefixSuffixBox,(0,i.A)((0,i.A)({},u.disabled,_),u.prefixSuffixBoxSuffix,h),r);return(0,m.jsxs)(n.Fragment,{children:[(0,m.jsx)(d.A,{when:p,children:(0,m.jsx)("span",{className:f,style:x,children:(0,l.z)("".concat(p,". "))})}),(0,m.jsx)(d.A,{when:t,children:(0,m.jsx)(c.A,{rebirthPopper:!0,alwaysUpdatePopper:!0,popperClassName:"popUpMargin",size:o.A.SIZE.sm,description:t,children:(0,m.jsx)("span",{className:"".concat(f," has-popover"),style:x,children:a})})}),(0,m.jsx)(d.A,{when:!t,children:(0,m.jsx)("span",{className:f,style:x,children:a})})]})}},46747:(e,a,t)=>{t.r(a),t.d(a,{default:()=>I});var i=t(41594),n=t(83573),r=t.n(n),s=t(41140),l=t(4536),o=t(9556),d=t(97408),c=t(86357),u=t(39351),m=t(5544),h=t(71491),x=t(72768),_=t(53740),p=t(4053),f=t(46713),v=t(5888),b=t(23029),g=t(92901),A=(t(17027),t(50059),t(90638),t(20923),t(44497)),y=t(60713),C=t(56051),T=t(83695),j=t(3083),N=v.gy.SPOT;const S=function(){return(0,g.A)(function e(a){var t=this;(0,b.A)(this,e),this.min="",this.max="",this.available="",this.amt="",this.amtError="",this.sliderValue=0,this.onChange=function(e){if(t.clearDebuonce(),t.amtError="",t.amt=e,t.onValueChange(e),e||(t.sliderValue=0),t.available&&e){var a=h._u.div(e,t.available);t.sliderValue=h._u.mul(a,100)}t.validWithDebounce()},this.onSliderChange=function(e){t.clearDebuonce(),t.amtError="",t.sliderValue=e;var a=h._u.div(t.sliderValue,100);t.amt=h._u.mul(t.available,a),t.onValueChange(t.amt),t.validWithDebounce()},this.validWithDebounce=(0,y.A)(function(){t.valid()},T.cP),this.clearDebuonce=function(){var e;(null===(e=t.validWithDebounce)||void 0===e?void 0:e.cancel)&&t.validWithDebounce.cancel()},this.valid=function(){return t.available&&t.amt&&+t.amt>+t.available?(t.amtError=(0,l.kW)("dcabot_placeorder_fieldalert_exceed_available"),!1):t.amt&&t.min&&+t.amt<=+t.min?(t.amtError=(0,l.kW)("marketplace_placeorder_errortext_must_greater_than",{fieldName:t.preText,minValue:h._u.showCeilTruncation(t.min,t.sizeDig,{needZero:!1}),unit:t.quoteCcy}),!1):!(t.amt&&t.max&&+t.amt>=+t.max)||(t.amtError=(0,l.kW)("marketplace_placeorder_errortext_must_less_than",{fieldName:t.preText,minValue:h._u.showFloorTruncation(t.max,t.sizeDig,{needZero:!1}),unit:t.quoteCcy}),!1)},this.validPass=function(){return t.amt?t.valid():(t.amtError=(0,l.kW)("trade_bot_errortip_order_value_required",{text:t.preText}),!1)},this.resetData=function(){t.amtError="",t.amt="",t.sliderValue=0},this.update=function(e){Object.keys(e).forEach(function(a){t[a]=e[a]})},(0,A.makeAutoObservable)(this);var i=a.instId,n=a.instType,r=a.onValueChange,s=a.available,o=a.min,d=a.max;this.instId=i,this.instType=n,this.onValueChange=r,this.available=s||"",this.min=o||"",this.max=d||""},[{key:"preText",get:function(){return this.instType===N?(0,l.kW)("trade_botpopup_title_spot_grid_investment_total"):(0,l.kW)("fdcabot_placeorder_item_current_usage")}},{key:"quoteCcy",get:function(){return(0,j.x)(this.instId).quoteCcy}},{key:"sizeDig",get:function(){var e=(C.A.coins[this.quoteCcy]||{}).sizeDig;return void 0===e?T.SF:e}},{key:"placeholder",get:function(){var e=h._u.showCeilTruncation(this.min,this.sizeDig,{needZero:!1}),a=h._u.showFloorTruncation(this.max,this.sizeDig,{needZero:!1});return this.min&&this.max?"".concat(e,"~").concat(a):this.min?">".concat(e):this.max?"<".concat(a):""}}])}
1(),k={strategySlider:"index_strategySlider__G65uQ"};var D=t(65983),E=v.SC.ROUND,W=(0,i.forwardRef)(function(e,a){var t=e.className,n=e.available,r=e.min,s=e.max,l=e.disabled,o=(0,i.useState)(function(){return new S(e)}),d=(0,m.A)(o,1)[0];(0,i.useImperativeHandle)(a,function(){return{validPass:function(){return d.validPass()},resetData:function(){d.resetData()}}}),(0,i.useEffect)(function(){d.update({available:n,min:r,max:s})},[n,r,s]);var c=d.preText,u=d.quoteCcy,b=d.sizeDig,g=d.amt,A=d.amtError,y=d.sliderValue,C=d.placeholder,T=d.onChange,j=d.onBlur,N=d.onSliderChange,W=(0,i.useMemo)(function(){return l?"":C},[l,C]);return(0,D.jsxs)("div",{className:t,children:[(0,D.jsx)(x.A.Number,{className:k.inputNumberStyle,value:g,error:A,errorType:x.A.TIP_TYPE.always,onChange:T,onBlur:j,precision:+b,prefix:(0,D.jsx)(f.A,{text:c}),suffix:(0,D.jsx)(f.A,{text:u,isSuffix:!0}),size:x.A.SIZE.sm,placeholder:W,inputStyle:{textAlign:"right",paddingRight:"8px",padddingLeft:"8px"},disabled:l}),(0,D.jsx)(_.A,{className:k.strategySlider,value:+p.Fz({value:y,decimal:E,digit:0}),marks:v.b5,onChange:N,disabled:!n||l,formatValue:function(e){return h._u.showTruncation(e,0,{style:"percent"})},size:_.A.SIZE.sm})]})});const w=(0,s.observer)(W),V={content:"index_content__BEeFx",avail:"index_avail__3RxNd",totalAmt:"index_totalAmt__zI7AM",amtText:"index_amtText__dNnaL",totalAmtDisp:"index_totalAmtDisp__02hqg",tip:"index_tip__jaWJt",alertTitle:"index_alertTitle__zq4qi",alertContent:"index_alertContent__zsW6O"};var z=t(67220);const I=(0,s.observer)(function(){var e=z.A.dispTotalAmt,a=z.A.onValueChange,t=z.A.info,n=t.instId,s=t.instType,m=t.algoOrdType,h=z.A.min,x=z.A.max,_=z.A.marginModeByInstFamily,p=z.A.quoteCcy,f=z.A.onAvailChange,v=z.A.available,b=z.A.increaseDisabled,g=(0,i.useRef)(null);return z.A.amtRef=g,(0,D.jsxs)("div",{className:V.content,children:[(0,D.jsx)(c.A,{when:b,children:(0,D.jsx)(d.A,{className:V.alertContent,title:(0,D.jsx)("span",{className:V.alertTitle,children:(0,l.kW)("futuresgrid_placeorder_dialog_pos_tier_reached")}),type:d.A.TYPE.warn,closable:!1})}),(0,D.jsx)(w,{ref:g,className:V.amt,available:null===v||void 0===v?void 0:v.quoteMax,min:h,max:x,instId:n,instType:s,onValueChange:a,disabled:b}),(0,D.jsx)(o.Available,{className:V.avail,instId:n,tdMode:_,algoOrdType:m,ccy:p,instType:s,onAvailChange:f}),(0,D.jsxs)("div",{className:V.totalAmt,children:[(0,D.jsx)(u.A,{description:(0,l.kW)("futuresgrid_placeorder_tooltip_added_investment_desc"),children:(0,D.jsx)("span",{className:r()(V.amtText,"has-tooltip"),children:(0,l.kW)("futuresgrid_placeorder_header_added_investment")})}),(0,D.jsx)("span",{className:V.totalAmtDisp,children:e})]}),(0,D.jsx)("div",{className:V.tip,children:(0,l.kW)("futuresgrid_placeorder_header_added_investment_desc")})]})})}}]);
2//# sourceMappingURL=BotIncreasePositionContent.2beb617f.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.