Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-time-picker-ios-like-v2

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-time-picker-ios-like-v2 - npm Package Compare versions

Comparing version 0.1.9 to 0.2.0

2

dist/TimePicker.js

@@ -1,1 +0,1 @@

!function(){var e={346:function(e,t,n){"use strict";var r=n(81),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,".react-ios-time-picker {\n margin-bottom: 50px;\n border-radius: 12px;\n overflow: hidden; \n box-shadow: 0 11px 15px #0005;\n}\n\n.react-ios-time-picker-transition {\n animation: fade-in 150ms ease-out;\n}\n\n@keyframes fade-in {\n 0% {\n transform: translateY(150px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n.react-ios-time-picker-container {\n display: flex;\n justify-content: center;\n position: relative;\n background-color: #1d1d1d;\n width: 220px;\n overflow: hidden;\n /* border-radius: 0 0 15px 17px; */\n padding: 20px 0;\n /* box-shadow: inset 0px 0px 5px 0px rgba(255, 159, 10, 0.5); */\n /* box-shadow: 0 11px 15px -7px rgb(0 0 0 / 20%),\n 0 24px 38px 3px rgb(0 0 0 / 14%), 0 9px 46px 8px rgb(0 0 0 / 12%); */\n}\n\n.react-ios-time-picker-hour {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-right: 5px;\n}\n\n.react-ios-time-picker-minute {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-left: 5px;\n}\n\n.react-ios-time-picker-hour-format {\n position: relative;\n width: 40px;\n overflow: hidden;\n z-index: 100;\n}\n\n.react-ios-time-picker-fast {\n transition: transform 700ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-slow {\n transition: transform 600ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-selected-overlay {\n position: absolute;\n border-radius: 6px;\n background-color: #2c2c2f;\n pointer-events: none;\n margin: 0 10px;\n left: 0;\n right: 0;\n z-index: 1;\n /* box-shadow: inset 0px 0px 2px 0px rgba(255, 159, 10, 0.3); */\n}\n\n.react-ios-time-picker-top-shadow {\n position: absolute;\n top: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(180deg, #0009 0%, #1c1c1c 100%);\n}\n\n.react-ios-time-picker-bottom-shadow {\n position: absolute;\n bottom: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(0deg, #0009 0%, hsla(0, 0%, 11%, 1) 100%);\n}\n\n.react-ios-time-picker-cell-hour {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-minute {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-hour-format {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n\n.react-ios-time-picker-cell-inner-hour {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #666;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-minute {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour:hover,\n.react-ios-time-picker-cell-inner-minute:hover,\n.react-ios-time-picker-cell-inner-hour-format:hover {\n background-color: #ff9d0ac9;\n color: white;\n}\n\n.react-ios-time-picker-cell-inner-selected {\n /* font-weight: 500; */\n color: #f7f7f7;\n font-size: 16px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format-selected {\n font-weight: 400;\n color: #f7f7f7;\n}\n\n.react-ios-time-picker-btn-container {\n position: relative;\n display: flex;\n justify-content: space-between;\n background-color: #292929;\n border-bottom: 1px solid #333;\n z-index: 100;\n}\n\n.react-ios-time-picker-btn {\n padding: 10px 15px;\n font-size: 13px;\n color: #fe9f06;\n transition: all 150ms linear;\n font-weight: 500;\n z-index: 1;\n}\n\n.react-ios-time-picker-btn:hover {\n opacity: 0.6;\n}\n\n.react-ios-time-picker-btn-cancel {\n font-size: 12px;\n font-weight: 300;\n}\n\n.react-ios-time-picker-popup {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: flex-end;\n z-index: 99998;\n}\n\n.react-ios-time-picker-popup-overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.react-ios-time-picker-input {\n cursor: text;\n padding: 5px 10px;\n border-radius: 5px;\n border: 1px solid #0005;\n}\n\n.react-ios-time-picker-colon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n color: #f7f7f7;\n position: relative;\n z-index: 100;\n font-weight: 600;\n}\n\n.react-ios-time-picker-cell-inner-hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.react-ios-time-picker-hour-format-transition {\n transition: transform 100ms ease-out;\n}\n",""]),t.Z=i},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var s=[].concat(e[u]);r&&i[s[0]]||(void 0!==a&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=a),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},81:function(e){"use strict";e.exports=function(e){return e[1]}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],c=0;c<e.length;c++){var l=e[c],u=r.base?l[0]+r.base:l[0],s=a[u]||0,f="".concat(u," ").concat(s);a[u]=s+1;var p=n(f),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var m=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:m,references:1})}i.push(f)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=n(a[i]);t[c].references--}for(var l=r(e,o),u=0;u<a.length;u++){var s=n(a[u]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}a=l}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};!function(){"use strict";n.r(r),n.d(r,{TimePicker:function(){return ce}});var e=require("react"),t=n.n(e),o=require("react-dom"),a=n.n(o),i=n(697),c=n.n(i),l=!("undefined"==typeof window||!window.document||!window.document.createElement),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return s(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),u(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return l?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),a().createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(t().Component);p.propTypes={children:c().node.isRequired,node:c().any};var d=p,m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(e){function n(){return h(this,n),v(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),m(n,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(e){this.renderPortal()}},{key:"componentWillUnmount",value:function(){a().unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(e){this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var n=this.props.children;"function"==typeof this.props.children.type&&(n=t().cloneElement(this.props.children)),this.portal=a().unstable_renderSubtreeIntoContainer(this,n,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),n}(t().Component),b=y;y.propTypes={children:c().node.isRequired,node:c().any};var g=a().createPortal?d:b;function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j=function(n){var r,o=n.height,a=(n.value,n.setValue,n.onAmPmChange,n.setHourFormat),i=n.hourFormat,c=[{number:"AM",translatedValue:(2*o).toString(),selected:!1},{number:"PM",translatedValue:o.toString(),selected:!1}],l=O((0,e.useState)([{number:"AM",translatedValue:(2*o).toString(),selected:"AM"===i.hourFormat},{number:"PM",translatedValue:o.toString(),selected:"PM"===i.hourFormat}]),2),u=l[0],s=l[1],f=(0,e.useRef)(null),p=O((0,e.useState)(null),2),d=p[0],m=p[1],h=O((0,e.useState)(null),2),v=h[0],y=h[1],b=O((0,e.useState)(0!==(r=u.filter((function(e){return!0===e.selected}))).length?r[0].translatedValue:0),2),g=b[0],w=b[1],S=O((0,e.useState)(!1),2),k=S[0],j=S[1],E=O((0,e.useState)(!1),2),P=E[0],T=E[1],M=O((0,e.useState)(null),2),N=M[0],C=M[1],A=O((0,e.useState)(null),2),I=A[0],V=A[1],Y=O((0,e.useState)(null),2),_=(Y[0],Y[1]),D=O((0,e.useState)(null),2),H=(D[0],D[1]),F=O((0,e.useState)(null),2),z=(F[0],F[1]),U=O((0,e.useState)(null),2),R=(U[0],U[1]),q=function(e){j(!1),w((function(e){return e+d})),T(!0),V(performance.now()),performance.now()-N<=100?H("fast"):H("slow"),z(d<0?"down":"up")};(0,e.useEffect)((function(){k&&(f.current.style.transform="translateY(".concat(g+d,"px)"))}),[d]),(0,e.useEffect)((function(){if(P){_(I-N);var e=Math.round(g/o)*o;e<o&&(e=o),e>2*o&&(e=2*o),f.current.style.transform="translateY(".concat(e,"px)"),w(e),m(0)}}),[P]);var L=function(e){0===d&&w(parseInt(e.target.dataset.translatedValue||0))};return t().createElement("div",{className:"react-ios-time-picker-hour-format",onMouseDown:function(e){T(!1),y(e.clientY),j(!0),C(performance.now())},onMouseUp:q,onMouseMove:function(e){m(k?e.clientY-v:0)},onMouseLeave:function(e){j(!1),w((function(e){return e+d})),T(!0),V(performance.now()),z(d<0?"down":"up")},style:{height:5*o},onWheel:function(e){e.deltaY>0?g<=o&&w((function(e){return e+o})):g>=2*o&&w((function(e){return e-o}))},onTouchStart:function(e){T(!1),y(e.targetTouches[0].clientY),j(!0),C(performance.now())},onTouchMove:function(e){m(k?e.targetTouches[0].clientY-v:0)},onTouchEnd:q},t().createElement("div",{ref:f,className:"".concat(P&&"react-ios-time-picker-hour-format-transition"),onTransitionEnd:function(e){"transform"===e.propertyName&&[{number:"AM",translatedValue:(2*o).toString(),arrayNumber:0},{number:"PM",translatedValue:o.toString(),arrayNumber:1}].map((function(e){parseInt(e.translatedValue)===g&&(R(e.arrayNumber),a({mount:!0,hourFormat:e.number}),s((function(){return c.map((function(t){return t.number==e.number&&t.translatedValue==g?x(x({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(g,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(o,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour-format".concat(e.selected?" react-ios-time-picker-cell-inner-hour-format-selected":""),onClick:L,"data-translated-value":e.translatedValue||0},e.number))}))))},E=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=[],a=[],i=13===t?a:o,c=0,l=0;l<3;l++)for(var u=0;u<t;u++){if(!1!==r){var s=1===u.toString().length?"0".concat(u):u.toString();if(!r.includes(s))continue}0===l&&u<2||13===t&&0===u||(1!==l||u!==n?(1===u.toString().length?i.push({number:"0".concat(u.toString()),translatedValue:"-".concat(c),selected:!1}):i.push({number:u.toString(),translatedValue:"-".concat(c),selected:!1}),c+=e):(1===u.toString().length?i.push({number:"0".concat(u.toString()),translatedValue:"-".concat(c),selected:!0}):i.push({number:u.toString(),translatedValue:"-".concat(c),selected:!0}),c+=e))}return i},P=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=0,a=0;a<3;a++)for(var i=0;i<t;i++){if(!1!==n){var c=1===i.toString().length?"0".concat(i):i.toString();if(!n.includes(c))continue}0===a&&i<2||13===t&&0===i||(1===i.toString().length?r.push({number:"0".concat(i.toString()),translatedValue:"-".concat(o),selected:!1}):r.push({number:i.toString(),translatedValue:"-".concat(o),selected:!1}),o+=e)}return r};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var I=function(n){var r,o=n.height,a=n.value,i=n.setValue,c=n.use12Hours,l=n.availableHours,u=c?13:24,s=C((0,e.useState)(E(o,u,parseInt(a.slice(0,2)),l)),2),f=s[0],p=s[1],d=(0,e.useRef)(null),m=C((0,e.useState)(null),2),h=m[0],v=m[1],y=C((0,e.useState)(null),2),b=y[0],g=y[1],w=C((0,e.useState)(0!==(r=E(o,u,parseInt(a.slice(0,2)),l).filter((function(e){return e.number===a.slice(0,2)&&!0===e.selected}))).length?parseInt(r[0].translatedValue):0),2),x=w[0],S=w[1],O=C((0,e.useState)(!1),2),k=O[0],j=O[1],T=C((0,e.useState)(!1),2),N=T[0],A=T[1],I=C((0,e.useState)(null),2),V=I[0],Y=I[1],_=C((0,e.useState)(null),2),D=_[0],H=_[1],F=C((0,e.useState)(null),2),z=(F[0],F[1]),U=C((0,e.useState)(null),2),R=U[0],q=U[1],L=C((0,e.useState)(null),2),W=L[0],B=L[1],Z=C((0,e.useState)(null),2),$=(Z[0],Z[1]),J=function(e){j(!1),S((function(e){return e+h})),A(!0),H(performance.now()),performance.now()-V<=100?q("fast"):q("slow"),B(h<0?"down":"up")};(0,e.useEffect)((function(){k&&(d.current.style.transform="translateY(".concat(x+h,"px)"))}),[h]),(0,e.useEffect)((function(){if(N){if(z(D-V),D-V<=100&&0!==h){var e;"down"===W?e=x-120/(D-V)*100:"up"===W&&(e=x+120/(D-V)*100);var t=Math.round(e/o)*o;c?(t<-34*o&&(t=-34*o),t>o&&(t=o)):(t<-69*o&&(t=-69*o),t>2*o&&(t=2*o)),d.current.style.transform="translateY(".concat(t,"px)"),S(t)}if(D-V>100&&0!==h){var n=Math.round(x/o)*o;c?(n<-34*o&&(n=-34*o),n>o&&(n=o)):(n<-69*o&&(n=-69*o),n>2*o&&(n=2*o)),d.current.style.transform="translateY(".concat(n,"px)"),S(n)}v(0)}}),[N]);var G=function(e){0===h&&S(parseInt(e.target.dataset.translatedValue))},K=N&&"fast"===R,Q=N&&"slow"===R;return console.log(f),t().createElement("div",{className:"react-ios-time-picker-hour ".concat(c&&"react-ios-time-picker-hour-12hour-format"),onMouseDown:function(e){A(!1),g(e.clientY),j(!0),Y(performance.now())},onMouseUp:J,onMouseMove:function(e){v(k?e.clientY-b:0)},onMouseLeave:function(e){j(!1),S((function(e){return e+h})),A(!0),H(performance.now()),performance.now()-V<=100?q("fast"):q("slow"),B(h<0?"down":"up")},style:{height:5*o},onWheel:function(e){c?e.deltaY>0?x<o&&S((function(e){return e+o})):x>-34*o&&S((function(e){return e-o})):e.deltaY>0?x<2*o&&S((function(e){return e+o})):x>-69*o&&S((function(e){return e-o}))},onTouchStart:function(e){A(!1),g(e.targetTouches[0].clientY),j(!0),Y(performance.now())},onTouchMove:function(e){v(k?e.targetTouches[0].clientY-b:0)},onTouchEnd:J},t().createElement("div",{ref:d,className:"".concat(!0===K&&"react-ios-time-picker-fast"," ").concat(!0===Q&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(o,u).map((function(e){parseInt(e.translatedValue)===x&&($(e.arrayNumber),i((function(t){return"".concat(e.number,":").concat(t.slice(3,6))})),p((function(){return E(o,u,null,l).map((function(t){return t.number==e.number&&t.translatedValue==x?M(M({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(x,"px)")}},f.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(o,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour".concat(e.selected?" react-ios-time-picker-cell-inner-selected":"").concat(null!=e&&e.hidden?" react-ios-time-picker-cell-inner-hidden":""),onClick:G,"data-translated-value":e.translatedValue+2*o},e.number))}))))};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=function(n){var r,o=n.height,a=n.value,i=n.setValue,c=n.availableMinutes,l=D((0,e.useState)(E(o,60,parseInt(a.slice(3,6)),c)),2),u=l[0],s=l[1],f=(0,e.useRef)(null),p=D((0,e.useState)(null),2),d=p[0],m=p[1],h=D((0,e.useState)(null),2),v=h[0],y=h[1],b=D((0,e.useState)(0!==(r=E(o,60,parseInt(a.slice(3,6)),c).filter((function(e){return e.number===a.slice(3,6)&&!0===e.selected}))).length?parseInt(r[0].translatedValue):0),2),g=b[0],w=b[1],x=D((0,e.useState)(!1),2),S=x[0],O=x[1],k=D((0,e.useState)(!1),2),j=k[0],T=k[1],M=D((0,e.useState)(null),2),N=M[0],C=M[1],A=D((0,e.useState)(null),2),I=A[0],V=A[1],_=D((0,e.useState)(null),2),H=(_[0],_[1]),F=D((0,e.useState)(null),2),z=F[0],U=F[1],R=D((0,e.useState)(null),2),q=R[0],L=R[1],W=D((0,e.useState)(null),2),B=(W[0],W[1]),Z=function(e){O(!1),w((function(e){return e+d})),T(!0),V(performance.now()),performance.now()-N<=100?U("fast"):U("slow"),L(d<0?"down":"up")};(0,e.useEffect)((function(){S&&(f.current.style.transform="translateY(".concat(g+d,"px)"))}),[d]),(0,e.useEffect)((function(){if(j){if(H(I-N),I-N<=100&&0!==d){var e;"down"===q?e=g-120/(I-N)*100:"up"===q&&(e=g+120/(I-N)*100);var t=Math.round(e/o)*o;t<-177*o&&(t=-177*o),t>2*o&&(t=2*o),f.current.style.transform="translateY(".concat(t,"px)"),w(t)}if(I-N>100&&0!==d){var n=Math.round(g/o)*o;n<-177*o&&(n=-177*o),n>2*o&&(n=2*o),f.current.style.transform="translateY(".concat(n,"px)"),w(n)}m(0)}}),[j]);var $=function(e){0===d&&w(parseInt(e.target.dataset.translatedValue||0))},J=j&&"fast"===z,G=j&&"slow"===z;return t().createElement("div",{className:"react-ios-time-picker-minute",onMouseDown:function(e){T(!1),y(e.clientY),O(!0),C(performance.now())},onMouseUp:Z,onMouseMove:function(e){m(S?e.clientY-v:0)},onMouseLeave:function(e){O(!1),w((function(e){return e+d})),T(!0),V(performance.now()),performance.now()-N<=100?U("fast"):U("slow"),L(d<0?"down":"up")},style:{height:5*o},onWheel:function(e){e.deltaY>0?g<2*o&&w((function(e){return e+o})):g>-177*o&&w((function(e){return e-o}))},onTouchStart:function(e){T(!1),y(e.targetTouches[0].clientY),O(!0),C(performance.now())},onTouchMove:function(e){m(S?e.targetTouches[0].clientY-v:0)},onTouchEnd:Z},t().createElement("div",{ref:f,className:"".concat(!0===J&&"react-ios-time-picker-fast"," ").concat(!0===G&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(o,60).map((function(e){parseInt(e.translatedValue)===g&&(B(e.arrayNumber),i((function(t){return"".concat(t.slice(0,2),":").concat(e.number)})),s((function(){return E(o,60,null,c).map((function(t){return t.number==e.number&&t.translatedValue==g?Y(Y({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(g,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-minute",style:{height:"".concat(o,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-minute".concat(e.selected?" react-ios-time-picker-cell-inner-selected":""),onClick:$,"data-translated-value":e.translatedValue||0},e.number))}))))};function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var q=function(n){var r=n.pickerDefaultValue,o=n.initialValue,a=n.onChange,i=n.height,c=n.onSave,l=n.onCancel,u=n.cancelButtonText,s=n.saveButtonText,f=n.controllers,p=n.setInputValue,d=n.setIsOpen,m=n.seperator,h=n.use12Hours,v=n.onAmPmChange,y=n.availableMinutes,b=n.availableHours,g=h?o.slice(0,5):o,w=U((0,e.useState)(null===o?r:g),2),x=w[0],S=w[1],O=U((0,e.useState)({mount:!1,hourFormat:o.slice(6,8)}),2),k=O[0],E=O[1];(0,e.useEffect)((function(){if(!1===f){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),a(e)}}),[x]),(0,e.useEffect)((function(){k.mount&&v(k.hourFormat)}),[k]);var P={height:i,value:x,setValue:S,controllers:f,use12Hours:h,onAmPmChange:v,setHourFormat:E,hourFormat:k,availableHours:b,availableMinutes:y};return t().createElement("div",{className:"react-ios-time-picker react-ios-time-picker-transition"},f&&t().createElement("div",{className:"react-ios-time-picker-btn-container"},t().createElement("button",{className:"react-ios-time-picker-btn react-ios-time-picker-btn-cancel",onClick:function(){l(),d(!1)}},u),t().createElement("button",{className:"react-ios-time-picker-btn",onClick:function(){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),a(e),c(e),d(!1)}},s)),t().createElement("div",{className:"react-ios-time-picker-container",style:{height:"".concat(5*i+40,"px")}},t().createElement("div",{className:"react-ios-time-picker-selected-overlay",style:{top:"".concat(2*i+20,"px"),height:"".concat(i,"px")}}),t().createElement(I,z({availableHours:b},P)),m&&t().createElement("div",{className:"react-ios-time-picker-colon"},":"),t().createElement(F,z({availableMinutes:y},P)),h&&t().createElement(j,P)))},L=n(379),W=n.n(L),B=n(795),Z=n.n(B),$=n(569),J=n.n($),G=n(565),K=n.n(G),Q=n(216),X=n.n(Q),ee=n(589),te=n.n(ee),ne=n(346),re={};function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oe.apply(this,arguments)}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}re.styleTagTransform=te(),re.setAttributes=K(),re.insert=J().bind(null,"head"),re.domAPI=Z(),re.insertStyleElement=X(),W()(ne.Z,re),ne.Z&&ne.Z.locals&&ne.Z.locals;var ce=function(n){var r=n.value,o=void 0===r?null:r,a=n.cellHeight,i=void 0===a?28:a,c=n.placeHolder,l=void 0===c?"Select Time":c,u=n.pickerDefaultValue,s=void 0===u?"10:00":u,f=n.onChange,p=void 0===f?function(){}:f,d=n.onFocus,m=void 0===d?function(){}:d,h=n.onSave,v=void 0===h?function(){}:h,y=n.onCancel,b=void 0===y?function(){}:y,w=n.disabled,x=void 0!==w&&w,S=n.isOpen,O=void 0!==S&&S,k=n.required,j=void 0!==k&&k,E=n.cancelButtonText,P=void 0===E?"Cancel":E,T=n.saveButtonText,M=void 0===T?"Save":T,N=n.controllers,C=void 0===N||N,A=n.seperator,I=void 0===A||A,V=n.id,Y=void 0===V?null:V,_=n.use12Hours,D=void 0!==_&&_,H=n.onAmPmChange,F=void 0===H?function(){}:H,z=n.name,U=void 0===z?null:z,R=n.onOpen,L=void 0===R?function(){}:R,W=n.popupClassName,B=void 0===W?null:W,Z=n.inputClassName,$=void 0===Z?null:Z,J=n.availableHours,G=void 0!==J&&J,K=n.availableMinutes,Q=void 0!==K&&K,X=ae((0,e.useState)(O),2),ee=X[0],te=X[1],ne=ae((0,e.useState)(i),2),re=ne[0],ie=(ne[1],ae((0,e.useState)(o),2)),ce=ie[0],le=ie[1],ue=ce;null===o&&D?ue="".concat(s," AM"):null!==o||D||(ue=s);var se={onChange:p,height:re,onSave:v,onCancel:b,cancelButtonText:P,saveButtonText:M,controllers:C,setInputValue:le,setIsOpen:te,seperator:I,use12Hours:D,onAmPmChange:F,initialValue:ue,pickerDefaultValue:s,availableHours:G,availableMinutes:Q};return t().createElement(t().Fragment,null,t().createElement("div",{className:"react-ios-time-picker-main",onClick:function(){te(!ee)}},t().createElement("input",{id:Y,name:U,className:"react-ios-time-picker-input ".concat($||""),value:null===ce?"":ce,type:"text",placeholder:l,readOnly:!0,disabled:x,required:j,onFocus:function(){m(),L()}})),ee&&!x&&t().createElement(g,null,t().createElement("div",{className:"react-ios-time-picker-popup"},t().createElement("div",{className:"react-ios-time-picker-popup-overlay ".concat(B||""),onClick:function(){b(),te(!ee)}}),t().createElement(q,oe({},se,{availableHours:G,availableMinutes:Q})))))}}(),module.exports=r}();
!function(){var e={346:function(e,t,n){"use strict";var r=n(81),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,".react-ios-time-picker {\n margin-bottom: 50px;\n border-radius: 12px;\n overflow: hidden; \n box-shadow: 0 11px 15px #0005;\n}\n\n.react-ios-time-picker-transition {\n animation: fade-in 150ms ease-out;\n}\n\n@keyframes fade-in {\n 0% {\n transform: translateY(150px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n.react-ios-time-picker-container {\n display: flex;\n justify-content: center;\n position: relative;\n background-color: #1d1d1d;\n width: 220px;\n overflow: hidden;\n /* border-radius: 0 0 15px 17px; */\n padding: 20px 0;\n /* box-shadow: inset 0px 0px 5px 0px rgba(255, 159, 10, 0.5); */\n /* box-shadow: 0 11px 15px -7px rgb(0 0 0 / 20%),\n 0 24px 38px 3px rgb(0 0 0 / 14%), 0 9px 46px 8px rgb(0 0 0 / 12%); */\n}\n\n.react-ios-time-picker-hour {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-right: 5px;\n}\n\n.react-ios-time-picker-minute {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-left: 5px;\n}\n\n.react-ios-time-picker-hour-format {\n position: relative;\n width: 40px;\n overflow: hidden;\n z-index: 100;\n}\n\n.react-ios-time-picker-fast {\n transition: transform 700ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-slow {\n transition: transform 600ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-selected-overlay {\n position: absolute;\n border-radius: 6px;\n background-color: #2c2c2f;\n pointer-events: none;\n margin: 0 10px;\n left: 0;\n right: 0;\n z-index: 1;\n /* box-shadow: inset 0px 0px 2px 0px rgba(255, 159, 10, 0.3); */\n}\n\n.react-ios-time-picker-top-shadow {\n position: absolute;\n top: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(180deg, #0009 0%, #1c1c1c 100%);\n}\n\n.react-ios-time-picker-bottom-shadow {\n position: absolute;\n bottom: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(0deg, #0009 0%, hsla(0, 0%, 11%, 1) 100%);\n}\n\n.react-ios-time-picker-cell-hour {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-minute {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-hour-format {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n\n.react-ios-time-picker-cell-inner-hour {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #666;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-minute {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour:hover,\n.react-ios-time-picker-cell-inner-minute:hover,\n.react-ios-time-picker-cell-inner-hour-format:hover {\n background-color: #ff9d0ac9;\n color: white;\n}\n\n.react-ios-time-picker-cell-inner-selected {\n /* font-weight: 500; */\n color: #f7f7f7;\n font-size: 16px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format-selected {\n font-weight: 400;\n color: #f7f7f7;\n}\n\n.react-ios-time-picker-btn-container {\n position: relative;\n display: flex;\n justify-content: space-between;\n background-color: #292929;\n border-bottom: 1px solid #333;\n z-index: 100;\n}\n\n.react-ios-time-picker-btn {\n padding: 10px 15px;\n font-size: 13px;\n color: #fe9f06;\n transition: all 150ms linear;\n font-weight: 500;\n z-index: 1;\n}\n\n.react-ios-time-picker-btn:hover {\n opacity: 0.6;\n}\n\n.react-ios-time-picker-btn-cancel {\n font-size: 12px;\n font-weight: 300;\n}\n\n.react-ios-time-picker-popup {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: flex-end;\n z-index: 99998;\n}\n\n.react-ios-time-picker-popup-overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.react-ios-time-picker-input {\n cursor: text;\n padding: 5px 10px;\n border-radius: 5px;\n border: 1px solid #0005;\n}\n\n.react-ios-time-picker-colon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n color: #f7f7f7;\n position: relative;\n z-index: 100;\n font-weight: 600;\n}\n\n.react-ios-time-picker-cell-inner-hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.react-ios-time-picker-hour-format-transition {\n transition: transform 100ms ease-out;\n}\n",""]),t.Z=i},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var s=[].concat(e[u]);r&&i[s[0]]||(void 0!==a&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=a),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},81:function(e){"use strict";e.exports=function(e){return e[1]}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],c=0;c<e.length;c++){var l=e[c],u=r.base?l[0]+r.base:l[0],s=a[u]||0,f="".concat(u," ").concat(s);a[u]=s+1;var p=n(f),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var m=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:m,references:1})}i.push(f)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=n(a[i]);t[c].references--}for(var l=r(e,o),u=0;u<a.length;u++){var s=n(a[u]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}a=l}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};!function(){"use strict";n.r(r),n.d(r,{TimePicker:function(){return ce}});var e=require("react"),t=n.n(e),o=require("react-dom"),a=n.n(o),i=n(697),c=n.n(i),l=!("undefined"==typeof window||!window.document||!window.document.createElement),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return s(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),u(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return l?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),a().createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(t().Component);p.propTypes={children:c().node.isRequired,node:c().any};var d=p,m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(e){function n(){return h(this,n),v(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),m(n,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(e){this.renderPortal()}},{key:"componentWillUnmount",value:function(){a().unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(e){this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var n=this.props.children;"function"==typeof this.props.children.type&&(n=t().cloneElement(this.props.children)),this.portal=a().unstable_renderSubtreeIntoContainer(this,n,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),n}(t().Component),b=y;y.propTypes={children:c().node.isRequired,node:c().any};var g=a().createPortal?d:b;function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j=function(n){var r,o=n.height,a=(n.value,n.setValue,n.onAmPmChange,n.setHourFormat),i=n.hourFormat,c=[{number:"AM",translatedValue:(2*o).toString(),selected:!1},{number:"PM",translatedValue:o.toString(),selected:!1}],l=O((0,e.useState)([{number:"AM",translatedValue:(2*o).toString(),selected:"AM"===i.hourFormat},{number:"PM",translatedValue:o.toString(),selected:"PM"===i.hourFormat}]),2),u=l[0],s=l[1],f=(0,e.useRef)(null),p=O((0,e.useState)(null),2),d=p[0],m=p[1],h=O((0,e.useState)(null),2),v=h[0],y=h[1],b=O((0,e.useState)(0!==(r=u.filter((function(e){return!0===e.selected}))).length?r[0].translatedValue:0),2),g=b[0],w=b[1],S=O((0,e.useState)(!1),2),k=S[0],j=S[1],E=O((0,e.useState)(!1),2),P=E[0],T=E[1],M=O((0,e.useState)(null),2),N=M[0],C=M[1],A=O((0,e.useState)(null),2),I=A[0],V=A[1],Y=O((0,e.useState)(null),2),_=(Y[0],Y[1]),D=O((0,e.useState)(null),2),H=(D[0],D[1]),F=O((0,e.useState)(null),2),z=(F[0],F[1]),U=O((0,e.useState)(null),2),R=(U[0],U[1]),q=function(e){j(!1),w((function(e){return e+d})),T(!0),V(performance.now()),performance.now()-N<=100?H("fast"):H("slow"),z(d<0?"down":"up")};(0,e.useEffect)((function(){k&&(f.current.style.transform="translateY(".concat(g+d,"px)"))}),[d]),(0,e.useEffect)((function(){if(P){_(I-N);var e=Math.round(g/o)*o;e<o&&(e=o),e>2*o&&(e=2*o),f.current.style.transform="translateY(".concat(e,"px)"),w(e),m(0)}}),[P]);var L=function(e){0===d&&w(parseInt(e.target.dataset.translatedValue||0))};return t().createElement("div",{className:"react-ios-time-picker-hour-format",onMouseDown:function(e){T(!1),y(e.clientY),j(!0),C(performance.now())},onMouseUp:q,onMouseMove:function(e){m(k?e.clientY-v:0)},onMouseLeave:function(e){j(!1),w((function(e){return e+d})),T(!0),V(performance.now()),z(d<0?"down":"up")},style:{height:5*o},onWheel:function(e){e.deltaY>0?g<=o&&w((function(e){return e+o})):g>=2*o&&w((function(e){return e-o}))},onTouchStart:function(e){T(!1),y(e.targetTouches[0].clientY),j(!0),C(performance.now())},onTouchMove:function(e){m(k?e.targetTouches[0].clientY-v:0)},onTouchEnd:q},t().createElement("div",{ref:f,className:"".concat(P&&"react-ios-time-picker-hour-format-transition"),onTransitionEnd:function(e){"transform"===e.propertyName&&[{number:"AM",translatedValue:(2*o).toString(),arrayNumber:0},{number:"PM",translatedValue:o.toString(),arrayNumber:1}].map((function(e){parseInt(e.translatedValue)===g&&(R(e.arrayNumber),a({mount:!0,hourFormat:e.number}),s((function(){return c.map((function(t){return t.number==e.number&&t.translatedValue==g?x(x({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(g,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(o,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour-format".concat(e.selected?" react-ios-time-picker-cell-inner-hour-format-selected":""),onClick:L,"data-translated-value":e.translatedValue||0},e.number))}))))},E=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=[],a=[],i=13===t?a:o,c=0,l=0;l<3;l++)for(var u=0;u<t;u++){if(!1!==r){var s=1===u.toString().length?"0".concat(u):u.toString();if(!r.includes(s))continue}0===l&&u<2||13===t&&0===u||(1!==l||u!==n?(1===u.toString().length?i.push({number:"0".concat(u.toString()),translatedValue:"-".concat(c),selected:!1}):i.push({number:u.toString(),translatedValue:"-".concat(c),selected:!1}),c+=e):(1===u.toString().length?i.push({number:"0".concat(u.toString()),translatedValue:"-".concat(c),selected:!0}):i.push({number:u.toString(),translatedValue:"-".concat(c),selected:!0}),c+=e))}return i},P=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=0,a=0;a<3;a++)for(var i=0;i<t;i++){if(!1!==n){var c=1===i.toString().length?"0".concat(i):i.toString();if(!n.includes(c))continue}0===a&&i<2||13===t&&0===i||(1===i.toString().length?r.push({number:"0".concat(i.toString()),translatedValue:"-".concat(o),selected:!1}):r.push({number:i.toString(),translatedValue:"-".concat(o),selected:!1}),o+=e)}return r};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var I=function(n){var r,o=n.height,a=n.value,i=n.setValue,c=n.use12Hours,l=n.availableHours,u=c?13:24,s=C((0,e.useState)(E(o,u,parseInt(a.slice(0,2)),l)),2),f=s[0],p=s[1],d=(0,e.useRef)(null),m=C((0,e.useState)(null),2),h=m[0],v=m[1],y=C((0,e.useState)(null),2),b=y[0],g=y[1],w=C((0,e.useState)(0!==(r=E(o,u,parseInt(a.slice(0,2)),l).filter((function(e){return e.number===a.slice(0,2)&&!0===e.selected}))).length?parseInt(r[0].translatedValue):0),2),x=w[0],S=w[1],O=C((0,e.useState)(!1),2),k=O[0],j=O[1],T=C((0,e.useState)(!1),2),N=T[0],A=T[1],I=C((0,e.useState)(null),2),V=I[0],Y=I[1],_=C((0,e.useState)(null),2),D=_[0],H=_[1],F=C((0,e.useState)(null),2),z=(F[0],F[1]),U=C((0,e.useState)(null),2),R=U[0],q=U[1],L=C((0,e.useState)(null),2),W=L[0],B=L[1],Z=C((0,e.useState)(null),2),$=(Z[0],Z[1]),J=function(e){j(!1),S((function(e){return e+h})),A(!0),H(performance.now()),performance.now()-V<=100?q("fast"):q("slow"),B(h<0?"down":"up")};(0,e.useEffect)((function(){k&&(d.current.style.transform="translateY(".concat(x+h,"px)"))}),[h]),(0,e.useEffect)((function(){if(N){if(z(D-V),D-V<=100&&0!==h){var e;"down"===W?e=x-120/(D-V)*100:"up"===W&&(e=x+120/(D-V)*100);var t=Math.round(e/o)*o;c?(t<-34*o&&(t=-34*o),t>o&&(t=o)):(t<-69*o&&(t=-69*o),t>2*o&&(t=2*o)),d.current.style.transform="translateY(".concat(t,"px)"),S(t)}if(D-V>100&&0!==h){var n=Math.round(x/o)*o;c?(n<-34*o&&(n=-34*o),n>o&&(n=o)):(n<-69*o&&(n=-69*o),n>2*o&&(n=2*o)),d.current.style.transform="translateY(".concat(n,"px)"),S(n)}v(0)}}),[N]);var G=function(e){0===h&&(console.log(parseInt(e.target.dataset.translatedValue),e.target.dataset.translatedValue),S(parseInt(e.target.dataset.translatedValue)))},K=N&&"fast"===R,Q=N&&"slow"===R;return console.log(f),t().createElement("div",{className:"react-ios-time-picker-hour ".concat(c&&"react-ios-time-picker-hour-12hour-format"),onMouseDown:function(e){A(!1),g(e.clientY),j(!0),Y(performance.now())},onMouseUp:J,onMouseMove:function(e){v(k?e.clientY-b:0)},onMouseLeave:function(e){j(!1),S((function(e){return e+h})),A(!0),H(performance.now()),performance.now()-V<=100?q("fast"):q("slow"),B(h<0?"down":"up")},style:{height:5*o},onWheel:function(e){c?e.deltaY>0?x<o&&S((function(e){return e+o})):x>-34*o&&S((function(e){return e-o})):e.deltaY>0?x<2*o&&S((function(e){return e+o})):x>-69*o&&S((function(e){return e-o}))},onTouchStart:function(e){A(!1),g(e.targetTouches[0].clientY),j(!0),Y(performance.now())},onTouchMove:function(e){v(k?e.targetTouches[0].clientY-b:0)},onTouchEnd:J},t().createElement("div",{ref:d,className:"".concat(!0===K&&"react-ios-time-picker-fast"," ").concat(!0===Q&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(o,u).map((function(e){parseInt(e.translatedValue)===x&&($(e.arrayNumber),i((function(t){return"".concat(e.number,":").concat(t.slice(3,6))})),p((function(){return E(o,u,null,l).map((function(t){return t.number==e.number&&t.translatedValue==x?M(M({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(x,"px)")}},f.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(o,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour".concat(e.selected?" react-ios-time-picker-cell-inner-selected":"").concat(null!=e&&e.hidden?" react-ios-time-picker-cell-inner-hidden":""),onClick:G,"data-translated-value":e.translatedValue},e.number))}))))};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=function(n){var r,o=n.height,a=n.value,i=n.setValue,c=n.availableMinutes,l=D((0,e.useState)(E(o,60,parseInt(a.slice(3,6)),c)),2),u=l[0],s=l[1],f=(0,e.useRef)(null),p=D((0,e.useState)(null),2),d=p[0],m=p[1],h=D((0,e.useState)(null),2),v=h[0],y=h[1],b=D((0,e.useState)(0!==(r=E(o,60,parseInt(a.slice(3,6)),c).filter((function(e){return e.number===a.slice(3,6)&&!0===e.selected}))).length?parseInt(r[0].translatedValue):0),2),g=b[0],w=b[1],x=D((0,e.useState)(!1),2),S=x[0],O=x[1],k=D((0,e.useState)(!1),2),j=k[0],T=k[1],M=D((0,e.useState)(null),2),N=M[0],C=M[1],A=D((0,e.useState)(null),2),I=A[0],V=A[1],_=D((0,e.useState)(null),2),H=(_[0],_[1]),F=D((0,e.useState)(null),2),z=F[0],U=F[1],R=D((0,e.useState)(null),2),q=R[0],L=R[1],W=D((0,e.useState)(null),2),B=(W[0],W[1]),Z=function(e){O(!1),w((function(e){return e+d})),T(!0),V(performance.now()),performance.now()-N<=100?U("fast"):U("slow"),L(d<0?"down":"up")};(0,e.useEffect)((function(){S&&(f.current.style.transform="translateY(".concat(g+d,"px)"))}),[d]),(0,e.useEffect)((function(){if(j){if(H(I-N),I-N<=100&&0!==d){var e;"down"===q?e=g-120/(I-N)*100:"up"===q&&(e=g+120/(I-N)*100);var t=Math.round(e/o)*o;t<-177*o&&(t=-177*o),t>2*o&&(t=2*o),f.current.style.transform="translateY(".concat(t,"px)"),w(t)}if(I-N>100&&0!==d){var n=Math.round(g/o)*o;n<-177*o&&(n=-177*o),n>2*o&&(n=2*o),f.current.style.transform="translateY(".concat(n,"px)"),w(n)}m(0)}}),[j]);var $=function(e){0===d&&w(parseInt(e.target.dataset.translatedValue||0))},J=j&&"fast"===z,G=j&&"slow"===z;return t().createElement("div",{className:"react-ios-time-picker-minute",onMouseDown:function(e){T(!1),y(e.clientY),O(!0),C(performance.now())},onMouseUp:Z,onMouseMove:function(e){m(S?e.clientY-v:0)},onMouseLeave:function(e){O(!1),w((function(e){return e+d})),T(!0),V(performance.now()),performance.now()-N<=100?U("fast"):U("slow"),L(d<0?"down":"up")},style:{height:5*o},onWheel:function(e){e.deltaY>0?g<2*o&&w((function(e){return e+o})):g>-177*o&&w((function(e){return e-o}))},onTouchStart:function(e){T(!1),y(e.targetTouches[0].clientY),O(!0),C(performance.now())},onTouchMove:function(e){m(S?e.targetTouches[0].clientY-v:0)},onTouchEnd:Z},t().createElement("div",{ref:f,className:"".concat(!0===J&&"react-ios-time-picker-fast"," ").concat(!0===G&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(o,60).map((function(e){parseInt(e.translatedValue)===g&&(B(e.arrayNumber),i((function(t){return"".concat(t.slice(0,2),":").concat(e.number)})),s((function(){return E(o,60,null,c).map((function(t){return t.number==e.number&&t.translatedValue==g?Y(Y({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(g,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-minute",style:{height:"".concat(o,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-minute".concat(e.selected?" react-ios-time-picker-cell-inner-selected":""),onClick:$,"data-translated-value":e.translatedValue||0},e.number))}))))};function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var q=function(n){var r=n.pickerDefaultValue,o=n.initialValue,a=n.onChange,i=n.height,c=n.onSave,l=n.onCancel,u=n.cancelButtonText,s=n.saveButtonText,f=n.controllers,p=n.setInputValue,d=n.setIsOpen,m=n.seperator,h=n.use12Hours,v=n.onAmPmChange,y=n.availableMinutes,b=n.availableHours,g=h?o.slice(0,5):o,w=U((0,e.useState)(null===o?r:g),2),x=w[0],S=w[1],O=U((0,e.useState)({mount:!1,hourFormat:o.slice(6,8)}),2),k=O[0],E=O[1];(0,e.useEffect)((function(){if(!1===f){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),a(e)}}),[x]),(0,e.useEffect)((function(){k.mount&&v(k.hourFormat)}),[k]);var P={height:i,value:x,setValue:S,controllers:f,use12Hours:h,onAmPmChange:v,setHourFormat:E,hourFormat:k,availableHours:b,availableMinutes:y};return t().createElement("div",{className:"react-ios-time-picker react-ios-time-picker-transition"},f&&t().createElement("div",{className:"react-ios-time-picker-btn-container"},t().createElement("button",{className:"react-ios-time-picker-btn react-ios-time-picker-btn-cancel",onClick:function(){l(),d(!1)}},u),t().createElement("button",{className:"react-ios-time-picker-btn",onClick:function(){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),a(e),c(e),d(!1)}},s)),t().createElement("div",{className:"react-ios-time-picker-container",style:{height:"".concat(5*i+40,"px")}},t().createElement("div",{className:"react-ios-time-picker-selected-overlay",style:{top:"".concat(2*i+20,"px"),height:"".concat(i,"px")}}),t().createElement(I,z({availableHours:b},P)),m&&t().createElement("div",{className:"react-ios-time-picker-colon"},":"),t().createElement(F,z({availableMinutes:y},P)),h&&t().createElement(j,P)))},L=n(379),W=n.n(L),B=n(795),Z=n.n(B),$=n(569),J=n.n($),G=n(565),K=n.n(G),Q=n(216),X=n.n(Q),ee=n(589),te=n.n(ee),ne=n(346),re={};function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oe.apply(this,arguments)}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}re.styleTagTransform=te(),re.setAttributes=K(),re.insert=J().bind(null,"head"),re.domAPI=Z(),re.insertStyleElement=X(),W()(ne.Z,re),ne.Z&&ne.Z.locals&&ne.Z.locals;var ce=function(n){var r=n.value,o=void 0===r?null:r,a=n.cellHeight,i=void 0===a?28:a,c=n.placeHolder,l=void 0===c?"Select Time":c,u=n.pickerDefaultValue,s=void 0===u?"10:00":u,f=n.onChange,p=void 0===f?function(){}:f,d=n.onFocus,m=void 0===d?function(){}:d,h=n.onSave,v=void 0===h?function(){}:h,y=n.onCancel,b=void 0===y?function(){}:y,w=n.disabled,x=void 0!==w&&w,S=n.isOpen,O=void 0!==S&&S,k=n.required,j=void 0!==k&&k,E=n.cancelButtonText,P=void 0===E?"Cancel":E,T=n.saveButtonText,M=void 0===T?"Save":T,N=n.controllers,C=void 0===N||N,A=n.seperator,I=void 0===A||A,V=n.id,Y=void 0===V?null:V,_=n.use12Hours,D=void 0!==_&&_,H=n.onAmPmChange,F=void 0===H?function(){}:H,z=n.name,U=void 0===z?null:z,R=n.onOpen,L=void 0===R?function(){}:R,W=n.popupClassName,B=void 0===W?null:W,Z=n.inputClassName,$=void 0===Z?null:Z,J=n.availableHours,G=void 0!==J&&J,K=n.availableMinutes,Q=void 0!==K&&K,X=ae((0,e.useState)(O),2),ee=X[0],te=X[1],ne=ae((0,e.useState)(i),2),re=ne[0],ie=(ne[1],ae((0,e.useState)(o),2)),ce=ie[0],le=ie[1],ue=ce;null===o&&D?ue="".concat(s," AM"):null!==o||D||(ue=s);var se={onChange:p,height:re,onSave:v,onCancel:b,cancelButtonText:P,saveButtonText:M,controllers:C,setInputValue:le,setIsOpen:te,seperator:I,use12Hours:D,onAmPmChange:F,initialValue:ue,pickerDefaultValue:s,availableHours:G,availableMinutes:Q};return t().createElement(t().Fragment,null,t().createElement("div",{className:"react-ios-time-picker-main",onClick:function(){te(!ee)}},t().createElement("input",{id:Y,name:U,className:"react-ios-time-picker-input ".concat($||""),value:null===ce?"":ce,type:"text",placeholder:l,readOnly:!0,disabled:x,required:j,onFocus:function(){m(),L()}})),ee&&!x&&t().createElement(g,null,t().createElement("div",{className:"react-ios-time-picker-popup"},t().createElement("div",{className:"react-ios-time-picker-popup-overlay ".concat(B||""),onClick:function(){b(),te(!ee)}}),t().createElement(q,oe({},se,{availableHours:G,availableMinutes:Q})))))}}(),module.exports=r}();
{
"name": "react-time-picker-ios-like-v2",
"version": "0.1.9",
"version": "0.2.0",
"description": "A modern time picker for your React app.",

@@ -5,0 +5,0 @@ "main": "dist/TimePicker.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc