Files
ai/charting_library/bundles/go-to-date-dialog-impl.250a661e3dac87c233c9.js
jenkins@nwork.local 649cefa032 Release v19.029 (from 40dd8ca8)
Fixes tradingview/charting_library#614
Fixes tradingview/charting_library#2701
Fixes tradingview/charting_library#2858
Fixes tradingview/charting_library#4019
Fixes tradingview/charting_library#4056
Fixes tradingview/charting_library#4116
Fixes tradingview/charting_library#4473
Fixes tradingview/charting_library#4674
Fixes tradingview/charting_library#4742
Fixes tradingview/charting_library#4746
Fixes tradingview/charting_library#4764
Fixes tradingview/charting_library#4769
Fixes tradingview/charting_library#4986
Fixes tradingview/charting_library#5022
Fixes tradingview/charting_library#5082
Fixes tradingview/charting_library#5228
Fixes tradingview/charting_library#5305
Fixes tradingview/charting_library#5312
Fixes tradingview/charting_library#5354
Fixes tradingview/charting_library#5397
Fixes tradingview/charting_library#5410
Fixes tradingview/charting_library#5429
Fixes tradingview/charting_library#5433
Fixes tradingview/charting_library#5455
Fixes tradingview/charting_library#5466
Fixes tradingview/charting_library#5470
Fixes tradingview/charting_library#5486
Fixes tradingview/charting_library#5488
Fixes tradingview/charting_library#5491
Fixes tradingview/charting_library#5494
Fixes tradingview/charting_library#5531
Fixes tradingview/charting_library#5557
Fixes tradingview/charting_library#5581
Fixes tradingview/charting_library#5598
Fixes tradingview/charting_library#5611
Fixes tradingview/charting_library#5638
Fixes tradingview/charting_library#5706
2021-06-04 12:50:20 +00:00

11 lines
32 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["go-to-date-dialog-impl"],{"++0f":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentcolor" stroke-width="1.3" d="M12 9l5 5-5 5"/></svg>'},"1shM":function(e,t,n){e.exports={"error-icon":"error-icon-1wA4PHVR","intent-danger":"intent-danger-3qWQVcSe","intent-warning":"intent-warning-ApdYeLhG"}},"2sPR":function(e,t,n){e.exports={calendar:"calendar-H-c9lyXG",header:"header-29jmPJB_",title:"title-3BLccpWI",switchBtn:"switchBtn-p718bDyp",prev:"prev-1vUszsRH",month:"month-14xTSVpQ",weekdays:"weekdays-p5haX_xf",weeks:"weeks-1LCs6d3o",week:"week-49DNXkE3",day:"day-3x8ZipuB",disabled:"disabled-34cO1Z8u",selected:"selected-qmTqaBK3",currentDay:"currentDay-3sTNH-Yi"}},"77yN":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4 0c-.6 0-1 .4-1 1v1H1c-.6 0-1 .4-1 1v12c0 .6.4 1 1 1h14c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1h-2V1c0-.6-.4-1-1-1h-1c-.6 0-1 .4-1 1v1H6V1c0-.6-.4-1-1-1H4zM2 5h12v9H2V5zm5 2v2h2V7H7zm3 0v2h2V7h-2zm-6 3v2h2v-2H4zm3 0v2h2v-2H7zm3 0v2h2v-2h-2z"/></svg>'},Hrlb:function(e,t,n){e.exports={pickerInput:"pickerInput-3XGDmslV",icon:"icon-3DhWQYdr",disabled:"disabled-aKY-xwhe",picker:"picker-HQJc7fVy",fixed:"fixed-QBCsU0Gi",absolute:"absolute-2hW9cE-c",nativePicker:"nativePicker-1F6noucK",textInput:"textInput-1bxNbC6p"}},Oehf:function(e,t,n){e.exports={clock:"clock-3pqBsiNm",header:"header-pTWMGSpm",number:"number-9PC9lvyt",active:"active-1sonmMLV",body:"body-2Q-g3GDd",clockFace:"clockFace-eHYbqh-S",face:"face-2iCoBAOV",inner:"inner-1mVlhYbe",hand:"hand-2ZG8pJQb",knob:"knob-31dEppHa",centerDot:"centerDot-210Fo0oV"}},VB86:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M8 15c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm0 1c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm-1-12c0-.552.448-1 1-1s1 .448 1 1v4c0 .552-.448 1-1 1s-1-.448-1-1v-4zm1 7c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1z"/></svg>'},eFBE:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14px" height="14px"><path fill-rule="evenodd" d="M7 0C3.15 0 0 3.15 0 7s3.15 7 7 7 7-3.15 7-7-3.15-7-7-7zm0 12.25c-2.888 0-5.25-2.363-5.25-5.25 0-2.888 2.362-5.25 5.25-5.25 2.887 0 5.25 2.362 5.25 5.25 0 2.887-2.363 5.25-5.25 5.25zm.25-8H6V8h3.75V6.75h-2.5v-2.5z"/></svg>'},ilgf:function(e,t,n){e.exports={dialog:"dialog-1oXvxbfL",formRow:"formRow-28Ldm-ki",cell:"cell-m5Uv3CRU",input:"input-2rGFhmey",btn:"btn-1wL_hi5U",button:"button-1xrfeyEj"}},pBZQ:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="none" d="M0 0h16v16H0z"/><path d="M8 .034l-1.41 1.41 5.58 5.59H0v2h12.17l-5.58 5.59L8 16.034l8-8z"/></svg>'},rOyT:function(e,t,n){e.exports={"static-messages":"static-messages-3y3n2UXd",
errors:"errors-22X2d4xn",warnings:"warnings-10334Bk6"}},srFJ:function(e,t,n){e.exports={calendar:"calendar-Q5DuQzKD"}},"uUY/":function(e,t,n){"use strict";n.r(t);var o=n("q1tI"),s=n.n(o),r=n("i8i4"),a=n("mrSG"),i=(n("YFKU"),n("WXjp")),c=n("AVTG"),l=(n("EsMY"),n("ldgD")),p=n("TSYQ"),u=n("Iivm"),h=n("2sPR"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onClick=function(){t.props.onClick&&!t.props.isDisabled&&t.props.onClick(t.props.day.clone())},t}return Object(a.c)(t,e),t.prototype.render=function(){var e,t=p(h.day,((e={})[h.selected]=this.props.isSelected,e[h.disabled]=this.props.isDisabled,e[h.currentDay]=l(new Date).isSame(this.props.day,"day"),e));return o.createElement("span",{className:t,onClick:this._onClick,"data-day":this.props.day.format("YYYY-MM-DD")},this.props.day.date())},t}(o.PureComponent),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype.render=function(){return o.createElement("div",{className:h.month},o.createElement("div",{className:h.weekdays},this._renderWeekdays()),o.createElement("div",{className:h.weeks},this._renderWeeks()))},t.prototype._renderWeekdays=function(){for(var e=[],t=1;t<8;t++){var n=l().day(t).format("dd");e.push(o.createElement("span",{key:t},n))}return e},t.prototype._renderWeeks=function(){for(var e=[],t=this.props.viewDate.clone().startOf("month").startOf("isoWeek"),n=0;n<6;n++)e.push(this._renderWeek(t)),t=t.clone().add(1,"weeks");return e},t.prototype._renderWeek=function(e){for(var t=[],n=0;n<7;n++){var s=e.clone().add(n,"days");!s.isSame(this.props.viewDate,"month")||t.push(o.createElement(d,{key:n,day:s,isDisabled:this._isDayDisabled(s),isSelected:s.isSame(this.props.selectedDate,"day"),onClick:this.props.onClickDay}))}return 0===t.length?null:o.createElement("div",{className:h.week,key:e.week()},t)},t.prototype._isDayDisabled=function(e){var t=!this._isInRange(e);return!t&&this.props.disableWeekends&&(t=[5,6].includes(e.weekday())),t},t.prototype._isInRange=function(e){return(!this.props.maxDate||this.props.maxDate.startOf("day").diff(e.startOf("day"),"days")>=0)&&(!this.props.minDate||this.props.minDate.startOf("day").diff(e.startOf("day"),"days")<=0)},t}(o.PureComponent),f=n("++0f"),v=function(e){function t(t){var n=e.call(this,t)||this;return n._prevMonth=function(){n.setState({viewDate:n.state.viewDate.clone().subtract(1,"months")})},n._nextMonth=function(){n.setState({viewDate:n.state.viewDate.clone().add(1,"months")})},n._onClickDay=function(e){var t=e.clone();n.setState({viewDate:t}),n.props.onSelect&&n.props.onSelect(t.clone())},n.state={viewDate:t.selectedDate},n}return Object(a.c)(t,e),t.prototype.render=function(){return o.createElement("div",{className:p(h.calendar,this.props.className),tabIndex:-1},o.createElement("div",{className:h.header},o.createElement(u.a,{icon:f,onClick:this._prevMonth,className:p(h.switchBtn,h.prev)}),o.createElement("div",{className:h.title},this.state.viewDate.format("MMMM")+" "+this.state.viewDate.format("YYYY")),o.createElement(u.a,{
icon:f,onClick:this._nextMonth,className:p(h.switchBtn,h.next)})),o.createElement(m,{viewDate:this.state.viewDate,selectedDate:this.props.selectedDate,maxDate:this.props.maxDate,minDate:this.props.minDate,onClickDay:this._onClickDay,disableWeekends:this.props.disableWeekends}))},t}(o.PureComponent),g=n("Eyy1"),_=n("3G1X"),y=n("Oi2w"),w=n("8d0Q"),E=n("v4Hi"),M={bottom:{attachment:{horizontal:"left",vertical:"top"},targetAttachment:{horizontal:"left",vertical:"bottom"}},top:{attachment:{horizontal:"left",vertical:"bottom"},targetAttachment:{horizontal:"left",vertical:"top"}},topRight:{attachment:{horizontal:"right",vertical:"bottom"},targetAttachment:{horizontal:"right",vertical:"top"}},bottomRight:{attachment:{horizontal:"right",vertical:"top"},targetAttachment:{horizontal:"right",vertical:"bottom"}}};var k=n("kSQs"),b=n("VB86"),D=n("1shM");function S(e){var t=e.intent,n=void 0===t?"danger":t;return o.createElement(u.a,{icon:b,className:p(D["error-icon"],D["intent-"+n])})}var C,O,P=n("rOyT");!function(e){e[e.Attached=0]="Attached",e[e.Static=1]="Static",e[e.Hidden=2]="Hidden"}(C||(C={})),function(e){e.Top="top",e.Bottom="bottom"}(O||(O={}));var N={top:{attachment:M.topRight.attachment,targetAttachment:M.topRight.targetAttachment,attachmentOffsetY:-4},bottom:{attachment:M.bottomRight.attachment,targetAttachment:M.bottomRight.targetAttachment,attachmentOffsetY:4}};function T(e){var t=e.isOpened,n=e.target,o=e.errorAttachment,r=void 0===o?O.Top:o,a=e.children,i=N[r],c=i.attachment,l=i.targetAttachment,p=i.attachmentOffsetY;return s.a.createElement(k.a,{isOpened:t,target:n,root:"parent",inheritWidthFromTarget:!1,attachment:c,targetAttachment:l,attachmentOffsetY:p,inheritMaxWidthFromTarget:!0,show:!0},a)}function x(e,t){return Boolean(e)&&void 0!==t&&t.length>0}function I(e,t,n){return e===C.Attached&&x(t,n)}function H(e,t,n){return e===C.Static&&x(t,n)}function F(e){var t,n,r=e.errors,i=e.warnings,c=e.messagesAttachment,l=Object(y.a)(),u=l[0],h=l[1],d=Object(w.b)(),m=d[0],f=d[1],v=Object(o.useRef)(null),g=function(e,t,n){var o=e.hasErrors,s=e.hasWarnings,r=e.alwaysShowAttachedErrors,a=e.errors,i=e.warnings,c=e.messagesPosition,l=void 0===c?C.Static:c,p=I(l,o,a),u=I(l,s,i),h=p&&(t||n||Boolean(r)),d=!h&&u&&(t||n),m=H(l,o,a),f=!m&&H(l,s,i),v=Boolean(o),g=!v&&Boolean(s);return{hasAttachedErrorMessages:p,hasAttachedWarningMessages:u,showAttachedErrorMessages:h,showAttachedWarningMessages:d,showStaticErrorMessages:m,showStaticWarningMessages:f,showErrorIcon:v,showWarningIcon:g,intent:function(e,t){return e?"danger":t?"warning":void 0}(v,g)}}(e,u,m),_=g.hasAttachedErrorMessages,M=g.hasAttachedWarningMessages,k=g.showAttachedErrorMessages,b=g.showAttachedWarningMessages,D=g.showStaticErrorMessages,O=g.showStaticWarningMessages,N=g.showErrorIcon,x=g.showWarningIcon,F=g.intent,z=N||x?s.a.createElement(E.b,{icon:!0},s.a.createElement(S,{intent:N?"danger":"warning"})):void 0,R=_?s.a.createElement(T,{errorAttachment:c,isOpened:k,target:v.current,children:r}):void 0,A=M?s.a.createElement(T,{errorAttachment:c,isOpened:b,
target:v.current,children:i}):void 0,B=D?s.a.createElement(E.a,{className:p(P["static-messages"],P.errors)},null==r?void 0:r.map((function(e,t){return s.a.createElement("p",{key:t},e)}))):void 0,V=O?s.a.createElement(E.a,{className:p(P["static-messages"],P.warnings)},null==i?void 0:i.map((function(e,t){return s.a.createElement("p",{key:t},e)}))):void 0,W=null!==(n=null!==(t=null!=R?R:A)&&void 0!==t?t:B)&&void 0!==n?n:V;return Object(a.a)(Object(a.a)({icon:z,renderedErrors:W,containerReference:v,intent:F},h),f)}var z=n("l9+T");function R(e){var t,n=e.intent,s=e.onFocus,r=e.onBlur,i=e.onMouseOver,c=e.onMouseOut,l=e.endSlot,p=e.hasErrors,u=e.hasWarnings,h=e.errors,d=e.warnings,m=e.alwaysShowAttachedErrors,f=e.messagesPosition,v=e.messagesAttachment,g=Object(a.e)(e,["intent","onFocus","onBlur","onMouseOver","onMouseOut","endSlot","hasErrors","hasWarnings","errors","warnings","alwaysShowAttachedErrors","messagesPosition","messagesAttachment"]),y=F({hasErrors:p,hasWarnings:u,errors:h,warnings:d,alwaysShowAttachedErrors:m,messagesPosition:f,messagesAttachment:v}),w=Object(z.a)(s,y.onFocus),E=Object(z.a)(r,y.onBlur),M=Object(z.a)(i,y.onMouseOver),k=Object(z.a)(c,y.onMouseOut);return o.createElement(o.Fragment,null,o.createElement(_.b,Object(a.a)({},g,{intent:null!==(t=y.intent)&&void 0!==t?t:n,onFocus:w,onBlur:E,onMouseOver:M,onMouseOut:k,containerReference:y.containerReference,endSlot:o.createElement(o.Fragment,null,y.icon,l)})),y.renderedErrors)}var A=n("RgaO"),B=n("Hrlb"),V=function(e){function t(t){var n=e.call(this,t)||this;return n._input=null,n._handleFocus=function(){n.props.showOnFocus&&n.props.onShowPicker()},n._handleInputRef=function(e){n._input=e,n.props.dateInputDOMReference&&n.props.dateInputDOMReference(n._input)},n._onShowPicker=function(e){if(e){var t=e.getBoundingClientRect();t.width&&t.right>window.innerWidth?e.style.right="0":e.style.right="auto"}},n._onChange=function(){var e=Object(g.ensureNotNull)(n._input).value;n.setState({value:e}),n.props.onType(e)},n._onKeyDown=function(e){n.props.onHidePicker()},n._onKeyPress=function(e){if(e.charCode){var t=String.fromCharCode(e.charCode);n.props.inputRegex.test(t)||e.preventDefault()}},n._onKeyUp=function(e){if(8!==e.keyCode){var t=Object(g.ensureNotNull)(n._input).value,o=n.props.fixValue(t);o!==t&&n.setState({value:o})}},n.state={value:t.value},n}return Object(a.c)(t,e),t.prototype.componentWillReceiveProps=function(e){e.value!==this.props.value&&this.setState({value:e.value})},t.prototype.render=function(){var e=this,t=this.props,n=t.position,s=void 0===n?"fixed":n,r=t.className,a=t.size,i=t.disabled,c=t.readonly,l=t.errors,h=t.icon,d=t.InputComponent,m=void 0===d?R:d;return o.createElement("div",{className:B.pickerInput},o.createElement(m,{value:this.state.value,onBlur:this.props.onBlur,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onChange:this._onChange,onFocus:this._handleFocus,onClick:this.props.onShowPicker,reference:this._handleInputRef,className:r,inputClassName:B.textInput,size:a,disabled:i,errors:l,
messagesPosition:C.Attached,hasErrors:this.props.showErrorMessages&&l&&l.length>0,name:this.props.name,readonly:c,endSlot:l&&l.length?void 0:o.createElement(E.b,null,o.createElement(u.a,{icon:h,className:p(B.icon,i&&B.disabled),onClick:i||c?void 0:this.props.onShowPicker}))}),this.props.showPicker&&!c?o.createElement(A.a,{mouseDown:!0,handler:this.props.onHidePicker},(function(t){return o.createElement("span",{ref:t},o.createElement("div",{className:p(B.picker,B[s]),key:"0",ref:e._onShowPicker},e.props.children))})):null)},t.defaultProps={showOnFocus:!0},t}(o.PureComponent),W=function(e){function t(t){var n=e.call(this,t)||this;return n._onFocus=function(){n.setState({isFocused:!0})},n._onBlur=function(){n.setState({isFocused:!1})},n._onChange=function(e){n.setState({value:e.target.value}),n.props.onChange(e.target.value)},n.state={value:t.value,isFocused:!1},n}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.disabled,s=e.errors,r=e.InputComponent,a=void 0===r?R:r,i=!this.props.readonly&&!n,c=this.props.showErrorMessages&&s&&s.length>0;return o.createElement("div",{className:B.pickerInput},o.createElement(a,{value:this.state.value,readonly:!0,noReadonlyStyles:!0,endSlot:s&&s.length?void 0:o.createElement(E.b,null,o.createElement(u.a,{icon:this.props.icon,className:p(B.icon,n&&B.disabled)})),className:t,inputClassName:B.textInput,size:this.props.size,disabled:n,hasErrors:c,errors:s,alwaysShowAttachedErrors:!0,messagesPosition:C.Attached,name:i?void 0:this.props.name,highlight:this.state.isFocused,intent:!c&&this.state.isFocused?"primary":void 0}),i&&o.createElement("input",{type:this.props.type,className:B.nativePicker,onChange:this._onChange,onInput:this._onChange,value:this.props.value,min:this.props.min,max:this.props.max,name:this.props.name,onFocus:this._onFocus,onBlur:this._onBlur}))},t}(o.PureComponent),j=n("qUKE"),Y=n("77yN"),L=n("srFJ"),G=function(e){function t(t){var n=e.call(this,t)||this;return n._format="YYYY-MM-DD",n._pickerInputContainerRef=s.a.createRef(),n._fixValue=function(e){return e=(e=e.substr(0,10)).replace(/-+/g,"-"),(/^\d{4}$/.test(e)||/^\d{4}-\d{2}$/.test(e))&&(e+="-"),e},n._isValid=function(e){if(/^[0-9]{4}(-[0-9]{2}){2}/.test(e)){var t=l(e,n._format);return t.isValid()&&(n.props.noRangeValidation||n._isInRange(t))}return!1},n._onBlur=function(e){var t;if(n.props.revertInvalidData&&!(null===(t=n._pickerInputContainerRef.current)||void 0===t?void 0:t.contains(e.relatedTarget))){var o=e.target.value;if(null===(n._isValid(o)?l(o,n._format):null)){var s=n.state.date.clone();n.setState({pickerInputKey:e.timeStamp,date:s,isInvalid:!1}),n.props.onPick(s)}}},n._onType=function(e){var t=n._isValid(e)?l(e,n._format):null;t?n.setState({date:t,isInvalid:!1}):n.setState({isInvalid:!0}),n.props.onPick(t)},n._onSelect=function(e){n.setState({date:e,showCalendar:!1,isInvalid:!1}),n.props.onPick(e)},n._showCalendar=function(){n.setState({showCalendar:!0})},n._hideCalendar=function(){n.setState({showCalendar:!1})},n._getErrors=function(){
var e=n.props.errors?Object(a.f)(n.props.errors):[];return n.state.isInvalid&&e.push(window.t("Please enter the right date format yyyy-mm-dd")),e},n.state={pickerInputKey:0,date:t.initial,showCalendar:!1,isInvalid:!n._isValid(t.initial.format(n._format))},n}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.position,n=void 0===t?"fixed":t,o=e.InputComponent;return Modernizr.mobiletouch?s.a.createElement(W,{value:this.state.date.format(this._format),type:"date",onChange:this._onType,icon:Y,disabled:this.props.disabled,size:this.props.size,min:this.props.minDate&&this.props.minDate.format(this._format),max:this.props.maxDate&&this.props.maxDate.format(this._format),errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly,className:p(this._getFontSizeClassName(this.props.size),this.props.className),InputComponent:o}):s.a.createElement("div",{ref:this._pickerInputContainerRef},s.a.createElement(V,{key:this.state.pickerInputKey,value:this.state.date.format(this._format),inputRegex:/[0-9.]/,fixValue:this._fixValue,onType:this._onType,onBlur:this._onBlur,onShowPicker:this._showCalendar,onHidePicker:this._hideCalendar,showPicker:this.state.showCalendar,showOnFocus:this.props.showOnFocus,icon:Y,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,dateInputDOMReference:this.props.dateInputDOMReference,readonly:this.props.readonly,position:n,className:p(this._getFontSizeClassName(this.props.size),this.props.className),InputComponent:o},s.a.createElement(v,{selectedDate:this.state.date,maxDate:this.props.maxDate,minDate:this.props.minDate,onSelect:this._onSelect,className:L.calendar})))},t.prototype.componentWillReceiveProps=function(e){this.props.initial!==e.initial&&this.setState({date:e.initial})},t.prototype._isInRange=function(e){return(!this.props.maxDate||this.props.maxDate.startOf("day").diff(e.startOf("day"),"days")>=0)&&(!this.props.minDate||this.props.minDate.startOf("day").diff(e.startOf("day"),"days")<=0)},t.prototype._getFontSizeClassName=function(e){return e?"large"===e?j.b.FontSizeLarge:j.b.FontSizeMedium:void 0},t}(s.a.PureComponent),U=n("Oehf"),K=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._renderNumber=function(e,n){var s,r=p(U.number,((s={})[U.active]=e===t.props.activeNumber,s[U.inner]=t.props.isInner,s)),a=t.props.format?t.props.format(e):e.toString();return o.createElement("span",{key:e,className:r,style:t._numberStyle(t.props.radius-t.props.spacing,n),"data-value":a},o.createElement("span",null,a))},t}return Object(a.c)(t,e),t.prototype.render=function(){return o.createElement("div",{className:U.face,style:this._faceStyle(),onMouseDown:this.props.onMouseDown,onTouchStart:this.props.onTouchStart},this.props.numbers.map(this._renderNumber))},t.prototype._faceStyle=function(){return{height:2*this.props.radius,width:2*this.props.radius}},t.prototype._numberStyle=function(e,t){
var n=Math.PI/180*360/12*t;return{left:e+e*Math.sin(n)+this.props.spacing,top:e-e*Math.cos(n)+this.props.spacing}},t}(o.PureComponent),Q=function(e){function t(t){var n=e.call(this,t)||this;return n._onMouseMove=function(e){n._move(X(e))},n._onTouchMove=function(e){n._move(q(e))},n._onMouseUp=function(){document.removeEventListener("mousemove",n._onMouseMove),document.removeEventListener("mouseup",n._onMouseUp),n._endMove()},n._onTouchEnd=function(e){document.removeEventListener("touchmove",n._onTouchMove),document.removeEventListener("touchend",n._onTouchEnd),n._endMove(e)},n}return Object(a.c)(t,e),t.prototype.componentWillUnmount=function(){document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd)},t.prototype.render=function(){var e={height:this.props.length,transform:"rotate("+this.props.angle+"deg)"};return o.createElement("div",{className:U.hand,style:e},o.createElement("span",{className:U.knob}))},t.prototype.mouseStart=function(e){document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp),this._move(X(e.nativeEvent))},t.prototype.touchStart=function(e){document.addEventListener("touchmove",this._onTouchMove),document.addEventListener("touchend",this._onTouchEnd),this._move(q(e.nativeEvent)),e.stopPropagation()},t.prototype._endMove=function(e){this.props.onMoveEnd&&this.props.onMoveEnd(e)},t.prototype._move=function(e){var t=this._trimAngleToValue(this._positionToAngle(e)),n=this._getPositionRadius(e);!this.props.onMove||isNaN(t)||isNaN(n)||this.props.onMove(360===t?0:t,n)},t.prototype._trimAngleToValue=function(e){return this.props.step*Math.round(e/this.props.step)},t.prototype._positionToAngle=function(e){return t=this.props.center.x,n=this.props.center.y,o=e.x,s=e.y,(r=function(e,t,n,o){return 180*(Math.atan2(o-t,n-e)+Math.PI/2)/Math.PI}(t,n,o,s))<0?360+r:r;var t,n,o,s,r},t.prototype._getPositionRadius=function(e){var t=this.props.center.x-e.x,n=this.props.center.y-e.y;return Math.sqrt(t*t+n*n)},t}(o.PureComponent);function X(e){return{x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}}function q(e){return{x:e.touches[0].pageX-window.scrollX,y:e.touches[0].pageY-window.scrollY}}function J(e,t,n){void 0===n&&(n=1);for(var o=Math.max(Math.ceil((t-e)/n),0),s=Array(o),r=0;r<o;r++)s[r]=e,e+=n;return s}function Z(e){return("0"+e).slice(-2)}var $,ee=Object(a.f)([0],J(13,24)),te=Object(a.f)([12],J(1,12)),ne=function(e){function t(t){var n=e.call(this,t)||this;return n._onMouseDown=function(e){n._hand.mouseStart(e)},n._onTouchStart=function(e){n._hand.touchStart(e)},n._onHandMove=function(e,t){var o=t<n.props.radius-n.props.spacing;n.state.isInner!==o?n.setState({isInner:o},(function(){n.props.onChange(n._valueFromDegrees(e))})):n.props.onChange(n._valueFromDegrees(e))},n._onHandMoveEnd=function(){n.props.onSelect&&n.props.onSelect()},n.state={
isInner:n.props.selected>0&&n.props.selected<=12},n}return Object(a.c)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.center,s=t.radius,r=t.spacing,a=t.selected;return o.createElement("div",null,o.createElement(K,{radius:s,spacing:r,numbers:ee,activeNumber:a,format:Z,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),this._renderInnerFace(.46*s),o.createElement(Q,{ref:function(t){return e._hand=t},length:s-(this.state.isInner?.46*s:r)-this.props.numberRadius,angle:30*a,step:30,center:n,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},t.prototype._renderInnerFace=function(e){return o.createElement(K,{radius:this.props.radius,spacing:e,numbers:te,activeNumber:this.props.selected,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart,isInner:!0})},t.prototype._valueFromDegrees=function(e){return this.state.isInner?te[e/30]:ee[e/30]},t}(o.PureComponent),oe=J(0,60,5),se=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onMouseDown=function(e){t._hand.mouseStart(e)},t._onTouchStart=function(e){t._hand.touchStart(e)},t._onHandMove=function(e){t.props.onChange(e/6)},t._onHandMoveEnd=function(e){t.props.onSelect&&t.props.onSelect(e)},t}return Object(a.c)(t,e),t.prototype.render=function(){var e=this;return o.createElement("div",null,o.createElement(K,{radius:this.props.radius,spacing:this.props.spacing,numbers:oe,activeNumber:this.props.selected,format:Z,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),o.createElement(Q,{ref:function(t){return e._hand=t},length:this.props.radius-this.props.spacing-this.props.numberRadius,angle:6*this.props.selected,step:6,center:this.props.center,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},t}(o.PureComponent);!function(e){e[e.Hours=0]="Hours",e[e.Minutes=1]="Minutes"}($||($={}));var re,ae=function(e){function t(t){var n=e.call(this,t)||this;return n._clockFace=null,n._raf=null,n._recalculateTimeout=null,n._calculateShapeBinded=n._calculateShape.bind(n),n._onChangeHours=function(e){n.state.time.hours()!==e&&n._onChange(n.state.time.clone().hours(e))},n._onChangeMinutes=function(e){n.state.time.minutes()!==e&&n._onChange(n.state.time.clone().minutes(e))},n._onSelectHours=function(){n._displayMinutes()},n._onSelectMinutes=function(e){e&&e.target instanceof Node&&n._clockFace&&n._clockFace.contains(e.target)&&e.preventDefault(),n.props.onSelect&&n.props.onSelect(n.state.time.clone())},n._displayHours=function(){n.setState({faceType:$.Hours})},n._displayMinutes=function(){n.setState({faceType:$.Minutes})},n._setClockFace=function(e){n._clockFace=e},n.state={center:{x:0,y:0},radius:0,time:n.props.selectedTime,faceType:$.Hours},n}return Object(a.c)(t,e),t.prototype.render=function(){var e,t;return o.createElement("div",{className:p(U.clock,this.props.className)},o.createElement("div",{className:U.header},o.createElement("span",{className:p(U.number,(e={},e[U.active]=this.state.faceType===$.Hours,e)),onClick:this._displayHours
},this.state.time.format("HH")),o.createElement("span",null,":"),o.createElement("span",{className:p(U.number,(t={},t[U.active]=this.state.faceType===$.Minutes,t)),onClick:this._displayMinutes},this.state.time.format("mm"))),o.createElement("div",{className:U.body},o.createElement("div",{className:U.clockFace,ref:this._setClockFace},this.state.faceType===$.Hours?this._renderHours():null,this.state.faceType===$.Minutes?this._renderMinutes():null,o.createElement("span",{className:U.centerDot}))))},t.prototype.componentDidMount=function(){this._calculateShape(),this._recalculateTimeout=setTimeout(this._calculateShapeBinded,1),window.addEventListener("resize",this._calculateShapeBinded),window.addEventListener("scroll",this._calculateShapeBinded,!0)},t.prototype.componentWillUnmount=function(){this._clearTimeout(),window.removeEventListener("resize",this._calculateShapeBinded),window.removeEventListener("scroll",this._calculateShapeBinded,!0),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)},t.prototype._clearTimeout=function(){null!==this._recalculateTimeout&&(clearTimeout(this._recalculateTimeout),this._recalculateTimeout=null)},t.prototype._renderHours=function(){return o.createElement(ne,{center:this.state.center,radius:this.state.radius,spacing:.18*this.state.radius,selected:this.state.time.hours(),numberRadius:13,onChange:this._onChangeHours,onSelect:this._onSelectHours})},t.prototype._renderMinutes=function(){return o.createElement(se,{center:this.state.center,radius:this.state.radius,spacing:.18*this.state.radius,selected:this.state.time.minutes(),numberRadius:13,onChange:this._onChangeMinutes,onSelect:this._onSelectMinutes})},t.prototype._onChange=function(e){this.setState({time:e}),this.props.onChange&&this.props.onChange(e.clone())},t.prototype._calculateShape=function(){var e=this;null===this._raf&&(this._raf=requestAnimationFrame((function(){var t=Object(g.ensureNotNull)(e._clockFace).getBoundingClientRect(),n=t.left,o=t.top,s=t.width;e.setState({center:{x:n+s/2,y:o+s/2},radius:s/2}),e._raf=null})))},t}(o.PureComponent),ie=n("eFBE"),ce=function(e){function t(t){var n=e.call(this,t)||this;return n._format="HH:mm",n._fixValue=function(e){return(e=(e=e.substr(0,5)).replace(/:+/g,":")).endsWith(":")||2!==e.length||(e+=":"),e},n._isValid=function(e){return/^[0-9]{2}:[0-9]{2}/.test(e)&&l(e,n._format).isValid()},n._onType=function(e){var t=n._isValid(e)?l(e,n._format):null;t?n.setState({time:t,isInvalid:!1}):n.setState({isInvalid:!0}),n.props.onPick(t)},n._onSelect=function(e){n.setState({time:e,showClock:!1,isInvalid:!1}),n.props.onPick(e)},n._showClock=function(){n.setState({showClock:!0})},n._hideClock=function(){n.setState({showClock:!1})},n._getErrors=function(){var e=n.props.errors?Object(a.f)(n.props.errors):[];return n.state.isInvalid&&e.push(window.t("Please enter the right time format hh:mm")),e},n.state={time:t.initial,showClock:!1,isInvalid:!n._isValid(t.initial.format(n._format))},n}return Object(a.c)(t,e),t.prototype.render=function(){return Modernizr.mobiletouch?o.createElement(W,{
value:this.state.time.format(this._format),type:"time",onChange:this._onType,icon:ie,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly,className:p(this._getFontSizeClassName(this.props.size),this.props.className),InputComponent:this.props.InputComponent}):o.createElement(V,{value:this.state.time.format(this._format),inputRegex:/[0-9:]/,fixValue:this._fixValue,onType:this._onType,onShowPicker:this._showClock,onHidePicker:this._hideClock,showPicker:this.state.showClock,icon:ie,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly,className:p(this._getFontSizeClassName(this.props.size),this.props.className),InputComponent:this.props.InputComponent},o.createElement(ae,{selectedTime:this.state.time,onSelect:this._onSelect}))},t.prototype.componentWillReceiveProps=function(e){this.props.initial!==e.initial&&this.setState({time:e.initial,isInvalid:!this._isValid(e.initial.format(this._format))})},t.prototype._getFontSizeClassName=function(e){return e?"large"===e?j.b.FontSizeLarge:j.b.FontSizeMedium:void 0},t}(o.PureComponent),le=n("FQhm"),pe=n("ZjKI"),ue=n("oj21"),he=n("ycI/"),de=n("pBZQ"),me=n("ilgf"),fe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._todayMidnight=l("00:00","HH:mm"),t._dateInputDOMElement=null,t._dateInputDOMReference=function(e){t._dateInputDOMElement=e},t}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){var e=this;setTimeout((function(){null!==e._dateInputDOMElement&&e._dateInputDOMElement.focus()}),0)},t.prototype.render=function(){return o.createElement(o.Fragment,null,o.createElement(c.b,{onClose:this.props.onEscape},window.t("Go to")),o.createElement(c.a,null,o.createElement(he.a,{keyCode:27,handler:this.props.onEscape}),o.createElement(he.a,{keyCode:13,handler:this.props.onGoToDateHandler}),o.createElement("div",{className:me.formRow},o.createElement("div",{className:p(me.cell,me.input)},o.createElement(G,{initial:ve.lastPickedDate,onPick:this.props.onDatePick,maxDate:this._todayMidnight,disabled:this.props.processing,dateInputDOMReference:this._dateInputDOMReference,showOnFocus:!1})),o.createElement("div",{className:p(me.cell,me.input)},o.createElement(ce,{initial:ve.lastPickedTime,onPick:this.props.onTimePick,disabled:this.props.processing||this.props.dateOnly||!this.props.date})),o.createElement("div",{className:p(me.cell,me.btn)},o.createElement(ue.a,{type:"primary",disabled:!this.props.date||!this.props.time||this.props.processing,onClick:this.props.onGoToDateHandler,className:me.button},o.createElement(u.a,{icon:de}))))))},t}(o.PureComponent),ve=function(e){function t(n){var o=e.call(this,n)||this;return o._onDatePick=function(e){o.setState({date:e})},o._onTimePick=function(e){o.setState({time:e})},o._onGoToDate=function(){var e=o.props.onGoToDate,n=o.state,s=n.date,r=n.time;if(e&&s&&r){var a=s.clone()
;a.hours(r.hours()),a.minutes(r.minutes()),e(new Date(a.format("YYYY-MM-DD[T]HH:mm[:00Z]")).valueOf()),t.lastPickedDate=s,t.lastPickedTime=r}},o._handleDialogClose=function(){var e=o.props.onClose;e&&(e(),t._resetLastPickedDate())},o.state={date:t.lastPickedDate,time:t.lastPickedTime},o}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){le.subscribe(pe.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleDialogClose,null)},t.prototype.componentWillUnmount=function(){le.unsubscribe(pe.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleDialogClose,null)},t.prototype.render=function(){return o.createElement(i.a,{isOpened:this.props.isOpened,onClickOutside:this._handleDialogClose,className:me.dialog,"data-dialog-type":"go-to-date-dialog"},o.createElement(fe,Object(a.a)({onDatePick:this._onDatePick,onTimePick:this._onTimePick,onGoToDateHandler:this._onGoToDate,onEscape:this._handleDialogClose},this.props,this.state)))},t._resetLastPickedDate=function(){t.lastPickedDate=l(),t.lastPickedTime=l("00:00","HH:mm")},t.lastPickedDate=l(),t.lastPickedTime=l("00:00","HH:mm"),t}(o.PureComponent);function ge(e){_e({isOpened:!1});var t={isOpened:!0,onClose:function(){_e({isOpened:!1}),re=null},dateOnly:e.model().mainSeries().isDWM(),onGoToDate:function(t){!function(e,t){if(void 0===e.model().timeScale().tickMarks().minIndex)return;_e({isOpened:!0,processing:!0}),e.model().gotoTime(t).done((function(t){var n=e.model().mainSeries();void 0===t?n.clearGotoDateResult():n.setGotoDateResult(t)})).always((function(){_e({isOpened:!1,processing:!1})}))}(e,t)}};_e(t)}function _e(e){re||(re=document.createElement("div"),document.body.appendChild(re)),r.render(o.createElement(ve,e),re)}n.d(t,"showGoToDateDialog",(function(){return ge}))}}]);